ac-teams 0.0.1 → 0.0.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 +28 -183
- package/docs/development.md +89 -0
- package/docs/implementation-plan.md +4 -4
- package/docs/operations.md +101 -0
- package/docs/usage.md +128 -0
- package/package.json +5 -2
- package/src/commands.ts +21 -0
- package/src/config.ts +29 -2
- package/src/connection.ts +4 -1
- package/src/coordinator.ts +156 -30
- package/src/graph.ts +79 -0
- package/src/index.ts +155 -13
- package/src/panel.ts +309 -0
- package/src/render.ts +71 -0
- package/src/schemas.ts +27 -1
- package/src/store.ts +45 -14
- package/src/task-summary.ts +34 -0
- package/src/telemetry.ts +19 -0
- package/src/terminal-agent.ts +110 -0
- package/src/terminal-ui.ts +162 -0
- package/src/types.ts +41 -3
- package/src/ui-types.ts +19 -0
package/README.md
CHANGED
|
@@ -1,208 +1,53 @@
|
|
|
1
1
|
# ac-teams
|
|
2
2
|
|
|
3
|
-
Persistent Pi
|
|
3
|
+
Persistent agent teams for [Pi](https://github.com/earendil-works/pi): shared tasks, searchable messages, and optional Git worktrees. Members stay alive between assignments and can resume their native Pi sessions after stopping. No workflow engine or background service.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Each column shows ac-teams alone or with one companion tool. A check mark (✓) means that setup provides the feature; a dash (-) means it does not.
|
|
10
|
-
|
|
11
|
-
| Feature | Standalone ac-teams | + ACStack | + Herdr |
|
|
12
|
-
| --- | --- | --- | --- |
|
|
13
|
-
| Persistent Pi members and native session resume | ✓ | ✓ | ✓ |
|
|
14
|
-
| Shared tasks, dependencies, and searchable messages | ✓ | ✓ | ✓ |
|
|
15
|
-
| Optional isolated Git worktrees | ✓ | ✓ | ✓ |
|
|
16
|
-
| Planning, review, and shipping skills | - | ✓ | - |
|
|
17
|
-
| Terminal tabs, panes, and visible root sessions | - | - | ✓ |
|
|
18
|
-
|
|
19
|
-
ACStack adds workflow guidance; Herdr adds terminal management. These are companion capabilities, not automatic integrations. ac-teams members run headlessly; Herdr does not automatically open a pane for each member.
|
|
20
|
-
|
|
21
|
-
## Try it locally
|
|
22
|
-
|
|
23
|
-
Requirements: Linux, Node 22.19 or newer, and an authenticated `pi` executable on `PATH`.
|
|
7
|
+
Requires Linux, Node 22.19 or newer, and an authenticated `pi` executable on `PATH`. Interactive teams also require `tmux` on `PATH`. Tested with Pi 1.4.0.
|
|
24
8
|
|
|
25
9
|
```sh
|
|
26
|
-
npm
|
|
27
|
-
pi -e /absolute/path/to/ac-teams/src/index.ts
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Load the extension once, either explicitly or through Pi package settings. Children load ac-teams explicitly and otherwise keep normal Pi extensions, skills, authentication, and cwd instructions. They receive their brief, not the parent's conversation.
|
|
31
|
-
|
|
32
|
-
Use Pi's `/trust` command to approve each member's cwd before launching there. RPC children cannot answer Pi's initial trust prompt. ac-teams rejects readiness if project resources were skipped; it never auto-approves a project. A one-run approval in the root is not a saved approval for children or new worktrees.
|
|
33
|
-
|
|
34
|
-
Other delegation tools can coexist. ac-teams warns when `Agent`, `SubagentWorkflow`, or `subagent` is active, but does not disable them. **Its limits cover only members launched through `team_agent`.** Use Pi's resource settings to disable other launchers if you want one team authority. Shell access and same-user extensions are not sandboxed.
|
|
35
|
-
|
|
36
|
-
## Three tools, no prescribed workflow
|
|
37
|
-
|
|
38
|
-
| Tool | Actions | Main rule |
|
|
39
|
-
| --- | --- | --- |
|
|
40
|
-
| `team_agent` | `launch`, `list`, `status`, `stop`, `resume`, `limits`, `cleanup` | A parent controls its descendants, not peers or ancestors |
|
|
41
|
-
| `team_task` | `create`, `list`, `read`, `edit`, `claim`, `start`, `release`, `complete`, `reopen` | Checkout reserves work; dependencies gate starting, not ownership |
|
|
42
|
-
| `team_message` | `send`, `history`, `search` | Recipients select who is notified, not who can read |
|
|
43
|
-
|
|
44
|
-
`/teams` shows member status and native session/worktree locations. `/teams stop` stops every descendant. The root opens coordination state lazily on the first team request.
|
|
45
|
-
|
|
46
|
-
### Give members bounded assignments
|
|
47
|
-
|
|
48
|
-
Example `team_agent` arguments:
|
|
49
|
-
|
|
50
|
-
```json
|
|
51
|
-
{"action":"launch","brief":"Review src/parser.ts. Read only; do not delegate or edit. Send findings to root through team_message."}
|
|
10
|
+
pi install npm:ac-teams@0.0.2
|
|
52
11
|
```
|
|
53
12
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Launch returns a stable member ID, PID, cwd, and native session ID/path. Finishing a turn makes the member idle only after Pi reports `agent_settled`. It does not stop the process.
|
|
57
|
-
|
|
58
|
-
Children can delegate through the same coordinator, subject to depth and capacity. Delegation still needs user authorization. Keep briefs bounded, agree on file ownership, and use separate worktrees for concurrent writers.
|
|
59
|
-
|
|
60
|
-
### Share work without losing ownership
|
|
13
|
+
Restart Pi after installation. Use Pi's `/trust` command to save approval for each project directory before launching members there; headless children cannot answer the initial trust prompt.
|
|
61
14
|
|
|
62
|
-
|
|
63
|
-
{"action":"create","title":"Review parser errors","description":"Check malformed input and report concrete failures; no edits."}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Each task has three independent parts:
|
|
15
|
+
## Use it
|
|
67
16
|
|
|
68
|
-
|
|
69
|
-
- **Ownership:** `owner` is one member ID, or absent
|
|
70
|
-
- **Dependencies:** `dependencies` lists prerequisite task IDs. Returned `blockedBy` lists those not yet done; it is calculated, never stored as a status.
|
|
17
|
+
Your Pi session is the root; its child agents are members. Ask Pi to delegate a bounded assignment, for example:
|
|
71
18
|
|
|
72
|
-
|
|
19
|
+
> Launch a member to review src/parser.ts without editing, and have it send findings back to me.
|
|
73
20
|
|
|
74
|
-
|
|
|
21
|
+
| Tool | Purpose |
|
|
75
22
|
| --- | --- |
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `release` | Clear ownership. In-progress work returns to `todo`; done work stays `done`. |
|
|
80
|
-
| `reopen` | Explicitly move `done` to `todo`, retaining any owner. Refused if a dependent is in progress or done. |
|
|
81
|
-
|
|
82
|
-
Only the owner can start, complete, or release its work. An ancestor may explicitly release a stopped or interrupted descendant's ownership. The owner or root can reopen an owned task; any member can reopen an unowned one. Done tasks cannot be claimed until reopened.
|
|
83
|
-
|
|
84
|
-
Include `dependencies` on creation or `edit`. Any member can edit unowned to-do work; only the owner can edit reserved to-do work. In-progress and done tasks cannot be edited. Unknown dependencies and cycles are rejected. An optional `revision` rejects stale mutations.
|
|
85
|
-
|
|
86
|
-
`acceptance: true` asserts that the agent checked the acceptance criteria; it is not an independent test runner. Stop/crash retains ownership and progress. There is no automatic reassignment.
|
|
87
|
-
|
|
88
|
-
### Send messages instead of polling
|
|
89
|
-
|
|
90
|
-
```json
|
|
91
|
-
{"action":"send","recipients":["root"],"text":"Parser review complete. No edits; two malformed-input cases need tests."}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Omit `recipients` to notify all other live members. Explicit sets must contain unique live member IDs; an invalid set rejects the whole send. All team members can read the full history, including direct messages.
|
|
95
|
-
|
|
96
|
-
```json
|
|
97
|
-
{"action":"history","after":0,"limit":20}
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Use the last returned `seq` as the next `after` cursor. `search` adds a case-sensitive literal `query`; results remain cursor-paged. Reads never consume messages. Task and message result pages are limited to 100 items.
|
|
101
|
-
|
|
102
|
-
New messages queue a compact Pi follow-up: an idle member wakes, while a busy member finishes its current work first. Notifications batch for 50 ms and reference history rather than copying every message into context. Notification acknowledgement means queued, not read or acted on. Messages survive crashes; exactly-once delivery or model execution does not. Avoid acknowledgement-only replies.
|
|
103
|
-
|
|
104
|
-
## Limits are ceilings, not staffing targets
|
|
105
|
-
|
|
106
|
-
Default: at most **10 live descendants**, counting starting, busy, idle, and stopping members. Root does not consume a slot. Default depth is **2**: root, child, grandchild. Use the fewest useful agents.
|
|
107
|
-
|
|
108
|
-
Root policy precedence:
|
|
109
|
-
|
|
110
|
-
1. Built-in defaults
|
|
111
|
-
2. `~/.acstack/ac-teams/config.json`
|
|
112
|
-
3. `.pi/ac-teams.json`, only with `--teams-project-config`
|
|
113
|
-
4. Explicit `--teams-limit` and `--teams-depth` flags
|
|
114
|
-
|
|
115
|
-
Config files accept only `limit` and `depth`, for example `{"limit":4,"depth":2}`. Limits must be 1–100; depth must be 0–10. A value above 10 requires an explicit root startup flag or interactive confirmation of a root `limits` tool request. Configuration alone cannot raise it. Lowering limits does not kill existing members; it blocks further launches until capacity fits.
|
|
23
|
+
| `team_agent` | Launch, inspect, stop, and resume members; manage limits and worktrees |
|
|
24
|
+
| `team_task` | Track shared work, ownership, and dependencies |
|
|
25
|
+
| `team_message` | Send notifications and read or search team history |
|
|
116
26
|
|
|
117
|
-
|
|
118
|
-
pi -e /absolute/path/to/ac-teams/src/index.ts --teams-limit 4 --teams-depth 1
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Stop, resume, and keep work safe
|
|
122
|
-
|
|
123
|
-
`stop` stops the member's descendants deepest-first, clears queued work, aborts the turn, and closes the owned RPC pipe. Hung processes escalate to SIGTERM and then SIGKILL, with a warning. Escalation requires a matching captured process-group identity; uncertain ownership is refused. This is snapshot-based cleanup, not OS containment: detached or uncaptured descendants and identity-check races remain outside the guarantee.
|
|
124
|
-
|
|
125
|
-
`resume` needs a stopped descendant ID and a new brief. It starts a new process against the same native Pi session file; it does not reconstruct a transcript, reconnect to old stdio, or replay the previous assignment automatically. Resume is refused if the old process is live or its identity is uncertain.
|
|
126
|
-
|
|
127
|
-
Root session switching, forking, and tree traversal are blocked while members are live. A member cannot switch away from its team binding. Stop members explicitly before replacing the root session.
|
|
128
|
-
|
|
129
|
-
**Exit confirmation requires Pi's `session_before_exit` hook.** The prerequisite is implemented in the separate local Pi checkout described in [the implementation history](docs/implementation-plan.md#exit-confirmation-supported-hook-versus-package-interception), not in installed Pi 1.4.0. With that hook, native exit asks before stopping live members; cancellation leaves them running. Without it, shutdown performs cleanup but cannot ask first. Signals bypass confirmation.
|
|
130
|
-
|
|
131
|
-
If the root crashes, closing its owned pipes and losing the coordinator connection makes ordinary RPC children shut down. This passed SIGTERM and SIGKILL probes with native child and grandchild processes. It is best effort, not a guarantee against a hung event loop, machine failure, or detached shell processes. Recovery refuses duplicate work when a previous member is still live or uncertain.
|
|
132
|
-
|
|
133
|
-
### Optional worktrees
|
|
134
|
-
|
|
135
|
-
Set `worktree: true` on launch. `base` defaults to the repository's HEAD; `target` records the branch/ref against which later cleanup must prove integration. Worktrees live under a sibling `.ac-teams-worktrees` directory. No fetch, merge, stash, or checkout of the original directory occurs.
|
|
136
|
-
|
|
137
|
-
Stopping never deletes a worktree. `cleanup` is explicit and requires a stopped member, a clean tree including ignored/untracked files, and HEAD ancestry proven against the recorded target's current commit. Missing targets, dirty work, and uncertain/squashed integration retain the tree. Cleanup never forces removal and retains the branch. Cleanups and resumes exclude each other.
|
|
138
|
-
|
|
139
|
-
Worktree creation copies committed content, not uncommitted project configuration. Approve the new cwd through native Pi trust before retrying a launch that could not load its project resources. A failed launch retains its created worktree and member record.
|
|
140
|
-
|
|
141
|
-
## Local records and security boundaries
|
|
142
|
-
|
|
143
|
-
Each root session uses `~/.acstack/ac-teams/teams/<session-id>/`:
|
|
144
|
-
|
|
145
|
-
- `state.json` contains membership, policy, tasks, messages, claims, and notification cursors
|
|
146
|
-
- `sessions/` contains native Pi-managed member transcripts
|
|
147
|
-
- `owner.lock` and `coordinator.sock` coordinate the running root
|
|
148
|
-
|
|
149
|
-
State schema 2 separates ownership from progress. On reopening an older team, the coordinator atomically migrates schema 1: `pending` becomes `todo`, `claimed` becomes `in_progress`, and `completed` becomes `done`. IDs, owners, dependencies, and revisions are preserved. Invalid snapshots are rejected without replacement. Older ac-teams code cannot reopen the migrated schema; stop old sessions before updating.
|
|
150
|
-
|
|
151
|
-
Only the root writes state. Mutations validate a copy, flush a temporary snapshot, atomically rename it, and flush the directory before returning success. An exclusive process-identity lock prevents concurrent owners. Private team directories use 0700; state files and the authenticated Unix socket use 0600. Uncertain locks fail closed.
|
|
152
|
-
|
|
153
|
-
This is a small-team store: each mutation rewrites the snapshot, and search scans local history. There is no database, compaction, retention policy, automatic deletion, or deduplication of repeated mutation requests. Inspect state before retrying an ambiguous failed request. Records and transcripts can contain sensitive project data. Permissions protect against other users, not agents running as the same OS user.
|
|
27
|
+
`/teams` or `/teams panel` opens Tasks, Teammates, and Activity. `/teams teammate <name-or-id>` opens a teammate directly; subcommands and teammate names autocomplete. Use the task graph or list, send feedback, and open a member's full live Pi session.
|
|
154
28
|
|
|
155
|
-
|
|
29
|
+
The task summary sits above the input. The agent selector below status shows descriptive names, models, and context usage. `/teams config` toggles these displays independently.
|
|
156
30
|
|
|
157
|
-
|
|
31
|
+
From an empty editor, press Down to select the team footer, then Enter to open a member. Ctrl+Shift+Left returns to Main without stopping the member. `/teams stop` stops every descendant.
|
|
158
32
|
|
|
159
|
-
|
|
160
|
-
npm ci
|
|
161
|
-
npm run check
|
|
162
|
-
npm test
|
|
163
|
-
npm pack --dry-run
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
The deterministic suite covers task reservations, progress, dependency readiness, release/reopen rules, durable migration, real subprocesses, sockets, notification batching, shutdown escalation, worktree safety, and lifecycle races. It makes no model calls.
|
|
167
|
-
|
|
168
|
-
Additional local checks on 2026-10-24:
|
|
169
|
-
|
|
170
|
-
- Native Pi busy follow-up, idle wake with the same PID, and resume with the same session ID/path and a new PID
|
|
171
|
-
- Normal project-extension loading and a 10-call model smoke using the existing default model; Pi reported an estimated $0.0861
|
|
172
|
-
- Actual ac-teams exit confirmation, cancel/retry, and child cleanup in a real terminal using patched Pi and a model-free RPC child fixture
|
|
173
|
-
- Native child/grandchild cleanup after coordinator SIGTERM and SIGKILL, without model calls
|
|
174
|
-
- Independent review and executable checks of stop/start, cleanup/resume, and shutdown/socket races
|
|
175
|
-
|
|
176
|
-
Not verified on macOS, Windows, or network filesystems. The package is Linux-only because safe process identity uses `/proc`. No dashboard, workflow DSL, daemon, or automatic merging is included.
|
|
177
|
-
|
|
178
|
-
## Publish to npm
|
|
179
|
-
|
|
180
|
-
The `publish-npm.yml` GitHub workflow follows acstack's staged-release approach: it runs typecheck, tests, and package checks, then submits the package for approval. It does not publish the release directly.
|
|
181
|
-
|
|
182
|
-
Set the repository secret once using an interactive prompt, not a token pasted into a command or chat:
|
|
33
|
+
Defaults allow up to **10 live members** and **two levels of delegation**. Use the fewest useful agents.
|
|
183
34
|
|
|
184
|
-
|
|
185
|
-
gh secret set NPM_TOKEN --repo ac8318740/ac-teams
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Reuse acstack's token only if its permissions allow creating and staging `ac-teams`. GitHub cannot reveal the existing secret value. Otherwise, create a granular npm token with stage-publish access. npm requires 2FA on the publishing account.
|
|
35
|
+
## Know the boundaries
|
|
189
36
|
|
|
190
|
-
|
|
37
|
+
- Members share your filesystem access. All members can read all team messages, including direct messages.
|
|
38
|
+
- Limits cover only `team_agent`, not other delegation tools. Use separate worktrees for concurrent writers.
|
|
39
|
+
- Stop retains tasks, sessions, and worktrees. Worktree deletion is explicit and requires clean, integrated work.
|
|
40
|
+
- Exit confirmation needs Pi's `session_before_exit` hook, which installed Pi 1.4.0 lacks. Without it, shutdown cleans up but cannot ask first. Signals always bypass confirmation.
|
|
191
41
|
|
|
192
|
-
|
|
193
|
-
gh workflow run publish-npm.yml --repo ac8318740/ac-teams
|
|
194
|
-
```
|
|
42
|
+
See the [operations guide](docs/operations.md) for recovery guarantees, storage, and the Pi dependency security advisory.
|
|
195
43
|
|
|
196
|
-
|
|
44
|
+
## Guides
|
|
197
45
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
```sh
|
|
203
|
-
pi install npm:ac-teams@0.0.1
|
|
204
|
-
```
|
|
46
|
+
- [Usage](docs/usage.md): tool actions, task rules, messages, and companion tools
|
|
47
|
+
- [Operations](docs/operations.md): limits, stop/resume, worktrees, and security
|
|
48
|
+
- [Development](docs/development.md): source setup, verification, and publishing
|
|
49
|
+
- [Implementation history](docs/implementation-plan.md): design decisions and prior art
|
|
205
50
|
|
|
206
51
|
## License
|
|
207
52
|
|
|
208
|
-
[MIT](LICENSE).
|
|
53
|
+
[MIT](LICENSE).
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Develop and publish ac-teams
|
|
2
|
+
|
|
3
|
+
Source setup is for contributors. For normal use, [install the npm package through Pi](../README.md#install).
|
|
4
|
+
|
|
5
|
+
## Run from source
|
|
6
|
+
|
|
7
|
+
Requirements: Linux, Node 22.19 or newer, and an authenticated `pi` executable on `PATH`. Interactive teams also need `tmux`. From a clone of this repository:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm ci
|
|
11
|
+
pi -e "$PWD/src/index.ts"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
To work in another project, launch Pi there with the absolute path to `ac-teams/src/index.ts`. Load the extension once, either explicitly or through Pi package settings, not both. Save native Pi trust for each member's cwd as described in [operations](operations.md#save-project-trust-before-launching).
|
|
15
|
+
|
|
16
|
+
## Run local checks
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm run check
|
|
20
|
+
npm test
|
|
21
|
+
npm pack --dry-run
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The deterministic suite makes no model calls. It covers:
|
|
25
|
+
|
|
26
|
+
- Task reservations, progress, dependencies, release/reopen rules, and durable migration
|
|
27
|
+
- Subprocesses, sockets, notification batching, shutdown escalation, worktree safety, and lifecycle races
|
|
28
|
+
- Graph navigation, task numbers and labels, UUID references, task summaries, display toggles, state colors, and narrow layouts
|
|
29
|
+
- Draft retention, quiet resume, shutdown-time feedback, and maximum-length messages
|
|
30
|
+
- Name validation and recovery, autocomplete, name/ID resolution, and model/context reports
|
|
31
|
+
|
|
32
|
+
### Recorded native Pi verification
|
|
33
|
+
|
|
34
|
+
Additional local checks on 2026-10-24, using Pi 1.4.0 unless noted:
|
|
35
|
+
|
|
36
|
+
- Native Pi busy follow-up, idle wake with the same PID, and resume with the same session ID/path and a new PID
|
|
37
|
+
- Normal project-extension loading and a 10-call model smoke using the existing default model; Pi reported an estimated $0.0861
|
|
38
|
+
- Actual ac-teams exit confirmation, cancel/retry, and child cleanup in a real terminal using patched Pi and a model-free RPC child fixture
|
|
39
|
+
- Native child/grandchild cleanup after coordinator SIGTERM and SIGKILL, without model calls
|
|
40
|
+
- Independent review and executable checks of stop/start, cleanup/resume, and shutdown/socket races
|
|
41
|
+
|
|
42
|
+
Terminal UI checks used real native Pi processes in an isolated full-size Herdr tab with a local deterministic model endpoint, not a paid provider:
|
|
43
|
+
|
|
44
|
+
- Private tmux transport, native child/grandchild delegation, member-to-descendant switching, and single-key return to Main
|
|
45
|
+
- Same PID across switching, unsent member draft retention, and a new PID with the same session ID/path after quiet resume
|
|
46
|
+
- Real UUID task graphs, green/cyan/red state borders, and creator-directed feedback without direct task mutation
|
|
47
|
+
- Root exit stopping native descendants and retaining task, message, and session records
|
|
48
|
+
- Task summary above the input, agent selector below status, native subcommand/name autocomplete, and same-PID/session opening by name or ID
|
|
49
|
+
- Pi-reported model display names and changing context estimates in the live selector
|
|
50
|
+
|
|
51
|
+
Not verified on macOS, Windows, or network filesystems. The package is Linux-only because safe process identity uses `/proc`. No web dashboard, workflow DSL, daemon, or automatic merging is included.
|
|
52
|
+
|
|
53
|
+
## Stage releases for npm approval
|
|
54
|
+
|
|
55
|
+
[The GitHub workflow](https://github.com/ac8318740/ac-teams/actions/workflows/publish-npm.yml) automatically stages a release when `package.json` reaches `main`. Changes to the workflow itself also trigger staging, so installing this automation stages the current version. It runs typecheck, tests, and package checks first.
|
|
56
|
+
|
|
57
|
+
This follows ACStack's automatic staged-release approach. Final publication still requires approval on npm with 2FA; merging alone does not make the version public.
|
|
58
|
+
|
|
59
|
+
Only `main` can stage releases. The workflow rejects other branches and tags before checkout. The GitHub environment `npm` also restricts deployments to the branch `main`, with no allowed tags.
|
|
60
|
+
|
|
61
|
+
Store `NPM_TOKEN` only in that environment, not as a repository secret. This keeps older workflows on other branches from accessing it. Set it using an interactive prompt, not a token pasted into a command or chat:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
gh secret set NPM_TOKEN --repo ac8318740/ac-teams --env npm
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Reuse acstack's token only if its permissions allow creating and staging `ac-teams`. GitHub cannot reveal the existing secret value. Otherwise, create a granular npm token with stage-publish access. npm requires 2FA on the publishing account.
|
|
68
|
+
|
|
69
|
+
For a retry without another commit, run the workflow manually from `main` in GitHub Actions or dispatch it:
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
gh workflow run publish-npm.yml --repo ac8318740/ac-teams --ref main
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Pushes to other branches, tags, and pull requests do not trigger staging. An already published version is a no-op. Like ACStack, the workflow treats npm's `Version uniqueness check failed unexpectedly` response as an apparent existing staged submission and directs you to approve it. Other staging errors fail the run.
|
|
76
|
+
|
|
77
|
+
Review and approve the staged version in npm's **Staged Packages** tab using 2FA. The first staging of a new name creates a public `0.0.0-stage` placeholder. The requested version and its contents become public only after approval. See [npm's staged publishing documentation](https://docs.npmjs.com/staged-publishing/).
|
|
78
|
+
|
|
79
|
+
After approval, install through Pi, replacing the version below for later releases:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
pi install npm:ac-teams@0.0.2
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## License and prior art
|
|
86
|
+
|
|
87
|
+
[MIT](../LICENSE). No third-party extension implementation was copied. Pi and TypeBox remain peer dependencies; `grok-mermaid` is a runtime dependency for terminal diagrams. The [implementation history](implementation-plan.md) records design decisions, exit-guard prior art, and license findings.
|
|
88
|
+
|
|
89
|
+
[Back to README](../README.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ac-teams implementation history
|
|
2
2
|
|
|
3
|
-
**Status:**
|
|
3
|
+
**Status:** v0.0.1 is built and verified on Linux as of 2026-10-24. The [README](../README.md) introduces the package and links to its current guides. This file records implementation decisions and the original proposal.
|
|
4
4
|
|
|
5
5
|
The user approved implementation with these refinements:
|
|
6
6
|
|
|
@@ -11,11 +11,11 @@ The user approved implementation with these refinements:
|
|
|
11
11
|
|
|
12
12
|
The smallest complete implementation uses one atomically replaced `state.json` for messages and tasks, rather than a separate message journal. Mutations are not request-deduplicated; ambiguous retries require inspection. Notification acknowledgement records queuing, not reading, and does not guarantee at-least-once model execution across crashes. Worktree cleanup is explicit, never automatic.
|
|
13
13
|
|
|
14
|
-
Deterministic subprocess/socket/storage/Git tests, native Pi busy/idle/resume checks, an actual terminal confirmation test, model-free native SIGTERM/SIGKILL probes, package checks, and independent review passed. The paid smoke used 10 calls and Pi reported an estimated $0.0861.
|
|
14
|
+
Deterministic subprocess/socket/storage/Git tests, native Pi busy/idle/resume checks, an actual terminal confirmation test, model-free native SIGTERM/SIGKILL probes, package checks, and independent review passed. The paid smoke used 10 calls and Pi reported an estimated $0.0861. The [operations guide](operations.md#pi-dependency-advisory) records the host dependency advisory.
|
|
15
15
|
|
|
16
16
|
## Original proposal
|
|
17
17
|
|
|
18
|
-
The sections below preserve the design investigation and its proposed acceptance checks. Where they differ from the implementation, the
|
|
18
|
+
The sections below preserve the design investigation and its proposed acceptance checks. Where they differ from the implementation, the [usage guide](usage.md), [operations guide](operations.md), and the refinements above take precedence. Their original future-tense recommendations are not additional pending work.
|
|
19
19
|
|
|
20
20
|
## Architecture: the root owns transport, not everyone's work
|
|
21
21
|
|
|
@@ -194,4 +194,4 @@ The evidence below describes the installed package; the separate local Pi patch
|
|
|
194
194
|
|
|
195
195
|
A temporary, isolated real-Pi probe disabled all optional extensions/skills/templates/themes and sent no model prompt. It verified successful `get_state`, `get_commands`, `clear_queue`, and `abort` responses; continued availability between commands; native session ID/path reporting; and exit code 0 after stdin EOF. The first probe timed out because its Python text-buffered selector reader missed buffered lines; switching the probe to byte reads resolved that harness error.
|
|
196
196
|
|
|
197
|
-
At the end of the initial investigation, extension coexistence/readiness, paid model turns, busy message delivery, concurrent claims, parent-death cleanup, native resume/rejoin, and worktree safety were still unverified. Those checks were subsequently exercised during implementation; see
|
|
197
|
+
At the end of the initial investigation, extension coexistence/readiness, paid model turns, busy message delivery, concurrent claims, parent-death cleanup, native resume/rejoin, and worktree safety were still unverified. Those checks were subsequently exercised during implementation; see [recorded verification](development.md#recorded-native-pi-verification) and [operational limits](operations.md). Publishing, marketplace integration, and ACStack changes were outside the initial local delivery. Current [publishing instructions](development.md#stage-releases-for-npm-approval) are separate from that history.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Operate ac-teams
|
|
2
|
+
|
|
3
|
+
ac-teams runs on Linux with Node 22.19 or newer and an authenticated `pi` executable on `PATH`. Interactive roots also require `tmux`: each team owns a private server and native member terminals. Headless roots retain RPC members. Both share your OS user's access, not a sandbox.
|
|
4
|
+
|
|
5
|
+
## Save project trust before launching
|
|
6
|
+
|
|
7
|
+
Use Pi's `/trust` command to approve each member's cwd before launching there. Children cannot complete the coordinator readiness handshake while waiting for Pi's initial trust prompt. ac-teams rejects readiness if project resources were skipped; it never auto-approves a project.
|
|
8
|
+
|
|
9
|
+
A one-run approval in the root is not a saved approval for children or new worktrees. Worktree creation copies committed content, not uncommitted project configuration. Approve the new cwd through native Pi trust before retrying a launch that could not load its project resources. A failed launch retains its created worktree and member record.
|
|
10
|
+
|
|
11
|
+
## Limits are ceilings, not staffing targets
|
|
12
|
+
|
|
13
|
+
Default: at most **10 live descendants**, counting starting, busy, idle, and stopping members. Root does not consume a slot. Default depth is **2**: root, child, grandchild. Use the fewest useful agents.
|
|
14
|
+
|
|
15
|
+
Root policy precedence, from lowest to highest:
|
|
16
|
+
|
|
17
|
+
1. Built-in defaults
|
|
18
|
+
2. `~/.acstack/ac-teams/config.json`
|
|
19
|
+
3. `.pi/ac-teams.json`, only with `--teams-project-config`
|
|
20
|
+
4. Explicit `--teams-limit` and `--teams-depth` flags
|
|
21
|
+
|
|
22
|
+
Config files accept only `limit` and `depth`, for example `{"limit":4,"depth":2}`. Limits must be 1–100; depth must be 0–10.
|
|
23
|
+
|
|
24
|
+
A limit above 10 requires an explicit root startup flag or interactive confirmation of a root `limits` tool request. Configuration alone cannot raise it. Lowering limits does not kill existing members; it blocks further launches until capacity fits.
|
|
25
|
+
|
|
26
|
+
For an npm-installed extension, set startup limits with:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pi --teams-limit 4 --teams-depth 1
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Other delegation tools remain outside these limits. See [companion tools](usage.md#companion-tools-add-guidance-or-terminal-management).
|
|
33
|
+
|
|
34
|
+
## Display preferences are global
|
|
35
|
+
|
|
36
|
+
`/teams config` saves task-summary and agent-selector visibility to `~/.acstack/ac-teams/display.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{"tasks":true,"agents":true}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Only these two boolean keys are accepted; omitted keys default to `true`. Saves atomically replace a private 0600 file. A malformed or unreadable preferences file produces a warning and is not overwritten; correct or remove it before saving settings again. These preferences are separate from resource policy in `config.json` and have no project override.
|
|
43
|
+
|
|
44
|
+
## Stop and resume members
|
|
45
|
+
|
|
46
|
+
`stop` stops the member's descendants deepest-first, clears queued work, and aborts the turn. It closes the owned RPC pipe or terminates the owned native terminal. Hung processes escalate to SIGTERM and then SIGKILL, with a warning. Escalation requires a matching captured process-group identity; the coordinator refuses uncertain ownership.
|
|
47
|
+
|
|
48
|
+
This is snapshot-based cleanup, not OS containment. Detached or uncaptured descendants and identity-check races remain outside the guarantee.
|
|
49
|
+
|
|
50
|
+
`resume` needs a stopped descendant ID and a new brief. It keeps the member's descriptive name; renaming during resume is rejected. It starts a new process against the same native Pi session file. It does not reconstruct a transcript, reconnect to old stdio, or replay the previous assignment automatically. The coordinator refuses tool-driven resume if the old process is live or its identity is uncertain.
|
|
51
|
+
|
|
52
|
+
The interactive panel can instead quietly resume a saved member session without inventing a new brief. Feedback then arrives through the durable team mailbox.
|
|
53
|
+
|
|
54
|
+
Root session switching, forking, and tree traversal are blocked while members are live. A member cannot switch away from its team binding. Stop members explicitly before replacing the root session.
|
|
55
|
+
|
|
56
|
+
### Exit confirmation needs a Pi hook
|
|
57
|
+
|
|
58
|
+
Exit confirmation requires Pi's `session_before_exit` hook. The prerequisite is implemented in the separate local Pi checkout described in [the implementation history](implementation-plan.md#exit-confirmation-supported-hook-versus-package-interception), not in installed Pi 1.4.0.
|
|
59
|
+
|
|
60
|
+
With that hook, native exit asks before stopping live members; cancellation leaves them running. Without it, shutdown performs cleanup but cannot ask first. Signals bypass confirmation.
|
|
61
|
+
|
|
62
|
+
### Crash recovery is best effort
|
|
63
|
+
|
|
64
|
+
If the root crashes, closing its owned pipes and losing the coordinator connection makes ordinary RPC children shut down. Native members also monitor the authenticated coordinator connection and exit after it is lost. This passed SIGTERM and SIGKILL probes with native child and grandchild processes.
|
|
65
|
+
|
|
66
|
+
It is not a guarantee against a hung event loop, machine failure, or detached shell processes. Recovery refuses duplicate work when a previous member is still live or uncertain. Tasks keep their ownership and progress after stop or crash; there is no automatic reassignment.
|
|
67
|
+
|
|
68
|
+
## Worktree cleanup is explicit
|
|
69
|
+
|
|
70
|
+
Set `worktree: true` on launch. `base` defaults to the repository's HEAD; `target` records the branch/ref against which later cleanup must prove integration. Worktrees live under a sibling `.ac-teams-worktrees` directory. No fetch, merge, stash, or checkout of the original directory occurs.
|
|
71
|
+
|
|
72
|
+
Stopping never deletes a worktree. `cleanup` requires a stopped member, a clean tree including ignored/untracked files, and HEAD ancestry proven against the recorded target's current commit.
|
|
73
|
+
|
|
74
|
+
Missing targets, dirty work, and uncertain/squashed integration retain the tree. Cleanup never forces removal and retains the branch. Cleanups and resumes exclude each other.
|
|
75
|
+
|
|
76
|
+
## Local records contain sensitive project data
|
|
77
|
+
|
|
78
|
+
Each root session uses `~/.acstack/ac-teams/teams/<session-id>/`:
|
|
79
|
+
|
|
80
|
+
- `state.json` contains membership, policy, tasks, messages, claims, and notification cursors
|
|
81
|
+
- `sessions/` contains native Pi-managed member transcripts
|
|
82
|
+
- `owner.lock` and `coordinator.sock` coordinate the running root
|
|
83
|
+
- Interactive teams also own `t.sock`, the private tmux socket, and per-member terminal environment files; shutdown removes those files
|
|
84
|
+
|
|
85
|
+
New members also store their descriptive names and optional model/context reports. When an existing team opens, unnamed members receive stable, collision-free names such as `teammate-1`; their IDs and sessions do not change.
|
|
86
|
+
|
|
87
|
+
State schema 3 adds stable task numbers and short labels. Opening a schema 1 or 2 team assigns numbers in stored task order and initial labels from up to three title words. Full titles, descriptions, UUIDs, owners, creators, dependencies, and revisions remain unchanged.
|
|
88
|
+
|
|
89
|
+
Schema 1 also migrates progress: `pending` becomes `todo`, `claimed` becomes `in_progress`, and `completed` becomes `done`. Migration writes atomically and rejects invalid snapshots without replacement. Older ac-teams code cannot reopen schema 3; stop old sessions before updating.
|
|
90
|
+
|
|
91
|
+
Only the root writes state. Mutations validate a copy, flush a temporary snapshot, atomically rename it, and flush the directory before returning success. An exclusive process-identity lock prevents concurrent owners. Private team directories use 0700; state files and the authenticated Unix socket use 0600. Uncertain locks fail closed.
|
|
92
|
+
|
|
93
|
+
This is a small-team store: each mutation rewrites the snapshot, and search scans local history. There is no database, compaction, retention policy, automatic deletion, or deduplication of repeated mutation requests. Inspect state before retrying an ambiguous failed request.
|
|
94
|
+
|
|
95
|
+
Records and transcripts can contain sensitive project data. Permissions protect against other users, not agents running as the same OS user. All members can read all team messages, including direct messages.
|
|
96
|
+
|
|
97
|
+
### Pi dependency advisory
|
|
98
|
+
|
|
99
|
+
The local verification recorded on 2026-10-24 found that `npm audit` reports Pi 1.4.0's pinned `undici` dependency, including a high-severity advisory. ac-teams adds no HTTP client and cannot repair an existing host installation. The suggested npm fix downgrades Pi incompatibly; it has not been applied. Review the host dependency before deployment.
|
|
100
|
+
|
|
101
|
+
[Back to README](../README.md)
|
package/docs/usage.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Use ac-teams
|
|
2
|
+
|
|
3
|
+
ac-teams provides three tools without prescribing a workflow. Your Pi session is the root; its child agents are members. The root opens coordination state on the first team request.
|
|
4
|
+
|
|
5
|
+
| Tool | Actions | Main rule |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `team_agent` | `launch`, `list`, `status`, `stop`, `resume`, `limits`, `cleanup` | A parent controls its descendants, not peers or ancestors |
|
|
8
|
+
| `team_task` | `create`, `list`, `read`, `edit`, `claim`, `start`, `release`, `complete`, `reopen` | Claim reserves work; dependencies gate starting, not ownership |
|
|
9
|
+
| `team_message` | `send`, `history`, `search` | Recipients select who receives notification, not who can read |
|
|
10
|
+
|
|
11
|
+
In interactive Pi, `/teams` or `/teams panel` opens the team panel. `/teams teammate <name-or-id>` opens a live teammate directly; autocomplete suggests subcommands and teammate names. You can also enter an exact teammate ID. The older `/teams open <id>` form remains supported. Headless roots retain the status listing. `/teams stop` stops every descendant. See [operations](operations.md) for limits, recovery, and worktree cleanup.
|
|
12
|
+
|
|
13
|
+
## Navigate without stopping members
|
|
14
|
+
|
|
15
|
+
The agent selector sits below Pi's status lines. It shows each member's name, state, model display name, and context usage. It keeps Main pinned and shows at most five rows, including an overflow indicator when needed. A finished assignment leaves its member idle and selectable.
|
|
16
|
+
|
|
17
|
+
Context shows Pi's reported token estimate, window size, and percentage, for example `Claude Opus 4.6 · 48k / 200k (24%)`. Reports refresh about once a second when they change. Unknown usage stays marked unknown, not zero. Stopped members retain their last report. These are context estimates, not billing totals.
|
|
18
|
+
|
|
19
|
+
- Press Down from an empty editor to focus Main in the footer. Up/Down select members; Enter opens the selected live session; Esc returns to editing.
|
|
20
|
+
- Ctrl+Shift+Left returns from a member to Main. Switching preserves the member's process, session, and draft. Returning does not stop it.
|
|
21
|
+
- `/teams` opens three tabs. Tab moves between Tasks, Teammates, and Activity; Esc closes the panel.
|
|
22
|
+
- **Tasks:** Arrow keys select nodes in the dependency graph. G toggles graph/list, and Enter shows full details. Green means Done, red Blocked, cyan Working, and neutral Ready; written labels remain visible. Large or unsupported graphs fall back to the list.
|
|
23
|
+
- **Teammates:** Enter opens a live member, or quietly resumes a stopped member's saved session before opening it. Root can open any member; member views can open their descendants.
|
|
24
|
+
- **Activity:** Shows the latest 100 persistent team messages rather than every tool update. Use `team_message history` to read older messages.
|
|
25
|
+
- N composes a task request for Main. C on a task sends feedback to its creator. Enter sends; Shift+Enter adds a newline; Esc cancels without losing the draft. These messages do not directly edit the task graph. Feedback resumes a stopped creator when possible; otherwise, the receipt explicitly reports delivery to Main instead.
|
|
26
|
+
|
|
27
|
+
A task request is a proposal, not an instruction to create a task. Main receives guidance to review the agreed scope and existing work first: reuse a task that already covers the request, extend one when coherent and permitted, or create distinct in-scope work. It should clarify unresolved scope conflicts and explain its decision with task references.
|
|
28
|
+
|
|
29
|
+
The send receipt confirms delivery, not acceptance or task creation. This is agent guidance, not an automatic semantic duplicate detector.
|
|
30
|
+
|
|
31
|
+
Team tool results and messages are compact by default. Ctrl+O expands them into labeled fields. UI state colors do not replace the underlying progress, ownership, or dependency fields.
|
|
32
|
+
|
|
33
|
+
## Show tasks and configure the displays
|
|
34
|
+
|
|
35
|
+
The task summary sits above the input editor; the agent selector stays below the status lines. It shows completed/total counts and up to five numbered task labels, ordered by:
|
|
36
|
+
|
|
37
|
+
1. In-progress work
|
|
38
|
+
2. Ready prerequisites blocking other tasks, with the most dependents first
|
|
39
|
+
3. Blocked work, marked `⊘` with prerequisite numbers such as `blocked by #3`
|
|
40
|
+
4. Recently completed work, newest first
|
|
41
|
+
|
|
42
|
+
Ordinary ready tasks remain in `/teams`; the summary is not the full task list. Completion time determines recent order for newly completed tasks. Older completed tasks without timestamps fall back to task-number order.
|
|
43
|
+
|
|
44
|
+
Use `/teams config` to toggle **Task summary** and **Agent selector** independently. Up/Down select a setting; Space or Enter toggles it; Esc closes. Changes save immediately for the current and future sessions. Other running sessions are not updated automatically. Both displays default to On.
|
|
45
|
+
|
|
46
|
+
Hiding a display does not stop agents, change tasks, or disable `/teams`. With the agent selector hidden, ordinary editor Down behavior returns. These global display preferences do not change the team's resource ceilings.
|
|
47
|
+
|
|
48
|
+
## Give members bounded assignments
|
|
49
|
+
|
|
50
|
+
Example `team_agent` arguments:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{"action":"launch","name":"parser-review","brief":"Review src/parser.ts. Read only; do not delegate or edit. Send findings to root through team_message."}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Every launch needs a unique descriptive `name`: one or two lowercase words, hyphenated if two, at most 40 characters. For example, `parser-review` or `research`. `main`, `root`, and names matching an existing member's ID are reserved. Names remain stable across stop/resume; IDs remain the API references.
|
|
57
|
+
|
|
58
|
+
`cwd` defaults to the requesting member's directory. `model` (`provider/model`) and `thinking` default to that member's current selection. An explicit override wins. Native Pi selects the model; provider/account rejections remain visible in member status and notify the parent. There is no automatic model retry.
|
|
59
|
+
|
|
60
|
+
Launch returns the name, a stable member ID, PID, cwd, and native session ID/path. Interactive roots launch native Pi terminals in a team-private tmux server; headless roots keep the RPC transport. Finishing a turn makes the member idle only after Pi reports `agent_settled`. It does not stop the process.
|
|
61
|
+
|
|
62
|
+
Children load ac-teams explicitly and otherwise keep normal Pi extensions, skills, authentication, and cwd instructions. They receive their brief, not the parent's conversation. Load ac-teams only once in the root, either through Pi package settings or an explicit extension path.
|
|
63
|
+
|
|
64
|
+
Children can delegate through the same coordinator, subject to depth and capacity. Delegation still needs user authorization. Keep briefs bounded, agree on file ownership, and use separate worktrees for concurrent writers.
|
|
65
|
+
|
|
66
|
+
## Track progress separately from ownership
|
|
67
|
+
|
|
68
|
+
Example `team_task` arguments:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{"action":"create","label":"Parser review","title":"Review parser errors and malformed input","description":"Check malformed input and report concrete failures; no edits."}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Each task has a stable team-local `number` and a 1–3-word `label` (at most 60 characters). The graph and list show `#3 Parser review`; details retain the full title, description, and UUID.
|
|
75
|
+
|
|
76
|
+
Numbers follow creation order. Editing, filtering, or reopening tasks never changes their numbers. A concise title can supply an omitted label; longer titles need an explicit label.
|
|
77
|
+
|
|
78
|
+
Interim and final goals are ordinary tasks. Use dependencies for real prerequisites, not to make the diagram connected. Independent tasks remain disconnected until they genuinely contribute to a dependent task.
|
|
79
|
+
|
|
80
|
+
Progress and ownership remain separate:
|
|
81
|
+
|
|
82
|
+
- **Progress:** `status` is `todo`, `in_progress`, or `done`
|
|
83
|
+
- **Ownership:** `owner` is one member ID, or absent
|
|
84
|
+
- **Dependencies:** `dependencies` lists prerequisite task IDs. Returned `blockedBy` lists those not yet done; the coordinator calculates it rather than storing it as a status.
|
|
85
|
+
|
|
86
|
+
Use the returned task ID with these actions:
|
|
87
|
+
|
|
88
|
+
| Action | Effect |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `claim` | Reserve an unowned to-do task, even if blocked. Progress stays `todo`. |
|
|
91
|
+
| `start` | The owner moves `todo` to `in_progress`, only when every dependency is `done`. |
|
|
92
|
+
| `complete` | The owner moves `in_progress` to `done`, with `acceptance: true`. Ownership remains. |
|
|
93
|
+
| `release` | Clear ownership. In-progress work returns to `todo`; done work stays `done`. |
|
|
94
|
+
| `reopen` | Explicitly move `done` to `todo`, retaining any owner. Refuse if a dependent is in progress or done. |
|
|
95
|
+
|
|
96
|
+
Only the owner can start, complete, or release its work. An ancestor may explicitly release a stopped or interrupted descendant's ownership. The owner or root can reopen an owned task; any member can reopen an unowned one. Done tasks cannot be claimed until reopened.
|
|
97
|
+
|
|
98
|
+
Include `dependencies` on creation or `edit`. Any member can edit unowned to-do work; only the owner can edit reserved to-do work. In-progress and done tasks cannot be edited. The coordinator rejects unknown dependencies and cycles. An optional `revision` rejects stale mutations.
|
|
99
|
+
|
|
100
|
+
`acceptance: true` asserts that the agent checked the acceptance criteria; it is not an independent test runner. Stop/crash retains ownership and progress. There is no automatic reassignment.
|
|
101
|
+
|
|
102
|
+
## Send messages instead of polling
|
|
103
|
+
|
|
104
|
+
Example `team_message` arguments:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{"action":"send","recipients":["root"],"text":"Parser review complete. No edits; two malformed-input cases need tests."}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Omit `recipients` to notify all other live members. Explicit sets must contain unique live member IDs; an invalid set rejects the whole send. All team members can read the full history, including direct messages.
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{"action":"history","after":0,"limit":20}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Use the last returned `seq` as the next `after` cursor. `search` adds a case-sensitive literal `query`; results remain cursor-paged. Reads never consume messages. Task and message result pages are limited to 100 items.
|
|
117
|
+
|
|
118
|
+
New messages queue a compact Pi follow-up: an idle member wakes, while a busy member finishes its current work first. Notifications batch for 50 ms and reference history rather than copying every message into context. Notification acknowledgement means queued, not read or acted on.
|
|
119
|
+
|
|
120
|
+
Messages survive crashes; exactly-once delivery or model execution does not. Avoid acknowledgement-only replies.
|
|
121
|
+
|
|
122
|
+
## Companion tools add guidance or terminal management
|
|
123
|
+
|
|
124
|
+
ac-teams works alone. ACStack adds planning, review, and shipping skills; Herdr adds terminal tabs, panes, and visible root sessions. These are companion capabilities, not automatic integrations. ac-teams does not open a Herdr pane for each member. Interactive members use a team-private tmux server and open in the current terminal when selected; headless roots use RPC members.
|
|
125
|
+
|
|
126
|
+
Other delegation tools can coexist. ac-teams warns when `Agent`, `SubagentWorkflow`, or `subagent` is active, but does not disable them. Its limits cover only members launched through `team_agent`. Use Pi's resource settings to disable other launchers if you want one team authority. Shell access and same-user extensions are not sandboxed.
|
|
127
|
+
|
|
128
|
+
[Back to README](../README.md)
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ac-teams",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Small, persistent teams for Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": { "type": "git", "url": "git+https://github.com/ac8318740/ac-teams.git" },
|
|
8
|
-
"files": ["src", "README.md", "LICENSE", "docs
|
|
8
|
+
"files": ["src", "README.md", "LICENSE", "docs"],
|
|
9
9
|
"os": ["linux"],
|
|
10
10
|
"pi": { "extensions": ["./src/index.ts"] },
|
|
11
11
|
"scripts": {
|
|
@@ -22,5 +22,8 @@
|
|
|
22
22
|
"@types/node": "^22.0.0",
|
|
23
23
|
"typebox": "^1.0.0",
|
|
24
24
|
"typescript": "^5.9.0"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"grok-mermaid": "0.2.3"
|
|
25
28
|
}
|
|
26
29
|
}
|