@team-agent/installer 0.5.71 → 0.5.73

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.
Files changed (32) hide show
  1. package/Cargo.lock +1 -1
  2. package/Cargo.toml +1 -1
  3. package/crates/team-agent/src/cli/adapters.rs +107 -9
  4. package/crates/team-agent/src/cli/emit.rs +35 -5
  5. package/crates/team-agent/src/cli/mod.rs +78 -7
  6. package/crates/team-agent/src/cli/models.rs +443 -0
  7. package/crates/team-agent/src/cli/spec.rs +4 -1
  8. package/crates/team-agent/src/cli/types.rs +8 -0
  9. package/crates/team-agent/src/compiler.rs +157 -0
  10. package/crates/team-agent/src/leader/owner_bind.rs +21 -0
  11. package/crates/team-agent/src/leader/provider_attribution.rs +25 -0
  12. package/crates/team-agent/src/leader/registry.rs +25 -1
  13. package/crates/team-agent/src/leader/start.rs +41 -9
  14. package/crates/team-agent/src/lifecycle/launch/add_agent.rs +169 -10
  15. package/crates/team-agent/src/lifecycle/launch/pi_mcp.rs +119 -9
  16. package/crates/team-agent/src/lifecycle/launch/quick_start.rs +859 -12
  17. package/crates/team-agent/src/lifecycle/launch/spawn.rs +1 -0
  18. package/crates/team-agent/src/lifecycle/restart/common.rs +1 -0
  19. package/crates/team-agent/src/lifecycle/tests/lane_ops.rs +168 -0
  20. package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +209 -0
  21. package/crates/team-agent/src/lifecycle/tests/pi_catalog_red.rs +1 -1
  22. package/crates/team-agent/src/lifecycle/tests/pi_command_red.rs +71 -1
  23. package/crates/team-agent/src/lifecycle/tests/pi_compiler_red.rs +3 -1
  24. package/crates/team-agent/src/lifecycle/tests/pi_executable_mcp_red.rs +396 -3
  25. package/crates/team-agent/src/lifecycle/tests/pi_session_delivery_red.rs +3 -1
  26. package/crates/team-agent/src/lifecycle/types.rs +8 -0
  27. package/crates/team-agent/src/provider/adapters/pi.rs +12 -6
  28. package/npm/check-skill-links.mjs +88 -0
  29. package/package.json +5 -4
  30. package/skills/team-agent/SKILL.md +15 -49
  31. package/skills/team-agent/command-coverage.json +8 -1
  32. package/skills/team-agent/references/team-agent-operator.md +665 -0
@@ -2,14 +2,14 @@
2
2
  name: team-agent
3
3
  description: Use only when the user explicitly asks to start, operate, inspect, shutdown, or restart a Team Agent team. Treat the team-agent CLI as a sealed appliance.
4
4
  requires_team_agent: ">=0.5.0"
5
- last_verified_against: "0.5.71"
5
+ last_verified_against: "0.5.73"
6
6
  ---
7
7
 
8
8
  # Team Agent
9
9
 
10
- Sealed appliance for someone who just got the CLI. Operator handbook (permissions, models, routing, recovery): `docs/reference/team-agent-operator.md`.
10
+ Use this skill only for Team Agent operation. The detailed operator handbook (permissions, models, routing, and recovery) is in [the operator reference](references/team-agent-operator.md). Nested teams have a separate [nested-team reference](references/team-in-team.md).
11
11
 
12
- If `team-agent --version` does not match `last_verified_against`, do not copy examples as current truth. Learn from the live CLI:
12
+ If `team-agent --version` does not match `last_verified_against`, inspect the live CLI before copying examples:
13
13
 
14
14
  ```bash
15
15
  team-agent --version
@@ -17,55 +17,21 @@ team-agent --help
17
17
  team-agent doctor --help
18
18
  ```
19
19
 
20
- **Operate**
20
+ ## Pi TeamMate startup
21
21
 
