@team-agent/installer 0.3.6 → 0.3.8
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/Cargo.lock +1 -1
- package/Cargo.toml +1 -1
- package/crates/team-agent/src/cli/adapters.rs +52 -7
- package/crates/team-agent/src/cli/diagnose.rs +9 -0
- package/crates/team-agent/src/cli/emit.rs +175 -0
- package/crates/team-agent/src/cli/mod.rs +455 -63
- package/crates/team-agent/src/cli/status_port.rs +62 -0
- package/crates/team-agent/src/cli/tests/base.rs +9 -4
- package/crates/team-agent/src/cli/tests/missing_subcommands.rs +83 -1
- package/crates/team-agent/src/cli/tests/mod.rs +1 -0
- package/crates/team-agent/src/cli/tests/run_delegation.rs +10 -2
- package/crates/team-agent/src/cli/tests/shutdown_kill_plan.rs +86 -21
- package/crates/team-agent/src/cli/tests/verb_install_skill.rs +76 -0
- package/crates/team-agent/src/cli/types.rs +3 -2
- package/crates/team-agent/src/compiler.rs +73 -50
- package/crates/team-agent/src/coordinator/tick.rs +108 -20
- package/crates/team-agent/src/db/migration.rs +17 -1
- package/crates/team-agent/src/leader/owner_bind.rs +59 -20
- package/crates/team-agent/src/lifecycle/launch.rs +378 -56
- package/crates/team-agent/src/lifecycle/restart/common.rs +4 -9
- package/crates/team-agent/src/lifecycle/restart/rebuild.rs +91 -12
- package/crates/team-agent/src/lifecycle/restart/selection.rs +6 -4
- package/crates/team-agent/src/lifecycle/tests/core.rs +238 -3
- package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +257 -7
- package/crates/team-agent/src/lifecycle/types.rs +2 -0
- package/crates/team-agent/src/mcp_server/normalize.rs +29 -7
- package/crates/team-agent/src/mcp_server/tests/golden.rs +7 -5
- package/crates/team-agent/src/mcp_server/tests/normalize.rs +5 -2
- package/crates/team-agent/src/mcp_server/tools.rs +25 -1
- package/crates/team-agent/src/mcp_server/wire.rs +11 -1
- package/crates/team-agent/src/model/paths.rs +7 -0
- package/crates/team-agent/src/model/spec.rs +23 -1
- package/crates/team-agent/src/packaging/install.rs +42 -4
- package/crates/team-agent/src/packaging/tests.rs +91 -14
- package/crates/team-agent/src/packaging/types.rs +13 -1
- package/crates/team-agent/src/provider/adapter.rs +381 -15
- package/crates/team-agent/src/state/identity.rs +29 -0
- package/crates/team-agent/src/state/selector.rs +48 -14
- package/crates/team-agent/src/tmux_backend/tests.rs +44 -0
- package/crates/team-agent/src/tmux_backend.rs +104 -9
- package/crates/team-agent/src/transport/test_support.rs +57 -4
- package/crates/team-agent/src/transport.rs +13 -0
- package/npm/install.mjs +31 -35
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +82 -5
|
@@ -22,12 +22,12 @@ Pass provider flags after the provider name, for example `team-agent codex --dan
|
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
mkdir -p .team/current/agents
|
|
25
|
+
team-agent profile init codex-default --auth-mode subscription --workspace .
|
|
25
26
|
cat > .team/current/TEAM.md <<'EOF'
|
|
26
27
|
---
|
|
27
28
|
name: demo-team
|
|
28
29
|
objective: One worker handles bounded tasks and reports through Team Agent MCP.
|
|
29
30
|
dangerous_auto_approve: false
|
|
30
|
-
display_backend: ghostty_workspace
|
|
31
31
|
fast: false
|
|
32
32
|
provider_models:
|
|
33
33
|
codex: gpt-5.5
|
|
@@ -60,15 +60,58 @@ team-agent quick-start .team/current
|
|
|
60
60
|
|
|
61
61
|
YAML lists must be block style. Use `tools:\n - fs_read`; do not use `tools: [fs_read, mcp_team]`.
|
|
62
62
|
|
|
63
|
-
Display choices:
|
|
63
|
+
Display choices (set `display_backend:` in `TEAM.md` to opt in):
|
|
64
|
+
|
|
65
|
+
- `none` (default): headless / no GUI window manager. The team runs entirely in the per-workspace tmux server; this is what the demo above uses.
|
|
66
|
+
- `adaptive`: framework picks an available GUI layout for the local platform.
|
|
64
67
|
- `ghostty_workspace`: one Ghostty window. Workers are shown in tmux tabs/windows, up to 3 side-by-side panes per tab. Four workers become `3 + 1`; eight become `3 + 3 + 2`.
|
|
65
68
|
- `ghostty_window`: one Ghostty window per worker.
|
|
66
|
-
- `none`: headless/CI.
|
|
67
69
|
|
|
68
|
-
Omitting `display_backend` defaults to `
|
|
70
|
+
**Omitting `display_backend` defaults to `none`** (changed in 0.3.4). Set `display_backend: adaptive` (or one of the explicit ghostty variants) in `TEAM.md` only when the user wants GUI windows.
|
|
71
|
+
|
|
72
|
+
## Private Tmux Socket
|
|
73
|
+
|
|
74
|
+
Worker windows live on a private per-workspace tmux server, not the user's default socket. `tmux list-sessions` (no `-L`/`-S`) will not show them; that is expected, not a failure.
|
|
75
|
+
|
|
76
|
+
To attach manually, read `attach_commands` (or the `tmux` action printed near `ready:`) from `team-agent quick-start` / `team-agent restart` / `team-agent status --json` output. It is the canonical `tmux -L <socket-name> attach -t <session>` (or `-S <socket-path>`) line for the current team.
|
|
77
|
+
|
|
78
|
+
Use `team-agent attach-leader` / `team-agent claim-leader` to bind the leader pane to a team. Do not invent socket paths by hand.
|
|
79
|
+
|
|
80
|
+
## Provider Capability Matrix
|
|
81
|
+
|
|
82
|
+
| Provider | Resume | Turn-state detection | Per-worker model override | Native session fork |
|
|
83
|
+
|---|---|---|---|---|
|
|
84
|
+
| `claude` / `claude_code` | yes (`--resume <id>`, transcript-verified) | yes (JSONL stream) | yes (role `model` overrides `provider_models`) | yes (`--fork-session` + new `--session-id`) |
|
|
85
|
+
| `codex` | yes (`codex resume <id>`, session-store-verified) | yes (turn JSONL) | yes (role `model`) | yes (`codex fork`) |
|
|
86
|
+
| `copilot` | yes (`copilot --resume <id|name>`, sqlite `sessions` row) | not yet (phase 1: `provider.classify.unsupported` event) | yes (role `model`) | **no — `CapabilityUnsupported`** |
|
|
87
|
+
| `gemini_cli` | no | no | yes | no |
|
|
88
|
+
| `fake` (testing only) | no | no | n/a | no |
|
|
89
|
+
|
|
90
|
+
Notes:
|
|
91
|
+
- Per-worker model override means a role-doc `model:` value wins over `TEAM.md` `provider_models.<provider>`; subscription defaults still fill blanks.
|
|
92
|
+
- Copilot's `caps.fork=false` is a hard refusal in 0.3.7 — `team-agent fork-agent` against a Copilot worker returns a structured `CapabilityUnsupported` error instead of falling back to a fresh spawn (honest by design).
|
|
93
|
+
- Copilot phase-1 idle/turn detection is intentionally Unknown; tick emits a single explicit `provider.classify.unsupported` event per state change (P4 dedup), never a silent default.
|
|
69
94
|
|
|
70
95
|
## Provider Prep
|
|
71
96
|
|
|
97
|
+
### Subscription auth (Codex / Claude account login)
|
|
98
|
+
|
|
99
|
+
Before workers can use a subscription provider, create a named subscription profile in the workspace and reference it from role docs:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
team-agent profile init codex-default --auth-mode subscription --workspace .
|
|
103
|
+
team-agent profile init claude-default --auth-mode subscription --workspace .
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Then in `agents/<role>.md` frontmatter, set `auth_mode: subscription` and `profile: codex-default` (or `claude-default`). The demo above uses `profile: codex-default`; that name only works after `profile init` has created it in the same workspace.
|
|
107
|
+
|
|
108
|
+
Common errors:
|
|
109
|
+
|
|
110
|
+
- `profile already exists`: a profile by that name is already in `.team/current/profiles/`. Either reuse it (skip `init`) or pick a new name.
|
|
111
|
+
- `profile not found` during quick-start: the role doc references a profile that was never `profile init`-ed in this workspace. Run `team-agent profile init <name> --auth-mode subscription --workspace .` and retry.
|
|
112
|
+
|
|
113
|
+
### Codex provider notes
|
|
114
|
+
|
|
72
115
|
Codex: run `codex login` first. Optional `~/.codex/config.toml` profile:
|
|
73
116
|
|
|
74
117
|
```toml
|
|
@@ -133,7 +176,41 @@ For diagnosis, run `team-agent profile show deepseek --workspace . --json`; neve
|
|
|
133
176
|
|
|
134
177
|
Startup trust prompts are handled by the runtime/coordinator with bounded probes; do not wait on raw worker screens or manually press Enter for routine startup trust prompts.
|
|
135
178
|
|
|
136
|
-
Use `team-agent start-agent <agent_id> --workspace .` only as a narrow repair when one worker window is missing after launch/restart/display failure. It preserves the worker provider, resumes from `session_id` when available, starts fresh when there is no prior session id, and does not restart the rest of the team. If an existing session id cannot resume, it fails closed unless the user explicitly passes `--allow-fresh`.
|
|
179
|
+
Use `team-agent start-agent <agent_id> --workspace .` only as a narrow repair when one worker window is missing after launch/restart/display failure. It preserves the worker provider, resumes from `session_id` when available, starts fresh when there is no prior session id, and does not restart the rest of the team. If an existing session id cannot resume, it fails closed unless the user explicitly passes `--allow-fresh`.
|
|
180
|
+
|
|
181
|
+
## Adding A New Worker At Runtime
|
|
182
|
+
|
|
183
|
+
To add a new worker to a running team, write the role doc and run **one command** — do not shutdown/restart, do not regenerate the compiled spec, do not `quick-start --fresh`:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
cat > .team/current/agents/reviewer.md <<'EOF'
|
|
187
|
+
---
|
|
188
|
+
name: reviewer
|
|
189
|
+
role: Code Reviewer
|
|
190
|
+
provider: codex
|
|
191
|
+
auth_mode: subscription
|
|
192
|
+
profile: codex-default
|
|
193
|
+
tools:
|
|
194
|
+
- fs_read
|
|
195
|
+
- fs_list
|
|
196
|
+
- mcp_team
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
Review changed files and report findings to leader.
|
|
200
|
+
EOF
|
|
201
|
+
team-agent add-agent reviewer --role-file .team/current/agents/reviewer.md --workspace .
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
`add-agent` registers the new worker into the running team's state, launches its window on the existing tmux socket, and leaves every other worker untouched. **Do not shutdown/restart for adding a worker** — it loses every other worker's resumable session. If `add-agent` fails, surface the structured error to the user; do not fall back to shutdown.
|
|
205
|
+
|
|
206
|
+
Semantic distinction:
|
|
207
|
+
|
|
208
|
+
- `team-agent add-agent <agent> --role-file <file>` — add a **new** worker not yet in team state.
|
|
209
|
+
- `team-agent start-agent <agent>` — (re)launch a worker that **already exists** in team state but whose window is missing.
|
|
210
|
+
- `team-agent restart .` — resume a fully **stopped** team from stored worker sessions.
|
|
211
|
+
- `team-agent quick-start <dir>` — **fresh** team startup from role docs; `--fresh` is reserved for the user explicitly accepting brand-new blank worker contexts.
|
|
212
|
+
|
|
213
|
+
Removing a worker at runtime is the symmetric `team-agent remove-agent <agent> --workspace . --confirm`.
|
|
137
214
|
|
|
138
215
|
## Worker Protocol
|
|
139
216
|
|