@skrr-ai/cli 0.1.109 → 0.1.111
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/bin/run.js +15 -1
- package/dist/base-command.d.ts +44 -1
- package/dist/base-command.js +194 -33
- package/dist/commands/actions/list.js +2 -1
- package/dist/commands/agenda/trigger/create.js +1 -1
- package/dist/commands/agenda/trigger/list.js +2 -1
- package/dist/commands/agent-groups/list.js +2 -1
- package/dist/commands/agents/actions/list.js +2 -1
- package/dist/commands/agents/always-on/status.js +5 -0
- package/dist/commands/agents/chat.js +4 -1
- package/dist/commands/agents/duplicate.js +4 -0
- package/dist/commands/agents/eval/list.js +2 -1
- package/dist/commands/agents/files/list.js +2 -1
- package/dist/commands/agents/folders/list.js +2 -1
- package/dist/commands/agents/goals/list.js +2 -1
- package/dist/commands/agents/intuitions/list.js +8 -5
- package/dist/commands/agents/list.d.ts +12 -0
- package/dist/commands/agents/list.js +45 -8
- package/dist/commands/agents/releases/known-issues/list.js +2 -1
- package/dist/commands/agents/releases/list.js +5 -1
- package/dist/commands/agents/releases/trusted-publishers/list.js +2 -1
- package/dist/commands/agents/roles/list.js +2 -1
- package/dist/commands/agents/skills/list.js +2 -1
- package/dist/commands/agents/todos/list.js +2 -1
- package/dist/commands/agents/triggers/create.js +1 -1
- package/dist/commands/agents/triggers/list.js +2 -1
- package/dist/commands/agents/triggers/update.js +1 -1
- package/dist/commands/agents/update.d.ts +11 -0
- package/dist/commands/agents/update.js +58 -2
- package/dist/commands/api-keys/list.js +2 -1
- package/dist/commands/apps/channel.d.ts +20 -0
- package/dist/commands/apps/channel.js +64 -0
- package/dist/commands/apps/check-draft.d.ts +12 -0
- package/dist/commands/apps/check-draft.js +41 -0
- package/dist/commands/apps/check.d.ts +42 -0
- package/dist/commands/apps/check.js +91 -0
- package/dist/commands/apps/create.d.ts +15 -0
- package/dist/commands/apps/create.js +59 -0
- package/dist/commands/apps/data/put.d.ts +18 -0
- package/dist/commands/apps/data/put.js +72 -0
- package/dist/commands/apps/data/query.d.ts +20 -0
- package/dist/commands/apps/data/query.js +88 -0
- package/dist/commands/apps/disclosure.d.ts +16 -0
- package/dist/commands/apps/disclosure.js +71 -0
- package/dist/commands/apps/file/cat.d.ts +15 -0
- package/dist/commands/apps/file/cat.js +50 -0
- package/dist/commands/apps/file/ls.d.ts +13 -0
- package/dist/commands/apps/file/ls.js +47 -0
- package/dist/commands/apps/file/mv.d.ts +15 -0
- package/dist/commands/apps/file/mv.js +49 -0
- package/dist/commands/apps/file/rm.d.ts +15 -0
- package/dist/commands/apps/file/rm.js +53 -0
- package/dist/commands/apps/file/write.d.ts +17 -0
- package/dist/commands/apps/file/write.js +81 -0
- package/dist/commands/apps/install.d.ts +19 -0
- package/dist/commands/apps/install.js +136 -0
- package/dist/commands/apps/installations/list.d.ts +11 -0
- package/dist/commands/apps/installations/list.js +49 -0
- package/dist/commands/apps/installations/show.d.ts +12 -0
- package/dist/commands/apps/installations/show.js +61 -0
- package/dist/commands/apps/layout/set.d.ts +11 -0
- package/dist/commands/apps/layout/set.js +125 -0
- package/dist/commands/apps/layout/show.d.ts +9 -0
- package/dist/commands/apps/layout/show.js +33 -0
- package/dist/commands/apps/list.d.ts +10 -0
- package/dist/commands/apps/list.js +45 -0
- package/dist/commands/apps/logs.d.ts +13 -0
- package/dist/commands/apps/logs.js +55 -0
- package/dist/commands/apps/preview.d.ts +12 -0
- package/dist/commands/apps/preview.js +39 -0
- package/dist/commands/apps/publish/propose.d.ts +14 -0
- package/dist/commands/apps/publish/propose.js +45 -0
- package/dist/commands/apps/pull.d.ts +14 -0
- package/dist/commands/apps/pull.js +56 -0
- package/dist/commands/apps/push.d.ts +15 -0
- package/dist/commands/apps/push.js +75 -0
- package/dist/commands/apps/reconsent.d.ts +13 -0
- package/dist/commands/apps/reconsent.js +67 -0
- package/dist/commands/apps/report.d.ts +20 -0
- package/dist/commands/apps/report.js +63 -0
- package/dist/commands/apps/resume.d.ts +12 -0
- package/dist/commands/apps/resume.js +36 -0
- package/dist/commands/apps/settings/set.d.ts +13 -0
- package/dist/commands/apps/settings/set.js +54 -0
- package/dist/commands/apps/settings/show.d.ts +11 -0
- package/dist/commands/apps/settings/show.js +31 -0
- package/dist/commands/apps/show.d.ts +12 -0
- package/dist/commands/apps/show.js +49 -0
- package/dist/commands/apps/suspend.d.ts +12 -0
- package/dist/commands/apps/suspend.js +35 -0
- package/dist/commands/apps/uninstall.d.ts +13 -0
- package/dist/commands/apps/uninstall.js +43 -0
- package/dist/commands/apps/upgrade.d.ts +14 -0
- package/dist/commands/apps/upgrade.js +49 -0
- package/dist/commands/apps/version/create.d.ts +14 -0
- package/dist/commands/apps/version/create.js +53 -0
- package/dist/commands/apps/version/show.d.ts +12 -0
- package/dist/commands/apps/version/show.js +39 -0
- package/dist/commands/apps/versions.d.ts +12 -0
- package/dist/commands/apps/versions.js +40 -0
- package/dist/commands/apps/webhooks/list.d.ts +12 -0
- package/dist/commands/apps/webhooks/list.js +47 -0
- package/dist/commands/characters/list.js +2 -1
- package/dist/commands/chats/files/list.js +2 -1
- package/dist/commands/chats/folders/list.js +2 -1
- package/dist/commands/chats/list.js +2 -1
- package/dist/commands/chats/spaces/list.js +2 -1
- package/dist/commands/chats/widgets/list.js +2 -1
- package/dist/commands/code/jobs/list.js +4 -1
- package/dist/commands/commerce/incidents/list.js +2 -1
- package/dist/commands/commitments/accounting.js +3 -0
- package/dist/commands/commitments/action-proposals.d.ts +8 -0
- package/dist/commands/commitments/action-proposals.js +17 -2
- package/dist/commands/commitments/cost.d.ts +11 -0
- package/dist/commands/commitments/cost.js +25 -0
- package/dist/commands/commitments/create.js +6 -1
- package/dist/commands/commitments/endpoints/list.js +2 -1
- package/dist/commands/commitments/links/list.js +2 -1
- package/dist/commands/commitments/list.js +2 -1
- package/dist/commands/commitments/liveness.d.ts +30 -0
- package/dist/commands/commitments/liveness.js +22 -5
- package/dist/commands/commitments/pack/list.js +2 -1
- package/dist/commands/commitments/preflight.js +6 -2
- package/dist/commands/commitments/update.js +10 -1
- package/dist/commands/compass/list.js +2 -1
- package/dist/commands/context.js +7 -1
- package/dist/commands/convos/list.js +3 -2
- package/dist/commands/daemon/install.js +17 -1
- package/dist/commands/daemon/login.js +14 -0
- package/dist/commands/dm/list.js +2 -1
- package/dist/commands/dm/work.d.ts +19 -0
- package/dist/commands/dm/work.js +54 -0
- package/dist/commands/feeds/list.js +2 -1
- package/dist/commands/followups/list.js +2 -1
- package/dist/commands/followups/plans/cancel.d.ts +13 -0
- package/dist/commands/followups/plans/cancel.js +26 -0
- package/dist/commands/followups/plans/create.d.ts +11 -0
- package/dist/commands/followups/plans/create.js +35 -0
- package/dist/commands/followups/plans/list.d.ts +13 -0
- package/dist/commands/followups/plans/list.js +50 -0
- package/dist/commands/followups/plans/observability.d.ts +11 -0
- package/dist/commands/followups/plans/observability.js +46 -0
- package/dist/commands/followups/plans/revise.d.ts +13 -0
- package/dist/commands/followups/plans/revise.js +35 -0
- package/dist/commands/followups/plans/show.d.ts +11 -0
- package/dist/commands/followups/plans/show.js +32 -0
- package/dist/commands/goals/key-results/list.js +2 -1
- package/dist/commands/goals/labels/list.js +3 -2
- package/dist/commands/goals/list.js +3 -2
- package/dist/commands/grants/list.js +2 -1
- package/dist/commands/harnesses/grants/list.js +2 -1
- package/dist/commands/harnesses/leases/list.js +2 -1
- package/dist/commands/harnesses/list.js +10 -1
- package/dist/commands/harnesses/prune.d.ts +26 -0
- package/dist/commands/harnesses/prune.js +172 -0
- package/dist/commands/ingress/list.js +2 -1
- package/dist/commands/initiatives/list.js +2 -1
- package/dist/commands/instruction-blocks/list.js +2 -1
- package/dist/commands/instructions/list.js +2 -1
- package/dist/commands/integrations/connections/list.js +2 -1
- package/dist/commands/integrations/tools/list.js +2 -1
- package/dist/commands/labels/list.js +3 -2
- package/dist/commands/learning/adapters.d.ts +16 -0
- package/dist/commands/learning/adapters.js +44 -0
- package/dist/commands/login.js +11 -0
- package/dist/commands/machines/dedicated/list.js +2 -1
- package/dist/commands/machines/hosted/list.js +2 -1
- package/dist/commands/machines/list.js +2 -1
- package/dist/commands/machines/show.js +5 -2
- package/dist/commands/measures/list.js +2 -1
- package/dist/commands/memory/list.js +2 -1
- package/dist/commands/memory/proposals/list.js +2 -1
- package/dist/commands/memory/stores/list.js +2 -1
- package/dist/commands/memory/topics/list.js +2 -1
- package/dist/commands/memory/versions/list.js +2 -1
- package/dist/commands/messages/list.js +2 -1
- package/dist/commands/northstars/intents/list.js +2 -1
- package/dist/commands/northstars/list.js +2 -1
- package/dist/commands/northstars/recommendations/list.js +2 -1
- package/dist/commands/outbox/list.js +2 -1
- package/dist/commands/profiles/list.js +2 -1
- package/dist/commands/projects/docs/list.js +8 -1
- package/dist/commands/projects/updates/list.js +2 -1
- package/dist/commands/proposals/list.js +2 -1
- package/dist/commands/requests/comments/list.js +2 -1
- package/dist/commands/requests/list.js +2 -1
- package/dist/commands/shares/list.js +2 -1
- package/dist/commands/shortcuts/list.js +2 -1
- package/dist/commands/signals/monitors/list.js +2 -1
- package/dist/commands/signals/schemas/list.js +2 -1
- package/dist/commands/signals/sources/list.js +2 -1
- package/dist/commands/space-directory-views/list.js +2 -1
- package/dist/commands/spaces/actions/list.js +4 -3
- package/dist/commands/spaces/briefs/list.js +2 -1
- package/dist/commands/spaces/cycles/list.js +2 -1
- package/dist/commands/spaces/files/folders/list.js +2 -1
- package/dist/commands/spaces/files/list.js +3 -2
- package/dist/commands/spaces/heartbeats/list.js +3 -2
- package/dist/commands/spaces/labels/list.js +3 -2
- package/dist/commands/spaces/list.d.ts +3 -18
- package/dist/commands/spaces/list.js +28 -35
- package/dist/commands/spaces/live/cards/list.js +2 -1
- package/dist/commands/spaces/members/list.d.ts +1 -0
- package/dist/commands/spaces/members/list.js +4 -1
- package/dist/commands/spaces/show.js +2 -2
- package/dist/commands/spaces/skills/list.js +6 -2
- package/dist/commands/spaces/states/list.js +2 -1
- package/dist/commands/spaces/views/list.js +2 -1
- package/dist/commands/spaces/widgets/list.js +3 -2
- package/dist/commands/spaces/workflow-templates/list.js +2 -1
- package/dist/commands/spaces/workflows/fixtures/list.js +2 -1
- package/dist/commands/spaces/workflows/list.js +3 -2
- package/dist/commands/spaces/workflows/proposals/list.js +2 -1
- package/dist/commands/spaces/workflows/start.js +3 -1
- package/dist/commands/spaces/workflows/triggers/list.js +2 -1
- package/dist/commands/spaces/workflows/validate.js +12 -2
- package/dist/commands/store/acquisitions/list.js +2 -1
- package/dist/commands/store/admissions/list.js +17 -1
- package/dist/commands/store/advisories/list.js +2 -1
- package/dist/commands/store/follows/list.js +2 -1
- package/dist/commands/store/publishers/domains/list.js +2 -1
- package/dist/commands/store/reports/list.js +2 -1
- package/dist/commands/subscriptions/list.js +2 -1
- package/dist/commands/tasks/actionability.js +7 -30
- package/dist/commands/tasks/activity.js +14 -8
- package/dist/commands/tasks/approvals/list.js +2 -1
- package/dist/commands/tasks/assign.d.ts +1 -0
- package/dist/commands/tasks/assign.js +43 -7
- package/dist/commands/tasks/attachments/list.js +2 -1
- package/dist/commands/tasks/chat/send.js +34 -0
- package/dist/commands/tasks/comments/add.js +6 -1
- package/dist/commands/tasks/comments/list.js +2 -1
- package/dist/commands/tasks/complete.js +26 -2
- package/dist/commands/tasks/continue.d.ts +18 -0
- package/dist/commands/tasks/continue.js +54 -0
- package/dist/commands/tasks/create-tree.d.ts +5 -0
- package/dist/commands/tasks/create-tree.js +399 -219
- package/dist/commands/tasks/create.d.ts +1 -0
- package/dist/commands/tasks/create.js +63 -11
- package/dist/commands/tasks/deliverable/add.js +10 -3
- package/dist/commands/tasks/deliverable/list.js +2 -1
- package/dist/commands/tasks/events/list.js +2 -1
- package/dist/commands/tasks/execution-state.d.ts +12 -0
- package/dist/commands/tasks/execution-state.js +28 -0
- package/dist/commands/tasks/expectations/assess.js +40 -5
- package/dist/commands/tasks/guide.d.ts +10 -0
- package/dist/commands/tasks/guide.js +20 -0
- package/dist/commands/tasks/labels/list.js +2 -1
- package/dist/commands/tasks/list.d.ts +19 -0
- package/dist/commands/tasks/list.js +103 -6
- package/dist/commands/tasks/move.js +10 -2
- package/dist/commands/tasks/preflight.d.ts +14 -0
- package/dist/commands/tasks/preflight.js +77 -0
- package/dist/commands/tasks/rearm-recurrence.js +22 -3
- package/dist/commands/tasks/resource/list.js +2 -1
- package/dist/commands/tasks/result/submit.js +10 -1
- package/dist/commands/tasks/review.js +6 -1
- package/dist/commands/tasks/revisions.d.ts +2 -0
- package/dist/commands/tasks/revisions.js +8 -1
- package/dist/commands/tasks/show.d.ts +8 -0
- package/dist/commands/tasks/show.js +81 -43
- package/dist/commands/tasks/start.d.ts +1 -0
- package/dist/commands/tasks/start.js +35 -0
- package/dist/commands/tasks/templates/list.js +2 -1
- package/dist/commands/tasks/timeline.d.ts +5 -0
- package/dist/commands/tasks/timeline.js +9 -1
- package/dist/commands/tasks/unschedule.js +5 -1
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +36 -3
- package/dist/commands/tasks/updates/add.js +6 -1
- package/dist/commands/tasks/updates/list.js +2 -1
- package/dist/commands/tasks/upsert.d.ts +1 -0
- package/dist/commands/tasks/upsert.js +8 -1
- package/dist/commands/token/list.js +2 -1
- package/dist/commands/tokens/list.js +2 -1
- package/dist/commands/tones/list.js +4 -2
- package/dist/commands/triggers/audit.js +12 -3
- package/dist/commands/triggers/create.js +1 -1
- package/dist/commands/triggers/fire-detail.d.ts +7 -0
- package/dist/commands/triggers/fire-detail.js +30 -12
- package/dist/commands/triggers/fire.js +13 -3
- package/dist/commands/triggers/list.js +2 -1
- package/dist/commands/triggers/parse-intent.js +1 -1
- package/dist/commands/triggers/update.js +1 -1
- package/dist/commands/views/list.js +2 -1
- package/dist/commands/webhooks/list.js +2 -1
- package/dist/commands/whoami.js +1 -1
- package/dist/commands/widgets/list.js +2 -1
- package/dist/commands/widgets/save-as-app.d.ts +13 -0
- package/dist/commands/widgets/save-as-app.js +65 -0
- package/dist/commands/work-views/list.js +2 -1
- package/dist/commands/worklog/list.js +2 -1
- package/dist/commands/workspaces/grants.js +1 -4
- package/dist/commands/workspaces/list.js +3 -2
- package/dist/commands/workspaces/members.d.ts +1 -0
- package/dist/commands/workspaces/members.js +10 -7
- package/dist/generated/managed-instruction-guides.json +2 -2
- package/dist/help.js +7 -0
- package/dist/lib/agent-proactive-baseline.d.ts +9 -0
- package/dist/lib/agent-proactive-baseline.js +44 -0
- package/dist/lib/agentic-stream.d.ts +4 -1
- package/dist/lib/agentic-stream.js +29 -4
- package/dist/lib/appData.d.ts +75 -0
- package/dist/lib/appData.js +274 -0
- package/dist/lib/appInstallations.d.ts +117 -0
- package/dist/lib/appInstallations.js +960 -0
- package/dist/lib/appSettings.d.ts +3 -0
- package/dist/lib/appSettings.js +71 -0
- package/dist/lib/appWebhooks.d.ts +7 -0
- package/dist/lib/appWebhooks.js +59 -0
- package/dist/lib/apps-command.d.ts +44 -0
- package/dist/lib/apps-command.js +164 -0
- package/dist/lib/apps.d.ts +45 -0
- package/dist/lib/apps.js +148 -0
- package/dist/lib/appsCheck.d.ts +12 -0
- package/dist/lib/appsCheck.js +173 -0
- package/dist/lib/appsFs.d.ts +58 -0
- package/dist/lib/appsFs.js +384 -0
- package/dist/lib/auth-failure.d.ts +20 -0
- package/dist/lib/auth-failure.js +40 -3
- package/dist/lib/cli-installers.d.ts +9 -2
- package/dist/lib/command-miss.js +107 -0
- package/dist/lib/commitment-loop-status.js +25 -3
- package/dist/lib/commitment-product.js +5 -2
- package/dist/lib/commitments.d.ts +45 -3
- package/dist/lib/commitments.js +139 -41
- package/dist/lib/compasses.d.ts +4 -0
- package/dist/lib/compasses.js +11 -0
- package/dist/lib/daemon-machine-identity-copy.d.ts +14 -0
- package/dist/lib/daemon-machine-identity-copy.js +27 -0
- package/dist/lib/daemon-machine-identity.d.ts +27 -0
- package/dist/lib/daemon-machine-identity.js +61 -0
- package/dist/lib/daemon-setup.js +7 -7
- package/dist/lib/daemonHandoff.d.ts +19 -1
- package/dist/lib/daemonHandoff.js +62 -2
- package/dist/lib/dedicated-ssh.d.ts +2 -0
- package/dist/lib/dedicated-ssh.js +98 -28
- package/dist/lib/harnesses.d.ts +71 -0
- package/dist/lib/harnesses.js +70 -0
- package/dist/lib/json-output.d.ts +33 -0
- package/dist/lib/json-output.js +37 -0
- package/dist/lib/list-output.d.ts +9 -4
- package/dist/lib/list-output.js +38 -9
- package/dist/lib/lookbackPlans.d.ts +13 -0
- package/dist/lib/lookbackPlans.js +68 -0
- package/dist/lib/machines.d.ts +27 -6
- package/dist/lib/machines.js +25 -14
- package/dist/lib/member-output.d.ts +20 -0
- package/dist/lib/member-output.js +57 -0
- package/dist/lib/preflight-copy.d.ts +7 -0
- package/dist/lib/preflight-copy.js +31 -0
- package/dist/lib/profile-machine-identity-guard.js +11 -1
- package/dist/lib/roles.d.ts +2 -2
- package/dist/lib/task-admission.d.ts +9 -0
- package/dist/lib/task-admission.js +35 -0
- package/dist/lib/task-batch.d.ts +4 -0
- package/dist/lib/task-batch.js +2 -0
- package/dist/lib/task-economics.d.ts +10 -0
- package/dist/lib/task-economics.js +24 -2
- package/dist/lib/task-operations.d.ts +25 -0
- package/dist/lib/task-operations.js +123 -0
- package/dist/lib/task-preflight.d.ts +35 -0
- package/dist/lib/task-preflight.js +121 -0
- package/dist/lib/task-resource-references.d.ts +23 -0
- package/dist/lib/task-resource-references.js +119 -0
- package/dist/lib/task-spec-verification.d.ts +42 -0
- package/dist/lib/task-spec-verification.js +101 -0
- package/dist/lib/task-work.d.ts +11 -0
- package/dist/lib/task-work.js +41 -0
- package/dist/lib/task-write-attribution.d.ts +26 -0
- package/dist/lib/task-write-attribution.js +47 -0
- package/dist/lib/tasks.d.ts +13 -0
- package/dist/lib/tasks.js +61 -8
- package/dist/lib/triggers.d.ts +18 -0
- package/dist/lib/triggers.js +97 -5
- package/dist/lib/usage-discovery.d.ts +4 -0
- package/dist/lib/usage-discovery.js +14 -4
- package/dist/lib/widgetApps.d.ts +10 -0
- package/dist/lib/widgetApps.js +47 -0
- package/dist/lib/widgetStaticScan.js +25 -1
- package/dist/lib/workflow-run-view.d.ts +4 -0
- package/dist/lib/workflow-run-view.js +5 -0
- package/dist/lib/workspaces.d.ts +33 -9
- package/dist/lib/workspaces.js +19 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +14 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.d.ts +49 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.d.ts +118 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +614 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +5 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.d.ts +60 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +130 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +15 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +177 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +484 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +11 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +46 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +232 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +372 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +17 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +12 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +14 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +45 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.d.ts +49 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +24 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.d.ts +118 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +608 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.d.ts +60 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +128 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +15 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +177 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +472 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +11 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +44 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +232 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +360 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +17 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +12 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +31 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +25255 -18711
- package/docs/v1/operations.md +52 -0
- package/docs/v1/space-search.md +19 -0
- package/oclif.manifest.json +4843 -513
- package/package.json +32 -2
package/dist/lib/auth-failure.js
CHANGED
|
@@ -13,7 +13,34 @@
|
|
|
13
13
|
* latch and turns it into the sentence the error should have carried.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.refusalFromResponse = refusalFromResponse;
|
|
16
17
|
exports.describeRefreshRefusal = describeRefreshRefusal;
|
|
18
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
19
|
+
/**
|
|
20
|
+
* OSK-16941 — the refusal an API 401 body describes, when it is a revoked
|
|
21
|
+
* session (`{ code: 'SESSION_REVOKED', reason }`). Lets the 401 explain itself
|
|
22
|
+
* when no refresh refusal was latched, and fills the reason in when the latch
|
|
23
|
+
* predates it.
|
|
24
|
+
*/
|
|
25
|
+
function refusalFromResponse(body, latched) {
|
|
26
|
+
const revoked = body?.code === 'SESSION_REVOKED';
|
|
27
|
+
if (latched?.reason) {
|
|
28
|
+
if (latched.reason === 'SESSION_REVOKED' &&
|
|
29
|
+
!latched.revocationReason &&
|
|
30
|
+
revoked &&
|
|
31
|
+
typeof body?.reason === 'string') {
|
|
32
|
+
return { ...latched, revocationReason: body.reason };
|
|
33
|
+
}
|
|
34
|
+
return latched;
|
|
35
|
+
}
|
|
36
|
+
if (!revoked)
|
|
37
|
+
return null;
|
|
38
|
+
return {
|
|
39
|
+
reason: 'SESSION_REVOKED',
|
|
40
|
+
...(typeof body?.reason === 'string' ? { revocationReason: body.reason } : {}),
|
|
41
|
+
...(typeof body?.message === 'string' && body.message ? { message: body.message } : {}),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
17
44
|
/**
|
|
18
45
|
* Explain one refresh refusal in terms of what the reader can do about it.
|
|
19
46
|
* Returns null when there is no latched refusal, so the caller keeps its
|
|
@@ -47,11 +74,21 @@ function describeRefreshRefusal(refusal, opts) {
|
|
|
47
74
|
};
|
|
48
75
|
}
|
|
49
76
|
if (code === 'SESSION_REVOKED') {
|
|
77
|
+
// OSK-16941 — say WHY, in the shared words, and what to do. A latch with no
|
|
78
|
+
// reason (an older server or auth-core) reads "we could not tell why".
|
|
79
|
+
const revocationReason = (0, data_provider_1.normalizeSessionRevocationReason)(refusal.revocationReason);
|
|
80
|
+
const brokered = revocationReason === 'machine_removed' ||
|
|
81
|
+
revocationReason === 'logged_out' ||
|
|
82
|
+
revocationReason === 'unknown'
|
|
83
|
+
? ` Revoking a daemon that brokered this sign-in ends it too (\`${bin} login\` ` +
|
|
84
|
+
`without a browser signs in through this machine's daemon).`
|
|
85
|
+
: '';
|
|
50
86
|
return {
|
|
51
87
|
code,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
88
|
+
revocationReason,
|
|
89
|
+
message: `This sign-in was revoked${said}. ` +
|
|
90
|
+
(0, data_provider_1.formatSessionRevocation)(refusal.revocationReason, { surface: 'cli', bin }) +
|
|
91
|
+
brokered,
|
|
55
92
|
};
|
|
56
93
|
}
|
|
57
94
|
if (code === 'REFRESH_REUSED') {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Matches `ManagedCliAuthenticationState` in `daemon/src/cli-installers.ts`.
|
|
3
|
+
*
|
|
4
|
+
* `unverified` (OSK-16927): a local sign-in exists and this daemon has not seen
|
|
5
|
+
* a model answer through it. It prints verbatim as the READINESS word, so a
|
|
6
|
+
* daemon older than the status never sends it and a CLI older than the daemon
|
|
7
|
+
* prints it unchanged.
|
|
8
|
+
*/
|
|
2
9
|
export interface ManagedCliAuthentication {
|
|
3
|
-
status: 'ready' | 'interactive-required' | 'headless-key-required';
|
|
10
|
+
status: 'ready' | 'unverified' | 'interactive-required' | 'headless-key-required';
|
|
4
11
|
source: 'environment' | 'browser' | 'none';
|
|
5
12
|
message: string;
|
|
6
13
|
}
|
package/dist/lib/command-miss.js
CHANGED
|
@@ -105,6 +105,110 @@ function describeFlatRedirect(config, parts, spokenId) {
|
|
|
105
105
|
suggestions: targets.map((t) => `${config.bin} ${t.id}`),
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
+
/** Intent hints are suggestions, never aliases: mutation verbs must still be explicit. */
|
|
109
|
+
const SUGGESTED_VERBS = {
|
|
110
|
+
view: ['show', 'get'],
|
|
111
|
+
describe: ['show', 'get'],
|
|
112
|
+
read: ['show', 'get'],
|
|
113
|
+
info: ['show', 'get'],
|
|
114
|
+
details: ['show', 'get'],
|
|
115
|
+
fetch: ['show', 'get'],
|
|
116
|
+
new: ['create'],
|
|
117
|
+
add: ['create'],
|
|
118
|
+
edit: ['update'],
|
|
119
|
+
};
|
|
120
|
+
const PROJECT_WORKFLOW = [
|
|
121
|
+
{
|
|
122
|
+
id: 'projects:list',
|
|
123
|
+
usage: 'projects list --space <space>',
|
|
124
|
+
answers: 'list projects in a Space',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 'projects:create',
|
|
128
|
+
usage: 'projects create --space <space> --title "Project title"',
|
|
129
|
+
answers: 'create a project in a Space',
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
const DEPENDENCY_WORKFLOW = [
|
|
133
|
+
{
|
|
134
|
+
id: 'tasks:show',
|
|
135
|
+
usage: 'tasks show <task> --json',
|
|
136
|
+
answers: 'inspect blockedByIds and blocksIds dependencies',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'tasks:update',
|
|
140
|
+
usage: 'tasks update <task> --add-blocked-by <blocker-task>',
|
|
141
|
+
answers: 'make this task wait on another task; use --remove-blocked-by to remove that dependency',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: 'tasks:create-tree',
|
|
145
|
+
usage: 'tasks create-tree --help',
|
|
146
|
+
answers: 'create a task tree with blockedByTempIds dependencies',
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
const TASK_OPERATIONS = [
|
|
150
|
+
{ id: 'tasks:guide', usage: 'tasks guide', answers: 'find the commands for Task planning, dependencies, execution, and results' },
|
|
151
|
+
];
|
|
152
|
+
const TASK_PREFLIGHT = [
|
|
153
|
+
{ id: 'tasks:preflight', usage: 'tasks preflight <task>', answers: 'read workflow blockers and execution prerequisites without starting work; shell execution remains unverified' },
|
|
154
|
+
{ id: 'tasks:actionability', usage: 'tasks actionability <task>', answers: 'read the canonical next actor and allowed workflow actions' },
|
|
155
|
+
{ id: 'tasks:start', usage: 'tasks start <task> --dry-run', answers: 'read only the server execution preview; never starts a Run' },
|
|
156
|
+
];
|
|
157
|
+
const WORKFLOW_HINTS = {
|
|
158
|
+
'spaces:projects': PROJECT_WORKFLOW,
|
|
159
|
+
'spaces:phases': PROJECT_WORKFLOW,
|
|
160
|
+
'tasks:dependencies': DEPENDENCY_WORKFLOW,
|
|
161
|
+
'tasks:blockers': DEPENDENCY_WORKFLOW,
|
|
162
|
+
'tasks:dependency': DEPENDENCY_WORKFLOW,
|
|
163
|
+
'tasks:operations': TASK_OPERATIONS,
|
|
164
|
+
'tasks:help': TASK_OPERATIONS,
|
|
165
|
+
'tasks:workflow-guide': TASK_OPERATIONS,
|
|
166
|
+
'tasks:check': TASK_PREFLIGHT,
|
|
167
|
+
'tasks:doctor': TASK_PREFLIGHT,
|
|
168
|
+
'tasks:readiness': TASK_PREFLIGHT,
|
|
169
|
+
};
|
|
170
|
+
function describeIntentMiss(config, parts) {
|
|
171
|
+
// An installed command (even one whose module cannot load) always owns its name.
|
|
172
|
+
const known = [...config.commandIDs, ...config.topicNames];
|
|
173
|
+
const typed = parts.join(':');
|
|
174
|
+
if (config.findCommand(typed) || known.includes(typed))
|
|
175
|
+
return null;
|
|
176
|
+
const concept = parts.slice(0, 2).join(':');
|
|
177
|
+
let targets = known.includes(concept) || config.findCommand(concept)
|
|
178
|
+
? []
|
|
179
|
+
: WORKFLOW_HINTS[concept]?.filter((target) => config.findCommand(target.id) !== undefined);
|
|
180
|
+
if (!targets?.length) {
|
|
181
|
+
targets = [];
|
|
182
|
+
for (let i = 1; i < parts.length; i += 1) {
|
|
183
|
+
const prefix = parts.slice(0, i).join(':');
|
|
184
|
+
if (!known.some((id) => id === prefix || id.startsWith(`${prefix}:`)))
|
|
185
|
+
break;
|
|
186
|
+
const extended = parts.slice(0, i + 1).join(':');
|
|
187
|
+
if (known.some((id) => id === extended || id.startsWith(`${extended}:`)))
|
|
188
|
+
continue;
|
|
189
|
+
for (const verb of SUGGESTED_VERBS[parts[i].toLowerCase()] ?? []) {
|
|
190
|
+
const id = `${prefix}:${verb}`;
|
|
191
|
+
if (config.findCommand(id) === undefined)
|
|
192
|
+
continue;
|
|
193
|
+
const usage = id.split(':').join(' ');
|
|
194
|
+
targets.push({
|
|
195
|
+
id,
|
|
196
|
+
usage,
|
|
197
|
+
answers: `see ${config.bin} ${usage} --help for arguments and flags`,
|
|
198
|
+
});
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (!targets.length)
|
|
205
|
+
return null;
|
|
206
|
+
return {
|
|
207
|
+
message: `\`${config.bin} ${parts.join(' ')}\` is not a command.`,
|
|
208
|
+
fix: targets.map((t) => ` \`${config.bin} ${t.usage}\` — ${t.answers}`).join('\n'),
|
|
209
|
+
suggestions: targets.map((t) => `${config.bin} ${t.usage}`),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
108
212
|
/** Cheap edit distance, bounded — this runs only on a miss. */
|
|
109
213
|
function editDistance(a, b) {
|
|
110
214
|
const rows = a.length + 1;
|
|
@@ -201,6 +305,9 @@ function analyzeCommandMiss(config, id) {
|
|
|
201
305
|
const parts = String(id ?? '')
|
|
202
306
|
.split(':')
|
|
203
307
|
.filter(Boolean);
|
|
308
|
+
const intent = describeIntentMiss(config, parts);
|
|
309
|
+
if (intent)
|
|
310
|
+
return intent;
|
|
204
311
|
for (let take = parts.length - 1; take >= 1; take -= 1) {
|
|
205
312
|
const found = config.findCommand(parts.slice(0, take).join(':'));
|
|
206
313
|
if (!found)
|
|
@@ -40,6 +40,14 @@ function when(value) {
|
|
|
40
40
|
const pad = (n) => String(n).padStart(2, '0');
|
|
41
41
|
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Standing health is an optional contract field (added with OSK-17003); read
|
|
45
|
+
* it defensively across package builds. `ok` is not worth a line.
|
|
46
|
+
*/
|
|
47
|
+
function standingHealth(row) {
|
|
48
|
+
const health = row.health;
|
|
49
|
+
return health && health.state !== 'ok' ? health : null;
|
|
50
|
+
}
|
|
43
51
|
function count(value) {
|
|
44
52
|
return typeof value === 'number' && Number.isFinite(value) ? String(value) : '?';
|
|
45
53
|
}
|
|
@@ -72,7 +80,9 @@ function watchSummary(status) {
|
|
|
72
80
|
? '?'
|
|
73
81
|
: row.completeness === 'partial'
|
|
74
82
|
? '~'
|
|
75
|
-
:
|
|
83
|
+
: standingHealth(row)
|
|
84
|
+
? '!'
|
|
85
|
+
: '✓';
|
|
76
86
|
return `${row.source}${mark}`;
|
|
77
87
|
})
|
|
78
88
|
.join(' ');
|
|
@@ -140,13 +150,15 @@ function formatLoopSummary(status) {
|
|
|
140
150
|
}
|
|
141
151
|
const watching = Array.isArray(status.watching) ? status.watching : [];
|
|
142
152
|
const trouble = watching
|
|
143
|
-
.filter((row) => row.access !== 'readable' || row.completeness === 'partial')
|
|
153
|
+
.filter((row) => row.access !== 'readable' || row.completeness === 'partial' || standingHealth(row) !== null)
|
|
144
154
|
.map((row) => {
|
|
145
155
|
const access = row.access === 'blocked'
|
|
146
156
|
? 'CANNOT READ'
|
|
147
157
|
: row.access === 'unknown'
|
|
148
158
|
? 'not known'
|
|
149
|
-
:
|
|
159
|
+
: row.completeness === 'partial'
|
|
160
|
+
? 'PARTIAL read'
|
|
161
|
+
: 'needs attention';
|
|
150
162
|
return `${row.source} ${access}${row.reason ? ` (${row.reason})` : ''}`;
|
|
151
163
|
});
|
|
152
164
|
lines.push(`sources: ${!watching.length ? 'none declared' : trouble.length ? trouble.join('; ') : 'all readable'}`);
|
|
@@ -202,6 +214,16 @@ function formatCommitmentLoopStatus(status) {
|
|
|
202
214
|
if (Array.isArray(limitations) && limitations.length) {
|
|
203
215
|
lines.push(` not watched: ${limitations.join(', ')}`);
|
|
204
216
|
}
|
|
217
|
+
const health = standingHealth(row);
|
|
218
|
+
if (health) {
|
|
219
|
+
const ref = row.ref;
|
|
220
|
+
lines.push(` now: ${health.title}${health.code ? ` (${health.code})` : ''}${health.since ? ` since ${when(health.since)}` : ''}${ref ? ` [${ref}]` : ''}`);
|
|
221
|
+
lines.push(` ${health.detail}`);
|
|
222
|
+
if (health.retryAfter)
|
|
223
|
+
lines.push(` next retry: ${when(health.retryAfter)}`);
|
|
224
|
+
if (health.fix)
|
|
225
|
+
lines.push(` fix: ${health.fix}`);
|
|
226
|
+
}
|
|
205
227
|
}
|
|
206
228
|
lines.push(` Open loops: ${count(status.pendingWork?.openLoops)} Pending runs: ${count(status.pendingWork?.pendingRuns)}`);
|
|
207
229
|
lines.push(` Runs today: ${runs(status)} Spend today: ${spend(status)}`);
|
|
@@ -62,9 +62,12 @@ function renderExecutionReceipt(receipt, log, verbose = false) {
|
|
|
62
62
|
// restates what happened (a typed blocker's summary, which servers before
|
|
63
63
|
// OSK-16429 sent as the reason) is narrative, not something to do: the actor
|
|
64
64
|
// is printed without it and the narrative stays with the blocker.
|
|
65
|
+
// A bare reason code (servers before OSK-16451 sent `runtime_connection_unverifiable`
|
|
66
|
+
// there) is not an action either: the actor is printed alone.
|
|
65
67
|
const narrative = [receipt.summary, receipt.blocker?.summary].filter(Boolean);
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
+
const reason = receipt.nextActor?.reason;
|
|
69
|
+
const action = reason && !narrative.includes(reason) && !/^[A-Za-z0-9_.:-]+$/.test(reason.trim())
|
|
70
|
+
? reason
|
|
68
71
|
: '';
|
|
69
72
|
if (receipt.nextActor)
|
|
70
73
|
log(`Next: ${receipt.nextActor.label || receipt.nextActor.kind}${action ? ` — ${action}` : ''}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CommitmentObservationsQuery, type CommitmentObservationsResponse } from '@skrr-ai/data-provider';
|
|
1
|
+
import { type CommitmentAuthoringSnapshot, type CommitmentAuthoringWarning, type CommitmentObservationsQuery, type CommitmentObservationsResponse } from '@skrr-ai/data-provider';
|
|
2
2
|
/**
|
|
3
3
|
* commitments.ts — request-based client for the Commitments subsystem
|
|
4
4
|
* (`/api/commitments/*`).
|
|
@@ -557,6 +557,7 @@ export interface CommitmentAccountingReadout {
|
|
|
557
557
|
costNoSpendRunCount?: number;
|
|
558
558
|
/** …of which the verdict rests on inference, not a recorded refusal. */
|
|
559
559
|
costNoSpendInferredRunCount?: number;
|
|
560
|
+
costProjection?: CostProjectionCensus;
|
|
560
561
|
costStatus?: 'reported' | 'partial' | 'unavailable' | 'not_applicable';
|
|
561
562
|
recommendedAttemptMultiplier?: number | null;
|
|
562
563
|
multiplierDerivation?: string;
|
|
@@ -582,6 +583,18 @@ export interface CommitmentCostWindow {
|
|
|
582
583
|
/** …of which the verdict rests on inference, not a recorded refusal. */
|
|
583
584
|
noSpendInferredRunCount?: number;
|
|
584
585
|
costStatus?: 'reported' | 'partial' | 'unavailable' | 'not_applicable';
|
|
586
|
+
/** Which spend rule closed the window's days; older days keep that rule's census. */
|
|
587
|
+
projection?: CostProjectionCensus & {
|
|
588
|
+
olderDays?: Array<{
|
|
589
|
+
date?: string;
|
|
590
|
+
version?: number;
|
|
591
|
+
}>;
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
/** How many closed days were derived under an older spend rule than the current one. */
|
|
595
|
+
export interface CostProjectionCensus {
|
|
596
|
+
currentVersion?: number;
|
|
597
|
+
olderDayCount?: number;
|
|
585
598
|
}
|
|
586
599
|
/**
|
|
587
600
|
* The event-wake block of a Commitment's trigger status (`eventCapabilities`), as the server sends
|
|
@@ -832,8 +845,9 @@ export declare function describeOperation(operation: string | null | undefined,
|
|
|
832
845
|
* under "Fix:" read as a remedy nobody wrote (OSK-16230). That narrative is
|
|
833
846
|
* labelled `Blocker:` instead, and no remedy is made up for it.
|
|
834
847
|
*/
|
|
848
|
+
type OperationFixLabel = string;
|
|
835
849
|
export declare function describeOperationFix(commitment: CommitmentView, operation: string | null | undefined): Array<{
|
|
836
|
-
label:
|
|
850
|
+
label: OperationFixLabel;
|
|
837
851
|
text: string;
|
|
838
852
|
}>;
|
|
839
853
|
/**
|
|
@@ -859,6 +873,22 @@ export declare function withLiveAssessment(commitment: CommitmentView, operating
|
|
|
859
873
|
* nothing says so and names the version it left alone (OSK-16199); a server
|
|
860
874
|
* that predates the receipt is reported as updated, exactly as before.
|
|
861
875
|
*/
|
|
876
|
+
/**
|
|
877
|
+
* The warnings a Commitment write deserves (OSK-17003): what the replacement
|
|
878
|
+
* removed (a watched source, its settings, daily times), what now reads
|
|
879
|
+
* differently (daily times in a new timezone) and what stores without effect
|
|
880
|
+
* (an `agent_run` source with no declared keys, collaborator agents).
|
|
881
|
+
*
|
|
882
|
+
* The server's `warnings` win when the response carries the field. An older
|
|
883
|
+
* server sends none, so the CLI derives the same list locally from the contract
|
|
884
|
+
* it read and the payload it sent — one derivation, `@skrr-ai/data-provider`'s.
|
|
885
|
+
*/
|
|
886
|
+
export declare function commitmentWriteWarnings(response: unknown, fallback: {
|
|
887
|
+
before?: CommitmentAuthoringSnapshot | null;
|
|
888
|
+
payload: Record<string, unknown>;
|
|
889
|
+
}): CommitmentAuthoringWarning[];
|
|
890
|
+
/** One `Warning:` line per authoring warning, after the write's own output. */
|
|
891
|
+
export declare function renderCommitmentWriteWarnings(warnings: CommitmentAuthoringWarning[], warn: (line: string) => void): void;
|
|
862
892
|
export declare function describeCommitmentRevision(revision: CommitmentRevisionReceipt | undefined): string;
|
|
863
893
|
export declare function renderCommitmentSummary(commitment: CommitmentView, log: (line: string) => void,
|
|
864
894
|
/**
|
|
@@ -913,7 +943,13 @@ export declare function renderProactivenessScorecard(scorecard: ReadModelRecord,
|
|
|
913
943
|
* or model), because that is the next question every reader asks.
|
|
914
944
|
*/
|
|
915
945
|
export declare function formatCommitmentCycles(page: Partial<CommitmentCyclesResponse>): string[];
|
|
916
|
-
/**
|
|
946
|
+
/** One line per typed refusal reason a Run's hypotheses met; never claim text. */
|
|
947
|
+
export declare function hypothesisRefusalLines(run: {
|
|
948
|
+
hypothesisRefusals?: Array<{
|
|
949
|
+
reason: string;
|
|
950
|
+
count: number;
|
|
951
|
+
}>;
|
|
952
|
+
}): string[];
|
|
917
953
|
export declare function formatCommitmentExplanation(explanation: Partial<CommitmentExplanationResponse>): string[];
|
|
918
954
|
/**
|
|
919
955
|
* Print the continuation hint for a paged `object:'list'` response — the line
|
|
@@ -953,6 +989,12 @@ export declare function renderCommitmentHypotheses(response: ReadModelRecord, lo
|
|
|
953
989
|
export declare function renderCommitmentLineage(lineage: ReadModelRecord, log: (line: string) => void): void;
|
|
954
990
|
/** Human view for daily control-loop metrics. */
|
|
955
991
|
export declare function renderCommitmentMetrics(response: ReadModelRecord, log: (line: string) => void): void;
|
|
992
|
+
/**
|
|
993
|
+
* The spend rule a closed day was derived under (OSK-15500): `open` until the day
|
|
994
|
+
* closes, `vN` when current, `vN (older)` when a later rule exists, so a day whose
|
|
995
|
+
* cost census predates the current rule is visible in the table.
|
|
996
|
+
*/
|
|
997
|
+
export declare function costRuleCell(projection: Record<string, unknown> | null | undefined, closed?: boolean): string;
|
|
956
998
|
/** Human view for the case list — one row per durable problem case. */
|
|
957
999
|
export declare function renderCommitmentCases(response: ReadModelRecord, log: (line: string) => void): void;
|
|
958
1000
|
/**
|
package/dist/lib/commitments.js
CHANGED
|
@@ -25,6 +25,8 @@ exports.describeOperation = describeOperation;
|
|
|
25
25
|
exports.describeOperationFix = describeOperationFix;
|
|
26
26
|
exports.describeStoppedBy = describeStoppedBy;
|
|
27
27
|
exports.withLiveAssessment = withLiveAssessment;
|
|
28
|
+
exports.commitmentWriteWarnings = commitmentWriteWarnings;
|
|
29
|
+
exports.renderCommitmentWriteWarnings = renderCommitmentWriteWarnings;
|
|
28
30
|
exports.describeCommitmentRevision = describeCommitmentRevision;
|
|
29
31
|
exports.renderCommitmentSummary = renderCommitmentSummary;
|
|
30
32
|
exports.describeWakeDecision = describeWakeDecision;
|
|
@@ -33,6 +35,7 @@ exports.renderCommitmentLedger = renderCommitmentLedger;
|
|
|
33
35
|
exports.renderCommitmentTrace = renderCommitmentTrace;
|
|
34
36
|
exports.renderProactivenessScorecard = renderProactivenessScorecard;
|
|
35
37
|
exports.formatCommitmentCycles = formatCommitmentCycles;
|
|
38
|
+
exports.hypothesisRefusalLines = hypothesisRefusalLines;
|
|
36
39
|
exports.formatCommitmentExplanation = formatCommitmentExplanation;
|
|
37
40
|
exports.renderListPageHint = renderListPageHint;
|
|
38
41
|
exports.describeObservationArtifacts = describeObservationArtifacts;
|
|
@@ -41,6 +44,7 @@ exports.renderCommitmentObservations = renderCommitmentObservations;
|
|
|
41
44
|
exports.renderCommitmentHypotheses = renderCommitmentHypotheses;
|
|
42
45
|
exports.renderCommitmentLineage = renderCommitmentLineage;
|
|
43
46
|
exports.renderCommitmentMetrics = renderCommitmentMetrics;
|
|
47
|
+
exports.costRuleCell = costRuleCell;
|
|
44
48
|
exports.renderCommitmentCases = renderCommitmentCases;
|
|
45
49
|
exports.renderCommitmentCaseDetail = renderCommitmentCaseDetail;
|
|
46
50
|
exports.renderCommitmentRemediationProposals = renderCommitmentRemediationProposals;
|
|
@@ -959,39 +963,54 @@ function describeOperation(operation, reason) {
|
|
|
959
963
|
return `not running — ${meaning[status] ?? status}`;
|
|
960
964
|
}
|
|
961
965
|
/**
|
|
962
|
-
*
|
|
963
|
-
*
|
|
964
|
-
*
|
|
965
|
-
*
|
|
966
|
-
* so the one line a reader acts on was a code; the remediation the server
|
|
967
|
-
* already composed sat only in `--json` and `doctor` (OSK-16212). Nothing is
|
|
968
|
-
* printed while the operation is ready or working, where a fix would contradict
|
|
969
|
-
* the line above it.
|
|
970
|
-
*
|
|
971
|
-
* Returns one or two lines. `Fix:` only when the blocker carries an action; a
|
|
972
|
-
* typed blocker an agent returned carries only what happened, which printed
|
|
973
|
-
* under "Fix:" read as a remedy nobody wrote (OSK-16230). That narrative is
|
|
974
|
-
* labelled `Blocker:` instead, and no remedy is made up for it.
|
|
966
|
+
* The label for the last Run's remedy: `Fix` when it is the only line, `Last
|
|
967
|
+
* run` beside a blocker, qualified when the stored verdict it came with is
|
|
968
|
+
* superseded, so a remedy about an earlier contract is not read as a claim
|
|
969
|
+
* about the current one (OSK-15389).
|
|
975
970
|
*/
|
|
971
|
+
function lastRunLabel(liveness, besideBlocker) {
|
|
972
|
+
if (liveness?.current !== false)
|
|
973
|
+
return besideBlocker ? 'Last run' : 'Fix';
|
|
974
|
+
return liveness.superseded?.reason === 'contract_changed_after_observation'
|
|
975
|
+
? 'Last run (before the contract changed)'
|
|
976
|
+
: 'Last run (earlier observation)';
|
|
977
|
+
}
|
|
976
978
|
function describeOperationFix(commitment, operation) {
|
|
977
979
|
if (operation === 'ready' || operation === 'working')
|
|
978
980
|
return [];
|
|
979
981
|
const blocker = commitment.firstActionableBlocker;
|
|
980
|
-
if (!blocker)
|
|
981
|
-
return [];
|
|
982
|
-
const remediation = typeof blocker.remediation === 'string' ? blocker.remediation.trim() : '';
|
|
983
|
-
const detail = typeof blocker.detail === 'string' ? blocker.detail.trim() : '';
|
|
984
|
-
const who = typeof blocker.ownerLabel === 'string' && blocker.ownerLabel
|
|
985
|
-
? blocker.ownerLabel
|
|
986
|
-
: typeof blocker.owner === 'string' && blocker.owner
|
|
987
|
-
? blocker.owner
|
|
988
|
-
: '';
|
|
989
982
|
const lines = [];
|
|
990
|
-
|
|
991
|
-
if (
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
983
|
+
let remediation = '';
|
|
984
|
+
if (blocker) {
|
|
985
|
+
remediation = typeof blocker.remediation === 'string' ? blocker.remediation.trim() : '';
|
|
986
|
+
const detail = typeof blocker.detail === 'string' ? blocker.detail.trim() : '';
|
|
987
|
+
const who = typeof blocker.ownerLabel === 'string' && blocker.ownerLabel
|
|
988
|
+
? blocker.ownerLabel
|
|
989
|
+
: typeof blocker.owner === 'string' && blocker.owner
|
|
990
|
+
? blocker.owner
|
|
991
|
+
: '';
|
|
992
|
+
// The detail is shown only when the fix does not already say it.
|
|
993
|
+
if (detail && detail !== remediation)
|
|
994
|
+
lines.push({ label: 'Blocker', text: `${detail}${!remediation && who ? ` (${who})` : ''}` });
|
|
995
|
+
if (remediation)
|
|
996
|
+
lines.push({ label: 'Fix', text: `${remediation}${who ? ` (${who})` : ''}` });
|
|
997
|
+
}
|
|
998
|
+
// What refused the last Run is a second fact, not an alternative to the
|
|
999
|
+
// blocker: a paused Commitment whose Run was refused needs both a resume and
|
|
1000
|
+
// the fix, or resuming only fails again (OSK-15389). The sentence is the
|
|
1001
|
+
// server's, derived on read from the failure code.
|
|
1002
|
+
//
|
|
1003
|
+
// It is printed even when the stored liveness verdict is superseded. A
|
|
1004
|
+
// supersession says the stored OPERATION no longer describes the Commitment
|
|
1005
|
+
// (it was paused, its contract was edited since); the last Run's refusal and
|
|
1006
|
+
// its remedy are facts about that Run and stay true. Dropping them was
|
|
1007
|
+
// exactly the case being fixed: paused after a refusal, contract edited since.
|
|
1008
|
+
// The label says which Run the sentence is about instead.
|
|
1009
|
+
const liveness = commitment.state?.liveness;
|
|
1010
|
+
const lastRunFix = liveness && typeof liveness.diagnosisFix === 'string' ? liveness.diagnosisFix.trim() : '';
|
|
1011
|
+
if (lastRunFix && lastRunFix !== remediation) {
|
|
1012
|
+
lines.push({ label: lastRunLabel(liveness, lines.length > 0), text: lastRunFix });
|
|
1013
|
+
}
|
|
995
1014
|
return lines;
|
|
996
1015
|
}
|
|
997
1016
|
/**
|
|
@@ -1053,6 +1072,34 @@ function withLiveAssessment(commitment, operatingState) {
|
|
|
1053
1072
|
* nothing says so and names the version it left alone (OSK-16199); a server
|
|
1054
1073
|
* that predates the receipt is reported as updated, exactly as before.
|
|
1055
1074
|
*/
|
|
1075
|
+
/**
|
|
1076
|
+
* The warnings a Commitment write deserves (OSK-17003): what the replacement
|
|
1077
|
+
* removed (a watched source, its settings, daily times), what now reads
|
|
1078
|
+
* differently (daily times in a new timezone) and what stores without effect
|
|
1079
|
+
* (an `agent_run` source with no declared keys, collaborator agents).
|
|
1080
|
+
*
|
|
1081
|
+
* The server's `warnings` win when the response carries the field. An older
|
|
1082
|
+
* server sends none, so the CLI derives the same list locally from the contract
|
|
1083
|
+
* it read and the payload it sent — one derivation, `@skrr-ai/data-provider`'s.
|
|
1084
|
+
*/
|
|
1085
|
+
function commitmentWriteWarnings(response, fallback) {
|
|
1086
|
+
if (response &&
|
|
1087
|
+
typeof response === 'object' &&
|
|
1088
|
+
Array.isArray(response.warnings)) {
|
|
1089
|
+
return (0, data_provider_1.readCommitmentAuthoringWarnings)(response);
|
|
1090
|
+
}
|
|
1091
|
+
const changedFields = Object.keys(fallback.payload).filter((key) => key !== 'expectedVersion');
|
|
1092
|
+
return (0, data_provider_1.deriveCommitmentAuthoringWarnings)({
|
|
1093
|
+
before: fallback.before ?? null,
|
|
1094
|
+
after: { ...(fallback.before ?? {}), ...fallback.payload },
|
|
1095
|
+
changedFields: fallback.before ? changedFields : null,
|
|
1096
|
+
});
|
|
1097
|
+
}
|
|
1098
|
+
/** One `Warning:` line per authoring warning, after the write's own output. */
|
|
1099
|
+
function renderCommitmentWriteWarnings(warnings, warn) {
|
|
1100
|
+
for (const warning of warnings)
|
|
1101
|
+
warn(warning.message);
|
|
1102
|
+
}
|
|
1056
1103
|
function describeCommitmentRevision(revision) {
|
|
1057
1104
|
if (!revision || typeof revision.changed !== 'boolean')
|
|
1058
1105
|
return 'Updated commitment:';
|
|
@@ -1293,9 +1340,16 @@ function renderCheckList(checks, log) {
|
|
|
1293
1340
|
// meant re-running the command with `--json` (OSK-6175).
|
|
1294
1341
|
{ key: 'id', header: 'ID', verbatim: true },
|
|
1295
1342
|
], log);
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1343
|
+
// The legend states each distinct reason the server recorded, in the same
|
|
1344
|
+
// words explain and cycles use; it never guesses "compacted" for a Check
|
|
1345
|
+
// whose history is merely missing (OSK-15148).
|
|
1346
|
+
const reasons = [
|
|
1347
|
+
...new Set(checks
|
|
1348
|
+
.map((c) => (0, data_provider_2.describeCommitmentHistoryDetail)(c.historyDetail))
|
|
1349
|
+
.filter((sentence) => Boolean(sentence))),
|
|
1350
|
+
];
|
|
1351
|
+
if (reasons.length > 0)
|
|
1352
|
+
log(`'-' = not retained. ${reasons.join(' ')}`);
|
|
1299
1353
|
}
|
|
1300
1354
|
function records(value) {
|
|
1301
1355
|
return Array.isArray(value)
|
|
@@ -1646,6 +1700,8 @@ function formatCommitmentCycles(page) {
|
|
|
1646
1700
|
for (const run of cycle.runs || []) {
|
|
1647
1701
|
if (run.reportPayload)
|
|
1648
1702
|
lines.push(` run ${run.id} report: ${run.reportPayload.status === 'rejected' ? 'structured report rejected; plain summary used' : 'structured report validated (delivery tracked separately)'}`);
|
|
1703
|
+
for (const line of hypothesisRefusalLines(run))
|
|
1704
|
+
lines.push(` ${line}`);
|
|
1649
1705
|
if (!['machine', 'contract', 'work'].includes(run.failureClass))
|
|
1650
1706
|
continue;
|
|
1651
1707
|
const owner = run.failureOwner === 'model' ? 'model' : run.failureOwner || 'work';
|
|
@@ -1663,14 +1719,9 @@ function formatCommitmentCycles(page) {
|
|
|
1663
1719
|
*/
|
|
1664
1720
|
function formatCycleLatency(cycle) {
|
|
1665
1721
|
const latency = cycle.latency;
|
|
1666
|
-
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1669
|
-
` Detailed history was compacted${history.at ? ` at ${history.at}` : ''}; available reason and source timestamps were retained.`,
|
|
1670
|
-
]
|
|
1671
|
-
: history?.state === 'unavailable'
|
|
1672
|
-
? [' Detailed history is unavailable; why it is missing was not recorded.']
|
|
1673
|
-
: [];
|
|
1722
|
+
// One sentence for every surface, from the server's own record (OSK-15148).
|
|
1723
|
+
const historySentence = (0, data_provider_2.describeCommitmentHistoryDetail)(cycle.historyDetail);
|
|
1724
|
+
const disclosure = historySentence ? [` ${historySentence}`] : [];
|
|
1674
1725
|
// A hop whose inputs were compacted away without a retained projection is
|
|
1675
1726
|
// "not retained": it may have been measured and shown before (OSK-15148).
|
|
1676
1727
|
const unretained = new Set(latency?.unretainedStages || []);
|
|
@@ -1691,6 +1742,20 @@ const ANSWER_GLYPH = { yes: '✓', no: '✗', 'n/a': '–' };
|
|
|
1691
1742
|
/** The mark `cycles` already gives a chosen quiet: the loop looked and decided to say nothing. */
|
|
1692
1743
|
const QUIET_ANSWER_GLYPH = CYCLE_GLYPH.quiet;
|
|
1693
1744
|
/** The six questions for the latest Cycle, the first ✗ carrying its fix. */
|
|
1745
|
+
/** Why the causal ledger refused a hypothesis, for a person reading the run. */
|
|
1746
|
+
const HYPOTHESIS_REFUSAL_REASON = {
|
|
1747
|
+
not_an_object: 'entry was not an object',
|
|
1748
|
+
missing_statement: 'no statement',
|
|
1749
|
+
missing_falsifier: 'no falsifier',
|
|
1750
|
+
episode_cap_reached: 'episode already holds its limit of open claims',
|
|
1751
|
+
unknown_hypothesis_id: 'named an id this investigation does not hold',
|
|
1752
|
+
new_hypothesis_must_be_open: 'a new claim must start open',
|
|
1753
|
+
server_only_hypothesis_status: 'that status is set only by the server',
|
|
1754
|
+
};
|
|
1755
|
+
/** One line per typed refusal reason a Run's hypotheses met; never claim text. */
|
|
1756
|
+
function hypothesisRefusalLines(run) {
|
|
1757
|
+
return (run.hypothesisRefusals || []).map((refusal) => `${refusal.count} ${refusal.count === 1 ? 'hypothesis' : 'hypotheses'} not recorded: ${HYPOTHESIS_REFUSAL_REASON[refusal.reason] || refusal.reason} (${refusal.reason})`);
|
|
1758
|
+
}
|
|
1694
1759
|
function formatCommitmentExplanation(explanation) {
|
|
1695
1760
|
const cycle = explanation.cycle;
|
|
1696
1761
|
const lines = [
|
|
@@ -1721,9 +1786,12 @@ function formatCommitmentExplanation(explanation) {
|
|
|
1721
1786
|
// nobody on an unattended Run (OSK-12201). Same lines as show/preflight.
|
|
1722
1787
|
if (cycle) {
|
|
1723
1788
|
lines.push(...platformFetchLines(cycle));
|
|
1724
|
-
for (const run of cycle.runs || [])
|
|
1789
|
+
for (const run of cycle.runs || []) {
|
|
1725
1790
|
if (run.reportPayload)
|
|
1726
1791
|
lines.push(` run ${run.id} report: ${run.reportPayload.status === 'rejected' ? 'structured report rejected; plain summary used' : 'structured report validated (delivery tracked separately)'}`);
|
|
1792
|
+
for (const line of hypothesisRefusalLines(run))
|
|
1793
|
+
lines.push(` ${line}`);
|
|
1794
|
+
}
|
|
1727
1795
|
}
|
|
1728
1796
|
lines.push(...permissionLines(explanation.permissions));
|
|
1729
1797
|
return lines;
|
|
@@ -1790,8 +1858,22 @@ function observationLegend(data) {
|
|
|
1790
1858
|
const shortened = data.some((item) => (0, format_1.formatCell)(firstValue(item, ['value', 'observedValue', 'latestValue'])).length >
|
|
1791
1859
|
OBSERVATION_VALUE_WIDTH);
|
|
1792
1860
|
if (shortened) {
|
|
1793
|
-
lines.push('VALUE is shortened to fit this table (…); the stored value
|
|
1794
|
-
}
|
|
1861
|
+
lines.push('VALUE is shortened to fit this table (…); --json has the stored value.');
|
|
1862
|
+
}
|
|
1863
|
+
// The server stores a bounded copy of each reported value and marks every
|
|
1864
|
+
// clamp. A clamped copy is not the value the run saw, and must not read as it.
|
|
1865
|
+
const truncated = data.filter((item) => Array.isArray(item.truncation) && item.truncation.length > 0);
|
|
1866
|
+
for (const item of truncated.slice(0, 5)) {
|
|
1867
|
+
const cuts = item.truncation
|
|
1868
|
+
.map((cut) => cut.kind === 'bytes'
|
|
1869
|
+
? `${text(cut.total)} bytes, over the store limit: nothing kept`
|
|
1870
|
+
: `${text(cut.kind).replace('_', ' ')} at ${text(cut.path)}: kept ${text(cut.retained)} of ${text(cut.total)}`)
|
|
1871
|
+
.join('; ');
|
|
1872
|
+
lines.push(`VALUE TRUNCATED for ${text(item.key)} at ${text(firstValue(item, ['observedAt', 'createdAt']))}: ${cuts}. ` +
|
|
1873
|
+
'CHANGED still compares the complete reported value.');
|
|
1874
|
+
}
|
|
1875
|
+
if (truncated.length > 5)
|
|
1876
|
+
lines.push(`VALUE TRUNCATED for ${truncated.length - 5} more rows; see truncation in --json.`);
|
|
1795
1877
|
if (data.some((item) => item.declared === false)) {
|
|
1796
1878
|
lines.push('DECLARED no / REASON undeclared: the key is not declared on this Commitment’s agent_run ' +
|
|
1797
1879
|
'source, so the reading is recorded but can never open a loop.');
|
|
@@ -1945,6 +2027,7 @@ function renderCommitmentMetrics(response, log) {
|
|
|
1945
2027
|
date: text(firstValue(item, ['date', 'dateStart'])),
|
|
1946
2028
|
checks: text(firstValue(totals, ['checks', 'totalChecks']), '0'),
|
|
1947
2029
|
succeeded: text(firstValue(totals, ['succeededChecks', 'succeeded']), '0'),
|
|
2030
|
+
costRule: costRuleCell(record(item.costProjection), Boolean(record(item.recompute)?.closedAt)),
|
|
1948
2031
|
health: (0, format_1.formatCell)(health),
|
|
1949
2032
|
sources: records(item.sources)
|
|
1950
2033
|
.map((source) => text(source.source, 'source'))
|
|
@@ -1954,10 +2037,25 @@ function renderCommitmentMetrics(response, log) {
|
|
|
1954
2037
|
{ key: 'date', header: 'DATE', maxWidth: 24 },
|
|
1955
2038
|
{ key: 'checks', header: 'CHECKS' },
|
|
1956
2039
|
{ key: 'succeeded', header: 'SUCCEEDED' },
|
|
2040
|
+
{ key: 'costRule', header: 'COST RULE', maxWidth: 14 },
|
|
1957
2041
|
{ key: 'health', header: 'HEALTH', maxWidth: 28 },
|
|
1958
2042
|
{ key: 'sources', header: 'SOURCES', maxWidth: 48 },
|
|
1959
2043
|
], 'No daily metrics recorded.', log);
|
|
1960
2044
|
}
|
|
2045
|
+
/**
|
|
2046
|
+
* The spend rule a closed day was derived under (OSK-15500): `open` until the day
|
|
2047
|
+
* closes, `vN` when current, `vN (older)` when a later rule exists, so a day whose
|
|
2048
|
+
* cost census predates the current rule is visible in the table.
|
|
2049
|
+
*/
|
|
2050
|
+
function costRuleCell(projection, closed = Boolean(projection)) {
|
|
2051
|
+
// A closed day without a description came from a server that does not send one.
|
|
2052
|
+
if (!projection)
|
|
2053
|
+
return closed ? '-' : 'open';
|
|
2054
|
+
const version = Number(projection.version);
|
|
2055
|
+
if (!Number.isInteger(version))
|
|
2056
|
+
return '-';
|
|
2057
|
+
return projection.current === false ? `v${version} (older)` : `v${version}`;
|
|
2058
|
+
}
|
|
1961
2059
|
/** Human view for the case list — one row per durable problem case. */
|
|
1962
2060
|
function renderCommitmentCases(response, log) {
|
|
1963
2061
|
const data = records(response.data);
|