@rosthq/cli 0.5.24 → 0.5.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -42145,7 +42145,7 @@ Decisions should be recorded as human decisions. Handoffs should attach to seats
42145
42145
  order: 45,
42146
42146
  title: "How agents work",
42147
42147
  summary: "How {{brand}} agents operate inside seats, use Charters, report work, and escalate beyond authority.",
42148
- version: "2026-06-21.4",
42148
+ version: "2026-06-21.6",
42149
42149
  public: true,
42150
42150
  audiences: ["human", "cli", "mcp", "in_app_agent"],
42151
42151
  stages: ["staffing", "operating_rhythm"],
@@ -42239,7 +42239,7 @@ Before an agent goes live, the sandbox dry run rehearses this against fake data
42239
42239
 
42240
42240
  The Agents page shows fleet health first: live state, recent runs, failed runs, open held actions, last activity, cost, and the next operator action. It also shows configuration completeness for each staffed agent seat: Steward chain, lane or runtime substrate, vaulted credentials, granted tools, model config, sandbox dry run, and go-live state, each with a remediation link when incomplete. A seat's Trust Card drills into the same facts: run history, one-run detail, tool-call outcomes, product-visible errors, transcript references, loaded Skill versions, and held confirmations or escalations. Open confirmations stay visible until they are decided or expire, even when they are older than the default activity window. Approving or rejecting a held confirmation from the seat page is scoped to that seat; rejection can include a short reason.
42241
42241
 
42242
- Review the first dry runs, fleet overview, tool-call audit rows, escalations, deliverables, and Signal impact. A seat's completed-work area combines explicit deliverables, work-log evidence, and successful run summaries into one operator-facing trail with safe links labelled as internal, Linear, GitHub, or external. The fleet view at \`/agents\` shows every staffed agent seat at a glance; the agent-native equivalents are \`{{cli}} command agent.list_fleet --json '{}'\` / \`rost_list_agent_fleet\` for the compact overview, and \`{{cli}} agent fleet-digest --json\` / \`agent.fleet_digest\` / \`rost_get_dogfood_fleet_health_digest\` for the daily dogfood evidence bundle. The digest returns live/idle state, 24h/7d turns, 7d/30d spend, recent failed runs, unresolved product errors, failed notifications, and a next action per seat. Shared system-health summaries use the same server-derived tenant, member, or seat-token scope so UI, CLI, and MCP operators see consistent stalled-work, unresolved-error, runner, and notification counts without client-supplied tenant boundaries. Fleet real-turn counts use the same seat-run association as \`agent.list_runs\`, filtered to real runs. Scheduled agents are checked in rounded five-minute buckets, so a minute-level cron inside the bucket queues one work order for that bucket rather than one order per minute. Sandbox dry runs do not count as real turns. If the agent is repeatedly blocked, revise the Charter or split the seat. If the agent is taking too much judgment, narrow its autonomous scope.`
42242
+ Review the first dry runs, fleet overview, tool-call audit rows, escalations, deliverables, and Signal impact. A seat's completed-work area combines explicit deliverables, work-log evidence, and successful run summaries into one operator-facing trail with safe links labelled as internal, Linear, GitHub, or external. The fleet view at \`/agents\` shows every staffed agent seat at a glance; the agent-native equivalents are \`{{cli}} command agent.list_fleet --json '{}'\` / \`rost_list_agent_fleet\` for the compact overview, and \`{{cli}} agent fleet-digest --json\` / \`agent.fleet_digest\` / \`rost_get_dogfood_fleet_health_digest\` for the daily dogfood evidence bundle. The digest returns live/idle state, 24h/7d turns, 7d/30d spend, recent failed runs, unresolved product errors, failed notifications, and a next action per seat. The \`/health\` dashboard and \`{{cli}} system health --json\` / \`system.health\` / \`rost_system_health\` share the same command-backed system-health model, with server-derived tenant, member, requested-seat, or seat-token scope. Owners see tenant health; members see occupied-seat subtrees; seat pages link to \`/health?seat_id=<seat>\` for scoped follow-up. Every health finding includes a remediation action with a human label/link plus command id, schema reference, CLI command, help text, and human-gated marker for agents. Open Friction without an action task links to the Friction detail and gives agents the \`task.create\` then \`friction.link_task\` next step; the final issue resolution still requires the human \`friction.resolve\` decision. Fleet real-turn counts use the same seat-run association as \`agent.list_runs\`, filtered to real runs. Scheduled agents are checked in rounded five-minute buckets, so a minute-level cron inside the bucket queues one work order for that bucket rather than one order per minute. Sandbox dry runs do not count as real turns. If the agent is repeatedly blocked, revise the Charter or split the seat. If the agent is taking too much judgment, narrow its autonomous scope.`
42243
42243
  },
