@team-agent/installer 0.5.104 → 0.5.105
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 +2 -0
- package/crates/team-agent/src/cli/emit.rs +102 -5
- package/crates/team-agent/src/cli/mod.rs +8 -14
- package/crates/team-agent/src/cli/spec.rs +2 -2
- package/crates/team-agent/src/cli/tests/run_delegation.rs +1 -0
- package/crates/team-agent/src/cli/types.rs +3 -1
- package/crates/team-agent/src/lifecycle/launch/add_agent.rs +6 -2
- package/crates/team-agent/src/lifecycle/launch/add_agent_state.rs +6 -4
- package/crates/team-agent/src/lifecycle/launch/role_source.rs +1 -1
- package/crates/team-agent/src/lifecycle/launch/spec_state.rs +7 -2
- package/crates/team-agent/src/lifecycle/launch.rs +4 -1
- package/crates/team-agent/src/lifecycle/mod.rs +1 -0
- package/crates/team-agent/src/lifecycle/restart/agent.rs +31 -0
- package/crates/team-agent/src/lifecycle/restart.rs +1 -1
- package/crates/team-agent/src/lifecycle/role_config.rs +1123 -0
- package/crates/team-agent/src/state/repository.rs +2 -1
- package/package.json +4 -4
- package/skills/team-agent/SKILL.md +55 -20
- package/skills/team-agent/references/team-agent-operator.md +14 -6
|
@@ -162,7 +162,8 @@ impl<'a> StateRepository<'a> {
|
|
|
162
162
|
test_support::before_commit();
|
|
163
163
|
let team_key = match intent {
|
|
164
164
|
StateWriteIntent::ResultCollection { owner_team_id } => owner_team_id,
|
|
165
|
-
StateWriteIntent::ForkAgent { team_key, .. }
|
|
165
|
+
StateWriteIntent::ForkAgent { team_key, .. }
|
|
166
|
+
| StateWriteIntent::StartAgent { team_key, .. } => Some(team_key),
|
|
166
167
|
_ => {
|
|
167
168
|
return Err(StateError::SaveFailed(
|
|
168
169
|
"intent does not accept a bounded Team delta".into(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@team-agent/installer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.105",
|
|
4
4
|
"description": "npx installer for Team Agent",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codex",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"team-agent-installer": "npm/install.mjs"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@team-agent/cli-darwin-arm64": "0.5.
|
|
24
|
-
"@team-agent/cli-darwin-x64": "0.5.
|
|
25
|
-
"@team-agent/cli-linux-x64": "0.5.
|
|
23
|
+
"@team-agent/cli-darwin-arm64": "0.5.105",
|
|
24
|
+
"@team-agent/cli-darwin-x64": "0.5.105",
|
|
25
|
+
"@team-agent/cli-linux-x64": "0.5.105"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"postinstall": "node npm/bincheck.mjs",
|
|
@@ -7,48 +7,83 @@ requires_team_agent: ">=0.5.0"
|
|
|
7
7
|
|
|
8
8
|
The current assistant is the **leader**. Workers use separate role files and report through Team Agent. Start from a tmux-addressable terminal or supported agent pane, in the workspace root (the parent of the team directory).
|
|
9
9
|
|
|
10
|
+
## Decide before creating a team
|
|
11
|
+
|
|
12
|
+
**The user decides each worker's provider and permission bypass. Do not silently choose Pi, true, or false.** Reuse an explicit user policy when it covers the worker; otherwise explain the choices and ask before starting.
|
|
13
|
+
|
|
14
|
+
Use existing resources rather than establishing new accounts: `team-agent doctor --workspace . --json` reports discovered tools, but installed does not mean authenticated and an absent entry or unknown auth is not proof of unavailability. For providers supported by `models`, use `team-agent models --provider NAME` to check exact model IDs. Do not inspect credentials, automatically log in, or silently substitute a provider after a failed probe.
|
|
15
|
+
|
|
16
|
+
| Choice | What to explain |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Pi | One Agent tool can use several model catalogs; explicit models require a qualified ID such as `openai-codex/gpt-6-luna` |
|
|
19
|
+
| Codex | The user's existing Codex workflow, native tools, permissions and resumable sessions |
|
|
20
|
+
| Claude / Claude Code | The user's existing Claude workflow, models, native tools and session behavior |
|
|
21
|
+
| Bypass `true` | Fewer permission interruptions, but broader automatic execution authority |
|
|
22
|
+
| Bypass `false` | Keep the selected tool's native permissions; human confirmation may interrupt unattended work |
|
|
23
|
+
|
|
24
|
+
False is **not** a read-only or sandbox guarantee. Native permission capabilities differ between tools. Suggest combinations based on the user's installed tools, subscriptions and task: for example, an explicitly chosen Codex implementer and Claude reviewer, or two Pi workers when those are the available resources. Different workers may use different providers; an existing worker cannot change provider.
|
|
25
|
+
|
|
10
26
|
## Create and start
|
|
11
27
|
|
|
12
|
-
|
|
28
|
+
Keep the goal in `TEAM.md` and each worker's instructions in `agents/*.md`. The filename stem is the worker's in-team short name.
|
|
13
29
|
|
|
14
30
|
```text
|
|
15
31
|
.team/current/
|
|
16
|
-
TEAM.md
|
|
17
|
-
agents/reviewer.md
|
|
32
|
+
TEAM.md
|
|
33
|
+
agents/reviewer.md
|
|
18
34
|
```
|
|
19
35
|
|
|
20
|
-
|
|
36
|
+
For a **new plan**, record the user's two decisions in every role. This example assumes the user selected Pi and bypass false; it is not a default:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
---
|
|
40
|
+
provider: pi
|
|
41
|
+
dangerously_skip_permissions: false
|
|
42
|
+
---
|
|
43
|
+
Review the change and report concrete regression risks.
|
|
44
|
+
```
|
|
21
45
|
|
|
22
46
|
```sh
|
|
23
47
|
team-agent quick-start .team/current
|
|
24
48
|
team-agent send reviewer "Review this change"
|
|
25
49
|
team-agent inbox reviewer -n 3
|
|
26
|
-
team-agent add-agent analyst --role-file /absolute/path/to/analyst.md
|
|
27
|
-
team-agent shutdown --workspace .
|
|
28
50
|
```
|
|
29
51
|
|
|
30
|
-
|
|
52
|
+
Traditional file-based quick-start/compile behavior remains supported, including legacy minimal role documents; no conversion to CLI-created roles is required. Legacy interpretation is not permission to silently choose settings for a new user plan. Model and effort may remain unset; preserve the existing file compiler's native/default interpretation rather than inventing a model or effort.
|
|
31
53
|
|
|
32
|
-
|
|
54
|
+
To add a **new** seat to an existing team, provider and bypass must be explicitly defined in the CLI or role file. A complete traditional role file needs no repeated flags. If both sources define a field, equal values are accepted and **conflicting values are rejected before any write or startup**:
|
|
33
55
|
|
|
34
|
-
|
|
56
|
+
```sh
|
|
57
|
+
# These values must be the user's choices, not inferred defaults.
|
|
58
|
+
team-agent add-agent analyst --provider pi --bypass true --prompt "Analyze the proposed change"
|
|
59
|
+
# auditor.md already contains the user's provider and bypass decisions.
|
|
60
|
+
team-agent add-agent auditor --role-file /absolute/path/to/auditor.md
|
|
61
|
+
```
|
|
35
62
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
63
|
+
Add creates and immediately starts the seat. Ordinary add rejects an occupied ID, including stopped seats. Disaster recovery has one explicit exception: `add-agent ID --role-file FILE --force` may reuse the existing force-recreate lifecycle only when the registered old pane is positively confirmed dead and no live target cohort exists. A live seat or unknown/missing death proof is refused; force is not a routine configuration-update shortcut. External role files are imported into the team's `agents/ID.md` and left untouched. A file already at that path is used in place, without copying itself.
|
|
64
|
+
|
|
65
|
+
## Change and start an existing worker
|
|
66
|
+
|
|
67
|
+
**Stop first if it is running.** Start never implicitly kills or restarts a running worker:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
team-agent stop-agent reviewer
|
|
71
|
+
team-agent start-agent reviewer --effort high --bypass true
|
|
72
|
+
team-agent stop-agent reviewer
|
|
73
|
+
team-agent start-agent reviewer --prompt "Review only regression risks; do not change product code"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Start updates the same role file and recompiles it before normal startup. Omitted options preserve the file's values and body; `--prompt` replaces the permanent role body, not a one-time task message. `--bypass true` and `--bypass false` are explicit values, not bare switches. Model, effort and an existing profile can also be set. Direct file edits followed by start use the same reload path.
|
|
42
77
|
|
|
43
|
-
|
|
78
|
+
A different `--provider`, including a manually edited role provider, is rejected before launch. A matching provider is allowed. Create a separate ID to use a different engine. If startup fails, the role file and runtime spec are restored to their pre-command contents; the command reports failure, not an applied update.
|
|
44
79
|
|
|
45
|
-
Profiles keep provider authentication,
|
|
80
|
+
Profiles keep provider authentication, endpoints and custom-model settings local. Imported roles use this team's/workspace's `profiles`, never the original external directory. Prepare a named profile locally through the public profile commands; do not search for or copy external credentials. Never put secrets in `TEAM.md` or a role file. See [the operator reference](references/team-agent-operator.md) for existing profile and field details. Supported metadata also includes `agent_id` (legacy `name`), `role`, `auth_mode`, and `communication_mode`; old `tools`, `permission_mode`, and `label` keys do not configure a worker.
|
|
46
81
|
|
|
47
|
-
## Inspect
|
|
82
|
+
## Inspect and stop
|
|
48
83
|
|
|
49
|
-
Use `team-agent status --json` for readiness and
|
|
84
|
+
Use `team-agent status --json` for readiness and the installed command's `--help` for syntax. `ok: true` with `ready: false` means the team is not ready; follow the reported action. Accepted/queued send is not the worker's reply: wait for a natural response or result. Use `<workspace>::<team>/<agent>` when a fully qualified recipient is needed.
|
|
50
85
|
|
|
51
|
-
Worker MCP provides `send_message`, `report_result`, and `get_team_status`. Lifecycle actions remain on the authorized CLI. See [nested teams](references/team-in-team.md) only when the
|
|
86
|
+
Worker MCP provides `send_message`, `report_result`, and `get_team_status`. Lifecycle actions remain on the authorized CLI. See [nested teams](references/team-in-team.md) only when needed. Stop the selected team with `team-agent shutdown --workspace .` when authorized.
|
|
52
87
|
|
|
53
88
|
---
|
|
54
89
|
This skill is a concise public guide. Do not infer a tested version from package metadata; verify the installed CLI with `team-agent --version` when version-specific behavior matters.
|
|
@@ -20,15 +20,16 @@ From a tmux-addressable terminal or supported agent pane, run commands in the wo
|
|
|
20
20
|
team-agent quick-start my-team
|
|
21
21
|
team-agent send reviewer "Review the current change and report the main risk."
|
|
22
22
|
team-agent inbox reviewer -n 3
|
|
23
|
+
# The role file already records the user's provider and bypass choices.
|
|
23
24
|
team-agent add-agent analyst --role-file /absolute/path/to/analyst.md
|
|
24
25
|
team-agent shutdown --workspace .
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
A successful `send` can mean only accepted or queued. Wait for the worker's actual reply/result; acceptance is not completion. Use `team-agent status --json` to inspect readiness. `ok: true` with `ready: false` means the command succeeded but the team is not ready; follow the reported action.
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
+
## User decisions and legacy compatibility
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
For a new team plan, explicitly record each user's provider and bypass decisions; do not silently select either. Existing file-based compilation remains compatible, including minimal documents. The following table describes legacy interpretation, not defaults to choose on the user's behalf:
|
|
32
33
|
|
|
33
34
|
| Setting | Default behavior |
|
|
34
35
|
|---|---|
|
|
@@ -37,21 +38,27 @@ No role frontmatter is required. With no explicit overrides, Team Agent uses:
|
|
|
37
38
|
| `effort` | Unset by Team Agent; leave effort selection to the provider |
|
|
38
39
|
| `dangerously_skip_permissions` | `false`; preserve native permissions |
|
|
39
40
|
|
|
40
|
-
Do not
|
|
41
|
+
Do not invent `model: null` or `effort: max`. Record the user's bypass decision explicitly in a new role, even when it is false. The absence of a model or effort override is not a promise about what the provider's own UI eventually displays. Team Agent does not fill role model from TEAM-level defaults. An unspecified role effort defaults to None (native); for non-Pi roles, a legacy explicit TEAM provider_effort remains supported for compatibility.
|
|
41
42
|
|
|
42
43
|
Optional supported role metadata:
|
|
43
44
|
|
|
44
45
|
- `agent_id` (or legacy `name`) and `role` for identity.
|
|
45
46
|
- `provider`, `model`, and `effort` to explicitly choose supported provider settings.
|
|
46
47
|
- `auth_mode` and `profile` to use a provider profile.
|
|
47
|
-
- `dangerously_skip_permissions: true`
|
|
48
|
+
- `dangerously_skip_permissions: true` or `false` records the user's explicit permission choice. False preserves native permissions; it is not a read-only or sandbox guarantee.
|
|
48
49
|
- `communication_mode` to select a supported worker communication contract.
|
|
49
50
|
|
|
50
51
|
Unknown and historical role keys are ignored, not used as a way to restrict tools or permissions. In particular, `tools`, `permission_mode`, and `label` do not configure a worker through role frontmatter.
|
|
51
52
|
|
|
53
|
+
## Add and start
|
|
54
|
+
|
|
55
|
+
`add-agent ID --provider NAME --bypass true|false` creates and starts a new seat without a prepared file. A traditional `add-agent ID --role-file FILE` needs no repeated flags when the file already defines provider and boolean bypass. Missing decisions may be supplied by CLI; equal file/CLI values are accepted, but conflicting definitions (including model, effort, prompt and profile) are rejected before writing or startup. Model, effort, prompt and profile remain optional. External role-file inputs are imported into the selected team's `agents/ID.md`; the original stays untouched. A file already there is used in place. Ordinary add rejects occupied IDs. Explicit `--force` is restricted to disaster recovery: the registered old pane must be positively confirmed dead and the target must have no live cohort. Live or unknown targets remain refused; the existing force-recreate transaction is reused, not a general update/implicit-restart path.
|
|
56
|
+
|
|
57
|
+
`start-agent ID` starts an existing stopped seat; it refuses a running seat, so use `stop-agent ID` first. Optional model, effort, bypass, prompt and profile update that same role document. Omitted fields and body are preserved; prompt replaces the body. A matching provider is allowed; any engine change, including manual file edits, is refused. Startup failure restores role and runtime spec bytes, and reports failure. File edits followed by start use the same compiler reload path.
|
|
58
|
+
|
|
52
59
|
## Profiles and custom models
|
|
53
60
|
|
|
54
|
-
A profile keeps provider credentials, endpoint settings, and optional model settings outside role text. This supports subscription profiles and custom/third-party API models, including Claude Code-compatible providers.
|
|
61
|
+
A profile keeps provider credentials, endpoint settings, and optional model settings outside role text. This supports subscription profiles and custom/third-party API models, including Claude Code-compatible providers. Once an external role is imported, profile lookup uses the current team's/workspace's `profiles`, not the external source directory. Prepare the profile locally through public commands; do not discover or copy external credentials.
|
|
55
62
|
|
|
56
63
|
Create a local profile, then edit its generated file on the user's machine:
|
|
57
64
|
|
|
@@ -64,6 +71,7 @@ Reference it without copying secrets into Markdown:
|
|
|
64
71
|
```yaml
|
|
65
72
|
---
|
|
66
73
|
provider: claude_code
|
|
74
|
+
dangerously_skip_permissions: false
|
|
67
75
|
auth_mode: compatible_api
|
|
68
76
|
profile: my-api
|
|
69
77
|
---
|
|
@@ -76,4 +84,4 @@ The profile can supply its model when the role has no explicit `model`; an expli
|
|
|
76
84
|
|
|
77
85
|
Use `team-agent --help` or a command's `--help` for the installed CLI syntax. Worker MCP exposes `send_message`, `report_result`, and `get_team_status`; workers use `report_result` to return completion. Nested-team guidance is in [team-in-team.md](team-in-team.md).
|
|
78
86
|
|
|
79
|
-
Keep role instructions in Markdown.
|
|
87
|
+
Keep role instructions in Markdown. Record explicit provider/bypass decisions for new plans, and add other metadata only for intentional settings; do not copy internal state fields into roles.
|