@team-agent/installer 0.5.119 → 0.5.121
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/README.md +46 -1
- package/README.zh.md +46 -1
- package/crates/team-agent/src/cli/adapters.rs +11 -0
- package/crates/team-agent/src/cli/arguments.rs +401 -0
- package/crates/team-agent/src/cli/emit.rs +241 -142
- package/crates/team-agent/src/cli/intent/runtime.rs +1175 -0
- package/crates/team-agent/src/cli/intent/runtime_tests.rs +698 -0
- package/crates/team-agent/src/cli/intent/tests.rs +654 -0
- package/crates/team-agent/src/cli/intent.rs +642 -0
- package/crates/team-agent/src/cli/mod.rs +53 -6
- package/crates/team-agent/src/cli/named_address.rs +10 -1
- package/crates/team-agent/src/cli/spec.rs +22 -10
- package/crates/team-agent/src/cli/status_port/brief.rs +117 -16
- package/crates/team-agent/src/cli/tests/base.rs +6 -1
- package/crates/team-agent/src/cli/tests/parser_safety.rs +383 -0
- package/crates/team-agent/src/cli/tests/run_delegation.rs +63 -19
- package/crates/team-agent/src/cli/tests/shutdown_kill_plan.rs +56 -0
- package/crates/team-agent/src/cli/tests/verb_install_skill.rs +3 -2
- package/crates/team-agent/src/cli/tests/verb_profile.rs +3 -1
- package/crates/team-agent/src/contract_runtime/backend.rs +1 -1
- package/crates/team-agent/src/db/message_store.rs +65 -0
- package/crates/team-agent/src/lifecycle/launch/agent_state.rs +8 -0
- package/crates/team-agent/src/lifecycle/launch/cursor_mcp.rs +111 -4
- package/crates/team-agent/src/lifecycle/launch/cursor_mcp_iso.rs +244 -82
- package/crates/team-agent/src/lifecycle/launch/quick_start.rs +166 -77
- package/crates/team-agent/src/lifecycle/launch.rs +29 -0
- package/crates/team-agent/src/lifecycle/restart/common.rs +7 -1
- package/crates/team-agent/src/lifecycle/restart.rs +17 -0
- package/crates/team-agent/src/lifecycle/tests/acceptance_b_batch_red.rs +1 -3
- package/crates/team-agent/src/lifecycle/tests/behavioral_diff_264_red.rs +5 -15
- package/crates/team-agent/src/lifecycle/tests/claude_compatible_config_red.rs +2 -3
- package/crates/team-agent/src/lifecycle/tests/claude_profile_launch_red.rs +2 -3
- package/crates/team-agent/src/lifecycle/tests/cli_argv_routing_red.rs +10 -2
- package/crates/team-agent/src/lifecycle/tests/clone_agent_preserves_source_tools.rs +8 -1
- package/crates/team-agent/src/lifecycle/tests/clone_fork_copilot_perms_red.rs +3 -2
- package/crates/team-agent/src/lifecycle/tests/communication_mode_runtime_contract_red.rs +6 -9
- package/crates/team-agent/src/lifecycle/tests/copilot_provider_red.rs +7 -5
- package/crates/team-agent/src/lifecycle/tests/cursor_mcp_overlay.rs +64 -19
- package/crates/team-agent/src/lifecycle/tests/cursor_require_explicit_model_red.rs +5 -2
- package/crates/team-agent/src/lifecycle/tests/cursor_restart_resume_red.rs +34 -10
- package/crates/team-agent/src/lifecycle/tests/grok_effort_argv_red.rs +2 -4
- package/crates/team-agent/src/lifecycle/tests/grok_mcp_overlay_red.rs +3 -4
- package/crates/team-agent/src/lifecycle/tests/grok_require_explicit_model_red.rs +5 -4
- package/crates/team-agent/src/lifecycle/tests/grok_restart_resume_red.rs +2 -4
- package/crates/team-agent/src/lifecycle/tests/launch_spawn.rs +78 -36
- package/crates/team-agent/src/lifecycle/tests/phase_b_contracts.rs +8 -4
- package/crates/team-agent/src/lifecycle/tests/phase_golden.rs +6 -12
- package/crates/team-agent/src/lifecycle/tests/pi_fork_session_inheritance_red.rs +4 -0
- package/crates/team-agent/src/lifecycle/tests/startup_latency_contract.rs +1 -3
- package/crates/team-agent/src/lifecycle/tests/status_credential_redaction_contract.rs +7 -0
- package/crates/team-agent/src/lifecycle/tests/subprep_codex_trust_roundtrip_red.rs +47 -4
- package/crates/team-agent/src/lifecycle/tests/team_in_team_identity_scope_red.rs +1 -3
- package/crates/team-agent/src/lifecycle/tests/verify_rs031_window_consistency_red.rs +2 -1
- package/crates/team-agent/src/lifecycle/types.rs +10 -0
- package/crates/team-agent/src/mcp_server/mod.rs +2 -0
- package/crates/team-agent/src/mcp_server/readiness.rs +432 -0
- package/crates/team-agent/src/mcp_server/readiness_tests.rs +242 -0
- package/crates/team-agent/src/mcp_server/wire.rs +96 -11
- package/crates/team-agent/src/messaging/delivery.rs +62 -0
- package/crates/team-agent/src/messaging/tests/dup_inject.rs +41 -1
- package/crates/team-agent/src/provider/adapter.rs +7 -0
- package/crates/team-agent/src/tmux_backend/tests.rs +37 -0
- package/crates/team-agent/src/tmux_backend.rs +8 -1
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +71 -54
- package/skills/team-agent/command-coverage.json +283 -13
- package/skills/team-agent/docs/reference/team-agent-operator.md +220 -0
- package/skills/team-agent/references/bug-as-artifact-flow.md +1 -1
- package/skills/team-agent/references/recovery-runbook.md +61 -212
- package/skills/team-agent/references/team-agent-operator.md +181 -48
- package/skills/team-agent/references/team-in-team.md +47 -80
|
@@ -1,106 +1,73 @@
|
|
|
1
|
-
# Team-
|
|
2
|
-
|
|
3
|
-
This reference is for explicitly requested nested Team Agent teams. Use it only when the user or leader asks a worker to create or operate a child team. For normal work, a worker should stay inside its parent team and report through `team_orchestrator`.
|
|
4
|
-
|
|
5
|
-
## Safety Rules
|
|
6
|
-
|
|
7
|
-
- Use the Team Agent framework skill and `team-agent` CLI. Do not use a provider's built-in agent-team feature when the user asked for Team Agent.
|
|
8
|
-
- Never create a child team in the parent team's `.team/current` directory.
|
|
9
|
-
- Never edit, delete, or reuse files under the parent team's `.team/current`.
|
|
10
|
-
- Never shut down a team just because `.team/current` is already occupied. In a nested setup, that is probably the parent team; shutting it down can kill the main node.
|
|
11
|
-
- A child team needs its own workspace directory. The role-doc directory is not the child workspace.
|
|
12
|
-
- The MCP surface is exactly `send_message`, `report_result`, and optional `get_team_status`; it is team-scoped. A worker must not try to widen `send_message` to another team. Lifecycle management uses the authorized native CLI.
|
|
13
|
-
|
|
14
|
-
## Child Workspace
|
|
15
|
-
|
|
16
|
-
Pick an independent directory before writing `TEAM.md` or agent role docs. A safe default is a child workspace under the parent workspace, but outside the parent `.team/current`:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
PARENT_WORKSPACE="$PWD"
|
|
20
|
-
case "$PARENT_WORKSPACE" in
|
|
21
|
-
*/.team/current|*/.team/current/*)
|
|
22
|
-
echo "Refusing to create a child team from parent .team/current; cd to the parent workspace root first." >&2
|
|
23
|
-
exit 1
|
|
24
|
-
;;
|
|
25
|
-
esac
|
|
26
|
-
CHILD_TEAM="child-review-team"
|
|
27
|
-
CHILD_WORKSPACE="$PARENT_WORKSPACE/.team/children/review-$(date +%Y%m%d%H%M%S)"
|
|
28
|
-
mkdir -p "$CHILD_WORKSPACE"
|
|
29
|
-
cd "$CHILD_WORKSPACE"
|
|
30
|
-
mkdir -p .team/current/agents
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Then create the child team's files inside the child workspace:
|
|
1
|
+
# Team-in-team reference
|
|
34
2
|
|
|
35
|
-
|
|
36
|
-
cat > .team/current/TEAM.md <<'EOF'
|
|
37
|
-
A bounded child team for reviewing the requested files and reporting findings.
|
|
38
|
-
EOF
|
|
3
|
+
Use only when the user/Leader explicitly authorizes a child Team Agent team. Ordinary workers stay in their parent team and report through their three team-scoped MCP tools. A provider's built-in team feature is not a substitute for Team Agent.
|
|
39
4
|
|
|
40
|
-
|
|
41
|
-
# Independent Reviewer
|
|
5
|
+
## Protect the parent
|
|
42
6
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
7
|
+
- Never create, reuse, edit or delete the parent team's `.team/current` as a child workspace.
|
|
8
|
+
- Choose an independent child workspace before writing TEAM/role files. The role directory is not the workspace.
|
|
9
|
+
- Never stop the parent because a name, session or directory already exists. Treat collisions as scope/refusal evidence.
|
|
10
|
+
- Loading a skill or receiving a task does not change caller authority. If original native caller admission refuses creation, preserve the receipt and ask the authorized Leader to bootstrap; do not spoof or clear CALLER/Leader identity, claim another pane, or copy authentication.
|
|
11
|
+
- MCP remains team-scoped: `send_message`, `report_result`, optional `get_team_status`. Lifecycle stays on the separately authorized public CLI.
|
|
46
12
|
|
|
47
|
-
|
|
48
|
-
```
|
|
13
|
+
## Create the child through start
|
|
49
14
|
|
|
50
|
-
|
|
15
|
+
The following paths are placeholders for a new, explicitly authorized workspace, not a command to reuse a live team:
|
|
51
16
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
17
|
+
```sh
|
|
18
|
+
CHILD_WORKSPACE=/absolute/new/child-workspace
|
|
19
|
+
CHILD_TEAM=child-review-team
|
|
20
|
+
mkdir -p "$CHILD_WORKSPACE/.team/current/agents"
|
|
21
|
+
```
|
|
55
22
|
|
|
56
|
-
|
|
57
|
-
- Child team: the same worker talks downward with `team-agent send --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM" ...`.
|
|
23
|
+
Write a bounded goal in `$CHILD_WORKSPACE/.team/current/TEAM.md` and complete roles in its `agents/`. Record the user's provider and boolean bypass decisions; use the main skill's role format. Do not infer Pi/bypass or create roles from a parent's private configuration.
|
|
58
24
|
|
|
59
|
-
|
|
25
|
+
From an admitted native Leader context:
|
|
60
26
|
|
|
61
|
-
|
|
27
|
+
```sh
|
|
28
|
+
team-agent start --from "$CHILD_WORKSPACE/.team/current" \
|
|
29
|
+
--workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM"
|
|
30
|
+
team-agent team status --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM" --json
|
|
31
|
+
```
|
|
62
32
|
|
|
63
|
-
|
|
33
|
+
Start creates a genuinely uninitialized complete team once. Later start can wake stopped non-paused members or prove a live no-op; it is not repair/reset and does not prove business readiness. Resolve unknown scope, drift, conflicting state or caller refusal instead of switching to an old creation command or deleting runtime files.
|
|
64
34
|
|
|
65
|
-
Parent
|
|
35
|
+
## Parent-child messages are two-hop
|
|
66
36
|
|
|
67
|
-
|
|
68
|
-
|
|
37
|
+
The parent worker may act as child Leader only within explicitly delegated authority. Keep the bindings separate:
|
|
38
|
+
1. Parent Leader instructs the parent worker through the parent team's MCP.
|
|
39
|
+
2. The admitted child Leader sends into the child using explicit workspace/team:
|
|
69
40
|
|
|
70
|
-
```
|
|
71
|
-
team-agent send reviewer "Review
|
|
72
|
-
--workspace "$CHILD_WORKSPACE"
|
|
73
|
-
|
|
74
|
-
--watch-result
|
|
41
|
+
```sh
|
|
42
|
+
team-agent send reviewer "Review the requested files and report findings" \
|
|
43
|
+
--workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM"
|
|
44
|
+
team-agent inbox leader --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM" -n 3
|
|
75
45
|
```
|
|
76
46
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
1. Child worker reports to its child leader:
|
|
47
|
+
Accepted/queued is not the child's answer. A child worker reports using its own logical MCP tools:
|
|
80
48
|
|
|
81
49
|
```text
|
|
82
|
-
|
|
83
|
-
|
|
50
|
+
send_message(to="leader", content="short progress")
|
|
51
|
+
report_result(summary="short completion")
|
|
84
52
|
```
|
|
85
53
|
|
|
86
|
-
|
|
54
|
+
3. The parent worker relays the actual result upward with its **parent** MCP tools. Do not tell a child worker to address parent IDs directly or widen its MCP scope. Cross-team CLI scope selection is not a worker privilege escalation shortcut.
|
|
87
55
|
|
|
88
|
-
|
|
56
|
+
## Manage and finish only the child
|
|
89
57
|
|
|
90
|
-
|
|
58
|
+
```sh
|
|
59
|
+
team-agent stop reviewer --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM"
|
|
60
|
+
team-agent start reviewer --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM"
|
|
61
|
+
team-agent team restart --session preserve --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM"
|
|
62
|
+
team-agent stop --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM" --json
|
|
63
|
+
```
|
|
91
64
|
|
|
92
|
-
|
|
65
|
+
Use preserve when recovery must retain context; new restart otherwise defaults to auto, which can permit a legal fresh session and is not a memory guarantee. Team restart preserves explicitly stopped/paused seats; intentionally waking the roster uses team start. Unknown/partial/native unsupported outcomes are not permission to reset or fall back. Check child-owned residuals after stop; do not kill shared servers or parent resources.
|
|
93
66
|
|
|
94
|
-
For an
|
|
67
|
+
For an intentionally clean-context worker, only after explicit approval:
|
|
95
68
|
|
|
96
|
-
```
|
|
97
|
-
team-agent
|
|
69
|
+
```sh
|
|
70
|
+
team-agent agent reset "$AGENT_ID" --workspace "$CHILD_WORKSPACE" --team "$CHILD_TEAM" --discard-session --json
|
|
98
71
|
```
|
|
99
72
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## Framework Gaps To Track
|
|
103
|
-
|
|
104
|
-
- Nested mode needs a way to pin the framework Team Agent skill by absolute path, so providers do not choose their built-in agent-team feature.
|
|
105
|
-
- A child-team worker should be prevented from shutting down the parent team by mistake.
|
|
106
|
-
- Child team creation should avoid defaulting to the fragile parent `current` directory.
|
|
73
|
+
This is not incident recovery; use [the recovery reference](recovery-runbook.md) for that. Legacy initial-creation, shutdown and suffixed agent commands remain compatibility bridges only; new child-team instructions use the forms above.
|