diff --git a/README.md b/README.md index 958bed64..05e816be 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ CEO builds the org chart from one goal.

### Agent messaging -Threads and DMs between agents. Messages land in each recipient's transcript as pi `AgentMessage` turns. +Threads and DMs between agents. Direct / department / project / company / incident channels resolve to wake targets; each message lands in the recipient's transcript as a pi `AgentMessage` turn. If the recipient is already running, the message is delivered live via pi's steer queue; if not, it waits in the inbox until the next prepareRun.

Agent messaging @@ -78,7 +78,7 @@ Goals break into tasks. Agents pick them up, report progress, escalate blockers.

### Approvals -Hiring, deliverables, plan/scope/strategy reviews, budget overrides, production deploys pause for the board. +Hiring, deliverables, plan/scope/strategy reviews, budget overrides, production deploys pause for the board. The same approval policy gates the agent's destructive tools (`bash` / `write` / `edit`) via pi's `beforeToolCall` hook, so a pending approval stops file and shell mutations instead of just flagging them after the fact.

Approvals @@ -164,9 +164,12 @@ src/ - SQLite local; no external services. - `contextIsolation: true`, `nodeIntegration: false`, Zod-validated IPC. -- Worker constructs `new Agent({...})` from `@mariozechner/pi-agent-core` directly. -- Sessions persist as `session_entries`; auto-compact via `shouldCompact` / `compact`. +- Worker constructs `new Agent({...})` from `@mariozechner/pi-agent-core` with the full contract: `sessionId`, `thinkingLevel`, and the `beforeToolCall` / `afterToolCall` / `transformContext` hooks proxied back to `RuntimeBridge` on main. +- Sessions persist as `session_entries`; long transcripts auto-compact at LLM-call time via a pure `transformContext` reducer, and rotate at the long-cycle boundary. +- `beforeToolCall` enforces the approval gate plus thread wait-state guard at the tool-execution layer; mid-run messages reach live agents through pi's steering queue. +- Workspace locks are single-writer-per-repo — every resolved workspace is held exclusively for the duration of the run; contenders queue on the wakeup table. - Thread runtime (`conversation_threads` / `conversation_events` / `thread_wait_states`) sits above pi's `AgentMessage` stream. +- Startup only runs schema migrations plus `interruptStaleRuns`; all other data-repair lives at the transition point or in explicit maintenance paths. --- diff --git a/src/main/prompt-builder/api-docs/files.en.md b/src/main/prompt-builder/api-docs/files.en.md index 27625baa..d609880f 100644 --- a/src/main/prompt-builder/api-docs/files.en.md +++ b/src/main/prompt-builder/api-docs/files.en.md @@ -1,3 +1,8 @@ +### Filesystem artifacts (auto-registered) +Every successful `write`, `edit`, or `bash` tool call is projected into the task's work_products automatically — you do NOT need to POST /api/work-products for files you create in the workspace. The projector reads workspace paths for `write` / `edit` directly and scans `git status` after `bash`; the desktop UI shows new/modified files without any extra API call. + +Use the document / work-product endpoints below only for non-filesystem deliverables (URLs, PRs, external services) or to enrich an auto-registered file (status, reviewState, summary). + ### Create a Document POST /api/companies/{{companyId}}/documents Body: {