@rosthq/cli 0.5.5 → 0.5.7
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +173 -62
- package/dist/index.js.map +3 -3
- package/dist/mcp-install.d.ts +15 -0
- package/dist/mcp-install.d.ts.map +1 -1
- package/dist/operations.d.ts.map +1 -1
- package/package.json +1 -1
- package/prompts/how-tos/human-confirmations.md +2 -0
package/dist/index.js
CHANGED
|
@@ -41486,7 +41486,7 @@ var referenceDocuments = [
|
|
|
41486
41486
|
order: 10,
|
|
41487
41487
|
title: "{{brand}} implementation method",
|
|
41488
41488
|
summary: "The staged operating-system setup path used by humans, CLI sessions, MCP clients, and in-app agents.",
|
|
41489
|
-
version: "2026-06-
|
|
41489
|
+
version: "2026-06-18.1",
|
|
41490
41490
|
public: true,
|
|
41491
41491
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
41492
41492
|
stages: ["company_setup", "graph_design", "charter_design", "staffing", "operating_rhythm"],
|
|
@@ -41584,14 +41584,14 @@ The Compass is drafted, then activated by a human through supersession.
|
|
|
41584
41584
|
|
|
41585
41585
|
## When to stop for confirmation
|
|
41586
41586
|
|
|
41587
|
-
\`onboarding.
|
|
41587
|
+
\`onboarding.finish\`, \`compass.approve_version\`, \`compass.reject_draft\`, and \`compass.set\` are \`human_required\`. \`onboarding.advance_step\`, \`onboarding.create_invite\`, \`onboarding.attach_reference\`, \`compass.answer_gap\`, and drafting a Compass are \`none\` \u2014 none of them returns a pending confirmation. \`none\` is not the same as "agent-callable", though: \`onboarding.create_invite\` and \`compass.answer_gap\` record the human who ran them, so they run as a person, not from an agent session, while advancing a step, attaching a reference, and drafting a Compass are safe for an agent. Approving a version (a supersession) is a human act. The agent drafts and surfaces the approve link. See the confirmations guide.`
|
|
41588
41588
|
},
|
|
41589
41589
|
{
|
|
41590
41590
|
slug: "responsibility-graph-playbook",
|
|
41591
41591
|
order: 20,
|
|
41592
41592
|
title: "Responsibility Graph playbook",
|
|
41593
41593
|
summary: "How to build a functions-first graph with seats, owners, Stewards, vacancies, and clean authority.",
|
|
41594
|
-
version: "2026-06-
|
|
41594
|
+
version: "2026-06-18.1",
|
|
41595
41595
|
public: true,
|
|
41596
41596
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
41597
41597
|
stages: ["graph_design", "staffing"],
|
|
@@ -41688,7 +41688,7 @@ It ends every occupancy, archives the seat's active Charter, revokes the seat's
|
|
|
41688
41688
|
|
|
41689
41689
|
## When to stop for confirmation
|
|
41690
41690
|
|
|
41691
|
-
\`seat.
|
|
41691
|
+
\`seat.reparent\`, \`seat.set_type\`, and \`seat.decommission\` are \`human_required\`; \`seat.create\` and \`seat.rename\` are \`none\`, so an agent can add and rename seats directly. The structural commands return a pending confirmation with an approve link over MCP instead of mutating; the human approves with \`confirmation.approve\`. Never approve your own structural change from an agent session \u2014 surface the pending confirmation to a human. When a seat-targeted command does execute, its audit row is scoped to that seat (queryable by \`seat_id\`); on the deferred MCP path the executed audit is recorded against the human's \`confirmation.approve\`. See the confirmations guide.
|
|
41692
41692
|
|
|
41693
41693
|
## Agent guidance
|
|
41694
41694
|
|
|
@@ -41769,7 +41769,7 @@ Drafting can be assisted by agents. Activation is a human decision. When authori
|
|
|
41769
41769
|
order: 40,
|
|
41770
41770
|
title: "Agent staffing playbook",
|
|
41771
41771
|
summary: "How to decide whether a seat should be human, agent, or hybrid, and how to go live safely.",
|
|
41772
|
-
version: "2026-06-
|
|
41772
|
+
version: "2026-06-18.1",
|
|
41773
41773
|
public: true,
|
|
41774
41774
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
41775
41775
|
stages: ["staffing"],
|
|
@@ -41824,7 +41824,7 @@ Two creation paths, both draft-first. Read the stock-agents guide for templates
|
|
|
41824
41824
|
|
|
41825
41825
|
## When to stop for confirmation
|
|
41826
41826
|
|
|
41827
|
-
\`agent.create_from_template\`, \`agent.create_custom\`, \`
|
|
41827
|
+
\`agent.create_from_template\`, \`agent.create_custom\`, \`staffing.assign_user\`, \`agent.go_live\`, \`agent.update_schedule\`, and \`mcp_token.create\` are \`human_required\`; \`agent.configure_tools\` and \`credential.ingress\` are \`credential_flow\` (both gate through the vault-backed credential path with human approval; \`agent.configure_tools\` stages the request and only \`credential.ingress\` takes the raw secret, as a vault reference); \`agent.decommission\` is \`dangerous\`. An agent may draft, configure (with vault refs), and dry-run; the human approves go-live, credentials, schedule changes, and decommission. \`run_dry_run\` is ungated by human approval, but it is **precondition-gated**: the seat's permission manifest must be signed first (\`charter.sign_manifest\`). Attempting a dry run before sign-off returns a clean \`COMMAND_PRECONDITION_FAILED\` naming \`charter.sign_manifest\`, not a generic failure. Go-live after a passed dry run is \`human_required\`. See the confirmations guide.
|
|
41828
41828
|
|
|
41829
41829
|
## Non-negotiables
|
|
41830
41830
|
|
|
@@ -41915,7 +41915,7 @@ In read-only or demo mode the **Add agent** affordance is disabled or routes to
|
|
|
41915
41915
|
order: 42,
|
|
41916
41916
|
title: "Design a custom agent",
|
|
41917
41917
|
summary: "How to build a custom agent from operational questions through the Charter Builder, tools, dry run, and go-live without writing prompts.",
|
|
41918
|
-
version: "2026-06-
|
|
41918
|
+
version: "2026-06-18.2",
|
|
41919
41919
|
public: true,
|
|
41920
41920
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
41921
41921
|
stages: ["staffing", "charter_design"],
|
|
@@ -41971,18 +41971,18 @@ The same path is command-backed:
|
|
|
41971
41971
|
|
|
41972
41972
|
## Dry run and go-live
|
|
41973
41973
|
|
|
41974
|
-
The
|
|
41974
|
+
The dry run is a real sandbox rehearsal, not a stamp. It executes a mock-provider run derived from the Charter \u2014 the agent works against sandbox data only and is expected to escalate where the Charter's must-escalate clause requires it. The result is earned: a run that escalates the must-escalate boundary passes; a run that acts on that boundary instead of escalating fails. A failed dry run keeps the draft and shows the reason so you can edit and rerun. The rehearsal returns a transcript \u2014 the steps the agent took and the escalation it raised \u2014 shown step by step in the builder and printed by the CLI, so you can see the governance model working before anything goes live. When the dry run passes, a human promotes the agent live. The dry run rehearses the specific model tier you chose, so once it passes the model is locked \u2014 changing the model requires re-running the dry run on the new model before go-live.
|
|
41975
41975
|
|
|
41976
41976
|
## When to stop for confirmation
|
|
41977
41977
|
|
|
41978
|
-
\`agent.create_custom\`, \`
|
|
41978
|
+
\`agent.create_custom\`, \`charter.sign_manifest\`, \`staffing.assign_user\`, and \`agent.go_live\` are \`human_required\`; \`agent.configure_tools\` and \`credential.ingress\` are \`credential_flow\` (both gate through the vault-backed credential path with human approval; \`agent.configure_tools\` stages the request and only \`credential.ingress\` takes the raw secret, as a vault reference). \`agent.run_dry_run\` is ungated by human approval but **requires a signed manifest first** \u2014 a dry run before \`charter.sign_manifest\` returns a clean \`COMMAND_PRECONDITION_FAILED\` pointing at \`charter.sign_manifest\`. The go-live after a passed dry run is \`human_required\`. An agent may draft, configure (with vault refs), and dry-run; only a human approves the Charter, manifest, credentials, and go-live. A seat token can never create or approve its own setup. See the confirmations guide.`
|
|
41979
41979
|
},
|
|
41980
41980
|
{
|
|
41981
41981
|
slug: "sync-rhythm-playbook",
|
|
41982
41982
|
order: 80,
|
|
41983
41983
|
title: "Sync rhythm playbook",
|
|
41984
41984
|
summary: "How Signal, Friction, Cascade, and Sync Briefs turn weekly meetings into decision time.",
|
|
41985
|
-
version: "2026-06-
|
|
41985
|
+
version: "2026-06-18.1",
|
|
41986
41986
|
public: true,
|
|
41987
41987
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
41988
41988
|
stages: ["operating_rhythm"],
|
|
@@ -42041,7 +42041,7 @@ Start with the exceptions, not a tour of every seat. Resolve the highest-value F
|
|
|
42041
42041
|
|
|
42042
42042
|
## When to stop for confirmation
|
|
42043
42043
|
|
|
42044
|
-
\`sync.run.start\`, \`sync.run.complete\`, and \`sync.item.assign\` are
|
|
42044
|
+
\`sync.brief.compile\`, \`sync.brief.get\`, \`sync.run.start\`, \`sync.run.complete\`, and \`sync.item.assign\` are all \`none\`, so a tenant-admin seat runs the weekly rhythm directly without a per-action human gate. An agent can compile the brief and propose assignments ahead of the meeting; the human still owns the meeting and the decisions made in it, but {{brand}} does not force a confirmation on these commands themselves.
|
|
42045
42045
|
|
|
42046
42046
|
## After Sync
|
|
42047
42047
|
|
|
@@ -42052,7 +42052,7 @@ Decisions should be recorded as human decisions. Handoffs should attach to seats
|
|
|
42052
42052
|
order: 45,
|
|
42053
42053
|
title: "How agents work",
|
|
42054
42054
|
summary: "How {{brand}} agents operate inside seats, use Charters, report work, and escalate beyond authority.",
|
|
42055
|
-
version: "2026-06-
|
|
42055
|
+
version: "2026-06-18.1",
|
|
42056
42056
|
public: true,
|
|
42057
42057
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
42058
42058
|
stages: ["staffing", "operating_rhythm"],
|
|
@@ -42123,7 +42123,7 @@ A seat-scoped MCP token or the CLI runs the hand-shaped protocol. The server sti
|
|
|
42123
42123
|
|
|
42124
42124
|
A seat-scoped MCP token already carries the seat, so its tools (\`rost_get_tasks\`, \u2026) need no seat argument. A tenant or owner CLI **session** does not, so pass \`--seat <seat-id>\` on seat-operating wrappers (an owner can target any seat in the tenant; a member only a seat they occupy). See "Seat scope" below.
|
|
42125
42125
|
|
|
42126
|
-
\`task.accept\`, \`task.decline\`,
|
|
42126
|
+
\`task.accept\`, \`task.decline\`, \`task.complete\`, \`status.record\`, \`work.log\`, and \`escalation.raise\` are all \`none\` \u2014 a seat operates its own queue and reports its own work directly. None of these carry a confirmation gate. An agent still never approves a human's confirmation on another seat's behalf; these are simply the acting seat's own reversible actions.
|
|
42127
42127
|
|
|
42128
42128
|
## What humans should review
|
|
42129
42129
|
|
|
@@ -42134,7 +42134,7 @@ Review the first dry runs, tool-call audit rows, escalations, and Signal impact.
|
|
|
42134
42134
|
order: 46,
|
|
42135
42135
|
title: "Tool access and vault",
|
|
42136
42136
|
summary: "How to give agents access to tools without exposing raw credentials or expanding authority by accident.",
|
|
42137
|
-
version: "2026-06-
|
|
42137
|
+
version: "2026-06-18.1",
|
|
42138
42138
|
public: true,
|
|
42139
42139
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
42140
42140
|
stages: ["staffing"],
|
|
@@ -42185,13 +42185,13 @@ Connecting a tool is a human-controlled step. The agent can recommend a tool, ex
|
|
|
42185
42185
|
## Connect tools and credentials from CLI or MCP
|
|
42186
42186
|
|
|
42187
42187
|
- Stage tools on a draft agent: \`agent.configure_tools\` / \`rost_configure_agent_tools\` \u2014 connect or decline proposed tools and stage credential-ingress requests. Pass vault references, never raw secret material.
|
|
42188
|
-
- Store a secret: \`credential.ingress\` / \`rost_store_credential\` (scope: seat) persists only a vault reference.
|
|
42188
|
+
- Store a secret: \`credential.ingress\` / \`rost_store_credential\` (scope: seat) persists only a vault reference. \`credential.ingress\` is \`credential_flow\` \u2014 it returns a pending confirmation and runs only with a real human-provided secret, captured as a vault reference. (Because it redacts that secret, the pending confirmation also shows a high-risk badge \u2014 see the confirmations guide for badge-versus-level.)
|
|
42189
42189
|
- Sign the manifest: \`charter.sign_manifest\` / \`rost_sign_charter_manifest\` requests human confirmation for the seat's permission manifest.
|
|
42190
|
-
- Mint local access: prefer \`{{cli}} mcp install\` for users; \`mcp_token.create\` is \`
|
|
42190
|
+
- Mint local access: prefer \`{{cli}} mcp install\` for users; \`mcp_token.create\` is \`human_required\` and returns the token once. List metadata with \`mcp_token.list\` (never token material); revoke with \`mcp_token.revoke\`.
|
|
42191
42191
|
|
|
42192
42192
|
## When to stop for confirmation
|
|
42193
42193
|
|
|
42194
|
-
\`credential.ingress\` and \`
|
|
42194
|
+
\`credential.ingress\` and \`agent.configure_tools\` are \`credential_flow\`; \`charter.sign_manifest\`, \`mcp_token.create\`, and \`mcp_token.revoke\` are \`human_required\`. Connecting a tool, storing a credential, or minting a token is a human-approved act. An agent drafts and explains; a human approves through the confirmation flow. Secrets never appear in prompts, logs, tool arguments, or an \`args_summary\`. See the confirmations guide.`
|
|
42195
42195
|
},
|
|
42196
42196
|
{
|
|
42197
42197
|
slug: "available-tools-guide",
|
|
@@ -42241,7 +42241,7 @@ Agents should explain the job, the required tool category, the minimum permissio
|
|
|
42241
42241
|
order: 48,
|
|
42242
42242
|
title: "CLI and MCP installation guide",
|
|
42243
42243
|
summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
|
|
42244
|
-
version: "2026-06-18.
|
|
42244
|
+
version: "2026-06-18.10",
|
|
42245
42245
|
public: true,
|
|
42246
42246
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
42247
42247
|
stages: ["company_setup", "staffing"],
|
|
@@ -42306,7 +42306,7 @@ The MCP server is remote and token-backed. There is no local MCP daemon to insta
|
|
|
42306
42306
|
A headless agent cannot complete setup unattended. Two things always require a human, so plan to announce the handoff rather than stall silently:
|
|
42307
42307
|
|
|
42308
42308
|
- **Device-code approval at first login.** \`{{cli}} login --device\` prints a code; a human must open the workspace URL in a browser, sign in with Google, match the code, and approve.
|
|
42309
|
-
- **Durable gated commands.** Setting or approving a Charter, staffing a seat, and taking an agent live each open a confirmation that a human approves (an agent never approves its own request \u2014 see the confirmations-guide). The CLI surfaces the \`confirmation_id\` and an \`approveVia\` URL for the human. (\`{{cli}} mcp install\` is
|
|
42309
|
+
- **Durable gated commands.** Setting or approving a Charter, staffing a seat, and taking an agent live each open a confirmation that a human approves (an agent never approves its own request \u2014 see the confirmations-guide). The CLI surfaces the \`confirmation_id\` and an \`approveVia\` URL for the human. (\`{{cli}} mcp install\` is a partial exception: for an **interactive** operator it completes its own token-mint approval inline; in a **headless/agent** session it surfaces the confirmation and stops unless \`--skip-permissions\` / \`{{envPrefix}}_CLI_SKIP_PERMISSIONS=1\` is set \u2014 see Approving the token mint below.)
|
|
42310
42310
|
|
|
42311
42311
|
Treat these as blocking prerequisites: the agent prepares the request and waits for the human approver.
|
|
42312
42312
|
|
|
@@ -42420,6 +42420,8 @@ Or use the one-shot helper: \`{{cli}} init\` logs in when needed, optionally sel
|
|
|
42420
42420
|
|
|
42421
42421
|
A direct \`mcp install\` now **requires an explicit \`--scope\`** \u2014 there is no silent default. Choose \`--scope seat --seat-id <id>\` (the narrowest scope, limited to one seat's Charter and permission manifest \u2014 prefer it for day-to-day operation) or \`--scope tenant-admin\` (can administer the whole company \u2014 reserve it for initial setup). Running \`mcp install\` without \`--scope\` errors and mints nothing, naming both options. (The first-run helper \`{{cli}} init\` is the exception: it defaults to \`--scope tenant-admin\` because no seats exist yet at setup; and \`--rotate\` inherits the old token's scope, so it does not need \`--scope\` either.)
|
|
42422
42422
|
|
|
42423
|
+
\`mcp install\` accepts an optional \`--skip-permissions\` flag (equivalently \`{{envPrefix}}_CLI_SKIP_PERMISSIONS=1\`). It governs the token-mint approval in a non-interactive session \u2014 see Approving the token mint below. An interactive operator never needs it.
|
|
42424
|
+
|
|
42423
42425
|
Claude Code (tenant-admin):
|
|
42424
42426
|
|
|
42425
42427
|
\`\`\`bash
|
|
@@ -42450,9 +42452,13 @@ The \`<seat-id>\` comes from \`{{cli}} command seat.create\` output or \`rost_ge
|
|
|
42450
42452
|
|
|
42451
42453
|
### Approving the token mint
|
|
42452
42454
|
|
|
42453
|
-
Minting a token is a human-gated authority change at the command layer.
|
|
42455
|
+
Minting a token (and the inline revoke that \`--rotate\` performs) is a human-gated authority change at the command layer. How \`{{cli}} mcp install\` handles that approval depends on whether it runs in an interactive session:
|
|
42454
42456
|
|
|
42455
|
-
|
|
42457
|
+
- **Interactive operator (a human at a real terminal).** The CLI completes the approval **inline**: the operator who ran the command is the human in the loop, so it runs the gated mint, completes the confirmation for that same command, and prints the registration block \u2014 a single step, no separate URL to click.
|
|
42458
|
+
- **Non-interactive / headless / agent session.** The CLI does **not** approve its own request. By default it **surfaces the confirmation and stops**, minting nothing: it prints the \`confirmation_id\`, the exact \`{{cli}} command confirmation.approve --json '{"confirmation_id":"<id>"}'\` command, and the \`approveVia\` URL when the server provided one, then exits non-zero ("pending human approval"). A human then approves it (in a browser or with that approve command) \u2014 and that approval **executes the mint and returns the token in the approve output** (shown once), so register it with your client from there. Do **not** re-run \`mcp install\` after approving: that starts a second mint and orphans the first token. (For an unattended agent that should mint and register in one step, use \`--skip-permissions\` below.)
|
|
42459
|
+
- **Opting into auto-approval in a headless session.** Pass \`--skip-permissions\` on \`mcp install\`, or set \`{{envPrefix}}_CLI_SKIP_PERMISSIONS=1\`, to auto-approve the mint/revoke confirmation inline even without a TTY. This is a deliberate loosening (the running session stands in for the human approver) \u2014 use it only for trusted automation where you accept that the agent approves its own token mint.
|
|
42460
|
+
|
|
42461
|
+
The broader rule still holds for durable changes an agent proposes \u2014 charters, decisions, compass and charter amendments \u2014 where an agent never approves its own request and a human approves the surfaced \`approveVia\` confirmation. See the confirmations-guide for the four confirmation levels and that flow.
|
|
42456
42462
|
|
|
42457
42463
|
### Handling the printed token (read this before you paste anything)
|
|
42458
42464
|
|
|
@@ -42654,8 +42660,9 @@ These ergonomic wrappers (including the \`{{cli}} agent\` group) require **{{cli
|
|
|
42654
42660
|
|
|
42655
42661
|
| Command | Purpose | Scope | Safe example |
|
|
42656
42662
|
|---|---|---|---|
|
|
42657
|
-
| \`{{cli}} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry]\` | **Direct install** syntax. \`--scope\` is **required** (seat is narrower \u2014 prefer it for day-to-day; tenant-admin can administer the whole company). \`--expires-in <days>\` (1..365) or \`--no-expiry\` sets the token TTL (default 90 days). | Tenant | \`{{cli}} mcp install --client codex --scope tenant-admin --expires-in 30\` |
|
|
42663
|
+
| \`{{cli}} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry] [--skip-permissions]\` | **Direct install** syntax. \`--scope\` is **required** (seat is narrower \u2014 prefer it for day-to-day; tenant-admin can administer the whole company). \`--expires-in <days>\` (1..365) or \`--no-expiry\` sets the token TTL (default 90 days). \`--skip-permissions\` auto-approves the token-mint confirmation in a non-interactive session (see below). | Tenant | \`{{cli}} mcp install --client codex --scope tenant-admin --expires-in 30\` |
|
|
42658
42664
|
| \`{{cli}} mcp install --client claude-code|codex|cursor --rotate <old-token-id> (inherits the old token's scope; no --scope)\` | **Rotate** syntax. Mints a replacement, **inherits the old token's scope/seat** (so do not pass \`--scope\`), prints the new registration block, and revokes the old token. | Tenant | \`{{cli}} mcp install --client codex --rotate <old-token-id>\` |
|
|
42665
|
+
| \`{{cli}} mcp install ... --skip-permissions (or {{envPrefix}}_CLI_SKIP_PERMISSIONS=1 \u2014 auto-approves the token-mint confirmation in a non-interactive session)\` | **Skip-permissions** opt-in. In a headless/agent session, auto-approve the \`human_required\` token-mint (and rotate revoke) confirmation inline instead of surfacing it for a human (a deliberate loosening). An interactive operator never needs it. | Tenant | \`{{cli}} mcp install --client codex --scope seat --seat-id <seat-id> --skip-permissions\` |
|
|
42659
42666
|
| \`{{cli}} mcp install --client claude-code --scope tenant-admin\` | Mint a tenant-admin MCP token and print a Claude Code registration command. | Tenant | \`{{cli}} mcp install --client claude-code --scope tenant-admin\` |
|
|
42660
42667
|
| \`{{cli}} mcp install --client codex --scope tenant-admin\` | Mint a tenant-admin MCP token and print Codex TOML. | Tenant | \`{{cli}} mcp install --client codex --scope tenant-admin\` |
|
|
42661
42668
|
| \`{{cli}} mcp install --client cursor --scope tenant-admin\` | Mint a tenant-admin MCP token and print Cursor JSON. | Tenant | \`{{cli}} mcp install --client cursor --scope tenant-admin\` |
|
|
@@ -42748,6 +42755,8 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
|
|
|
42748
42755
|
| \`rost_update_agent_setup\` | \`agent_setup.update\` | Update parent, steward, lane, schedule, or answers on a setup draft. | Tenant | Call with \`setup_id\` and the fields to change. |
|
|
42749
42756
|
| \`rost_update_agent_schedule\` | \`agent.update_schedule\` | Update a draft or live agent's scheduled execution. | Tenant | Call with \`agent_id\` and \`schedule_cron\`; expect human confirmation. |
|
|
42750
42757
|
| \`rost_decommission_agent\` | \`agent.decommission\` | Retire an agent occupancy safely (no-orphan guarded). | Tenant | Call with \`agent_id\`; expect human confirmation. |
|
|
42758
|
+
| \`rost_pause_agent\` | \`agent.pause\` | Pause a live agent so it stops scheduled and on-demand runs; reversible. | Tenant | Call with \`seat_id\`; expect human confirmation. |
|
|
42759
|
+
| \`rost_resume_agent\` | \`agent.resume\` | Resume a paused agent back to live (no-orphan guarded). | Tenant | Call with \`seat_id\`; expect human confirmation. |
|
|
42751
42760
|
| \`rost_create_custom_agent\` | \`agent.create_custom\` | Create a draft custom agent shell and draft Charter seed from operational answers. | Tenant | Call with \`seat_id\` and operational answers; expect human confirmation. |
|
|
42752
42761
|
| \`rost_configure_agent_tools\` | \`agent.configure_tools\` | Connect or decline proposed tools and stage credential-ingress requests (vault refs only). | Seat or tenant-admin | Never send raw secrets; expect a credential confirmation. |
|
|
42753
42762
|
| \`rost_run_agent_dry_run\` | \`agent.run_dry_run\` | Run the sandbox dry run for a draft agent; durable and idempotent per Charter version. | Seat or tenant-admin | Call after the manifest is signed; ungated by human approval, but precondition-gated on a signed manifest. |
|
|
@@ -42784,7 +42793,7 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
|
|
|
42784
42793
|
| \`rost_update_friction_issue_status\` | \`friction.update_status\` | Move a non-terminal issue between open and diagnosing. | Seat or tenant-admin | Call with \`issue_id\` and \`status\`. |
|
|
42785
42794
|
| \`rost_resolve_friction_issue\` | \`friction.resolve\` | Resolve an issue with a root cause and remediation task. | Tenant | Human decision; expect confirmation. |
|
|
42786
42795
|
| \`rost_link_task_to_friction_issue\` | \`friction.link_task\` | Attach an existing task as an issue's action task. | Seat or tenant-admin | Call with \`issue_id\` and \`task_id\`. |
|
|
42787
|
-
| \`rost_create_task\` | \`task.create\` | Create a task (a commitment between seats). | Seat or tenant-admin |
|
|
42796
|
+
| \`rost_create_task\` | \`task.create\` | Create a task (a commitment between seats). | Seat or tenant-admin | \`none\` \u2014 created directly; the owning seat accepts or declines. |
|
|
42788
42797
|
| \`rost_compile_sync_brief\` | \`sync.brief.compile\` | Compile the weekly Sync Brief (idempotent per period). | Tenant | Call with \`{}\`. |
|
|
42789
42798
|
| \`rost_get_sync_brief\` | \`sync.brief.get\` | Read the latest or a specific Sync Brief and agenda. | Seat or tenant-admin | Call with \`{}\` or \`{"sync_brief_id":"<id>"}\`. |
|
|
42790
42799
|
| \`rost_start_sync_run\` | \`sync.run.start\` | Ensure a Sync Brief exists so the meeting can begin. | Tenant | Call with \`{}\`. |
|
|
@@ -42852,7 +42861,7 @@ These rows are quick, at-a-glance triage. For deeper auth, tenant, scope, confir
|
|
|
42852
42861
|
order: 49,
|
|
42853
42862
|
title: "Agent reference map",
|
|
42854
42863
|
summary: "Where CLI sessions, MCP clients, and in-app agents should retrieve {{brand}} guidance before recommending setup changes.",
|
|
42855
|
-
version: "2026-06-
|
|
42864
|
+
version: "2026-06-18.1",
|
|
42856
42865
|
public: true,
|
|
42857
42866
|
audiences: ["cli", "mcp", "in_app_agent"],
|
|
42858
42867
|
stages: ["company_setup", "graph_design", "charter_design", "staffing", "operating_rhythm"],
|
|
@@ -42903,7 +42912,7 @@ Never guess a command's JSON shape. Before calling a command that changes state,
|
|
|
42903
42912
|
- List every callable command: {{cli}} command list (CLI) or rost_list_commands (MCP)
|
|
42904
42913
|
- Read one command's exact input/output schema, help pointer, and a worked example: {{cli}} command schema <id> (CLI) or rost_describe_command with {"command_id":"<id>"} (MCP)
|
|
42905
42914
|
- List the tool catalog the agent builder reads (id, scope tiers, credential requirement, access policy \u2014 configuration only; the tools do not execute yet): {{cli}} tools list (CLI) or rost_list_tool_catalog (MCP)
|
|
42906
|
-
- Show a Compass, Charter, or agent setup as a markdown card to review with your human: {{cli}} compass show --markdown, {{cli}} charter show <
|
|
42915
|
+
- Show a Compass, Charter, or agent setup as a markdown card to review with your human: {{cli}} compass show --markdown, {{cli}} charter show --seat-id <id> --markdown, {{cli}} agent show --seat-id <id> --markdown
|
|
42907
42916
|
|
|
42908
42917
|
When a command fails, the error returns a machine-readable code, a message, and a help field naming the exact command to run next. Read the help field and run the command it points at \u2014 do not retry the same call blindly. A failed precondition (for example a manifest not yet signed, or a dry run that has not passed) returns COMMAND_PRECONDITION_FAILED with a help pointer, not an opaque internal error.
|
|
42909
42918
|
|
|
@@ -42971,7 +42980,7 @@ Retrieve the narrowest relevant guide before making a setup recommendation. Pref
|
|
|
42971
42980
|
order: 60,
|
|
42972
42981
|
title: "Cascade guide",
|
|
42973
42982
|
summary: "How to connect company goals to seat-level work without turning {{brand}} into a project-management tool.",
|
|
42974
|
-
version: "2026-06-
|
|
42983
|
+
version: "2026-06-18.1",
|
|
42975
42984
|
public: true,
|
|
42976
42985
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
42977
42986
|
stages: ["operating_rhythm"],
|
|
@@ -43025,7 +43034,7 @@ Do not put every task into Cascade. Small errands, private notes, and work with
|
|
|
43025
43034
|
|
|
43026
43035
|
## When to stop for confirmation
|
|
43027
43036
|
|
|
43028
|
-
\`goal.
|
|
43037
|
+
\`goal.reparent\` and \`goal.drop\` are \`human_required\`; \`goal.create\`, \`goal.set_status\`, and \`goal.update\` are \`none\`, so a seat can add goals and update their status directly. Moving or dropping a goal changes how the company reads its own progress, so it returns a pending confirmation over MCP. An agent proposes the branch and surfaces the approve link; a human decides.
|
|
43029
43038
|
|
|
43030
43039
|
## Agent guidance
|
|
43031
43040
|
|
|
@@ -43036,7 +43045,7 @@ Agents can suggest commitments and report progress. They should not create a new
|
|
|
43036
43045
|
order: 61,
|
|
43037
43046
|
title: "Signal guide",
|
|
43038
43047
|
summary: "How to define and read measurables so the company runs on evidence instead of status theater.",
|
|
43039
|
-
version: "2026-06-
|
|
43048
|
+
version: "2026-06-18.1",
|
|
43040
43049
|
public: true,
|
|
43041
43050
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43042
43051
|
stages: ["operating_rhythm"],
|
|
@@ -43086,7 +43095,7 @@ Avoid vanity numbers, manual-only status fields, and metrics nobody can act on.
|
|
|
43086
43095
|
|
|
43087
43096
|
## When to stop for confirmation
|
|
43088
43097
|
|
|
43089
|
-
\`signal.
|
|
43098
|
+
\`signal.correct_reading\` is \`human_required\`; overwriting a recorded measurable is a human judgment. \`signal.confirm_reading\` is \`none\`, so a seat can confirm its own readings directly. An agent records readings with evidence; a human corrects when a value is wrong.
|
|
43090
43099
|
|
|
43091
43100
|
## Agent guidance
|
|
43092
43101
|
|
|
@@ -43097,7 +43106,7 @@ Agents may record readings when the Charter allows it. Agent-reported readings s
|
|
|
43097
43106
|
order: 62,
|
|
43098
43107
|
title: "Friction guide",
|
|
43099
43108
|
summary: "How to capture issues with evidence, rank them, and resolve them without losing ownership.",
|
|
43100
|
-
version: "2026-06-
|
|
43109
|
+
version: "2026-06-18.1",
|
|
43101
43110
|
public: true,
|
|
43102
43111
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43103
43112
|
stages: ["operating_rhythm"],
|
|
@@ -43151,12 +43160,12 @@ Agents should file Friction when a measurable breaks, a tool fails, a repeated e
|
|
|
43151
43160
|
Friction, tasks, and escalations are the issue-to-action loop. A seat files, a task carries the work, and an escalation routes a decision a seat cannot make alone.
|
|
43152
43161
|
|
|
43153
43162
|
- File and triage: \`{{cli}} friction file ...\` / \`friction.file_issue\` (seat) / \`rost_file_issue\`; list with \`{{cli}} friction list --status open --json\` / \`friction.list\` / \`rost_list_friction_issues\`; move between open and diagnosing with \`friction.update_status\` / \`rost_update_friction_issue_status\`.
|
|
43154
|
-
- Carry the work as a task: \`task.create\` / \`rost_create_task\` (a commitment between seats; agent
|
|
43163
|
+
- Carry the work as a task: \`task.create\` / \`rost_create_task\` (a commitment between seats). \`task.create\` is \`none\` (no confirmation gate), so an agent can file one directly; an agent's task lands as a **draft** proposal (\`origin: agent_proposal\`) for a human to review and hand off \u2014 not a live offer in the owning seat's accept/decline queue. A seat runs its queue with \`{{cli}} task list|accept|decline|complete\` (\`task.list\`, \`task.accept\`, \`task.decline\`, \`task.complete\`). Link a task to an issue with \`friction.link_task\` / \`rost_link_task_to_friction_issue\`.
|
|
43155
43164
|
- Route a decision: \`escalation.raise\` (seat) / \`rost_escalate\` sends approval-scope or must-escalate work to the Steward queue. Reads are \`escalation.list\` / \`escalation.get\`. See the steward queue guide for resolution.
|
|
43156
43165
|
|
|
43157
43166
|
## When to stop for confirmation
|
|
43158
43167
|
|
|
43159
|
-
\`friction.resolve
|
|
43168
|
+
\`friction.resolve\` is \`human_required\`; resolving an issue is a human decision. \`friction.link_task\`, \`task.create\`, \`task.accept\`, \`task.decline\`, and \`task.complete\` are \`none\`, so a seat files issues, creates commitments, and runs its own task queue directly. \`friction.update_status\`, \`escalation.raise\`, \`friction.file_issue\`, and \`friction.list\` are also not gated. An agent files Friction, proposes the task, and escalates; a human resolves.
|
|
43160
43169
|
|
|
43161
43170
|
## Resolution rule
|
|
43162
43171
|
|
|
@@ -43167,7 +43176,7 @@ Resolving Friction should produce one of four outcomes: a decision, a task, a Ch
|
|
|
43167
43176
|
order: 70,
|
|
43168
43177
|
title: "Steward queue guide",
|
|
43169
43178
|
summary: "How Stewards review escalations, approve agent boundaries, and keep agents accountable.",
|
|
43170
|
-
version: "2026-06-
|
|
43179
|
+
version: "2026-06-18.1",
|
|
43171
43180
|
public: true,
|
|
43172
43181
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43173
43182
|
stages: ["staffing", "operating_rhythm"],
|
|
@@ -43207,7 +43216,7 @@ Read the seat, Charter, evidence, and recommended action. Decide the narrow ques
|
|
|
43207
43216
|
The Steward reads the queue from any surface but decides as a human.
|
|
43208
43217
|
|
|
43209
43218
|
- Read: \`{{cli}} escalation list --json\` / \`escalation.list\` / \`rost_list_escalations\` (own steward chain for humans, own seat for agents). Read one with \`{{cli}} escalation get\` / \`escalation.get\` / \`rost_get_escalation\` \u2014 evidence, recommendation, and decision state.
|
|
43210
|
-
- Decide: \`{{cli}} escalation resolve\` / \`escalation.resolve\` and \`{{cli}} escalation reject\` / \`escalation.reject\`.
|
|
43219
|
+
- Decide: \`{{cli}} escalation resolve\` / \`escalation.resolve\` and \`{{cli}} escalation reject\` / \`escalation.reject\`. \`escalation.resolve\` and \`escalation.reject\` are \`none\` at the confirmation layer, but they are deliberately NOT exposed over MCP \u2014 \`decisions.decided_by\` must be a human, so there is no \`rost_resolve_escalation\` tool. They are kept human-only by that MCP exclusion plus the human-only \`decided_by\`, not by a confirmation gate. The CLI runs them as the authenticated human; an agent session must hand the decision to a person.
|
|
43211
43220
|
- Approve gated requests: when an escalation or Charter change produces a pending confirmation, the human approves with \`confirmation.approve\` (or rejects with \`confirmation.reject\`). Go-live runs through \`agent.go_live\`.
|
|
43212
43221
|
|
|
43213
43222
|
## When to stop for confirmation
|
|
@@ -43223,7 +43232,7 @@ Keep agent scope tight at first. Approve more autonomy only after evidence. Use
|
|
|
43223
43232
|
order: 71,
|
|
43224
43233
|
title: "Confirmations and human gates guide",
|
|
43225
43234
|
summary: "How {{brand}} routes authority-changing work through human confirmation, and why agents never approve their own requests.",
|
|
43226
|
-
version: "2026-06-
|
|
43235
|
+
version: "2026-06-18.1",
|
|
43227
43236
|
public: true,
|
|
43228
43237
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43229
43238
|
stages: ["graph_design", "charter_design", "staffing", "operating_rhythm"],
|
|
@@ -43247,10 +43256,12 @@ Keep agent scope tight at first. Approve more autonomy only after evidence. Use
|
|
|
43247
43256
|
|
|
43248
43257
|
## Confirmation levels
|
|
43249
43258
|
|
|
43250
|
-
- \`none\`:
|
|
43251
|
-
- \`human_required\`: a human must approve. Structural, staffing, resolution, and go-live commands (\`seat.
|
|
43252
|
-
- \`
|
|
43253
|
-
- \`
|
|
43259
|
+
- \`none\`: no confirmation gate \u2014 the command never returns a pending confirmation. Most are reads or reversible drafts an agent can run directly, including over MCP (graph reads, \`charter.draft\`, \`status.record\`, \`sync.brief.compile\`, \`sync.run.start\`, \`task.complete\`). A few \`none\` commands still require a human actor or an interactive channel \u2014 \`confirmation.approve\` is \`none\` (approving a gate cannot itself be gated) yet runs only as a human in the UI or CLI \u2014 so \`none\` means "no confirmation gate", not always "agent-callable".
|
|
43260
|
+
- \`human_required\`: a human must approve. Structural, staffing, resolution, and go-live commands (\`seat.reparent\`, \`charter.approve\`, \`goal.reparent\`, \`friction.resolve\`, \`agent.go_live\`, \`mcp_token.create\`).
|
|
43261
|
+
- \`credential_flow\`: routes through the vault-backed credential path so a secret is captured as a vault reference, never stored or logged in the clear (\`credential.ingress\`, \`tenant.anthropic_key.save\`; \`agent.configure_tools\` is \`credential_flow\` too \u2014 it stages credential-ingress requests through the same path without ever taking raw secret material).
|
|
43262
|
+
- \`dangerous\`: the highest-risk human gate. Only two commands carry it \u2014 \`settings.update\` and \`agent.decommission\`.
|
|
43263
|
+
|
|
43264
|
+
The \`dangerous\` confirmation **level** is rare and is not the same as the **risk badge** a pending confirmation can display. The badge shows "dangerous" whenever a command's confirmation level is \`dangerous\` **or** the command redacts secrets (its audit redaction is \`secret_strict\`), so a \`credential_flow\` command such as \`credential.ingress\` shows the dangerous badge while still gating through the credential path \u2014 not the \`dangerous\` level. Read the badge as "handle with care" and the confirmation level as "who must approve". \`confirmation.approve\` and \`confirmation.reject\` are themselves \`none\` \u2014 approving a gate cannot itself require approval.
|
|
43254
43265
|
|
|
43255
43266
|
## What a gated command returns over MCP
|
|
43256
43267
|
|
|
@@ -43389,7 +43400,7 @@ Every notification should include the seat, cause, evidence, and requested decis
|
|
|
43389
43400
|
order: 75,
|
|
43390
43401
|
title: "Local runner guide",
|
|
43391
43402
|
summary: "How local agent sessions and runner surfaces should operate through {{brand}} without bypassing Charters or audit.",
|
|
43392
|
-
version: "2026-06-
|
|
43403
|
+
version: "2026-06-18.1",
|
|
43393
43404
|
public: true,
|
|
43394
43405
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43395
43406
|
stages: ["staffing", "operating_rhythm"],
|
|
@@ -43424,7 +43435,7 @@ The local runner is for human-controlled local agent work. It should retrieve {{
|
|
|
43424
43435
|
|
|
43425
43436
|
## When to stop for confirmation
|
|
43426
43437
|
|
|
43427
|
-
\`runner.
|
|
43438
|
+
\`runner.revoke\` and \`work_order.cancel\` are \`human_required\`; \`runner.pairing.start\` and \`work_order.enqueue\` are \`none\`, so an operator can pair a runner and queue work directly. List and status reads are not gated. Revoking a runner or cancelling work is the human-approved act. An agent inspects runner state and proposes the action.
|
|
43428
43439
|
|
|
43429
43440
|
## Guardrails
|
|
43430
43441
|
|
|
@@ -43545,7 +43556,7 @@ Templates may draft. Humans approve. A stock agent should not go live until a hu
|
|
|
43545
43556
|
order: 77,
|
|
43546
43557
|
title: "Troubleshooting guide",
|
|
43547
43558
|
summary: "How users and agents should diagnose common setup, tool, Signal, Friction, and MCP problems.",
|
|
43548
|
-
version: "2026-06-18.
|
|
43559
|
+
version: "2026-06-18.4",
|
|
43549
43560
|
public: true,
|
|
43550
43561
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
43551
43562
|
stages: ["company_setup", "staffing", "operating_rhythm"],
|
|
@@ -43604,7 +43615,7 @@ These are the common blockers when adding an agent (see the add-agents guide and
|
|
|
43604
43615
|
|
|
43605
43616
|
## When to stop for confirmation
|
|
43606
43617
|
|
|
43607
|
-
Most reads are safe to run while diagnosing. Any fix that changes authority, credentials, go-live state, or a durable decision is \`human_required\` or \`dangerous\` and routes through \`confirmation.approve
|
|
43618
|
+
Most reads are safe to run while diagnosing. Any fix that changes authority, credentials, go-live state, or a durable decision is gated \u2014 \`human_required\`, \`credential_flow\`, or \`dangerous\` \u2014 and routes through a human confirmation (\`confirmation.approve\`). Diagnose freely; stop before approving.
|
|
43608
43619
|
|
|
43609
43620
|
## Agent guidance
|
|
43610
43621
|
|
|
@@ -43843,7 +43854,7 @@ A consultancy's purpose might be "Make expert tax guidance affordable for first-
|
|
|
43843
43854
|
order: 31,
|
|
43844
43855
|
title: "Charter authoring deep-dive",
|
|
43845
43856
|
summary: "The full Charter document contract field by field \u2014 decision authority, escalation, measurables, budget, permissions \u2014 with worked examples for human, agent, and hybrid seats.",
|
|
43846
|
-
version: "2026-06-
|
|
43857
|
+
version: "2026-06-18.1",
|
|
43847
43858
|
public: true,
|
|
43848
43859
|
audiences: ["cli", "mcp", "in_app_agent"],
|
|
43849
43860
|
stages: ["charter_design", "staffing"],
|
|
@@ -43887,7 +43898,7 @@ A Charter is a seat's executable operating contract. On the CLI and MCP path you
|
|
|
43887
43898
|
- **decision_authority** \u2014 the heart of the contract, split three ways:
|
|
43888
43899
|
- **autonomous** \u2014 what the seat may do without asking. Each item is \`{ action, condition, rationale, unanswered_boundary }\`. Only reversible, low-risk, in-scope actions belong here. An autonomous item must have \`unanswered_boundary: false\` \u2014 the schema rejects an autonomous item with an unanswered boundary (push it to escalate instead).
|
|
43889
43900
|
- **approval** \u2014 the can-do-with-a-yes set: durable, money-moving, external-send, staffing, or policy actions that require explicit human approval. Name the **threshold** in the \`condition\` (e.g. "before posting or sending," "over $5,000").
|
|
43890
|
-
- **escalate** (1+) \u2014 the must-ask set: ambiguous authority, irreversible actions, credentials, legal or financial exposure, customer-impacting exceptions. At least one escalate item
|
|
43901
|
+
- **escalate** (1+) \u2014 the must-ask set: ambiguous authority, irreversible actions, credentials, legal or financial exposure, customer-impacting exceptions. At least one escalate item should carry \`unanswered_boundary: true\` so unresolved boundaries default conservative. The submit schema does not strictly require it, but the direct submit path (\`charter.update_draft\` / \`charter.set\`) does not add one for you \u2014 it only records the boundaries you flag \u2014 so include one whenever a boundary is unresolved.
|
|
43891
43902
|
- **escalation_rules** (1+) \u2014 plain-language rules that trigger escalation, beyond the structured authority items. "Escalate any invoice over $5,000 or from a vendor not already in the ledger."
|
|
43892
43903
|
- **measurables** (1+) \u2014 each \`{ name, target, cadence, source }\`. A measurable must measure the accountability, not vanity. \`cadence\` is \`daily|weekly|monthly|quarterly\`; \`source\` is \`human|agent|integration\`. Agent-sourced readings are unconfirmed until a human confirms them.
|
|
43893
43904
|
- **permission_manifest** \u2014 each \`{ tool, scope, granted, rationale }\`. Map each accountability to the narrowest tool scope that performs it. Prefer draft/read scopes; a send or spend scope is a deliberate, justified grant. The manifest is what the tool-guard enforces and what a human signs.
|
|
@@ -44268,9 +44279,14 @@ var mcpTokenListEntrySchema = external_exports.object({
|
|
|
44268
44279
|
var mcpTokenListOutputSchema = external_exports.object({
|
|
44269
44280
|
tokens: external_exports.array(mcpTokenListEntrySchema)
|
|
44270
44281
|
}).passthrough();
|
|
44282
|
+
var approveViaSchema = external_exports.object({
|
|
44283
|
+
webUrl: external_exports.string().min(1).optional(),
|
|
44284
|
+
cliCommand: external_exports.string().min(1).optional()
|
|
44285
|
+
}).passthrough();
|
|
44271
44286
|
var pendingConfirmationSchema = external_exports.object({
|
|
44272
44287
|
confirmationId: external_exports.string().min(1),
|
|
44273
|
-
commandId: external_exports.string().min(1)
|
|
44288
|
+
commandId: external_exports.string().min(1),
|
|
44289
|
+
approveVia: approveViaSchema.optional().catch(void 0)
|
|
44274
44290
|
}).passthrough();
|
|
44275
44291
|
var confirmationApprovalOutputSchema = external_exports.object({
|
|
44276
44292
|
confirmation_id: external_exports.string().min(1),
|
|
@@ -44286,6 +44302,7 @@ function parseMcpInstallOptions(args) {
|
|
|
44286
44302
|
let expiresInDays;
|
|
44287
44303
|
let noExpiry = false;
|
|
44288
44304
|
let rotateTokenId;
|
|
44305
|
+
let skipPermissions = false;
|
|
44289
44306
|
for (let index = 0; index < args.length; index += 1) {
|
|
44290
44307
|
const arg = args[index];
|
|
44291
44308
|
if (arg === "--client") {
|
|
@@ -44308,6 +44325,8 @@ function parseMcpInstallOptions(args) {
|
|
|
44308
44325
|
index += 1;
|
|
44309
44326
|
} else if (arg === "--json") {
|
|
44310
44327
|
json2 = true;
|
|
44328
|
+
} else if (arg === "--skip-permissions") {
|
|
44329
|
+
skipPermissions = true;
|
|
44311
44330
|
} else {
|
|
44312
44331
|
throw new Error(`Unknown mcp install option: ${arg}`);
|
|
44313
44332
|
}
|
|
@@ -44328,24 +44347,71 @@ function parseMcpInstallOptions(args) {
|
|
|
44328
44347
|
...seatId === void 0 ? {} : { seatId },
|
|
44329
44348
|
json: json2,
|
|
44330
44349
|
expiry,
|
|
44331
|
-
...rotateTokenId === void 0 ? {} : { rotateTokenId }
|
|
44350
|
+
...rotateTokenId === void 0 ? {} : { rotateTokenId },
|
|
44351
|
+
skipPermissions
|
|
44332
44352
|
};
|
|
44333
44353
|
}
|
|
44334
44354
|
var MISSING_SCOPE_MESSAGE = `${cliBrand.binName} mcp install requires an explicit --scope. Choose: --scope seat --seat-id <id> (narrower \u2014 limited to one seat's Charter and permission manifest; prefer this for day-to-day operation), or --scope tenant-admin (can administer the whole company \u2014 reserve it for initial setup). Find a seat id with: ${cliBrand.binName} command graph.get --json '{}'.`;
|
|
44335
44355
|
var MCP_TOKEN_CAUTION = "Security: this minted MCP token is a live credential that lands in the client's plaintext config \u2014 prefer the narrowest scope (--scope seat --seat-id <id>) and revoke it immediately if it leaks.";
|
|
44336
44356
|
var NO_EXPIRY_WARNING = "Warning: --no-expiry mints a token with no practical expiry (a ~100-year TTL). This is a long-lived credential by choice \u2014 rotate it deliberately and revoke immediately if it leaks.";
|
|
44357
|
+
var PendingConfirmationError = class extends Error {
|
|
44358
|
+
confirmationId;
|
|
44359
|
+
commandId;
|
|
44360
|
+
approveCommand;
|
|
44361
|
+
approveUrl;
|
|
44362
|
+
constructor(input) {
|
|
44363
|
+
super(`Pending human approval for ${input.commandId} (confirmation ${input.confirmationId}).`);
|
|
44364
|
+
this.name = "PendingConfirmationError";
|
|
44365
|
+
this.confirmationId = input.confirmationId;
|
|
44366
|
+
this.commandId = input.commandId;
|
|
44367
|
+
this.approveCommand = input.approveCommand;
|
|
44368
|
+
if (input.approveUrl !== void 0) {
|
|
44369
|
+
this.approveUrl = input.approveUrl;
|
|
44370
|
+
}
|
|
44371
|
+
}
|
|
44372
|
+
// The multi-line human-handoff message rendered on stderr by the caller. It
|
|
44373
|
+
// names the gated command, the confirmation id, the exact approve command, and
|
|
44374
|
+
// the approveVia URL when the server provided one.
|
|
44375
|
+
toHandoffMessage() {
|
|
44376
|
+
const isRevoke = this.commandId === "mcp_token.revoke";
|
|
44377
|
+
const lines = isRevoke ? [
|
|
44378
|
+
`Pending human approval: revoking the old token (${this.commandId}) requires a human to approve confirmation ${this.confirmationId}.`,
|
|
44379
|
+
"The new token was minted and registered, but the OLD token is still live until its revocation is approved.",
|
|
44380
|
+
`Approve the revocation: ${this.approveCommand}`
|
|
44381
|
+
] : [
|
|
44382
|
+
`Pending human approval: ${this.commandId} requires a human to approve confirmation ${this.confirmationId} before the MCP token is minted.`,
|
|
44383
|
+
"This is a non-interactive session and --skip-permissions is not set, so nothing was minted yet.",
|
|
44384
|
+
// confirmation.approve EXECUTES the deferred mint and returns the token in
|
|
44385
|
+
// its own output (shown once) — it does not just unlock a re-run. So the
|
|
44386
|
+
// approver registers the token from that output; re-running mcp install
|
|
44387
|
+
// would start a SECOND mint and orphan the first.
|
|
44388
|
+
`A human approves with: ${this.approveCommand} \u2014 this mints the token and returns it in that command's output (shown once). Register it with your client from there; do not re-run mcp install afterward (that starts a new mint).`
|
|
44389
|
+
];
|
|
44390
|
+
if (this.approveUrl !== void 0) {
|
|
44391
|
+
lines.push(`Or approve in a browser: ${this.approveUrl}`);
|
|
44392
|
+
}
|
|
44393
|
+
lines.push(
|
|
44394
|
+
`To auto-approve inline in a headless session instead, pass --skip-permissions or set ${brandEnvKey3("CLI_SKIP_PERMISSIONS")}=1 (a deliberate loosening).`
|
|
44395
|
+
);
|
|
44396
|
+
return lines.join("\n");
|
|
44397
|
+
}
|
|
44398
|
+
};
|
|
44399
|
+
function brandEnvKey3(suffix) {
|
|
44400
|
+
return `${cliBrand.envPrefix}_${suffix}`;
|
|
44401
|
+
}
|
|
44337
44402
|
async function renderMcpInstall(input) {
|
|
44338
44403
|
const stderrLines = [];
|
|
44404
|
+
const canAutoApprove = input.canAutoApprove ?? false;
|
|
44339
44405
|
if (input.options.rotateTokenId === void 0 && input.options.scope === void 0) {
|
|
44340
44406
|
throw new Error(MISSING_SCOPE_MESSAGE);
|
|
44341
44407
|
}
|
|
44342
|
-
const mintScope = input.options.rotateTokenId === void 0 ? { scope: input.options.scope, ...input.options.seatId === void 0 ? {} : { seatId: input.options.seatId } } : await resolveRotationScope(input.client, input.options);
|
|
44343
|
-
const token = await createMcpToken(input.client, mcpTokenCreateBody(mintScope, input.options.expiry));
|
|
44408
|
+
const mintScope = input.options.rotateTokenId === void 0 ? { scope: input.options.scope, ...input.options.seatId === void 0 ? {} : { seatId: input.options.seatId } } : await resolveRotationScope(input.client, input.options, canAutoApprove);
|
|
44409
|
+
const token = await createMcpToken(input.client, mcpTokenCreateBody(mintScope, input.options.expiry), canAutoApprove);
|
|
44344
44410
|
let rotationOldRevoked = null;
|
|
44345
44411
|
if (input.options.rotateTokenId !== void 0) {
|
|
44346
44412
|
const oldTokenId = input.options.rotateTokenId;
|
|
44347
44413
|
try {
|
|
44348
|
-
const output = await executeWithConfirmation(input.client, "mcp_token.revoke", { token_id: oldTokenId });
|
|
44414
|
+
const output = await executeWithConfirmation(input.client, "mcp_token.revoke", { token_id: oldTokenId }, canAutoApprove);
|
|
44349
44415
|
const revoke = mcpTokenRevokeOutputSchema.safeParse(output);
|
|
44350
44416
|
rotationOldRevoked = revoke.success && revoke.data.revoked === true;
|
|
44351
44417
|
if (!rotationOldRevoked) {
|
|
@@ -44355,6 +44421,9 @@ async function renderMcpInstall(input) {
|
|
|
44355
44421
|
);
|
|
44356
44422
|
}
|
|
44357
44423
|
} catch (error51) {
|
|
44424
|
+
if (error51 instanceof PendingConfirmationError) {
|
|
44425
|
+
throw error51;
|
|
44426
|
+
}
|
|
44358
44427
|
rotationOldRevoked = false;
|
|
44359
44428
|
stderrLines.push(
|
|
44360
44429
|
`Warning: the new token (${token.token_id}) was minted, but revoking the old token (${oldTokenId}) failed: ${revokeFailureReason(error51)}. It is still live. Revoke it by hand: ${cliBrand.binName} command mcp_token.revoke --json '{"token_id":"${oldTokenId}"}'`
|
|
@@ -44423,9 +44492,9 @@ function mcpTokenCreateBody(mint, expiry) {
|
|
|
44423
44492
|
}
|
|
44424
44493
|
return base;
|
|
44425
44494
|
}
|
|
44426
|
-
async function resolveRotationScope(client, options) {
|
|
44495
|
+
async function resolveRotationScope(client, options, canAutoApprove) {
|
|
44427
44496
|
const oldTokenId = options.rotateTokenId;
|
|
44428
|
-
const listOutput = await executeWithConfirmation(client, "mcp_token.list", { include_revoked: true });
|
|
44497
|
+
const listOutput = await executeWithConfirmation(client, "mcp_token.list", { include_revoked: true }, canAutoApprove);
|
|
44429
44498
|
const parsed = mcpTokenListOutputSchema.safeParse(listOutput);
|
|
44430
44499
|
if (!parsed.success) {
|
|
44431
44500
|
throw new Error("Could not read the token list to rotate \u2014 mcp_token.list returned an unexpected shape.");
|
|
@@ -44488,11 +44557,11 @@ function revokeFailureReason(error51) {
|
|
|
44488
44557
|
}
|
|
44489
44558
|
return "unknown error";
|
|
44490
44559
|
}
|
|
44491
|
-
async function createMcpToken(client, body) {
|
|
44492
|
-
const output = await executeWithConfirmation(client, "mcp_token.create", body);
|
|
44560
|
+
async function createMcpToken(client, body, canAutoApprove) {
|
|
44561
|
+
const output = await executeWithConfirmation(client, "mcp_token.create", body, canAutoApprove);
|
|
44493
44562
|
return mcpTokenOutputSchema.parse(output);
|
|
44494
44563
|
}
|
|
44495
|
-
async function executeWithConfirmation(client, commandId, body) {
|
|
44564
|
+
async function executeWithConfirmation(client, commandId, body, canAutoApprove) {
|
|
44496
44565
|
try {
|
|
44497
44566
|
const result = await client.execute(commandId, body);
|
|
44498
44567
|
return result.output;
|
|
@@ -44501,6 +44570,14 @@ async function executeWithConfirmation(client, commandId, body) {
|
|
|
44501
44570
|
if (!pending) {
|
|
44502
44571
|
throw error51;
|
|
44503
44572
|
}
|
|
44573
|
+
if (!canAutoApprove) {
|
|
44574
|
+
throw new PendingConfirmationError({
|
|
44575
|
+
confirmationId: pending.confirmationId,
|
|
44576
|
+
commandId: pending.commandId,
|
|
44577
|
+
approveCommand: `${cliBrand.binName} command confirmation.approve --json '{"confirmation_id":"${pending.confirmationId}"}'`,
|
|
44578
|
+
...pending.approveVia?.webUrl === void 0 ? {} : { approveUrl: pending.approveVia.webUrl }
|
|
44579
|
+
});
|
|
44580
|
+
}
|
|
44504
44581
|
const approved = await client.execute("confirmation.approve", {
|
|
44505
44582
|
confirmation_id: pending.confirmationId
|
|
44506
44583
|
});
|
|
@@ -44873,6 +44950,20 @@ function field(record2, key) {
|
|
|
44873
44950
|
}
|
|
44874
44951
|
return String(value);
|
|
44875
44952
|
}
|
|
44953
|
+
function formatDryRunTranscript(value) {
|
|
44954
|
+
const transcript = asRecord(value);
|
|
44955
|
+
const steps = asArray(transcript.steps);
|
|
44956
|
+
if (steps.length === 0) {
|
|
44957
|
+
return "";
|
|
44958
|
+
}
|
|
44959
|
+
const lines = steps.map((step) => {
|
|
44960
|
+
const record2 = asRecord(step);
|
|
44961
|
+
const kind = field(record2, "kind");
|
|
44962
|
+
const guard = record2.guard === null || record2.guard === void 0 ? "" : ` [${field(record2, "guard")}]`;
|
|
44963
|
+
return ` ${kind}: ${field(record2, "text")}${guard}`;
|
|
44964
|
+
});
|
|
44965
|
+
return ["rehearsal:", ...lines].join("\n");
|
|
44966
|
+
}
|
|
44876
44967
|
function markdownLine(output) {
|
|
44877
44968
|
const markdown = asRecord(output).markdown;
|
|
44878
44969
|
return typeof markdown === "string" ? markdown : JSON.stringify(output, null, 2);
|
|
@@ -45590,8 +45681,9 @@ var agentWrapper = (context, args) => dispatch(context, "agent", args, {
|
|
|
45590
45681
|
};
|
|
45591
45682
|
return execute(ctx, parsed, "agent.run_dry_run", body, (output) => {
|
|
45592
45683
|
const record2 = asRecord(output);
|
|
45593
|
-
|
|
45684
|
+
const header = `dry run for seat ${field(record2, "seat_id")} (charter ${field(record2, "charter_version_id")}): ${field(record2, "status")} (reused=${field(record2, "reused")})
|
|
45594
45685
|
${field(record2, "summary")}`;
|
|
45686
|
+
return [header, formatDryRunTranscript(record2.transcript)].filter((part) => part.length > 0).join("\n");
|
|
45595
45687
|
});
|
|
45596
45688
|
},
|
|
45597
45689
|
"go-live": (ctx, rest) => {
|
|
@@ -45865,7 +45957,15 @@ function ensureTrailingSlash2(value) {
|
|
|
45865
45957
|
|
|
45866
45958
|
// src/index.ts
|
|
45867
45959
|
async function main(argv = process.argv.slice(2), options = {}) {
|
|
45868
|
-
const io = options.io ?? {
|
|
45960
|
+
const io = options.io ?? {
|
|
45961
|
+
stdout: process.stdout,
|
|
45962
|
+
stderr: process.stderr,
|
|
45963
|
+
// DER-832: an interactive session is a human at a real terminal — BOTH stdin
|
|
45964
|
+
// and stdout must be TTYs. A piped/headless/agent session fails this and so
|
|
45965
|
+
// will not auto-approve its own mint/revoke confirmation unless skip-
|
|
45966
|
+
// permissions is explicitly enabled.
|
|
45967
|
+
interactive: process.stdin.isTTY === true && process.stdout.isTTY === true
|
|
45968
|
+
};
|
|
45869
45969
|
const login = options.login ?? loginWithBrowser;
|
|
45870
45970
|
const deviceLogin = options.deviceLogin ?? loginWithDeviceCode;
|
|
45871
45971
|
const [rawCommand, ...args] = argv;
|
|
@@ -46152,23 +46252,28 @@ async function executeOnboard(io, client, args) {
|
|
|
46152
46252
|
`);
|
|
46153
46253
|
return 1;
|
|
46154
46254
|
}
|
|
46155
|
-
async function executeMcp(io, client, appUrl2, args) {
|
|
46255
|
+
async function executeMcp(io, client, appUrl2, args, env = process.env) {
|
|
46156
46256
|
if (args[0] !== "install") {
|
|
46157
46257
|
io.stderr.write(
|
|
46158
46258
|
`Usage:
|
|
46159
|
-
${cliBrand.binName} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry]
|
|
46259
|
+
${cliBrand.binName} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry] [--skip-permissions]
|
|
46160
46260
|
Direct install \u2014 --scope is required (seat is narrower; prefer it for day-to-day).
|
|
46161
|
-
${cliBrand.binName} mcp install --client claude-code|codex|cursor --rotate <old-token-id>
|
|
46261
|
+
${cliBrand.binName} mcp install --client claude-code|codex|cursor --rotate <old-token-id> [--skip-permissions]
|
|
46162
46262
|
Rotate in place \u2014 inherits the old token's scope, so do not pass --scope.
|
|
46263
|
+
--skip-permissions (or ${cliBrand.envPrefix}_CLI_SKIP_PERMISSIONS=1) auto-approves the token-mint confirmation in a non-interactive session.
|
|
46163
46264
|
`
|
|
46164
46265
|
);
|
|
46165
46266
|
return 1;
|
|
46166
46267
|
}
|
|
46167
46268
|
try {
|
|
46269
|
+
const options = parseMcpInstallOptions(args.slice(1));
|
|
46270
|
+
const envSkipPermissions = env[`${cliBrand.envPrefix}_CLI_SKIP_PERMISSIONS`] === "1";
|
|
46271
|
+
const canAutoApprove = io.interactive === true || options.skipPermissions || envSkipPermissions;
|
|
46168
46272
|
const rendered = await renderMcpInstall({
|
|
46169
46273
|
client,
|
|
46170
46274
|
appUrl: appUrl2,
|
|
46171
|
-
options
|
|
46275
|
+
options,
|
|
46276
|
+
canAutoApprove
|
|
46172
46277
|
});
|
|
46173
46278
|
io.stdout.write(rendered.stdout);
|
|
46174
46279
|
if (rendered.stderr) {
|
|
@@ -46176,6 +46281,11 @@ async function executeMcp(io, client, appUrl2, args) {
|
|
|
46176
46281
|
}
|
|
46177
46282
|
return 0;
|
|
46178
46283
|
} catch (error51) {
|
|
46284
|
+
if (error51 instanceof PendingConfirmationError) {
|
|
46285
|
+
io.stderr.write(`${redactForLog(error51.toHandoffMessage())}
|
|
46286
|
+
`);
|
|
46287
|
+
return 1;
|
|
46288
|
+
}
|
|
46179
46289
|
if (error51 instanceof CommandClientError) {
|
|
46180
46290
|
return printCommandError(io, error51);
|
|
46181
46291
|
}
|
|
@@ -46289,8 +46399,9 @@ function printUsage(io) {
|
|
|
46289
46399
|
...operationUsageLines(cliBrand.binName),
|
|
46290
46400
|
`${cliBrand.binName} onboard status`,
|
|
46291
46401
|
`${cliBrand.binName} onboard run`,
|
|
46292
|
-
`${cliBrand.binName} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry]`,
|
|
46402
|
+
`${cliBrand.binName} mcp install --client claude-code|codex|cursor --scope tenant-admin|seat [--seat-id <id>] [--expires-in <days>|--no-expiry] [--skip-permissions]`,
|
|
46293
46403
|
`${cliBrand.binName} mcp install --client claude-code|codex|cursor --rotate <old-token-id> (inherits the old token's scope; no --scope)`,
|
|
46404
|
+
`${cliBrand.binName} mcp install ... --skip-permissions (or ${cliBrand.envPrefix}_CLI_SKIP_PERMISSIONS=1 \u2014 auto-approves the token-mint confirmation in a non-interactive session)`,
|
|
46294
46405
|
`${cliBrand.binName} init [--client claude-code|codex|cursor] (defaults --scope tenant-admin)`,
|
|
46295
46406
|
`${cliBrand.binName} docs`,
|
|
46296
46407
|
`${cliBrand.binName} reference <list|search|get> [options]`,
|