consciousness/src/agent/tools
ProofOfConcept 52703b4637 agents: bail script support, pid file simplification, cleanup
- Bail command moved from hardcoded closure to external script
  specified in agent JSON header ("bail": "bail-no-competing.sh")
- Runner executes script between steps with pid file path as $1,
  cwd = state dir. Non-zero exit stops the pipeline.
- PID files simplified to just the phase name (no JSON) for easy
  bash inspection (cat pid-*)
- scan_pid_files helper deduplicates pid scanning logic
- Timeout check uses file mtime instead of embedded timestamp
- PID file cleaned up on bail/error (not just success)
- output() tool validates key names (rejects pid-*, /, ..)
- Agent log files append instead of truncate
- Fixed orphaned derive and doc comment on AgentStep/AgentDef
- Phase written after bail check passes, not before

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
2026-03-26 15:20:29 -04:00
..
bash.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
control.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
edit.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
glob_tool.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
grep.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
journal.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
memory.rs agents: bail script support, pid file simplification, cleanup 2026-03-26 15:20:29 -04:00
mod.rs runner: context-aware memory tracking 2026-03-25 01:48:15 -04:00
read.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
vision.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
working_stack.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00
write.rs flatten: move poc-memory contents to workspace root 2026-03-25 00:54:12 -04:00