@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
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.agentSessionOpenDefault = agentSessionOpenDefault;
|
|
4
4
|
exports.emptyTasksMessage = emptyTasksMessage;
|
|
5
|
+
exports.externalKeyPrefixWarnings = externalKeyPrefixWarnings;
|
|
5
6
|
exports.nextActionText = nextActionText;
|
|
6
7
|
exports.nextColumnWidth = nextColumnWidth;
|
|
7
8
|
exports.taskRef = taskRef;
|
|
9
|
+
exports.taskExecution = taskExecution;
|
|
10
|
+
exports.taskPageSummary = taskPageSummary;
|
|
11
|
+
exports.taskExecutionText = taskExecutionText;
|
|
8
12
|
exports.buildListParams = buildListParams;
|
|
9
13
|
exports.statusFilterWarnings = statusFilterWarnings;
|
|
10
14
|
const core_1 = require("@oclif/core");
|
|
@@ -151,6 +155,19 @@ function emptyTasksMessage(flags, bin = 'skrr') {
|
|
|
151
155
|
}
|
|
152
156
|
return lines.join('\n');
|
|
153
157
|
}
|
|
158
|
+
/** An empty filtered page is evidence about this query, not an empty Space. */
|
|
159
|
+
function externalKeyPrefixWarnings(flags, rowCount) {
|
|
160
|
+
const prefix = flags['external-key-prefix'];
|
|
161
|
+
if (typeof prefix !== 'string' || rowCount !== 0)
|
|
162
|
+
return [];
|
|
163
|
+
return [
|
|
164
|
+
{
|
|
165
|
+
code: 'EXTERNAL_KEY_PREFIX_MATCHED_NOTHING',
|
|
166
|
+
value: { prefix, space: flags.space ?? null },
|
|
167
|
+
hint: `No tasks matched --external-key-prefix ${JSON.stringify(prefix)}${flags.space ? ` in space ${String(flags.space)}` : ''}. Check the prefix or run the same command without --external-key-prefix.`,
|
|
168
|
+
},
|
|
169
|
+
];
|
|
170
|
+
}
|
|
154
171
|
/**
|
|
155
172
|
* `--status` is repeatable, so the flag value is a list; callers that predate
|
|
156
173
|
* that and tests that pass a bare string both normalize through here.
|
|
@@ -217,6 +234,56 @@ function nextColumnWidth(rows) {
|
|
|
217
234
|
function taskRef(t) {
|
|
218
235
|
return String(t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '-'));
|
|
219
236
|
}
|
|
237
|
+
/** Evidence about managed execution only; unmanaged work is outside this projection. */
|
|
238
|
+
function taskExecution(t) {
|
|
239
|
+
const actionability = t.actionability;
|
|
240
|
+
if (actionability?.state === 'terminal')
|
|
241
|
+
return { state: 'terminal' };
|
|
242
|
+
if (actionability?.execution)
|
|
243
|
+
return { ...actionability.execution };
|
|
244
|
+
// Older servers cannot distinguish an active Run from a retained checkout. Do not infer
|
|
245
|
+
// liveness from their `running` actionability, assigned agents, or workflow status.
|
|
246
|
+
if (!actionability || actionability.state === 'running')
|
|
247
|
+
return { state: 'unknown' };
|
|
248
|
+
return { state: 'not_observed' };
|
|
249
|
+
}
|
|
250
|
+
function taskPageSummary(items, hasMore) {
|
|
251
|
+
const countBy = (values) => values.reduce((out, value) => {
|
|
252
|
+
out[value] = (out[value] ?? 0) + 1;
|
|
253
|
+
return out;
|
|
254
|
+
}, {});
|
|
255
|
+
const assignment = (t) => {
|
|
256
|
+
if ((Array.isArray(t.assigneeAgentIds) && t.assigneeAgentIds.length > 0) ||
|
|
257
|
+
(Array.isArray(t.assigneeUserIds) && t.assigneeUserIds.length > 0))
|
|
258
|
+
return 'assigned';
|
|
259
|
+
return Array.isArray(t.assigneeAgentIds) && Array.isArray(t.assigneeUserIds)
|
|
260
|
+
? 'unassigned' : 'unknown';
|
|
261
|
+
};
|
|
262
|
+
return {
|
|
263
|
+
scope: 'fetched_page',
|
|
264
|
+
taskCount: items.length,
|
|
265
|
+
has_more: hasMore,
|
|
266
|
+
workflow: countBy(items.map((t) => String(t.statusType ?? 'unknown'))),
|
|
267
|
+
assignment: {
|
|
268
|
+
assigned: items.filter((t) => assignment(t) === 'assigned').length,
|
|
269
|
+
unassigned: items.filter((t) => assignment(t) === 'unassigned').length,
|
|
270
|
+
unknown: items.filter((t) => assignment(t) === 'unknown').length,
|
|
271
|
+
},
|
|
272
|
+
readiness: countBy(items.map((t) => String(t.actionability?.reasonCode ?? 'unknown'))),
|
|
273
|
+
execution: countBy(items.map((t) => String(taskExecution(t).state))),
|
|
274
|
+
measurement: 'Managed execution evidence at read time; unmanaged work is not measured.',
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function taskExecutionText(t) {
|
|
278
|
+
const execution = taskExecution(t);
|
|
279
|
+
switch (execution.state) {
|
|
280
|
+
case 'run_active': return `Run ${String(execution.runStatus ?? 'active')}${execution.agentId ? ` (${String(execution.agentId)})` : ''}`;
|
|
281
|
+
case 'checkout_held': return 'Checkout held; Run unverified';
|
|
282
|
+
case 'terminal': return 'Terminal';
|
|
283
|
+
case 'not_observed': return 'No active Run observed';
|
|
284
|
+
default: return 'Unknown';
|
|
285
|
+
}
|
|
286
|
+
}
|
|
220
287
|
/**
|
|
221
288
|
* The task-list request bag is shared with import/export so every CLI list
|
|
222
289
|
* surface serializes the same server-side filters. Keep user-id resolution in
|
|
@@ -501,10 +568,13 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
501
568
|
view: core_1.Flags.string({
|
|
502
569
|
description: 'Only tasks a saved Task View selects (task_view_…; see `views list`). Combines with other filters',
|
|
503
570
|
}),
|
|
504
|
-
limit: core_1.Flags.integer({
|
|
571
|
+
limit: core_1.Flags.integer({
|
|
572
|
+
description: 'Results per page (default 50). Follow next_cursor with --cursor for remaining pages.',
|
|
573
|
+
default: 50,
|
|
574
|
+
}),
|
|
505
575
|
cursor: core_1.Flags.string({ description: 'Pagination cursor from a previous page' }),
|
|
506
576
|
all: core_1.Flags.boolean({
|
|
507
|
-
description: 'Include closed tasks
|
|
577
|
+
description: 'Include closed tasks inside an agent session. This changes status filtering only; it does not fetch all pages. Use --cursor to continue.',
|
|
508
578
|
}),
|
|
509
579
|
...list_output_1.listOutputFlags,
|
|
510
580
|
strict: core_1.Flags.boolean({
|
|
@@ -588,14 +658,18 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
588
658
|
Array.isArray(response.data)) {
|
|
589
659
|
response = {
|
|
590
660
|
...response,
|
|
591
|
-
|
|
661
|
+
// Each row carries the `economicsRank` it was sorted by, so `--json` shows the same SCORE
|
|
662
|
+
// as the table, computed once in the shared ranking (OSK-16476).
|
|
663
|
+
data: (0, data_provider_1.annotateEconomicRank)(response.data),
|
|
592
664
|
rank_applied: { key: 'economics', scope: 'fetched_page' },
|
|
593
665
|
};
|
|
594
666
|
}
|
|
595
667
|
const list = response;
|
|
668
|
+
const rowCount = Array.isArray(list?.data) ? list.data.length : 0;
|
|
669
|
+
const prefixWarnings = calendarRange ? [] : externalKeyPrefixWarnings(flags, rowCount);
|
|
596
670
|
const statusWarnings = calendarRange
|
|
597
671
|
? []
|
|
598
|
-
: statusFilterWarnings(flags,
|
|
672
|
+
: [...statusFilterWarnings(flags, rowCount), ...prefixWarnings];
|
|
599
673
|
if (flags.strict && statusWarnings.some((w) => w.code === 'STATUS_NOT_BUILTIN')) {
|
|
600
674
|
const bad = statusWarnings.find((w) => w.code === 'STATUS_NOT_BUILTIN');
|
|
601
675
|
this.failWithCliError({
|
|
@@ -616,10 +690,12 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
616
690
|
const enriched = list && Array.isArray(list.data)
|
|
617
691
|
? {
|
|
618
692
|
...list,
|
|
693
|
+
...(!calendarRange ? { summary: taskPageSummary(list.data, Boolean(list.has_more ?? list.next_cursor)) } : {}),
|
|
619
694
|
data: list.data.map((t) => ({
|
|
620
695
|
...t,
|
|
621
696
|
ref: taskRef(t),
|
|
622
697
|
nextAction: nextActionText(t),
|
|
698
|
+
...(!calendarRange ? { execution: taskExecution(t) } : {}),
|
|
623
699
|
})),
|
|
624
700
|
}
|
|
625
701
|
: response;
|
|
@@ -633,7 +709,19 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
633
709
|
compact: flags.compact,
|
|
634
710
|
requestedLimit: flags.limit,
|
|
635
711
|
warnings: statusWarnings,
|
|
636
|
-
...(filterApplied
|
|
712
|
+
...(filterApplied || flags['external-key-prefix']
|
|
713
|
+
? {
|
|
714
|
+
filterApplied: {
|
|
715
|
+
...filterApplied,
|
|
716
|
+
...(flags['external-key-prefix']
|
|
717
|
+
? {
|
|
718
|
+
externalKeyPrefix: flags['external-key-prefix'],
|
|
719
|
+
spaceId: flags.space ?? null,
|
|
720
|
+
}
|
|
721
|
+
: {}),
|
|
722
|
+
},
|
|
723
|
+
}
|
|
724
|
+
: {}),
|
|
637
725
|
});
|
|
638
726
|
this.printList(out, Boolean(flags.ndjson));
|
|
639
727
|
return;
|
|
@@ -666,6 +754,8 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
666
754
|
const items = r?.data ?? [];
|
|
667
755
|
if (items.length === 0) {
|
|
668
756
|
this.log(emptyTasksMessage(flags, this.config.bin));
|
|
757
|
+
for (const line of (0, list_output_1.warningLines)(prefixWarnings))
|
|
758
|
+
this.log(line);
|
|
669
759
|
return;
|
|
670
760
|
}
|
|
671
761
|
const rows = items.map((t) => {
|
|
@@ -686,6 +776,7 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
686
776
|
priority: String(t.priority ?? '-'),
|
|
687
777
|
estimate: t.estimate === null || t.estimate === undefined ? '-' : String(t.estimate),
|
|
688
778
|
assignees,
|
|
779
|
+
execution: taskExecutionText(t),
|
|
689
780
|
next: nextActionText(t),
|
|
690
781
|
match: String(t._matchField ?? '-'),
|
|
691
782
|
savings: economics?.savings
|
|
@@ -693,7 +784,9 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
693
784
|
: 'Unknown',
|
|
694
785
|
effort: economics?.effortHours !== undefined ? `${economics.effortHours}h` : 'Unknown',
|
|
695
786
|
risk: economics?.risk ?? 'Unknown',
|
|
696
|
-
score:
|
|
787
|
+
score: t.economicsRank
|
|
788
|
+
? (0, task_economics_1.scoreText)(t.economicsRank.score)
|
|
789
|
+
: (0, task_economics_1.economicsScoreText)(economics),
|
|
697
790
|
basis: economics?.basis && Object.prototype.hasOwnProperty.call(basis, economics.basis)
|
|
698
791
|
? basis[economics.basis]
|
|
699
792
|
: 'Unknown',
|
|
@@ -715,6 +808,7 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
715
808
|
: []),
|
|
716
809
|
{ key: 'estimate', header: 'ESTIMATE' },
|
|
717
810
|
{ key: 'assignees', header: 'ASSIGNEES' },
|
|
811
|
+
{ key: 'execution', header: 'EXECUTION', maxWidth: 58 },
|
|
718
812
|
// Bounded: the reason is a sentence, and an unbounded column wraps the
|
|
719
813
|
// table into unreadability on a narrow terminal.
|
|
720
814
|
{ key: 'next', header: 'NEXT', maxWidth: nextColumnWidth(rows) },
|
|
@@ -723,6 +817,9 @@ class TasksList extends base_command_1.BaseCommand {
|
|
|
723
817
|
...(flags.q ? [{ key: 'match', header: 'MATCH' }] : []),
|
|
724
818
|
{ key: 'id', header: 'ID' },
|
|
725
819
|
], (line) => this.log(line));
|
|
820
|
+
const summary = taskPageSummary(items, Boolean(r?.has_more ?? r?.next_cursor));
|
|
821
|
+
this.log(`\nFetched page: ${items.length} tasks; ${summary.assignment.unassigned} unassigned; ${summary.execution.run_active ?? 0} active managed Runs; ${summary.execution.checkout_held ?? 0} retained checkouts; ${summary.execution.unknown ?? 0} execution unknown. ${summary.has_more ? 'More pages available.' : 'Last page.'}`);
|
|
822
|
+
this.log(summary.measurement);
|
|
726
823
|
if (flags.rank)
|
|
727
824
|
this.log('\nRanked only within this fetched page; estimates are claims, not measured savings.\n' +
|
|
728
825
|
'SCORE = annualized USD savings / max(effort hours, 0.5) x risk factor (low 1, medium 0.6, high 0.25); ' +
|
|
@@ -63,6 +63,7 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
63
63
|
async run() {
|
|
64
64
|
this.requireAuth();
|
|
65
65
|
const { args, flags } = await this.parse(TasksMove);
|
|
66
|
+
this.setJsonOperation({ command: 'tasks:move', mode: 'execute' });
|
|
66
67
|
let taskIdentity;
|
|
67
68
|
try {
|
|
68
69
|
taskIdentity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
|
|
@@ -78,7 +79,7 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
const taskRef = await this.resolveEntityRef('task', taskIdentity.id);
|
|
81
|
-
|
|
82
|
+
let projectId = (0, projects_1.resolveTaskProjectFlag)(flags.project);
|
|
82
83
|
if (projectId !== undefined) {
|
|
83
84
|
try {
|
|
84
85
|
(0, unsupported_managed_task_write_1.refuseUnsupportedManagedTaskWrite)('Project changes', 'mcp__tasks__task_update');
|
|
@@ -96,6 +97,11 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
96
97
|
retryable: false,
|
|
97
98
|
});
|
|
98
99
|
}
|
|
100
|
+
if (typeof projectId === 'string') {
|
|
101
|
+
const placement = { projectId };
|
|
102
|
+
await this.resolveTaskResourceReferences(placement, { taskId: taskRef });
|
|
103
|
+
projectId = placement.projectId;
|
|
104
|
+
}
|
|
99
105
|
// Whether a target is blocked is a Space-specific TYPE decision. The
|
|
100
106
|
// server validates and applies these optional hold details after resolving
|
|
101
107
|
// the state; a client must not guess from a display name.
|
|
@@ -148,7 +154,9 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
148
154
|
this.handleApiError(err);
|
|
149
155
|
}
|
|
150
156
|
if (flags.json) {
|
|
151
|
-
this.
|
|
157
|
+
this.printJsonOperation((0, web_url_1.withTaskUrl)(this.cliConfig.baseURL, updated), {
|
|
158
|
+
resource: { kind: 'task', id: updated?.id }, task: { id: updated?.id },
|
|
159
|
+
});
|
|
152
160
|
return;
|
|
153
161
|
}
|
|
154
162
|
const t = (updated ?? {});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class TasksPreflight extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
task: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
skill: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static examples: string[];
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
|
+
const base_command_1 = require("../../base-command");
|
|
6
|
+
const task_resolver_1 = require("../../lib/task-resolver");
|
|
7
|
+
const task_preflight_1 = require("../../lib/task-preflight");
|
|
8
|
+
class TasksPreflight extends base_command_1.BaseCommand {
|
|
9
|
+
static description = 'Inspect workflow blockers and execution prerequisites without starting work or probing a machine';
|
|
10
|
+
static args = {
|
|
11
|
+
id: core_1.Args.string({ description: 'Task ID/ref; defaults to the current Task runtime', ignoreStdin: true }),
|
|
12
|
+
};
|
|
13
|
+
static flags = {
|
|
14
|
+
json: core_1.Flags.boolean({ description: 'Output native observations, uncertainty, and CLI verification metadata as JSON' }),
|
|
15
|
+
task: core_1.Flags.string({ description: 'Task ID/ref; overrides current Task runtime context' }),
|
|
16
|
+
skill: core_1.Flags.string({ description: 'Skill ID for the existing server execution preview' }),
|
|
17
|
+
};
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> tasks preflight OSK-123',
|
|
20
|
+
'<%= config.bin %> tasks preflight --json',
|
|
21
|
+
];
|
|
22
|
+
async run() {
|
|
23
|
+
this.setJsonOperation({ command: 'tasks:preflight', mode: 'verify', writeState: 'not_attempted' });
|
|
24
|
+
this.requireAuth();
|
|
25
|
+
const { args, flags } = await this.parse(TasksPreflight);
|
|
26
|
+
let identity;
|
|
27
|
+
try {
|
|
28
|
+
identity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
const failure = (0, task_resolver_1.taskResolutionFailure)(error);
|
|
32
|
+
this.failWithCliError({ message: failure.message, code: failure.code, exit: 2, retryable: false,
|
|
33
|
+
details: { suggestion: failure.suggestion } });
|
|
34
|
+
}
|
|
35
|
+
let taskId = await this.resolveTaskReference(identity.id);
|
|
36
|
+
// Native endpoints accept identifiers, so BaseCommand intentionally keeps
|
|
37
|
+
// OSK-123 unchanged. Correlating two diagnostic records needs the returned
|
|
38
|
+
// canonical identity; UUID/title-resolved callers keep their request count.
|
|
39
|
+
if (/^[A-Z]+-\d+$/i.test(taskId)) {
|
|
40
|
+
let task;
|
|
41
|
+
try {
|
|
42
|
+
task = await data_provider_1.dataService.getTask(taskId, { enrich: false });
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
this.handleApiError(error);
|
|
46
|
+
}
|
|
47
|
+
if (typeof task?.id !== 'string' || !/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i.test(task.id) ||
|
|
48
|
+
(task.identifier !== undefined && (typeof task.identifier !== 'string' || task.identifier.toUpperCase() !== taskId.toUpperCase()))) {
|
|
49
|
+
this.failWithCliError({
|
|
50
|
+
code: 'TASK_PREFLIGHT_IDENTITY_UNCONFIRMED',
|
|
51
|
+
message: 'The server did not confirm a canonical Task identity for this reference. Inspect tasks show <task> --json before repeating preflight.',
|
|
52
|
+
exit: 2, retryable: false,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
taskId = task.id;
|
|
56
|
+
}
|
|
57
|
+
const report = await (0, task_preflight_1.readTaskPreflight)(taskId, {
|
|
58
|
+
workflow: () => data_provider_1.dataService.getTaskActionability(taskId),
|
|
59
|
+
execution: () => data_provider_1.dataService.previewTaskStart(taskId, flags.skill ? { skillId: flags.skill } : undefined),
|
|
60
|
+
});
|
|
61
|
+
// Only native diagnostic responses establish an identity for _cli; a
|
|
62
|
+
// requested ref is not itself a confirmed Task record.
|
|
63
|
+
const nativeId = report.workflow.status === 'observed' ? report.workflow.value.taskId
|
|
64
|
+
: report.execution.status === 'observed' ? report.execution.value.taskId : null;
|
|
65
|
+
if (flags.json)
|
|
66
|
+
this.printJsonOperation({ ok: report.summary === 'eligible_to_attempt', ...report }, {
|
|
67
|
+
resource: nativeId ? { kind: 'task', id: nativeId } : null,
|
|
68
|
+
task: nativeId ? { id: nativeId } : null,
|
|
69
|
+
});
|
|
70
|
+
else
|
|
71
|
+
for (const line of (0, task_preflight_1.taskPreflightLines)(report, this.config.bin))
|
|
72
|
+
this.log(line);
|
|
73
|
+
if (report.summary !== 'eligible_to_attempt')
|
|
74
|
+
this.exit(report.summary === 'blocked' ? 1 : 2);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.default = TasksPreflight;
|
|
@@ -60,9 +60,28 @@ class TasksRearmRecurrence extends base_command_1.BaseCommand {
|
|
|
60
60
|
const from = finished.identifier || finished.id || taskRef;
|
|
61
61
|
const next = result.successor.identifier || result.successor.id;
|
|
62
62
|
const when = result.successor.scheduledFor ? ` for ${result.successor.scheduledFor}` : '';
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
// The server's sentence IS the answer: it is derived with the JSON fields, so the two can
|
|
64
|
+
// never disagree (round 3 of OSK-15321 found them disagreeing). The fallback below is only
|
|
65
|
+
// for an older server that sends no `message`.
|
|
66
|
+
if (typeof result.message === 'string' && result.message) {
|
|
67
|
+
this.log(result.message);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Never call a successor with no schedule "armed": it will not fire (#4262 verification).
|
|
71
|
+
let line;
|
|
72
|
+
if (!result.successor.scheduledFor) {
|
|
73
|
+
line = `The next occurrence ${next} of the series from ${from} exists but has no schedule, so nothing will fire it on its own; start it by hand or give it a time with \`${this.config.bin} tasks schedule ${next} --at <ISO time>\`.`;
|
|
74
|
+
}
|
|
75
|
+
else if (result.rescheduled) {
|
|
76
|
+
line = `The next occurrence ${next} existed but had no schedule; it is now scheduled${when}. The failure marker is cleared.`;
|
|
77
|
+
}
|
|
78
|
+
else if (result.alreadyArmed) {
|
|
79
|
+
line = `The series from ${from} was already armed: next occurrence ${next}${when}. The failure marker is cleared.`;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
line = `Re-armed the series from ${from}: next occurrence ${next} is scheduled${when}.`;
|
|
83
|
+
}
|
|
84
|
+
this.log(line);
|
|
66
85
|
}
|
|
67
86
|
}
|
|
68
87
|
exports.default = TasksRearmRecurrence;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const list_output_1 = require("../../../lib/list-output");
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
6
|
const base_command_1 = require("../../../base-command");
|
|
@@ -29,7 +30,7 @@ class TasksResourceList extends base_command_1.BaseCommand {
|
|
|
29
30
|
this.handleApiError(error);
|
|
30
31
|
}
|
|
31
32
|
if (flags.json)
|
|
32
|
-
return this.
|
|
33
|
+
return this.printJsonResult((0, list_output_1.listResult)(result));
|
|
33
34
|
if (!result.data.length)
|
|
34
35
|
return this.log('No Resources linked.');
|
|
35
36
|
for (const item of result.data) {
|
|
@@ -42,6 +42,7 @@ const web_url_1 = require("../../../lib/web-url");
|
|
|
42
42
|
const api_fetch_1 = require("../../../lib/api-fetch");
|
|
43
43
|
const task_closure_1 = require("../../../lib/task-closure");
|
|
44
44
|
const session_task_write_1 = require("../../../lib/session-task-write");
|
|
45
|
+
const task_write_attribution_1 = require("../../../lib/task-write-attribution");
|
|
45
46
|
function parseJson(value, label) {
|
|
46
47
|
if (!value)
|
|
47
48
|
return undefined;
|
|
@@ -92,6 +93,7 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
|
|
|
92
93
|
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
93
94
|
};
|
|
94
95
|
async run() {
|
|
96
|
+
this.setJsonOperation({ command: 'tasks:result:submit', mode: 'execute' });
|
|
95
97
|
this.requireAuth();
|
|
96
98
|
const { args, flags } = await this.parse(TasksResultSubmit);
|
|
97
99
|
const task = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.task, flagTask: flags.task });
|
|
@@ -202,8 +204,13 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
|
|
|
202
204
|
this.handleApiError(error);
|
|
203
205
|
}
|
|
204
206
|
const url = (0, web_url_1.taskUrlFrom)(this.cliConfig.baseURL, { id: task.id });
|
|
207
|
+
const attribution = (0, task_write_attribution_1.taskWriteAttribution)(result, 'submittedBy');
|
|
205
208
|
if (flags.json)
|
|
206
|
-
return this.
|
|
209
|
+
return this.printJsonOperation({ ...result, url, attribution }, {
|
|
210
|
+
resource: { kind: 'task_result', id: result?.result?.id },
|
|
211
|
+
task: { id: result?.result?.taskId },
|
|
212
|
+
...(typeof result?.idempotent === 'boolean' ? { replayed: result.idempotent } : {}),
|
|
213
|
+
});
|
|
207
214
|
// Say what came back, never what we hope came back.
|
|
208
215
|
//
|
|
209
216
|
// This line used to read "...; it is ready for review." unconditionally,
|
|
@@ -212,6 +219,8 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
|
|
|
212
219
|
// which the call did not carry. Submitting a Result is not closing a Task;
|
|
213
220
|
// the response now reports where it stands and this prints exactly that.
|
|
214
221
|
this.log(`Submitted Result v${result.result.version} (${result.result.id}) for ${task.id}.`);
|
|
222
|
+
for (const line of (0, task_write_attribution_1.attributionLines)(attribution))
|
|
223
|
+
this.log(line);
|
|
215
224
|
for (const line of (0, task_closure_1.closureReport)(result.closure, { closing: false }))
|
|
216
225
|
this.log(line);
|
|
217
226
|
if (url)
|
|
@@ -22,6 +22,7 @@ class TasksReview extends base_command_1.BaseCommand {
|
|
|
22
22
|
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
23
23
|
};
|
|
24
24
|
async run() {
|
|
25
|
+
this.setJsonOperation({ command: 'tasks:review', mode: 'execute' });
|
|
25
26
|
this.requireAuth();
|
|
26
27
|
const { args, flags } = await this.parse(TasksReview);
|
|
27
28
|
const task = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.task, flagTask: flags.task });
|
|
@@ -47,7 +48,11 @@ class TasksReview extends base_command_1.BaseCommand {
|
|
|
47
48
|
this.handleApiError(error);
|
|
48
49
|
}
|
|
49
50
|
if (flags.json)
|
|
50
|
-
return this.
|
|
51
|
+
return this.printJsonOperation(result, {
|
|
52
|
+
resource: { kind: 'task_review', id: result?.review?.id },
|
|
53
|
+
task: { id: result?.review?.taskId },
|
|
54
|
+
...(typeof result?.idempotent === 'boolean' ? { replayed: result.idempotent } : {}),
|
|
55
|
+
});
|
|
51
56
|
this.log(`Recorded Review: ${flags.decision} for Result ${flags['result-id']}.`);
|
|
52
57
|
}
|
|
53
58
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/** " (via CLI credential)" when the revision recorded its credential channel. */
|
|
3
|
+
export declare function revisionChannelSuffix(rev: Record<string, unknown>): string;
|
|
2
4
|
export default class TasksRevisions extends BaseCommand {
|
|
3
5
|
static description: string;
|
|
4
6
|
static examples: string[];
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.revisionChannelSuffix = revisionChannelSuffix;
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
5
6
|
const base_command_1 = require("../../base-command");
|
|
6
7
|
const format_1 = require("../../lib/format");
|
|
8
|
+
/** " (via CLI credential)" when the revision recorded its credential channel. */
|
|
9
|
+
function revisionChannelSuffix(rev) {
|
|
10
|
+
const via = rev.metadata?.via;
|
|
11
|
+
return (0, data_provider_1.principalChannelSuffix)({ kind: 'human', via });
|
|
12
|
+
}
|
|
7
13
|
class TasksRevisions extends base_command_1.BaseCommand {
|
|
8
14
|
static description = 'List revisions for a task';
|
|
9
15
|
static examples = [
|
|
@@ -39,7 +45,8 @@ class TasksRevisions extends base_command_1.BaseCommand {
|
|
|
39
45
|
const rows = items.map((rev) => ({
|
|
40
46
|
version: String(rev.revisionNumber ?? '-'),
|
|
41
47
|
changeType: String(rev.changeType ?? '-'),
|
|
42
|
-
|
|
48
|
+
// The channel the person's credential came through, when recorded (OSK-16621).
|
|
49
|
+
user: `${String(rev.userId ?? '-')}${revisionChannelSuffix(rev)}`,
|
|
43
50
|
changes: String(Array.isArray(rev.changes) ? rev.changes.length : 0),
|
|
44
51
|
when: rev.createdAt ? String(rev.createdAt).slice(0, 19).replace('T', ' ') : '-',
|
|
45
52
|
}));
|
|
@@ -69,6 +69,14 @@ export declare function labelsLine(labelIds?: string[], nameById?: Map<string, s
|
|
|
69
69
|
* reassigning the task changes only the implied kind.
|
|
70
70
|
*/
|
|
71
71
|
export declare function taskExecutorLabel(t: Record<string, unknown>, bin?: string): string;
|
|
72
|
+
/**
|
|
73
|
+
* The `Resolution:` lines for any resolved Task: how it ended, the reason the
|
|
74
|
+
* closer recorded, who closed it, and what the close stood on. The reason used to
|
|
75
|
+
* be JSON-only, so text showed "Task workflow type is cancelled" for every
|
|
76
|
+
* cancel, and a Task its Workflow step cancelled could not be told from one a
|
|
77
|
+
* person cancelled by hand (OSK-16475). Silent for an open Task.
|
|
78
|
+
*/
|
|
79
|
+
export declare function resolutionLines(t: Record<string, unknown>, names?: Map<string, string>): string[];
|
|
72
80
|
/**
|
|
73
81
|
* The `Recurrence:` line for a series whose next occurrence was never armed.
|
|
74
82
|
* Silent otherwise: a healthy series has nothing to say here.
|