22
- - Dispatch: `team-agent send TO MESSAGE` (positional TO; `--watch-result` is deprecated). After success, do not poll with `sleep` / `status` / `inbox` / `collect`.
23
- TO has two co-equal logical forms: an **in-team short name** (`team-agent send reviewer "..."`) and a fully qualified `<workspace>::<team>/<agent>`. Use the qualified form across workspaces.
24
- - Inspect: `team-agent status` / `status --json`. `ok: true` plus `ready: false` is not a crash.
25
- - Lifecycle: `restart .` resumes a stopped team; `add-agent NAME --role-file FILE` adds or `--force` recreates one worker; `shutdown --workspace .` stops. Do not shutdown the whole team to add a worker.
26
- - Roles: every `agents/*.md` must declare boolean `dangerously_skip_permissions`. Never rewrite a user-supplied model id. Never read `.env` files.
22
+ For a Pi worker, use this existing three-step flow:
27
23
 
28
- **On failure:** if the CLI prints a structured `action`, run that `action` first, then stop. Do not guess flags. `coordinator.session_missing` is a self-healing transient — re-check `status --json`; do not shutdown because of it.
24
+ 1. Discover exact model ids: `team-agent models --provider pi` (add `--search TEXT` when useful).
25
+ 2. Use the existing lifecycle command that matches the actual state: `team-agent quick-start` for a new team, `team-agent add-agent NAME --role-file FILE` for a new worker, or `team-agent start-agent NAME` for a missing worker.
26
+ 3. Send work through the canonical route: `team-agent send AGENT MESSAGE`.
29
27
 
30
- The current user-facing agent is the leader (orchestrate only). Workers call `report_result` exactly once. Nested teams: `skills/team-agent/references/team-in-team.md`.
28
+ Pi roles preserve the direct Pi login, model defaults, extensions/plugins, skills, context, trust, and tools. Team Agent adds only per-seat identity/session isolation. `model` and `effort` are optional explicit pass-throughs. Use the shared role schema, a block-style `tools` list containing `mcp_team`, and the required boolean `dangerously_skip_permissions`.
31
29
 
32
- ## Provider Capability Matrix
30
+ ## Operate
33
31
 
34
- Claude / Codex / Copilot / Gemini / fake: `docs/reference/team-agent-operator.md`. These two are in the runtime but were missing from that table:
32
+ - Send: `team-agent send TO MESSAGE` using an in-team short name or fully qualified `<workspace>::<team>/<agent>`; these are co-equal positional TO forms. For example, `team-agent send reviewer "..."` uses an in-team short name. Do not poll after success.
33
+ - Inspect: `team-agent status` or `team-agent status --json`; `ok: true` with `ready: false` is not a crash.
34
+ - On a structured failure with an `action`, run that action first, then stop. Never guess flags.
35
+ - Never rewrite a user-supplied model id or read `.env` files.
35
36
 
