@rosthq/cli 0.7.137 → 0.7.139
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/commands/onboarding.d.ts.map +1 -1
- package/dist/generator/manifest-types.d.ts +1 -0
- package/dist/generator/manifest-types.d.ts.map +1 -1
- package/dist/generator/runtime.d.ts +7 -1
- package/dist/generator/runtime.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +582 -547
- package/dist/index.js.map +4 -4
- package/dist/operations.d.ts +1 -1
- package/dist/operations.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53706,7 +53706,7 @@ External connectors are being rolled out provider by provider, conservatively (r
|
|
|
53706
53706
|
order: 48,
|
|
53707
53707
|
title: "CLI and MCP installation guide",
|
|
53708
53708
|
summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
|
|
53709
|
-
version: "2026-07-
|
|
53709
|
+
version: "2026-07-31.1",
|
|
53710
53710
|
public: true,
|
|
53711
53711
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
53712
53712
|
stages: ["company_setup", "staffing"],
|
|
@@ -54293,7 +54293,7 @@ These ergonomic wrappers (including the \`{{cli}} agent\` group) require **{{cli
|
|
|
54293
54293
|
|
|
54294
54294
|
**Generated verbs (0.6.0+).** Every registry command now has a first-class \`{{cli}} <namespace> <action>\` verb, projected directly from the command's input schema \u2014 so namespaces that previously had no ergonomic wrapper (for example \`{{cli}} measurable create\`, \`{{cli}} work_order enqueue\`, \`{{cli}} mcp_token create\`) are usable without dropping to the raw \`command <id>\` path. Flags follow the schema field names (\`--seat-id\`, \`--name\`, \u2026); read a command's exact input offline with \`{{cli}} <namespace> <action> --schema\` before calling it, and pass a nested payload with \`--input '<json>'\` or \`--input-file <path>\` (a JSON file read client-side) when a field is a complex object \u2014 explicit field flags merge on top of either payload form. On these generated verbs, a flag the verb does not support is a usage error naming the flag before anything is sent, never silently ignored (the bespoke handler verbs, such as \`status record\` and \`agent create\`, still parse flags by hand and are being hardened separately). \`--json\` still selects machine output, \`--seat <id>\` still sets seat scope, and \`{{cli}} command <id> --json '<body>'\` remains the universal fallback.
|
|
54295
54295
|
|
|
54296
|
-
For a complete Seat, inspect \`{{cli}} seat create-complete --schema\`, then pass the strict nested request with \`{{cli}} seat create-complete --input '<json>' --json\`. The generic \`{{cli}} command seat.create_complete --json '<json>'\` path and the generated MCP tool \`rost_create_complete_seat\` expose the same registry schema and server-side command. \`seat create-complete\` authenticates with an existing implementation-bootstrap credential first (it is one of the vetted bootstrap staging primitives) and falls back to the user session. Staging
|
|
54296
|
+
For a complete Seat, inspect \`{{cli}} seat create-complete --schema\`, then pass the strict nested request with \`{{cli}} seat create-complete --input '<json>' --json\`. The generic \`{{cli}} command seat.create_complete --json '<json>'\` path and the generated MCP tool \`rost_create_complete_seat\` expose the same registry schema and server-side command. \`seat create-complete\` authenticates with an existing implementation-bootstrap credential first (it is one of the vetted bootstrap staging primitives) and falls back to the user session. Staging is the success outcome for this verb: the CLI exits 0 and prints the pending confirmation id and the exact approval URL (\`Approve once: <url>\`), and with \`--json\` it prints the pending-confirmation object verbatim for machines \u2014 the command has done its job at that point. The raw \`{{cli}} command seat.create_complete --json '<json>'\` path renders staging the same way \u2014 the pending-confirmation JSON on stdout, exit 0. The human owner reviews one card covering the Seat, canonical Charter and permission manifest, disclosed staffing, effective agent lane/readiness, exact pinned Skill versions and dependency state, and schedule. Approval applies the proposal in one transaction and returns its application and receipt ids. Any failure rolls back the whole proposal. An optional agent remains in \`dry_run\`; this command never approves go-live. Direct calls use existing parent and Steward Seat ids\u2014logical references are reserved for the later composite onboarding flow. Retained source ingestion is not available on this direct command yet, so \`sources\` and every \`source_uses\` collection must be empty and planned staffing must omit \`source_ref\`; the command rejects source-backed provenance instead of accepting an unverified upload id or caller-supplied digest.
|
|
54297
54297
|
|
|
54298
54298
|
The signed-in app exposes the same Skill command surface at **Skills**, linked from the Agents page (the nav collapse moved it out of the primary sidebar). Use \`/skills\` to filter the tenant library, \`/skills/new\` to build canonical \`SKILL.md\` frontmatter with \`tool.catalog\` dependencies, \`/skills/import\` for bounded GitHub or upload imports, and each Skill detail page to review validation, publish, check Seat dependencies, and assign a published version. During \`/agents/new\`, \`agent_setup.get\` can return \`next_action: "choose_skills"\`; selected Skills are proposed immutable-version assignments and required Skill tools block sign-off/go-live until tool configuration is ready.
|
|
54299
54299
|
|
|
@@ -58590,8 +58590,8 @@ var COMMAND_MANIFEST = [
|
|
|
58590
58590
|
{ "id": "agent.activation_receipt", "namespace": "agent", "action": "activation_receipt", "title": "Build agent activation receipt", "description": "Read the compiled authority receipt for one agent: effective capabilities, connection metadata, stale-scope digest, budget, and always-human boundary.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "agent_id", "flag": "agent-id", "type": "string", "required": true }, { "name": "proposed_budget_cents", "flag": "proposed-budget-cents", "type": "integer", "required": false }], "hasComplexInput": false, "help": "Build the current compiled activation receipt before signing or creating a Trusted grant. Rebuild it after any Charter, capability, connection, schedule, or lane change." },
|
|
58591
58591
|
{ "id": "agent.activation_sign", "namespace": "agent", "action": "activation_sign", "title": "Sign agent activation receipt", "description": "Human steward/admin activation sign-off for the current compiled receipt digest. Refuses stale receipts and records a human decision plus append-only event.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "agent_id", "flag": "agent-id", "type": "string", "required": true }, { "name": "expected_scope_digest", "flag": "expected-scope-digest", "type": "string", "required": true }, { "name": "budget_cents", "flag": "budget-cents", "type": "integer", "required": true }, { "name": "reason", "flag": "reason", "type": "string", "required": false }], "hasComplexInput": false, "help": "Human steward/admin sign-off for the exact activation receipt digest. Agents can surface the pending confirmation but cannot sign their own authority." },
|
|
58592
58592
|
{ "id": "agent.configure_tools", "namespace": "agent", "action": "configure_tools", "title": "Configure agent tools", "description": "Save tool proposals, declines, and credential-ingress requests for a draft agent. Never stores or echoes secret material; vault refs only.", "requiredScope": "seat", "confirmation": "credential_flow", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }], "hasComplexInput": true, "help": "Connect or decline proposed tools and stage credential-ingress requests; never place raw secrets here \u2014 secrets flow through vault-backed credential.ingress as vault refs only.", "example": { "seat_id": "0190aaaa-aaaa-7aaa-8aaa-aaaaaaaaaaaa", "tool_decisions": [{ "tool": "ap.invoices.read", "decision": "connect" }, { "tool": "email.draft", "decision": "connect" }] } },
|
|
58593
|
-
{ "id": "agent.create_custom", "namespace": "agent", "action": "create_custom", "title": "Create custom agent", "description": "Create a draft custom agent shell and a draft Charter seed from operational answers (what it owns, success, never-do-alone, steward).", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "steward_seat_id", "flag": "steward-seat-id", "type": "string", "required": false }, { "name": "lane", "flag": "lane", "type": "enum", "required": false, "enumValues": ["cloud", "mcp_session", "runner"] }, { "name": "what_it_owns", "flag": "what-it-owns", "type": "string", "required": false }, { "name": "what_success_looks_like", "flag": "what-success-looks-like", "type": "string", "required": false }, { "name": "what_it_must_never_do_alone", "flag": "what-it-must-never-do-alone", "type": "string", "required": false }], "hasComplexInput": true, "help": "Create a draft custom agent from operational answers (what it owns, success, never-do-alone, steward); the Charter Builder owns the contract and go-live stays human-gated.", "example": { "seat_id": "0190aaaa-aaaa-7aaa-8aaa-aaaaaaaaaaaa", "steward_seat_id": "0190bbbb-bbbb-7bbb-8bbb-bbbbbbbbbbbb", "lane": "cloud", "what_it_owns": "Drafting AP invoice entries from inbound vendor emails for human review.", "what_success_looks_like": "Every inbound invoice is drafted within one business day with the correct GL coding.", "what_it_must_never_do_alone": "Never send payment or approve an invoice without a human sign-off." } },
|
|
58594
|
-
{ "id": "agent.create_from_template", "namespace": "agent", "action": "create_from_template", "title": "Create agent from template", "description": "Create a draft stock agent and draft Charter from a stock template. Creates the agent occupancy only when a human steward chain resolves; the agent stays draft until a signed manifest, a passed dry run, and human go-live.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "template_slug", "flag": "template-slug", "type": "string", "required": true }, { "name": "expected_template_version", "flag": "expected-template-version", "type": "string", "required": false }], "hasComplexInput": false, "help": "Create a draft stock agent and draft Charter from a template; the agent occupancy is created only when a human steward chain resolves, and the agent stays draft until a signed manifest, a passed dry run, and human go-live." },
|
|
58593
|
+
{ "id": "agent.create_custom", "namespace": "agent", "action": "create_custom", "title": "Create custom agent", "description": "Create a draft custom agent shell and a draft Charter seed from operational answers (what it owns, success, never-do-alone, steward).", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "steward_seat_id", "flag": "steward-seat-id", "type": "string", "required": false }, { "name": "lane", "flag": "lane", "type": "enum", "required": false, "enumValues": ["cloud", "mcp_session", "runner"] }, { "name": "what_it_owns", "flag": "what-it-owns", "type": "string", "required": false }, { "name": "what_success_looks_like", "flag": "what-success-looks-like", "type": "string", "required": false }, { "name": "what_it_must_never_do_alone", "flag": "what-it-must-never-do-alone", "type": "string", "required": false }], "hasComplexInput": true, "bootstrapStage": true, "help": "Create a draft custom agent from operational answers (what it owns, success, never-do-alone, steward); the Charter Builder owns the contract and go-live stays human-gated.", "example": { "seat_id": "0190aaaa-aaaa-7aaa-8aaa-aaaaaaaaaaaa", "steward_seat_id": "0190bbbb-bbbb-7bbb-8bbb-bbbbbbbbbbbb", "lane": "cloud", "what_it_owns": "Drafting AP invoice entries from inbound vendor emails for human review.", "what_success_looks_like": "Every inbound invoice is drafted within one business day with the correct GL coding.", "what_it_must_never_do_alone": "Never send payment or approve an invoice without a human sign-off." } },
|
|
58594
|
+
{ "id": "agent.create_from_template", "namespace": "agent", "action": "create_from_template", "title": "Create agent from template", "description": "Create a draft stock agent and draft Charter from a stock template. Creates the agent occupancy only when a human steward chain resolves; the agent stays draft until a signed manifest, a passed dry run, and human go-live.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "template_slug", "flag": "template-slug", "type": "string", "required": true }, { "name": "expected_template_version", "flag": "expected-template-version", "type": "string", "required": false }], "hasComplexInput": false, "bootstrapStage": true, "help": "Create a draft stock agent and draft Charter from a template; the agent occupancy is created only when a human steward chain resolves, and the agent stays draft until a signed manifest, a passed dry run, and human go-live." },
|
|
58595
58595
|
{ "id": "agent.decommission", "namespace": "agent", "action": "decommission", "title": "Decommission agent", "description": "Retire an agent occupancy safely. Blocks if it would leave another live agent without a human steward chain.", "requiredScope": "tenant", "confirmation": "dangerous", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "reason", "flag": "reason", "type": "string", "required": false }], "hasComplexInput": false, "help": "Retire an agent occupancy safely; the no-orphan guard blocks any decommission that would leave another live agent without a human steward chain." },
|
|
58596
58596
|
{ "id": "agent.fleet_digest", "namespace": "agent", "action": "fleet_digest", "title": "Get dogfood fleet health digest", "description": "Return a daily tenant fleet health digest with live/idle state, run counts, spend, failed runs, unresolved product errors, notification errors, and next actions.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "window_hours", "flag": "window-hours", "type": "integer", "required": false }, { "name": "error_limit", "flag": "error-limit", "type": "integer", "required": false }], "hasComplexInput": false, "help": "Capture a daily dogfood fleet health digest with fleet state, run counts, spend, failed runs, unresolved errors, failed notifications, and next actions." },
|
|
58597
58597
|
{ "id": "agent.get_run", "namespace": "agent", "action": "get_run", "title": "Get agent run diagnostics", "description": "Return one seat run's diagnostic record: run status, transcript reference, token/cost usage, outcome, and linked product-visible run errors.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }, { "name": "run_id", "flag": "run-id", "type": "string", "required": true }, { "name": "transcript", "flag": "transcript", "type": "boolean", "required": false }], "hasComplexInput": false, "help": "Read one run's diagnostic record, transcript reference, token/cost usage, outcome, and linked product-visible errors." },
|
|
@@ -58636,13 +58636,13 @@ var COMMAND_MANIFEST = [
|
|
|
58636
58636
|
{ "id": "command.list", "namespace": "command", "action": "list", "title": "List commands", "description": "List every callable command id with its title, required scope, confirmation gate, and onboarding stages. Use 'command.describe' for a single command's full contract.", "requiredScope": "user", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "List the callable command surface, then use command.describe for the exact contract of the one you need." },
|
|
58637
58637
|
{ "id": "compass.alignment", "namespace": "compass", "action": "alignment", "title": "Check Compass alignment", "description": "Advisory drift check: scores whether cycle goals still ladder up to the active vision and flags orphan/contradictory goals. Read-only \u2014 it never edits the Compass or any goal.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Advisory drift check: scores whether cycle goals still ladder to the active vision and flags orphan/contradictory goals. Read-only." },
|
|
58638
58638
|
{ "id": "compass.answer_gap", "namespace": "compass", "action": "answer_gap", "title": "Answer Compass gap", "description": "Record a human answer for a Compass gap and create a replacement draft.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "gap_id", "flag": "gap-id", "type": "string", "required": true }, { "name": "answer", "flag": "answer", "type": "string", "required": true }], "hasComplexInput": false, "help": "Answer Compass gaps with explicit human input before turning direction into graph, Charter, or Cascade decisions." },
|
|
58639
|
-
{ "id": "compass.approve_version", "namespace": "compass", "action": "approve_version", "title": "Approve Compass version", "description": "Activate a Compass version by supersession.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Compass approval is a human decision and should anchor later Cascade commitments." },
|
|
58639
|
+
{ "id": "compass.approve_version", "namespace": "compass", "action": "approve_version", "title": "Approve Compass version", "description": "Activate a Compass version by supersession.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": true }], "hasComplexInput": false, "bootstrapStage": true, "help": "Compass approval is a human decision and should anchor later Cascade commitments." },
|
|
58640
58640
|
{ "id": "compass.draft", "namespace": "compass", "action": "draft", "title": "Draft Compass", "description": "Create a Compass draft version.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": true, "help": "Submit a full Compass document; read the Compass authoring guide for the field-by-field contract and worked examples before drafting. Drafting is safe for an agent; approving a version is a human act.", "example": { "doc": { "schema_version": 1, "purpose": { "value": "Help small manufacturers ship quality products on time.", "citations": [], "confidence": 0.9, "placeholder": false }, "principles": [{ "value": "Bias to action; decide with the information we have.", "citations": [], "confidence": 0.9, "placeholder": false }, { "value": "Customers feel the quality of every order.", "citations": [], "confidence": 0.9, "placeholder": false }], "horizon_goals": { "three_year": { "title": { "value": "Reach $10M ARR with a 25-person team", "citations": [], "confidence": 0.9, "placeholder": false }, "definition_of_done": { "value": "ARR is at or above $10M and team headcount is 25 with no key-role gaps.", "citations": [], "confidence": 0.9, "placeholder": false }, "horizon": "three_year" }, "one_year": { "title": { "value": "Hit $3M ARR and 99% on-time delivery", "citations": [], "confidence": 0.9, "placeholder": false }, "definition_of_done": { "value": "Trailing-12-month ARR \u2265 $3M and on-time delivery rate \u2265 99% for two consecutive quarters.", "citations": [], "confidence": 0.9, "placeholder": false }, "horizon": "one_year" } }, "cycle_objectives": [{ "title": { "value": "Cut order-to-ship cycle time by 20%", "citations": [], "confidence": 0.9, "placeholder": false }, "definition_of_done": { "value": "Median order-to-ship time is 20% lower than the prior cycle baseline.", "citations": [], "confidence": 0.9, "placeholder": false }, "horizon": "cycle" }], "gaps": [], "follow_up_tasks": [], "source_ids": [] } } },
|
|
58641
58641
|
{ "id": "compass.get_current", "namespace": "compass", "action": "get_current", "title": "Get current Compass", "description": "Return the active and draft Compass versions plus the source documents that informed them.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Read the active and draft Compass before drafting goals or recommending direction changes." },
|
|
58642
58642
|
{ "id": "compass.import", "namespace": "compass", "action": "import", "title": "Import a ninety V/TO into a Compass draft", "description": "AI-draft a Compass from a ninety V/TO (values -> principles, 10/3/1-year -> horizons, Rocks -> cycle objectives). Produces a DRAFT a human confirms by supersession; never writes an accepted Compass.", "requiredScope": "tenant_admin", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "dry_run", "flag": "dry-run", "type": "boolean", "required": false }, { "name": "source_name", "flag": "source-name", "type": "string", "required": false }, { "name": "text", "flag": "text", "type": "string", "required": true }], "hasComplexInput": false, "help": "AI-draft a Compass from a ninety V/TO (values -> principles, 10/3/1-year -> horizons, Rocks -> cycle objectives). Lands a draft a human confirms; idempotent by document content." },
|
|
58643
58643
|
{ "id": "compass.list_gaps", "namespace": "compass", "action": "list_gaps", "title": "List Compass gaps", "description": "Return unanswered and answered Compass context gaps for the latest draft or active version.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "List unanswered Compass gaps so a human can answer them before direction anchors graph or Cascade work." },
|
|
58644
58644
|
{ "id": "compass.reject_draft", "namespace": "compass", "action": "reject_draft", "title": "Reject Compass draft", "description": "Reject and remove a draft Compass version.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Reject Compass drafts when the direction, language, or company intent is not ready to anchor implementation." },
|
|
58645
|
-
{ "id": "compass.set", "namespace": "compass", "action": "set", "title": "Set Compass", "description": "Compatibility command for the DER-626 MCP Compass tool.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": false }, { "name": "approve", "flag": "approve", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Set Compass drafts in the product's own vocabulary and approve only with explicit human confirmation." },
|
|
58645
|
+
{ "id": "compass.set", "namespace": "compass", "action": "set", "title": "Set Compass", "description": "Compatibility command for the DER-626 MCP Compass tool.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": false }, { "name": "approve", "flag": "approve", "type": "boolean", "required": false }], "hasComplexInput": true, "bootstrapStage": true, "help": "Set Compass drafts in the product's own vocabulary and approve only with explicit human confirmation." },
|
|
58646
58646
|
{ "id": "compass.show_markdown", "namespace": "compass", "action": "show_markdown", "title": "Show Compass as markdown", "description": "Compose the current Compass and its open gaps into a clean, human-skimmable markdown card for review.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Render the current Compass and its open gaps as a clean markdown card to show your human a quick review." },
|
|
58647
58647
|
{ "id": "compass.update_draft", "namespace": "compass", "action": "update_draft", "title": "Update Compass draft", "description": "Replace a draft Compass document.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "draft_id", "flag": "draft-id", "type": "string", "required": true }], "hasComplexInput": true, "help": "Pass the compass_version_id returned by compass.draft as draft_id; update_draft replaces only an unpublished draft in this tenant." },
|
|
58648
58648
|
{ "id": "confirmation.activation_set.list", "namespace": "confirmation", "action": "activation_set.list", "title": "List activation approval sets", "description": "List agent-authored activation confirmation sets that the caller can review.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Review the routine activation confirmations from one implementation run before approving them in dependency order. Sensitive, dangerous, and previously-failed confirmations are not in this set \u2014 they stay in the general confirmation list (confirmation.list) and are approved individually. Each redacted_args is a partial projection of the proposal: content may be omitted, and no surface today renders it in full." },
|
|
@@ -58721,15 +58721,15 @@ var COMMAND_MANIFEST = [
|
|
|
58721
58721
|
{ "id": "notification.settings.get", "namespace": "notification", "action": "settings.get", "title": "Get notification settings", "description": "Read tenant notification preferences (escalations, Sync brief, default channel).", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Read notification preferences before changing escalation or Sync brief delivery." },
|
|
58722
58722
|
{ "id": "notification.settings.update", "namespace": "notification", "action": "settings.update", "title": "Update notification settings", "description": "Update tenant notification preferences.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "escalations_enabled", "flag": "escalations-enabled", "type": "boolean", "required": false }, { "name": "sync_brief_enabled", "flag": "sync-brief-enabled", "type": "boolean", "required": false }, { "name": "default_channel", "flag": "default-channel", "type": "enum", "required": false, "enumValues": ["slack", "email", "in_app"] }], "hasComplexInput": false, "help": "Update notification preferences for escalations, Sync briefs, and the default channel." },
|
|
58723
58723
|
{ "id": "notification.test", "namespace": "notification", "action": "test", "title": "Send test notification", "description": "Emit an in-app test notification to the acting human to verify delivery is wired.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Send an in-app test notification to confirm the delivery path is wired." },
|
|
58724
|
-
{ "id": "onboarding.activate", "namespace": "onboarding", "action": "activate", "title": "Activate onboarding agents", "description": "Stage one owner approval to activate every agent in an applied onboarding receipt and complete onboarding atomically.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "setup_application_id", "flag": "setup-application-id", "type": "string", "required": true }, { "name": "expected_input_digest", "flag": "expected-input-digest", "type": "string", "required": true }, { "name": "expected_receipt_revision", "flag": "expected-receipt-revision", "type": "integer", "required": true }, { "name": "terminal_rehearsal_batch_receipt_id", "flag": "terminal-rehearsal-batch-receipt-id", "type": "string", "required": true }], "hasComplexInput": true, "help": "After a terminal all-passed onboarding rehearsal, submit its exact batch receipt, per-agent run IDs, and configuration digests. One owner approval activates the entire group and completes onboarding atomically." },
|
|
58724
|
+
{ "id": "onboarding.activate", "namespace": "onboarding", "action": "activate", "title": "Activate onboarding agents", "description": "Stage one owner approval to activate every agent in an applied onboarding receipt and complete onboarding atomically.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "setup_application_id", "flag": "setup-application-id", "type": "string", "required": true }, { "name": "expected_input_digest", "flag": "expected-input-digest", "type": "string", "required": true }, { "name": "expected_receipt_revision", "flag": "expected-receipt-revision", "type": "integer", "required": true }, { "name": "terminal_rehearsal_batch_receipt_id", "flag": "terminal-rehearsal-batch-receipt-id", "type": "string", "required": true }], "hasComplexInput": true, "bootstrapStage": true, "help": "After a terminal all-passed onboarding rehearsal, submit its exact batch receipt, per-agent run IDs, and configuration digests. One owner approval activates the entire group and completes onboarding atomically." },
|
|
58725
58725
|
{ "id": "onboarding.advance_step", "namespace": "onboarding", "action": "advance_step", "title": "Advance onboarding step", "description": "Persist the current onboarding step after server-side validation.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "step", "flag": "step", "type": "enum", "required": true, "enumValues": ["setup_path", "company_basics", "how_it_works", "compass_context", "org_intake", "charters_preview", "sync_rhythm", "invite_team", "staff_agent", "finish"] }, { "name": "completed", "flag": "completed", "type": "boolean", "required": false }], "hasComplexInput": true, "help": "Advance onboarding only after the current setup step is represented in the tenant state." },
|
|
58726
58726
|
{ "id": "onboarding.attach_reference", "namespace": "onboarding", "action": "attach_reference", "title": "Attach reference document", "description": "Attach a company reference document (text/markdown) so Compass and Charters can cite it. Reference-only \u2014 it does not build a Compass; convert each meaningful doc to markdown and attach it with a title, kind, and source.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "text", "flag": "text", "type": "string", "required": true }, { "name": "filename", "flag": "filename", "type": "string", "required": false }, { "name": "mime_type", "flag": "mime-type", "type": "enum", "required": false, "enumValues": ["text/plain", "text/markdown", "text/csv"] }, { "name": "title", "flag": "title", "type": "string", "required": false }, { "name": "kind", "flag": "kind", "type": "enum", "required": false, "enumValues": ["plan", "financial", "org_chart", "process"] }, { "name": "source", "flag": "source", "type": "string", "required": false }], "hasComplexInput": false, "help": "Convert each meaningful company doc to markdown and attach it as a reference (title, kind, source) so Compass and Charters can cite it; this attaches a reference, it does not build a Compass \u2014 author Compass directly.", "example": { "text": "# Company handbook\n\nWe build precision components for the aerospace supply chain.", "filename": "handbook.md", "mime_type": "text/markdown", "title": "Company handbook", "kind": "plan", "source": "handbook/overview.md" } },
|
|
58727
58727
|
{ "id": "onboarding.create_invite", "namespace": "onboarding", "action": "create_invite", "title": "Create onboarding invite", "description": "Create a pending invite for an onboarding team member.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "email", "flag": "email", "type": "string", "required": true }, { "name": "role", "flag": "role", "type": "enum", "required": false, "enumValues": ["owner", "admin", "steward", "member"] }], "hasComplexInput": true, "help": "Invites should give humans access to the company without assigning work directly to people instead of seats." },
|
|
58728
|
-
{ "id": "onboarding.finish", "namespace": "onboarding", "action": "finish", "title": "Finish onboarding", "description": "Mark onboarding complete after the existing onboarding requirements pass.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Finish onboarding when the graph, at least one Charter, and the first operating rhythm are clear." },
|
|
58728
|
+
{ "id": "onboarding.finish", "namespace": "onboarding", "action": "finish", "title": "Finish onboarding", "description": "Mark onboarding complete after the existing onboarding requirements pass.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "bootstrapStage": true, "help": "Finish onboarding when the graph, at least one Charter, and the first operating rhythm are clear." },
|
|
58729
58729
|
{ "id": "onboarding.rehearse", "namespace": "onboarding", "action": "rehearse", "title": "Rehearse onboarding agents", "description": "Run the exact setup receipt's agents through a resumable sandbox-only rehearsal batch. Returns immutable evidence and never stages activation.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "setup_application_id", "flag": "setup-application-id", "type": "string", "required": true }, { "name": "expected_input_digest", "flag": "expected-input-digest", "type": "string", "required": true }, { "name": "expected_receipt_revision", "flag": "expected-receipt-revision", "type": "integer", "required": true }], "hasComplexInput": false, "help": "Run the exact setup receipt's agents through the sandbox-only rehearsal batch. It returns immutable terminal evidence and never stages activation, arms schedules, accesses credentials, or sends externally." },
|
|
58730
58730
|
{ "id": "onboarding.resume", "namespace": "onboarding", "action": "resume", "title": "Onboard resume", "description": "Return the onboarding resume state: path choice, pending setup, and the next step.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Resume an in-progress onboarding session from the implementation bootstrap principal; reports path choice, pending setup, and the next step." },
|
|
58731
58731
|
{ "id": "onboarding.select_path", "namespace": "onboarding", "action": "select_path", "title": "Select onboarding path", "description": "Record whether this company continues guided onboarding or hands setup to an agent (agent-led). Human-only (web UI or CLI), not an MCP tool. Never marks onboarding complete or grants any authority.", "requiredScope": "tenant_admin", "confirmation": "none", "exposeOverMcp": false, "fields": [{ "name": "path", "flag": "path", "type": "enum", "required": true, "enumValues": ["guided", "agent_led"] }], "hasComplexInput": false, "help": "Records whether the owner continues guided onboarding or hands setup to an agent (agent-led). Owner-only; it never marks onboarding complete or grants authority." },
|
|
58732
|
-
{ "id": "onboarding.setup", "namespace": "onboarding", "action": "setup", "title": "Apply onboarding setup", "description": "Stage one owner approval for a complete declarative onboarding setup. Approval applies the plan atomically without invites, credentials, external messages, or go-live.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "schema_version", "flag": "schema-version", "type": "number", "required": true }, { "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "company_name", "flag": "company-name", "type": "string", "required": true }, { "name": "sync_brief_scope", "flag": "sync-brief-scope", "type": "enum", "required": true, "enumValues": ["company_wide", "per_cluster"] }, { "name": "managed_inference_hard_cap_usd", "flag": "managed-inference-hard-cap-usd", "type": "string", "required": false }], "hasComplexInput": true, "help": "Submit the complete declarative setup plan once. It stages one owner confirmation and applies the approved plan atomically without invites, credentials, external messages, or go-live." },
|
|
58732
|
+
{ "id": "onboarding.setup", "namespace": "onboarding", "action": "setup", "title": "Apply onboarding setup", "description": "Stage one owner approval for a complete declarative onboarding setup. Approval applies the plan atomically without invites, credentials, external messages, or go-live.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "schema_version", "flag": "schema-version", "type": "number", "required": true }, { "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }, { "name": "company_name", "flag": "company-name", "type": "string", "required": true }, { "name": "sync_brief_scope", "flag": "sync-brief-scope", "type": "enum", "required": true, "enumValues": ["company_wide", "per_cluster"] }, { "name": "managed_inference_hard_cap_usd", "flag": "managed-inference-hard-cap-usd", "type": "string", "required": false }], "hasComplexInput": true, "bootstrapStage": true, "help": "Submit the complete declarative setup plan once. It stages one owner confirmation and applies the approved plan atomically without invites, credentials, external messages, or go-live." },
|
|
58733
58733
|
{ "id": "onboarding.source_ingest", "namespace": "onboarding", "action": "source_ingest", "title": "Ingest onboarding source", "description": "Retain one bounded setup source under the exact tenant and implementation run.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "source_key", "flag": "source-key", "type": "string", "required": true }, { "name": "kind", "flag": "kind", "type": "enum", "required": true, "enumValues": ["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"] }, { "name": "title", "flag": "title", "type": "string", "required": true }, { "name": "content_base64", "flag": "content-base64", "type": "string", "required": true }], "hasComplexInput": false, "help": "Ingest one bounded CSV source into encrypted tenant/run-bound retained storage. The server computes its digest and canonical family manifest; paths, URLs, and client digests are not accepted." },
|
|
58734
58734
|
{ "id": "onboarding.status", "namespace": "onboarding", "action": "status", "title": "Onboard status", "description": "Return current onboarding progress, graph summary, and the next recommended actions.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": false, "help": "Start by checking onboarding status, then use the implementation method guide to choose the next setup step." },
|
|
58735
58735
|
{ "id": "onboarding.upload_context", "namespace": "onboarding", "action": "upload_context", "title": "Upload org context", "description": "Compatibility alias for onboarding.attach_reference: attach a company reference document (text/markdown) that Compass and Charters can cite. Reference-only \u2014 it does not build a Compass.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "text", "flag": "text", "type": "string", "required": true }, { "name": "filename", "flag": "filename", "type": "string", "required": false }, { "name": "mime_type", "flag": "mime-type", "type": "enum", "required": false, "enumValues": ["text/plain", "text/markdown", "text/csv"] }, { "name": "title", "flag": "title", "type": "string", "required": false }, { "name": "kind", "flag": "kind", "type": "enum", "required": false, "enumValues": ["plan", "financial", "org_chart", "process"] }, { "name": "source", "flag": "source", "type": "string", "required": false }], "hasComplexInput": false, "help": "Compatibility alias for onboarding.attach_reference: attach a company reference document so Compass and Charters can cite it. It does not build a Compass.", "example": { "text": "# Company handbook\n\nWe build precision components for the aerospace supply chain.", "filename": "handbook.md", "mime_type": "text/markdown", "title": "Company handbook", "kind": "plan", "source": "handbook/overview.md" } },
|
|
@@ -58741,7 +58741,7 @@ var COMMAND_MANIFEST = [
|
|
|
58741
58741
|
{ "id": "runner.status", "namespace": "runner", "action": "status", "title": "Runner status", "description": "Read a single runner's capability and online/offline/revoked state.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "runner_id", "flag": "runner-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Check a runner's capability and heartbeat state when diagnosing offline work." },
|
|
58742
58742
|
{ "id": "scorecard.grid", "namespace": "scorecard", "action": "grid", "title": "Read the scorecard grid", "description": "Return the leadership scorecard trailing grid: rows are measurables of a cadence (default weekly), columns are the trailing N periods with a colour-coded cell per period, plus the computed Org-Checkup system-health measurables. Seat-scoped callers see only their own seat.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "cadence", "flag": "cadence", "type": "enum", "required": false, "enumValues": ["daily", "weekly", "monthly", "quarterly", "annual"] }, { "name": "trailing", "flag": "trailing", "type": "integer", "required": false }, { "name": "seat_id", "flag": "seat-id", "type": "string", "required": false }, { "name": "as_of", "flag": "as-of", "type": "string", "required": false }], "hasComplexInput": false, "help": "Read the leadership scorecard trailing grid (rows = measurables of a cadence, columns = trailing periods, colour-coded cells) plus the computed Org-Checkup system-health measurables. Keep exception-first as the default view." },
|
|
58743
58743
|
{ "id": "seat.create", "namespace": "seat", "action": "create", "title": "Create seat", "description": "Create a Responsibility Graph seat.", "requiredScope": "tenant", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "name", "flag": "name", "type": "string", "required": true }, { "name": "parent_seat_id", "flag": "parent-seat-id", "type": "string", "required": false }, { "name": "seat_type", "flag": "seat-type", "type": "enum", "required": false, "enumValues": ["human", "agent", "hybrid"] }], "hasComplexInput": false, "help": "Create seats from functions before assigning people or agents." },
|
|
58744
|
-
{ "id": "seat.create_complete", "namespace": "seat", "action": "create_complete", "title": "Create complete seat", "description": "Create a Seat with its Charter, disclosed staffing, and optional dry-run agent shell after owner confirmation.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }], "hasComplexInput": true, "help": "Submit one complete Seat proposal with its Charter, disclosed staffing, and optional dry-run agent configuration. Read the exact schema first; the command stages one owner confirmation, never goes live, and applies every approved effect atomically." },
|
|
58744
|
+
{ "id": "seat.create_complete", "namespace": "seat", "action": "create_complete", "title": "Create complete seat", "description": "Create a Seat with its Charter, disclosed staffing, and optional dry-run agent shell after owner confirmation.", "requiredScope": "tenant", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "idempotency_key", "flag": "idempotency-key", "type": "string", "required": true }], "hasComplexInput": true, "bootstrapStage": true, "help": "Submit one complete Seat proposal with its Charter, disclosed staffing, and optional dry-run agent configuration. Read the exact schema first; the command stages one owner confirmation, never goes live, and applies every approved effect atomically." },
|
|
58745
58745
|
{ "id": "seat.decommission", "namespace": "seat", "action": "decommission", "title": "Decommission seat", "description": "Retire a seat: end occupancies, archive the active charter, revoke seat tokens/credentials, cancel schedules, and emit a tombstone event. Blocks if it would leave another live agent without a human steward chain.", "requiredScope": "seat", "confirmation": "human_required", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Retiring a seat ends occupancies, archives the active Charter, revokes seat tokens and credentials, and emits a tombstone event. No-orphan guarded. To retire only the agent and keep the seat, use agent.decommission." },
|
|
58746
58746
|
{ "id": "seat.decommission_preview", "namespace": "seat", "action": "decommission_preview", "title": "Preview seat decommission", "description": "Show exactly what retiring a seat would end, revoke, archive, or expire without mutating state. The no-orphan steward guard is still checked when the real decommission executes.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Preview the occupancies, agents, Charter versions, tokens, credentials, work orders, and schedules that seat.decommission would affect without mutating state." },
|
|
58747
58747
|
{ "id": "seat.get", "namespace": "seat", "action": "get", "title": "Get seat detail", "description": "Return seat profile, steward chain, occupancy, Charter ids, agent status, token metadata, and open-work counts.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [{ "name": "seat_id", "flag": "seat-id", "type": "string", "required": true }], "hasComplexInput": false, "help": "Inspect a seat's Charter ids, steward chain, occupancy, agent status, token metadata, and open-work counts before acting on it." },
|
|
@@ -58875,6 +58875,183 @@ var COMMAND_MANIFEST = [
|
|
|
58875
58875
|
{ "id": "work.record", "namespace": "work", "action": "record", "title": "Record work", "description": "Append one or more structured business-activity records to the agent work ledger for the acting seat. Batch-accepting, append-only, secret-redacted, and idempotent on dedup_key. Corrections are superseding records.", "requiredScope": "seat", "confirmation": "none", "exposeOverMcp": true, "fields": [], "hasComplexInput": true, "help": "Append structured business-activity records (verb + entity refs + outcome + evidence) to the seat's work ledger, in a batch, right after each action succeeds." }
|
|
58876
58876
|
];
|
|
58877
58877
|
|
|
58878
|
+
// src/generator/runtime.ts
|
|
58879
|
+
var UsageError = class extends Error {
|
|
58880
|
+
};
|
|
58881
|
+
var SECRET_ARGV_GUIDANCE = "This command stores a secret and cannot accept it from the command line. Provide the secret through the vault-backed flow \u2014 web Settings or the integration connect flow \u2014 never as a CLI argument (a flag, --input, or --json body would expose it in shell history and process arguments).";
|
|
58882
|
+
function parseFlags(args, booleanFlags = /* @__PURE__ */ new Set()) {
|
|
58883
|
+
const values = /* @__PURE__ */ new Map();
|
|
58884
|
+
const flags = /* @__PURE__ */ new Set();
|
|
58885
|
+
let json2 = false;
|
|
58886
|
+
let seat;
|
|
58887
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
58888
|
+
const token = args[index];
|
|
58889
|
+
if (token === void 0) {
|
|
58890
|
+
continue;
|
|
58891
|
+
}
|
|
58892
|
+
if (!token.startsWith("--")) {
|
|
58893
|
+
throw new UsageError(`Unexpected argument: ${token}`);
|
|
58894
|
+
}
|
|
58895
|
+
const key = token.slice(2);
|
|
58896
|
+
if (key === "json") {
|
|
58897
|
+
json2 = true;
|
|
58898
|
+
continue;
|
|
58899
|
+
}
|
|
58900
|
+
if (key === "seat") {
|
|
58901
|
+
const next2 = args[index + 1];
|
|
58902
|
+
if (next2 === void 0 || next2.startsWith("--")) {
|
|
58903
|
+
throw new UsageError("Missing required --seat value.");
|
|
58904
|
+
}
|
|
58905
|
+
seat = next2;
|
|
58906
|
+
index += 1;
|
|
58907
|
+
continue;
|
|
58908
|
+
}
|
|
58909
|
+
if (booleanFlags.has(key)) {
|
|
58910
|
+
flags.add(key);
|
|
58911
|
+
continue;
|
|
58912
|
+
}
|
|
58913
|
+
const next = args[index + 1];
|
|
58914
|
+
if (next === void 0 || next.startsWith("--")) {
|
|
58915
|
+
flags.add(key);
|
|
58916
|
+
continue;
|
|
58917
|
+
}
|
|
58918
|
+
values.set(key, next);
|
|
58919
|
+
index += 1;
|
|
58920
|
+
}
|
|
58921
|
+
return { json: json2, ...seat === void 0 ? {} : { seat }, values, flags };
|
|
58922
|
+
}
|
|
58923
|
+
function requireValue2(parsed, key) {
|
|
58924
|
+
const value = parsed.values.get(key);
|
|
58925
|
+
if (value === void 0 || value.length === 0) {
|
|
58926
|
+
throw new UsageError(`Missing required --${key} value.`);
|
|
58927
|
+
}
|
|
58928
|
+
return value;
|
|
58929
|
+
}
|
|
58930
|
+
function optionalValue(parsed, key) {
|
|
58931
|
+
const value = parsed.values.get(key);
|
|
58932
|
+
return value === void 0 || value.length === 0 ? void 0 : value;
|
|
58933
|
+
}
|
|
58934
|
+
function parseNumber(parsed, key, options) {
|
|
58935
|
+
const raw = parsed.values.get(key);
|
|
58936
|
+
if (raw === void 0 || raw.length === 0) {
|
|
58937
|
+
if (options.required) {
|
|
58938
|
+
throw new UsageError(`Missing required --${key} value.`);
|
|
58939
|
+
}
|
|
58940
|
+
return void 0;
|
|
58941
|
+
}
|
|
58942
|
+
const parsedNumber = Number(raw);
|
|
58943
|
+
if (!Number.isFinite(parsedNumber)) {
|
|
58944
|
+
throw new UsageError(`--${key} must be a finite number.`);
|
|
58945
|
+
}
|
|
58946
|
+
return parsedNumber;
|
|
58947
|
+
}
|
|
58948
|
+
function parseList(parsed, key) {
|
|
58949
|
+
const raw = parsed.values.get(key);
|
|
58950
|
+
if (raw === void 0 || raw.length === 0) {
|
|
58951
|
+
return void 0;
|
|
58952
|
+
}
|
|
58953
|
+
return raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
58954
|
+
}
|
|
58955
|
+
function withOptional(base, extra) {
|
|
58956
|
+
const next = { ...base };
|
|
58957
|
+
for (const [key, value] of Object.entries(extra)) {
|
|
58958
|
+
if (value !== void 0) {
|
|
58959
|
+
next[key] = value;
|
|
58960
|
+
}
|
|
58961
|
+
}
|
|
58962
|
+
return next;
|
|
58963
|
+
}
|
|
58964
|
+
function asRecord2(value) {
|
|
58965
|
+
return typeof value === "object" && value !== null ? value : {};
|
|
58966
|
+
}
|
|
58967
|
+
function asArray(value) {
|
|
58968
|
+
return Array.isArray(value) ? value : [];
|
|
58969
|
+
}
|
|
58970
|
+
function field2(record2, key) {
|
|
58971
|
+
const value = record2[key];
|
|
58972
|
+
if (value === null || value === void 0) {
|
|
58973
|
+
return "\u2014";
|
|
58974
|
+
}
|
|
58975
|
+
return String(value);
|
|
58976
|
+
}
|
|
58977
|
+
function usageWithSchemaFooter(usage2, bin) {
|
|
58978
|
+
return `${usage2}
|
|
58979
|
+
discover a command's exact input with: ${bin} command schema <id>`;
|
|
58980
|
+
}
|
|
58981
|
+
async function dispatch(context, group, args, actions, usage2) {
|
|
58982
|
+
const usageText = usageWithSchemaFooter(usage2, context.binName);
|
|
58983
|
+
const action = args[0];
|
|
58984
|
+
if (action === "--help" || action === "-h" || action === "help") {
|
|
58985
|
+
context.io.stdout.write(`${usageText}
|
|
58986
|
+
`);
|
|
58987
|
+
return 0;
|
|
58988
|
+
}
|
|
58989
|
+
const handler = action === void 0 ? void 0 : actions[action];
|
|
58990
|
+
if (!handler) {
|
|
58991
|
+
context.io.stderr.write(`${usageText}
|
|
58992
|
+
`);
|
|
58993
|
+
return 1;
|
|
58994
|
+
}
|
|
58995
|
+
try {
|
|
58996
|
+
return await handler(context, args.slice(1));
|
|
58997
|
+
} catch (error51) {
|
|
58998
|
+
if (error51 instanceof UsageError) {
|
|
58999
|
+
context.io.stderr.write(`${error51.message}
|
|
59000
|
+
${usageText}
|
|
59001
|
+
`);
|
|
59002
|
+
return 1;
|
|
59003
|
+
}
|
|
59004
|
+
throw error51;
|
|
59005
|
+
}
|
|
59006
|
+
}
|
|
59007
|
+
function execute(context, parsed, commandId, body, format) {
|
|
59008
|
+
const autoConfirm = parsed.flags.has("yes") || parsed.flags.has("y");
|
|
59009
|
+
const options = {
|
|
59010
|
+
...parsed.seat === void 0 ? {} : { targetSeatId: parsed.seat },
|
|
59011
|
+
...autoConfirm ? { autoConfirm: true } : {}
|
|
59012
|
+
};
|
|
59013
|
+
if (parsed.json) {
|
|
59014
|
+
return context.run(context.client, commandId, body, void 0, options);
|
|
59015
|
+
}
|
|
59016
|
+
return context.run(context.client, commandId, body, format, options);
|
|
59017
|
+
}
|
|
59018
|
+
var STAGE_CLASS_COMMAND_IDS = new Set(
|
|
59019
|
+
COMMAND_MANIFEST.filter((entry) => entry.bootstrapStage === true).map((entry) => entry.id)
|
|
59020
|
+
);
|
|
59021
|
+
function isStageClassCommand(commandId) {
|
|
59022
|
+
return STAGE_CLASS_COMMAND_IDS.has(commandId);
|
|
59023
|
+
}
|
|
59024
|
+
function stagedConfirmationFromError(commandId, error51) {
|
|
59025
|
+
if (!isStageClassCommand(commandId)) {
|
|
59026
|
+
return null;
|
|
59027
|
+
}
|
|
59028
|
+
if (!(error51 instanceof CommandClientError) || !error51.response || error51.response.ok || error51.response.error.code !== "COMMAND_CONFIRMATION_REQUIRED") {
|
|
59029
|
+
return null;
|
|
59030
|
+
}
|
|
59031
|
+
const details = error51.response.error.details;
|
|
59032
|
+
if (typeof details !== "object" || details === null) {
|
|
59033
|
+
return null;
|
|
59034
|
+
}
|
|
59035
|
+
const record2 = details;
|
|
59036
|
+
return record2.commandId === commandId ? record2 : null;
|
|
59037
|
+
}
|
|
59038
|
+
function formatStagedConfirmation(commandId, details, overrides = {}) {
|
|
59039
|
+
const headline = overrides.headline ?? (commandId === "seat.create_complete" ? "Seat creation approval is ready." : `${commandId} approval is ready.`);
|
|
59040
|
+
const guidance = overrides.guidance ?? (commandId === "seat.create_complete" ? "After the owner approves, re-run this command with the identical input to read the applied Seat receipt." : void 0);
|
|
59041
|
+
const approveVia = asRecord2(details.approveVia);
|
|
59042
|
+
const lines = [
|
|
59043
|
+
headline,
|
|
59044
|
+
`Confirmation: ${field2(details, "confirmationId")}`
|
|
59045
|
+
];
|
|
59046
|
+
if (typeof approveVia.webUrl === "string") {
|
|
59047
|
+
lines.push(`Approve once: ${approveVia.webUrl}`);
|
|
59048
|
+
}
|
|
59049
|
+
if (guidance !== void 0) {
|
|
59050
|
+
lines.push(guidance);
|
|
59051
|
+
}
|
|
59052
|
+
return lines.join("\n");
|
|
59053
|
+
}
|
|
59054
|
+
|
|
58878
59055
|
// src/commands/onboarding.ts
|
|
58879
59056
|
var REHEARSE_USAGE = `${cliBrand.binName} onboard rehearse --setup-application-id <uuid> --expected-input-digest <sha256:digest> --expected-receipt-revision <integer> --idempotency-key <key> [--json]`;
|
|
58880
59057
|
var ACTIVATE_USAGE = `${cliBrand.binName} onboard activate --setup-application-id <uuid> --expected-input-digest <sha256:digest> --expected-receipt-revision <integer> --terminal-rehearsal-batch-receipt-id <uuid> --rehearsal-runs '<json-array>' --configuration-digests '<json-array>' --idempotency-key <key> [--json]`;
|
|
@@ -58922,9 +59099,9 @@ async function executeOnboardingInvocation(invocation, io, client, options = {})
|
|
|
58922
59099
|
`);
|
|
58923
59100
|
return 0;
|
|
58924
59101
|
} catch (error51) {
|
|
58925
|
-
const staged =
|
|
59102
|
+
const staged = stagedConfirmationFromError(invocation.commandId, error51);
|
|
58926
59103
|
if (staged !== null) {
|
|
58927
|
-
io.stdout.write(`${invocation.json ? JSON.stringify(staged, null, 2) :
|
|
59104
|
+
io.stdout.write(`${invocation.json ? JSON.stringify(staged, null, 2) : formatStagedOnboardingConfirmation(invocation, staged)}
|
|
58928
59105
|
`);
|
|
58929
59106
|
return 0;
|
|
58930
59107
|
}
|
|
@@ -58973,33 +59150,27 @@ async function resolveOnboardingInvocationFiles(invocation, readFileImpl = readF
|
|
|
58973
59150
|
delete invocation.inputFile;
|
|
58974
59151
|
}
|
|
58975
59152
|
}
|
|
58976
|
-
function
|
|
58977
|
-
|
|
58978
|
-
|
|
58979
|
-
|
|
58980
|
-
|
|
58981
|
-
|
|
59153
|
+
function formatStagedOnboardingConfirmation(invocation, details) {
|
|
59154
|
+
const action = invocation.action;
|
|
59155
|
+
if (action === "setup-status") {
|
|
59156
|
+
return formatStagedConfirmation("onboarding.setup", details, {
|
|
59157
|
+
headline: "Onboarding setup approval is pending. The URL below is the current card: an identical still-valid card is reused as-is; if live state moved, the stale card was superseded and this fresh one minted.",
|
|
59158
|
+
guidance: "After the owner approves, re-run this command with the identical plan to read the immutable setup receipt."
|
|
59159
|
+
});
|
|
58982
59160
|
}
|
|
58983
|
-
|
|
58984
|
-
|
|
58985
|
-
|
|
59161
|
+
if (action === "setup") {
|
|
59162
|
+
return formatStagedConfirmation("onboarding.setup", details, {
|
|
59163
|
+
headline: "Onboarding setup approval is ready.",
|
|
59164
|
+
guidance: "After the owner approves, re-run this command with the identical plan to read the immutable setup receipt."
|
|
59165
|
+
});
|
|
58986
59166
|
}
|
|
58987
|
-
|
|
58988
|
-
|
|
58989
|
-
|
|
58990
|
-
|
|
58991
|
-
|
|
58992
|
-
const lines = [
|
|
58993
|
-
action === "setup-status" ? "Onboarding setup approval is pending. The URL below is the current card: an identical still-valid card is reused as-is; if live state moved, the stale card was superseded and this fresh one minted." : "Onboarding setup approval is ready.",
|
|
58994
|
-
`Confirmation: ${field2(details, "confirmationId")}`
|
|
58995
|
-
];
|
|
58996
|
-
if (typeof approveVia.webUrl === "string") {
|
|
58997
|
-
lines.push(`Approve once: ${approveVia.webUrl}`);
|
|
59167
|
+
if (action === "activate") {
|
|
59168
|
+
return formatStagedConfirmation("onboarding.activate", details, {
|
|
59169
|
+
headline: "Onboarding activation approval is ready.",
|
|
59170
|
+
guidance: "After the owner approves, re-run this command with the identical evidence to read the activation receipt."
|
|
59171
|
+
});
|
|
58998
59172
|
}
|
|
58999
|
-
|
|
59000
|
-
"After the owner approves, re-run this command with the identical plan to read the immutable setup receipt."
|
|
59001
|
-
);
|
|
59002
|
-
return lines.join("\n");
|
|
59173
|
+
return formatStagedConfirmation(invocation.commandId, details);
|
|
59003
59174
|
}
|
|
59004
59175
|
function parseSetupPlanJson(text, flag) {
|
|
59005
59176
|
let parsed;
|
|
@@ -59239,73 +59410,66 @@ function parseJsonArrayFlag(flag, value) {
|
|
|
59239
59410
|
}
|
|
59240
59411
|
}
|
|
59241
59412
|
function formatActivationOutput(output) {
|
|
59242
|
-
const record2 =
|
|
59243
|
-
const
|
|
59244
|
-
if (typeof approveVia.webUrl === "string") {
|
|
59245
|
-
return [
|
|
59246
|
-
"Onboarding activation approval is ready.",
|
|
59247
|
-
`Approve once: ${approveVia.webUrl}`
|
|
59248
|
-
].join("\n");
|
|
59249
|
-
}
|
|
59250
|
-
const receipt = asRecord2(record2.receipt);
|
|
59413
|
+
const record2 = asRecord3(output);
|
|
59414
|
+
const receipt = asRecord3(record2.receipt);
|
|
59251
59415
|
const agents = Array.isArray(receipt.agents) ? receipt.agents : [];
|
|
59252
59416
|
if (record2.status === "activated") {
|
|
59253
59417
|
return [
|
|
59254
59418
|
"Onboarding activation completed.",
|
|
59255
|
-
`Activation receipt: ${
|
|
59419
|
+
`Activation receipt: ${field3(receipt, "activation_receipt_id")}`,
|
|
59256
59420
|
`Agents live: ${agents.length} of ${agents.length}`,
|
|
59257
|
-
`Onboarding completed: ${
|
|
59421
|
+
`Onboarding completed: ${field3(receipt, "onboarding_completed_at")}`
|
|
59258
59422
|
].join("\n");
|
|
59259
59423
|
}
|
|
59260
59424
|
return JSON.stringify(output, null, 2);
|
|
59261
59425
|
}
|
|
59262
59426
|
function formatSourceIngestOutput(output) {
|
|
59263
|
-
const record2 =
|
|
59264
|
-
const descriptor =
|
|
59427
|
+
const record2 = asRecord3(output);
|
|
59428
|
+
const descriptor = asRecord3(record2.descriptor);
|
|
59265
59429
|
const families = Array.isArray(descriptor.family_manifest) ? descriptor.family_manifest : [];
|
|
59266
59430
|
return [
|
|
59267
59431
|
"Source retained for this run.",
|
|
59268
|
-
`Upload: ${
|
|
59269
|
-
`SHA-256: ${
|
|
59270
|
-
`Bytes: ${
|
|
59432
|
+
`Upload: ${field3(record2, "source_upload_id")}`,
|
|
59433
|
+
`SHA-256: ${field3(descriptor, "sha256")}`,
|
|
59434
|
+
`Bytes: ${field3(descriptor, "byte_count")}`,
|
|
59271
59435
|
...families.map((entry) => {
|
|
59272
|
-
const item =
|
|
59273
|
-
return `- ${
|
|
59436
|
+
const item = asRecord3(entry);
|
|
59437
|
+
return `- ${field3(item, "family")}: ${field3(item, "input_count")} rows`;
|
|
59274
59438
|
}),
|
|
59275
59439
|
"Reference it from the setup plan's sources[] via the returned source_ref (run with --json to capture it verbatim)."
|
|
59276
59440
|
].join("\n");
|
|
59277
59441
|
}
|
|
59278
59442
|
function formatAppliedSetupOutput(output) {
|
|
59279
|
-
const record2 =
|
|
59443
|
+
const record2 = asRecord3(output);
|
|
59280
59444
|
if (typeof record2.application_id !== "string") {
|
|
59281
59445
|
return JSON.stringify(output, null, 2);
|
|
59282
59446
|
}
|
|
59283
|
-
const receipt =
|
|
59284
|
-
const digests =
|
|
59447
|
+
const receipt = asRecord3(record2.receipt);
|
|
59448
|
+
const digests = asRecord3(receipt.digests);
|
|
59285
59449
|
return [
|
|
59286
59450
|
"Onboarding setup is applied.",
|
|
59287
|
-
`Setup application: ${
|
|
59288
|
-
`Receipt revision: ${
|
|
59289
|
-
`Input digest: ${
|
|
59290
|
-
`Next: ${cliBrand.binName} onboard rehearse --setup-application-id ${
|
|
59451
|
+
`Setup application: ${field3(record2, "application_id")}`,
|
|
59452
|
+
`Receipt revision: ${field3(receipt, "receipt_revision")}`,
|
|
59453
|
+
`Input digest: ${field3(digests, "input")}`,
|
|
59454
|
+
`Next: ${cliBrand.binName} onboard rehearse --setup-application-id ${field3(record2, "application_id")} --expected-input-digest ${field3(digests, "input")} --expected-receipt-revision ${field3(receipt, "receipt_revision")} --idempotency-key <stable-key> --json`
|
|
59291
59455
|
].join("\n");
|
|
59292
59456
|
}
|
|
59293
59457
|
function formatRehearsalOutput(output) {
|
|
59294
|
-
const record2 =
|
|
59458
|
+
const record2 = asRecord3(output);
|
|
59295
59459
|
if (record2.status === "in_progress") {
|
|
59296
|
-
const batch =
|
|
59460
|
+
const batch = asRecord3(record2.batch);
|
|
59297
59461
|
const checkpoints = Array.isArray(record2.checkpoints) ? record2.checkpoints : [];
|
|
59298
59462
|
const completed = checkpoints.filter((checkpoint) => {
|
|
59299
|
-
const status =
|
|
59463
|
+
const status = asRecord3(checkpoint).status;
|
|
59300
59464
|
return status === "passed" || status === "failed";
|
|
59301
59465
|
}).length;
|
|
59302
59466
|
return [
|
|
59303
59467
|
"Onboarding rehearsal is in progress.",
|
|
59304
|
-
`Batch: ${
|
|
59468
|
+
`Batch: ${field3(batch, "batch_id")}`,
|
|
59305
59469
|
`Checkpoints complete: ${completed} of ${checkpoints.length}`,
|
|
59306
59470
|
...checkpoints.map((checkpoint) => {
|
|
59307
|
-
const item =
|
|
59308
|
-
return `- Agent ${
|
|
59471
|
+
const item = asRecord3(checkpoint);
|
|
59472
|
+
return `- Agent ${field3(item, "agent_id")} / Seat ${field3(item, "seat_id")}: ${field3(item, "status")}`;
|
|
59309
59473
|
}),
|
|
59310
59474
|
"Retry with the same idempotency key to continue this batch."
|
|
59311
59475
|
].join("\n");
|
|
@@ -59321,10 +59485,10 @@ function formatRehearsalOutput(output) {
|
|
|
59321
59485
|
}
|
|
59322
59486
|
return JSON.stringify(output, null, 2);
|
|
59323
59487
|
}
|
|
59324
|
-
function
|
|
59488
|
+
function asRecord3(value) {
|
|
59325
59489
|
return typeof value === "object" && value !== null ? value : {};
|
|
59326
59490
|
}
|
|
59327
|
-
function
|
|
59491
|
+
function field3(record2, key) {
|
|
59328
59492
|
const value = record2[key];
|
|
59329
59493
|
return typeof value === "string" || typeof value === "number" ? String(value) : "\u2014";
|
|
59330
59494
|
}
|
|
@@ -59611,147 +59775,6 @@ function defaultImplementationAccessDeps(appUrl2) {
|
|
|
59611
59775
|
// src/generator/groups.ts
|
|
59612
59776
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
59613
59777
|
|
|
59614
|
-
// src/generator/runtime.ts
|
|
59615
|
-
var UsageError = class extends Error {
|
|
59616
|
-
};
|
|
59617
|
-
var SECRET_ARGV_GUIDANCE = "This command stores a secret and cannot accept it from the command line. Provide the secret through the vault-backed flow \u2014 web Settings or the integration connect flow \u2014 never as a CLI argument (a flag, --input, or --json body would expose it in shell history and process arguments).";
|
|
59618
|
-
function parseFlags(args, booleanFlags = /* @__PURE__ */ new Set()) {
|
|
59619
|
-
const values = /* @__PURE__ */ new Map();
|
|
59620
|
-
const flags = /* @__PURE__ */ new Set();
|
|
59621
|
-
let json2 = false;
|
|
59622
|
-
let seat;
|
|
59623
|
-
for (let index = 0; index < args.length; index += 1) {
|
|
59624
|
-
const token = args[index];
|
|
59625
|
-
if (token === void 0) {
|
|
59626
|
-
continue;
|
|
59627
|
-
}
|
|
59628
|
-
if (!token.startsWith("--")) {
|
|
59629
|
-
throw new UsageError(`Unexpected argument: ${token}`);
|
|
59630
|
-
}
|
|
59631
|
-
const key = token.slice(2);
|
|
59632
|
-
if (key === "json") {
|
|
59633
|
-
json2 = true;
|
|
59634
|
-
continue;
|
|
59635
|
-
}
|
|
59636
|
-
if (key === "seat") {
|
|
59637
|
-
const next2 = args[index + 1];
|
|
59638
|
-
if (next2 === void 0 || next2.startsWith("--")) {
|
|
59639
|
-
throw new UsageError("Missing required --seat value.");
|
|
59640
|
-
}
|
|
59641
|
-
seat = next2;
|
|
59642
|
-
index += 1;
|
|
59643
|
-
continue;
|
|
59644
|
-
}
|
|
59645
|
-
if (booleanFlags.has(key)) {
|
|
59646
|
-
flags.add(key);
|
|
59647
|
-
continue;
|
|
59648
|
-
}
|
|
59649
|
-
const next = args[index + 1];
|
|
59650
|
-
if (next === void 0 || next.startsWith("--")) {
|
|
59651
|
-
flags.add(key);
|
|
59652
|
-
continue;
|
|
59653
|
-
}
|
|
59654
|
-
values.set(key, next);
|
|
59655
|
-
index += 1;
|
|
59656
|
-
}
|
|
59657
|
-
return { json: json2, ...seat === void 0 ? {} : { seat }, values, flags };
|
|
59658
|
-
}
|
|
59659
|
-
function requireValue2(parsed, key) {
|
|
59660
|
-
const value = parsed.values.get(key);
|
|
59661
|
-
if (value === void 0 || value.length === 0) {
|
|
59662
|
-
throw new UsageError(`Missing required --${key} value.`);
|
|
59663
|
-
}
|
|
59664
|
-
return value;
|
|
59665
|
-
}
|
|
59666
|
-
function optionalValue(parsed, key) {
|
|
59667
|
-
const value = parsed.values.get(key);
|
|
59668
|
-
return value === void 0 || value.length === 0 ? void 0 : value;
|
|
59669
|
-
}
|
|
59670
|
-
function parseNumber(parsed, key, options) {
|
|
59671
|
-
const raw = parsed.values.get(key);
|
|
59672
|
-
if (raw === void 0 || raw.length === 0) {
|
|
59673
|
-
if (options.required) {
|
|
59674
|
-
throw new UsageError(`Missing required --${key} value.`);
|
|
59675
|
-
}
|
|
59676
|
-
return void 0;
|
|
59677
|
-
}
|
|
59678
|
-
const parsedNumber = Number(raw);
|
|
59679
|
-
if (!Number.isFinite(parsedNumber)) {
|
|
59680
|
-
throw new UsageError(`--${key} must be a finite number.`);
|
|
59681
|
-
}
|
|
59682
|
-
return parsedNumber;
|
|
59683
|
-
}
|
|
59684
|
-
function parseList(parsed, key) {
|
|
59685
|
-
const raw = parsed.values.get(key);
|
|
59686
|
-
if (raw === void 0 || raw.length === 0) {
|
|
59687
|
-
return void 0;
|
|
59688
|
-
}
|
|
59689
|
-
return raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
|
|
59690
|
-
}
|
|
59691
|
-
function withOptional(base, extra) {
|
|
59692
|
-
const next = { ...base };
|
|
59693
|
-
for (const [key, value] of Object.entries(extra)) {
|
|
59694
|
-
if (value !== void 0) {
|
|
59695
|
-
next[key] = value;
|
|
59696
|
-
}
|
|
59697
|
-
}
|
|
59698
|
-
return next;
|
|
59699
|
-
}
|
|
59700
|
-
function asRecord3(value) {
|
|
59701
|
-
return typeof value === "object" && value !== null ? value : {};
|
|
59702
|
-
}
|
|
59703
|
-
function asArray(value) {
|
|
59704
|
-
return Array.isArray(value) ? value : [];
|
|
59705
|
-
}
|
|
59706
|
-
function field3(record2, key) {
|
|
59707
|
-
const value = record2[key];
|
|
59708
|
-
if (value === null || value === void 0) {
|
|
59709
|
-
return "\u2014";
|
|
59710
|
-
}
|
|
59711
|
-
return String(value);
|
|
59712
|
-
}
|
|
59713
|
-
function usageWithSchemaFooter(usage2, bin) {
|
|
59714
|
-
return `${usage2}
|
|
59715
|
-
discover a command's exact input with: ${bin} command schema <id>`;
|
|
59716
|
-
}
|
|
59717
|
-
async function dispatch(context, group, args, actions, usage2) {
|
|
59718
|
-
const usageText = usageWithSchemaFooter(usage2, context.binName);
|
|
59719
|
-
const action = args[0];
|
|
59720
|
-
if (action === "--help" || action === "-h" || action === "help") {
|
|
59721
|
-
context.io.stdout.write(`${usageText}
|
|
59722
|
-
`);
|
|
59723
|
-
return 0;
|
|
59724
|
-
}
|
|
59725
|
-
const handler = action === void 0 ? void 0 : actions[action];
|
|
59726
|
-
if (!handler) {
|
|
59727
|
-
context.io.stderr.write(`${usageText}
|
|
59728
|
-
`);
|
|
59729
|
-
return 1;
|
|
59730
|
-
}
|
|
59731
|
-
try {
|
|
59732
|
-
return await handler(context, args.slice(1));
|
|
59733
|
-
} catch (error51) {
|
|
59734
|
-
if (error51 instanceof UsageError) {
|
|
59735
|
-
context.io.stderr.write(`${error51.message}
|
|
59736
|
-
${usageText}
|
|
59737
|
-
`);
|
|
59738
|
-
return 1;
|
|
59739
|
-
}
|
|
59740
|
-
throw error51;
|
|
59741
|
-
}
|
|
59742
|
-
}
|
|
59743
|
-
function execute(context, parsed, commandId, body, format) {
|
|
59744
|
-
const autoConfirm = parsed.flags.has("yes") || parsed.flags.has("y");
|
|
59745
|
-
const options = {
|
|
59746
|
-
...parsed.seat === void 0 ? {} : { targetSeatId: parsed.seat },
|
|
59747
|
-
...autoConfirm ? { autoConfirm: true } : {}
|
|
59748
|
-
};
|
|
59749
|
-
if (parsed.json) {
|
|
59750
|
-
return context.run(context.client, commandId, body, void 0, options);
|
|
59751
|
-
}
|
|
59752
|
-
return context.run(context.client, commandId, body, format, options);
|
|
59753
|
-
}
|
|
59754
|
-
|
|
59755
59778
|
// src/generator/flags.ts
|
|
59756
59779
|
var SEAT_FLAG_FILLS_REQUIRED_SEAT_ID = /* @__PURE__ */ new Set([
|
|
59757
59780
|
"agent.status",
|
|
@@ -59949,7 +59972,7 @@ function buildBodyFromFlags(entry, parsed, positional, overrides = {}) {
|
|
|
59949
59972
|
|
|
59950
59973
|
// src/generator/render.ts
|
|
59951
59974
|
function markdownLine(output) {
|
|
59952
|
-
const markdown =
|
|
59975
|
+
const markdown = asRecord2(output).markdown;
|
|
59953
59976
|
return typeof markdown === "string" ? markdown : JSON.stringify(output, null, 2);
|
|
59954
59977
|
}
|
|
59955
59978
|
function dryRunToolActionLabel(status) {
|
|
@@ -59987,28 +60010,28 @@ function dryRunLaneExecutabilityLines(transcript) {
|
|
|
59987
60010
|
return [];
|
|
59988
60011
|
}
|
|
59989
60012
|
const laneLabel = dryRunLaneLabel(lane);
|
|
59990
|
-
const unimplemented = grantedTools.map((tool) =>
|
|
60013
|
+
const unimplemented = grantedTools.map((tool) => asRecord2(tool)).filter((tool) => tool.executability === "unimplemented_in_lane");
|
|
59991
60014
|
const warningLines = unimplemented.map(
|
|
59992
|
-
(tool) => ` warning: ${
|
|
60015
|
+
(tool) => ` warning: ${field2(tool, "tool_name")} is granted but unimplemented in the ${laneLabel}`
|
|
59993
60016
|
);
|
|
59994
60017
|
const verdict = dryRunLaneVerdict(lane, grantedTools.length, unimplemented.length);
|
|
59995
60018
|
return ["lane executability:", ...warningLines, ` verdict: ${verdict}`];
|
|
59996
60019
|
}
|
|
59997
60020
|
function formatDryRunTranscript(value) {
|
|
59998
|
-
const transcript =
|
|
60021
|
+
const transcript = asRecord2(value);
|
|
59999
60022
|
const steps = asArray(transcript.steps);
|
|
60000
60023
|
if (steps.length === 0) {
|
|
60001
60024
|
return "";
|
|
60002
60025
|
}
|
|
60003
60026
|
const lines = steps.map((step) => {
|
|
60004
|
-
const record2 =
|
|
60005
|
-
const kind =
|
|
60006
|
-
const guard = record2.guard === null || record2.guard === void 0 ? "" : ` [${
|
|
60007
|
-
return ` ${kind}: ${
|
|
60027
|
+
const record2 = asRecord2(step);
|
|
60028
|
+
const kind = field2(record2, "kind");
|
|
60029
|
+
const guard = record2.guard === null || record2.guard === void 0 ? "" : ` [${field2(record2, "guard")}]`;
|
|
60030
|
+
return ` ${kind}: ${field2(record2, "text")}${guard}`;
|
|
60008
60031
|
});
|
|
60009
60032
|
const toolPreview = asArray(transcript.tool_preview).map((action) => {
|
|
60010
|
-
const record2 =
|
|
60011
|
-
return ` ${dryRunToolActionLabel(
|
|
60033
|
+
const record2 = asRecord2(action);
|
|
60034
|
+
return ` ${dryRunToolActionLabel(field2(record2, "status"))}: ${field2(record2, "intended_action")} [${field2(record2, "tool_name")}]`;
|
|
60012
60035
|
});
|
|
60013
60036
|
const laneLines = dryRunLaneExecutabilityLines(transcript);
|
|
60014
60037
|
return [
|
|
@@ -60038,9 +60061,9 @@ function renderCommandOutput(output) {
|
|
|
60038
60061
|
if (output.length === 0) {
|
|
60039
60062
|
return "No results.";
|
|
60040
60063
|
}
|
|
60041
|
-
return output.map((entry) => isScalar(entry) ? String(entry) : renderRow(
|
|
60064
|
+
return output.map((entry) => isScalar(entry) ? String(entry) : renderRow(asRecord2(entry))).join("\n");
|
|
60042
60065
|
}
|
|
60043
|
-
const record2 =
|
|
60066
|
+
const record2 = asRecord2(output);
|
|
60044
60067
|
if (typeof record2.markdown === "string") {
|
|
60045
60068
|
return record2.markdown;
|
|
60046
60069
|
}
|
|
@@ -60051,7 +60074,7 @@ function renderCommandOutput(output) {
|
|
|
60051
60074
|
if (list.length === 0) {
|
|
60052
60075
|
return `No ${humanize(name)}.`;
|
|
60053
60076
|
}
|
|
60054
|
-
return list.map((entry) => isScalar(entry) ? String(entry) : renderRow(
|
|
60077
|
+
return list.map((entry) => isScalar(entry) ? String(entry) : renderRow(asRecord2(entry))).join("\n");
|
|
60055
60078
|
}
|
|
60056
60079
|
const lines = [];
|
|
60057
60080
|
for (const [key, value] of orderedEntries(record2)) {
|
|
@@ -60063,11 +60086,11 @@ function renderCommandOutput(output) {
|
|
|
60063
60086
|
lines.push(` (none)`);
|
|
60064
60087
|
} else {
|
|
60065
60088
|
for (const entry of value) {
|
|
60066
|
-
lines.push(` ${isScalar(entry) ? String(entry) : renderRow(
|
|
60089
|
+
lines.push(` ${isScalar(entry) ? String(entry) : renderRow(asRecord2(entry))}`);
|
|
60067
60090
|
}
|
|
60068
60091
|
}
|
|
60069
60092
|
} else {
|
|
60070
|
-
lines.push(`${key}: ${renderRow(
|
|
60093
|
+
lines.push(`${key}: ${renderRow(asRecord2(value))}`);
|
|
60071
60094
|
}
|
|
60072
60095
|
}
|
|
60073
60096
|
return lines.length > 0 ? lines.join("\n") : JSON.stringify(output, null, 2);
|
|
@@ -60233,48 +60256,48 @@ function resolveModelConfig(model, effort) {
|
|
|
60233
60256
|
};
|
|
60234
60257
|
}
|
|
60235
60258
|
function renderTaskList(output) {
|
|
60236
|
-
const tasks = asArray(
|
|
60259
|
+
const tasks = asArray(asRecord2(output).tasks);
|
|
60237
60260
|
if (tasks.length === 0) {
|
|
60238
60261
|
return "No tasks in this seat's queue.";
|
|
60239
60262
|
}
|
|
60240
60263
|
return tasks.map((task) => {
|
|
60241
|
-
const record2 =
|
|
60242
|
-
return `${
|
|
60264
|
+
const record2 = asRecord2(task);
|
|
60265
|
+
return `${field2(record2, "id")} ${field2(record2, "status")} ${field2(record2, "title")}`;
|
|
60243
60266
|
}).join("\n");
|
|
60244
60267
|
}
|
|
60245
60268
|
function renderTaskAccept(output) {
|
|
60246
|
-
const task =
|
|
60247
|
-
return `Accepted task ${
|
|
60269
|
+
const task = asRecord2(asRecord2(output).task);
|
|
60270
|
+
return `Accepted task ${field2(task, "id")} (status ${field2(task, "status")}).`;
|
|
60248
60271
|
}
|
|
60249
60272
|
function renderTaskDecline(output) {
|
|
60250
|
-
const task =
|
|
60251
|
-
return `Declined task ${
|
|
60273
|
+
const task = asRecord2(asRecord2(output).task);
|
|
60274
|
+
return `Declined task ${field2(task, "id")} (status ${field2(task, "status")}).`;
|
|
60252
60275
|
}
|
|
60253
60276
|
function renderTaskComplete(output) {
|
|
60254
|
-
const record2 =
|
|
60255
|
-
return `Completed task ${
|
|
60277
|
+
const record2 = asRecord2(output);
|
|
60278
|
+
return `Completed task ${field2(record2, "task_id")} (event ${field2(record2, "event_id")}).`;
|
|
60256
60279
|
}
|
|
60257
60280
|
function renderTaskCreate(output) {
|
|
60258
|
-
const record2 =
|
|
60259
|
-
return `Created task ${
|
|
60281
|
+
const record2 = asRecord2(output);
|
|
60282
|
+
return `Created task ${field2(record2, "task_id")} for seat ${field2(record2, "owner_seat_id")} (status ${field2(record2, "status")}).`;
|
|
60260
60283
|
}
|
|
60261
60284
|
function renderStatusRecord(output) {
|
|
60262
|
-
return `Recorded status event ${
|
|
60285
|
+
return `Recorded status event ${field2(asRecord2(output), "event_id")}.`;
|
|
60263
60286
|
}
|
|
60264
60287
|
function renderGraph(output) {
|
|
60265
|
-
const record2 =
|
|
60288
|
+
const record2 = asRecord2(output);
|
|
60266
60289
|
const nodes = asArray(record2.nodes);
|
|
60267
60290
|
if (nodes.length === 0) {
|
|
60268
60291
|
return "No seats in the Responsibility Graph.";
|
|
60269
60292
|
}
|
|
60270
60293
|
const lines = [
|
|
60271
|
-
`root_seat_id=${
|
|
60294
|
+
`root_seat_id=${field2(record2, "root_seat_id")}`,
|
|
60272
60295
|
"seat_id parent_seat_id type status name"
|
|
60273
60296
|
];
|
|
60274
60297
|
const assigned = [];
|
|
60275
60298
|
const unassigned = [];
|
|
60276
60299
|
for (const node of nodes) {
|
|
60277
|
-
const row =
|
|
60300
|
+
const row = asRecord2(node);
|
|
60278
60301
|
if (row.unassigned) {
|
|
60279
60302
|
unassigned.push(row);
|
|
60280
60303
|
} else {
|
|
@@ -60282,47 +60305,47 @@ function renderGraph(output) {
|
|
|
60282
60305
|
}
|
|
60283
60306
|
}
|
|
60284
60307
|
for (const row of assigned) {
|
|
60285
|
-
lines.push(`${
|
|
60308
|
+
lines.push(`${field2(row, "seat_id")} ${field2(row, "parent_seat_id")} ${field2(row, "seat_type")} ${field2(row, "status")} ${field2(row, "name")}`);
|
|
60286
60309
|
}
|
|
60287
60310
|
if (unassigned.length > 0) {
|
|
60288
60311
|
lines.push("");
|
|
60289
60312
|
lines.push("Unassigned (no path to root \u2014 data-quality signal)");
|
|
60290
60313
|
lines.push("seat_id parent_seat_id type status name");
|
|
60291
60314
|
for (const row of unassigned) {
|
|
60292
|
-
lines.push(`${
|
|
60315
|
+
lines.push(`${field2(row, "seat_id")} ${field2(row, "parent_seat_id")} ${field2(row, "seat_type")} ${field2(row, "status")} ${field2(row, "name")}`);
|
|
60293
60316
|
}
|
|
60294
60317
|
}
|
|
60295
60318
|
return lines.join("\n");
|
|
60296
60319
|
}
|
|
60297
60320
|
function renderSeatList(output) {
|
|
60298
|
-
const nodes = asArray(
|
|
60321
|
+
const nodes = asArray(asRecord2(output).nodes);
|
|
60299
60322
|
if (nodes.length === 0) {
|
|
60300
60323
|
return "No seats.";
|
|
60301
60324
|
}
|
|
60302
60325
|
return nodes.map((node) => {
|
|
60303
|
-
const row =
|
|
60304
|
-
return `seat_id=${
|
|
60326
|
+
const row = asRecord2(node);
|
|
60327
|
+
return `seat_id=${field2(row, "seat_id")} parent_seat_id=${field2(row, "parent_seat_id")} type=${field2(row, "seat_type")} status=${field2(row, "status")} name=${field2(row, "name")}`;
|
|
60305
60328
|
}).join("\n");
|
|
60306
60329
|
}
|
|
60307
60330
|
function renderSeatDetail(output) {
|
|
60308
|
-
const record2 =
|
|
60309
|
-
const counts =
|
|
60331
|
+
const record2 = asRecord2(output);
|
|
60332
|
+
const counts = asRecord2(record2.counts);
|
|
60310
60333
|
return [
|
|
60311
|
-
`seat_id=${
|
|
60312
|
-
`parent_seat_id=${
|
|
60313
|
-
`agent_status=${
|
|
60314
|
-
`counts: open_tasks=${
|
|
60334
|
+
`seat_id=${field2(record2, "seat_id")} name=${field2(record2, "name")} type=${field2(record2, "seat_type")} status=${field2(record2, "status")}`,
|
|
60335
|
+
`parent_seat_id=${field2(record2, "parent_seat_id")} active_charter_version_id=${field2(record2, "active_charter_version_id")} draft_charter_version_id=${field2(record2, "draft_charter_version_id")}`,
|
|
60336
|
+
`agent_status=${field2(record2, "agent_status")} agent_lane=${field2(record2, "agent_lane")}`,
|
|
60337
|
+
`counts: open_tasks=${field2(counts, "open_tasks")} owned_goals=${field2(counts, "owned_goals")} active_measurables=${field2(counts, "active_measurables")} open_issues=${field2(counts, "open_issues")}`
|
|
60315
60338
|
].join("\n");
|
|
60316
60339
|
}
|
|
60317
60340
|
function renderSeatMutation(output) {
|
|
60318
|
-
return `seat_id=${
|
|
60341
|
+
return `seat_id=${field2(asRecord2(output), "seat_id")}`;
|
|
60319
60342
|
}
|
|
60320
60343
|
function renderSeatCreate(output) {
|
|
60321
|
-
const record2 =
|
|
60322
|
-
const effect =
|
|
60344
|
+
const record2 = asRecord2(output);
|
|
60345
|
+
const effect = asRecord2(record2.effect);
|
|
60323
60346
|
const lines = [
|
|
60324
|
-
`seat_id=${
|
|
60325
|
-
`effect=${
|
|
60347
|
+
`seat_id=${field2(record2, "seat_id")} status=${field2(record2, "status")}`,
|
|
60348
|
+
`effect=${field2(effect, "outcome")} applied=${field2(effect, "applied")} of ${field2(effect, "attempted")}`
|
|
60326
60349
|
];
|
|
60327
60350
|
if (record2.status === "vacant") {
|
|
60328
60351
|
lines.push(
|
|
@@ -60332,206 +60355,206 @@ function renderSeatCreate(output) {
|
|
|
60332
60355
|
return lines.join("\n");
|
|
60333
60356
|
}
|
|
60334
60357
|
function renderSeatDecommissionPreview(output) {
|
|
60335
|
-
const record2 =
|
|
60358
|
+
const record2 = asRecord2(output);
|
|
60336
60359
|
const effects = asArray(record2.effects).map((effect) => `- ${String(effect)}`);
|
|
60337
60360
|
return [
|
|
60338
|
-
`seat_id=${
|
|
60339
|
-
`active_occupancies=${
|
|
60340
|
-
`active_charters=${
|
|
60341
|
-
`open_work_orders=${
|
|
60361
|
+
`seat_id=${field2(record2, "seat_id")} name=${field2(record2, "seat_name")} status=${field2(record2, "previous_status")}`,
|
|
60362
|
+
`active_occupancies=${field2(record2, "active_occupancy_count")} active_agents=${field2(record2, "active_agent_ids")}`,
|
|
60363
|
+
`active_charters=${field2(record2, "active_charter_count")} mcp_tokens=${field2(record2, "active_mcp_token_count")} credentials=${field2(record2, "active_credential_count")}`,
|
|
60364
|
+
`open_work_orders=${field2(record2, "open_work_order_count")} schedules=${field2(record2, "schedule_count")} no_orphan_steward_guard=${field2(record2, "no_orphan_steward_guard")}`,
|
|
60342
60365
|
"effects:",
|
|
60343
60366
|
...effects
|
|
60344
60367
|
].join("\n");
|
|
60345
60368
|
}
|
|
60346
60369
|
function renderSignalList(output) {
|
|
60347
|
-
const signals = asArray(
|
|
60370
|
+
const signals = asArray(asRecord2(output).signals);
|
|
60348
60371
|
if (signals.length === 0) {
|
|
60349
60372
|
return "No Signals defined.";
|
|
60350
60373
|
}
|
|
60351
60374
|
return signals.map((signal) => {
|
|
60352
|
-
const record2 =
|
|
60353
|
-
return `${
|
|
60375
|
+
const record2 = asRecord2(signal);
|
|
60376
|
+
return `${field2(record2, "measurable_id")} ${field2(record2, "state")} ${field2(record2, "name")} (latest ${field2(record2, "latest_value")} / target ${field2(record2, "target")}, measured by ${field2(record2, "effective_source")})`;
|
|
60354
60377
|
}).join("\n");
|
|
60355
60378
|
}
|
|
60356
60379
|
function renderSignalGet(output) {
|
|
60357
|
-
const record2 =
|
|
60380
|
+
const record2 = asRecord2(output);
|
|
60358
60381
|
const readings = asArray(record2.readings);
|
|
60359
|
-
const head2 = `${
|
|
60382
|
+
const head2 = `${field2(record2, "measurable_id")} ${field2(record2, "state")} ${field2(record2, "name")} (target ${field2(record2, "target")})`;
|
|
60360
60383
|
const lines = readings.map((reading) => {
|
|
60361
|
-
const r =
|
|
60362
|
-
return ` ${
|
|
60384
|
+
const r = asRecord2(reading);
|
|
60385
|
+
return ` ${field2(r, "reading_id")} ${field2(r, "period_start")} ${field2(r, "value")} confirmed=${field2(r, "confirmed")}`;
|
|
60363
60386
|
});
|
|
60364
60387
|
return [head2, ...lines].join("\n");
|
|
60365
60388
|
}
|
|
60366
60389
|
function renderSignalConfirm(output) {
|
|
60367
|
-
return `Confirmed reading ${
|
|
60390
|
+
return `Confirmed reading ${field2(asRecord2(output), "reading_id")}.`;
|
|
60368
60391
|
}
|
|
60369
60392
|
function renderSignalCorrect(output) {
|
|
60370
|
-
const record2 =
|
|
60371
|
-
return `Corrected reading ${
|
|
60393
|
+
const record2 = asRecord2(output);
|
|
60394
|
+
return `Corrected reading ${field2(record2, "reading_id")} for measurable ${field2(record2, "measurable_id")} (${field2(record2, "period_start")} = ${field2(record2, "value")}).`;
|
|
60372
60395
|
}
|
|
60373
60396
|
function renderGoalList(output) {
|
|
60374
|
-
const goals = asArray(
|
|
60397
|
+
const goals = asArray(asRecord2(output).goals);
|
|
60375
60398
|
if (goals.length === 0) {
|
|
60376
60399
|
return "No goals in this Cascade.";
|
|
60377
60400
|
}
|
|
60378
60401
|
return goals.map((goal) => {
|
|
60379
|
-
const record2 =
|
|
60380
|
-
return `${
|
|
60402
|
+
const record2 = asRecord2(goal);
|
|
60403
|
+
return `${field2(record2, "goal_id")} ${field2(record2, "status")} ${field2(record2, "title")}`;
|
|
60381
60404
|
}).join("\n");
|
|
60382
60405
|
}
|
|
60383
60406
|
function renderWarnings(record2) {
|
|
60384
60407
|
return asArray(record2.warnings).map((warning) => `Warning: ${String(warning)}`);
|
|
60385
60408
|
}
|
|
60386
60409
|
function renderGoalCreate(output) {
|
|
60387
|
-
const record2 =
|
|
60410
|
+
const record2 = asRecord2(output);
|
|
60388
60411
|
return [
|
|
60389
|
-
`Created goal ${
|
|
60412
|
+
`Created goal ${field2(record2, "goal_id")} (status ${field2(record2, "status")}).`,
|
|
60390
60413
|
...renderWarnings(record2)
|
|
60391
60414
|
].join("\n");
|
|
60392
60415
|
}
|
|
60393
60416
|
function renderGoalUpdate(output) {
|
|
60394
|
-
const record2 =
|
|
60417
|
+
const record2 = asRecord2(output);
|
|
60395
60418
|
return [
|
|
60396
|
-
`Updated goal ${
|
|
60419
|
+
`Updated goal ${field2(record2, "goal_id")}.`,
|
|
60397
60420
|
...renderWarnings(record2)
|
|
60398
60421
|
].join("\n");
|
|
60399
60422
|
}
|
|
60400
60423
|
function renderGoalStatus(output) {
|
|
60401
|
-
const record2 =
|
|
60402
|
-
return `Goal ${
|
|
60424
|
+
const record2 = asRecord2(output);
|
|
60425
|
+
return `Goal ${field2(record2, "goal_id")} status set to ${field2(record2, "status")}.`;
|
|
60403
60426
|
}
|
|
60404
60427
|
function renderGoalGet(output) {
|
|
60405
|
-
const record2 =
|
|
60428
|
+
const record2 = asRecord2(asRecord2(output).goal);
|
|
60406
60429
|
return [
|
|
60407
|
-
`${
|
|
60408
|
-
`kind: ${
|
|
60409
|
-
`progress: ${
|
|
60410
|
-
`definition of done: ${
|
|
60430
|
+
`${field2(record2, "id")} ${field2(record2, "status")} ${field2(record2, "title")}`,
|
|
60431
|
+
`kind: ${field2(record2, "kind")} status source: ${field2(record2, "status_source")}`,
|
|
60432
|
+
`progress: ${field2(record2, "progress_pct")}`,
|
|
60433
|
+
`definition of done: ${field2(record2, "definition_of_done")}`
|
|
60411
60434
|
].join("\n");
|
|
60412
60435
|
}
|
|
60413
60436
|
function renderGoalReparent(output) {
|
|
60414
|
-
const record2 =
|
|
60415
|
-
return `Goal ${
|
|
60437
|
+
const record2 = asRecord2(output);
|
|
60438
|
+
return `Goal ${field2(record2, "goal_id")} reparented under ${field2(record2, "parent_goal_id")}.`;
|
|
60416
60439
|
}
|
|
60417
60440
|
function renderGoalReassignOwner(output) {
|
|
60418
|
-
const record2 =
|
|
60419
|
-
return `Goal ${
|
|
60441
|
+
const record2 = asRecord2(output);
|
|
60442
|
+
return `Goal ${field2(record2, "goal_id")} owner reassigned to seat ${field2(record2, "seat_id")}.`;
|
|
60420
60443
|
}
|
|
60421
60444
|
function renderGoalDrop(output) {
|
|
60422
|
-
const record2 =
|
|
60423
|
-
return `Dropped goal ${
|
|
60445
|
+
const record2 = asRecord2(output);
|
|
60446
|
+
return `Dropped goal ${field2(record2, "goal_id")} (status ${field2(record2, "status")}).`;
|
|
60424
60447
|
}
|
|
60425
60448
|
function renderFrictionList(output) {
|
|
60426
|
-
const issues = asArray(
|
|
60449
|
+
const issues = asArray(asRecord2(output).issues);
|
|
60427
60450
|
if (issues.length === 0) {
|
|
60428
60451
|
return "No Friction issues.";
|
|
60429
60452
|
}
|
|
60430
60453
|
return issues.map((issue2) => {
|
|
60431
|
-
const record2 =
|
|
60432
|
-
return `${
|
|
60454
|
+
const record2 = asRecord2(issue2);
|
|
60455
|
+
return `${field2(record2, "issue_id")} ${field2(record2, "status")} ${field2(record2, "severity")} ${field2(record2, "summary")}`;
|
|
60433
60456
|
}).join("\n");
|
|
60434
60457
|
}
|
|
60435
60458
|
function renderFrictionFile(output) {
|
|
60436
|
-
const record2 =
|
|
60437
|
-
return `Filed Friction issue ${
|
|
60459
|
+
const record2 = asRecord2(output);
|
|
60460
|
+
return `Filed Friction issue ${field2(record2, "issue_id")} (event ${field2(record2, "event_id")}).`;
|
|
60438
60461
|
}
|
|
60439
60462
|
function renderFrictionResolve(output) {
|
|
60440
|
-
const record2 =
|
|
60441
|
-
return `Resolved issue ${
|
|
60463
|
+
const record2 = asRecord2(output);
|
|
60464
|
+
return `Resolved issue ${field2(record2, "issue_id")} \u2192 action task ${field2(record2, "action_task_id")} (decision ${field2(record2, "decision_id")}).`;
|
|
60442
60465
|
}
|
|
60443
60466
|
function renderFrictionLink(output) {
|
|
60444
|
-
const record2 =
|
|
60445
|
-
return `Linked task ${
|
|
60467
|
+
const record2 = asRecord2(output);
|
|
60468
|
+
return `Linked task ${field2(record2, "action_task_id")} to issue ${field2(record2, "issue_id")}.`;
|
|
60446
60469
|
}
|
|
60447
60470
|
function renderFrictionGet(output) {
|
|
60448
|
-
const record2 =
|
|
60471
|
+
const record2 = asRecord2(asRecord2(output).issue);
|
|
60449
60472
|
return [
|
|
60450
|
-
`${
|
|
60451
|
-
`summary: ${
|
|
60452
|
-
`raised by: ${
|
|
60453
|
-
`impact score: ${
|
|
60454
|
-
`root cause: ${
|
|
60455
|
-
`action task: ${
|
|
60473
|
+
`${field2(record2, "issue_id")} ${field2(record2, "status")} ${field2(record2, "severity")}`,
|
|
60474
|
+
`summary: ${field2(record2, "summary")}`,
|
|
60475
|
+
`raised by: ${field2(record2, "raised_by_seat_name")}`,
|
|
60476
|
+
`impact score: ${field2(record2, "impact_score")}`,
|
|
60477
|
+
`root cause: ${field2(record2, "root_cause")}`,
|
|
60478
|
+
`action task: ${field2(record2, "action_task_id")}`
|
|
60456
60479
|
].join("\n");
|
|
60457
60480
|
}
|
|
60458
60481
|
function renderConfirmationList(output) {
|
|
60459
|
-
const confirmations = asArray(
|
|
60482
|
+
const confirmations = asArray(asRecord2(output).confirmations);
|
|
60460
60483
|
if (confirmations.length === 0) {
|
|
60461
60484
|
return "No pending confirmations.";
|
|
60462
60485
|
}
|
|
60463
60486
|
return confirmations.map((entry) => {
|
|
60464
|
-
const record2 =
|
|
60465
|
-
return `${
|
|
60487
|
+
const record2 = asRecord2(entry);
|
|
60488
|
+
return `${field2(record2, "id")} ${field2(record2, "risk_level")} ${field2(record2, "command_id")} ${field2(record2, "summary")}`;
|
|
60466
60489
|
}).join("\n");
|
|
60467
60490
|
}
|
|
60468
60491
|
function safetyRefusalTag(record2) {
|
|
60469
60492
|
return record2.category === "safety_refusal" ? "[safety refusal] " : "";
|
|
60470
60493
|
}
|
|
60471
60494
|
function renderEscalationList(output) {
|
|
60472
|
-
const escalations = asArray(
|
|
60495
|
+
const escalations = asArray(asRecord2(output).escalations);
|
|
60473
60496
|
if (escalations.length === 0) {
|
|
60474
60497
|
return "No escalations on this steward chain.";
|
|
60475
60498
|
}
|
|
60476
60499
|
return escalations.map((escalation) => {
|
|
60477
|
-
const record2 =
|
|
60478
|
-
return `${
|
|
60500
|
+
const record2 = asRecord2(escalation);
|
|
60501
|
+
return `${field2(record2, "id")} ${field2(record2, "status")} ${safetyRefusalTag(record2)}${field2(record2, "seat_name")}: ${field2(record2, "reason")}`;
|
|
60479
60502
|
}).join("\n");
|
|
60480
60503
|
}
|
|
60481
60504
|
function renderEscalationGet(output) {
|
|
60482
|
-
const record2 =
|
|
60483
|
-
return `${
|
|
60484
|
-
reason: ${
|
|
60485
|
-
recommended: ${
|
|
60505
|
+
const record2 = asRecord2(asRecord2(output).escalation);
|
|
60506
|
+
return `${field2(record2, "id")} ${field2(record2, "status")} ${safetyRefusalTag(record2)}${field2(record2, "seat_name")}
|
|
60507
|
+
reason: ${field2(record2, "reason")}
|
|
60508
|
+
recommended: ${field2(record2, "recommended_action")}`;
|
|
60486
60509
|
}
|
|
60487
60510
|
function renderEscalationResolve(output) {
|
|
60488
|
-
const record2 =
|
|
60489
|
-
return `Resolved escalation ${
|
|
60511
|
+
const record2 = asRecord2(output);
|
|
60512
|
+
return `Resolved escalation ${field2(record2, "escalation_id")} (status ${field2(record2, "status")}, decision ${field2(record2, "decision_id")}).`;
|
|
60490
60513
|
}
|
|
60491
60514
|
function renderEscalationReject(output) {
|
|
60492
|
-
const record2 =
|
|
60493
|
-
return `Rejected escalation ${
|
|
60515
|
+
const record2 = asRecord2(output);
|
|
60516
|
+
return `Rejected escalation ${field2(record2, "escalation_id")} (status ${field2(record2, "status")}, decision ${field2(record2, "decision_id")}).`;
|
|
60494
60517
|
}
|
|
60495
60518
|
function renderSyncBrief(output) {
|
|
60496
|
-
const record2 =
|
|
60497
|
-
return `Sync brief ${
|
|
60498
|
-
${
|
|
60519
|
+
const record2 = asRecord2(output);
|
|
60520
|
+
return `Sync brief ${field2(record2, "sync_brief_id")} (${field2(record2, "period_start")} \u2192 ${field2(record2, "period_end")})
|
|
60521
|
+
${field2(record2, "summary")}`;
|
|
60499
60522
|
}
|
|
60500
60523
|
function renderSyncCompile(output) {
|
|
60501
|
-
const record2 =
|
|
60502
|
-
return `Compiled sync brief ${
|
|
60524
|
+
const record2 = asRecord2(output);
|
|
60525
|
+
return `Compiled sync brief ${field2(record2, "sync_brief_id")} (${field2(record2, "period_start")} \u2192 ${field2(record2, "period_end")}, degraded=${field2(record2, "degraded")}).`;
|
|
60503
60526
|
}
|
|
60504
60527
|
function renderSyncComplete(output) {
|
|
60505
|
-
const record2 =
|
|
60528
|
+
const record2 = asRecord2(output);
|
|
60506
60529
|
const decisions = asArray(record2.decision_ids).length;
|
|
60507
60530
|
const tasks = asArray(record2.task_ids).length;
|
|
60508
|
-
return `Completed sync run for brief ${
|
|
60531
|
+
return `Completed sync run for brief ${field2(record2, "sync_brief_id")} (event ${field2(record2, "event_id")}, ${decisions} decisions, ${tasks} tasks).`;
|
|
60509
60532
|
}
|
|
60510
60533
|
function renderRunnerList(output) {
|
|
60511
|
-
const runners = asArray(
|
|
60534
|
+
const runners = asArray(asRecord2(output).runners);
|
|
60512
60535
|
if (runners.length === 0) {
|
|
60513
60536
|
return "No runners paired.";
|
|
60514
60537
|
}
|
|
60515
60538
|
return runners.map((runner) => {
|
|
60516
|
-
const record2 =
|
|
60517
|
-
const posture =
|
|
60518
|
-
const capacity =
|
|
60519
|
-
const execution =
|
|
60539
|
+
const record2 = asRecord2(runner);
|
|
60540
|
+
const posture = asRecord2(record2.posture);
|
|
60541
|
+
const capacity = asRecord2(record2.capacity);
|
|
60542
|
+
const execution = asRecord2(record2.execution);
|
|
60520
60543
|
const capabilitySet = asArray(posture.capability_set).map((value) => String(value)).join(", ");
|
|
60521
|
-
return `${
|
|
60544
|
+
return `${field2(record2, "id")} ${field2(record2, "health")} ${field2(record2, "name")} (${field2(record2, "platform")}) cli=${field2(record2, "cli_version")} sandbox=${field2(posture, "sandbox")} network=${field2(posture, "network")}${capabilitySet.length > 0 ? ` capabilities=${capabilitySet}` : ""} execution=${field2(execution, "state")} capable=${field2(execution, "capable")} capacity=${field2(capacity, "state")} account=${field2(capacity, "account_alias")} freshness=${field2(capacity, "freshness")}`;
|
|
60522
60545
|
}).join("\n");
|
|
60523
60546
|
}
|
|
60524
60547
|
function renderRunnerStatus(output) {
|
|
60525
|
-
const record2 =
|
|
60526
|
-
const posture =
|
|
60527
|
-
const capacity =
|
|
60528
|
-
const execution =
|
|
60548
|
+
const record2 = asRecord2(output);
|
|
60549
|
+
const posture = asRecord2(record2.posture);
|
|
60550
|
+
const capacity = asRecord2(record2.capacity);
|
|
60551
|
+
const execution = asRecord2(record2.execution);
|
|
60529
60552
|
const capabilitySet = asArray(posture.capability_set).map((value) => String(value)).join(", ");
|
|
60530
60553
|
const lines = [
|
|
60531
|
-
`${
|
|
60532
|
-
`cli_version: ${
|
|
60533
|
-
`execution: ${
|
|
60534
|
-
`capacity: ${
|
|
60554
|
+
`${field2(record2, "id")} ${field2(record2, "health")} ${field2(record2, "name")} (last heartbeat ${field2(record2, "last_heartbeat_at")}).`,
|
|
60555
|
+
`cli_version: ${field2(record2, "cli_version")} sandbox: ${field2(posture, "sandbox")} network: ${field2(posture, "network")}`,
|
|
60556
|
+
`execution: ${field2(execution, "state")} capable: ${field2(execution, "capable")} execute_ready: ${field2(execution, "execute_ready")}`,
|
|
60557
|
+
`capacity: ${field2(capacity, "state")} account: ${field2(capacity, "account_alias")} freshness: ${field2(capacity, "freshness")} rate_limited_until: ${field2(capacity, "rate_limited_until")}`
|
|
60535
60558
|
];
|
|
60536
60559
|
if (capabilitySet.length > 0) {
|
|
60537
60560
|
lines.push(`capabilities: ${capabilitySet}`);
|
|
@@ -60539,424 +60562,424 @@ function renderRunnerStatus(output) {
|
|
|
60539
60562
|
return lines.join("\n");
|
|
60540
60563
|
}
|
|
60541
60564
|
function renderRunnerDiagnose(output) {
|
|
60542
|
-
const record2 =
|
|
60565
|
+
const record2 = asRecord2(output);
|
|
60543
60566
|
const guidance = asArray(record2.repair_guidance);
|
|
60544
60567
|
const lines = [
|
|
60545
|
-
`Runner ${
|
|
60546
|
-
`health: ${
|
|
60547
|
-
`paired_at: ${
|
|
60548
|
-
`capabilities: claude=${String(
|
|
60549
|
-
`revocation_state: ${
|
|
60568
|
+
`Runner ${field2(record2, "name")} (${field2(record2, "id")})`,
|
|
60569
|
+
`health: ${field2(record2, "health")} platform: ${field2(record2, "platform")}`,
|
|
60570
|
+
`paired_at: ${field2(record2, "paired_at")} last_heartbeat: ${field2(record2, "last_heartbeat_at")}`,
|
|
60571
|
+
`capabilities: claude=${String(asRecord2(record2.capabilities).claude)} codex=${String(asRecord2(record2.capabilities).codex)}`,
|
|
60572
|
+
`revocation_state: ${field2(record2, "revocation_state")}`
|
|
60550
60573
|
];
|
|
60551
60574
|
if (guidance.length > 0) {
|
|
60552
60575
|
lines.push("repair_guidance:");
|
|
60553
60576
|
guidance.forEach((step) => {
|
|
60554
|
-
const s =
|
|
60555
|
-
lines.push(` ${
|
|
60577
|
+
const s = asRecord2(step);
|
|
60578
|
+
lines.push(` ${field2(s, "action")}: ${field2(s, "detail")}`);
|
|
60556
60579
|
});
|
|
60557
60580
|
}
|
|
60558
60581
|
return lines.join("\n");
|
|
60559
60582
|
}
|
|
60560
60583
|
function renderRunnerRepair(output) {
|
|
60561
|
-
const record2 =
|
|
60584
|
+
const record2 = asRecord2(output);
|
|
60562
60585
|
const steps = asArray(record2.repair_steps);
|
|
60563
60586
|
const lines = [
|
|
60564
|
-
`Runner ${
|
|
60565
|
-
`requires_human: ${
|
|
60587
|
+
`Runner ${field2(record2, "runner_name")} (${field2(record2, "runner_id")}) health: ${field2(record2, "runner_health")}`,
|
|
60588
|
+
`requires_human: ${field2(record2, "requires_human")}`
|
|
60566
60589
|
];
|
|
60567
60590
|
if (steps.length > 0) {
|
|
60568
60591
|
lines.push("repair_steps:");
|
|
60569
60592
|
steps.forEach((step) => {
|
|
60570
|
-
const s =
|
|
60571
|
-
lines.push(` ${
|
|
60572
|
-
lines.push(` command: ${
|
|
60573
|
-
lines.push(` detail: ${
|
|
60593
|
+
const s = asRecord2(step);
|
|
60594
|
+
lines.push(` ${field2(s, "action")}`);
|
|
60595
|
+
lines.push(` command: ${field2(s, "command")}`);
|
|
60596
|
+
lines.push(` detail: ${field2(s, "detail")}`);
|
|
60574
60597
|
});
|
|
60575
60598
|
}
|
|
60576
60599
|
return lines.join("\n");
|
|
60577
60600
|
}
|
|
60578
60601
|
function renderWorkOrders(output) {
|
|
60579
|
-
const workOrders = asArray(
|
|
60602
|
+
const workOrders = asArray(asRecord2(output).work_orders);
|
|
60580
60603
|
if (workOrders.length === 0) {
|
|
60581
60604
|
return "No work orders.";
|
|
60582
60605
|
}
|
|
60583
60606
|
return workOrders.map((workOrder) => {
|
|
60584
|
-
const record2 =
|
|
60585
|
-
return `${
|
|
60607
|
+
const record2 = asRecord2(workOrder);
|
|
60608
|
+
return `${field2(record2, "id")} ${field2(record2, "status")} ${field2(record2, "lane")} agent ${field2(record2, "agent_id")}`;
|
|
60586
60609
|
}).join("\n");
|
|
60587
60610
|
}
|
|
60588
60611
|
function renderRunnerRevoke(output) {
|
|
60589
|
-
const record2 =
|
|
60590
|
-
return `Revoked runner ${
|
|
60612
|
+
const record2 = asRecord2(output);
|
|
60613
|
+
return `Revoked runner ${field2(record2, "runner_id")} (revoked=${field2(record2, "revoked")}).`;
|
|
60591
60614
|
}
|
|
60592
60615
|
function renderNotificationSettings(output) {
|
|
60593
|
-
const record2 =
|
|
60594
|
-
return `escalations=${
|
|
60616
|
+
const record2 = asRecord2(output);
|
|
60617
|
+
return `escalations=${field2(record2, "escalations_enabled")} sync_brief=${field2(record2, "sync_brief_enabled")} default_channel=${field2(record2, "default_channel")}`;
|
|
60595
60618
|
}
|
|
60596
60619
|
function renderNotificationTest(output) {
|
|
60597
|
-
const record2 =
|
|
60598
|
-
return `Test notification ${
|
|
60620
|
+
const record2 = asRecord2(output);
|
|
60621
|
+
return `Test notification ${field2(record2, "notification_id")} (delivered=${field2(record2, "delivered")}).`;
|
|
60599
60622
|
}
|
|
60600
60623
|
function renderNotificationErrors(output) {
|
|
60601
|
-
const errors = asArray(
|
|
60624
|
+
const errors = asArray(asRecord2(output).errors);
|
|
60602
60625
|
if (errors.length === 0) {
|
|
60603
60626
|
return "No failed notification deliveries.";
|
|
60604
60627
|
}
|
|
60605
60628
|
return errors.map((entry) => {
|
|
60606
|
-
const record2 =
|
|
60607
|
-
return `${
|
|
60629
|
+
const record2 = asRecord2(entry);
|
|
60630
|
+
return `${field2(record2, "created_at")} ${field2(record2, "channel")} source=${field2(record2, "source")} seat=${field2(record2, "seat_id")} run=${field2(record2, "run_id")} ${field2(record2, "error_message")}`;
|
|
60608
60631
|
}).join("\n");
|
|
60609
60632
|
}
|
|
60610
60633
|
function formatIntegrationLine(record2) {
|
|
60611
|
-
return `${
|
|
60634
|
+
return `${field2(record2, "provider")} status=${field2(record2, "status")} account=${field2(record2, "account_email")} last_test=${field2(record2, "last_test_result")} id=${field2(record2, "id")}`;
|
|
60612
60635
|
}
|
|
60613
60636
|
function renderIntegrationList(output) {
|
|
60614
|
-
const integrations = asArray(
|
|
60637
|
+
const integrations = asArray(asRecord2(output).integrations);
|
|
60615
60638
|
if (integrations.length === 0) {
|
|
60616
60639
|
return "No integrations are connected.";
|
|
60617
60640
|
}
|
|
60618
|
-
return integrations.map((entry) => formatIntegrationLine(
|
|
60641
|
+
return integrations.map((entry) => formatIntegrationLine(asRecord2(entry))).join("\n");
|
|
60619
60642
|
}
|
|
60620
60643
|
function renderIntegrationReadiness(output) {
|
|
60621
|
-
const connectors = asArray(
|
|
60644
|
+
const connectors = asArray(asRecord2(output).connectors);
|
|
60622
60645
|
if (connectors.length === 0) {
|
|
60623
60646
|
return "No connector readiness facts found.";
|
|
60624
60647
|
}
|
|
60625
|
-
return connectors.map((entry) => formatIntegrationReadinessLine(
|
|
60648
|
+
return connectors.map((entry) => formatIntegrationReadinessLine(asRecord2(entry))).join("\n\n");
|
|
60626
60649
|
}
|
|
60627
60650
|
function formatIntegrationReadinessLine(record2) {
|
|
60628
60651
|
const checks = asArray(record2.checks).map((entry) => {
|
|
60629
|
-
const check2 =
|
|
60630
|
-
const issue2 =
|
|
60631
|
-
return ` - ${
|
|
60652
|
+
const check2 = asRecord2(entry);
|
|
60653
|
+
const issue2 = field2(check2, "linear_issue") === "\u2014" ? "" : ` ${field2(check2, "linear_issue")}`;
|
|
60654
|
+
return ` - ${field2(check2, "label")}: ${field2(check2, "status")}${issue2} \u2014 ${field2(check2, "detail")}`;
|
|
60632
60655
|
});
|
|
60633
60656
|
const actions = asArray(record2.next_actions).map((entry) => ` - ${String(entry)}`);
|
|
60634
60657
|
return [
|
|
60635
|
-
`${
|
|
60636
|
-
|
|
60658
|
+
`${field2(record2, "provider")} readiness=${field2(record2, "overall_status")} id=${field2(record2, "integration_id")}`,
|
|
60659
|
+
field2(record2, "summary"),
|
|
60637
60660
|
checks.length > 0 ? ["checks:", ...checks].join("\n") : "",
|
|
60638
60661
|
actions.length > 0 ? ["next:", ...actions].join("\n") : ""
|
|
60639
60662
|
].filter((line) => line.length > 0).join("\n");
|
|
60640
60663
|
}
|
|
60641
60664
|
function renderIntegrationStatus(output) {
|
|
60642
|
-
const integration =
|
|
60665
|
+
const integration = asRecord2(output).integration;
|
|
60643
60666
|
if (integration === null) {
|
|
60644
60667
|
return "Integration not found.";
|
|
60645
60668
|
}
|
|
60646
|
-
return formatIntegrationLine(
|
|
60669
|
+
return formatIntegrationLine(asRecord2(integration));
|
|
60647
60670
|
}
|
|
60648
60671
|
function renderIntegrationTest(output) {
|
|
60649
|
-
const record2 =
|
|
60650
|
-
return `${
|
|
60672
|
+
const record2 = asRecord2(output);
|
|
60673
|
+
return `${field2(record2, "provider")} ${field2(record2, "status")} (ok=${field2(record2, "ok")}) ${field2(record2, "message")}`;
|
|
60651
60674
|
}
|
|
60652
60675
|
function renderSettingsGet(output) {
|
|
60653
|
-
const record2 =
|
|
60654
|
-
const spend =
|
|
60655
|
-
const policy =
|
|
60656
|
-
return `tenant ${
|
|
60676
|
+
const record2 = asRecord2(output);
|
|
60677
|
+
const spend = asRecord2(record2.spend);
|
|
60678
|
+
const policy = asRecord2(record2.product_learning);
|
|
60679
|
+
return `tenant ${field2(record2, "tenant_id")} plan=${field2(record2, "plan")} status=${field2(record2, "status")} spend=$${field2(spend, "spend_usd")} has_anthropic_key=${field2(record2, "has_anthropic_key")} product_learning=${field2(policy, "mode")}`;
|
|
60657
60680
|
}
|
|
60658
60681
|
function renderSettingsUpdate(output) {
|
|
60659
|
-
const spend =
|
|
60660
|
-
return `Updated budget caps (soft=$${
|
|
60682
|
+
const spend = asRecord2(asRecord2(output).spend);
|
|
60683
|
+
return `Updated budget caps (soft=$${field2(spend, "soft_cap_usd")}, hard=$${field2(spend, "hard_cap_usd")}).`;
|
|
60661
60684
|
}
|
|
60662
60685
|
function renderTenantRename(output) {
|
|
60663
|
-
const record2 =
|
|
60664
|
-
return `Renamed company from ${
|
|
60686
|
+
const record2 = asRecord2(output);
|
|
60687
|
+
return `Renamed company from ${field2(record2, "previous_name")} to ${field2(record2, "name")}.`;
|
|
60665
60688
|
}
|
|
60666
60689
|
function renderProductLearningGet(output) {
|
|
60667
|
-
const policy =
|
|
60668
|
-
return `product_learning ${
|
|
60690
|
+
const policy = asRecord2(asRecord2(output).product_learning);
|
|
60691
|
+
return `product_learning ${field2(policy, "mode")} product_analytics_enabled=${field2(policy, "product_analytics_enabled")} security_audit_logs_enabled=${field2(policy, "security_audit_logs_enabled")}`;
|
|
60669
60692
|
}
|
|
60670
60693
|
function renderProductLearningUpdate(output) {
|
|
60671
|
-
const policy =
|
|
60672
|
-
return `Updated product-learning policy to ${
|
|
60694
|
+
const policy = asRecord2(asRecord2(output).product_learning);
|
|
60695
|
+
return `Updated product-learning policy to ${field2(policy, "mode")} (product_analytics_enabled=${field2(policy, "product_analytics_enabled")}).`;
|
|
60673
60696
|
}
|
|
60674
60697
|
function renderAgentPolicyGet(output) {
|
|
60675
|
-
const policy =
|
|
60676
|
-
return `agent_policy profile=${
|
|
60698
|
+
const policy = asRecord2(asRecord2(output).agent_policy);
|
|
60699
|
+
return `agent_policy profile=${field2(policy, "profile")} enforcement=${field2(policy, "enforcement")} max_autonomous_risk=${field2(policy, "max_autonomous_risk")} explicit=${field2(policy, "explicit")}`;
|
|
60677
60700
|
}
|
|
60678
60701
|
function renderAgentPolicySet(output) {
|
|
60679
|
-
const policy =
|
|
60680
|
-
return `Set company autonomy ceiling to ${
|
|
60702
|
+
const policy = asRecord2(asRecord2(output).agent_policy);
|
|
60703
|
+
return `Set company autonomy ceiling to ${field2(policy, "profile")} (max_autonomous_risk=${field2(policy, "max_autonomous_risk")}, enforcement=${field2(policy, "enforcement")}).`;
|
|
60681
60704
|
}
|
|
60682
60705
|
function renderConfirmationModeGet(output) {
|
|
60683
|
-
const policy =
|
|
60684
|
-
return `confirmation_policy cli_mode=${
|
|
60706
|
+
const policy = asRecord2(asRecord2(output).confirmation_policy);
|
|
60707
|
+
return `confirmation_policy cli_mode=${field2(policy, "cli_mode")} explicit=${field2(policy, "explicit")}`;
|
|
60685
60708
|
}
|
|
60686
60709
|
function renderConfirmationModeSet(output) {
|
|
60687
|
-
const policy =
|
|
60688
|
-
return `Updated CLI confirmation mode to ${
|
|
60710
|
+
const policy = asRecord2(asRecord2(output).confirmation_policy);
|
|
60711
|
+
return `Updated CLI confirmation mode to ${field2(policy, "cli_mode")}.`;
|
|
60689
60712
|
}
|
|
60690
60713
|
function renderMemberInvite(output) {
|
|
60691
|
-
const record2 =
|
|
60692
|
-
return `Invited ${
|
|
60714
|
+
const record2 = asRecord2(output);
|
|
60715
|
+
return `Invited ${field2(record2, "email")} as ${field2(record2, "role")} (invite ${field2(record2, "invite_id")}).`;
|
|
60693
60716
|
}
|
|
60694
60717
|
function renderMemberUpdate(output) {
|
|
60695
|
-
const record2 =
|
|
60696
|
-
return `Updated member ${
|
|
60718
|
+
const record2 = asRecord2(output);
|
|
60719
|
+
return `Updated member ${field2(record2, "member_id")} \u2192 ${field2(record2, "role")}.`;
|
|
60697
60720
|
}
|
|
60698
60721
|
function renderMemberRemove(output) {
|
|
60699
|
-
const record2 =
|
|
60700
|
-
return `Removed member ${
|
|
60722
|
+
const record2 = asRecord2(output);
|
|
60723
|
+
return `Removed member ${field2(record2, "member_id")} (removed=${field2(record2, "removed")}).`;
|
|
60701
60724
|
}
|
|
60702
60725
|
function agentSetupStateLine(output) {
|
|
60703
|
-
const record2 =
|
|
60704
|
-
const dryRun = record2.dry_run === null || record2.dry_run === void 0 ? "\u2014" :
|
|
60726
|
+
const record2 = asRecord2(output);
|
|
60727
|
+
const dryRun = record2.dry_run === null || record2.dry_run === void 0 ? "\u2014" : field2(asRecord2(record2.dry_run), "status");
|
|
60705
60728
|
const lines = [
|
|
60706
|
-
`setup ${
|
|
60707
|
-
`status=${
|
|
60729
|
+
`setup ${field2(record2, "setup_id")} seat ${field2(record2, "seat_id")} agent ${field2(record2, "agent_id")}`,
|
|
60730
|
+
`status=${field2(record2, "status")} next=${field2(record2, "next_action")} dry_run=${dryRun}`
|
|
60708
60731
|
];
|
|
60709
60732
|
const model = record2.model_config;
|
|
60710
60733
|
if (model && typeof model === "object") {
|
|
60711
|
-
const m =
|
|
60712
|
-
const effort = m.effort ? ` (effort ${
|
|
60713
|
-
lines.push(`model=${
|
|
60734
|
+
const m = asRecord2(model);
|
|
60735
|
+
const effort = m.effort ? ` (effort ${field2(m, "effort")})` : "";
|
|
60736
|
+
lines.push(`model=${field2(m, "provider")}/${field2(m, "model")}${effort}`);
|
|
60714
60737
|
}
|
|
60715
60738
|
return lines.join("\n");
|
|
60716
60739
|
}
|
|
60717
60740
|
function renderAgentTemplates(output) {
|
|
60718
|
-
const templates = asArray(
|
|
60741
|
+
const templates = asArray(asRecord2(output).templates);
|
|
60719
60742
|
if (templates.length === 0) {
|
|
60720
60743
|
return "No stock agent templates available.";
|
|
60721
60744
|
}
|
|
60722
60745
|
return templates.map((template) => {
|
|
60723
|
-
const record2 =
|
|
60724
|
-
return `${
|
|
60746
|
+
const record2 = asRecord2(template);
|
|
60747
|
+
return `${field2(record2, "slug")} ${field2(record2, "tier")} ${field2(record2, "display_name")} \u2014 ${field2(record2, "function")}`;
|
|
60725
60748
|
}).join("\n");
|
|
60726
60749
|
}
|
|
60727
60750
|
function renderAgentDryRun(output) {
|
|
60728
|
-
const record2 =
|
|
60729
|
-
const header = `dry run for seat ${
|
|
60730
|
-
${
|
|
60751
|
+
const record2 = asRecord2(output);
|
|
60752
|
+
const header = `dry run for seat ${field2(record2, "seat_id")} (charter ${field2(record2, "charter_version_id")}): ${field2(record2, "status")} (reused=${field2(record2, "reused")})
|
|
60753
|
+
${field2(record2, "summary")}`;
|
|
60731
60754
|
return [header, formatDryRunTranscript(record2.transcript)].filter((part) => part.length > 0).join("\n");
|
|
60732
60755
|
}
|
|
60733
60756
|
function renderAgentGoLive(output) {
|
|
60734
|
-
const record2 =
|
|
60735
|
-
return `agent seat ${
|
|
60757
|
+
const record2 = asRecord2(output);
|
|
60758
|
+
return `agent seat ${field2(record2, "seat_id")} is now ${field2(record2, "status")} (charter ${field2(record2, "charter_version_id")}).`;
|
|
60736
60759
|
}
|
|
60737
60760
|
function renderAgentStatus(output) {
|
|
60738
|
-
const record2 =
|
|
60739
|
-
return `agent seat ${
|
|
60761
|
+
const record2 = asRecord2(output);
|
|
60762
|
+
return `agent seat ${field2(record2, "seat_id")} status=${field2(record2, "status")} live=${field2(record2, "live")} lane=${field2(record2, "lane")}`;
|
|
60740
60763
|
}
|
|
60741
60764
|
function renderAgentRunNow(output) {
|
|
60742
|
-
const record2 =
|
|
60743
|
-
const workOrder =
|
|
60744
|
-
return `manual production run ${
|
|
60765
|
+
const record2 = asRecord2(output);
|
|
60766
|
+
const workOrder = asRecord2(record2.work_order);
|
|
60767
|
+
return `manual production run ${field2(record2, "execution_mode")}: queued ${field2(workOrder, "lane")} work order ${field2(workOrder, "id")} for agent ${field2(workOrder, "agent_id")} (${field2(workOrder, "status")})`;
|
|
60745
60768
|
}
|
|
60746
60769
|
function renderAgentFleetDigest(output) {
|
|
60747
|
-
const record2 =
|
|
60748
|
-
const summary =
|
|
60770
|
+
const record2 = asRecord2(output);
|
|
60771
|
+
const summary = asRecord2(record2.summary);
|
|
60749
60772
|
const agents = asArray(record2.agents);
|
|
60750
|
-
const header = `fleet ${
|
|
60773
|
+
const header = `fleet ${field2(summary, "fleet_count")} seats live=${field2(summary, "live_count")} idle=${field2(summary, "idle_count")} turns24h=${field2(summary, "turns_24h")} failed24h=${field2(summary, "failed_runs_24h")} spend7d=$${field2(summary, "spend_7d_usd")}`;
|
|
60751
60774
|
const lines = agents.map((agent) => {
|
|
60752
|
-
const r =
|
|
60753
|
-
return `${
|
|
60775
|
+
const r = asRecord2(agent);
|
|
60776
|
+
return `${field2(r, "seat_name")} ${field2(r, "health_status")} live=${field2(r, "live")} turns24h=${field2(r, "turns_24h")} failed=${field2(r, "failed_runs_24h")} next=${field2(r, "suggested_next_action")}`;
|
|
60754
60777
|
});
|
|
60755
60778
|
return [header, ...lines].join("\n");
|
|
60756
60779
|
}
|
|
60757
60780
|
function renderAgentGetRun(output) {
|
|
60758
|
-
const run2 =
|
|
60781
|
+
const run2 = asRecord2(asRecord2(output).run);
|
|
60759
60782
|
const errors = asArray(run2.error_logs);
|
|
60760
|
-
const errorLine = errors.length === 0 ? "errors=0" : `errors=${errors.length} first=${
|
|
60761
|
-
return `run ${
|
|
60762
|
-
transcript=${
|
|
60783
|
+
const errorLine = errors.length === 0 ? "errors=0" : `errors=${errors.length} first=${field2(asRecord2(errors[0]), "message")}`;
|
|
60784
|
+
return `run ${field2(run2, "run_id")} status=${field2(run2, "status")} lane=${field2(run2, "lane")} cost=$${field2(run2, "cost_usd")}
|
|
60785
|
+
transcript=${field2(run2, "transcript_ref")}
|
|
60763
60786
|
${errorLine}`;
|
|
60764
60787
|
}
|
|
60765
60788
|
function renderAgentConfigureTools(output) {
|
|
60766
|
-
const record2 =
|
|
60789
|
+
const record2 = asRecord2(output);
|
|
60767
60790
|
const decisions = asArray(record2.tool_decisions).map((entry) => {
|
|
60768
|
-
const r =
|
|
60769
|
-
return ` ${
|
|
60791
|
+
const r = asRecord2(entry);
|
|
60792
|
+
return ` ${field2(r, "tool")} ${field2(r, "decision")}`;
|
|
60770
60793
|
}).join("\n");
|
|
60771
|
-
return [`Configured tools for seat ${
|
|
60794
|
+
return [`Configured tools for seat ${field2(record2, "seat_id")} (agent ${field2(record2, "agent_id")}).`, decisions].filter((line) => line.length > 0).join("\n");
|
|
60772
60795
|
}
|
|
60773
60796
|
function renderToolCatalog(output) {
|
|
60774
|
-
const record2 =
|
|
60797
|
+
const record2 = asRecord2(output);
|
|
60775
60798
|
const tools = asArray(record2.tools);
|
|
60776
60799
|
const header = `# Tool catalog
|
|
60777
60800
|
|
|
60778
|
-
${
|
|
60801
|
+
${field2(record2, "note")}
|
|
60779
60802
|
`;
|
|
60780
60803
|
if (tools.length === 0) {
|
|
60781
60804
|
return `${header}
|
|
60782
60805
|
No tools in the catalog.`;
|
|
60783
60806
|
}
|
|
60784
60807
|
const lines = tools.map((entry) => {
|
|
60785
|
-
const r =
|
|
60808
|
+
const r = asRecord2(entry);
|
|
60786
60809
|
const cred = r.credential_required === true ? " (credential required)" : "";
|
|
60787
|
-
return `- \`${
|
|
60788
|
-
${
|
|
60810
|
+
return `- \`${field2(r, "id")}\` [${field2(r, "provider")} \xB7 ${field2(r, "default_scope_tier")} \xB7 ${field2(r, "default_access_policy")}]${cred}
|
|
60811
|
+
${field2(r, "description")}`;
|
|
60789
60812
|
});
|
|
60790
60813
|
return `${header}
|
|
60791
60814
|
${lines.join("\n")}`;
|
|
60792
60815
|
}
|
|
60793
60816
|
function renderModelCatalog(output) {
|
|
60794
|
-
const record2 =
|
|
60817
|
+
const record2 = asRecord2(output);
|
|
60795
60818
|
const tiers = asArray(record2.tiers);
|
|
60796
60819
|
const header = `# Model tiers
|
|
60797
60820
|
|
|
60798
|
-
${
|
|
60821
|
+
${field2(record2, "note")}
|
|
60799
60822
|
`;
|
|
60800
60823
|
if (tiers.length === 0) {
|
|
60801
60824
|
return `${header}
|
|
60802
60825
|
No model tiers are configured.`;
|
|
60803
60826
|
}
|
|
60804
|
-
const defaultTier =
|
|
60827
|
+
const defaultTier = field2(record2, "default_tier");
|
|
60805
60828
|
const lines = tiers.map((entry) => {
|
|
60806
|
-
const r =
|
|
60807
|
-
const tier =
|
|
60829
|
+
const r = asRecord2(entry);
|
|
60830
|
+
const tier = field2(r, "tier");
|
|
60808
60831
|
const recommended = r.recommended === true || tier === defaultTier ? " recommended" : "";
|
|
60809
60832
|
const bestFor = asArray(r.best_for).map(String).join(", ");
|
|
60810
60833
|
return [
|
|
60811
|
-
`- \`${tier}\` [${
|
|
60812
|
-
` ${
|
|
60834
|
+
`- \`${tier}\` [${field2(r, "provider")}/${field2(r, "model")} \xB7 effort ${field2(r, "effort")} \xB7 cost ${field2(r, "cost_band")}${recommended}]`,
|
|
60835
|
+
` ${field2(r, "description")}`,
|
|
60813
60836
|
` Best for: ${bestFor}`,
|
|
60814
|
-
` Price: $${
|
|
60815
|
-
` Cost: ${
|
|
60816
|
-
` Avoid for: ${
|
|
60837
|
+
` Price: $${field2(r, "input_usd_per_million_tokens")}/1M input \xB7 $${field2(r, "output_usd_per_million_tokens")}/1M output`,
|
|
60838
|
+
` Cost: ${field2(r, "cost_note")}`,
|
|
60839
|
+
` Avoid for: ${field2(r, "avoid_for")}`
|
|
60817
60840
|
].join("\n");
|
|
60818
60841
|
});
|
|
60819
60842
|
return `${header}
|
|
60820
60843
|
${lines.join("\n")}`;
|
|
60821
60844
|
}
|
|
60822
60845
|
function renderErrorList(output) {
|
|
60823
|
-
const record2 =
|
|
60846
|
+
const record2 = asRecord2(output);
|
|
60824
60847
|
const errors = asArray(record2.errors);
|
|
60825
60848
|
if (errors.length === 0) {
|
|
60826
60849
|
return "No error logs matching the filter.";
|
|
60827
60850
|
}
|
|
60828
60851
|
return errors.map((entry) => {
|
|
60829
|
-
const r =
|
|
60830
|
-
const disposition =
|
|
60852
|
+
const r = asRecord2(entry);
|
|
60853
|
+
const disposition = field2(r, "disposition");
|
|
60831
60854
|
const marker = disposition === "active" ? "*" : " ";
|
|
60832
|
-
const severityLabel =
|
|
60833
|
-
return `${marker} ${
|
|
60834
|
-
}).join("\n") + (
|
|
60835
|
-
Total: ${
|
|
60855
|
+
const severityLabel = field2(r, "severity").charAt(0).toUpperCase();
|
|
60856
|
+
return `${marker} ${field2(r, "error_log_id")} [${severityLabel}] ${field2(r, "source")} ${disposition} ${field2(r, "code")} ${field2(r, "message")} ${field2(r, "created_at")}`;
|
|
60857
|
+
}).join("\n") + (field2(record2, "total") !== "" ? `
|
|
60858
|
+
Total: ${field2(record2, "total")}` : "");
|
|
60836
60859
|
}
|
|
60837
60860
|
function renderErrorResolve(output) {
|
|
60838
|
-
const record2 =
|
|
60839
|
-
return `Resolved error ${
|
|
60861
|
+
const record2 = asRecord2(output);
|
|
60862
|
+
return `Resolved error ${field2(record2, "error_log_id")} as ${field2(record2, "disposition")} at ${field2(record2, "resolved_at")}.`;
|
|
60840
60863
|
}
|
|
60841
60864
|
function renderErrorSupersede(output) {
|
|
60842
|
-
const record2 =
|
|
60843
|
-
return `Superseded error ${
|
|
60865
|
+
const record2 = asRecord2(output);
|
|
60866
|
+
return `Superseded error ${field2(record2, "error_log_id")} \u2192 ${field2(record2, "superseded_by_id")} at ${field2(record2, "resolved_at")}.`;
|
|
60844
60867
|
}
|
|
60845
60868
|
function renderDeliverableList(output) {
|
|
60846
|
-
const deliverables = asArray(
|
|
60869
|
+
const deliverables = asArray(asRecord2(output).deliverables);
|
|
60847
60870
|
if (deliverables.length === 0) {
|
|
60848
60871
|
return "No deliverables for this seat.";
|
|
60849
60872
|
}
|
|
60850
60873
|
return deliverables.map((entry) => {
|
|
60851
|
-
const r =
|
|
60852
|
-
const summary =
|
|
60853
|
-
return `${
|
|
60874
|
+
const r = asRecord2(entry);
|
|
60875
|
+
const summary = field2(r, "summary") === "\u2014" ? "" : ` \u2014 ${field2(r, "summary")}`;
|
|
60876
|
+
return `${field2(r, "id")} [${field2(r, "kind")}] ${field2(r, "title")}${summary}`;
|
|
60854
60877
|
}).join("\n");
|
|
60855
60878
|
}
|
|
60856
60879
|
function renderDeliverableDetail(output) {
|
|
60857
|
-
const d =
|
|
60880
|
+
const d = asRecord2(asRecord2(output).deliverable);
|
|
60858
60881
|
const links = asArray(d.links).map((entry) => {
|
|
60859
|
-
const l =
|
|
60860
|
-
return ` ${
|
|
60882
|
+
const l = asRecord2(entry);
|
|
60883
|
+
return ` ${field2(l, "kind")}: ${field2(l, "label")} <${field2(l, "url")}>`;
|
|
60861
60884
|
}).join("\n");
|
|
60862
60885
|
return [
|
|
60863
|
-
`# ${
|
|
60864
|
-
|
|
60865
|
-
|
|
60866
|
-
|
|
60867
|
-
${
|
|
60868
|
-
`delivered: ${
|
|
60869
|
-
`run: ${
|
|
60870
|
-
`task: ${
|
|
60886
|
+
`# ${field2(d, "title")} [${field2(d, "kind")}]`,
|
|
60887
|
+
field2(d, "id"),
|
|
60888
|
+
field2(d, "summary") === "\u2014" ? "" : field2(d, "summary"),
|
|
60889
|
+
field2(d, "content") === "\u2014" ? "" : `content:
|
|
60890
|
+
${field2(d, "content")}`,
|
|
60891
|
+
`delivered: ${field2(d, "delivered_at")}`,
|
|
60892
|
+
`run: ${field2(d, "source_run_status")} ${field2(d, "source_run_model")}`,
|
|
60893
|
+
`task: ${field2(d, "source_task_title")}`,
|
|
60871
60894
|
links.length > 0 ? `links:
|
|
60872
60895
|
${links}` : ""
|
|
60873
60896
|
].filter((line) => line.length > 0).join("\n");
|
|
60874
60897
|
}
|
|
60875
60898
|
function renderDeliverableWrite(output) {
|
|
60876
|
-
return `deliverable ${
|
|
60899
|
+
return `deliverable ${field2(asRecord2(output), "deliverable_id")} recorded.`;
|
|
60877
60900
|
}
|
|
60878
60901
|
function formatSystemHealth(output) {
|
|
60879
|
-
const record2 =
|
|
60880
|
-
const scope =
|
|
60881
|
-
const sections =
|
|
60902
|
+
const record2 = asRecord2(output);
|
|
60903
|
+
const scope = asRecord2(record2.scope);
|
|
60904
|
+
const sections = asRecord2(record2.sections);
|
|
60882
60905
|
const actions = asArray(record2.top_actions);
|
|
60883
60906
|
const findings = asArray(record2.findings);
|
|
60884
60907
|
const lines = [
|
|
60885
|
-
`verdict: ${
|
|
60908
|
+
`verdict: ${field2(record2, "verdict")} scope: ${field2(scope, "mode")} seats: ${field2(scope, "total_seat_count")} findings: ${findings.length}`
|
|
60886
60909
|
];
|
|
60887
60910
|
if (actions.length > 0) {
|
|
60888
60911
|
lines.push("top_actions:");
|
|
60889
60912
|
for (const action of actions) {
|
|
60890
|
-
const item =
|
|
60891
|
-
lines.push(` ${
|
|
60892
|
-
if (
|
|
60893
|
-
lines.push(` ${
|
|
60913
|
+
const item = asRecord2(action);
|
|
60914
|
+
lines.push(` ${field2(item, "label")} command=${field2(item, "command_id")} schema=${field2(item, "schema_ref")} cli=${field2(item, "cli")}`);
|
|
60915
|
+
if (field2(item, "help") !== "\u2014") {
|
|
60916
|
+
lines.push(` ${field2(item, "help")}`);
|
|
60894
60917
|
}
|
|
60895
60918
|
}
|
|
60896
60919
|
}
|
|
60897
|
-
const fleet =
|
|
60898
|
-
const runs =
|
|
60899
|
-
const signals =
|
|
60900
|
-
const cascade =
|
|
60901
|
-
const workLoop =
|
|
60902
|
-
const connectivity =
|
|
60903
|
-
const sync =
|
|
60920
|
+
const fleet = asRecord2(sections.fleet);
|
|
60921
|
+
const runs = asRecord2(sections.runs);
|
|
60922
|
+
const signals = asRecord2(sections.signals);
|
|
60923
|
+
const cascade = asRecord2(sections.cascade_setup);
|
|
60924
|
+
const workLoop = asRecord2(sections.work_loop);
|
|
60925
|
+
const connectivity = asRecord2(sections.connectivity);
|
|
60926
|
+
const sync = asRecord2(sections.sync);
|
|
60904
60927
|
lines.push(
|
|
60905
|
-
`fleet: agents=${
|
|
60906
|
-
`runs: failed_24h=${
|
|
60907
|
-
`signals: off_track=${
|
|
60908
|
-
`cascade: recommendations=${
|
|
60909
|
-
`work_loop: open_issues=${
|
|
60910
|
-
`connectivity: runners=${
|
|
60911
|
-
`sync: latest_brief=${
|
|
60928
|
+
`fleet: agents=${field2(fleet, "agent_count")} live=${field2(fleet, "live_count")} stale=${field2(fleet, "stale_count")} setup_gaps=${field2(fleet, "setup_gap_count")}`,
|
|
60929
|
+
`runs: failed_24h=${field2(runs, "failed_24h")} failed_7d=${field2(runs, "failed_7d")} unresolved_errors=${field2(runs, "unresolved_error_count")}`,
|
|
60930
|
+
`signals: off_track=${field2(signals, "off_track_count")} pending=${field2(signals, "pending_count")}`,
|
|
60931
|
+
`cascade: recommendations=${field2(cascade, "recommendation_count")} warnings=${field2(cascade, "warning_count")}`,
|
|
60932
|
+
`work_loop: open_issues=${field2(workLoop, "open_issue_count")} friction_without_task=${field2(workLoop, "friction_without_task_count")} open_or_stalled_tasks=${field2(workLoop, "open_or_stalled_task_count")}`,
|
|
60933
|
+
`connectivity: runners=${field2(connectivity, "runner_count")} offline_runners=${field2(connectivity, "offline_runner_count")} not_ready_runners=${field2(connectivity, "not_capable_runner_count")} integrations=${field2(connectivity, "integration_count")} disconnected_integrations=${field2(connectivity, "disconnected_integration_count")} failed_notifications=${field2(connectivity, "failed_notification_count")}`,
|
|
60934
|
+
`sync: latest_brief=${field2(sync, "latest_brief_at")} missing_latest_brief=${field2(sync, "missing_latest_brief")} flagged_gaps=${field2(sync, "flagged_gap_count")}`
|
|
60912
60935
|
);
|
|
60913
60936
|
return lines.join("\n");
|
|
60914
60937
|
}
|
|
60915
60938
|
function renderSkillList(output) {
|
|
60916
|
-
const skills = asArray(
|
|
60939
|
+
const skills = asArray(asRecord2(output).skills);
|
|
60917
60940
|
if (skills.length === 0) {
|
|
60918
60941
|
return "No skills found.";
|
|
60919
60942
|
}
|
|
60920
60943
|
return [
|
|
60921
60944
|
"# Skills",
|
|
60922
60945
|
...skills.map((entry) => {
|
|
60923
|
-
const r =
|
|
60924
|
-
return `- \`${
|
|
60925
|
-
${
|
|
60946
|
+
const r = asRecord2(entry);
|
|
60947
|
+
return `- \`${field2(r, "slug")}\` v${field2(r, "latest_version")} [${field2(r, "status")} \xB7 ${field2(r, "visibility")} \xB7 assigned ${field2(r, "assigned_seat_count")}]
|
|
60948
|
+
${field2(r, "description")}`;
|
|
60926
60949
|
})
|
|
60927
60950
|
].join("\n");
|
|
60928
60951
|
}
|
|
60929
60952
|
function renderSkillDetail(output) {
|
|
60930
|
-
const skill =
|
|
60931
|
-
const required2 = asArray(skill.required_tools).map((entry) =>
|
|
60932
|
-
const optional2 = asArray(skill.optional_tools).map((entry) =>
|
|
60933
|
-
const files = asArray(skill.files).map((entry) =>
|
|
60953
|
+
const skill = asRecord2(asRecord2(output).skill);
|
|
60954
|
+
const required2 = asArray(skill.required_tools).map((entry) => field2(asRecord2(entry), "tool")).join(", ") || "none";
|
|
60955
|
+
const optional2 = asArray(skill.optional_tools).map((entry) => field2(asRecord2(entry), "tool")).join(", ") || "none";
|
|
60956
|
+
const files = asArray(skill.files).map((entry) => field2(asRecord2(entry), "path")).join(", ") || "SKILL.md";
|
|
60934
60957
|
return [
|
|
60935
|
-
`# ${
|
|
60936
|
-
`${
|
|
60937
|
-
`version: ${
|
|
60958
|
+
`# ${field2(skill, "name")} (\`${field2(skill, "slug")}\`)`,
|
|
60959
|
+
`${field2(skill, "description")}`,
|
|
60960
|
+
`version: ${field2(skill, "latest_version")} (${field2(skill, "latest_version_id")})`,
|
|
60938
60961
|
`required tools: ${required2}`,
|
|
60939
60962
|
`optional tools: ${optional2}`,
|
|
60940
60963
|
`files: SKILL.md${files === "SKILL.md" ? "" : `, ${files}`}`
|
|
60941
60964
|
].join("\n");
|
|
60942
60965
|
}
|
|
60943
60966
|
function renderAssignedSkills(output) {
|
|
60944
|
-
const record2 =
|
|
60967
|
+
const record2 = asRecord2(output);
|
|
60945
60968
|
const assignments = asArray(record2.assignments);
|
|
60946
60969
|
if (assignments.length === 0) {
|
|
60947
|
-
return `No assigned skills${record2.seat_id ? ` for seat ${
|
|
60970
|
+
return `No assigned skills${record2.seat_id ? ` for seat ${field2(record2, "seat_id")}` : ""}.`;
|
|
60948
60971
|
}
|
|
60949
60972
|
return [
|
|
60950
|
-
`# Assigned skills${record2.seat_id ? ` for ${
|
|
60973
|
+
`# Assigned skills${record2.seat_id ? ` for ${field2(record2, "seat_id")}` : ""}`,
|
|
60951
60974
|
...assignments.map((entry) => {
|
|
60952
|
-
const r =
|
|
60953
|
-
return `- \`${
|
|
60954
|
-
${
|
|
60975
|
+
const r = asRecord2(entry);
|
|
60976
|
+
return `- \`${field2(r, "slug")}\` v${field2(r, "version")} \u2192 seat ${field2(r, "seat_id")} (${field2(r, "assignment_id")})
|
|
60977
|
+
${field2(r, "rationale")}`;
|
|
60955
60978
|
})
|
|
60956
60979
|
].join("\n");
|
|
60957
60980
|
}
|
|
60958
60981
|
function renderDependencyCheck(output) {
|
|
60959
|
-
const record2 =
|
|
60982
|
+
const record2 = asRecord2(output);
|
|
60960
60983
|
const render = (label, items) => {
|
|
60961
60984
|
if (items.length === 0) {
|
|
60962
60985
|
return `${label}: none`;
|
|
@@ -60964,52 +60987,52 @@ function renderDependencyCheck(output) {
|
|
|
60964
60987
|
return [
|
|
60965
60988
|
`${label}:`,
|
|
60966
60989
|
...items.map((entry) => {
|
|
60967
|
-
const r =
|
|
60968
|
-
return `- \`${
|
|
60990
|
+
const r = asRecord2(entry);
|
|
60991
|
+
return `- \`${field2(r, "tool")}\` ${field2(r, "status")} (needs ${field2(r, "min_scope_tier")}, has ${field2(r, "current_scope_tier")})`;
|
|
60969
60992
|
})
|
|
60970
60993
|
].join("\n");
|
|
60971
60994
|
};
|
|
60972
60995
|
return [
|
|
60973
|
-
`Skill dependencies: ${
|
|
60974
|
-
`skill_version_id: ${
|
|
60975
|
-
`seat_id: ${
|
|
60996
|
+
`Skill dependencies: ${field2(record2, "status")}`,
|
|
60997
|
+
`skill_version_id: ${field2(record2, "skill_version_id")}`,
|
|
60998
|
+
`seat_id: ${field2(record2, "seat_id")}`,
|
|
60976
60999
|
render("required", asArray(record2.required)),
|
|
60977
61000
|
render("optional", asArray(record2.optional))
|
|
60978
61001
|
].join("\n");
|
|
60979
61002
|
}
|
|
60980
61003
|
function renderSkillFile(output) {
|
|
60981
|
-
return
|
|
61004
|
+
return field2(asRecord2(output), "content");
|
|
60982
61005
|
}
|
|
60983
61006
|
function renderSkillWrite(label) {
|
|
60984
61007
|
return (output) => {
|
|
60985
|
-
const skill =
|
|
60986
|
-
const warnings = asArray(
|
|
61008
|
+
const skill = asRecord2(asRecord2(output).skill);
|
|
61009
|
+
const warnings = asArray(asRecord2(skill.validation).warnings).length;
|
|
60987
61010
|
return [
|
|
60988
|
-
`${label}: \`${
|
|
60989
|
-
`status: ${
|
|
60990
|
-
`content_sha256: ${
|
|
61011
|
+
`${label}: \`${field2(skill, "slug")}\` v${field2(skill, "version")} (${field2(skill, "skill_version_id")})`,
|
|
61012
|
+
`status: ${field2(skill, "status")}`,
|
|
61013
|
+
`content_sha256: ${field2(skill, "content_sha256")}`,
|
|
60991
61014
|
`validation_warnings: ${warnings}`
|
|
60992
61015
|
].join("\n");
|
|
60993
61016
|
};
|
|
60994
61017
|
}
|
|
60995
61018
|
function renderAssignment(output) {
|
|
60996
|
-
const record2 =
|
|
60997
|
-
const assignment =
|
|
61019
|
+
const record2 = asRecord2(output);
|
|
61020
|
+
const assignment = asRecord2(record2.assignment);
|
|
60998
61021
|
return [
|
|
60999
|
-
`Skill assignment ${
|
|
61000
|
-
`assignment_id: ${
|
|
61001
|
-
`skill_version_id: ${
|
|
61002
|
-
`dependency_status: ${
|
|
61003
|
-
`next: ${
|
|
61022
|
+
`Skill assignment ${field2(record2, "approval_status")}: \`${field2(assignment, "slug")}\` v${field2(assignment, "version")} \u2192 seat ${field2(assignment, "seat_id")}`,
|
|
61023
|
+
`assignment_id: ${field2(assignment, "assignment_id")}`,
|
|
61024
|
+
`skill_version_id: ${field2(assignment, "skill_version_id")}`,
|
|
61025
|
+
`dependency_status: ${field2(asRecord2(record2.dependency_status), "status")}`,
|
|
61026
|
+
`next: ${field2(record2, "local_sync_next_step")}`
|
|
61004
61027
|
].join("\n");
|
|
61005
61028
|
}
|
|
61006
61029
|
function renderRevocation(output) {
|
|
61007
|
-
const record2 =
|
|
61030
|
+
const record2 = asRecord2(output);
|
|
61008
61031
|
return [
|
|
61009
|
-
`Skill assignment revoked: \`${
|
|
61010
|
-
`assignment_id: ${
|
|
61011
|
-
`skill_version_id: ${
|
|
61012
|
-
`next: ${
|
|
61032
|
+
`Skill assignment revoked: \`${field2(record2, "slug")}\` from seat ${field2(record2, "seat_id")}`,
|
|
61033
|
+
`assignment_id: ${field2(record2, "assignment_id")}`,
|
|
61034
|
+
`skill_version_id: ${field2(record2, "skill_version_id")}`,
|
|
61035
|
+
`next: ${field2(record2, "local_sync_next_step")}`
|
|
61013
61036
|
].join("\n");
|
|
61014
61037
|
}
|
|
61015
61038
|
function packageFromSkillFile(filePath) {
|
|
@@ -68939,6 +68962,12 @@ ${onboardingUsage()}
|
|
|
68939
68962
|
deadRun = true;
|
|
68940
68963
|
return 1;
|
|
68941
68964
|
}
|
|
68965
|
+
const staged = stagedConfirmationFromError(commandId, error51);
|
|
68966
|
+
if (staged !== null) {
|
|
68967
|
+
io.stdout.write(`${format === void 0 ? JSON.stringify(staged, null, 2) : formatStagedConfirmation(commandId, staged)}
|
|
68968
|
+
`);
|
|
68969
|
+
return 0;
|
|
68970
|
+
}
|
|
68942
68971
|
return printCommandError3(io, error51);
|
|
68943
68972
|
}
|
|
68944
68973
|
}
|
|
@@ -69268,6 +69297,12 @@ async function printCommandOutput(io, client, commandId, body = {}, format, opti
|
|
|
69268
69297
|
return printCommandError3(io, approvalError);
|
|
69269
69298
|
}
|
|
69270
69299
|
}
|
|
69300
|
+
const staged = stagedConfirmationFromError(commandId, error51);
|
|
69301
|
+
if (staged !== null) {
|
|
69302
|
+
io.stdout.write(`${format === void 0 ? JSON.stringify(staged, null, 2) : formatStagedConfirmation(commandId, staged)}
|
|
69303
|
+
`);
|
|
69304
|
+
return 0;
|
|
69305
|
+
}
|
|
69271
69306
|
return printCommandError3(io, error51);
|
|
69272
69307
|
}
|
|
69273
69308
|
}
|