@rosthq/cli 0.7.135 → 0.7.137
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 +621 -508
- package/dist/index.js.map +4 -4
- package/dist/skill-install.d.ts +4 -0
- package/dist/skill-install.d.ts.map +1 -1
- package/dist/skills.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13409,13 +13409,13 @@ var init_command_discovery = __esm({
|
|
|
13409
13409
|
{ "id": "notification.settings.update", "title": "Update notification settings", "description": "Update tenant notification preferences.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "escalations_enabled": { "type": "boolean" }, "sync_brief_enabled": { "type": "boolean" }, "default_channel": { "type": "string", "enum": ["slack", "email", "in_app"] } }, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "escalations_enabled": { "type": "boolean" }, "sync_brief_enabled": { "type": "boolean" }, "default_channel": { "type": "string", "enum": ["slack", "email", "in_app"] } }, "required": ["escalations_enabled", "sync_brief_enabled", "default_channel"], "additionalProperties": false }, "help": "Update notification preferences for escalations, Sync briefs, and the default channel.", "guide_slugs": ["notifications-guide"], "stages": ["operating_rhythm"], "related_command_ids": ["agent.go_live", "confirmation.approve", "confirmation.reject", "notification.list_errors", "notification.settings.get", "notification.test"] },
|
|
13410
13410
|
{ "id": "notification.test", "title": "Send test notification", "description": "Emit an in-app test notification to the acting human to verify delivery is wired.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": {}, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "notification_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "delivered": { "type": "boolean" } }, "required": ["notification_id", "delivered"], "additionalProperties": false }, "help": "Send an in-app test notification to confirm the delivery path is wired.", "guide_slugs": ["notifications-guide"], "stages": ["operating_rhythm"], "related_command_ids": ["agent.go_live", "confirmation.approve", "confirmation.reject", "notification.list_errors", "notification.settings.get", "notification.settings.update"] },
|
|
13411
13411
|
{ "id": "onboarding.activate", "title": "Activate onboarding agents", "description": "Stage one owner approval to activate every agent in an applied onboarding receipt and complete onboarding atomically.", "required_scope": "tenant", "confirmation": "human_required", "trusted_execution": { "mode": "always_human", "risk_flags": [], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "idempotency_key": { "type": "string", "minLength": 1, "maxLength": 120 }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "expected_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terminal_rehearsal_batch_receipt_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "rehearsal_runs": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "rehearsal_run_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["agent_id", "rehearsal_run_id"], "additionalProperties": false } }, "configuration_digests": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }, "required": ["agent_id", "configuration_digest"], "additionalProperties": false } } }, "required": ["idempotency_key", "setup_application_id", "expected_input_digest", "expected_receipt_revision", "terminal_rehearsal_batch_receipt_id", "rehearsal_runs", "configuration_digests"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "string", "const": "activated" }, "receipt": { "type": "object", "properties": { "activation_receipt_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "activation_confirmation_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "implementation_run_id": { "anyOf": [{ "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" }] }, "activation_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "setup_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "terminal_rehearsal_batch_receipt_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "agents": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "status": { "type": "string", "const": "live" }, "schedule_armed": { "type": "boolean" } }, "required": ["agent_id", "seat_id", "status", "schedule_armed"], "additionalProperties": false } }, "onboarding_completed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "activated_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": ["activation_receipt_id", "activation_confirmation_id", "setup_application_id", "implementation_run_id", "activation_input_digest", "setup_receipt_revision", "terminal_rehearsal_batch_receipt_id", "agents", "onboarding_completed_at", "activated_at"], "additionalProperties": false } }, "required": ["application_id", "status", "receipt"], "additionalProperties": false }, "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.", "guide_slugs": ["rost-implementation-method", "mcp-and-cli-guide", "agent-reference-map"], "stages": ["staffing"], "related_command_ids": ["agent.go_live", "agent.run_dry_run", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "credential.ingress", "friction.file_issue", "friction.list", "friction.resolve", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start"] },
|
|
13412
|
-
{ "id": "onboarding.advance_step", "title": "Advance onboarding step", "description": "Persist the current onboarding step after server-side validation.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "step": { "type": "string", "
|
|
13412
|
+
{ "id": "onboarding.advance_step", "title": "Advance onboarding step", "description": "Persist the current onboarding step after server-side validation.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "step": { "type": "string", "enum": ["setup_path", "company_basics", "how_it_works", "compass_context", "org_intake", "charters_preview", "sync_rhythm", "invite_team", "staff_agent", "finish"] }, "state": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "completed": { "default": false, "type": "boolean" } }, "required": ["step"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "step": { "type": "string", "enum": ["setup_path", "company_basics", "how_it_works", "compass_context", "org_intake", "charters_preview", "sync_rhythm", "invite_team", "staff_agent", "finish", "complete"] }, "state": {}, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, { "type": "null" }] } }, "required": ["step", "state", "completed_at"], "additionalProperties": false }, "help": "Advance onboarding only after the current setup step is represented in the tenant state.", "guide_slugs": ["rost-implementation-method"], "stages": ["company_setup"], "related_command_ids": ["agent.go_live", "agent.run_dry_run", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "credential.ingress", "friction.file_issue", "friction.list", "friction.resolve", "onboarding.activate", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start"] },
|
|
13413
13413
|
{ "id": "onboarding.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.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "text": { "type": "string", "minLength": 1 }, "filename": { "default": "mcp-org-context.txt", "type": "string", "minLength": 1 }, "mime_type": { "default": "text/plain", "type": "string", "enum": ["text/plain", "text/markdown", "text/csv"] }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "kind": { "type": "string", "enum": ["plan", "financial", "org_chart", "process"] }, "source": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": ["text"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "storage_ref": { "type": "string", "minLength": 1 }, "kind": { "type": "string", "enum": ["org_chart", "role_doc", "plan", "financial", "other"] }, "title": { "anyOf": [{ "type": "string", "minLength": 1 }, { "type": "null" }] } }, "required": ["document_id", "storage_ref", "kind", "title"], "additionalProperties": false }, "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" }, "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.", "guide_slugs": ["compass-authoring-guide", "rost-implementation-method", "responsibility-graph-playbook"], "stages": ["company_setup", "graph_design"], "related_command_ids": ["agent_setup.get", "agent_setup.start", "agent_setup.update", "agent_template.list", "agent.configure_tools", "agent.create_custom", "agent.create_from_template", "agent.fleet_digest", "agent.get_run", "agent.go_live", "agent.list_fleet", "agent.list_runs", "agent.list_tool_calls", "agent.run_dry_run", "agent.status", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "command.describe", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "confirmation.reject", "credential.ingress", "deliverable.accept", "deliverable.attach", "deliverable.create", "deliverable.get", "deliverable.list", "deliverable.reject", "error_log.list", "error_log.resolve", "error_log.supersede", "escalation.get", "escalation.list", "escalation.reject", "escalation.resolve", "friction.file_issue", "friction.list", "friction.resolve", "implementation_access.abandon", "implementation_access.complete", "implementation_access.status", "integration.list", "integration.readiness", "integration.status", "integration.test", "mcp_token.create", "mcp_token.list", "mcp_token.revoke", "onboarding.activate", "onboarding.advance_step", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.resume", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "runner.diagnose", "runner.repair", "seat.create", "seat.create_complete", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "skill.assign_to_seat", "skill.assigned.list", "skill.catalog", "skill.check_dependencies", "skill.create", "skill.enable_catalog", "skill.file.get", "skill.get", "skill.import_github", "skill.import_upload", "skill.install_local", "skill.list", "skill.publish", "skill.revoke_from_seat", "skill.sync_local", "skill.update_draft", "staffing.assign", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "system.health", "tenant.anthropic_key.disable", "tenant.rename", "tool_grants.tenant.update", "usage.report", "usage.snapshot", "user.tenants", "user.use_tenant", "user.whoami"] },
|
|
13414
13414
|
{ "id": "onboarding.create_invite", "title": "Create onboarding invite", "description": "Create a pending invite for an onboarding team member.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "always_human", "risk_flags": ["external_send"], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "role": { "default": "member", "type": "string", "enum": ["owner", "admin", "steward", "member"] }, "flags": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": ["email"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "invite_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "role": { "type": "string", "enum": ["owner", "admin", "steward", "member"] }, "token": { "type": "string", "minLength": 1 } }, "required": ["invite_id", "email", "role", "token"], "additionalProperties": false }, "help": "Invites should give humans access to the company without assigning work directly to people instead of seats.", "guide_slugs": ["settings-members-and-invites-guide"], "stages": ["company_setup"], "related_command_ids": ["agent.go_live", "agent.run_dry_run", "aicos.brain_settings.get", "aicos.brain_settings.update", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "credential.ingress", "friction.file_issue", "friction.list", "friction.resolve", "integration.list", "integration.readiness", "integration.status", "integration.test", "mcp_token.create", "mcp_token.list", "mcp_token.revoke", "member.invite", "member.remove", "member.update", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.finish", "onboarding.rehearse", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "settings.agent_policy.get", "settings.agent_policy.update", "settings.confirmation_policy.get", "settings.confirmation_policy.update", "settings.get", "settings.member_visibility.get", "settings.member_visibility.update", "settings.product_learning.get", "settings.product_learning.update", "settings.sync_brief_scope.get", "settings.sync_brief_scope.update", "settings.update", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "tenant.model_gateway_policy.update", "tenant.rename"] },
|
|
13415
|
-
{ "id": "onboarding.finish", "title": "Finish onboarding", "description": "Mark onboarding complete after the existing onboarding requirements pass.", "required_scope": "tenant", "confirmation": "human_required", "trusted_execution": { "mode": "always_human", "risk_flags": [], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": {}, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "step": { "type": "string", "
|
|
13415
|
+
{ "id": "onboarding.finish", "title": "Finish onboarding", "description": "Mark onboarding complete after the existing onboarding requirements pass.", "required_scope": "tenant", "confirmation": "human_required", "trusted_execution": { "mode": "always_human", "risk_flags": [], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": {}, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "step": { "type": "string", "enum": ["setup_path", "company_basics", "how_it_works", "compass_context", "org_intake", "charters_preview", "sync_rhythm", "invite_team", "staff_agent", "finish", "complete"] }, "state": {}, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, { "type": "null" }] } }, "required": ["step", "state", "completed_at"], "additionalProperties": false }, "help": "Finish onboarding when the graph, at least one Charter, and the first operating rhythm are clear.", "guide_slugs": ["rost-implementation-method", "sync-rhythm-playbook"], "stages": ["company_setup", "operating_rhythm"], "related_command_ids": ["agent.go_live", "agent.run_dry_run", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "coach.draft_guide", "compass.alignment", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "credential.ingress", "escalation.raise", "friction.assist", "friction.file_issue", "friction.get", "friction.link_task", "friction.list", "friction.resolve", "friction.update_status", "goal.bind_measurable", "goal.create", "goal.drop", "goal.get", "goal.list", "goal.list_at_risk", "goal.reassign_owner", "goal.reparent", "goal.set_auto_status", "goal.set_progress", "goal.set_status", "goal.unbind_measurable", "goal.update", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.rehearse", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "task.accept", "task.complete", "task.confirm_proposal", "task.create", "task.decline", "task.decline_proposal", "task.list"] },
|
|
13416
13416
|
{ "id": "onboarding.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.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "idempotency_key": { "type": "string", "minLength": 1, "maxLength": 120 }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "expected_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["idempotency_key", "setup_application_id", "expected_input_digest", "expected_receipt_revision"], "additionalProperties": false }, "output_schema": { "anyOf": [{ "type": "object", "properties": { "status": { "type": "string", "const": "in_progress" }, "batch": { "type": "object", "properties": { "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "implementation_run_id": { "anyOf": [{ "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" }] }, "idempotency_key": { "type": "string", "minLength": 1, "maxLength": 120 }, "rehearsal_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "expected_agent_set_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_agents": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }, "required": ["agent_id", "seat_id", "configuration_digest"], "additionalProperties": false } }, "batch_attempt": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "created_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": ["batch_id", "setup_application_id", "implementation_run_id", "idempotency_key", "rehearsal_input_digest", "expected_input_digest", "expected_receipt_revision", "expected_agent_set_digest", "expected_agents", "batch_attempt", "created_at"], "additionalProperties": false }, "checkpoints": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "oneOf": [{ "type": "object", "properties": { "checkpoint_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "runtime_run_key": { "type": "string", "minLength": 1, "maxLength": 240 }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "status": { "type": "string", "const": "pending" }, "rehearsal_run_id": { "type": "null" }, "claimed_at": { "type": "null" }, "lease_expires_at": { "type": "null" }, "started_at": { "type": "null" }, "completed_at": { "type": "null" } }, "required": ["checkpoint_id", "batch_id", "agent_id", "seat_id", "runtime_run_key", "configuration_digest", "status", "rehearsal_run_id", "claimed_at", "lease_expires_at", "started_at", "completed_at"], "additionalProperties": false }, { "type": "object", "properties": { "checkpoint_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "runtime_run_key": { "type": "string", "minLength": 1, "maxLength": 240 }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "status": { "type": "string", "const": "running" }, "rehearsal_run_id": { "anyOf": [{ "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" }] }, "claimed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lease_expires_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "started_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "completed_at": { "type": "null" } }, "required": ["checkpoint_id", "batch_id", "agent_id", "seat_id", "runtime_run_key", "configuration_digest", "status", "rehearsal_run_id", "claimed_at", "lease_expires_at", "started_at", "completed_at"], "additionalProperties": false }, { "type": "object", "properties": { "checkpoint_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "runtime_run_key": { "type": "string", "minLength": 1, "maxLength": 240 }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "status": { "type": "string", "enum": ["passed", "failed"] }, "rehearsal_run_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "claimed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lease_expires_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "started_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "completed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": ["checkpoint_id", "batch_id", "agent_id", "seat_id", "runtime_run_key", "configuration_digest", "status", "rehearsal_run_id", "claimed_at", "lease_expires_at", "started_at", "completed_at"], "additionalProperties": false }] } }, "next_action": { "type": "string", "const": "retry" } }, "required": ["status", "batch", "checkpoints", "next_action"], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "enum": ["passed", "failed"] }, "batch_receipt": { "type": "object", "properties": { "receipt_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "implementation_run_id": { "anyOf": [{ "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" }] }, "expected_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "rehearsal_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_agent_set_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "status": { "type": "string", "enum": ["passed", "failed"] }, "agent_count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 100 }, "started_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "completed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": ["receipt_id", "batch_id", "setup_application_id", "implementation_run_id", "expected_input_digest", "expected_receipt_revision", "rehearsal_input_digest", "expected_agent_set_digest", "status", "agent_count", "started_at", "completed_at"], "additionalProperties": false }, "agent_receipts": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "receipt_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "batch_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "setup_application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "implementation_run_id": { "anyOf": [{ "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, { "type": "null" }] }, "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "rehearsal_run_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "caller_idempotency_key": { "type": "string", "minLength": 1, "maxLength": 120 }, "rehearsal_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_input_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "expected_receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }, "status": { "type": "string", "enum": ["passed", "failed"] }, "evidence": { "type": "object", "properties": { "tool_previews": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "tool_name": { "type": "string", "minLength": 1, "maxLength": 160 }, "operation": { "type": "string", "minLength": 1, "maxLength": 160 }, "summary": { "type": "string", "minLength": 1, "maxLength": 1e3 } }, "required": ["tool_name", "operation", "summary"], "additionalProperties": false } }, "manifest_holds": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "minLength": 1, "maxLength": 120 }, "summary": { "type": "string", "minLength": 1, "maxLength": 1e3 } }, "required": ["code", "summary"], "additionalProperties": false } }, "errors": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "minLength": 1, "maxLength": 120 }, "message": { "type": "string", "minLength": 1, "maxLength": 1e3 }, "retryable": { "type": "boolean" } }, "required": ["code", "message", "retryable"], "additionalProperties": false } } }, "required": ["tool_previews", "manifest_holds", "errors"], "additionalProperties": false }, "started_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "completed_at": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": ["receipt_id", "batch_id", "setup_application_id", "implementation_run_id", "agent_id", "seat_id", "rehearsal_run_id", "caller_idempotency_key", "rehearsal_input_digest", "expected_input_digest", "expected_receipt_revision", "configuration_digest", "status", "evidence", "started_at", "completed_at"], "additionalProperties": false } }, "next_action": { "type": "string", "enum": ["activate", "fix_and_retry"] } }, "required": ["status", "batch_receipt", "agent_receipts", "next_action"], "additionalProperties": 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.", "guide_slugs": ["rost-implementation-method", "mcp-and-cli-guide", "agent-reference-map"], "stages": ["staffing"], "related_command_ids": ["agent_setup.get", "agent_setup.start", "agent_setup.update", "agent_template.list", "agent.configure_tools", "agent.create_custom", "agent.create_from_template", "agent.fleet_digest", "agent.get_run", "agent.go_live", "agent.list_fleet", "agent.list_runs", "agent.list_tool_calls", "agent.run_dry_run", "agent.status", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "confirmation.reject", "credential.ingress", "deliverable.accept", "deliverable.attach", "deliverable.create", "deliverable.get", "deliverable.list", "deliverable.reject", "error_log.list", "error_log.resolve", "error_log.supersede", "escalation.get", "escalation.list", "escalation.reject", "escalation.resolve", "friction.file_issue", "friction.list", "friction.resolve", "implementation_access.abandon", "implementation_access.complete", "implementation_access.status", "integration.list", "integration.readiness", "integration.status", "integration.test", "mcp_token.create", "mcp_token.list", "mcp_token.revoke", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.resume", "onboarding.setup", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "runner.diagnose", "runner.repair", "seat.create", "seat.create_complete", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "skill.assign_to_seat", "skill.assigned.list", "skill.catalog", "skill.check_dependencies", "skill.create", "skill.enable_catalog", "skill.file.get", "skill.get", "skill.import_github", "skill.import_upload", "skill.install_local", "skill.list", "skill.publish", "skill.revoke_from_seat", "skill.sync_local", "skill.update_draft", "staffing.assign", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "system.health", "tenant.anthropic_key.disable", "tenant.rename", "tool_grants.tenant.update", "usage.report", "usage.snapshot", "user.tenants", "user.use_tenant", "user.whoami"] },
|
|
13417
13417
|
{ "id": "onboarding.resume", "title": "Onboard resume", "description": "Return the onboarding resume state: path choice, pending setup, and the next step.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": {}, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "path_choice": { "anyOf": [{ "type": "string", "enum": ["guided", "agent_led"] }, { "type": "null" }] }, "setup_pending": { "type": "boolean" }, "resume_kind": { "type": "string", "enum": ["guided", "agent_led", "complete"] }, "web_url": { "anyOf": [{ "type": "string" }, { "type": "null" }] }, "next_command": { "anyOf": [{ "type": "string" }, { "type": "null" }] } }, "required": ["path_choice", "setup_pending", "resume_kind", "web_url", "next_command"] }, "help": "Resume an in-progress onboarding session from the implementation bootstrap principal; reports path choice, pending setup, and the next step.", "guide_slugs": ["rost-implementation-method", "agent-reference-map"], "stages": ["company_setup"], "related_command_ids": ["agent_setup.get", "agent_setup.start", "agent_setup.update", "agent_template.list", "agent.configure_tools", "agent.create_custom", "agent.create_from_template", "agent.fleet_digest", "agent.get_run", "agent.go_live", "agent.list_fleet", "agent.list_runs", "agent.list_tool_calls", "agent.run_dry_run", "agent.status", "charter.approve", "charter.draft", "compass.set", "confirmation.approve", "confirmation.reject", "deliverable.accept", "deliverable.attach", "deliverable.create", "deliverable.get", "deliverable.list", "deliverable.reject", "error_log.list", "error_log.resolve", "error_log.supersede", "escalation.get", "escalation.list", "escalation.reject", "escalation.resolve", "implementation_access.abandon", "implementation_access.complete", "implementation_access.status", "integration.list", "integration.readiness", "integration.status", "integration.test", "mcp_token.create", "mcp_token.list", "mcp_token.revoke", "onboarding.attach_reference", "onboarding.rehearse", "onboarding.status", "onboarding.upload_context", "runner.diagnose", "runner.repair", "seat.create", "seat.create_complete", "skill.assign_to_seat", "skill.assigned.list", "skill.catalog", "skill.check_dependencies", "skill.create", "skill.enable_catalog", "skill.file.get", "skill.get", "skill.import_github", "skill.import_upload", "skill.install_local", "skill.list", "skill.publish", "skill.revoke_from_seat", "skill.sync_local", "skill.update_draft", "staffing.assign", "system.health", "tenant.anthropic_key.disable", "tenant.rename", "tool_grants.tenant.update", "usage.report", "usage.snapshot", "user.tenants", "user.use_tenant", "user.whoami"] },
|
|
13418
|
-
{ "id": "onboarding.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.", "required_scope": "tenant_admin", "confirmation": "none", "trusted_execution": { "mode": "always_human", "risk_flags": ["admin"], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": false, "input_schema": { "type": "object", "properties": { "path": { "type": "string", "enum": ["guided", "agent_led"] } }, "required": ["path"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "step": { "type": "string", "
|
|
13418
|
+
{ "id": "onboarding.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.", "required_scope": "tenant_admin", "confirmation": "none", "trusted_execution": { "mode": "always_human", "risk_flags": ["admin"], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": false, "input_schema": { "type": "object", "properties": { "path": { "type": "string", "enum": ["guided", "agent_led"] } }, "required": ["path"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "step": { "type": "string", "enum": ["setup_path", "company_basics", "how_it_works", "compass_context", "org_intake", "charters_preview", "sync_rhythm", "invite_team", "staff_agent", "finish", "complete"] }, "state": {}, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, { "type": "null" }] } }, "required": ["step", "state", "completed_at"], "additionalProperties": 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.", "guide_slugs": ["mcp-and-cli-guide", "agent-reference-map"], "stages": ["company_setup"], "related_command_ids": [] },
|
|
13419
13419
|
{ "id": "onboarding.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.", "required_scope": "tenant", "confirmation": "human_required", "trusted_execution": { "mode": "always_human", "risk_flags": [], "rationale": "Trusted mode cannot bypass this command's human confirmation or high-risk boundary." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "schema_version": { "type": "number", "const": 1 }, "idempotency_key": { "type": "string", "minLength": 1, "maxLength": 120 }, "company_name": { "type": "string", "minLength": 2, "maxLength": 120 }, "sources": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "source_upload_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "kind": { "type": "string", "enum": ["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"] }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "row_ref": { "type": "string" } }, "required": ["source_key", "source_upload_id", "title", "kind", "sha256"], "additionalProperties": false } }, "reconciliation": { "maxItems": 1e3, "type": "array", "items": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "source_sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "family": { "type": "string", "enum": ["source", "seat", "planned_person", "goal", "signal", "reading", "friction", "task", "schedule", "agent"] }, "input_count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "normalized_identity_digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "applied_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "skipped": { "maxItems": 5e3, "type": "array", "items": { "anyOf": [{ "type": "object", "properties": { "logical_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "reason": { "type": "string", "enum": ["context_only", "invalid", "duplicate", "unsupported"] } }, "required": ["logical_key", "reason"], "additionalProperties": false }, { "type": "object", "properties": { "row_ref": { "type": "string", "minLength": 1, "maxLength": 160 }, "reason": { "type": "string", "enum": ["context_only", "invalid", "duplicate", "unsupported"] } }, "required": ["row_ref", "reason"], "additionalProperties": false }] } } }, "required": ["source_key", "source_sha256", "family", "input_count", "normalized_identity_digest", "applied_count", "skipped"], "additionalProperties": false } }, "compass": { "oneOf": [{ "type": "object", "properties": { "schema_version": { "type": "number", "const": 1 }, "purpose": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "principles": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false } }, "cycle_objectives": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false } }, "gaps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "field": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "severity": { "type": "string", "enum": ["required", "recommended"] }, "reason": { "type": "string", "minLength": 1 } }, "required": ["id", "field", "question", "severity", "reason"], "additionalProperties": false } }, "follow_up_tasks": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "acceptance_criteria": { "minItems": 1, "type": "array", "items": { "type": "string", "minLength": 1 } }, "gap_id": { "type": "string", "minLength": 1 } }, "required": ["title", "description", "acceptance_criteria", "gap_id"], "additionalProperties": false } }, "source_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "horizon_goals": { "type": "object", "properties": { "three_year": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false }, "one_year": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false } }, "required": ["three_year", "one_year"], "additionalProperties": false } }, "required": ["schema_version", "purpose", "principles", "cycle_objectives", "gaps", "follow_up_tasks", "source_ids", "horizon_goals"], "additionalProperties": false }, { "type": "object", "properties": { "schema_version": { "type": "number", "const": 2 }, "purpose": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "principles": { "minItems": 1, "maxItems": 5, "type": "array", "items": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false } }, "cycle_objectives": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false } }, "gaps": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "minLength": 1 }, "field": { "type": "string", "minLength": 1 }, "question": { "type": "string", "minLength": 1 }, "severity": { "type": "string", "enum": ["required", "recommended"] }, "reason": { "type": "string", "minLength": 1 } }, "required": ["id", "field", "question", "severity", "reason"], "additionalProperties": false } }, "follow_up_tasks": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 }, "acceptance_criteria": { "minItems": 1, "type": "array", "items": { "type": "string", "minLength": 1 } }, "gap_id": { "type": "string", "minLength": 1 } }, "required": ["title", "description", "acceptance_criteria", "gap_id"], "additionalProperties": false } }, "source_ids": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "horizon_goals": { "type": "object", "properties": { "ten_year": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false }, "three_year": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false }, "one_year": { "type": "object", "properties": { "title": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "definition_of_done": { "type": "object", "properties": { "value": { "type": "string", "minLength": 1 }, "citations": { "type": "array", "items": { "type": "object", "properties": { "source_id": { "type": "string", "minLength": 1 }, "document_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "label": { "type": "string", "minLength": 1 }, "locator": { "type": "string", "minLength": 1 }, "quote": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["source_id", "label", "locator", "confidence"], "additionalProperties": false } }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 }, "placeholder": { "default": false, "type": "boolean" } }, "required": ["value", "citations", "confidence"], "additionalProperties": false }, "horizon": { "type": "string", "enum": ["ten_year", "three_year", "one_year", "cycle"] } }, "required": ["title", "definition_of_done", "horizon"], "additionalProperties": false } }, "required": ["three_year", "one_year"], "additionalProperties": false } }, "required": ["schema_version", "purpose", "principles", "cycle_objectives", "gaps", "follow_up_tasks", "source_ids", "horizon_goals"], "additionalProperties": false }] }, "cycle": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 160 }, "starts_on": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "ends_on": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "status": { "type": "string", "const": "active" } }, "required": ["key", "name", "starts_on", "ends_on", "status"], "additionalProperties": false }, "seats": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "name": { "type": "string" }, "seat_type": { "type": "string", "enum": ["human", "agent", "hybrid"] }, "parent": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "existing" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["kind", "seat_id"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "logical" }, "seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["kind", "seat_key"], "additionalProperties": false }] }, "purpose": { "type": "string", "minLength": 1, "maxLength": 2e3 }, "charter": { "type": "object", "properties": { "payload_version": { "type": "number", "const": 1 }, "purpose": { "type": "string", "minLength": 1 }, "accountabilities": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "minLength": 1 }, "description": { "type": "string", "minLength": 1 } }, "required": ["title", "description"], "additionalProperties": false } }, "decision_authority": { "type": "object", "properties": { "autonomous": { "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string", "minLength": 1 }, "condition": { "type": "string", "minLength": 1 }, "rationale": { "type": "string", "minLength": 1 }, "unanswered_boundary": { "default": false, "type": "boolean" } }, "required": ["action", "condition", "rationale"], "additionalProperties": false } }, "approval": { "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string", "minLength": 1 }, "condition": { "type": "string", "minLength": 1 }, "rationale": { "type": "string", "minLength": 1 }, "unanswered_boundary": { "default": false, "type": "boolean" } }, "required": ["action", "condition", "rationale"], "additionalProperties": false } }, "escalate": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "action": { "type": "string", "minLength": 1 }, "condition": { "type": "string", "minLength": 1 }, "rationale": { "type": "string", "minLength": 1 }, "unanswered_boundary": { "default": false, "type": "boolean" } }, "required": ["action", "condition", "rationale"], "additionalProperties": false } } }, "required": ["autonomous", "approval", "escalate"], "additionalProperties": false }, "escalation_rules": { "minItems": 1, "type": "array", "items": { "type": "string", "minLength": 1 } }, "measurables": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "minLength": 1 }, "target": { "type": "string", "minLength": 1 }, "cadence": { "type": "string", "enum": ["daily", "weekly", "monthly", "quarterly"] }, "source": { "type": "string", "enum": ["human", "agent", "integration"] }, "signal": { "type": "object", "properties": { "unit": { "type": "string", "minLength": 1 }, "direction": { "type": "string", "enum": ["up_good", "down_good"] }, "target": { "type": "number" } }, "required": ["unit", "direction", "target"], "additionalProperties": false } }, "required": ["name", "target", "cadence", "source"], "additionalProperties": false } }, "permission_manifest": { "type": "array", "items": { "type": "object", "properties": { "tool": { "type": "string", "minLength": 1 }, "capability_id": { "type": "string", "minLength": 1 }, "integration_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "scope": { "type": "string", "minLength": 1 }, "granted": { "type": "boolean" }, "rationale": { "type": "string", "minLength": 1 }, "scope_tier": { "type": "string", "enum": ["read", "draft", "write_with_approval", "full"] }, "access_policy": { "type": "string", "enum": ["always_allow", "always_ask"] }, "args": { "type": "object", "properties": { "equals": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/definitions/__schema0" } } }, "additionalProperties": false } }, "required": ["tool", "scope", "granted", "rationale"], "additionalProperties": false } }, "budget": { "type": "object", "properties": { "monthly_usd": { "anyOf": [{ "type": "number", "minimum": 0 }, { "type": "null" }] }, "approval_required_over_usd": { "anyOf": [{ "type": "number", "minimum": 0 }, { "type": "null" }] }, "notes": { "type": "string", "minLength": 1 } }, "required": ["monthly_usd", "approval_required_over_usd", "notes"], "additionalProperties": false }, "unanswered_boundaries": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "seat_type_recommendation": { "type": "object", "properties": { "recommendation": { "type": "string", "enum": ["human", "agent", "hybrid"] }, "rationale": { "type": "string", "minLength": 1 }, "confidence": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["recommendation", "rationale", "confidence"], "additionalProperties": false } }, "required": ["payload_version", "purpose", "accountabilities", "decision_authority", "escalation_rules", "measurables", "permission_manifest", "budget"], "additionalProperties": false }, "human_staffing": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "owner" } }, "required": ["kind"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "planned" }, "display_name": { "type": "string" }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["kind", "display_name"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "vacant" } }, "required": ["kind"], "additionalProperties": false }] }, "agent": { "type": "object", "properties": { "display_name": { "type": "string" }, "steward": { "oneOf": [{ "type": "object", "properties": { "kind": { "type": "string", "const": "existing" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": ["kind", "seat_id"], "additionalProperties": false }, { "type": "object", "properties": { "kind": { "type": "string", "const": "logical" }, "seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["kind", "seat_key"], "additionalProperties": false }] }, "lane": { "type": "string", "enum": ["cloud", "runner"] }, "model_config": { "type": "object", "properties": { "provider": { "type": "string", "enum": ["anthropic"] }, "model": { "type": "string", "minLength": 1, "maxLength": 120, "pattern": "^[^\\n\\r]+$" }, "effort": { "type": "string", "enum": ["low", "medium", "high", "xhigh", "max"] } }, "required": ["provider", "model"], "additionalProperties": false }, "skills": { "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,80}$" }, "skill_version_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "content_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" } }, "required": ["slug", "skill_version_id", "content_sha256"], "additionalProperties": false } }, "schedule_cron": { "anyOf": [{ "type": "string", "minLength": 1, "maxLength": 120 }, { "type": "null" }] }, "schedule_timezone": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": ["display_name", "steward", "lane", "model_config", "skills", "schedule_cron", "schedule_timezone"], "additionalProperties": false }, "source_uses": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } } }, "required": ["seat_key", "name", "seat_type", "charter", "human_staffing", "source_uses"], "additionalProperties": false }, "description": "The first seat (seats[0]) must be the plan's single parentless root Seat and adopts the already-provisioned root Seat \u2014 its name must match the provisioned root seat's name after whitespace/case normalization." }, "goals": { "maxItems": 200, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "definition": { "type": "string", "minLength": 1, "maxLength": 2e3 }, "kind": { "type": "string", "enum": ["company_objective", "seat_goal", "milestone"] }, "owner_seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "parent_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "source_compass_objective_index": { "type": "integer", "minimum": 0, "maximum": 2 }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["key", "title", "definition", "kind", "owner_seat_key"], "additionalProperties": false } }, "signals": { "maxItems": 250, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "owner_seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "unit": { "type": "string", "minLength": 1, "maxLength": 40 }, "direction": { "type": "string", "enum": ["up_good", "down_good"] }, "cadence": { "type": "string", "enum": ["daily", "weekly", "monthly", "quarterly", "annual"] }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["key", "name", "owner_seat_key", "unit", "direction", "cadence"], "additionalProperties": false } }, "signal_readings": { "maxItems": 5e3, "type": "array", "items": { "type": "object", "properties": { "signal_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "period_start": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "value": { "type": "string", "minLength": 1, "maxLength": 100, "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$" }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["signal_key", "period_start", "value"], "additionalProperties": false } }, "frictions": { "maxItems": 250, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "description": { "type": "string", "minLength": 1, "maxLength": 2e3 }, "owner_seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "raised_by_seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["key", "title", "description", "owner_seat_key"], "additionalProperties": false } }, "tasks": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "description": { "type": "string", "minLength": 1, "maxLength": 2e3 }, "owner_seat_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "goal_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "friction_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "due_on": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "initial_status": { "type": "string", "const": "in_progress" }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" } }, "required": ["source_key"], "additionalProperties": false } }, "required": ["key", "title", "description", "owner_seat_key", "initial_status"], "additionalProperties": false } }, "sync_brief_scope": { "type": "string", "enum": ["company_wide", "per_cluster"] }, "managed_inference_hard_cap_usd": { "anyOf": [{ "type": "string", "maxLength": 11, "pattern": "^(?:0|[1-9]\\d{0,7})\\.\\d{2}$" }, { "type": "null" }] } }, "required": ["schema_version", "idempotency_key", "company_name", "sources", "reconciliation", "compass", "cycle", "seats", "goals", "signals", "signal_readings", "frictions", "tasks", "sync_brief_scope"], "additionalProperties": false, "definitions": { "__schema0": { "anyOf": [{ "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "type": "null" }, { "type": "array", "items": { "$ref": "#/definitions/__schema0" } }, { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "$ref": "#/definitions/__schema0" } }] } } }, "output_schema": { "type": "object", "properties": { "application_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "root_foundation_bound": { "type": "boolean", "const": true }, "receipt": { "type": "object", "properties": { "receipt_revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "created": { "type": "object", "propertyNames": { "type": "string", "enum": ["source", "seat", "charter", "decision", "planned_person", "goal", "signal", "reading", "friction", "task", "schedule", "agent", "sync_brief", "onboarding"] }, "additionalProperties": { "maxItems": 5e3, "type": "array", "items": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } } }, "skipped": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "family": { "type": "string", "enum": ["source", "seat", "charter", "decision", "planned_person", "goal", "signal", "reading", "friction", "task", "schedule", "agent", "sync_brief", "onboarding"] }, "reason": { "type": "string", "enum": ["context_only", "invalid", "duplicate", "unsupported"] }, "count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["family", "reason", "count"], "additionalProperties": false } }, "warnings": { "maxItems": 500, "type": "array", "items": { "type": "object", "properties": { "code": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,63}$" }, "count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": ["code", "count"], "additionalProperties": false } }, "counts": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,63}$" }, "additionalProperties": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "digests": { "type": "object", "propertyNames": { "type": "string", "pattern": "^[a-z][a-z0-9_]{0,63}$" }, "additionalProperties": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }, "agent_bindings": { "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "agent_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "seat_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "configuration_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }, "required": ["agent_id", "seat_id", "configuration_digest"], "additionalProperties": false } }, "receipt_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" } }, "required": ["receipt_revision", "created", "skipped", "warnings", "counts", "digests", "receipt_digest"], "additionalProperties": false } }, "required": ["application_id", "root_foundation_bound", "receipt"], "additionalProperties": false }, "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.", "guide_slugs": ["rost-implementation-method", "mcp-and-cli-guide", "agent-reference-map"], "stages": ["company_setup", "graph_design", "charter_design", "staffing"], "related_command_ids": ["agent_grant_intervention.decide", "agent.activation_sign", "agent.go_live", "agent.run_dry_run", "agent.trust.create", "agent.trust.expire", "agent.trust.revoke", "agent.trust.supersede", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "confirmation.dismiss", "confirmation.dismiss_stale", "confirmation.list", "confirmation.reject", "confirmation.remint", "credential.ingress", "friction.file_issue", "friction.list", "friction.resolve", "goal.reassign_owner", "goal.reparent", "mcp_token.create", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.source_ingest", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "task.confirm_proposal", "task.decline_proposal"] },
|
|
13420
13420
|
{ "id": "onboarding.source_ingest", "title": "Ingest onboarding source", "description": "Retain one bounded setup source under the exact tenant and implementation run.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "always_human", "risk_flags": ["admin"], "rationale": "Source ingestion is bootstrap-only and never inherits Trusted standing execution." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "kind": { "type": "string", "enum": ["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"] }, "title": { "type": "string" }, "content_base64": { "type": "string", "minLength": 1, "maxLength": 6666671 } }, "required": ["source_key", "kind", "title", "content_base64"], "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "source_upload_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "descriptor": { "type": "object", "properties": { "kind": { "type": "string", "enum": ["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"] }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "byte_count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 5e6 }, "family_manifest": { "minItems": 1, "maxItems": 4, "type": "array", "items": { "type": "object", "properties": { "family": { "type": "string", "enum": ["source", "seat", "planned_person", "goal", "signal", "reading", "friction", "task", "agent"] }, "input_count": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "normalized_identity_digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" } }, "required": ["family", "input_count", "normalized_identity_digest"], "additionalProperties": false } } }, "required": ["kind", "title", "sha256", "byte_count", "family_manifest"], "additionalProperties": false }, "source_ref": { "type": "object", "properties": { "source_key": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,79}$" }, "source_upload_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "title": { "type": "string" }, "kind": { "type": "string", "enum": ["org_chart", "signal_export", "goal_export", "friction_export", "meeting_export", "other"] }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "row_ref": { "type": "string" } }, "required": ["source_key", "source_upload_id", "title", "kind", "sha256"], "additionalProperties": false } }, "required": ["source_upload_id", "descriptor", "source_ref"], "additionalProperties": 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.", "guide_slugs": ["rost-implementation-method", "mcp-and-cli-guide"], "stages": ["company_setup"], "related_command_ids": ["agent.go_live", "agent.run_dry_run", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "credential.ingress", "friction.file_issue", "friction.list", "friction.resolve", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.setup", "onboarding.status", "onboarding.upload_context", "seat.create", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.report", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start"] },
|
|
13421
13421
|
{ "id": "onboarding.status", "title": "Onboard status", "description": "Return current onboarding progress, graph summary, and the next recommended actions.", "required_scope": "tenant", "confirmation": "none", "trusted_execution": { "mode": "not_applicable", "risk_flags": [], "rationale": "This command is not part of the Trusted positive allowlist." }, "expose_over_mcp": true, "input_schema": { "type": "object", "properties": {}, "additionalProperties": false }, "output_schema": { "type": "object", "properties": { "completed_steps": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "missing_requirements": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "graph_summary": { "type": "object", "properties": { "seat_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "active_seat_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "agent_seat_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["seat_count", "active_seat_count", "agent_seat_count"], "additionalProperties": false }, "agent_summary": { "type": "object", "properties": { "draft_setup": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "dry_run": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "live": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": ["draft_setup", "dry_run", "live"], "additionalProperties": false }, "onboarded": { "type": "boolean" }, "completed_at": { "anyOf": [{ "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, { "type": "null" }] }, "next_recommended_actions": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "path_choice": { "anyOf": [{ "type": "string", "enum": ["guided", "agent_led"] }, { "type": "null" }] } }, "required": ["completed_steps", "missing_requirements", "graph_summary", "agent_summary", "onboarded", "completed_at", "next_recommended_actions", "path_choice"], "additionalProperties": false }, "help": "Start by checking onboarding status, then use the implementation method guide to choose the next setup step.", "guide_slugs": ["rost-implementation-method", "agent-reference-map"], "stages": ["company_setup"], "related_command_ids": ["agent_setup.get", "agent_setup.start", "agent_setup.update", "agent_template.list", "agent.configure_tools", "agent.create_custom", "agent.create_from_template", "agent.fleet_digest", "agent.get_run", "agent.go_live", "agent.list_fleet", "agent.list_runs", "agent.list_tool_calls", "agent.run_dry_run", "agent.status", "agent.update_schedule", "aicos.brain_settings.get", "aicos.brain_settings.update", "cascade.import", "charter.approve", "charter.draft", "charter.draft_all", "charter.set", "charter.sign_manifest", "charter.update_draft", "compass.answer_gap", "compass.approve_version", "compass.draft", "compass.get_current", "compass.list_gaps", "compass.reject_draft", "compass.set", "compass.update_draft", "confirmation.activation_set.list", "confirmation.approve", "confirmation.reject", "credential.ingress", "deliverable.accept", "deliverable.attach", "deliverable.create", "deliverable.get", "deliverable.list", "deliverable.reject", "error_log.list", "error_log.resolve", "error_log.supersede", "escalation.get", "escalation.list", "escalation.reject", "escalation.resolve", "friction.file_issue", "friction.list", "friction.resolve", "graph.get", "implementation_access.abandon", "implementation_access.complete", "implementation_access.status", "integration.list", "integration.readiness", "integration.status", "integration.test", "mcp_token.create", "mcp_token.list", "mcp_token.revoke", "onboarding.activate", "onboarding.advance_step", "onboarding.attach_reference", "onboarding.create_invite", "onboarding.finish", "onboarding.rehearse", "onboarding.resume", "onboarding.setup", "onboarding.source_ingest", "onboarding.upload_context", "runner.diagnose", "runner.list", "runner.repair", "seat.create", "seat.create_complete", "seat.get", "seat.set_type", "signal.bind", "signal.confirm_reading", "signal.draft_first_readings", "signal.list", "signal.report", "skill.assign_to_seat", "skill.assigned.list", "skill.catalog", "skill.check_dependencies", "skill.create", "skill.enable_catalog", "skill.file.get", "skill.get", "skill.import_github", "skill.import_upload", "skill.install_local", "skill.list", "skill.publish", "skill.revoke_from_seat", "skill.sync_local", "skill.update_draft", "staffing.assign", "staffing.assign_agent_dry_run", "staffing.assign_user", "sync.brief.compile", "sync.brief.get", "sync.item.assign", "sync.run.complete", "sync.run.start", "system.health", "tenant.anthropic_key.disable", "tenant.model_gateway_policy.update", "tenant.rename", "tool_grants.tenant.update", "usage.report", "usage.snapshot", "user.tenants", "user.use_tenant", "user.whoami"] },
|
|
@@ -36532,6 +36532,23 @@ var onboardingSetupApprovalProjectionSchema = external_exports.object({
|
|
|
36532
36532
|
])
|
|
36533
36533
|
}).strict();
|
|
36534
36534
|
|
|
36535
|
+
// ../../packages/protocol/src/onboarding-steps.ts
|
|
36536
|
+
var onboardingStepSequence = [
|
|
36537
|
+
"setup_path",
|
|
36538
|
+
"company_basics",
|
|
36539
|
+
"how_it_works",
|
|
36540
|
+
"compass_context",
|
|
36541
|
+
"org_intake",
|
|
36542
|
+
"charters_preview",
|
|
36543
|
+
"sync_rhythm",
|
|
36544
|
+
"invite_team",
|
|
36545
|
+
"staff_agent",
|
|
36546
|
+
"finish"
|
|
36547
|
+
];
|
|
36548
|
+
var advanceableOnboardingStepSchema = external_exports.enum(onboardingStepSequence);
|
|
36549
|
+
var persistedOnboardingStepSchema = external_exports.enum([...onboardingStepSequence, "complete"]);
|
|
36550
|
+
var firstOnboardingStep = onboardingStepSequence[0];
|
|
36551
|
+
|
|
36535
36552
|
// ../../packages/protocol/src/onboarding-setup-preflight.ts
|
|
36536
36553
|
var MAX_ONBOARDING_SETUP_PREFLIGHT_ISSUES = 5e4;
|
|
36537
36554
|
var onboardingSetupPreflightIssueCodeSchema = external_exports.enum([
|
|
@@ -37120,12 +37137,17 @@ var onboardingAttachReferenceOutputSchema = external_exports.object({
|
|
|
37120
37137
|
title: external_exports.string().min(1).nullable()
|
|
37121
37138
|
}).strict();
|
|
37122
37139
|
var onboardingAdvanceStepInputSchema = external_exports.object({
|
|
37123
|
-
|
|
37140
|
+
// DER-2852 round 3: bounded to the canonical sequence. `complete` is excluded
|
|
37141
|
+
// because `onboarding.finish` (confirmation: "human_required") owns that sentinel;
|
|
37142
|
+
// `advance_step` is confirmation: "none" and must not write it.
|
|
37143
|
+
step: advanceableOnboardingStepSchema,
|
|
37124
37144
|
state: external_exports.record(external_exports.string(), external_exports.unknown()).default({}),
|
|
37125
37145
|
completed: external_exports.boolean().default(false)
|
|
37126
37146
|
}).strict();
|
|
37127
37147
|
var onboardingProgressOutputSchema = external_exports.object({
|
|
37128
|
-
|
|
37148
|
+
// DER-2852 round 3: stored rows are canonical steps or the finish-owned
|
|
37149
|
+
// `complete` sentinel (migration 0161). This is the read-side of the same boundary.
|
|
37150
|
+
step: persistedOnboardingStepSchema,
|
|
37129
37151
|
state: external_exports.unknown(),
|
|
37130
37152
|
completed_at: external_exports.string().datetime({ offset: true }).nullable()
|
|
37131
37153
|
}).strict();
|
|
@@ -52405,7 +52427,7 @@ var referenceDocuments = [
|
|
|
52405
52427
|
order: 10,
|
|
52406
52428
|
title: "{{brand}} implementation method",
|
|
52407
52429
|
summary: "The staged operating-system setup path used by humans, CLI sessions, MCP clients, and in-app agents.",
|
|
52408
|
-
version: "2026-07-30.
|
|
52430
|
+
version: "2026-07-30.2",
|
|
52409
52431
|
public: true,
|
|
52410
52432
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
52411
52433
|
stages: ["company_setup", "graph_design", "charter_design", "staffing", "operating_rhythm"],
|
|
@@ -52479,6 +52501,8 @@ var referenceDocuments = [
|
|
|
52479
52501
|
|
|
52480
52502
|
{{brand}} setup is a staged operating-system implementation. The goal is not to mirror a historical org chart. The goal is to make the company legible enough that humans and agents can operate inside the same accountability model.
|
|
52481
52503
|
|
|
52504
|
+
Setup opens with one decision: continue through the guided step rail yourself, or hand the CLI- and MCP-driven implementation off to your own coding agent. Either path drives the same staged implementation below, and provider connections stay human-approved either way \u2014 the choice can change later.
|
|
52505
|
+
|
|
52482
52506
|
## Stage 1: Bring the company into view
|
|
52483
52507
|
|
|
52484
52508
|
Start with the company context that already exists: org charts, team notes, planning docs, process notes, metrics, or a founder transcript. The first output is a rough Compass and a draft Responsibility Graph.
|
|
@@ -52516,6 +52540,8 @@ Durable changes that expand authority require human confirmation.
|
|
|
52516
52540
|
|
|
52517
52541
|
## Stage 5: Run the rhythm
|
|
52518
52542
|
|
|
52543
|
+
Guided setup asks you to set the Sync Brief scope \u2014 one company-wide brief, or one per cluster \u2014 as its own step, scoped against the graph you have built so far. It is not a one-time choice: change it any time in settings. See the Sync rhythm playbook for what the brief compiles.
|
|
52544
|
+
|
|
52519
52545
|
Once the graph is live, run the operating rhythm: Signal tracks measurable health, Friction captures issues, Cascade ties work to goals, and Sync turns the weekly meeting into a decision forum.
|
|
52520
52546
|
|
|
52521
52547
|
The system should surface exceptions before the meeting. Humans should spend Sync time deciding, resolving, and clarifying authority.
|
|
@@ -52585,7 +52611,7 @@ The implementation method is split into stable sections so a CLI, MCP, or in-app
|
|
|
52585
52611
|
order: 12,
|
|
52586
52612
|
title: "Install the {{brand}} implementation Skill",
|
|
52587
52613
|
summary: "Install the public implementation Skill through its signed, verified GitHub release so a general-purpose agent can run the {{brand}} implementation method.",
|
|
52588
|
-
version: "2026-07-30.
|
|
52614
|
+
version: "2026-07-30.2",
|
|
52589
52615
|
public: true,
|
|
52590
52616
|
audiences: ["human", "cli", "mcp", "in_app_agent"],
|
|
52591
52617
|
stages: ["company_setup"],
|
|
@@ -52639,7 +52665,7 @@ A fetched release can never introduce its own trust root. Any key material insid
|
|
|
52639
52665
|
|
|
52640
52666
|
Files are placed under the client's skills directory as \`rost-implementation/\`, plus a \`.rost-skill-release.json\` provenance marker. The marker records source repository, tag, commit, manifest sha256, and signer fingerprint. The agent quotes this marker when reporting which implementation method ran.
|
|
52641
52667
|
|
|
52642
|
-
For Claude Code the directory is \`$CLAUDE_CONFIG_DIR/skills/\` when that variable is set, otherwise \`~/.claude/skills/\` \u2014 \`CLAUDE_CONFIG_DIR\` is the variable Claude Code itself reads.
|
|
52668
|
+
For Claude Code the directory is \`$CLAUDE_CONFIG_DIR/skills/\` when that variable is set, otherwise \`~/.claude/skills/\` \u2014 \`CLAUDE_CONFIG_DIR\` is the variable Claude Code itself reads. If \`CLAUDE_HOME\` is set without \`CLAUDE_CONFIG_DIR\`, the installer fails with a migration instruction (\`Set CLAUDE_CONFIG_DIR=<value> instead, or unset CLAUDE_HOME to install under the default ~/.claude\`); when both variables are set and name different directories, the installer uses \`CLAUDE_CONFIG_DIR\` and prints a notice that \`CLAUDE_HOME\` is ignored (an equivalent spelling prints no notice). For Codex the directory is \`$CODEX_HOME/skills/\`, otherwise \`~/.codex/skills/\`. The installer prints the resolved directory and a line such as \`Claude Code will load this from <path>\` \u2014 check it matches the configuration the client launches with.
|
|
52643
52669
|
|
|
52644
52670
|
## Update path
|
|
52645
52671
|
|
|
@@ -58696,7 +58722,7 @@ var COMMAND_MANIFEST = [
|
|
|
58696
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." },
|
|
58697
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." },
|
|
58698
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." },
|
|
58699
|
-
{ "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": "
|
|
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." },
|
|
58700
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" } },
|
|
58701
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." },
|
|
58702
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." },
|
|
@@ -61863,460 +61889,15 @@ function ensureTrailingSlash2(value) {
|
|
|
61863
61889
|
}
|
|
61864
61890
|
|
|
61865
61891
|
// src/skills.ts
|
|
61866
|
-
import { existsSync, mkdirSync, readFileSync as
|
|
61867
|
-
import os from "node:os";
|
|
61868
|
-
import path4 from "node:path";
|
|
61869
|
-
var UsageError2 = class extends Error {
|
|
61870
|
-
};
|
|
61871
|
-
var CLIENTS = /* @__PURE__ */ new Set(["claude-code", "codex", "cursor"]);
|
|
61872
|
-
function skillsUsage(binName = cliBrand.binName) {
|
|
61873
|
-
return [
|
|
61874
|
-
`${binName} skills list [--json]`,
|
|
61875
|
-
`${binName} skills catalog [--json]`,
|
|
61876
|
-
`${binName} skills get --slug <slug> [--json]`,
|
|
61877
|
-
`${binName} skills file --slug <slug> --path SKILL.md`,
|
|
61878
|
-
`${binName} skills enable rost/<slug> [--json]`,
|
|
61879
|
-
`${binName} skills install <slug-or-rost/slug> [--seat-id <id>] [--client claude-code|codex|cursor] [--version <n>] [--local-only] [--json]`,
|
|
61880
|
-
`${binName} skills install-implementation [--client claude-code|codex|cursor] [--tag <tag>] [--json]`,
|
|
61881
|
-
`${binName} skills sync --seat-id <id> [--client claude-code|codex|cursor] [--json]`,
|
|
61882
|
-
`${binName} skills assign --seat-id <id> (--skill <slug>|--slug <slug>|--skill-version-id <id>) [--approve] [--allow-blocked-proposal] [--json]`,
|
|
61883
|
-
`${binName} skills revoke (--assignment-id <id>|--seat-id <id> --skill <slug>) [--json]`,
|
|
61884
|
-
`${binName} skills publish (--slug <slug>|--skill-version-id <id>) [--allow-warnings] [--json]`
|
|
61885
|
-
].join("\n");
|
|
61886
|
-
}
|
|
61887
|
-
async function runSkills(context, args, env = process.env) {
|
|
61888
|
-
try {
|
|
61889
|
-
const [action, ...rest] = args;
|
|
61890
|
-
if (action === "help" || action === "--help" || action === "-h" || action === void 0) {
|
|
61891
|
-
context.io.stdout.write(`${skillsUsage(context.binName)}
|
|
61892
|
-
`);
|
|
61893
|
-
return action === void 0 ? 1 : 0;
|
|
61894
|
-
}
|
|
61895
|
-
if (action === "list") {
|
|
61896
|
-
return context.run(context.client, "skill.list", {}, void 0);
|
|
61897
|
-
}
|
|
61898
|
-
if (action === "catalog") {
|
|
61899
|
-
const parsed = parseFlags2(rest, /* @__PURE__ */ new Set(["include-unentitled"]));
|
|
61900
|
-
return context.run(context.client, "skill.catalog", {
|
|
61901
|
-
...parsed.flags.has("include-unentitled") ? { include_unentitled: true } : {}
|
|
61902
|
-
}, parsed.json ? void 0 : formatCatalog);
|
|
61903
|
-
}
|
|
61904
|
-
if (action === "get") {
|
|
61905
|
-
const parsed = parseFlags2(rest);
|
|
61906
|
-
return context.run(context.client, "skill.get", { slug: requireValue3(parsed, "slug") }, parsed.json ? void 0 : formatSkillDetail);
|
|
61907
|
-
}
|
|
61908
|
-
if (action === "file") {
|
|
61909
|
-
const parsed = parseFlags2(rest);
|
|
61910
|
-
return context.run(context.client, "skill.file.get", {
|
|
61911
|
-
slug: requireValue3(parsed, "slug"),
|
|
61912
|
-
path: requireValue3(parsed, "path")
|
|
61913
|
-
}, (output) => {
|
|
61914
|
-
const content = asRecord4(output).content;
|
|
61915
|
-
return typeof content === "string" ? content : JSON.stringify(output, null, 2);
|
|
61916
|
-
});
|
|
61917
|
-
}
|
|
61918
|
-
if (action === "enable") {
|
|
61919
|
-
const slug2 = rest[0];
|
|
61920
|
-
if (!slug2 || slug2.startsWith("--")) {
|
|
61921
|
-
throw new UsageError2(`Usage: ${context.binName} skills enable rost/<slug> [--json]`);
|
|
61922
|
-
}
|
|
61923
|
-
const parsed = parseFlags2(rest.slice(1));
|
|
61924
|
-
return context.run(context.client, "skill.enable_catalog", { slug: slug2 }, parsed.json ? void 0 : formatEnable);
|
|
61925
|
-
}
|
|
61926
|
-
if (action === "install") {
|
|
61927
|
-
return installOne(context, rest, env);
|
|
61928
|
-
}
|
|
61929
|
-
if (action === "sync") {
|
|
61930
|
-
return syncAssigned(context, rest, env);
|
|
61931
|
-
}
|
|
61932
|
-
if (action === "assign") {
|
|
61933
|
-
const parsed = parseFlags2(rest, /* @__PURE__ */ new Set(["approve", "allow-blocked-proposal"]));
|
|
61934
|
-
const body = withDefined({
|
|
61935
|
-
seat_id: requireValue3(parsed, "seat-id"),
|
|
61936
|
-
status: parsed.flags.has("approve") ? "approved" : "proposed",
|
|
61937
|
-
rationale: optionalValue2(parsed, "rationale") ?? "Skill selected for this Seat.",
|
|
61938
|
-
allow_blocked_proposal: parsed.flags.has("allow-blocked-proposal")
|
|
61939
|
-
}, {
|
|
61940
|
-
slug: optionalValue2(parsed, "skill") ?? optionalValue2(parsed, "slug"),
|
|
61941
|
-
skill_version_id: optionalValue2(parsed, "skill-version-id")
|
|
61942
|
-
});
|
|
61943
|
-
return context.run(context.client, "skill.assign_to_seat", body, parsed.json ? void 0 : formatAssignment, { targetSeatId: body.seat_id });
|
|
61944
|
-
}
|
|
61945
|
-
if (action === "revoke") {
|
|
61946
|
-
const parsed = parseFlags2(rest);
|
|
61947
|
-
const seatId = optionalValue2(parsed, "seat-id");
|
|
61948
|
-
const body = withDefined({}, {
|
|
61949
|
-
assignment_id: optionalValue2(parsed, "assignment-id"),
|
|
61950
|
-
seat_id: seatId,
|
|
61951
|
-
slug: optionalValue2(parsed, "skill") ?? optionalValue2(parsed, "slug"),
|
|
61952
|
-
skill_version_id: optionalValue2(parsed, "skill-version-id"),
|
|
61953
|
-
rationale: optionalValue2(parsed, "rationale")
|
|
61954
|
-
});
|
|
61955
|
-
return context.run(context.client, "skill.revoke_from_seat", body, parsed.json ? void 0 : formatRevoke, seatId ? { targetSeatId: seatId } : {});
|
|
61956
|
-
}
|
|
61957
|
-
if (action === "publish") {
|
|
61958
|
-
const parsed = parseFlags2(rest, /* @__PURE__ */ new Set(["allow-warnings"]));
|
|
61959
|
-
const body = withDefined({
|
|
61960
|
-
allow_warnings: parsed.flags.has("allow-warnings")
|
|
61961
|
-
}, {
|
|
61962
|
-
slug: optionalValue2(parsed, "slug"),
|
|
61963
|
-
skill_version_id: optionalValue2(parsed, "skill-version-id")
|
|
61964
|
-
});
|
|
61965
|
-
return context.run(context.client, "skill.publish", body, parsed.json ? void 0 : formatPublish);
|
|
61966
|
-
}
|
|
61967
|
-
throw new UsageError2(`Unknown skills action: ${action}`);
|
|
61968
|
-
} catch (error51) {
|
|
61969
|
-
if (error51 instanceof UsageError2) {
|
|
61970
|
-
context.io.stderr.write(`${error51.message}
|
|
61971
|
-
`);
|
|
61972
|
-
return 1;
|
|
61973
|
-
}
|
|
61974
|
-
if (error51 instanceof CommandClientError) {
|
|
61975
|
-
return printCommandError2(context.io, error51);
|
|
61976
|
-
}
|
|
61977
|
-
throw error51;
|
|
61978
|
-
}
|
|
61979
|
-
}
|
|
61980
|
-
async function installOne(context, args, env) {
|
|
61981
|
-
const slug2 = args[0];
|
|
61982
|
-
if (!slug2 || slug2.startsWith("--")) {
|
|
61983
|
-
throw new UsageError2(`Usage: ${context.binName} skills install <slug-or-rost/slug> [--seat-id <id>] [--client claude-code|codex|cursor] [--version <n>] [--local-only] [--json]`);
|
|
61984
|
-
}
|
|
61985
|
-
const parsed = parseFlags2(args.slice(1), /* @__PURE__ */ new Set(["local-only"]));
|
|
61986
|
-
const client = parseClient2(optionalValue2(parsed, "client") ?? "codex");
|
|
61987
|
-
const seatId = optionalValue2(parsed, "seat-id");
|
|
61988
|
-
const body = withDefined({
|
|
61989
|
-
slug: slug2,
|
|
61990
|
-
client,
|
|
61991
|
-
local_only: parsed.flags.has("local-only")
|
|
61992
|
-
}, {
|
|
61993
|
-
seat_id: seatId,
|
|
61994
|
-
version: optionalNumber2(parsed, "version")
|
|
61995
|
-
});
|
|
61996
|
-
const options = seatId ? { targetSeatId: seatId } : {};
|
|
61997
|
-
const output = await executeInstallCommand(context, body, options);
|
|
61998
|
-
const summary = applyLocalSkillChanges(output, client, env, { removeRevoked: false });
|
|
61999
|
-
const outputRecord = asRecord4(output);
|
|
62000
|
-
context.io.stdout.write(parsed.json ? `${JSON.stringify({ ...outputRecord, local: summary }, null, 2)}
|
|
62001
|
-
` : `${formatLocalSummary(summary)}
|
|
62002
|
-
`);
|
|
62003
|
-
return 0;
|
|
62004
|
-
}
|
|
62005
|
-
async function syncAssigned(context, args, env) {
|
|
62006
|
-
const parsed = parseFlags2(args);
|
|
62007
|
-
const seatId = requireValue3(parsed, "seat-id");
|
|
62008
|
-
const client = parseClient2(optionalValue2(parsed, "client") ?? "codex");
|
|
62009
|
-
const output = await executeSkillCommand(context, "skill.sync_local", {
|
|
62010
|
-
seat_id: seatId,
|
|
62011
|
-
client
|
|
62012
|
-
}, { targetSeatId: seatId });
|
|
62013
|
-
const summary = applyLocalSkillChanges(output, client, env, { removeRevoked: true });
|
|
62014
|
-
const outputRecord = asRecord4(output);
|
|
62015
|
-
context.io.stdout.write(parsed.json ? `${JSON.stringify({ ...outputRecord, local: summary }, null, 2)}
|
|
62016
|
-
` : `${formatLocalSummary(summary)}
|
|
62017
|
-
`);
|
|
62018
|
-
return 0;
|
|
62019
|
-
}
|
|
62020
|
-
async function executeInstallCommand(context, body, options) {
|
|
62021
|
-
const slug2 = typeof body.slug === "string" ? body.slug : "";
|
|
62022
|
-
if (slug2.startsWith("rost/") && body.local_only !== true) {
|
|
62023
|
-
try {
|
|
62024
|
-
return await executeSkillCommand(context, "skill.install_local", { ...body, local_only: true }, options);
|
|
62025
|
-
} catch (error51) {
|
|
62026
|
-
if (!isCommandConflict(error51)) {
|
|
62027
|
-
throw error51;
|
|
62028
|
-
}
|
|
62029
|
-
}
|
|
62030
|
-
}
|
|
62031
|
-
return executeSkillCommand(context, "skill.install_local", body, options);
|
|
62032
|
-
}
|
|
62033
|
-
async function executeSkillCommand(context, commandId, body, options = {}) {
|
|
62034
|
-
try {
|
|
62035
|
-
const output = await context.client.execute(commandId, body, options);
|
|
62036
|
-
return output.output;
|
|
62037
|
-
} catch (error51) {
|
|
62038
|
-
const pending = context.io.interactive === true ? pendingConfirmationFromError(error51) : null;
|
|
62039
|
-
if (pending && pending.commandId === commandId) {
|
|
62040
|
-
renderPendingConfirmationGate2(context.io, pending);
|
|
62041
|
-
context.io.stderr.write(`Approving ${pending.commandId} confirmation ${pending.confirmationId} as the interactive CLI user.
|
|
62042
|
-
`);
|
|
62043
|
-
const approved = await context.client.execute("confirmation.approve", { confirmation_id: pending.confirmationId, reviewed: true });
|
|
62044
|
-
return asRecord4(approved.output).output ?? approved.output;
|
|
62045
|
-
}
|
|
62046
|
-
throw error51;
|
|
62047
|
-
}
|
|
62048
|
-
}
|
|
62049
|
-
function applyLocalSkillChanges(output, client, env, options) {
|
|
62050
|
-
const root = installRoot(client, env);
|
|
62051
|
-
const changes = writeInstalls(output, root);
|
|
62052
|
-
if (options.removeRevoked) {
|
|
62053
|
-
changes.push(...removeRevokedInstalls(output, root));
|
|
62054
|
-
}
|
|
62055
|
-
return changes;
|
|
62056
|
-
}
|
|
62057
|
-
function writeInstalls(output, root) {
|
|
62058
|
-
const installs = asArray2(asRecord4(output).installs);
|
|
62059
|
-
return installs.map((entry) => {
|
|
62060
|
-
const install = asRecord4(entry);
|
|
62061
|
-
const slug2 = safeLocalSlug(String(install.slug ?? ""));
|
|
62062
|
-
const metadata = asRecord4(install.metadata);
|
|
62063
|
-
const files = asArray2(install.files).map(asRecord4);
|
|
62064
|
-
const dir = path4.join(root, slug2);
|
|
62065
|
-
const metadataPath = path4.join(dir, ".rost-skill.json");
|
|
62066
|
-
const expectedHash = String(metadata.content_sha256 ?? "");
|
|
62067
|
-
if (existingHash(metadataPath) === expectedHash) {
|
|
62068
|
-
return { slug: slug2, dir, status: "unchanged", files: files.length };
|
|
62069
|
-
}
|
|
62070
|
-
rmSync(dir, { recursive: true, force: true });
|
|
62071
|
-
mkdirSync(dir, { recursive: true });
|
|
62072
|
-
for (const file2 of files) {
|
|
62073
|
-
const relativePath = safeRelativePath(String(file2.path ?? ""));
|
|
62074
|
-
const content = String(file2.content ?? "");
|
|
62075
|
-
const target = path4.join(dir, relativePath);
|
|
62076
|
-
mkdirSync(path4.dirname(target), { recursive: true });
|
|
62077
|
-
writeFileSync(target, content, "utf8");
|
|
62078
|
-
}
|
|
62079
|
-
writeFileSync(metadataPath, `${JSON.stringify(metadata, null, 2)}
|
|
62080
|
-
`, "utf8");
|
|
62081
|
-
return { slug: slug2, dir, status: "installed", files: files.length };
|
|
62082
|
-
});
|
|
62083
|
-
}
|
|
62084
|
-
function removeRevokedInstalls(output, root) {
|
|
62085
|
-
const installs = new Set(asArray2(asRecord4(output).installs).map((entry) => {
|
|
62086
|
-
const slug2 = asRecord4(entry).slug;
|
|
62087
|
-
return typeof slug2 === "string" ? slug2 : "";
|
|
62088
|
-
}));
|
|
62089
|
-
const revoked = asArray2(asRecord4(output).revoked);
|
|
62090
|
-
const changes = [];
|
|
62091
|
-
for (const entry of revoked) {
|
|
62092
|
-
const slug2 = safeLocalSlug(String(asRecord4(entry).slug ?? ""));
|
|
62093
|
-
if (installs.has(slug2)) {
|
|
62094
|
-
continue;
|
|
62095
|
-
}
|
|
62096
|
-
const dir = path4.join(root, slug2);
|
|
62097
|
-
if (!existsSync(dir)) {
|
|
62098
|
-
continue;
|
|
62099
|
-
}
|
|
62100
|
-
rmSync(dir, { recursive: true, force: true });
|
|
62101
|
-
changes.push({ slug: slug2, dir, status: "removed", files: 0 });
|
|
62102
|
-
}
|
|
62103
|
-
return changes;
|
|
62104
|
-
}
|
|
62105
|
-
function installRoot(client, env) {
|
|
62106
|
-
const override = env.ROST_SKILL_INSTALL_ROOT;
|
|
62107
|
-
if (override && override.length > 0) {
|
|
62108
|
-
return path4.resolve(override, client);
|
|
62109
|
-
}
|
|
62110
|
-
if (client === "codex") {
|
|
62111
|
-
return path4.join(env.CODEX_HOME ?? path4.join(os.homedir(), ".codex"), "skills", "rost");
|
|
62112
|
-
}
|
|
62113
|
-
if (client === "claude-code") {
|
|
62114
|
-
return path4.join(env.CLAUDE_HOME ?? path4.join(os.homedir(), ".claude"), "skills", "rost");
|
|
62115
|
-
}
|
|
62116
|
-
return path4.join(os.homedir(), ".cursor", "skills", "rost");
|
|
62117
|
-
}
|
|
62118
|
-
function safeRelativePath(value) {
|
|
62119
|
-
const normalized = value.trim().replaceAll("\\", "/").replace(/^\.\/+/, "");
|
|
62120
|
-
if (!normalized || normalized.startsWith("/") || normalized.includes("//") || normalized.split("/").includes("..")) {
|
|
62121
|
-
throw new UsageError2("Server returned an invalid skill file path.");
|
|
62122
|
-
}
|
|
62123
|
-
return normalized;
|
|
62124
|
-
}
|
|
62125
|
-
function safeLocalSlug(value) {
|
|
62126
|
-
if (!/^[a-z0-9][a-z0-9-]{1,80}$/.test(value)) {
|
|
62127
|
-
throw new UsageError2("Server returned an invalid skill slug.");
|
|
62128
|
-
}
|
|
62129
|
-
return value;
|
|
62130
|
-
}
|
|
62131
|
-
function existingHash(metadataPath) {
|
|
62132
|
-
if (!existsSync(metadataPath)) {
|
|
62133
|
-
return null;
|
|
62134
|
-
}
|
|
62135
|
-
try {
|
|
62136
|
-
const parsed = JSON.parse(readFileSync3(metadataPath, "utf8"));
|
|
62137
|
-
const hash2 = asRecord4(parsed).content_sha256;
|
|
62138
|
-
return typeof hash2 === "string" ? hash2 : null;
|
|
62139
|
-
} catch {
|
|
62140
|
-
return null;
|
|
62141
|
-
}
|
|
62142
|
-
}
|
|
62143
|
-
function parseFlags2(args, booleanFlags = /* @__PURE__ */ new Set()) {
|
|
62144
|
-
const values = /* @__PURE__ */ new Map();
|
|
62145
|
-
const flags = /* @__PURE__ */ new Set();
|
|
62146
|
-
let json2 = false;
|
|
62147
|
-
for (let index = 0; index < args.length; index += 1) {
|
|
62148
|
-
const token = args[index];
|
|
62149
|
-
if (token === void 0) {
|
|
62150
|
-
continue;
|
|
62151
|
-
}
|
|
62152
|
-
if (!token.startsWith("--")) {
|
|
62153
|
-
throw new UsageError2(`Unexpected argument: ${token}`);
|
|
62154
|
-
}
|
|
62155
|
-
const key = token.slice(2);
|
|
62156
|
-
if (key === "json") {
|
|
62157
|
-
json2 = true;
|
|
62158
|
-
continue;
|
|
62159
|
-
}
|
|
62160
|
-
if (booleanFlags.has(key)) {
|
|
62161
|
-
flags.add(key);
|
|
62162
|
-
continue;
|
|
62163
|
-
}
|
|
62164
|
-
const value = args[index + 1];
|
|
62165
|
-
if (value === void 0 || value.startsWith("--")) {
|
|
62166
|
-
flags.add(key);
|
|
62167
|
-
continue;
|
|
62168
|
-
}
|
|
62169
|
-
values.set(key, value);
|
|
62170
|
-
index += 1;
|
|
62171
|
-
}
|
|
62172
|
-
return { json: json2, values, flags };
|
|
62173
|
-
}
|
|
62174
|
-
function requireValue3(parsed, key) {
|
|
62175
|
-
const value = optionalValue2(parsed, key);
|
|
62176
|
-
if (value === void 0) {
|
|
62177
|
-
throw new UsageError2(`Missing required --${key} value.`);
|
|
62178
|
-
}
|
|
62179
|
-
return value;
|
|
62180
|
-
}
|
|
62181
|
-
function optionalValue2(parsed, key) {
|
|
62182
|
-
const value = parsed.values.get(key);
|
|
62183
|
-
return value && value.length > 0 ? value : void 0;
|
|
62184
|
-
}
|
|
62185
|
-
function optionalNumber2(parsed, key) {
|
|
62186
|
-
const value = optionalValue2(parsed, key);
|
|
62187
|
-
if (value === void 0) {
|
|
62188
|
-
return void 0;
|
|
62189
|
-
}
|
|
62190
|
-
const parsedNumber = Number(value);
|
|
62191
|
-
if (!Number.isSafeInteger(parsedNumber) || parsedNumber <= 0) {
|
|
62192
|
-
throw new UsageError2(`--${key} must be a positive integer.`);
|
|
62193
|
-
}
|
|
62194
|
-
return parsedNumber;
|
|
62195
|
-
}
|
|
62196
|
-
function parseClient2(value) {
|
|
62197
|
-
if (!CLIENTS.has(value)) {
|
|
62198
|
-
throw new UsageError2("--client must be claude-code, codex, or cursor.");
|
|
62199
|
-
}
|
|
62200
|
-
return value;
|
|
62201
|
-
}
|
|
62202
|
-
function isCommandConflict(error51) {
|
|
62203
|
-
return error51 instanceof CommandClientError && error51.status === 409;
|
|
62204
|
-
}
|
|
62205
|
-
function withDefined(base, extra) {
|
|
62206
|
-
const next = { ...base };
|
|
62207
|
-
for (const [key, value] of Object.entries(extra)) {
|
|
62208
|
-
if (value !== void 0) {
|
|
62209
|
-
next[key] = value;
|
|
62210
|
-
}
|
|
62211
|
-
}
|
|
62212
|
-
return next;
|
|
62213
|
-
}
|
|
62214
|
-
function asRecord4(value) {
|
|
62215
|
-
return typeof value === "object" && value !== null ? value : {};
|
|
62216
|
-
}
|
|
62217
|
-
function asArray2(value) {
|
|
62218
|
-
return Array.isArray(value) ? value : [];
|
|
62219
|
-
}
|
|
62220
|
-
function formatCatalog(output) {
|
|
62221
|
-
const entries = asArray2(asRecord4(output).catalog);
|
|
62222
|
-
if (entries.length === 0) {
|
|
62223
|
-
return "No ROST catalog skills are available for this tenant.";
|
|
62224
|
-
}
|
|
62225
|
-
return entries.map((entry) => {
|
|
62226
|
-
const record2 = asRecord4(entry);
|
|
62227
|
-
return `${record2.catalog_slug} [${record2.tier}/${record2.entitlement_status}] ${record2.name}`;
|
|
62228
|
-
}).join("\n");
|
|
62229
|
-
}
|
|
62230
|
-
function formatSkillDetail(output) {
|
|
62231
|
-
const skill = asRecord4(asRecord4(output).skill);
|
|
62232
|
-
return `${skill.slug} v${skill.latest_version ?? "\u2014"} [${skill.status}] ${skill.name}
|
|
62233
|
-
${skill.description}`;
|
|
62234
|
-
}
|
|
62235
|
-
function formatEnable(output) {
|
|
62236
|
-
const skill = asRecord4(asRecord4(output).skill);
|
|
62237
|
-
const catalog = asRecord4(asRecord4(output).catalog);
|
|
62238
|
-
return `Enabled ${catalog.catalog_slug} as ${skill.slug} v${skill.version} (${skill.skill_version_id})`;
|
|
62239
|
-
}
|
|
62240
|
-
function formatAssignment(output) {
|
|
62241
|
-
const assignment = asRecord4(asRecord4(output).assignment);
|
|
62242
|
-
return `${assignment.status} ${assignment.slug} for seat ${assignment.seat_id}; sync: ${String(asRecord4(output).local_sync_next_step)}`;
|
|
62243
|
-
}
|
|
62244
|
-
function formatRevoke(output) {
|
|
62245
|
-
const record2 = asRecord4(output);
|
|
62246
|
-
return `Revoked ${record2.slug} for seat ${record2.seat_id}; sync: ${record2.local_sync_next_step}`;
|
|
62247
|
-
}
|
|
62248
|
-
function formatPublish(output) {
|
|
62249
|
-
const skill = asRecord4(asRecord4(output).skill);
|
|
62250
|
-
return `Published ${skill.slug} v${skill.version} (${skill.skill_version_id})`;
|
|
62251
|
-
}
|
|
62252
|
-
function formatLocalSummary(summary) {
|
|
62253
|
-
if (summary.length === 0) {
|
|
62254
|
-
return "No skills to install.";
|
|
62255
|
-
}
|
|
62256
|
-
return summary.map((entry) => `${entry.status} ${entry.slug} -> ${entry.dir} (${entry.files} files)`).join("\n");
|
|
62257
|
-
}
|
|
62258
|
-
function printCommandError2(io, error51) {
|
|
62259
|
-
if (error51.response && !error51.response.ok) {
|
|
62260
|
-
const payload = {
|
|
62261
|
-
code: error51.response.error.code,
|
|
62262
|
-
message: error51.response.error.message,
|
|
62263
|
-
...error51.response.error.details === void 0 ? {} : { details: error51.response.error.details },
|
|
62264
|
-
...error51.response.error.help === void 0 ? {} : { help: error51.response.error.help },
|
|
62265
|
-
...error51.response.requestId === void 0 ? {} : { requestId: error51.response.requestId }
|
|
62266
|
-
};
|
|
62267
|
-
io.stderr.write(`${redactForLog(payload)}
|
|
62268
|
-
`);
|
|
62269
|
-
if (error51.response.error.help !== void 0) {
|
|
62270
|
-
io.stderr.write(`\u2192 try: ${redactForLog(error51.response.error.help)}
|
|
62271
|
-
`);
|
|
62272
|
-
}
|
|
62273
|
-
return error51.status === 409 ? 3 : error51.status >= 400 && error51.status < 500 ? 1 : 2;
|
|
62274
|
-
}
|
|
62275
|
-
io.stderr.write(`${redactForLog(error51.message)}
|
|
62276
|
-
`);
|
|
62277
|
-
return error51.status >= 400 && error51.status < 500 ? 1 : 2;
|
|
62278
|
-
}
|
|
62279
|
-
function pendingConfirmationFromError(error51) {
|
|
62280
|
-
if (!(error51 instanceof CommandClientError) || !error51.response || error51.response.ok || error51.response.error.code !== "COMMAND_CONFIRMATION_REQUIRED") {
|
|
62281
|
-
return null;
|
|
62282
|
-
}
|
|
62283
|
-
const details = asRecord4(error51.response.error.details);
|
|
62284
|
-
const confirmationId = details.confirmationId;
|
|
62285
|
-
const commandId = details.commandId;
|
|
62286
|
-
if (typeof confirmationId !== "string" || confirmationId.length === 0 || typeof commandId !== "string" || commandId.length === 0) {
|
|
62287
|
-
return null;
|
|
62288
|
-
}
|
|
62289
|
-
const summary = typeof details.summary === "string" ? details.summary : void 0;
|
|
62290
|
-
const riskLevel = typeof details.riskLevel === "string" ? details.riskLevel : void 0;
|
|
62291
|
-
return {
|
|
62292
|
-
confirmationId,
|
|
62293
|
-
commandId,
|
|
62294
|
-
...summary === void 0 ? {} : { summary },
|
|
62295
|
-
...riskLevel === void 0 ? {} : { riskLevel },
|
|
62296
|
-
...details.diff === void 0 ? {} : { diff: details.diff }
|
|
62297
|
-
};
|
|
62298
|
-
}
|
|
62299
|
-
function renderPendingConfirmationGate2(io, pending) {
|
|
62300
|
-
if (pending.summary !== void 0) {
|
|
62301
|
-
io.stderr.write(`${redactForLog(pending.summary)}
|
|
62302
|
-
`);
|
|
62303
|
-
}
|
|
62304
|
-
if (pending.riskLevel !== void 0) {
|
|
62305
|
-
io.stderr.write(`Risk level: ${pending.riskLevel}
|
|
62306
|
-
`);
|
|
62307
|
-
}
|
|
62308
|
-
if (pending.diff !== void 0) {
|
|
62309
|
-
io.stderr.write(`Diff:
|
|
62310
|
-
${redactForLog(pending.diff)}
|
|
62311
|
-
`);
|
|
62312
|
-
}
|
|
62313
|
-
}
|
|
62314
|
-
|
|
62315
|
-
// src/skill-install.ts
|
|
62316
|
-
import { lstatSync, mkdirSync as mkdirSync2, readdirSync, readFileSync as readFileSync4, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
61892
|
+
import { existsSync, mkdirSync as mkdirSync2, readFileSync as readFileSync4, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
62317
61893
|
import os2 from "node:os";
|
|
62318
61894
|
import path5 from "node:path";
|
|
62319
61895
|
|
|
61896
|
+
// src/skill-install.ts
|
|
61897
|
+
import { closeSync, constants, fstatSync, lstatSync, mkdirSync, openSync, readdirSync, readFileSync as readFileSync3, readSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
61898
|
+
import os from "node:os";
|
|
61899
|
+
import path4 from "node:path";
|
|
61900
|
+
|
|
62320
61901
|
// src/skill-trust.ts
|
|
62321
61902
|
import { createHash as createHash2, createPublicKey, verify } from "node:crypto";
|
|
62322
61903
|
var TRUSTED_SIGNER_PUBLIC_KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOXSsKe/zFjaoAdZdvP/esPoeM1fsCGFmxv0INDlCxaW rost-implementation-skill-release";
|
|
@@ -62535,7 +62116,7 @@ function verifyTagSignature(payload, signatureArmored, trustedPublicKeyLine = TR
|
|
|
62535
62116
|
}
|
|
62536
62117
|
return { ok: true, reason: "Verified" };
|
|
62537
62118
|
}
|
|
62538
|
-
function
|
|
62119
|
+
function safeRelativePath(value) {
|
|
62539
62120
|
if (value.includes("\\")) {
|
|
62540
62121
|
throw new SkillTrustError("Manifest file path is not a safe relative path");
|
|
62541
62122
|
}
|
|
@@ -62629,7 +62210,7 @@ function verifyReleaseManifest(manifest, options) {
|
|
|
62629
62210
|
}
|
|
62630
62211
|
let files;
|
|
62631
62212
|
try {
|
|
62632
|
-
files = parsed.files.map((file2) => ({ ...file2, path:
|
|
62213
|
+
files = parsed.files.map((file2) => ({ ...file2, path: safeRelativePath(file2.path) }));
|
|
62633
62214
|
} catch (error51) {
|
|
62634
62215
|
const message = error51 instanceof Error ? error51.message : "Invalid path";
|
|
62635
62216
|
return { ok: false, reason: message };
|
|
@@ -62639,13 +62220,13 @@ function verifyReleaseManifest(manifest, options) {
|
|
|
62639
62220
|
function verifyFileChecksums(files, manifest) {
|
|
62640
62221
|
const manifestMap = /* @__PURE__ */ new Map();
|
|
62641
62222
|
for (const file2 of manifest.files) {
|
|
62642
|
-
manifestMap.set(
|
|
62223
|
+
manifestMap.set(safeRelativePath(file2.path), file2.sha256);
|
|
62643
62224
|
}
|
|
62644
62225
|
const seen = /* @__PURE__ */ new Set();
|
|
62645
62226
|
for (const file2 of files) {
|
|
62646
62227
|
let normalized;
|
|
62647
62228
|
try {
|
|
62648
|
-
normalized =
|
|
62229
|
+
normalized = safeRelativePath(file2.path);
|
|
62649
62230
|
} catch (error51) {
|
|
62650
62231
|
const message = error51 instanceof Error ? error51.message : "Invalid path";
|
|
62651
62232
|
return { ok: false, reason: message };
|
|
@@ -62731,13 +62312,14 @@ function verifyReleaseTrust(input) {
|
|
|
62731
62312
|
}
|
|
62732
62313
|
|
|
62733
62314
|
// src/skill-install.ts
|
|
62734
|
-
var
|
|
62315
|
+
var UsageError2 = class extends Error {
|
|
62735
62316
|
};
|
|
62317
|
+
var O_NOFOLLOW_FLAG = typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0;
|
|
62736
62318
|
function writeErrorLine(io, message) {
|
|
62737
62319
|
io.stderr.write(`${terminalSafe(message)}
|
|
62738
62320
|
`);
|
|
62739
62321
|
}
|
|
62740
|
-
var
|
|
62322
|
+
var CLIENTS = /* @__PURE__ */ new Set(["claude-code", "codex", "cursor"]);
|
|
62741
62323
|
var REPO_PATH = `${RELEASE_REPOSITORY.owner}/${RELEASE_REPOSITORY.name}`;
|
|
62742
62324
|
var GITHUB_JSON_HEADERS = { "User-Agent": "rost-cli", "Accept": "application/vnd.github+json" };
|
|
62743
62325
|
var GITHUB_RAW_HEADERS = { "User-Agent": "rost-cli", "Accept": "application/vnd.github.raw+json" };
|
|
@@ -62824,11 +62406,12 @@ async function runInstallImplementation(context, args) {
|
|
|
62824
62406
|
let client;
|
|
62825
62407
|
let tag;
|
|
62826
62408
|
try {
|
|
62827
|
-
parsed =
|
|
62828
|
-
client =
|
|
62829
|
-
tag =
|
|
62409
|
+
parsed = parseFlags2(args);
|
|
62410
|
+
client = parseClient2(optionalValue2(parsed, "client") ?? "codex");
|
|
62411
|
+
tag = optionalValue2(parsed, "tag") ?? DEFAULT_RELEASE_TAG;
|
|
62412
|
+
installRoot(client, context.env);
|
|
62830
62413
|
} catch (error51) {
|
|
62831
|
-
if (error51 instanceof
|
|
62414
|
+
if (error51 instanceof UsageError2) {
|
|
62832
62415
|
writeErrorLine(context.io, error51.message);
|
|
62833
62416
|
return 1;
|
|
62834
62417
|
}
|
|
@@ -62991,10 +62574,11 @@ async function installRelease(context, plan, testOverrides = {}) {
|
|
|
62991
62574
|
}
|
|
62992
62575
|
let root;
|
|
62993
62576
|
let legacyNotice;
|
|
62577
|
+
let viaOverride;
|
|
62994
62578
|
try {
|
|
62995
|
-
({ root, legacyNotice } =
|
|
62579
|
+
({ root, legacyNotice, viaOverride } = installRoot(plan.client, context.env));
|
|
62996
62580
|
} catch (error51) {
|
|
62997
|
-
if (error51 instanceof
|
|
62581
|
+
if (error51 instanceof UsageError2) {
|
|
62998
62582
|
writeErrorLine(context.io, error51.message);
|
|
62999
62583
|
return 1;
|
|
63000
62584
|
}
|
|
@@ -63003,7 +62587,7 @@ async function installRelease(context, plan, testOverrides = {}) {
|
|
|
63003
62587
|
if (legacyNotice !== null) {
|
|
63004
62588
|
writeErrorLine(context.io, legacyNotice);
|
|
63005
62589
|
}
|
|
63006
|
-
const dir =
|
|
62590
|
+
const dir = path4.join(root, SKILL_INSTALL_DIR_NAME);
|
|
63007
62591
|
const manifestSha256 = sha256Hex(plan.manifestRaw);
|
|
63008
62592
|
const existingMarker = readMarker(dir);
|
|
63009
62593
|
const installedState = existingMarker?.manifestSha256 === manifestSha256 ? verifyInstalledTree(dir, manifest) : null;
|
|
@@ -63027,28 +62611,31 @@ async function installRelease(context, plan, testOverrides = {}) {
|
|
|
63027
62611
|
})}
|
|
63028
62612
|
`
|
|
63029
62613
|
);
|
|
62614
|
+
writeErrorLine(context.io, clientLoadLine(plan.client, dir, viaOverride));
|
|
63030
62615
|
} else {
|
|
63031
62616
|
context.io.stdout.write(
|
|
63032
|
-
`
|
|
62617
|
+
`unchanged rost-implementation ${plan.tag} (${commitSha.slice(0, 7)}) -> ${humanPath(dir)} (${plan.files.length} files)
|
|
63033
62618
|
`
|
|
63034
62619
|
);
|
|
62620
|
+
context.io.stdout.write(`${clientLoadLine(plan.client, dir, viaOverride)}
|
|
62621
|
+
`);
|
|
63035
62622
|
context.io.stdout.write(`${verifiedSignerLine()}
|
|
63036
62623
|
`);
|
|
63037
62624
|
}
|
|
63038
62625
|
return 0;
|
|
63039
62626
|
}
|
|
63040
|
-
|
|
63041
|
-
|
|
62627
|
+
rmSync(dir, { recursive: true, force: true });
|
|
62628
|
+
mkdirSync(dir, { recursive: true });
|
|
63042
62629
|
for (const file2 of plan.files) {
|
|
63043
|
-
const target =
|
|
63044
|
-
const resolvedTarget =
|
|
63045
|
-
const resolvedDir =
|
|
63046
|
-
if (!resolvedTarget.startsWith(`${resolvedDir}${
|
|
62630
|
+
const target = path4.join(dir, file2.path);
|
|
62631
|
+
const resolvedTarget = path4.resolve(target);
|
|
62632
|
+
const resolvedDir = path4.resolve(dir);
|
|
62633
|
+
if (!resolvedTarget.startsWith(`${resolvedDir}${path4.sep}`)) {
|
|
63047
62634
|
writeErrorLine(context.io, `Refusing to write file outside target directory: ${file2.path}`);
|
|
63048
62635
|
return 1;
|
|
63049
62636
|
}
|
|
63050
|
-
|
|
63051
|
-
|
|
62637
|
+
mkdirSync(path4.dirname(target), { recursive: true });
|
|
62638
|
+
writeFileSync(target, file2.content, "utf8");
|
|
63052
62639
|
}
|
|
63053
62640
|
const writtenState = verifyInstalledTree(dir, manifest);
|
|
63054
62641
|
if (!writtenState.ok) {
|
|
@@ -63071,11 +62658,14 @@ async function installRelease(context, plan, testOverrides = {}) {
|
|
|
63071
62658
|
})}
|
|
63072
62659
|
`
|
|
63073
62660
|
);
|
|
62661
|
+
writeErrorLine(context.io, clientLoadLine(plan.client, dir, viaOverride));
|
|
63074
62662
|
} else {
|
|
63075
62663
|
context.io.stdout.write(
|
|
63076
|
-
`installed rost-implementation ${plan.tag} (${commitSha.slice(0, 7)}) -> ${dir} (${plan.files.length} files)
|
|
62664
|
+
`installed rost-implementation ${plan.tag} (${commitSha.slice(0, 7)}) -> ${humanPath(dir)} (${plan.files.length} files)
|
|
63077
62665
|
`
|
|
63078
62666
|
);
|
|
62667
|
+
context.io.stdout.write(`${clientLoadLine(plan.client, dir, viaOverride)}
|
|
62668
|
+
`);
|
|
63079
62669
|
context.io.stdout.write(`${verifiedSignerLine()}
|
|
63080
62670
|
`);
|
|
63081
62671
|
}
|
|
@@ -63086,6 +62676,23 @@ function verifiedSignerLine() {
|
|
|
63086
62676
|
const fingerprintBase = TRUSTED_SIGNER_FINGERPRINT.replace("SHA256:", "");
|
|
63087
62677
|
return `verified signed release; signer SHA256:${fingerprintBase.slice(-12)} (last 12 chars)`;
|
|
63088
62678
|
}
|
|
62679
|
+
function clientDisplay(client) {
|
|
62680
|
+
if (client === "claude-code") return "Claude Code";
|
|
62681
|
+
if (client === "codex") return "Codex";
|
|
62682
|
+
return "Cursor";
|
|
62683
|
+
}
|
|
62684
|
+
function humanPath(dir) {
|
|
62685
|
+
if (terminalSafe(dir) === dir) {
|
|
62686
|
+
return dir;
|
|
62687
|
+
}
|
|
62688
|
+
return JSON.stringify(dir).replace(/[\x7f-\x9f]/gu, (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`);
|
|
62689
|
+
}
|
|
62690
|
+
function clientLoadLine(client, dir, viaOverride) {
|
|
62691
|
+
if (viaOverride) {
|
|
62692
|
+
return `ROST_SKILL_INSTALL_ROOT chose ${humanPath(dir)} \u2014 ${clientDisplay(client)} loads from its own root, which may differ`;
|
|
62693
|
+
}
|
|
62694
|
+
return `${clientDisplay(client)} will load this from ${humanPath(dir)}`;
|
|
62695
|
+
}
|
|
63089
62696
|
function writeMarker(dir, input) {
|
|
63090
62697
|
const marker = {
|
|
63091
62698
|
source: `github.com/${REPO_PATH}`,
|
|
@@ -63097,7 +62704,7 @@ function writeMarker(dir, input) {
|
|
|
63097
62704
|
// operator's evidence that the pre-launch re-run actually happened.
|
|
63098
62705
|
installedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
63099
62706
|
};
|
|
63100
|
-
|
|
62707
|
+
writeFileSync(path4.join(dir, SKILL_MARKER_FILE), `${JSON.stringify(marker, null, 2)}
|
|
63101
62708
|
`, "utf8");
|
|
63102
62709
|
}
|
|
63103
62710
|
function listInstalledFiles(dir) {
|
|
@@ -63105,7 +62712,7 @@ function listInstalledFiles(dir) {
|
|
|
63105
62712
|
const walk = (current, prefix) => {
|
|
63106
62713
|
for (const name of readdirSync(current)) {
|
|
63107
62714
|
const relative = prefix === "" ? name : `${prefix}/${name}`;
|
|
63108
|
-
const absolute =
|
|
62715
|
+
const absolute = path4.join(current, name);
|
|
63109
62716
|
const stats = lstatSync(absolute);
|
|
63110
62717
|
if (stats.isSymbolicLink() || !stats.isFile() && !stats.isDirectory()) {
|
|
63111
62718
|
throw new Error(`refusing to verify a symlink or special file: ${relative}`);
|
|
@@ -63117,7 +62724,7 @@ function listInstalledFiles(dir) {
|
|
|
63117
62724
|
if (relative === SKILL_MARKER_FILE) {
|
|
63118
62725
|
continue;
|
|
63119
62726
|
}
|
|
63120
|
-
files.push({ path: relative, absolute });
|
|
62727
|
+
files.push({ path: relative, absolute, dev: stats.dev, ino: stats.ino });
|
|
63121
62728
|
}
|
|
63122
62729
|
};
|
|
63123
62730
|
walk(dir, "");
|
|
@@ -63138,9 +62745,43 @@ function verifyInstalledTree(dir, manifest) {
|
|
|
63138
62745
|
if (present.length !== manifestPaths.size) {
|
|
63139
62746
|
return { ok: false, reason: "the installed tree is missing files listed in the signed manifest" };
|
|
63140
62747
|
}
|
|
62748
|
+
for (const file2 of present) {
|
|
62749
|
+
try {
|
|
62750
|
+
if (statSync(file2.absolute).size > MAX_RESPONSE_BYTES) {
|
|
62751
|
+
return { ok: false, reason: `an installed file exceeds the ${MAX_RESPONSE_BYTES}-byte verification cap: ${file2.path}` };
|
|
62752
|
+
}
|
|
62753
|
+
} catch (error51) {
|
|
62754
|
+
return { ok: false, reason: error51 instanceof Error ? error51.message : "an installed file is unreadable" };
|
|
62755
|
+
}
|
|
62756
|
+
}
|
|
63141
62757
|
function* readEach() {
|
|
63142
62758
|
for (const file2 of present) {
|
|
63143
|
-
|
|
62759
|
+
const fd = openSync(file2.absolute, constants.O_RDONLY | O_NOFOLLOW_FLAG);
|
|
62760
|
+
try {
|
|
62761
|
+
const opened = fstatSync(fd);
|
|
62762
|
+
if (opened.dev !== file2.dev || opened.ino !== file2.ino) {
|
|
62763
|
+
throw new Error(`an installed file changed between enumeration and verification: ${file2.path}`);
|
|
62764
|
+
}
|
|
62765
|
+
const size = opened.size;
|
|
62766
|
+
if (size > MAX_RESPONSE_BYTES) {
|
|
62767
|
+
throw new Error(`an installed file exceeds the ${MAX_RESPONSE_BYTES}-byte verification cap: ${file2.path}`);
|
|
62768
|
+
}
|
|
62769
|
+
const buffer = Buffer.alloc(size + 1);
|
|
62770
|
+
let bytesRead = 0;
|
|
62771
|
+
while (bytesRead < buffer.length) {
|
|
62772
|
+
const chunk = readSync(fd, buffer, bytesRead, buffer.length - bytesRead, null);
|
|
62773
|
+
if (chunk === 0) {
|
|
62774
|
+
break;
|
|
62775
|
+
}
|
|
62776
|
+
bytesRead += chunk;
|
|
62777
|
+
}
|
|
62778
|
+
if (bytesRead > MAX_RESPONSE_BYTES) {
|
|
62779
|
+
throw new Error(`an installed file exceeds the ${MAX_RESPONSE_BYTES}-byte verification cap: ${file2.path}`);
|
|
62780
|
+
}
|
|
62781
|
+
yield { path: file2.path, content: buffer.subarray(0, bytesRead) };
|
|
62782
|
+
} finally {
|
|
62783
|
+
closeSync(fd);
|
|
62784
|
+
}
|
|
63144
62785
|
}
|
|
63145
62786
|
}
|
|
63146
62787
|
try {
|
|
@@ -63151,7 +62792,7 @@ function verifyInstalledTree(dir, manifest) {
|
|
|
63151
62792
|
}
|
|
63152
62793
|
function readMarker(dir) {
|
|
63153
62794
|
try {
|
|
63154
|
-
const content =
|
|
62795
|
+
const content = readFileSync3(path4.join(dir, SKILL_MARKER_FILE), "utf8");
|
|
63155
62796
|
const parsed = JSON.parse(content);
|
|
63156
62797
|
if (typeof parsed === "object" && parsed !== null) {
|
|
63157
62798
|
return parsed;
|
|
@@ -63164,44 +62805,62 @@ function resolveClaudeSkillInstallRoot(env) {
|
|
|
63164
62805
|
const configDir = requireNonBlank("CLAUDE_CONFIG_DIR", env.CLAUDE_CONFIG_DIR);
|
|
63165
62806
|
const legacyHome = requireNonBlank("CLAUDE_HOME", env.CLAUDE_HOME);
|
|
63166
62807
|
if (configDir !== null) {
|
|
63167
|
-
const disagrees = legacyHome !== null &&
|
|
62808
|
+
const disagrees = legacyHome !== null && path4.resolve(legacyHome) !== path4.resolve(configDir);
|
|
63168
62809
|
return {
|
|
63169
|
-
root:
|
|
63170
|
-
legacyNotice: disagrees ? `NOTICE: CLAUDE_HOME (${legacyHome}) is ignored; Claude Code reads CLAUDE_CONFIG_DIR (${configDir}).` : null
|
|
62810
|
+
root: path4.resolve(path4.join(configDir, "skills")),
|
|
62811
|
+
legacyNotice: disagrees ? `NOTICE: CLAUDE_HOME (${humanPath(legacyHome)}) is ignored; Claude Code reads CLAUDE_CONFIG_DIR (${humanPath(configDir)}).` : null
|
|
63171
62812
|
};
|
|
63172
62813
|
}
|
|
63173
62814
|
if (legacyHome !== null) {
|
|
63174
|
-
|
|
63175
|
-
|
|
63176
|
-
|
|
63177
|
-
};
|
|
62815
|
+
throw new UsageError2(
|
|
62816
|
+
`CLAUDE_HOME (${humanPath(legacyHome)}) is set, but Claude Code does not read it \u2014 the Skill would install where Claude Code never loads it. Set CLAUDE_CONFIG_DIR=${humanPath(legacyHome)} instead, or unset CLAUDE_HOME to install under the default ~/.claude.`
|
|
62817
|
+
);
|
|
63178
62818
|
}
|
|
63179
|
-
const home =
|
|
63180
|
-
return { root:
|
|
62819
|
+
const home = resolveHome(env);
|
|
62820
|
+
return { root: path4.resolve(path4.join(home, ".claude", "skills")), legacyNotice: null };
|
|
63181
62821
|
}
|
|
63182
62822
|
function requireNonBlank(name, value) {
|
|
63183
62823
|
if (value === void 0 || value === "") {
|
|
63184
62824
|
return null;
|
|
63185
62825
|
}
|
|
63186
62826
|
if (value.trim().length === 0) {
|
|
63187
|
-
throw new
|
|
62827
|
+
throw new UsageError2(`${name} is set to a blank value; unset it or give it a real path.`);
|
|
63188
62828
|
}
|
|
63189
62829
|
return value;
|
|
63190
62830
|
}
|
|
63191
|
-
function
|
|
62831
|
+
function resolveHome(env) {
|
|
62832
|
+
const explicit = requireNonBlank("HOME", env.HOME);
|
|
62833
|
+
if (explicit !== null) {
|
|
62834
|
+
return explicit;
|
|
62835
|
+
}
|
|
62836
|
+
let osHome = "";
|
|
62837
|
+
try {
|
|
62838
|
+
osHome = os.userInfo().homedir;
|
|
62839
|
+
} catch {
|
|
62840
|
+
}
|
|
62841
|
+
if (osHome.trim().length === 0) {
|
|
62842
|
+
throw new UsageError2("HOME is unset or blank and the OS reports no home directory for this user; set HOME to a real path.");
|
|
62843
|
+
}
|
|
62844
|
+
return osHome;
|
|
62845
|
+
}
|
|
62846
|
+
function resolveCodexSkillsRoot(env) {
|
|
62847
|
+
const codexHome = requireNonBlank("CODEX_HOME", env.CODEX_HOME);
|
|
62848
|
+
return path4.resolve(path4.join(codexHome ?? path4.join(resolveHome(env), ".codex"), "skills"));
|
|
62849
|
+
}
|
|
62850
|
+
function installRoot(client, env) {
|
|
63192
62851
|
const override = requireNonBlank("ROST_SKILL_INSTALL_ROOT", env.ROST_SKILL_INSTALL_ROOT);
|
|
63193
62852
|
if (override !== null) {
|
|
63194
|
-
return { root:
|
|
62853
|
+
return { root: path4.resolve(override, client), legacyNotice: null, viaOverride: true };
|
|
63195
62854
|
}
|
|
63196
62855
|
if (client === "codex") {
|
|
63197
|
-
return { root:
|
|
62856
|
+
return { root: resolveCodexSkillsRoot(env), legacyNotice: null, viaOverride: false };
|
|
63198
62857
|
}
|
|
63199
62858
|
if (client === "claude-code") {
|
|
63200
|
-
return resolveClaudeSkillInstallRoot(env);
|
|
62859
|
+
return { ...resolveClaudeSkillInstallRoot(env), viaOverride: false };
|
|
63201
62860
|
}
|
|
63202
|
-
return { root:
|
|
62861
|
+
return { root: path4.resolve(path4.join(resolveHome(env), ".cursor", "skills")), legacyNotice: null, viaOverride: false };
|
|
63203
62862
|
}
|
|
63204
|
-
function
|
|
62863
|
+
function parseFlags2(args) {
|
|
63205
62864
|
const values = /* @__PURE__ */ new Map();
|
|
63206
62865
|
const flags = /* @__PURE__ */ new Set();
|
|
63207
62866
|
let json2 = false;
|
|
@@ -63211,7 +62870,7 @@ function parseFlags3(args) {
|
|
|
63211
62870
|
continue;
|
|
63212
62871
|
}
|
|
63213
62872
|
if (!token.startsWith("--")) {
|
|
63214
|
-
throw new
|
|
62873
|
+
throw new UsageError2(`Unexpected argument: ${token}`);
|
|
63215
62874
|
}
|
|
63216
62875
|
const key = token.slice(2);
|
|
63217
62876
|
if (key === "json") {
|
|
@@ -63221,26 +62880,480 @@ function parseFlags3(args) {
|
|
|
63221
62880
|
if (key === "client" || key === "tag") {
|
|
63222
62881
|
const value = args[index + 1];
|
|
63223
62882
|
if (value === void 0 || value.startsWith("--")) {
|
|
63224
|
-
throw new
|
|
62883
|
+
throw new UsageError2(`--${key} requires a value.`);
|
|
63225
62884
|
}
|
|
63226
62885
|
values.set(key, value);
|
|
63227
62886
|
index += 1;
|
|
63228
62887
|
continue;
|
|
63229
62888
|
}
|
|
63230
|
-
throw new
|
|
62889
|
+
throw new UsageError2(`Unexpected flag: --${key}`);
|
|
63231
62890
|
}
|
|
63232
62891
|
return { json: json2, values, flags };
|
|
63233
62892
|
}
|
|
63234
|
-
function
|
|
62893
|
+
function optionalValue2(parsed, key) {
|
|
63235
62894
|
const value = parsed.values.get(key);
|
|
63236
62895
|
return value !== void 0 && value.length > 0 ? value : void 0;
|
|
63237
62896
|
}
|
|
62897
|
+
function parseClient2(value) {
|
|
62898
|
+
if (!CLIENTS.has(value)) {
|
|
62899
|
+
throw new UsageError2("--client must be claude-code, codex, or cursor.");
|
|
62900
|
+
}
|
|
62901
|
+
return value;
|
|
62902
|
+
}
|
|
62903
|
+
|
|
62904
|
+
// src/skills.ts
|
|
62905
|
+
var UsageError3 = class extends Error {
|
|
62906
|
+
};
|
|
62907
|
+
var CLIENTS2 = /* @__PURE__ */ new Set(["claude-code", "codex", "cursor"]);
|
|
62908
|
+
function skillsUsage(binName = cliBrand.binName) {
|
|
62909
|
+
return [
|
|
62910
|
+
`${binName} skills list [--json]`,
|
|
62911
|
+
`${binName} skills catalog [--json]`,
|
|
62912
|
+
`${binName} skills get --slug <slug> [--json]`,
|
|
62913
|
+
`${binName} skills file --slug <slug> --path SKILL.md`,
|
|
62914
|
+
`${binName} skills enable rost/<slug> [--json]`,
|
|
62915
|
+
`${binName} skills install <slug-or-rost/slug> [--seat-id <id>] [--client claude-code|codex|cursor] [--version <n>] [--local-only] [--json]`,
|
|
62916
|
+
`${binName} skills install-implementation [--client claude-code|codex|cursor] [--tag <tag>] [--json]`,
|
|
62917
|
+
`${binName} skills sync --seat-id <id> [--client claude-code|codex|cursor] [--json]`,
|
|
62918
|
+
`${binName} skills assign --seat-id <id> (--skill <slug>|--slug <slug>|--skill-version-id <id>) [--approve] [--allow-blocked-proposal] [--json]`,
|
|
62919
|
+
`${binName} skills revoke (--assignment-id <id>|--seat-id <id> --skill <slug>) [--json]`,
|
|
62920
|
+
`${binName} skills publish (--slug <slug>|--skill-version-id <id>) [--allow-warnings] [--json]`
|
|
62921
|
+
].join("\n");
|
|
62922
|
+
}
|
|
62923
|
+
async function runSkills(context, args, env = process.env) {
|
|
62924
|
+
try {
|
|
62925
|
+
const [action, ...rest] = args;
|
|
62926
|
+
if (action === "help" || action === "--help" || action === "-h" || action === void 0) {
|
|
62927
|
+
context.io.stdout.write(`${skillsUsage(context.binName)}
|
|
62928
|
+
`);
|
|
62929
|
+
return action === void 0 ? 1 : 0;
|
|
62930
|
+
}
|
|
62931
|
+
if (action === "list") {
|
|
62932
|
+
return context.run(context.client, "skill.list", {}, void 0);
|
|
62933
|
+
}
|
|
62934
|
+
if (action === "catalog") {
|
|
62935
|
+
const parsed = parseFlags3(rest, /* @__PURE__ */ new Set(["include-unentitled"]));
|
|
62936
|
+
return context.run(context.client, "skill.catalog", {
|
|
62937
|
+
...parsed.flags.has("include-unentitled") ? { include_unentitled: true } : {}
|
|
62938
|
+
}, parsed.json ? void 0 : formatCatalog);
|
|
62939
|
+
}
|
|
62940
|
+
if (action === "get") {
|
|
62941
|
+
const parsed = parseFlags3(rest);
|
|
62942
|
+
return context.run(context.client, "skill.get", { slug: requireValue3(parsed, "slug") }, parsed.json ? void 0 : formatSkillDetail);
|
|
62943
|
+
}
|
|
62944
|
+
if (action === "file") {
|
|
62945
|
+
const parsed = parseFlags3(rest);
|
|
62946
|
+
return context.run(context.client, "skill.file.get", {
|
|
62947
|
+
slug: requireValue3(parsed, "slug"),
|
|
62948
|
+
path: requireValue3(parsed, "path")
|
|
62949
|
+
}, (output) => {
|
|
62950
|
+
const content = asRecord4(output).content;
|
|
62951
|
+
return typeof content === "string" ? content : JSON.stringify(output, null, 2);
|
|
62952
|
+
});
|
|
62953
|
+
}
|
|
62954
|
+
if (action === "enable") {
|
|
62955
|
+
const slug2 = rest[0];
|
|
62956
|
+
if (!slug2 || slug2.startsWith("--")) {
|
|
62957
|
+
throw new UsageError3(`Usage: ${context.binName} skills enable rost/<slug> [--json]`);
|
|
62958
|
+
}
|
|
62959
|
+
const parsed = parseFlags3(rest.slice(1));
|
|
62960
|
+
return context.run(context.client, "skill.enable_catalog", { slug: slug2 }, parsed.json ? void 0 : formatEnable);
|
|
62961
|
+
}
|
|
62962
|
+
if (action === "install") {
|
|
62963
|
+
return await installOne(context, rest, env);
|
|
62964
|
+
}
|
|
62965
|
+
if (action === "sync") {
|
|
62966
|
+
return await syncAssigned(context, rest, env);
|
|
62967
|
+
}
|
|
62968
|
+
if (action === "assign") {
|
|
62969
|
+
const parsed = parseFlags3(rest, /* @__PURE__ */ new Set(["approve", "allow-blocked-proposal"]));
|
|
62970
|
+
const body = withDefined({
|
|
62971
|
+
seat_id: requireValue3(parsed, "seat-id"),
|
|
62972
|
+
status: parsed.flags.has("approve") ? "approved" : "proposed",
|
|
62973
|
+
rationale: optionalValue3(parsed, "rationale") ?? "Skill selected for this Seat.",
|
|
62974
|
+
allow_blocked_proposal: parsed.flags.has("allow-blocked-proposal")
|
|
62975
|
+
}, {
|
|
62976
|
+
slug: optionalValue3(parsed, "skill") ?? optionalValue3(parsed, "slug"),
|
|
62977
|
+
skill_version_id: optionalValue3(parsed, "skill-version-id")
|
|
62978
|
+
});
|
|
62979
|
+
return context.run(context.client, "skill.assign_to_seat", body, parsed.json ? void 0 : formatAssignment, { targetSeatId: body.seat_id });
|
|
62980
|
+
}
|
|
62981
|
+
if (action === "revoke") {
|
|
62982
|
+
const parsed = parseFlags3(rest);
|
|
62983
|
+
const seatId = optionalValue3(parsed, "seat-id");
|
|
62984
|
+
const body = withDefined({}, {
|
|
62985
|
+
assignment_id: optionalValue3(parsed, "assignment-id"),
|
|
62986
|
+
seat_id: seatId,
|
|
62987
|
+
slug: optionalValue3(parsed, "skill") ?? optionalValue3(parsed, "slug"),
|
|
62988
|
+
skill_version_id: optionalValue3(parsed, "skill-version-id"),
|
|
62989
|
+
rationale: optionalValue3(parsed, "rationale")
|
|
62990
|
+
});
|
|
62991
|
+
return context.run(context.client, "skill.revoke_from_seat", body, parsed.json ? void 0 : formatRevoke, seatId ? { targetSeatId: seatId } : {});
|
|
62992
|
+
}
|
|
62993
|
+
if (action === "publish") {
|
|
62994
|
+
const parsed = parseFlags3(rest, /* @__PURE__ */ new Set(["allow-warnings"]));
|
|
62995
|
+
const body = withDefined({
|
|
62996
|
+
allow_warnings: parsed.flags.has("allow-warnings")
|
|
62997
|
+
}, {
|
|
62998
|
+
slug: optionalValue3(parsed, "slug"),
|
|
62999
|
+
skill_version_id: optionalValue3(parsed, "skill-version-id")
|
|
63000
|
+
});
|
|
63001
|
+
return context.run(context.client, "skill.publish", body, parsed.json ? void 0 : formatPublish);
|
|
63002
|
+
}
|
|
63003
|
+
throw new UsageError3(`Unknown skills action: ${action}`);
|
|
63004
|
+
} catch (error51) {
|
|
63005
|
+
if (error51 instanceof UsageError3) {
|
|
63006
|
+
context.io.stderr.write(`${error51.message}
|
|
63007
|
+
`);
|
|
63008
|
+
return 1;
|
|
63009
|
+
}
|
|
63010
|
+
if (error51 instanceof CommandClientError) {
|
|
63011
|
+
return printCommandError2(context.io, error51);
|
|
63012
|
+
}
|
|
63013
|
+
throw error51;
|
|
63014
|
+
}
|
|
63015
|
+
}
|
|
63016
|
+
async function installOne(context, args, env) {
|
|
63017
|
+
const slug2 = args[0];
|
|
63018
|
+
if (!slug2 || slug2.startsWith("--")) {
|
|
63019
|
+
throw new UsageError3(`Usage: ${context.binName} skills install <slug-or-rost/slug> [--seat-id <id>] [--client claude-code|codex|cursor] [--version <n>] [--local-only] [--json]`);
|
|
63020
|
+
}
|
|
63021
|
+
const parsed = parseFlags3(args.slice(1), /* @__PURE__ */ new Set(["local-only"]));
|
|
63022
|
+
const client = parseClient3(optionalValue3(parsed, "client") ?? "codex");
|
|
63023
|
+
const seatId = optionalValue3(parsed, "seat-id");
|
|
63024
|
+
const body = withDefined({
|
|
63025
|
+
slug: slug2,
|
|
63026
|
+
client,
|
|
63027
|
+
local_only: parsed.flags.has("local-only")
|
|
63028
|
+
}, {
|
|
63029
|
+
seat_id: seatId,
|
|
63030
|
+
version: optionalNumber2(parsed, "version")
|
|
63031
|
+
});
|
|
63032
|
+
const options = seatId ? { targetSeatId: seatId } : {};
|
|
63033
|
+
const output = await executeInstallCommand(context, body, options);
|
|
63034
|
+
const summary = applyLocalSkillChanges(output, client, env, { removeRevoked: false });
|
|
63035
|
+
const outputRecord = asRecord4(output);
|
|
63036
|
+
context.io.stdout.write(parsed.json ? `${JSON.stringify({ ...outputRecord, local: summary }, null, 2)}
|
|
63037
|
+
` : `${formatLocalSummary(summary)}
|
|
63038
|
+
`);
|
|
63039
|
+
return 0;
|
|
63040
|
+
}
|
|
63041
|
+
async function syncAssigned(context, args, env) {
|
|
63042
|
+
const parsed = parseFlags3(args);
|
|
63043
|
+
const seatId = requireValue3(parsed, "seat-id");
|
|
63044
|
+
const client = parseClient3(optionalValue3(parsed, "client") ?? "codex");
|
|
63045
|
+
const output = await executeSkillCommand(context, "skill.sync_local", {
|
|
63046
|
+
seat_id: seatId,
|
|
63047
|
+
client
|
|
63048
|
+
}, { targetSeatId: seatId });
|
|
63049
|
+
const summary = applyLocalSkillChanges(output, client, env, { removeRevoked: true });
|
|
63050
|
+
const outputRecord = asRecord4(output);
|
|
63051
|
+
context.io.stdout.write(parsed.json ? `${JSON.stringify({ ...outputRecord, local: summary }, null, 2)}
|
|
63052
|
+
` : `${formatLocalSummary(summary)}
|
|
63053
|
+
`);
|
|
63054
|
+
return 0;
|
|
63055
|
+
}
|
|
63056
|
+
async function executeInstallCommand(context, body, options) {
|
|
63057
|
+
const slug2 = typeof body.slug === "string" ? body.slug : "";
|
|
63058
|
+
if (slug2.startsWith("rost/") && body.local_only !== true) {
|
|
63059
|
+
try {
|
|
63060
|
+
return await executeSkillCommand(context, "skill.install_local", { ...body, local_only: true }, options);
|
|
63061
|
+
} catch (error51) {
|
|
63062
|
+
if (!isCommandConflict(error51)) {
|
|
63063
|
+
throw error51;
|
|
63064
|
+
}
|
|
63065
|
+
}
|
|
63066
|
+
}
|
|
63067
|
+
return executeSkillCommand(context, "skill.install_local", body, options);
|
|
63068
|
+
}
|
|
63069
|
+
async function executeSkillCommand(context, commandId, body, options = {}) {
|
|
63070
|
+
try {
|
|
63071
|
+
const output = await context.client.execute(commandId, body, options);
|
|
63072
|
+
return output.output;
|
|
63073
|
+
} catch (error51) {
|
|
63074
|
+
const pending = context.io.interactive === true ? pendingConfirmationFromError(error51) : null;
|
|
63075
|
+
if (pending && pending.commandId === commandId) {
|
|
63076
|
+
renderPendingConfirmationGate2(context.io, pending);
|
|
63077
|
+
context.io.stderr.write(`Approving ${pending.commandId} confirmation ${pending.confirmationId} as the interactive CLI user.
|
|
63078
|
+
`);
|
|
63079
|
+
const approved = await context.client.execute("confirmation.approve", { confirmation_id: pending.confirmationId, reviewed: true });
|
|
63080
|
+
return asRecord4(approved.output).output ?? approved.output;
|
|
63081
|
+
}
|
|
63082
|
+
throw error51;
|
|
63083
|
+
}
|
|
63084
|
+
}
|
|
63085
|
+
function applyLocalSkillChanges(output, client, env, options) {
|
|
63086
|
+
const root = installRoot2(client, env);
|
|
63087
|
+
const changes = writeInstalls(output, root);
|
|
63088
|
+
if (options.removeRevoked) {
|
|
63089
|
+
changes.push(...removeRevokedInstalls(output, root));
|
|
63090
|
+
}
|
|
63091
|
+
return changes;
|
|
63092
|
+
}
|
|
63093
|
+
function writeInstalls(output, root) {
|
|
63094
|
+
const installs = asArray2(asRecord4(output).installs);
|
|
63095
|
+
return installs.map((entry) => {
|
|
63096
|
+
const install = asRecord4(entry);
|
|
63097
|
+
const slug2 = safeLocalSlug(String(install.slug ?? ""));
|
|
63098
|
+
const metadata = asRecord4(install.metadata);
|
|
63099
|
+
const files = asArray2(install.files).map(asRecord4);
|
|
63100
|
+
const dir = path5.join(root, slug2);
|
|
63101
|
+
const metadataPath = path5.join(dir, ".rost-skill.json");
|
|
63102
|
+
const expectedHash = String(metadata.content_sha256 ?? "");
|
|
63103
|
+
if (existingHash(metadataPath) === expectedHash) {
|
|
63104
|
+
return { slug: slug2, dir, status: "unchanged", files: files.length };
|
|
63105
|
+
}
|
|
63106
|
+
rmSync2(dir, { recursive: true, force: true });
|
|
63107
|
+
mkdirSync2(dir, { recursive: true });
|
|
63108
|
+
for (const file2 of files) {
|
|
63109
|
+
const relativePath = safeRelativePath2(String(file2.path ?? ""));
|
|
63110
|
+
const content = String(file2.content ?? "");
|
|
63111
|
+
const target = path5.join(dir, relativePath);
|
|
63112
|
+
mkdirSync2(path5.dirname(target), { recursive: true });
|
|
63113
|
+
writeFileSync2(target, content, "utf8");
|
|
63114
|
+
}
|
|
63115
|
+
writeFileSync2(metadataPath, `${JSON.stringify(metadata, null, 2)}
|
|
63116
|
+
`, "utf8");
|
|
63117
|
+
return { slug: slug2, dir, status: "installed", files: files.length };
|
|
63118
|
+
});
|
|
63119
|
+
}
|
|
63120
|
+
function removeRevokedInstalls(output, root) {
|
|
63121
|
+
const installs = new Set(asArray2(asRecord4(output).installs).map((entry) => {
|
|
63122
|
+
const slug2 = asRecord4(entry).slug;
|
|
63123
|
+
return typeof slug2 === "string" ? slug2 : "";
|
|
63124
|
+
}));
|
|
63125
|
+
const revoked = asArray2(asRecord4(output).revoked);
|
|
63126
|
+
const changes = [];
|
|
63127
|
+
for (const entry of revoked) {
|
|
63128
|
+
const slug2 = safeLocalSlug(String(asRecord4(entry).slug ?? ""));
|
|
63129
|
+
if (installs.has(slug2)) {
|
|
63130
|
+
continue;
|
|
63131
|
+
}
|
|
63132
|
+
const dir = path5.join(root, slug2);
|
|
63133
|
+
if (!existsSync(dir)) {
|
|
63134
|
+
continue;
|
|
63135
|
+
}
|
|
63136
|
+
rmSync2(dir, { recursive: true, force: true });
|
|
63137
|
+
changes.push({ slug: slug2, dir, status: "removed", files: 0 });
|
|
63138
|
+
}
|
|
63139
|
+
return changes;
|
|
63140
|
+
}
|
|
63141
|
+
function installRoot2(client, env) {
|
|
63142
|
+
const override = env.ROST_SKILL_INSTALL_ROOT;
|
|
63143
|
+
if (override && override.length > 0) {
|
|
63144
|
+
return path5.resolve(override, client);
|
|
63145
|
+
}
|
|
63146
|
+
if (client === "codex") {
|
|
63147
|
+
try {
|
|
63148
|
+
return path5.join(resolveCodexSkillsRoot(env), "rost");
|
|
63149
|
+
} catch (error51) {
|
|
63150
|
+
if (error51 instanceof UsageError2) {
|
|
63151
|
+
throw new UsageError3(error51.message);
|
|
63152
|
+
}
|
|
63153
|
+
throw error51;
|
|
63154
|
+
}
|
|
63155
|
+
}
|
|
63156
|
+
if (client === "claude-code") {
|
|
63157
|
+
return path5.join(env.CLAUDE_HOME ?? path5.join(os2.homedir(), ".claude"), "skills", "rost");
|
|
63158
|
+
}
|
|
63159
|
+
return path5.join(os2.homedir(), ".cursor", "skills", "rost");
|
|
63160
|
+
}
|
|
63161
|
+
function safeRelativePath2(value) {
|
|
63162
|
+
const normalized = value.trim().replaceAll("\\", "/").replace(/^\.\/+/, "");
|
|
63163
|
+
if (!normalized || normalized.startsWith("/") || normalized.includes("//") || normalized.split("/").includes("..")) {
|
|
63164
|
+
throw new UsageError3("Server returned an invalid skill file path.");
|
|
63165
|
+
}
|
|
63166
|
+
return normalized;
|
|
63167
|
+
}
|
|
63168
|
+
function safeLocalSlug(value) {
|
|
63169
|
+
if (!/^[a-z0-9][a-z0-9-]{1,80}$/.test(value)) {
|
|
63170
|
+
throw new UsageError3("Server returned an invalid skill slug.");
|
|
63171
|
+
}
|
|
63172
|
+
return value;
|
|
63173
|
+
}
|
|
63174
|
+
function existingHash(metadataPath) {
|
|
63175
|
+
if (!existsSync(metadataPath)) {
|
|
63176
|
+
return null;
|
|
63177
|
+
}
|
|
63178
|
+
try {
|
|
63179
|
+
const parsed = JSON.parse(readFileSync4(metadataPath, "utf8"));
|
|
63180
|
+
const hash2 = asRecord4(parsed).content_sha256;
|
|
63181
|
+
return typeof hash2 === "string" ? hash2 : null;
|
|
63182
|
+
} catch {
|
|
63183
|
+
return null;
|
|
63184
|
+
}
|
|
63185
|
+
}
|
|
63186
|
+
function parseFlags3(args, booleanFlags = /* @__PURE__ */ new Set()) {
|
|
63187
|
+
const values = /* @__PURE__ */ new Map();
|
|
63188
|
+
const flags = /* @__PURE__ */ new Set();
|
|
63189
|
+
let json2 = false;
|
|
63190
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
63191
|
+
const token = args[index];
|
|
63192
|
+
if (token === void 0) {
|
|
63193
|
+
continue;
|
|
63194
|
+
}
|
|
63195
|
+
if (!token.startsWith("--")) {
|
|
63196
|
+
throw new UsageError3(`Unexpected argument: ${token}`);
|
|
63197
|
+
}
|
|
63198
|
+
const key = token.slice(2);
|
|
63199
|
+
if (key === "json") {
|
|
63200
|
+
json2 = true;
|
|
63201
|
+
continue;
|
|
63202
|
+
}
|
|
63203
|
+
if (booleanFlags.has(key)) {
|
|
63204
|
+
flags.add(key);
|
|
63205
|
+
continue;
|
|
63206
|
+
}
|
|
63207
|
+
const value = args[index + 1];
|
|
63208
|
+
if (value === void 0 || value.startsWith("--")) {
|
|
63209
|
+
flags.add(key);
|
|
63210
|
+
continue;
|
|
63211
|
+
}
|
|
63212
|
+
values.set(key, value);
|
|
63213
|
+
index += 1;
|
|
63214
|
+
}
|
|
63215
|
+
return { json: json2, values, flags };
|
|
63216
|
+
}
|
|
63217
|
+
function requireValue3(parsed, key) {
|
|
63218
|
+
const value = optionalValue3(parsed, key);
|
|
63219
|
+
if (value === void 0) {
|
|
63220
|
+
throw new UsageError3(`Missing required --${key} value.`);
|
|
63221
|
+
}
|
|
63222
|
+
return value;
|
|
63223
|
+
}
|
|
63224
|
+
function optionalValue3(parsed, key) {
|
|
63225
|
+
const value = parsed.values.get(key);
|
|
63226
|
+
return value && value.length > 0 ? value : void 0;
|
|
63227
|
+
}
|
|
63228
|
+
function optionalNumber2(parsed, key) {
|
|
63229
|
+
const value = optionalValue3(parsed, key);
|
|
63230
|
+
if (value === void 0) {
|
|
63231
|
+
return void 0;
|
|
63232
|
+
}
|
|
63233
|
+
const parsedNumber = Number(value);
|
|
63234
|
+
if (!Number.isSafeInteger(parsedNumber) || parsedNumber <= 0) {
|
|
63235
|
+
throw new UsageError3(`--${key} must be a positive integer.`);
|
|
63236
|
+
}
|
|
63237
|
+
return parsedNumber;
|
|
63238
|
+
}
|
|
63238
63239
|
function parseClient3(value) {
|
|
63239
63240
|
if (!CLIENTS2.has(value)) {
|
|
63240
63241
|
throw new UsageError3("--client must be claude-code, codex, or cursor.");
|
|
63241
63242
|
}
|
|
63242
63243
|
return value;
|
|
63243
63244
|
}
|
|
63245
|
+
function isCommandConflict(error51) {
|
|
63246
|
+
return error51 instanceof CommandClientError && error51.status === 409;
|
|
63247
|
+
}
|
|
63248
|
+
function withDefined(base, extra) {
|
|
63249
|
+
const next = { ...base };
|
|
63250
|
+
for (const [key, value] of Object.entries(extra)) {
|
|
63251
|
+
if (value !== void 0) {
|
|
63252
|
+
next[key] = value;
|
|
63253
|
+
}
|
|
63254
|
+
}
|
|
63255
|
+
return next;
|
|
63256
|
+
}
|
|
63257
|
+
function asRecord4(value) {
|
|
63258
|
+
return typeof value === "object" && value !== null ? value : {};
|
|
63259
|
+
}
|
|
63260
|
+
function asArray2(value) {
|
|
63261
|
+
return Array.isArray(value) ? value : [];
|
|
63262
|
+
}
|
|
63263
|
+
function formatCatalog(output) {
|
|
63264
|
+
const entries = asArray2(asRecord4(output).catalog);
|
|
63265
|
+
if (entries.length === 0) {
|
|
63266
|
+
return "No ROST catalog skills are available for this tenant.";
|
|
63267
|
+
}
|
|
63268
|
+
return entries.map((entry) => {
|
|
63269
|
+
const record2 = asRecord4(entry);
|
|
63270
|
+
return `${record2.catalog_slug} [${record2.tier}/${record2.entitlement_status}] ${record2.name}`;
|
|
63271
|
+
}).join("\n");
|
|
63272
|
+
}
|
|
63273
|
+
function formatSkillDetail(output) {
|
|
63274
|
+
const skill = asRecord4(asRecord4(output).skill);
|
|
63275
|
+
return `${skill.slug} v${skill.latest_version ?? "\u2014"} [${skill.status}] ${skill.name}
|
|
63276
|
+
${skill.description}`;
|
|
63277
|
+
}
|
|
63278
|
+
function formatEnable(output) {
|
|
63279
|
+
const skill = asRecord4(asRecord4(output).skill);
|
|
63280
|
+
const catalog = asRecord4(asRecord4(output).catalog);
|
|
63281
|
+
return `Enabled ${catalog.catalog_slug} as ${skill.slug} v${skill.version} (${skill.skill_version_id})`;
|
|
63282
|
+
}
|
|
63283
|
+
function formatAssignment(output) {
|
|
63284
|
+
const assignment = asRecord4(asRecord4(output).assignment);
|
|
63285
|
+
return `${assignment.status} ${assignment.slug} for seat ${assignment.seat_id}; sync: ${String(asRecord4(output).local_sync_next_step)}`;
|
|
63286
|
+
}
|
|
63287
|
+
function formatRevoke(output) {
|
|
63288
|
+
const record2 = asRecord4(output);
|
|
63289
|
+
return `Revoked ${record2.slug} for seat ${record2.seat_id}; sync: ${record2.local_sync_next_step}`;
|
|
63290
|
+
}
|
|
63291
|
+
function formatPublish(output) {
|
|
63292
|
+
const skill = asRecord4(asRecord4(output).skill);
|
|
63293
|
+
return `Published ${skill.slug} v${skill.version} (${skill.skill_version_id})`;
|
|
63294
|
+
}
|
|
63295
|
+
function formatLocalSummary(summary) {
|
|
63296
|
+
if (summary.length === 0) {
|
|
63297
|
+
return "No skills to install.";
|
|
63298
|
+
}
|
|
63299
|
+
return summary.map((entry) => `${entry.status} ${entry.slug} -> ${entry.dir} (${entry.files} files)`).join("\n");
|
|
63300
|
+
}
|
|
63301
|
+
function printCommandError2(io, error51) {
|
|
63302
|
+
if (error51.response && !error51.response.ok) {
|
|
63303
|
+
const payload = {
|
|
63304
|
+
code: error51.response.error.code,
|
|
63305
|
+
message: error51.response.error.message,
|
|
63306
|
+
...error51.response.error.details === void 0 ? {} : { details: error51.response.error.details },
|
|
63307
|
+
...error51.response.error.help === void 0 ? {} : { help: error51.response.error.help },
|
|
63308
|
+
...error51.response.requestId === void 0 ? {} : { requestId: error51.response.requestId }
|
|
63309
|
+
};
|
|
63310
|
+
io.stderr.write(`${redactForLog(payload)}
|
|
63311
|
+
`);
|
|
63312
|
+
if (error51.response.error.help !== void 0) {
|
|
63313
|
+
io.stderr.write(`\u2192 try: ${redactForLog(error51.response.error.help)}
|
|
63314
|
+
`);
|
|
63315
|
+
}
|
|
63316
|
+
return error51.status === 409 ? 3 : error51.status >= 400 && error51.status < 500 ? 1 : 2;
|
|
63317
|
+
}
|
|
63318
|
+
io.stderr.write(`${redactForLog(error51.message)}
|
|
63319
|
+
`);
|
|
63320
|
+
return error51.status >= 400 && error51.status < 500 ? 1 : 2;
|
|
63321
|
+
}
|
|
63322
|
+
function pendingConfirmationFromError(error51) {
|
|
63323
|
+
if (!(error51 instanceof CommandClientError) || !error51.response || error51.response.ok || error51.response.error.code !== "COMMAND_CONFIRMATION_REQUIRED") {
|
|
63324
|
+
return null;
|
|
63325
|
+
}
|
|
63326
|
+
const details = asRecord4(error51.response.error.details);
|
|
63327
|
+
const confirmationId = details.confirmationId;
|
|
63328
|
+
const commandId = details.commandId;
|
|
63329
|
+
if (typeof confirmationId !== "string" || confirmationId.length === 0 || typeof commandId !== "string" || commandId.length === 0) {
|
|
63330
|
+
return null;
|
|
63331
|
+
}
|
|
63332
|
+
const summary = typeof details.summary === "string" ? details.summary : void 0;
|
|
63333
|
+
const riskLevel = typeof details.riskLevel === "string" ? details.riskLevel : void 0;
|
|
63334
|
+
return {
|
|
63335
|
+
confirmationId,
|
|
63336
|
+
commandId,
|
|
63337
|
+
...summary === void 0 ? {} : { summary },
|
|
63338
|
+
...riskLevel === void 0 ? {} : { riskLevel },
|
|
63339
|
+
...details.diff === void 0 ? {} : { diff: details.diff }
|
|
63340
|
+
};
|
|
63341
|
+
}
|
|
63342
|
+
function renderPendingConfirmationGate2(io, pending) {
|
|
63343
|
+
if (pending.summary !== void 0) {
|
|
63344
|
+
io.stderr.write(`${redactForLog(pending.summary)}
|
|
63345
|
+
`);
|
|
63346
|
+
}
|
|
63347
|
+
if (pending.riskLevel !== void 0) {
|
|
63348
|
+
io.stderr.write(`Risk level: ${pending.riskLevel}
|
|
63349
|
+
`);
|
|
63350
|
+
}
|
|
63351
|
+
if (pending.diff !== void 0) {
|
|
63352
|
+
io.stderr.write(`Diff:
|
|
63353
|
+
${redactForLog(pending.diff)}
|
|
63354
|
+
`);
|
|
63355
|
+
}
|
|
63356
|
+
}
|
|
63244
63357
|
|
|
63245
63358
|
// src/doctor.ts
|
|
63246
63359
|
import { execFile as execFileCallback3 } from "node:child_process";
|