36
- | Provider | Resume | Turn-state detection | Per-worker model override | Native session fork |
37
- |---|---|---|---|---|
38
- | `grok` | yes (`--resume <id>`, archive-gated) | no | yes (role `model` required) | yes (`--fork-session` + new `--session-id`) |
39
- | `cursor_agent` | yes (argv `--resume <chatId>`, archive-gated) | no | required on role; same-family catalog id can take effect; unknown id silent-fallback; pane chrome ≠ proven live | **no — `CapabilityUnsupported`** |
40
-
41
- Grok / `cursor_agent` have no JSONL turn-state reader (classify → Unknown).
42
-
43
- ## Provider Prep
44
-
45
- ### Pi TeamMate roles
46
-
47
- Use the standard role schema with `provider: pi`, a block-style `tools` list containing `mcp_team`, and the required boolean `dangerously_skip_permissions`. That role boolean is the only bypass setting; `TEAM.md` `dangerous_auto_approve` is compatibility input, not a second user-facing switch.
48
-
49
- Pi TeamMates keep the same login, model, extensions/plugins, skills, context files, project trust, and tools as a direct `pi` run on that machine. Team Agent only appends the role contract, a per-seat Team MCP registration, and per-seat session storage; do not duplicate those direct Pi settings in the role. `model` and `effort` remain optional compatibility overrides, and explicit values are passed through.
50
-
51
- ### Cursor provider notes
52
-
53
- Frontmatter: `provider: cursor_agent` (not `cursor`; launcher verb is `team-agent cursor`), `auth_mode: subscription`, `name:` required (omit → `missing front matter field name`). Also required: `role:`, `tools:`, `dangerously_skip_permissions:` (bool). Subscription needs no `profile`.
54
-
55
- `model:` is required (omit compile-fails; blocks a silent builtin `sonnet-4-thinking`). The flag stays on argv. Same-family catalog ids can change pane chrome. An id not in that provider's catalog silent-falls back (landing not stable; no events/stderr/pane warning). Pick names from the catalog; after spawn, `capture-pane` once for chrome. Do not treat the role field or pane chrome as proof of the live model.
56
-
57
- One `cursor_agent` per **provider-config overlay** under `<workspace>/.team/runtime/provider-config/<id>/cursor`. Same workspace may run multiple cursor seats; each writes `TEAM_AGENT_ID` into that project's `.cursor/mcp.json`. Spawn points `--workspace` there and `--add-dir` at the real workspace. `HOME` stays the user home. If isolation is off or cannot be materialized, adding a second seat still fail-closes:
58
-
59
- ```
60
- error: cursor_agent seat already occupies this workspace
61
- reason: <workspace>/.cursor/mcp.json is directory-scoped; a second seat overwrites TEAM_AGENT_ID (last-writer)
62
- action: do not add another CursorAgent in this workspace until per-seat MCP identity is isolated
63
- ```
64
-
65
- Do not share `<workspace>/.cursor/mcp.json` for team_orchestrator identity. Same seat, fresh context → `reset-agent --discard-session`.
66
-
67
- `clone-agent` copies the source role (provider unchanged). Runtime add: `clone-agent` → `stop-agent` → `remove-agent --confirm` (deletes `.team/dynamic-role-files/`) → write the role file → `add-agent --role-file` → dispatch.
68
-
69
- - Restart emits `--resume <chatId>` when `store.db`/`meta.json` exist; the gate does not read chat text. Persist anything that must survive restart.
70
- - Delivery sends one Enter; a second Enter interrupts the turn.
71
- - After spawn, the pane footer should show `Cursor Agent v<version>`. Do not use `strings` to probe the binary.
37
+ Workers report completion through `mcp_team` and call `report_result` exactly once.
@@ -3,7 +3,7 @@
3
3
  "authority": {
4
4
  "kind": "normative_handbook_plus_live_help",
5
5
  "handbook": {
6
- "path": "docs/reference/team-agent-operator.md",
6
+ "path": "skills/team-agent/references/team-agent-operator.md",
7
7
  "start_marker": "<!-- command-coverage:normative-start -->",
8
8
  "end_marker": "<!-- command-coverage:normative-end -->"
9
9
  },
@@ -336,6 +336,13 @@
336
336
  "owner": "runtime-owner:messaging",
337
337
  "plan": "Execute the compact-skill positional send smoke with representative target and message tokens, then bind delivery truth."
338
338
  },
339
+ {
340
+ "command": "team-agent send AGENT MESSAGE",
341
+ "bucket": "declared_gap",
342
+ "covered": false,
343
+ "owner": "runtime-owner:messaging",
344
+ "plan": "Execute a representative positional send with explicit agent and message tokens, then bind recipient and delivery truth."
345
+ },
339
346
  {
340
347
  "command": "team-agent send reviewer \"...\"",
341
348
  "bucket": "declared_gap",