42244
42244
  {
42245
42245
  slug: "tool-access-and-vault",
@@ -42384,7 +42384,7 @@ External connectors are being rolled out provider by provider, conservatively (r
42384
42384
  order: 48,
42385
42385
  title: "CLI and MCP installation guide",
42386
42386
  summary: "Install the public CLI, register remote token-backed MCP clients, and find the full command and tool catalog.",
42387
- version: "2026-06-21.14",
42387
+ version: "2026-06-21.15",
42388
42388
  public: true,
42389
42389
  audiences: ["human", "cli", "mcp", "in_app_agent"],
42390
42390
  stages: ["company_setup", "staffing"],
@@ -42421,6 +42421,7 @@ External connectors are being rolled out provider by provider, conservatively (r
42421
42421
  "agent.status",
42422
42422
  "agent.list_fleet",
42423
42423
  "agent.fleet_digest",
42424
+ "system.health",
42424
42425
  "agent.get_run",
42425
42426
  "agent.list_runs",
42426
42427
  "agent.list_tool_calls",
@@ -42451,7 +42452,9 @@ External connectors are being rolled out provider by provider, conservatively (r
42451
42452
  "deliverable.attach",
42452
42453
  "error_log.list",
42453
42454
  "error_log.resolve",
42454
- "error_log.supersede"
42455
+ "error_log.supersede",
42456
+ "runner.diagnose",
42457
+ "runner.repair"
42455
42458
  ],
42456
42459
  legal: {
42457
42460
  publicRisk: "low",
@@ -42826,9 +42829,10 @@ The signed-in app exposes the same Skill command surface under **Skills** in the
42826
42829
  | \`{{cli}} escalation list|get|resolve|reject\` | \`escalation.list\`, \`escalation.get\`, \`escalation.resolve\`, \`escalation.reject\` | Work the steward escalation queue. | Steward | \`{{cli}} escalation list --json\` |
42827
42830
  | \`{{cli}} error list|resolve|supersede\` | \`error_log.list\`, \`error_log.resolve\`, \`error_log.supersede\` | List active, acknowledged, resolved, or superseded product error logs and let a human acknowledge, resolve, or supersede stale errors with evidence links. | Tenant | \`{{cli}} error list --resolved active --json\`; \`{{cli}} error resolve --error-log-id <id> --reason "Fixed in PR #123"\` |
42828
42831
  | \`{{cli}} sync brief|compile|complete\` | \`sync.brief.get\`, \`sync.brief.compile\`, \`sync.run.complete\` | Compile, read, and complete a weekly Sync. | Tenant | \`{{cli}} sync brief --json\` |
42829
- | \`{{cli}} runner list|status|work-orders|revoke\` | \`runner.list\`, \`runner.status\`, \`work_order.list\`, \`runner.revoke\` | Inspect runners and work orders; revoke a runner. | Tenant | \`{{cli}} runner list --json\` |
42832
+ | \`{{cli}} runner list|status|diagnose|repair|work-orders|revoke\` | \`runner.list\`, \`runner.status\`, \`runner.diagnose\`, \`runner.repair\`, \`work_order.list\`, \`runner.revoke\` | Inspect runners and work orders, diagnose offline runners, get repair guidance, and revoke a runner. | Tenant | \`{{cli}} runner diagnose --runner-id <id> --json\` |
42830
42833
  | \`{{cli}} notification settings|test|errors\` | \`notification.settings.get\`, \`notification.test\`, \`notification.list_errors\` | Read notification settings, send a test, and list failed deliveries with linked product error source, seat id, and run id when available. | Tenant | \`{{cli}} notification errors --limit 10 --json\` |
42831
42834
  | \`{{cli}} integration list|readiness|status|test\` | \`integration.list\`, \`integration.readiness\`, \`integration.status\`, \`integration.test\` | List connector metadata, read the setup-readiness checklist, read one connector's health, and run the provider-specific connection test without exposing credentials. | Tenant | \`{{cli}} integration readiness --provider google --json\` |
42835
+ | \`{{cli}} system health\` | \`system.health\` | Read the scoped system-health snapshot across agent runs, unresolved errors, Signals, Cascade setup, work loop, integrations, runners, notifications, and Sync Brief readiness. | Tenant, member, or seat token | \`{{cli}} system health --json\`; \`{{cli}} system health --seat <id> --json\` |
42832
42836
  | \`{{cli}} settings get|update|product-learning|rename\` | \`settings.get\`, \`settings.update\`, \`settings.product_learning.get\`, \`settings.product_learning.update\`, \`tenant.rename\` | Read tenant settings, update budget caps, read or update product-learning participation, and rename the company. Budget and product-learning updates stop at human confirmation in non-interactive CLI/MCP sessions; company rename is owner-only and human-gated. | Tenant / Tenant-admin for updates | \`{{cli}} settings product-learning get --json\`; \`{{cli}} settings product-learning update --mode disabled --json\`; \`{{cli}} settings rename --company "Acme Operations"\` |
42833
42837
  | \`{{cli}} member invite|update|remove\` | \`member.invite\`, \`member.update\`, \`member.remove\` | Manage tenant members. | Tenant | \`{{cli}} member invite --email ops@example.com --role member\` |
42834
42838
  | \`{{cli}} agent templates|create|setup|tools|dry-run|go-live|status|run-now|fleet-digest|get-run|show\` | \`agent_template.list\`, \`agent.create_from_template\`, \`agent.create_custom\`, \`agent_setup.get\`, \`agent_setup.update\`, \`agent.configure_tools\`, \`agent.run_dry_run\`, \`agent.go_live\`, \`agent.status\`, \`agent.run_now\`, \`agent.fleet_digest\`, \`agent.get_run\`, \`agent.show_markdown\` | Run the full agent setup and operation flow: list templates, create a draft from a template or guided custom answers (with \`--model\` and \`--effort\`), read or answer setup state, connect or decline tools, dry-run, go live, run on demand, capture the fleet-health digest, read one run's transcript/error diagnostics, and show a markdown readout. Human CLI dry-runs print the rehearsal transcript and, when present, the per-tool preview labels (\`Would run\`, \`Blocked\`, \`Escalated\`) before go-live. Create and go-live stop at human gates; the dry-run is ungated by human approval but requires a signed manifest first. | Tenant and seat | \`{{cli}} agent fleet-digest --json\` |
@@ -42955,6 +42959,7 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
42955
42959
  | \`rost_get_agent_status\` | \`agent.status\` | Read agent lane, live state, steward chain, dry-run result, Runner availability. | Seat or tenant-admin | Call with \`{"seat_id":"<seat-id>"}\`. |
42956
42960
  | \`rost_list_agent_fleet\` | \`agent.list_fleet\` | Read every staffed agent seat at once: lane, live state, last real turn, 24h/7d real turns, measurable status, escalations, and 7-day spend. | Tenant | Call with \`{}\`; counts use the same seat-run association as \`agent.list_runs\`, with sandbox dry runs excluded from real turns. |
42957
42961
  | \`rost_get_dogfood_fleet_health_digest\` | \`agent.fleet_digest\` | Capture the daily dogfood fleet-health digest: live/idle state, 24h/7d turns, spend, recent failed runs, unresolved errors, failed notifications, and next actions. | Tenant | Call with \`{}\`; optional \`window_hours\` bounds recent failed-run evidence, while \`error_limit\` caps linked evidence per seat. |
42962
+ | \`rost_system_health\` | \`system.health\` | Read the scoped system-health snapshot across agent runs, unresolved errors, Signals, Cascade setup, work loop, integrations, runners, notifications, and Sync Brief readiness. | Tenant, member, or seat token | Call with \`{}\`; optional \`seat_id\` narrows inside the caller's server-derived scope. |
42958
42963
  | \`rost_run_agent_now\` | \`agent.run_now\` | Queue an immediate run for a live staffed agent without changing its saved schedule; cloud lane dispatches to the executor and runner lane queues for the paired runner. | Tenant | Call with \`{"seat_id":"<seat-id>"}\`. |
42959
42964
  | \`rost_list_agent_runs\` | \`agent.list_runs\` | Read a seat's agent run history (status, lane, model, cost, per-run Skill activation, tool-call, and guard-held counts) plus the seat's run/tool-call rollup including held-action count. | Seat or tenant-admin | Call with \`{"seat_id":"<seat-id>"}\`; pass \`limit\` for a deeper window. |
42960
42965
  | \`rost_get_agent_run_diagnostics\` | \`agent.get_run\` | Read one run's diagnostic record: transcript reference, token/cost usage, outcome, linked product-visible run errors, and loaded Skill activation file metadata. File hashes/sizes identify the immutable source package, while model prompt text may be bounded or truncated. | Seat or tenant-admin | Call with \`{"seat_id":"<seat-id>","run_id":"<run-id>"}\`. |
@@ -42978,6 +42983,8 @@ Several rows here are seat-operating commands (\`task.create\`, the \`signal.*\`
42978
42983
  | \`rost_list_mcp_tokens\` | \`mcp_token.list\` | List MCP token metadata (never token material). | Tenant | Call with \`{}\` or \`{"include_revoked":true}\`. |
42979
42984
  | \`rost_list_runners\` | \`runner.list\` | List local runners and their online/offline/revoked state. | Tenant | Call with \`{}\`. |
42980
42985
  | \`rost_runner_status\` | \`runner.status\` | Read a single runner's capability and state. | Tenant | Call with \`runner_id\`. |
42986
+ | \`rost_diagnose_runner\` | \`runner.diagnose\` | Return runner health, capabilities, and repair guidance without secrets. | Tenant | Call with \`runner_id\`; actionable repair guidance exposes restart, re-pair, or missing CLI steps. |
42987
+ | \`rost_runner_repair_guidance\` | \`runner.repair\` | Return focused repair steps for a runner: restart, re-pair, revoke stale, or install missing CLI runtime. | Tenant | Call with \`runner_id\` and optional \`issue\` (restart, re_pair, revoke_stale, missing_cli_runtime). |
42981
42988
  | \`rost_start_runner_pairing\` | \`runner.pairing.start\` | Open a runner pairing session and return the human pairing code. | Tenant-admin | Call with \`name\` and \`platform\`; owner/admin only. |
42982
42989
  | \`rost_revoke_runner\` | \`runner.revoke\` | Revoke a runner so it can no longer authenticate. | Tenant | Call with \`runner_id\`; expect human confirmation. |
42983
42990
  | \`rost_list_work_orders\` | \`work_order.list\` | List runner/cloud work orders for the tenant. | Tenant | Call with optional \`status\`, \`agent_id\`, or \`runner_id\`. |
@@ -43997,11 +44004,11 @@ Every notification should include the seat, cause, evidence, and requested decis
43997
44004
  order: 75,
43998
44005
  title: "Local runner guide",
43999
44006
  summary: "How local agent sessions and runner surfaces should operate through {{brand}} without bypassing Charters or audit.",
44000
- version: "2026-06-20.1",
44007
+ version: "2026-06-21.1",
44001
44008
  public: true,
44002
44009
  audiences: ["human", "cli", "mcp", "in_app_agent"],
44003
44010
  stages: ["staffing", "operating_rhythm"],
44004
- relatedCommandIds: ["mcp_token.create", "mcp_token.revoke", "runner.list", "runner.status", "runner.pairing.start", "runner.revoke", "work_order.list", "work_order.enqueue", "work_order.cancel", "confirmation.approve"],
44011
+ relatedCommandIds: ["mcp_token.create", "mcp_token.revoke", "runner.list", "runner.status", "runner.diagnose", "runner.repair", "runner.pairing.start", "runner.revoke", "work_order.list", "work_order.enqueue", "work_order.cancel", "confirmation.approve"],
44005
44012
  legal: { publicRisk: "low", notes: ["{{brand}}-native local-runner guidance."] },
44006
44013
  sources: [
44007
44014
  {
@@ -44027,6 +44034,8 @@ The local runner is for human-controlled local agent work. It should retrieve {{
44027
44034
 
44028
44035
  - Pair a new runner: \`runner.pairing.start\` / \`rost_start_runner_pairing\` with \`name\` and \`platform\` returns a human pairing code. This is owner/admin-only because it mints a short-lived runner pairing session that leads to machine credentials.
44029
44036
  - Inspect: \`{{cli}} runner list --json\` / \`runner.list\` / \`rost_list_runners\` shows online/offline/revoked state; \`{{cli}} runner status\` / \`runner.status\` / \`rost_runner_status\` reads one runner.
44037
+ - Diagnose (DER-949): \`{{cli}} runner diagnose --runner-id <id>\` / \`runner.diagnose\` / \`rost_diagnose_runner\` returns health, capabilities, and repair guidance without exposing secrets. Use when a runner is offline or stale to get actionable next steps.
44038
+ - Repair steps (DER-949): \`{{cli}} runner repair --runner-id <id> [--issue restart|re_pair|revoke_stale|missing_cli_runtime]\` / \`runner.repair\` / \`rost_repair_runner\` returns focused repair instructions. The optional \`issue\` flag narrows to a specific kind of repair (restart the app, re-pair, revoke a stale runner, or install a missing CLI runtime).
44030
44039
  - Work orders: \`{{cli}} runner work-orders\` / \`work_order.list\` / \`rost_list_work_orders\`; queue with \`work_order.enqueue\` / \`rost_enqueue_work_order\` for a live scheduled agent, or use \`agent.run_now\` / \`rost_run_agent_now\` when an operator wants the product to queue and dispatch an immediate live run from a seat id; cancel with \`work_order.cancel\` / \`rost_cancel_work_order\`.
44031
44040
  - Revoke: \`{{cli}} runner revoke\` / \`runner.revoke\` / \`rost_revoke_runner\` so a runner can no longer authenticate.
44032
44041
 
@@ -46372,6 +46381,53 @@ var runnerWrapper = (context, args) => dispatch(context, "runner", args, {
46372
46381
  return `${field(record2, "id")} ${field(record2, "health")} ${field(record2, "name")} (last heartbeat ${field(record2, "last_heartbeat_at")}).`;
46373
46382
  });
46374
46383
  },
46384
+ diagnose: (ctx, rest) => {
46385
+ const parsed = parseFlags(rest);
46386
+ const runnerId = requireValue2(parsed, "runner-id");
46387
+ return execute(ctx, parsed, "runner.diagnose", { runner_id: runnerId }, (output) => {
46388
+ const record2 = asRecord(output);
46389
+ const guidance = asArray(record2.repair_guidance);
46390
+ const lines = [
46391
+ `Runner ${field(record2, "name")} (${field(record2, "id")})`,
46392
+ `health: ${field(record2, "health")} platform: ${field(record2, "platform")}`,
46393
+ `paired_at: ${field(record2, "paired_at")} last_heartbeat: ${field(record2, "last_heartbeat_at")}`,
46394
+ `capabilities: claude=${String(asRecord(record2.capabilities).claude)} codex=${String(asRecord(record2.capabilities).codex)}`,
46395
+ `revocation_state: ${field(record2, "revocation_state")}`
46396
+ ];
46397
+ if (guidance.length > 0) {
46398
+ lines.push("repair_guidance:");
46399
+ guidance.forEach((step) => {
46400
+ const s = asRecord(step);
46401
+ lines.push(` ${field(s, "action")}: ${field(s, "detail")}`);
46402
+ });
46403
+ }
46404
+ return lines.join("\n");
46405
+ });
46406
+ },
46407
+ repair: (ctx, rest) => {
46408
+ const parsed = parseFlags(rest);
46409
+ const runnerId = requireValue2(parsed, "runner-id");
46410
+ const issue2 = optionalValue(parsed, "issue");
46411
+ const body = issue2 ? { runner_id: runnerId, issue: issue2 } : { runner_id: runnerId };
46412
+ return execute(ctx, parsed, "runner.repair", body, (output) => {
46413
+ const record2 = asRecord(output);
46414
+ const steps = asArray(record2.repair_steps);
46415
+ const lines = [
46416
+ `Runner ${field(record2, "runner_name")} (${field(record2, "runner_id")}) health: ${field(record2, "runner_health")}`,
46417
+ `requires_human: ${field(record2, "requires_human")}`
46418
+ ];
46419
+ if (steps.length > 0) {
46420
+ lines.push("repair_steps:");
46421
+ steps.forEach((step) => {
46422
+ const s = asRecord(step);
46423
+ lines.push(` ${field(s, "action")}`);
46424
+ lines.push(` command: ${field(s, "command")}`);
46425
+ lines.push(` detail: ${field(s, "detail")}`);
46426
+ });
46427
+ }
46428
+ return lines.join("\n");
46429
+ });
46430
+ },
46375
46431
  "work-orders": (ctx, rest) => {
46376
46432
  const parsed = parseFlags(rest);
46377
46433
  const body = withOptional({}, {
@@ -46401,9 +46457,11 @@ var runnerWrapper = (context, args) => dispatch(context, "runner", args, {
46401
46457
  }
46402
46458
  }, runnerUsage(context.binName));
46403
46459
  function runnerUsage(bin) {
46404
- return `Usage: ${bin} runner list|status|work-orders|revoke [--json]
46460
+ return `Usage: ${bin} runner list|status|diagnose|repair|work-orders|revoke [--json]
46405
46461
  ${bin} runner list [--include-revoked]
46406
46462
  ${bin} runner status --runner-id <id>
46463
+ ${bin} runner diagnose --runner-id <id>
46464
+ ${bin} runner repair --runner-id <id> [--issue restart|re_pair|revoke_stale|missing_cli_runtime]
46407
46465
  ${bin} runner work-orders [--status <s>] [--agent-id <id>] [--runner-id <id>] [--limit <n>]
46408
46466
  ${bin} runner revoke --runner-id <id>`;
46409
46467
  }
@@ -47295,6 +47353,54 @@ function deliverableUsage(bin) {
47295
47353
  ${bin} deliverable create --title <text> [--kind brief|work_evidence|artifact|report|other] [--summary <text>] [--content <text>]
47296
47354
  ${bin} deliverable attach --title <text> [--run-id <id>] [--task-id <id>] [--work-order-id <id>] [--kind brief|work_evidence|artifact|report|other] [--summary <text>] [--content <text>]`;
47297
47355
  }
47356
+ function formatSystemHealth(output) {
47357
+ const record2 = asRecord(output);
47358
+ const scope = asRecord(record2.scope);
47359
+ const sections = asRecord(record2.sections);
47360
+ const actions = asArray(record2.top_actions);
47361
+ const findings = asArray(record2.findings);
47362
+ const lines = [
47363
+ `verdict: ${field(record2, "verdict")} scope: ${field(scope, "mode")} seats: ${field(scope, "total_seat_count")} findings: ${findings.length}`
47364
+ ];
47365
+ if (actions.length > 0) {
47366
+ lines.push("top_actions:");
47367
+ for (const action of actions) {
47368
+ const item = asRecord(action);
47369
+ lines.push(` ${field(item, "label")} command=${field(item, "command_id")} schema=${field(item, "schema_ref")} cli=${field(item, "cli")}`);
47370
+ if (field(item, "help") !== "\u2014") {
47371
+ lines.push(` ${field(item, "help")}`);
47372
+ }
47373
+ }
47374
+ }
47375
+ const fleet = asRecord(sections.fleet);
47376
+ const runs = asRecord(sections.runs);
47377
+ const signals = asRecord(sections.signals);
47378
+ const cascade = asRecord(sections.cascade_setup);
47379
+ const workLoop = asRecord(sections.work_loop);
47380
+ const connectivity = asRecord(sections.connectivity);
47381
+ const sync = asRecord(sections.sync);
47382
+ lines.push(
47383
+ `fleet: agents=${field(fleet, "agent_count")} live=${field(fleet, "live_count")} stale=${field(fleet, "stale_count")} setup_gaps=${field(fleet, "setup_gap_count")}`,
47384
+ `runs: failed_24h=${field(runs, "failed_24h")} failed_7d=${field(runs, "failed_7d")} unresolved_errors=${field(runs, "unresolved_error_count")}`,
47385
+ `signals: off_track=${field(signals, "off_track_count")} pending=${field(signals, "pending_count")}`,
47386
+ `cascade: recommendations=${field(cascade, "recommendation_count")} warnings=${field(cascade, "warning_count")}`,
47387
+ `work_loop: open_issues=${field(workLoop, "open_issue_count")} friction_without_task=${field(workLoop, "friction_without_task_count")} open_or_stalled_tasks=${field(workLoop, "open_or_stalled_task_count")}`,
47388
+ `connectivity: runners=${field(connectivity, "runner_count")} offline_runners=${field(connectivity, "offline_runner_count")} integrations=${field(connectivity, "integration_count")} disconnected_integrations=${field(connectivity, "disconnected_integration_count")} failed_notifications=${field(connectivity, "failed_notification_count")}`,
47389
+ `sync: latest_brief=${field(sync, "latest_brief_at")} missing_latest_brief=${field(sync, "missing_latest_brief")} flagged_gaps=${field(sync, "flagged_gap_count")}`
47390
+ );
47391
+ return lines.join("\n");
47392
+ }
47393
+ var systemWrapper = (context, args) => dispatch(context, "system", args, {
47394
+ health: (ctx, rest) => {
47395
+ const parsed = parseFlags(rest);
47396
+ const body = withOptional({}, { seat_id: parsed.seat });
47397
+ return execute(ctx, parsed, "system.health", body, formatSystemHealth);
47398
+ }
47399
+ }, systemUsage(context.binName));
47400
+ function systemUsage(bin) {
47401
+ return `Usage: ${bin} system health [--seat <id>] [--json]
47402
+ ${bin} system health [--seat <id>]`;
47403
+ }
47298
47404
  var OPERATION_GROUPS = [
47299
47405
  "task",
47300
47406
  "status",
@@ -47315,7 +47421,8 @@ var OPERATION_GROUPS = [
47315
47421
  "model",
47316
47422
  "compass",
47317
47423
  "charter",
47318
- "deliverable"
47424
+ "deliverable",
47425
+ "system"
47319
47426
  ];
47320
47427
  var wrappers = {
47321
47428
  task: taskWrapper,
@@ -47337,7 +47444,8 @@ var wrappers = {
47337
47444
  model: modelWrapper,
47338
47445
  compass: compassWrapper,
47339
47446
  charter: charterWrapper,
47340
- deliverable: deliverableWrapper
47447
+ deliverable: deliverableWrapper,
47448
+ system: systemWrapper
47341
47449
  };
47342
47450
  function isOperationGroup(value) {
47343
47451
  return value !== void 0 && OPERATION_GROUPS.includes(value);
@@ -47362,7 +47470,8 @@ var groupUsageBuilders = {
47362
47470
  model: modelUsage,
47363
47471
  compass: compassUsage,
47364
47472
  charter: charterUsage,
47365
- deliverable: deliverableUsage
47473
+ deliverable: deliverableUsage,
47474
+ system: systemUsage
47366
47475
  };
47367
47476
  function operationGroupUsage(group, bin) {
47368
47477
  return usageWithSchemaFooter(groupUsageBuilders[group](bin), bin);
@@ -47385,7 +47494,7 @@ function operationUsageLines(bin) {
47385
47494
  `${bin} escalation list|get|resolve|reject`,
47386
47495
  `${bin} error list|resolve|supersede`,
47387
47496
  `${bin} sync brief|compile|complete`,
47388
- `${bin} runner list|status|work-orders|revoke`,
47497
+ `${bin} runner list|status|diagnose|repair|work-orders|revoke`,
47389
47498
  `${bin} notification settings|test|errors`,
47390
47499
  `${bin} settings get|update|product-learning|rename`,
47391
47500
  `${bin} member invite|update|remove`,