pi-orchestrator-config 4.2.0 → 4.3.2
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/README.md +76 -67
- package/agents/code-reviewer-docs.md +11 -1
- package/agents/code-reviewer-guidelines.md +11 -1
- package/agents/code-reviewer-quality.md +11 -1
- package/agents/code-reviewer-security.md +11 -1
- package/agents/code-reviewer-spec.md +11 -1
- package/agents/git-expert.md +42 -3
- package/agents/github-expert.md +11 -0
- package/extensions/acpx-provider/runtime-models.ts +18 -6
- package/extensions/cli-provider/agents/claude.ts +3 -2
- package/extensions/cli-provider/agents/cursor.ts +3 -5
- package/extensions/cli-provider/agents/gemini.ts +3 -2
- package/extensions/cli-provider/discover.ts +7 -7
- package/extensions/cli-provider/index.ts +5 -0
- package/extensions/cli-provider/runtime-models.ts +18 -6
- package/extensions/cli-provider/session-reaper.ts +5 -7
- package/extensions/cli-provider/sessions.ts +4 -0
- package/extensions/cli-provider/shared/discover-cache.ts +17 -176
- package/extensions/coms/coms-p2p.ts +1719 -423
- package/extensions/coms/coms-shared.ts +261 -39
- package/extensions/coms/coms-wrapper.ts +100 -62
- package/extensions/coms/index.ts +8 -4
- package/extensions/coms/mixed-turn.ts +26 -0
- package/extensions/coms/probe-socket.ts +42 -0
- package/extensions/coms/themeMap.ts +0 -1
- package/extensions/image-gen/image-gen.ts +19 -1
- package/extensions/orchestrator/async-agents.ts +563 -102
- package/extensions/orchestrator/async-capability.ts +8 -8
- package/extensions/orchestrator/cron.ts +15 -9
- package/extensions/orchestrator/dreaming.ts +32 -25
- package/extensions/orchestrator/enforcement-helpers.ts +459 -17
- package/extensions/orchestrator/enforcement-rules.ts +5 -4
- package/extensions/orchestrator/enforcement.ts +80 -27
- package/extensions/orchestrator/extended-autocomplete.ts +7 -0
- package/extensions/orchestrator/git-helpers.ts +2 -2
- package/extensions/orchestrator/index.ts +78 -10
- package/extensions/orchestrator/markdown-transformer.ts +313 -0
- package/extensions/orchestrator/memory-embeddings.ts +36 -34
- package/extensions/orchestrator/memory-provenance.ts +29 -25
- package/extensions/orchestrator/memory-scoring.ts +23 -18
- package/extensions/orchestrator/memory-tools.ts +10 -3
- package/extensions/orchestrator/overlay-dashboard.ts +17 -5
- package/extensions/orchestrator/parse-model-override.ts +29 -0
- package/extensions/orchestrator/pi-config-review-state.ts +57 -33
- package/extensions/orchestrator/project-settings.ts +333 -127
- package/extensions/orchestrator/resolve-agent-model.ts +24 -13
- package/extensions/orchestrator/review-porcelain.ts +4 -0
- package/extensions/orchestrator/review-ui.ts +63 -15
- package/extensions/orchestrator/rule-placeholders.ts +411 -2
- package/extensions/orchestrator/rules.ts +80 -132
- package/extensions/orchestrator/settings-tui-helpers.ts +380 -0
- package/extensions/orchestrator/settings-tui-submenus.ts +647 -0
- package/extensions/orchestrator/settings-tui.ts +636 -0
- package/extensions/orchestrator/state-jsonl.ts +431 -0
- package/extensions/orchestrator/subagent-tool.ts +157 -59
- package/extensions/orchestrator/sync-limit.ts +23 -0
- package/extensions/orchestrator/task-lifecycle.ts +77 -67
- package/extensions/orchestrator/utils.ts +8 -5
- package/extensions/pidash/pidash.ts +193 -156
- package/extensions/pidiff/pidiff.ts +96 -38
- package/extensions/pidiff/spawn-lock.ts +62 -0
- package/extensions/pitasks/index.ts +430 -0
- package/extensions/pitasks/reminders.ts +37 -0
- package/extensions/pitasks/task-store.ts +467 -0
- package/extensions/pitasks/task-tools.ts +375 -0
- package/extensions/pitasks/task-widget.ts +181 -0
- package/extensions/pitasks/types.ts +38 -0
- package/extensions/providers/acpx-driver.ts +12 -2
- package/extensions/providers/built-in-drivers.ts +6 -6
- package/extensions/providers/claude-driver.ts +1 -1
- package/extensions/providers/cursor-cli-driver.ts +1 -1
- package/extensions/providers/gemini-driver.ts +1 -1
- package/extensions/providers/index.ts +144 -26
- package/extensions/providers/initialized-guard.ts +27 -0
- package/extensions/providers/restore-default-model.ts +596 -0
- package/extensions/providers/session-shutdown.ts +39 -0
- package/extensions/shared/coms-active.ts +23 -0
- package/extensions/shared/create-runtime-provider.ts +2 -0
- package/extensions/shared/daemon-manager.ts +0 -8
- package/extensions/shared/file-logger.ts +132 -25
- package/extensions/shared/logger.ts +50 -0
- package/extensions/shared/models-dev.ts +421 -0
- package/extensions/shared/oneshot.ts +116 -0
- package/extensions/shared/resolve-binary.ts +191 -0
- package/extensions/shared/types.ts +3 -0
- package/package.json +9 -3
- package/prompts/coderabbit-rate-limit.md +2 -0
- package/rules/00-orchestrator-core.md +3 -0
- package/rules/10-agent-routing.md +12 -1
- package/rules/20-code-review-loop.md +52 -25
- package/rules/30-prompt-templates.md +4 -0
- package/rules/35-memory.md +3 -3
- package/rules/40-critical-rules.md +3 -0
- package/rules/55-coms-protocol.md +84 -18
- package/rules/60-task-tracking.md +2 -0
- package/settings-keys.json +563 -0
- package/templates/coms-feature-manager-prompt.md +4 -6
- package/extensions/coms/coms-net-server.ts +0 -1642
- package/extensions/coms/coms-net-wrapper.ts +0 -521
- package/extensions/coms/coms-net.ts +0 -1589
|
@@ -1,30 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
requires: coms_active
|
|
3
|
+
---
|
|
1
4
|
# Coms Protocol — Inter-Agent Communication
|
|
2
5
|
|
|
3
6
|
## Overview
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
P2P communication system for talking to other pi sessions on the same machine.
|
|
6
9
|
|
|
7
10
|
| System | Activation | Tool prefix | Transport |
|
|
8
11
|
|--------|-----------|-------------|-----------|
|
|
9
12
|
| **P2P** (coms) | `/coms start` | `coms_` | Direct peer-to-peer |
|
|
10
|
-
| **Networked** (coms-net) | `/coms-net start` | `coms_net_` | Hub server relay |
|
|
11
|
-
|
|
12
|
-
Both systems can be active. When asked to list peers, send messages, or interact with coms —
|
|
13
|
-
**try both** `coms_list` and `coms_net_list`. If one fails, use the other.
|
|
14
|
-
Don't assume which system is active.
|
|
15
13
|
|
|
16
14
|
## Activation
|
|
17
15
|
|
|
18
|
-
Tools are unavailable until the user runs `/coms start
|
|
19
|
-
Use `coms_list`
|
|
16
|
+
Tools are unavailable until the user runs `/coms start`.
|
|
17
|
+
Use `coms_list` to see connected peers.
|
|
20
18
|
|
|
21
19
|
## Tool Reference
|
|
22
20
|
|
|
23
|
-
| Action |
|
|
24
|
-
|
|
25
|
-
| List peers | `coms_list` |
|
|
26
|
-
| Send message | `coms_send` |
|
|
27
|
-
| Poll for response | `coms_get` |
|
|
21
|
+
| Action | Tool |
|
|
22
|
+
|--------|------|
|
|
23
|
+
| List peers | `coms_list` |
|
|
24
|
+
| Send message | `coms_send` |
|
|
25
|
+
| Poll for response | `coms_get` |
|
|
26
|
+
| Clear your queued msgs | `coms_queue_clear` |
|
|
27
|
+
| Delete queued msg | `coms_queue_delete` |
|
|
28
|
+
| Edit queued msg | `coms_queue_edit` |
|
|
29
|
+
| Prioritize queued msg | `coms_queue_prioritize` |
|
|
30
|
+
| View local queue | `/coms-queue` |
|
|
31
|
+
| Create task on peer | `coms_tasks_create` |
|
|
32
|
+
| Delete task on peer | `coms_task_delete` |
|
|
33
|
+
| List peer's tasks | `coms_task_list` |
|
|
34
|
+
| Get peer's task | `coms_task_get` |
|
|
35
|
+
| Update task on peer | `coms_task_update` |
|
|
28
36
|
|
|
29
37
|
## Inbound Messages — How to Reply
|
|
30
38
|
|
|
@@ -36,15 +44,50 @@ Inbound messages appear as `[from <peer> @ <cwd>] <message>`. Your assistant tex
|
|
|
36
44
|
|
|
37
45
|
To start a conversation: call the send tool, then **end your turn**.
|
|
38
46
|
The peer's response auto-delivers as a followUp message — no polling needed.
|
|
39
|
-
Use `coms_get`
|
|
47
|
+
Use `coms_get` only for non-blocking status checks.
|
|
40
48
|
|
|
41
49
|
## Message Queue
|
|
42
50
|
|
|
43
51
|
Inbound messages process in FIFO order. If multiple arrive while the peer is busy, they queue — each gets its own turn and response, nothing is dropped.
|
|
44
52
|
|
|
53
|
+
## Queue Management
|
|
54
|
+
|
|
55
|
+
When sending corrected or updated instructions that supersede previous messages, use queue management to prevent peers from processing stale messages:
|
|
56
|
+
|
|
57
|
+
### Clear previous messages before sending
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
coms_send(target="peer", prompt="Updated instructions", clearPrevious=true)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This clears all YOUR pending (unprocessed) messages from the peer's queue before delivering the new one. Use when previous messages are outdated.
|
|
64
|
+
|
|
65
|
+
### Manual queue operations
|
|
66
|
+
|
|
67
|
+
| Action | Tool |
|
|
68
|
+
|--------|------|
|
|
69
|
+
| Clear all your pending | `coms_queue_clear(target)` |
|
|
70
|
+
| Delete specific message | `coms_queue_delete(target, msg_id)` |
|
|
71
|
+
| Edit queued message | `coms_queue_edit(target, msg_id, new_content)` |
|
|
72
|
+
| Move to front | `coms_queue_prioritize(target, msg_id)` |
|
|
73
|
+
|
|
74
|
+
**Rules:**
|
|
75
|
+
|
|
76
|
+
- You can only manage YOUR OWN messages in a peer's queue
|
|
77
|
+
- Cannot touch messages from other senders
|
|
78
|
+
- Cannot touch the message currently being processed
|
|
79
|
+
- `msg_id` is returned by `coms_send` — track it to manage later
|
|
80
|
+
- Use `clearPrevious` when sending corrections — it's the most common pattern
|
|
81
|
+
|
|
82
|
+
**Note:** Queue management operations (`coms_queue_edit`, `coms_queue_delete`,
|
|
83
|
+
`coms_queue_prioritize`) are fire-and-forget — they receive transport-level
|
|
84
|
+
acknowledgement but do not confirm whether the target actually applied the change.
|
|
85
|
+
A dequeue race, not-found `msg_id`, or ownership mismatch can cause silent no-ops.
|
|
86
|
+
Callers should not assume success without verifying via subsequent responses.
|
|
87
|
+
|
|
45
88
|
## Structured Task Delegation
|
|
46
89
|
|
|
47
|
-
Use the `tasks` parameter to delegate structured work items alongside messages. Tasks appear in the peer's task widget
|
|
90
|
+
Use the `tasks` parameter to delegate structured work items alongside messages. Tasks appear in the peer's task widget:
|
|
48
91
|
|
|
49
92
|
```text
|
|
50
93
|
coms_send(target="coder", prompt="Implement these features", tasks=[
|
|
@@ -53,11 +96,34 @@ coms_send(target="coder", prompt="Implement these features", tasks=[
|
|
|
53
96
|
])
|
|
54
97
|
```
|
|
55
98
|
|
|
99
|
+
### Recommended Pattern
|
|
100
|
+
|
|
101
|
+
1. Create tasks on the peer via `coms_tasks_create`
|
|
102
|
+
- Automatically adds a "Report completion to sender" task, blocked by all other tasks
|
|
103
|
+
- Automatically sends a message to the peer to start working
|
|
104
|
+
2. Monitor progress via `coms_task_list` / `coms_task_get` (no message sent)
|
|
105
|
+
3. The peer works through tasks, updates status, reports when done via the final report task
|
|
106
|
+
|
|
107
|
+
## Remote Task Management
|
|
108
|
+
|
|
109
|
+
Manage tasks on peer sessions directly — no message sent, no peer notification:
|
|
110
|
+
|
|
111
|
+
| Tool | Description |
|
|
112
|
+
|------|-------------|
|
|
113
|
+
| `coms_tasks_create` | Create a task on peer's session (with coms_origin tracking) |
|
|
114
|
+
| `coms_task_update` | Update a task YOU created on peer's session |
|
|
115
|
+
| `coms_task_delete` | Delete a task YOU created on peer's session |
|
|
116
|
+
| `coms_task_list` | List all tasks on peer's session |
|
|
117
|
+
| `coms_task_get` | Get a specific task from peer's session |
|
|
118
|
+
|
|
119
|
+
Ownership: update/delete only work on tasks with matching `coms_origin` — you can only modify tasks you created.
|
|
120
|
+
|
|
121
|
+
Tasks are written directly to the peer's task store file. The peer's fs.watch detects the change and updates their task widget instantly.
|
|
122
|
+
|
|
56
123
|
## Key Rules
|
|
57
124
|
|
|
58
125
|
1. **Responses auto-deliver** — after send, end your turn; the reply arrives as a followUp
|
|
59
126
|
2. **Never call send tools to reply** to inbound messages — your assistant text is the reply
|
|
60
127
|
3. **Always check peers first** — use list tools before sending
|
|
61
|
-
4. **
|
|
62
|
-
5. **
|
|
63
|
-
6. **Use tasks for structured work** — use `tasks` parameter instead of prose lists
|
|
128
|
+
4. **Messages are never lost** — busy peers queue messages in FIFO order
|
|
129
|
+
5. **Use tasks for structured work** — use `tasks` parameter instead of prose lists
|
|
@@ -45,7 +45,9 @@ Answer the question, then resume the next unchecked task immediately — the per
|
|
|
45
45
|
## Integration & Key Rules
|
|
46
46
|
|
|
47
47
|
Task tracking works alongside existing workflow rules — include issue-first, code review, and documentation steps as individual tasks.
|
|
48
|
+
{{IF:task_reminder_enabled}}
|
|
48
49
|
Tasks are code-enforced (reminders after 4+ ignored turns).
|
|
50
|
+
{{/IF}}
|
|
49
51
|
Never abandon tasks — if scope changes, use `TaskUpdate` with `status: "deleted"` to remove obsolete tasks; the task list is your contract.
|
|
50
52
|
|
|
51
53
|
---
|