@fitchmultz/pi-subagents 0.0.0-stage → 0.44.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1654 -0
- package/LICENSE +21 -0
- package/README.md +1533 -2
- package/agents/context-builder.md +97 -0
- package/agents/debugger.md +51 -0
- package/agents/delegate.md +13 -0
- package/agents/fixer.md +37 -0
- package/agents/oracle.md +71 -0
- package/agents/planner.md +72 -0
- package/agents/researcher.md +51 -0
- package/agents/reviewer-claude.md +69 -0
- package/agents/reviewer-gpt.md +68 -0
- package/agents/reviewer-ponytail.md +82 -0
- package/agents/reviewer-security.md +81 -0
- package/agents/reviewer.md +69 -0
- package/agents/scout.md +66 -0
- package/agents/ui-designer.md +51 -0
- package/agents/watcher.md +26 -0
- package/agents/worker.md +46 -0
- package/agents/writer.md +36 -0
- package/dist/agents/agent-management.js +923 -0
- package/dist/agents/agent-scope.js +7 -0
- package/dist/agents/agent-selection.js +20 -0
- package/dist/agents/agent-serializer.js +100 -0
- package/dist/agents/agents.js +752 -0
- package/dist/agents/chain-serializer.js +367 -0
- package/dist/agents/frontmatter.js +21 -0
- package/dist/agents/identity.js +29 -0
- package/dist/agents/skills.js +570 -0
- package/dist/extension/build-info.js +1 -0
- package/dist/extension/compact-tools.js +112 -0
- package/dist/extension/config.js +22 -0
- package/dist/extension/control-notices.js +29 -0
- package/dist/extension/doctor.js +143 -0
- package/dist/extension/fanout-child.js +326 -0
- package/dist/extension/index.js +577 -0
- package/dist/extension/schemas.js +416 -0
- package/dist/extension/tool-input.js +20 -0
- package/dist/extension/tool-result.js +14 -0
- package/dist/history/canonical-result.js +81 -0
- package/dist/history/database.js +72 -0
- package/dist/history/index.js +199 -0
- package/dist/history/ingest.js +468 -0
- package/dist/history/queries.js +350 -0
- package/dist/history/store.js +216 -0
- package/dist/history/types.js +4 -0
- package/dist/history/worker.js +466 -0
- package/dist/intercom/intercom-bridge.js +112 -0
- package/dist/intercom/live-intercom.js +94 -0
- package/dist/intercom/result-intercom.js +373 -0
- package/dist/pi-intercom/agent-dir.js +10 -0
- package/dist/pi-intercom/bridge.js +750 -0
- package/dist/pi-intercom/broker/broker.js +426 -0
- package/dist/pi-intercom/broker/client.js +492 -0
- package/dist/pi-intercom/broker/framing.js +65 -0
- package/dist/pi-intercom/broker/paths.js +42 -0
- package/dist/pi-intercom/broker/pid.js +66 -0
- package/dist/pi-intercom/broker/spawn.js +221 -0
- package/dist/pi-intercom/config.js +102 -0
- package/dist/pi-intercom/index.js +2942 -0
- package/dist/pi-intercom/reply-tracker.js +182 -0
- package/dist/pi-intercom/session-targets.js +128 -0
- package/dist/pi-intercom/subagent-live-events.js +132 -0
- package/dist/pi-intercom/topics.js +157 -0
- package/dist/pi-intercom/types.js +163 -0
- package/dist/pi-intercom/ui/compose.js +269 -0
- package/dist/pi-intercom/ui/inline-message.js +80 -0
- package/dist/pi-intercom/ui/session-list.js +124 -0
- package/dist/runs/background/async-control.js +95 -0
- package/dist/runs/background/async-execution.js +676 -0
- package/dist/runs/background/async-job-tracker.js +383 -0
- package/dist/runs/background/async-result-file.js +58 -0
- package/dist/runs/background/async-resume.js +305 -0
- package/dist/runs/background/async-status.js +442 -0
- package/dist/runs/background/completion-dedupe.js +69 -0
- package/dist/runs/background/completion-delivery.js +245 -0
- package/dist/runs/background/notify.js +71 -0
- package/dist/runs/background/parallel-groups.js +55 -0
- package/dist/runs/background/result-watcher.js +426 -0
- package/dist/runs/background/run-id-resolver.js +64 -0
- package/dist/runs/background/run-status.js +382 -0
- package/dist/runs/background/stale-run-reconciler.js +335 -0
- package/dist/runs/background/subagent-runner-launcher.js +55 -0
- package/dist/runs/background/subagent-runner.js +1872 -0
- package/dist/runs/background/top-level-async.js +5 -0
- package/dist/runs/foreground/chain-clarify.js +1152 -0
- package/dist/runs/foreground/clarify-invocation.js +72 -0
- package/dist/runs/foreground/execution-input.js +423 -0
- package/dist/runs/foreground/foreground-control.js +817 -0
- package/dist/runs/foreground/question-control.js +88 -0
- package/dist/runs/foreground/run-async-path.js +205 -0
- package/dist/runs/foreground/subagent-executor.js +442 -0
- package/dist/runs/foreground/subagent-params.js +165 -0
- package/dist/runs/foreground/wait-run.js +141 -0
- package/dist/runs/shared/acceptance-contract.js +253 -0
- package/dist/runs/shared/acceptance-evaluation.js +256 -0
- package/dist/runs/shared/acceptance-finalization.js +280 -0
- package/dist/runs/shared/acceptance-reports.js +147 -0
- package/dist/runs/shared/acceptance.js +4 -0
- package/dist/runs/shared/chain-outputs.js +110 -0
- package/dist/runs/shared/child-attempt.js +693 -0
- package/dist/runs/shared/child-execution-cwd.js +96 -0
- package/dist/runs/shared/child-observations.js +114 -0
- package/dist/runs/shared/claude-code.js +199 -0
- package/dist/runs/shared/completion-guard.js +31 -0
- package/dist/runs/shared/dynamic-fanout.js +274 -0
- package/dist/runs/shared/history-index.js +72 -0
- package/dist/runs/shared/mcp-direct-tool-allowlist.js +334 -0
- package/dist/runs/shared/model-fallback.js +185 -0
- package/dist/runs/shared/mutating-tool-guard.js +170 -0
- package/dist/runs/shared/native-finalization.js +101 -0
- package/dist/runs/shared/native-usage.js +153 -0
- package/dist/runs/shared/nested-events.js +700 -0
- package/dist/runs/shared/nested-path.js +48 -0
- package/dist/runs/shared/nested-render.js +108 -0
- package/dist/runs/shared/parallel-utils.js +61 -0
- package/dist/runs/shared/parent-receipts.js +68 -0
- package/dist/runs/shared/parent-usage.js +121 -0
- package/dist/runs/shared/pi-args.js +310 -0
- package/dist/runs/shared/pi-spawn.js +52 -0
- package/dist/runs/shared/run-history-queries.js +45 -0
- package/dist/runs/shared/run-history.js +110 -0
- package/dist/runs/shared/run-id-ambiguity.js +4 -0
- package/dist/runs/shared/run-records.js +679 -0
- package/dist/runs/shared/session-cwd-preload.js +33 -0
- package/dist/runs/shared/single-output.js +222 -0
- package/dist/runs/shared/streaming-text.js +15 -0
- package/dist/runs/shared/structured-output.js +55 -0
- package/dist/runs/shared/subagent-control.js +179 -0
- package/dist/runs/shared/subagent-prompt-runtime.js +197 -0
- package/dist/runs/shared/subagent-tool-loop-guard.js +66 -0
- package/dist/runs/shared/supervisor-questions.js +350 -0
- package/dist/runs/shared/workflow-graph.js +214 -0
- package/dist/runs/shared/workflow-policy.js +84 -0
- package/dist/runs/shared/worktree.js +525 -0
- package/dist/shared/agent-context-policy.js +126 -0
- package/dist/shared/artifacts.js +96 -0
- package/dist/shared/atomic-json.js +13 -0
- package/dist/shared/cooperative.js +20 -0
- package/dist/shared/execution-cwd.js +14 -0
- package/dist/shared/file-coalescer.js +21 -0
- package/dist/shared/fork-context.js +49 -0
- package/dist/shared/formatters.js +85 -0
- package/dist/shared/journal-reader.js +407 -0
- package/dist/shared/lazy-tools.js +32 -0
- package/dist/shared/model-info.js +68 -0
- package/dist/shared/native-session.js +15 -0
- package/dist/shared/native-tui.js +18 -0
- package/dist/shared/native-typebox.js +20 -0
- package/dist/shared/post-exit-stdio-guard.js +197 -0
- package/dist/shared/prompt-sections.js +8 -0
- package/dist/shared/session-entries.js +52 -0
- package/dist/shared/session-identity.js +14 -0
- package/dist/shared/settings.js +254 -0
- package/dist/shared/status-format.js +111 -0
- package/dist/shared/temp-root.js +114 -0
- package/dist/shared/types.js +207 -0
- package/dist/shared/ui-mode.js +3 -0
- package/dist/shared/utils.js +334 -0
- package/dist/slash/prompt-template-bridge.js +298 -0
- package/dist/slash/slash-bridge.js +116 -0
- package/dist/slash/slash-commands.js +607 -0
- package/dist/slash/slash-live-state.js +246 -0
- package/dist/tui/action-hints.js +75 -0
- package/dist/tui/agent-history.js +197 -0
- package/dist/tui/agent-view.js +1656 -0
- package/dist/tui/render.js +1515 -0
- package/docs/intercom-bridge.md +212 -0
- package/docs/intercom.md +581 -0
- package/docs/performance.md +121 -0
- package/package.json +102 -4
- package/prompts/gather-context-and-clarify.md +14 -0
- package/prompts/parallel-cleanup.md +62 -0
- package/prompts/parallel-context-build.md +56 -0
- package/prompts/parallel-handoff-plan.md +62 -0
- package/prompts/parallel-research.md +51 -0
- package/prompts/parallel-review.md +59 -0
- package/prompts/review-loop.md +42 -0
- package/scripts/build.mjs +134 -0
- package/scripts/check-compat.mjs +48 -0
- package/scripts/compat-host.mjs +19 -0
- package/scripts/intercom-bridge-credentials.mjs +143 -0
- package/scripts/intercom-remote.mjs +103 -0
- package/scripts/linux-smoke.sh +51 -0
- package/scripts/local-install-smoke.mjs +66 -0
- package/scripts/native-package-smoke.mjs +82 -0
- package/scripts/package-smoke.mjs +209 -0
- package/scripts/prepare.mjs +67 -0
- package/scripts/real-pi-smoke.mjs +415 -0
- package/scripts/run-tests.mjs +149 -0
- package/skills/pi-intercom/SKILL.md +113 -0
- package/skills/pi-intercom/evals/evals.json +29 -0
- package/skills/pi-intercom/evals/trigger-evals.json +47 -0
- package/skills/pi-intercom/references/peer-sessions.md +69 -0
- package/skills/pi-subagents/SKILL.md +76 -0
- package/skills/pi-subagents/evals/evals.json +29 -0
- package/skills/pi-subagents/evals/trigger-evals.json +42 -0
- package/skills/pi-subagents/references/full-orchestration-guide.md +863 -0
- package/src/agents/agent-management.ts +813 -0
- package/src/agents/agent-scope.ts +7 -0
- package/src/agents/agent-selection.ts +23 -0
- package/src/agents/agent-serializer.ts +99 -0
- package/src/agents/agents.ts +916 -0
- package/src/agents/chain-serializer.ts +329 -0
- package/src/agents/frontmatter.ts +21 -0
- package/src/agents/identity.ts +30 -0
- package/src/agents/skills.ts +637 -0
- package/src/extension/build-info.ts +2 -0
- package/src/extension/compact-tools.ts +114 -0
- package/src/extension/config.ts +23 -0
- package/src/extension/control-notices.ts +47 -0
- package/src/extension/doctor.ts +171 -0
- package/src/extension/fanout-child.ts +312 -0
- package/src/extension/index.ts +649 -0
- package/src/extension/schemas.ts +444 -0
- package/src/extension/tool-input.ts +19 -0
- package/src/extension/tool-result.ts +16 -0
- package/src/history/canonical-result.ts +62 -0
- package/src/history/database.ts +59 -0
- package/src/history/index.ts +156 -0
- package/src/history/ingest.ts +349 -0
- package/src/history/queries.ts +241 -0
- package/src/history/store.ts +203 -0
- package/src/history/types.ts +166 -0
- package/src/history/worker.ts +321 -0
- package/src/intercom/intercom-bridge.ts +123 -0
- package/src/intercom/live-intercom.ts +104 -0
- package/src/intercom/result-intercom.ts +429 -0
- package/src/pi-intercom/agent-dir.ts +9 -0
- package/src/pi-intercom/bridge.ts +668 -0
- package/src/pi-intercom/broker/broker.ts +463 -0
- package/src/pi-intercom/broker/client.ts +558 -0
- package/src/pi-intercom/broker/framing.ts +77 -0
- package/src/pi-intercom/broker/paths.ts +47 -0
- package/src/pi-intercom/broker/pid.ts +59 -0
- package/src/pi-intercom/broker/spawn.ts +248 -0
- package/src/pi-intercom/config.ts +142 -0
- package/src/pi-intercom/index.ts +2929 -0
- package/src/pi-intercom/reply-tracker.ts +211 -0
- package/src/pi-intercom/session-targets.ts +172 -0
- package/src/pi-intercom/subagent-live-events.ts +133 -0
- package/src/pi-intercom/topics.ts +125 -0
- package/src/pi-intercom/types.ts +271 -0
- package/src/pi-intercom/ui/compose.ts +289 -0
- package/src/pi-intercom/ui/inline-message.ts +92 -0
- package/src/pi-intercom/ui/session-list.ts +139 -0
- package/src/runs/background/async-control.ts +89 -0
- package/src/runs/background/async-execution.ts +850 -0
- package/src/runs/background/async-job-tracker.ts +385 -0
- package/src/runs/background/async-result-file.ts +62 -0
- package/src/runs/background/async-resume.ts +333 -0
- package/src/runs/background/async-status.ts +481 -0
- package/src/runs/background/completion-dedupe.ts +79 -0
- package/src/runs/background/completion-delivery.ts +195 -0
- package/src/runs/background/notify.ts +123 -0
- package/src/runs/background/parallel-groups.ts +53 -0
- package/src/runs/background/result-watcher.ts +423 -0
- package/src/runs/background/run-id-resolver.ts +69 -0
- package/src/runs/background/run-status.ts +384 -0
- package/src/runs/background/stale-run-reconciler.ts +369 -0
- package/src/runs/background/subagent-runner-launcher.ts +56 -0
- package/src/runs/background/subagent-runner.ts +2053 -0
- package/src/runs/background/top-level-async.ts +13 -0
- package/src/runs/foreground/chain-clarify.ts +1340 -0
- package/src/runs/foreground/clarify-invocation.ts +77 -0
- package/src/runs/foreground/execution-input.ts +467 -0
- package/src/runs/foreground/foreground-control.ts +821 -0
- package/src/runs/foreground/question-control.ts +82 -0
- package/src/runs/foreground/run-async-path.ts +243 -0
- package/src/runs/foreground/subagent-executor.ts +501 -0
- package/src/runs/foreground/subagent-params.ts +320 -0
- package/src/runs/foreground/wait-run.ts +124 -0
- package/src/runs/shared/acceptance-contract.ts +257 -0
- package/src/runs/shared/acceptance-evaluation.ts +275 -0
- package/src/runs/shared/acceptance-finalization.ts +353 -0
- package/src/runs/shared/acceptance-reports.ts +152 -0
- package/src/runs/shared/acceptance.ts +33 -0
- package/src/runs/shared/chain-outputs.ts +114 -0
- package/src/runs/shared/child-attempt.ts +623 -0
- package/src/runs/shared/child-execution-cwd.ts +91 -0
- package/src/runs/shared/child-observations.ts +99 -0
- package/src/runs/shared/claude-code.ts +243 -0
- package/src/runs/shared/completion-guard.ts +35 -0
- package/src/runs/shared/dynamic-fanout.ts +295 -0
- package/src/runs/shared/history-index.ts +69 -0
- package/src/runs/shared/mcp-direct-tool-allowlist.ts +376 -0
- package/src/runs/shared/model-fallback.ts +219 -0
- package/src/runs/shared/mutating-tool-guard.ts +194 -0
- package/src/runs/shared/native-finalization.ts +128 -0
- package/src/runs/shared/native-usage.ts +113 -0
- package/src/runs/shared/nested-events.ts +752 -0
- package/src/runs/shared/nested-path.ts +52 -0
- package/src/runs/shared/nested-render.ts +119 -0
- package/src/runs/shared/parallel-utils.ts +153 -0
- package/src/runs/shared/parent-receipts.ts +59 -0
- package/src/runs/shared/parent-usage.ts +121 -0
- package/src/runs/shared/pi-args.ts +350 -0
- package/src/runs/shared/pi-spawn.ts +52 -0
- package/src/runs/shared/run-history-queries.ts +44 -0
- package/src/runs/shared/run-history.ts +100 -0
- package/src/runs/shared/run-id-ambiguity.ts +4 -0
- package/src/runs/shared/run-records.ts +607 -0
- package/src/runs/shared/session-cwd-preload.ts +27 -0
- package/src/runs/shared/single-output.ts +267 -0
- package/src/runs/shared/streaming-text.ts +18 -0
- package/src/runs/shared/structured-output.ts +68 -0
- package/src/runs/shared/subagent-control.ts +219 -0
- package/src/runs/shared/subagent-prompt-runtime.ts +201 -0
- package/src/runs/shared/subagent-tool-loop-guard.ts +89 -0
- package/src/runs/shared/supervisor-questions.ts +415 -0
- package/src/runs/shared/workflow-graph.ts +220 -0
- package/src/runs/shared/workflow-policy.ts +125 -0
- package/src/runs/shared/worktree.ts +635 -0
- package/src/shared/agent-context-policy.ts +184 -0
- package/src/shared/artifacts.ts +95 -0
- package/src/shared/atomic-json.ts +16 -0
- package/src/shared/cooperative.ts +21 -0
- package/src/shared/execution-cwd.ts +14 -0
- package/src/shared/file-coalescer.ts +29 -0
- package/src/shared/fork-context.ts +68 -0
- package/src/shared/formatters.ts +84 -0
- package/src/shared/journal-reader.ts +333 -0
- package/src/shared/lazy-tools.ts +36 -0
- package/src/shared/model-info.ts +81 -0
- package/src/shared/native-session.ts +8 -0
- package/src/shared/native-tui.ts +10 -0
- package/src/shared/native-typebox.ts +14 -0
- package/src/shared/post-exit-stdio-guard.ts +204 -0
- package/src/shared/prompt-sections.ts +10 -0
- package/src/shared/session-entries.ts +49 -0
- package/src/shared/session-identity.ts +18 -0
- package/src/shared/settings.ts +384 -0
- package/src/shared/status-format.ts +123 -0
- package/src/shared/temp-root.ts +107 -0
- package/src/shared/types.ts +1260 -0
- package/src/shared/ui-mode.ts +5 -0
- package/src/shared/utils.ts +342 -0
- package/src/slash/prompt-template-bridge.ts +408 -0
- package/src/slash/slash-bridge.ts +178 -0
- package/src/slash/slash-commands.ts +617 -0
- package/src/slash/slash-live-state.ts +292 -0
- package/src/tui/action-hints.ts +69 -0
- package/src/tui/agent-history.ts +210 -0
- package/src/tui/agent-view.ts +1323 -0
- package/src/tui/render.ts +1550 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +19 -0
package/docs/intercom.md
ADDED
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
# Intercom
|
|
2
|
+
|
|
3
|
+
Direct 1:1 messaging between pi sessions on the same machine. Send context, findings, or requests from one session to another — whether you're driving the conversation or letting agents coordinate.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Your agents: Option+Shift+M (Alt+Shift+M) or /agents. Other peers: /intercom [all]. Quiet current state: /intercom topics.
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Why
|
|
10
|
+
|
|
11
|
+
Sometimes you're running multiple pi sessions — one researching, one executing, one reviewing. Pi-intercom lets you:
|
|
12
|
+
|
|
13
|
+
- **User-driven orchestration** — Send context or findings from your research session to your execution session
|
|
14
|
+
- **Agent collaboration** — An agent can reach out to another session when it needs help or wants to share results
|
|
15
|
+
- **Session awareness** — See what other pi sessions are running and their current status
|
|
16
|
+
|
|
17
|
+
Unlike pi-messenger (a shared chat room for multi-agent swarms), pi-intercom is for targeted 1:1 communication where you pick the recipient.
|
|
18
|
+
|
|
19
|
+
Intercom is bundled with `pi-subagents`: delegated child agents get a child-only `contact_supervisor` tool when the subagent extension supplies bridge metadata. Use blocking `need_decision` or `interview_request` only when the ephemeral child cannot safely continue and must remain alive for the reply. Use `progress_update` only for a discovery or change the supervisor needs while working. It steers at the next tool boundary; skip starts, redundant narration, and routine completion, and retain material findings in the final result. Fresh normal sessions see `load_intercom`, a small entry that enables the full `intercom` tool without sending or checking anything.
|
|
20
|
+
|
|
21
|
+
The broker, presence, receipts and keyboard UI stay active while the model schema is hidden. Call `load_intercom({})` for explicit peer checks, messaging or topics. Actionable peer inbound and recovered reply obligations enable `intercom` before model delivery; mere presence, passive breadcrumbs, routine synthetic child notices, and human-origin messages answered in chat do not. Managed-child `contact_supervisor` remains eager. If an explicit tool policy permits only `intercom` without its loader, it stays eager; excluded tools never reactivate. Selection follows native session/branch declarations and stays stable between turns.
|
|
22
|
+
|
|
23
|
+
## In One Minute
|
|
24
|
+
|
|
25
|
+
Each Pi session with the bundled intercom extension loaded connects to a tiny local broker over a local IPC transport. The broker keeps track of connected sessions and routes direct messages to the one you target by name or session ID. The extension gives you both a tool (`intercom`) and a small peer overlay (`/intercom`); Option+Shift+M (Alt+Shift+M) toggles owned agent conversations when `pi-subagents` is loaded. Messages that do not request a reply default to steer: they wake idle recipients and reach active recipients after the current tool call. Important steers release portable subagent waits without stopping the owner or child. Background calls return immediate receipts, with completion delivered later as a separate wake-up message. Foreground waits return saved results or durable questions and release for important Intercom attention without stopping existing work. Explicit queue waits behind active work, and passive delivery is a discouraged opt-in for human-visible breadcrumbs only. Quiet topic state uses native custom entries outside model context, not passive messages.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Intercom requires Pi **1.0.0** and Node **24.21.0** or later. No Pi fork is required.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pi install npm:@fitchmultz/pi-subagents
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**The unscoped npm package `pi-subagents` is not this project.** Use `@fitchmultz/pi-subagents`.
|
|
36
|
+
|
|
37
|
+
Git fallback (existing tags and branches remain installable):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pi install git:github.com/fitchmultz/pi-subagents
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
That one package includes both extension entries and both skills. For a local checkout, follow the [runtime-only install and rebuild recipe](../README.md#installation): run `npm install --omit=dev` before registering or loading it, including after development validation. Before rebuilding or updating an in-use Pi checkout or extension, checkpoint work and fully quit every Pi session using that installation. Update from a separate terminal, then restart Pi and resume the same saved parent session to retain ownership and pending coordination. `/reload` refreshes supported settings, skills, and prompts but is not a reliable code-update boundary.
|
|
44
|
+
|
|
45
|
+
To restart the shared broker too, close every Pi session using the same agent directory and wait at least five seconds before reopening Pi.
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
Follow the [local validation instructions](../README.md#local-validation). Keep retained/cleared custom-queue, rejected-input and pre-admission preparation regressions intact and report results for the exact selected host; earlier published Pi 0.87.1 failures are historical evidence, not current 1.0 certification.
|
|
50
|
+
|
|
51
|
+
`ci` runs typechecking, package and install smokes, and the full subagent/intercom test suite. The native intercom regression uses real SDK sessions, a controlled provider, and private runtime directories without credentials or model-service calls. To run just that regression:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
PI_INTERCOM_TEST_SDK=/path/to/pi/packages/coding-agent node --test test/integration/pi-intercom-native-replay.test.ts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The real-Pi smoke installs the single checkout into an isolated temporary Pi home, verifies `pi list`, and loads both bundled extension entries. Use direct `node` with the intended CLI first on `PATH`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
export PATH="$PWD/node_modules/.bin:$PATH"
|
|
61
|
+
node scripts/real-pi-smoke.mjs
|
|
62
|
+
PI_REAL_SMOKE_MODEL=openai/gpt-6-astra node scripts/real-pi-smoke.mjs --llm
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The `--llm` mode copies local `auth.json` and `models.json` into the isolated Pi agent dir. Set `PI_REAL_SMOKE_AUTH_AGENT_DIR` if your auth files are not in `~/.pi/agent`.
|
|
66
|
+
|
|
67
|
+
Pi-intercom automatically gives ordinary agents a bounded presence hint when another connected session is working in the same Git repository, including separate worktrees. The hint is a constant count-free string; agents load `load_intercom({})` if needed, then use `intercom({ action: "list" })` before changing shared state or coordinating known overlapping work. Routine standalone read-only tasks do not need a peer check. No message is sent automatically. This guidance applies on official Pi and the fork; broker presence, delivery, approvals, and child recovery are unchanged. Both the tool and `/intercom` overlay default to that repository/worktree scope. Use `intercom({ action: "list", scope: "all" })` or `/intercom all` only when intentionally discovering sessions in other projects. Managed `pi-subagents` children keep their dedicated supervisor channel instead of receiving the peer hint. Project matching is an advisory presence signal, not an authorization boundary. Add project instructions only when you want a stricter mandatory coordination policy.
|
|
68
|
+
|
|
69
|
+
A session becomes intercom-connected when all of these are true:
|
|
70
|
+
- the bundled intercom extension is enabled through `pi config`
|
|
71
|
+
- the session has been restarted after the extension was installed or updated
|
|
72
|
+
- the local broker is running or can be auto-started
|
|
73
|
+
|
|
74
|
+
The session list only shows intercom-connected sessions, not every open Pi process on the machine. Reconnecting the same Pi session reuses a stable broker identity, so transient broker or extension restarts do not create a second logical sender.
|
|
75
|
+
|
|
76
|
+
If a session is unnamed, pi-intercom now exposes a runtime-only fallback alias like `subagent-chat-1a2b3c4d` so other sessions can still target it. That alias is not persisted as the Pi session title, so `pi --resume` can keep showing the transcript snippet instead of a generic `session-...` name.
|
|
77
|
+
|
|
78
|
+
## Quick Start
|
|
79
|
+
|
|
80
|
+
### From the Keyboard
|
|
81
|
+
|
|
82
|
+
With `pi-subagents`, **Option+Shift+M** (**Alt+Shift+M**) opens your task-labelled agent conversations first; press it again to close. The shortcut is configurable below. In native fullscreen mode, clicking the **Agents** entrance again also closes the open view. See [the agent-view controls](../README.md#try-this-first) for direct human messaging, context replies, saved drafts, unread history, pinning, selected-child stop and explicit continuation. The plain `/intercom` command remains the current-project peer list. Type `/intercom all` to include sessions in other projects:
|
|
83
|
+
|
|
84
|
+
1. **Select a session** — Use arrow keys to pick a target session
|
|
85
|
+
2. **Compose message** — Write your message in the compose overlay. Pasted multiline handoffs are preserved.
|
|
86
|
+
3. **Choose mode** — Press Tab to toggle between Send and Request Reply mode. Request Reply marks the message as needing a reply and adds the recipient reply hint; the overlay itself does not wait for or collect that reply.
|
|
87
|
+
4. **Send** — Press Enter to send, Escape to cancel
|
|
88
|
+
|
|
89
|
+
### Quiet topics and resource owners
|
|
90
|
+
|
|
91
|
+
Subscribe explicitly to an exact topic; there are no automatic subscriptions or wildcard broadcasts. Topics span connected local sessions, so use a project/resource-specific name unless cross-project coordination is intended. Publications are self-contained latest state, not deltas. Each sender has one current record per topic; older queued versions cannot replace a newer record. Same-session subscriptions, publications and received records use native session entries. Late subscribers read current published state without replaying earlier interruptions.
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
intercom({ action: "subscribe", topic: "browser/shared-profile/tab-4", awaitRelease: true })
|
|
95
|
+
intercom({ action: "publish", topic: "browser/shared-profile/tab-4", resource: "tab-4", ownership: "held", message: "Reviewing the sign-in flow; keep this tab open." })
|
|
96
|
+
intercom({ action: "topics", topic: "browser/shared-profile/tab-4" })
|
|
97
|
+
intercom({ action: "publish", topic: "browser/shared-profile/tab-4", event: "release", resource: "tab-4", ownership: "released", message: "Sign-in check complete; this tab is available." })
|
|
98
|
+
intercom({ action: "unsubscribe", topic: "browser/shared-profile/tab-4" })
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Routine `event: "update"` publications replace quiet inspectable state; they do not become passive conversation messages or wake a model. Inspect current records and declared resource ownership in **`/intercom topics`** or `intercom({ action: "topics" })`; topic state does not appear in the footer. Ownership is advisory, not an exclusive lock; disconnect means **unavailable/disconnected**, never an implied release.
|
|
102
|
+
|
|
103
|
+
`event: "blocker"` and `event: "decision"` steer subscribed sessions. An explicit `event: "release"` interrupts only subscriptions with `awaitRelease: true`; other subscribers get the quiet record. Direct messages, answers and stop acknowledgements bypass topic subscriptions. Keep routine status and browser handoff prose here rather than repeatedly sending it into conversations. The native raw entries remain available as history, but old topic records are not replayed as new work.
|
|
104
|
+
|
|
105
|
+
Topics require an updated broker. If an older broker is still serving open sessions, topic actions report that they are unavailable; ordinary messaging and active work stay untouched. Let those sessions close normally. Once the old broker exits, reconnect with the updated package and retry. No broker or active session is stopped or restarted to enable topics.
|
|
106
|
+
|
|
107
|
+
### From the Agent
|
|
108
|
+
|
|
109
|
+
The agent can list sessions and send messages using the `intercom` tool. Tool calls and results render as compact transcript rows so send/ask/reply flows are easy to scan. Successful `list` results show only the session count by default in the TUI; press Ctrl+O (or the configured tool-expansion key) to show the full list. For common patterns like planner-worker delegation, the bundled `pi-intercom` skill provides copy-paste ready examples:
|
|
110
|
+
|
|
111
|
+
```typescript
|
|
112
|
+
// Enable the peer tool if it is not already available
|
|
113
|
+
load_intercom({})
|
|
114
|
+
// List connected sessions in this repository and its worktrees
|
|
115
|
+
intercom({ action: "list" })
|
|
116
|
+
// → **Current session:**
|
|
117
|
+
// → • executor (20d43841) — ~/projects/api (claude-sonnet-4) [self, idle, state:idle, accepts_asks:true, pending_asks:0, last_intercom_activity:none]
|
|
118
|
+
// → ↳ self target unavailable; choose a peer from Other sessions; use pending/reply for inbound asks
|
|
119
|
+
// → **Other sessions:**
|
|
120
|
+
// → • research (6332faab) — ~/projects/api (claude-sonnet-4) [same cwd, thinking, state:busy, accepts_asks:false, pending_asks:1, last_intercom_activity:2m ago]
|
|
121
|
+
// → ↳ send defaults to steer; ask only if sender must stay alive for a required reply (default sends without waiting when peer is busy); queue only for intentional delay; passive discouraged
|
|
122
|
+
|
|
123
|
+
// Intentionally discover sessions in other projects
|
|
124
|
+
intercom({ action: "list", scope: "all" })
|
|
125
|
+
|
|
126
|
+
// Send live guidance without blocking this long-lived session; send defaults to steer
|
|
127
|
+
intercom({ action: "send", to: "research", message: "Check if UserService.validate() handles null. Send the finding back." })
|
|
128
|
+
// → Message sent to research. This session can end its turn or continue independent work.
|
|
129
|
+
|
|
130
|
+
// Check connection status and the same live recipient guidance
|
|
131
|
+
intercom({ action: "status" })
|
|
132
|
+
// → Connected: Yes, Session ID: abc123, Active sessions: 3
|
|
133
|
+
// → Current session and other-session rows follow.
|
|
134
|
+
|
|
135
|
+
// Send with attachments (code snippets, files, or context)
|
|
136
|
+
intercom({
|
|
137
|
+
action: "send",
|
|
138
|
+
to: "worker",
|
|
139
|
+
message: "Here's the fix:",
|
|
140
|
+
attachments: [{
|
|
141
|
+
type: "snippet",
|
|
142
|
+
name: "auth.ts",
|
|
143
|
+
language: "typescript",
|
|
144
|
+
content: "function validate(user: User) { ... }"
|
|
145
|
+
}]
|
|
146
|
+
})
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Receiving Messages
|
|
150
|
+
|
|
151
|
+
With native [compact view](../README.md#compact-view) enabled, ordinary incoming messages use one content row plus Pi's blank line. In native fullscreen mode, click a collapsed row to reveal its full message and attachments; click it again to collapse. Ctrl+O (or the configured tool-expansion key) still expands all messages. Questions, reply guidance, and needs-attention notices stay prominent. The mode defaults off and does not change delivery or model-visible content.
|
|
152
|
+
|
|
153
|
+
When a message arrives, it appears inline in your chat with the sender's info. The cwd label is the sender's **Native session cwd**, not proof of a command's physical directory. Messages sent with `ask` include a reply hint:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
**From research** (Native session cwd: ~/projects/api)
|
|
157
|
+
|
|
158
|
+
To reply, use the intercom tool: intercom({ action: "reply", message: "..." })
|
|
159
|
+
|
|
160
|
+
Found the issue — UserService.validate() doesn't check for null input.
|
|
161
|
+
See auth.ts:142-156.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The reply hint (enabled by default) points to `intercom({ action: "reply", ... })`, so recipients do not need raw sender or `replyTo` IDs. `send` and `reply` default to steer: they wake an idle recipient or reach a busy recipient at the next tool boundary.
|
|
165
|
+
|
|
166
|
+
If Esc clears a steered or follow-up message before native handoff, it is re-delivered after the actual agent run settles. Messages already in Pi's session history are not reinserted, even after compaction or reload; messages still in Pi's native queues remain there for its next continuation or prompt. Pi 1.0's turn-boundary pending messages expose the next queued batch, not the whole custom queue; its coarse `hasPendingMessages()` reports only UI text queues. An empty boundary proves all queues cleared, while a nonempty boundary retains admitted messages until their actual history receipts arrive. Selectively removing individual custom items while other queue items remain is not observable through these public APIs: such items remain pending rather than risk a duplicate. Full queue clearing, retained-queue abort, reload and fresh-process recovery are supported. A rejected overlapping prompt does not start receiver retries while the original run is active.
|
|
167
|
+
|
|
168
|
+
Official Pi 1.0 runs user preparation hooks before marking a prompt busy. During that pre-admission window, an incoming custom message can legitimately start a separate model request; custom-triggered runs do not run `before_agent_start`. Both inputs and their receipts are preserved, but one combined request is not guaranteed. Intercom does not reserve rejected input or emulate a core admission hook. Reload also does not cancel active work: abort explicitly when cancellation is intended.
|
|
169
|
+
|
|
170
|
+
An omitted `ask` still honors recipient availability; use explicit steer only when the sender must remain alive for a busy recipient's reply. The recipient should incorporate relevant context and continue its active task unless the message explicitly replaces it. Use `delivery:"queue"` only when delay is intentional; `queueMode:"replace"` keeps only the latest undelivered thread update.
|
|
171
|
+
|
|
172
|
+
Old queued subagent progress is discarded from pending delivery when its exact generated thread and sender match a proven finished child. Its original checkpoint stays in saved history, but it does not trigger another turn or late notification. Actual final results remain available as completed work. The association survives reload; detached siblings, live successors, unmatched peers, questions, answers, and unrelated explicit queues are unchanged.
|
|
173
|
+
|
|
174
|
+
Pending delivery is checkpointed in the saved Pi session before native handoff. Reloading, or resuming that same saved session in a fresh process, restores undelivered messages, including lost native queues, and the latest unsuperseded milestones once; a fork or new session does not adopt them. Resuming again does not replay consumed messages, and passive-only recovery does not start a model turn. Accepted pending messages have no fixed-count backlog cap or age-based expiry. Ordinary peer asks still use the configured reply timeout. Attachment content is included in the agent-visible body and stored in Pi session history. Only passive `send` renders without waking the recipient model.
|
|
175
|
+
|
|
176
|
+
## Workflow: Planner-Worker Coordination
|
|
177
|
+
|
|
178
|
+
The most natural use of pi-intercom is splitting a task between two sessions — one holds the big picture, the other does the hands-on work. When the worker hits an ambiguity, it steers the planner without losing context or blocking its long-lived session.
|
|
179
|
+
|
|
180
|
+
### Setup
|
|
181
|
+
|
|
182
|
+
Open two terminals and start pi in each. Name them so they can find each other:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
# Terminal 1 # Terminal 2
|
|
186
|
+
/name planner /name worker
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Verify they see each other from either session:
|
|
190
|
+
|
|
191
|
+
```typescript
|
|
192
|
+
intercom({ action: "list" })
|
|
193
|
+
// → • worker — ~/projects/api (claude-sonnet-4) [idle]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### The Conversation
|
|
197
|
+
|
|
198
|
+
Long-lived Pi sessions normally coordinate without blocking each other. The sender uses `send`, which steers by default, and ends its turn or continues independent work. The recipient sees the message at its next tool boundary, incorporates relevant context, continues the active task, and sends any answer back with steer. A steer supplements the task unless it explicitly says to replace it.
|
|
199
|
+
|
|
200
|
+
**Planner delegates work:**
|
|
201
|
+
```typescript
|
|
202
|
+
intercom({
|
|
203
|
+
action: "send",
|
|
204
|
+
to: "worker",
|
|
205
|
+
delivery: "steer",
|
|
206
|
+
message: "Task-3: Add retry logic to API client. Key files: src/api/client.ts, src/api/types.ts."
|
|
207
|
+
})
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Worker steers a live discovery without holding its process open:**
|
|
211
|
+
```typescript
|
|
212
|
+
intercom({
|
|
213
|
+
action: "send",
|
|
214
|
+
to: "planner",
|
|
215
|
+
delivery: "steer",
|
|
216
|
+
message: "Blocked: should retry apply only to idempotent endpoints? Send the decision back with steer."
|
|
217
|
+
})
|
|
218
|
+
// Worker ends its turn instead of polling or waiting.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Planner answers while preserving the worker's active task:**
|
|
222
|
+
```typescript
|
|
223
|
+
intercom({
|
|
224
|
+
action: "send",
|
|
225
|
+
to: "worker",
|
|
226
|
+
delivery: "steer",
|
|
227
|
+
message: "Apply retries only to GET/PUT/DELETE. Max 3, exponential backoff from 100ms. Continue the current task."
|
|
228
|
+
})
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Worker reports completion:**
|
|
232
|
+
```typescript
|
|
233
|
+
intercom({
|
|
234
|
+
action: "send",
|
|
235
|
+
to: "planner",
|
|
236
|
+
delivery: "steer",
|
|
237
|
+
message: "Task-3 done. Added RetryPolicy, applied it to GET/PUT/DELETE, surfaced NetworkError, and passed 4 tests."
|
|
238
|
+
})
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Communication Patterns
|
|
242
|
+
|
|
243
|
+
| Pattern | Action | Why |
|
|
244
|
+
|---------|--------|-----|
|
|
245
|
+
| **Task Delegation** | `send` + steer | Wakes an idle worker or reaches a busy worker at the next tool boundary without blocking the planner. |
|
|
246
|
+
| **Guidance / Answer** | `send` + steer | Makes relevant context available during active work. |
|
|
247
|
+
| **Clarification / Blocker** | `send` + steer | Long-lived peers can end their turn and wake when the answer arrives. |
|
|
248
|
+
| **Intentional Deferral** | `send` + queue | The recipient should not incorporate the note until after active work. |
|
|
249
|
+
| **Ephemeral Blocking Wait** | `ask` + steer | Keeps a short-lived process alive only when it cannot safely continue without the reply. |
|
|
250
|
+
|
|
251
|
+
### Blocking Ask Exception
|
|
252
|
+
|
|
253
|
+
Use `ask` only when the sender process must remain alive and cannot safely continue without the answer, such as an ephemeral dispatched subagent. Pass `delivery:"steer"` so the question reaches a busy recipient at its next tool boundary. The recipient answers with `intercom({ action: "reply", message: "..." })`; `pending` recovers unresolved asks when needed.
|
|
254
|
+
|
|
255
|
+
### `send` vs `ask`
|
|
256
|
+
|
|
257
|
+
`send` is the default for agent-to-agent coordination and uses steer when `delivery` is omitted. It wakes idle recipients or reaches busy recipients at the next tool boundary, then returns after broker acceptance. Use explicit queue only when delay is intentional, and passive only for human-visible breadcrumbs. If you want approval before non-reply sends, set `confirmSend: true`.
|
|
258
|
+
|
|
259
|
+
`ask` sends and waits up to `askTimeoutMs` (default 2 minutes). Reserve `ask` plus steer for a sender process that must remain alive and cannot safely continue without the answer. Long-lived peers should use `send` plus steer and end their turn instead. A default ask to a peer publishing `accepts_asks:false` returns promptly with `reason:"peer_busy"`; an explicit steer ask keeps waiting.
|
|
260
|
+
|
|
261
|
+
`reply` answers an inbound ask using its exact sender and message automatically. Otherwise, answer ordinary coordination with `send` plus steer. If multiple asks are pending, use `pending` and disambiguate with `to`.
|
|
262
|
+
|
|
263
|
+
Inbound steers are supplemental coordination inside the active task. Incorporate relevant context and continue; replace the task only when the message explicitly instructs replacement.
|
|
264
|
+
|
|
265
|
+
## Workflow: Subagent-to-Supervisor Escalation
|
|
266
|
+
|
|
267
|
+
When this package spawns a Pi-backed delegated child, it supplies bridge metadata that gives the child a subagent-only `contact_supervisor` tool in addition to the regular `intercom` tool. Normal sessions never see `contact_supervisor`; non-Pi child backends such as Claude Code do not load this tool.
|
|
268
|
+
|
|
269
|
+
### When the Tool Appears
|
|
270
|
+
|
|
271
|
+
`contact_supervisor` only registers when `pi-subagents` sets all of these environment variables:
|
|
272
|
+
|
|
273
|
+
- `PI_SUBAGENT_ORCHESTRATOR_TARGET` — the supervisor session name or ID
|
|
274
|
+
- `PI_SUBAGENT_RUN_ID` — the run identifier
|
|
275
|
+
- `PI_SUBAGENT_CHILD_AGENT` — the agent type
|
|
276
|
+
- `PI_SUBAGENT_CHILD_INDEX` — the child index within the run
|
|
277
|
+
|
|
278
|
+
If any are missing, the session falls back to the regular `intercom` tool. A subagent status line may mention an intercom target before the child is actually registered with pi-intercom; treat `intercom({ action: "list" })` as the source of truth. If the advertised target is absent from `list`, use normal subagent controls (`status`, `resume`, `nudge`, result artifacts) instead of sending to that target; the child may be Claude Code-backed or already exited and have no child-side `contact_supervisor`.
|
|
279
|
+
|
|
280
|
+
When both bundled extension entries are enabled, parent sessions can use `agent_runs({ action: "nudge", id: "<run-id>", message: "..." })` to send a non-blocking steered nudge to a live child. If the run has already finished, nudge returns its terminal outcome and evidence without restarting it. `agent_runs({ action: "list" })` includes this parent's active and completed durable runs across working directories, plus recoverable legacy foreground and background records. `agent_runs` inspection may also show the direct blocking `intercom({ action: "ask", to: "...", delivery: "steer", message: "..." })` path; use that exception only when the parent process must remain alive and cannot safely continue without the reply. `pi-intercom` remains the source of truth for connected sessions and only delivers to registered local peers.
|
|
281
|
+
|
|
282
|
+
### Three Reasons
|
|
283
|
+
|
|
284
|
+
| Reason | Behavior | Use When |
|
|
285
|
+
|--------|----------|----------|
|
|
286
|
+
| `need_decision` | Persists the question, steers the supervisor, and waits without the ordinary ask timeout | The ephemeral child cannot safely continue without one decision, approval, or product/API/scope clarification |
|
|
287
|
+
| `interview_request` | Persists structured questions and waits without the ordinary ask timeout | The ephemeral child cannot safely continue until it receives multiple structured answers |
|
|
288
|
+
| `progress_update` | Non-blocking steer at the next tool boundary | A discovery or change the supervisor needs while working |
|
|
289
|
+
|
|
290
|
+
Do not use `contact_supervisor` for routine completion handoffs. Return the final subagent result normally through `pi-subagents`.
|
|
291
|
+
|
|
292
|
+
Intercom provides live coordination and portable background completion notices. Every new subagent run has one detached owner, regardless of whether the parent waits or receives a background receipt. Waiting tools receive their saved result directly; the watcher suppresses an extra Intercom completion notice. See [host capabilities and result delivery](../README.md#host-capabilities-and-result-delivery).
|
|
293
|
+
|
|
294
|
+
Durable output lives in `pi-subagents` result details and artifact/output paths (`savedOutputPath`, `artifactPaths`, or explicit workspace `output` files). Completion notices include existing saved result and metadata paths, including acceptance details when configured. Use those files as the source of truth for long reports. Broker acceptance, notification delivery, parent review, and runtime acceptance are separate facts.
|
|
295
|
+
|
|
296
|
+
### Recovering a supervisor question
|
|
297
|
+
|
|
298
|
+
`need_decision` and `interview_request` save the question before notification. Supervisor or broker disconnection does not end the wait. Resume the same saved supervisor session and use:
|
|
299
|
+
|
|
300
|
+
```typescript
|
|
301
|
+
agent_runs({ action: "questions" })
|
|
302
|
+
agent_runs({ action: "answer", id: "<run-id>", questionId: "<question-id>", message: "Use the stable API." })
|
|
303
|
+
agent_runs({ action: "stop", id: "<run-id>" })
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
The full `subagent` tool also accepts `questions` and `answer`; its stop action is `interrupt`. Questions expose `awaiting_input`, `answer_pending`, `answered`, or `cancelled` independently of run completion. Ownership follows the saved supervisor session, not its cwd or display name. The live intercom reply path saves the same answer. Saving an answer or cancelling through run controls also clears the matching live intercom pending ask; a nudge does not resolve a question.
|
|
307
|
+
|
|
308
|
+
Question lists page 20 summaries by default, unresolved first. Use `limit: 1–100`, then pass `details.questionList.nextOffset` as `offset`; `id`, `index` and `questionId` narrow the lookup. Summaries retain identity, state, delivery and revival evidence without copying the saved launch or attempt baseline. Previews stop at 2,048 characters. Read `questionPath` for the complete question/interview/contract and `answerPath` for the exact saved answer; never retry an answer using a truncated preview. Browsing does not modify these durable files.
|
|
309
|
+
|
|
310
|
+
Needs-attention notices for a matching unresolved question say **Waiting for supervisor input** and include the question ID and answer call. `answer_pending` still means delivery is unconfirmed, not that the child resumed. A live waiter consumes the durable answer. If it exited, answering revives its saved Pi session with the original acceptance contract and a new run ID. Identical repeated answers do not launch duplicate work; conflicting answers leave the original intact. `stop` cancels the question and aborts any live waiter. An interrupted pre-launch revival can be recovered with the exact `continue` call shown in the answer receipt; ambiguous launch evidence is not silently retried.
|
|
311
|
+
|
|
312
|
+
Questions, saved launch contracts, and canonical version-2 run status/results live under `${PI_CODING_AGENT_DIR:-~/.pi/agent}/sessions/subagent-runs`, separate from disposable temporary files. Pending records are not age-cleaned. Active legacy owners keep their original runtime and files until they finish; recovery preserves available evidence for the same saved owner without replaying work or deleting history. Ordinary peer asks still use `askTimeoutMs` and are not durable supervisor questions.
|
|
313
|
+
|
|
314
|
+
### Example: Blocked Subagent Asks for Guidance
|
|
315
|
+
|
|
316
|
+
```typescript
|
|
317
|
+
contact_supervisor({
|
|
318
|
+
reason: "need_decision",
|
|
319
|
+
message: "The auth service returns 403 instead of 401 for expired tokens. Should I treat 403 as a re-auth trigger or a hard failure?"
|
|
320
|
+
})
|
|
321
|
+
// → Reply from supervisor: Treat 403 as re-auth trigger. Update the token refresh logic.
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Example: Structured Supervisor Interview
|
|
325
|
+
|
|
326
|
+
```typescript
|
|
327
|
+
contact_supervisor({
|
|
328
|
+
reason: "interview_request",
|
|
329
|
+
message: "Please answer these before I continue the migration.",
|
|
330
|
+
interview: {
|
|
331
|
+
title: "API migration choices",
|
|
332
|
+
questions: [
|
|
333
|
+
{ id: "api", type: "single", question: "Which API should I target?", options: ["Stable API", "Experimental API"] },
|
|
334
|
+
{ id: "constraints", type: "text", question: "What constraints should I preserve?" }
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
})
|
|
338
|
+
// → Reply from supervisor: { "responses": [{ "id": "api", "value": "Stable API" }, ...] }
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### Example: Progress Update
|
|
342
|
+
|
|
343
|
+
```typescript
|
|
344
|
+
contact_supervisor({
|
|
345
|
+
reason: "progress_update",
|
|
346
|
+
message: "Discovered the bug is in the retry wrapper, not the API client. Fixing the wrapper will also close issue #42."
|
|
347
|
+
})
|
|
348
|
+
// → Progress update accepted for supervisor planner. Queued for the next tool boundary; broker acceptance does not confirm the supervisor has read or acted on it.
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### What the Supervisor Sees
|
|
352
|
+
|
|
353
|
+
The supervisor receives a formatted message with run metadata:
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
**From subagent-worker-78f659a3-1**
|
|
357
|
+
|
|
358
|
+
Subagent needs a supervisor decision.
|
|
359
|
+
Run: 78f659a3
|
|
360
|
+
Agent: worker
|
|
361
|
+
Child index: 0
|
|
362
|
+
|
|
363
|
+
Which API should I use?
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Reply hints work the same as regular `intercom` ask/reply flows. The supervisor can reply with `intercom({ action: "reply", message: "..." })` and the subagent receives the answer as the tool result. If the parent agent is busy and later needs to recover the request, `intercom({ action: "pending" })` summarizes supervisor asks with run id, agent, child target, and question text.
|
|
367
|
+
|
|
368
|
+
For `interview_request`, the supervisor message includes the structured questions plus a fenced JSON answer example using this stable shape:
|
|
369
|
+
|
|
370
|
+
```json
|
|
371
|
+
{
|
|
372
|
+
"responses": [
|
|
373
|
+
{ "id": "api", "value": "Stable API" },
|
|
374
|
+
{ "id": "constraints", "value": "Keep the public error shape unchanged." }
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
The supervisor can reply with plain JSON or a fenced `json` block. If the reply matches the `{ "responses": [...] }` shape and references valid question ids/options, the child tool result includes it in `details.structuredReply` while still showing the raw reply text.
|
|
380
|
+
|
|
381
|
+
## Tool Reference
|
|
382
|
+
|
|
383
|
+
### load_intercom
|
|
384
|
+
|
|
385
|
+
`load_intercom({})` enables the full peer schema without sending messages or checking sessions. Then use `intercom` for all existing actions. Ordinary peer asks restored after reload retain their configured expiry. Saved replies, peer disconnects, recipient-error feedback, and durable supervisor answers retire the reply obligation without replaying consumed messages.
|
|
386
|
+
|
|
387
|
+
### intercom
|
|
388
|
+
|
|
389
|
+
| Parameter | Type | Description |
|
|
390
|
+
|-----------|------|-------------|
|
|
391
|
+
| `action` | string | `"list"`, `"send"`, `"ask"`, `"reply"`, `"pending"`, or `"status"` |
|
|
392
|
+
| `scope` | string | Optional for list/status: `"project"` (default) shows this Git repository and its worktrees; `"all"` includes sessions in other projects. |
|
|
393
|
+
| `to` | string | Target session name or ID (for send/ask, or to disambiguate reply) |
|
|
394
|
+
| `message` | string | Message text (for send/ask/reply) |
|
|
395
|
+
| `attachments` | array | Optional `file`, `snippet`, or `context` attachments |
|
|
396
|
+
| `replyTo` | string | Optional message ID for threading or replying to an `ask` |
|
|
397
|
+
| `delivery` | string | Optional: omitted `send` defaults to `"steer"`, which injects after the current tool call; `"queue"` intentionally waits behind active work, and `"passive"` does not wake the recipient model (`send` only). |
|
|
398
|
+
| `queueMode` | string | Optional with queued delivery: `"stack"` keeps all messages, `"replace"` keeps only the latest undelivered message for the same `threadId` after a short coalescing window. |
|
|
399
|
+
| `threadId` | string | Required for `queueMode:"replace"`; stable topic key for replacement. |
|
|
400
|
+
| `passive` | boolean | Legacy `send`-only alias for `delivery:"passive"`. Discouraged for agent-to-agent messages. |
|
|
401
|
+
|
|
402
|
+
### contact_supervisor
|
|
403
|
+
|
|
404
|
+
Only registered in sessions where `pi-subagents` supplied the required child bridge metadata. Contacts the supervisor session that delegated the current task.
|
|
405
|
+
|
|
406
|
+
| Parameter | Type | Description |
|
|
407
|
+
|-----------|------|-------------|
|
|
408
|
+
| `reason` | string | `"need_decision"` (blocking), `"interview_request"` (blocking structured questions), or `"progress_update"` (non-blocking) |
|
|
409
|
+
| `message` | string | The decision request, optional interview note, or progress update |
|
|
410
|
+
| `interview` | object | Required for `interview_request`: `{ title?, description?, questions: [...] }` |
|
|
411
|
+
|
|
412
|
+
**`need_decision`** — Use only when the ephemeral child cannot safely continue without one decision, approval, or product/API/scope clarification. It sends a formatted steered ask to the supervisor and keeps the child alive until the reply arrives, without the ordinary intercom ask timeout. The reply comes back as the tool result. Includes run metadata in the message so the supervisor knows which subagent is asking.
|
|
413
|
+
|
|
414
|
+
**`interview_request`** — Use only when the ephemeral child cannot safely continue until it receives multiple structured answers. It sends a formatted, steered agent-readable interview to the supervisor and keeps the child alive until the reply arrives. Questions use a local pi-interview-like shape: `{ id, type, question, options?, context? }` where `type` is `single`, `multi`, `text`, `image`, or `info`. `info` questions are context-only and do not need responses. The supervisor reply should be JSON with `{ "responses": [{ "id": "...", "value": ... }] }`. Parsed JSON replies are returned in `details.structuredReply`.
|
|
415
|
+
|
|
416
|
+
**`progress_update`** — Steers a material discovery at the next native tool boundary without waiting for a reply. The receipt confirms broker acceptance, not model consumption or action. Send only what the supervisor needs while working; skip starts, redundant status, and routine completion. Keep material findings in the final result.
|
|
417
|
+
|
|
418
|
+
### intercom actions
|
|
419
|
+
|
|
420
|
+
**`list`** — Returns the current session plus other intercom-connected sessions in the current Git repository and its worktrees by default. Pass `scope:"all"` to intentionally include sessions in other projects. Hidden sessions remain connected and directly targetable by an exact known target. Rows include name, safe target, working directory, model, live status, and peer health tags: `state` (`idle`, `busy`, or `unknown`), `accepts_asks`, `pending_asks`, `last_intercom_activity`, and `last_seen`. Peer rows include live delivery guidance for `ask`, `send`, `queue`, `steer`, and the discouraged passive path; the self row says self-target delivery is unavailable and points to peer targets / `pending` / `reply`. Status is derived automatically from Pi lifecycle events: `idle`, `thinking`, or `tool:<name>`. If multiple sessions have the same name, use the displayed target exactly as shown, for example `to: "ca7bfec2"`. The target may be longer than eight characters when needed to avoid collisions.
|
|
421
|
+
|
|
422
|
+
**`send`** — Sends a non-blocking, default-steered message to the specified session and returns broker acceptance, not a later response. It wakes idle recipients or reaches busy recipients at the next tool boundary. Use `delivery:"queue"` only when delay is intentional, and `delivery:"passive"`/`passive:true` only for human-visible breadcrumbs. `queueMode:"replace"` with a `threadId` replaces older undelivered intercom-staged messages for that thread after a short coalescing window; once a message is handed to Pi's native queue it cannot be keyed-replaced. Set `confirmSend: true` in config if you want a confirmation dialog for non-reply sends. Replies that include `replyTo` skip confirmation.
|
|
423
|
+
|
|
424
|
+
**`ask`** — Sends a message and waits for the recipient to reply (`askTimeoutMs`, default 2 minutes). Reserve it for a sender process that must remain alive and cannot safely continue without the answer; use `delivery:"steer"` so a busy recipient sees it at the next tool boundary. If the target publishes `accepts_asks:false`, a default blocking ask returns promptly with `reason:"peer_busy"`, while an explicit steer ask still waits. Only one pending waiting ask is allowed per session. Passive delivery is rejected.
|
|
425
|
+
|
|
426
|
+
**`reply`** — Replies to the current intercom-triggered message if there is one. Otherwise it falls back to the single unresolved inbound ask. If multiple asks are pending, pass `to` or inspect them with `pending` first. Under the hood this is still a normal `send` with the exact `replyTo` value.
|
|
427
|
+
|
|
428
|
+
**`pending`** — Lists unresolved inbound asks with sender, elapsed time, a labeled `replyTo` ID, and a copy-ready `intercom({ action: "reply", ... })` call. For `pi-subagents` supervisor asks, the preview expands the run id, agent, child intercom target, and question so the parent can reply without guessing. Useful when replying after the original triggered turn.
|
|
429
|
+
|
|
430
|
+
**`status`** — Shows connection status, session ID, and the same project-scoped recipient capability rows as `list`. Also shows inbound messages still queued for delivery or handed to Pi but not yet consumed. Pass `scope:"all"` to include other projects.
|
|
431
|
+
|
|
432
|
+
## Keyboard Shortcuts
|
|
433
|
+
|
|
434
|
+
| Key | Action |
|
|
435
|
+
|-----|--------|
|
|
436
|
+
| Option+Shift+M (Alt+Shift+M), configurable | Toggle owned agent conversations; open peer messaging when the agent view is unavailable |
|
|
437
|
+
| ↑/↓ | Navigate session list |
|
|
438
|
+
| Tab | Toggle Send / Request Reply mode in the compose overlay |
|
|
439
|
+
| Enter | Select session / Send or ask |
|
|
440
|
+
| Escape | Cancel / Close overlay |
|
|
441
|
+
|
|
442
|
+
## Config
|
|
443
|
+
|
|
444
|
+
Create `${PI_CODING_AGENT_DIR:-~/.pi/agent}/intercom/config.json`:
|
|
445
|
+
|
|
446
|
+
```json
|
|
447
|
+
{
|
|
448
|
+
"shortcut": "alt+shift+m",
|
|
449
|
+
"confirmSend": false,
|
|
450
|
+
"replyHint": true,
|
|
451
|
+
"askTimeoutMs": 120000,
|
|
452
|
+
"sendTimeoutMs": 8000,
|
|
453
|
+
"listTimeoutMs": 5000,
|
|
454
|
+
"status": "researching"
|
|
455
|
+
}
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
| Setting | Default | Description |
|
|
459
|
+
|---------|---------|-------------|
|
|
460
|
+
| `shortcut` | `"alt+shift+m"` | Native Pi key identifier for the Agents/Intercom shortcut, for example `"ctrl+shift+k"`. The Agents entrance hint uses the same setting. |
|
|
461
|
+
| `brokerCommand` | current Node executable | Command used to start the local broker process when you override the default |
|
|
462
|
+
| `brokerArgs` | `[]` | Arguments passed to `brokerCommand` before the broker script path. The built-in default runs the bundled TypeScript broker directly with Node. |
|
|
463
|
+
| `confirmSend` | false | Show a confirmation dialog before non-reply sends from an interactive session with UI |
|
|
464
|
+
| `replyHint` | true | Include reply instructions in incoming asks |
|
|
465
|
+
| `askTimeoutMs` | `120000` | Reply wait timeout for ordinary peer `ask`; durable supervisor questions do not expire |
|
|
466
|
+
| `sendTimeoutMs` | `8000` | Broker delivery-ack timeout for sends/asks |
|
|
467
|
+
| `listTimeoutMs` | `5000` | Session-list response timeout |
|
|
468
|
+
| `status` | — | Optional custom status suffix shown after the automatic lifecycle status, for example `thinking · researching` |
|
|
469
|
+
|
|
470
|
+
The default shortcut requires a terminal that reports combined modifiers through Kitty keyboard protocol or xterm modifyOtherKeys. Pi negotiates these automatically on supported terminals. `/agents` is also available. Restart Pi after changing the shortcut.
|
|
471
|
+
|
|
472
|
+
Use `pi config` to enable or disable the bundled intercom extension. The former `config.json` `enabled` key is no longer read; in particular, an existing `"enabled": false` does not disable intercom after this migration.
|
|
473
|
+
|
|
474
|
+
For example, if you have Bun installed and want it to start the broker directly, use:
|
|
475
|
+
|
|
476
|
+
```json
|
|
477
|
+
{
|
|
478
|
+
"brokerCommand": "bun",
|
|
479
|
+
"brokerArgs": []
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Pi-intercom publishes live session status automatically. Sessions register as `idle`, switch to `thinking` while the agent is running, show `tool:<name>` during tool execution, and return to `idle` on agent completion. If `status` is set in config, it is appended as context instead of replacing the lifecycle status.
|
|
484
|
+
|
|
485
|
+
## How It Works
|
|
486
|
+
|
|
487
|
+
```mermaid
|
|
488
|
+
graph TB
|
|
489
|
+
subgraph A["Pi Session A"]
|
|
490
|
+
A1[Intercom Client]
|
|
491
|
+
A2[intercom tool]
|
|
492
|
+
A3[UI overlays]
|
|
493
|
+
end
|
|
494
|
+
|
|
495
|
+
subgraph Broker["Intercom Broker"]
|
|
496
|
+
B1[Session Registry]
|
|
497
|
+
B2[Message Router]
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
subgraph B["Pi Session B"]
|
|
501
|
+
B3[Intercom Client]
|
|
502
|
+
B4[intercom tool]
|
|
503
|
+
B5[UI overlays]
|
|
504
|
+
end
|
|
505
|
+
|
|
506
|
+
A1 <-->|Unix Socket| B1
|
|
507
|
+
B1 --- B2
|
|
508
|
+
B2 <-->|Unix Socket| B3
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
The broker is a standalone TypeScript process that manages session registration and message routing. It auto-spawns when the first intercom session needs it and exits after 5 seconds when the last connected session disconnects. Clients now reconnect automatically if the broker disappears and later comes back.
|
|
512
|
+
|
|
513
|
+
Messages use length-prefixed JSON over a local Unix socket transport (4-byte length + JSON payload) to handle fragmentation properly. The protocol includes request correlation for session listing, explicit delivery failures, and validation for malformed or out-of-order messages. Session registration carries user-facing identity plus live health fields; process ID, start time, and the redundant activity timestamp are no longer part of the protocol.
|
|
514
|
+
|
|
515
|
+
Startup restoration and inbound batches join during shutdown while their old native owner remains valid. Work that outlives a replaced owner (reconnects, overlays, and relays) no-ops rather than using stale APIs. Completion handoffs retain accepted acknowledgements before listeners stop; failed shutdown deliveries remain eligible on reopen without requesting a new turn after ingress closes. Undelivered receiver messages remain in native session metadata, bound to the exact saved session UUID. Native message entries are the delivery receipt, including messages that have left the active context after compaction. Each body is checkpointed once; later handoff metadata stores only the message ID and state.
|
|
516
|
+
|
|
517
|
+
Runtime files:
|
|
518
|
+
- Unix domain socket — private short temp path `pi-intercom-<hash>/broker.sock` on macOS/Linux, keyed by user ID and `PI_CODING_AGENT_DIR` or `~/.pi/agent`
|
|
519
|
+
- `${PI_CODING_AGENT_DIR:-~/.pi/agent}/intercom/broker.pid` — Broker process ID on the first line (backward-readable). On Linux, new brokers add native boot ID, PID namespace, reader time namespace and process start ticks on a second `linux-v1` line.
|
|
520
|
+
- `${PI_CODING_AGENT_DIR:-~/.pi/agent}/intercom/config.json` — User configuration
|
|
521
|
+
|
|
522
|
+
## Design Decisions
|
|
523
|
+
|
|
524
|
+
**Local IPC instead of TCP.** Same-machine only by design. `pi-intercom` uses Unix sockets on macOS/Linux, which keeps setup simple and avoids port management.
|
|
525
|
+
|
|
526
|
+
**Auto-spawn with file lock.** The broker starts on first connection and exits after 5 seconds idle. There is no daemon to manage. A spawn lock file, keyed by PID and timestamp, prevents duplicate brokers when multiple sessions start at once.
|
|
527
|
+
|
|
528
|
+
**PID reuse after restore.** A live numeric PID alone does not identify a broker: a cold restore can reuse that number for an unrelated process or thread. Linux startup ignores a saved PID only when readable native metadata disproves its identity. Different boot/PID namespace or comparable start ticks identify a stale record; start ticks are compared only in the same reader time namespace. Legacy numeric-only records remain ambiguous and blocking, except a proven non-leader thread (`Tgid != Pid`) cannot be the process ID a broker wrote. Unreadable/unsupported metadata, foreign procfs PID views and signal-0 permission errors retain the conservative refusal. macOS needs no procfs and retains numeric-PID behavior. No process is killed and no PID file is deleted to recover; normal broker startup writes its new record. A connected broker and its accepted queues are unchanged. The fields follow Linux [`proc_pid_status(5)`](https://man7.org/linux/man-pages/man5/proc_pid_status.5.html), [`proc_pid_stat(5)`](https://man7.org/linux/man-pages/man5/proc_pid_stat.5.html) and [`namespaces(7)`](https://man7.org/linux/man-pages/man7/namespaces.7.html); they are identity evidence, not process-control authority.
|
|
529
|
+
|
|
530
|
+
**`ask` stays client-side.** The broker still routes plain messages; it does not have a special request/response mode for `ask`. The sender marks the message as expecting a reply, the recipient wakes or queues according to the delivery mode, and the sender waits for the matching reply before returning it as the tool result. Reply hints make that flow practical by showing the recipient the exact `reply` call to use. Separately, `list` / `sessions` now carry a `requestId` so a delayed session-list reply cannot be mistaken for a newer one.
|
|
531
|
+
|
|
532
|
+
## pi-intercom vs pi-messenger
|
|
533
|
+
|
|
534
|
+
| Aspect | pi-intercom | pi-messenger |
|
|
535
|
+
|--------|-------------|--------------|
|
|
536
|
+
| **Model** | Direct 1:1 messaging | Shared chat room |
|
|
537
|
+
| **Primary use** | User orchestrating sessions | Autonomous agent coordination |
|
|
538
|
+
| **Discovery** | Broker-based (real-time) | File-based registry |
|
|
539
|
+
| **Messages** | Private, session-to-session | Broadcast to all agents |
|
|
540
|
+
| **Persistence** | In Pi session history | Shared coordination files |
|
|
541
|
+
|
|
542
|
+
Use pi-messenger for multi-agent swarms working on a shared task. Use pi-intercom when you want to manually coordinate your own sessions or have one agent reach out to another specific session.
|
|
543
|
+
|
|
544
|
+
## File Structure
|
|
545
|
+
|
|
546
|
+
```
|
|
547
|
+
pi-subagents/
|
|
548
|
+
├── package.json # One manifest for both extensions
|
|
549
|
+
├── src/pi-intercom/
|
|
550
|
+
│ ├── index.ts # Intercom extension entry point
|
|
551
|
+
│ ├── types.ts # SessionInfo, Message, protocol types
|
|
552
|
+
│ ├── config.ts # Config loading
|
|
553
|
+
│ ├── broker/
|
|
554
|
+
│ │ ├── broker.ts # Broker process
|
|
555
|
+
│ │ ├── client.ts # IntercomClient class
|
|
556
|
+
│ │ ├── framing.ts # Length-prefixed JSON protocol
|
|
557
|
+
│ │ ├── paths.ts # Platform-specific Unix socket paths
|
|
558
|
+
│ │ └── spawn.ts # Auto-spawn logic with lock file
|
|
559
|
+
│ └── ui/
|
|
560
|
+
│ ├── session-list.ts # Session selection overlay
|
|
561
|
+
│ ├── compose.ts # Message composition overlay
|
|
562
|
+
│ └── inline-message.ts # Received message display
|
|
563
|
+
└── skills/pi-intercom/
|
|
564
|
+
└── SKILL.md # Bundled skill for common patterns
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
## Lifecycle and saved work
|
|
568
|
+
|
|
569
|
+
Pi 1.0 uses ordinary shutdown/reload boundaries, not the old fork's idle-checkpoint or broker-admission-hold API. A settled parent does not prove its detached children are finished. Preserve their saved sessions, run records and questions, and keep a legacy runtime available until its active owners finish. Do not disconnect a recipient or stop a broker to manufacture completion: accepted replace-mode messages can still exist only in broker memory.
|
|
570
|
+
|
|
571
|
+
Assistant-error replies wait for broker acknowledgement during `message_end`, bounded by `sendTimeoutMs`. Async inbound/reconnect/relay callbacks remain tied to their owning session generation; late callbacks cannot append into a replacement session. Durable inbox stages and actual parent message publication drive recovery.
|
|
572
|
+
|
|
573
|
+
## Limitations
|
|
574
|
+
|
|
575
|
+
Historical official Pi 0.87.1 checks exposed queue visibility and prompt-preparation races. Current tests preserve exact-once receipts and input rejection/recovery on the selected host, including the genuine Pi 1.0 pre-admission window described above; they do not promise one combined provider turn. Historical results are not a current 1.0 pass. Use an explicit `async: false` wait when dependent work needs a finalized result. Native pending-call, idle-checkpoint and immediate-usage APIs are no longer supported. See [result delivery](../README.md#host-capabilities-and-result-delivery) and [local qualification](../README.md#local-validation).
|
|
576
|
+
|
|
577
|
+
- **Same machine only** — The core broker uses local Unix sockets, no network support. The optional [secure remote bridge](intercom-bridge.md) authenticates remote messaging through a separate loopback mTLS proxy; it does not expose the broker socket.
|
|
578
|
+
- **No dedicated intercom log** — Messages are kept in Pi session history, but there is no separate intercom transcript or inbox
|
|
579
|
+
- **No attachments UI** — `file`, `snippet`, and `context` attachments are supported in the protocol, but not in the compose overlay
|
|
580
|
+
- **Only connected sessions appear** — The list shows Pi sessions that have loaded `pi-intercom` and successfully registered with the broker, not every open Pi process on the machine
|
|
581
|
+
- **Broker lifecycle** — The broker auto-spawns on first use and exits when idle; sessions reconnect automatically if the broker restarts
|