@skrr-ai/cli 0.1.110 → 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 +31 -3
- package/dist/base-command.js +136 -22
- 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/list.js +2 -1
- 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/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/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/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/triggers/list.js +2 -1
- 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 +3 -7
- 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 +97 -4
- 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/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.js +17 -11
- 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/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +25 -2
- 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/list.js +2 -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/list.js +3 -2
- package/dist/commands/workspaces/members.d.ts +1 -0
- package/dist/commands/workspaces/members.js +5 -2
- 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/commitments.d.ts +44 -3
- package/dist/lib/commitments.js +107 -9
- package/dist/lib/compasses.d.ts +4 -0
- package/dist/lib/compasses.js +11 -0
- package/dist/lib/daemon-setup.js +7 -7
- package/dist/lib/daemonHandoff.js +3 -2
- package/dist/lib/dedicated-ssh.d.ts +2 -0
- package/dist/lib/dedicated-ssh.js +98 -28
- 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 +36 -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/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-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 +7 -0
- package/dist/lib/triggers.js +54 -4
- 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/workspaces.d.ts +11 -4
- package/dist/lib/workspaces.js +7 -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/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/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 +30 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +25239 -18730
- package/docs/v1/operations.md +52 -0
- package/docs/v1/space-search.md +19 -0
- package/oclif.manifest.json +4719 -479
- package/package.json +23 -2
package/dist/lib/machines.js
CHANGED
|
@@ -6,6 +6,7 @@ exports.isReachableMachine = isReachableMachine;
|
|
|
6
6
|
exports.isOwnComputer = isOwnComputer;
|
|
7
7
|
exports.isListedByDefault = isListedByDefault;
|
|
8
8
|
exports.parseDaemonId = parseDaemonId;
|
|
9
|
+
exports.harnessStateLabel = harnessStateLabel;
|
|
9
10
|
exports.summarizeDaemons = summarizeDaemons;
|
|
10
11
|
exports.isThisComputer = isThisComputer;
|
|
11
12
|
exports.machineListView = machineListView;
|
|
@@ -15,6 +16,7 @@ exports.getMachine = getMachine;
|
|
|
15
16
|
exports.updateMachine = updateMachine;
|
|
16
17
|
exports.disconnectMachine = disconnectMachine;
|
|
17
18
|
exports.resolveMachineRef = resolveMachineRef;
|
|
19
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
18
20
|
const api_fetch_1 = require("./api-fetch");
|
|
19
21
|
/**
|
|
20
22
|
* What a machine's state actually is, when `offline` is doing two jobs.
|
|
@@ -31,11 +33,15 @@ const api_fetch_1 = require("./api-fetch");
|
|
|
31
33
|
* could come back says so, and a destroyed one cannot.
|
|
32
34
|
*/
|
|
33
35
|
function machineStateLabel(machine) {
|
|
34
|
-
// `degraded` is the machine's status while a daemon is silent
|
|
35
|
-
// same as a sign-in problem or one provider
|
|
36
|
-
// it is; the word a person reads is that one
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
// `degraded` is the machine's status while a daemon is silent or its connection
|
|
37
|
+
// has just closed, and it reads the same as a sign-in problem or one provider
|
|
38
|
+
// being down. The server says which it is; the word a person reads is that one
|
|
39
|
+
// (OSK-16442).
|
|
40
|
+
if (machine.status === 'degraded') {
|
|
41
|
+
const contact = machine.contact?.state;
|
|
42
|
+
if (contact === 'stale' || contact === 'reconnecting')
|
|
43
|
+
return data_provider_1.DAEMON_CONTACT_WORDS[contact];
|
|
44
|
+
}
|
|
39
45
|
if (machine.status !== 'offline')
|
|
40
46
|
return machine.status;
|
|
41
47
|
// A computer somebody installed a daemon on has no lease to resume and nothing
|
|
@@ -132,6 +138,11 @@ function newerStamp(a, b) {
|
|
|
132
138
|
return a;
|
|
133
139
|
return new Date(b).getTime() > new Date(a).getTime() ? b : a;
|
|
134
140
|
}
|
|
141
|
+
const RANK = { online: 0, reconnecting: 1, stale: 2, offline: 3 };
|
|
142
|
+
/** The word the tables print for one harness row: the server's statement, not the bare status. */
|
|
143
|
+
function harnessStateLabel(row) {
|
|
144
|
+
return data_provider_1.DAEMON_CONTACT_WORDS[(0, data_provider_1.daemonContactOfRow)(row)];
|
|
145
|
+
}
|
|
135
146
|
function summarizeDaemons(harnesses, activeProfile) {
|
|
136
147
|
const byDaemon = new Map();
|
|
137
148
|
for (const row of harnesses) {
|
|
@@ -152,18 +163,18 @@ function summarizeDaemons(harnesses, activeProfile) {
|
|
|
152
163
|
entry.harnessCount += 1;
|
|
153
164
|
if (row.superseded === true)
|
|
154
165
|
entry.supersededCount += 1;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
// The server's statement for this row, read, not recomputed. A daemon is as
|
|
167
|
+
// heard-from as its best row.
|
|
168
|
+
const state = (0, data_provider_1.daemonContactOfRow)(row);
|
|
169
|
+
const rowStatus = state === 'live' ? 'online' : state;
|
|
170
|
+
if (RANK[rowStatus] < RANK[entry.status])
|
|
171
|
+
entry.status = rowStatus;
|
|
161
172
|
entry.lastSeenAt = newerStamp(entry.lastSeenAt, row.lastSeenAt);
|
|
162
173
|
byDaemon.set(row.daemonId, entry);
|
|
163
174
|
}
|
|
164
|
-
// Connected first, then silent, then gone, each by
|
|
165
|
-
// person is looking for is on top.
|
|
166
|
-
const rank =
|
|
175
|
+
// Connected first, then waiting on a reconnect, then silent, then gone, each by
|
|
176
|
+
// most recently seen: the one a person is looking for is on top.
|
|
177
|
+
const rank = RANK;
|
|
167
178
|
return [...byDaemon.values()].sort((a, b) => {
|
|
168
179
|
if (a.status !== b.status)
|
|
169
180
|
return rank[a.status] - rank[b.status];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Member discovery promises identity and access, not image transport credentials. */
|
|
2
|
+
export declare const memberImageFlags: {
|
|
3
|
+
'include-images': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
4
|
+
};
|
|
5
|
+
/** Only the explicit image flag expands a member; --raw affects storage fields only. */
|
|
6
|
+
export declare function memberAvatar(raw: {
|
|
7
|
+
avatar?: unknown;
|
|
8
|
+
} | null | undefined, includeImages?: boolean): {
|
|
9
|
+
avatar?: string;
|
|
10
|
+
};
|
|
11
|
+
/** Allowlist scalar fields so future provider additions cannot inflate routine logs. */
|
|
12
|
+
export declare function projectMemberPrincipal(raw: Record<string, unknown>, includeImages?: boolean): Record<string, unknown>;
|
|
13
|
+
/** Do not spread provider metadata: it can carry another copy of a raw principal. */
|
|
14
|
+
export declare function projectSpaceMembership(response: {
|
|
15
|
+
resourceType: string;
|
|
16
|
+
resourceId: string;
|
|
17
|
+
principals: Array<Record<string, unknown>>;
|
|
18
|
+
public: boolean;
|
|
19
|
+
publicAccessRoleId?: string;
|
|
20
|
+
}, includeImages?: boolean): Record<string, unknown>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.memberImageFlags = void 0;
|
|
4
|
+
exports.memberAvatar = memberAvatar;
|
|
5
|
+
exports.projectMemberPrincipal = projectMemberPrincipal;
|
|
6
|
+
exports.projectSpaceMembership = projectSpaceMembership;
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
/** Member discovery promises identity and access, not image transport credentials. */
|
|
9
|
+
exports.memberImageFlags = {
|
|
10
|
+
'include-images': core_1.Flags.boolean({
|
|
11
|
+
description: 'Include avatar URLs in JSON. These may be temporary signed URLs containing authorization query parameters; avoid recording or sharing them.',
|
|
12
|
+
default: false,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
/** Only the explicit image flag expands a member; --raw affects storage fields only. */
|
|
16
|
+
function memberAvatar(raw, includeImages = false) {
|
|
17
|
+
return includeImages && typeof raw?.avatar === 'string'
|
|
18
|
+
? { avatar: raw.avatar }
|
|
19
|
+
: {};
|
|
20
|
+
}
|
|
21
|
+
const PRINCIPAL_FIELDS = [
|
|
22
|
+
'type',
|
|
23
|
+
'id',
|
|
24
|
+
'idOnTheSource',
|
|
25
|
+
'name',
|
|
26
|
+
'email',
|
|
27
|
+
'source',
|
|
28
|
+
'accessRoleId',
|
|
29
|
+
'memberCount',
|
|
30
|
+
'harnessProvider',
|
|
31
|
+
'harnessName',
|
|
32
|
+
'harnessStatus',
|
|
33
|
+
'harnessLastSeenAt',
|
|
34
|
+
];
|
|
35
|
+
/** Allowlist scalar fields so future provider additions cannot inflate routine logs. */
|
|
36
|
+
function projectMemberPrincipal(raw, includeImages = false) {
|
|
37
|
+
const member = {};
|
|
38
|
+
for (const field of PRINCIPAL_FIELDS) {
|
|
39
|
+
const value = raw[field];
|
|
40
|
+
if (typeof value === 'string' || typeof value === 'number' || value === null) {
|
|
41
|
+
member[field] = value;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return { ...member, ...memberAvatar(raw, includeImages) };
|
|
45
|
+
}
|
|
46
|
+
/** Do not spread provider metadata: it can carry another copy of a raw principal. */
|
|
47
|
+
function projectSpaceMembership(response, includeImages = false) {
|
|
48
|
+
return {
|
|
49
|
+
resourceType: response.resourceType,
|
|
50
|
+
resourceId: response.resourceId,
|
|
51
|
+
principals: response.principals.map((member) => projectMemberPrincipal(member, includeImages)),
|
|
52
|
+
public: response.public,
|
|
53
|
+
...(response.publicAccessRoleId === undefined
|
|
54
|
+
? {}
|
|
55
|
+
: { publicAccessRoleId: response.publicAccessRoleId }),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -16,6 +16,13 @@ type GateLike = {
|
|
|
16
16
|
export declare function sourceRefusalWords(code: string): string;
|
|
17
17
|
/** Extra lines under a gate, or none. The gate's own note is printed by the caller. */
|
|
18
18
|
export declare function gateExplanationLines(gate: GateLike): string[];
|
|
19
|
+
/**
|
|
20
|
+
* One line per execution target under "Is there somewhere else it can run?" (OSK-17003): the
|
|
21
|
+
* product, consent, contract and reachability the resolver would apply. The gate used to report a
|
|
22
|
+
* bare `fallbackCandidates` count, which read the same for a fallback that could take the run and
|
|
23
|
+
* one that never could. Nothing is printed for a single primary — the gate's note says that.
|
|
24
|
+
*/
|
|
25
|
+
export declare function placementTargetLines(gate: GateLike): string[];
|
|
19
26
|
/**
|
|
20
27
|
* The status word for a capability. A credential whose expiry has passed is `expired`, not the
|
|
21
28
|
* storage word `stale`, which gave no sign that time had run out.
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.sourceRefusalWords = sourceRefusalWords;
|
|
12
12
|
exports.gateExplanationLines = gateExplanationLines;
|
|
13
|
+
exports.placementTargetLines = placementTargetLines;
|
|
13
14
|
exports.capabilityStatusLabel = capabilityStatusLabel;
|
|
14
15
|
/** What a refused event-source code means, in words. An unknown code is printed as it is. */
|
|
15
16
|
const SOURCE_REFUSAL_WORDS = {
|
|
@@ -74,6 +75,36 @@ function gateExplanationLines(gate) {
|
|
|
74
75
|
}
|
|
75
76
|
return [];
|
|
76
77
|
}
|
|
78
|
+
function placementTargetWords(target) {
|
|
79
|
+
if (target.reachable === false)
|
|
80
|
+
return 'the chain never reaches it';
|
|
81
|
+
if (target.consent?.granted === false) {
|
|
82
|
+
return `consent refused${target.consent.reason ? ` (${target.consent.reason})` : ''}`;
|
|
83
|
+
}
|
|
84
|
+
if (target.contract?.verdict === 'unknown')
|
|
85
|
+
return 'contract support could not be read';
|
|
86
|
+
if (target.contract?.verdict && target.contract.verdict !== 'pass') {
|
|
87
|
+
return `cannot enforce the contract${target.contract.reason ? ` (${target.contract.reason})` : ''}`;
|
|
88
|
+
}
|
|
89
|
+
return target.usable ? 'could take the run' : 'unknown';
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* One line per execution target under "Is there somewhere else it can run?" (OSK-17003): the
|
|
93
|
+
* product, consent, contract and reachability the resolver would apply. The gate used to report a
|
|
94
|
+
* bare `fallbackCandidates` count, which read the same for a fallback that could take the run and
|
|
95
|
+
* one that never could. Nothing is printed for a single primary — the gate's note says that.
|
|
96
|
+
*/
|
|
97
|
+
function placementTargetLines(gate) {
|
|
98
|
+
if (gate.id !== 'placement')
|
|
99
|
+
return [];
|
|
100
|
+
const targets = Array.isArray(gate.detail?.targets)
|
|
101
|
+
? gate.detail.targets
|
|
102
|
+
: [];
|
|
103
|
+
if (targets.length < 2)
|
|
104
|
+
return [];
|
|
105
|
+
return targets.map((target) => `#${target.index ?? '?'} ${target.role ?? 'target'} ${target.product ?? 'unknown'}` +
|
|
106
|
+
`${target.selector ? ` (${target.selector})` : ''}: ${placementTargetWords(target)}`);
|
|
107
|
+
}
|
|
77
108
|
/**
|
|
78
109
|
* The status word for a capability. A credential whose expiry has passed is `expired`, not the
|
|
79
110
|
* storage word `stale`, which gave no sign that time had run out.
|
package/dist/lib/roles.d.ts
CHANGED
|
@@ -105,7 +105,7 @@ export declare const roleApi: {
|
|
|
105
105
|
} | undefined;
|
|
106
106
|
escalation?: {
|
|
107
107
|
minimumSeverity?: "low" | "medium" | "high" | undefined;
|
|
108
|
-
channel?: "push" | "none" | "
|
|
108
|
+
channel?: "push" | "none" | "cli" | "app" | "email" | "slack" | undefined;
|
|
109
109
|
} | undefined;
|
|
110
110
|
noReply?: {
|
|
111
111
|
enabled?: boolean | undefined;
|
|
@@ -182,7 +182,7 @@ export declare const roleApi: {
|
|
|
182
182
|
} | undefined;
|
|
183
183
|
escalation?: {
|
|
184
184
|
minimumSeverity?: "low" | "medium" | "high" | undefined;
|
|
185
|
-
channel?: "push" | "none" | "
|
|
185
|
+
channel?: "push" | "none" | "cli" | "app" | "email" | "slack" | undefined;
|
|
186
186
|
} | undefined;
|
|
187
187
|
noReply?: {
|
|
188
188
|
enabled?: boolean | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** The server owns admission; this is a display projection, never a permission grant. */
|
|
2
|
+
import type { TaskExecutionAdmission } from '@skrr-ai/data-provider';
|
|
3
|
+
export type { TaskExecutionAdmission } from '@skrr-ai/data-provider';
|
|
4
|
+
export declare function admissionLines(value: TaskExecutionAdmission | null | undefined): string[];
|
|
5
|
+
export declare function isAdmissionPreview(value: unknown): value is {
|
|
6
|
+
dryRun: true;
|
|
7
|
+
taskId: string;
|
|
8
|
+
executionAdmission: TaskExecutionAdmission;
|
|
9
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.admissionLines = admissionLines;
|
|
4
|
+
exports.isAdmissionPreview = isAdmissionPreview;
|
|
5
|
+
function admissionLines(value) {
|
|
6
|
+
if (!value)
|
|
7
|
+
return ['Execution admission: not reported by this server.'];
|
|
8
|
+
const lines = [`Approval prerequisites: ${value.state}.`];
|
|
9
|
+
if (value.permission) {
|
|
10
|
+
lines.push(`Permission policy: ${value.permission.mode || 'inherited/unknown'} (${value.permission.source || 'source unavailable'}).`);
|
|
11
|
+
}
|
|
12
|
+
if (value.workingDirectory) {
|
|
13
|
+
lines.push(`Working directory: ${value.workingDirectory.path || 'daemon configured default'} (${value.workingDirectory.source}; existence and access are checked on the machine at start).`);
|
|
14
|
+
}
|
|
15
|
+
if (value.unattended && !value.approverAvailable) {
|
|
16
|
+
lines.push('This run is unattended. Tools that need approval cannot obtain it during the run.');
|
|
17
|
+
}
|
|
18
|
+
for (const constraint of value.constraints || []) {
|
|
19
|
+
if (constraint.message)
|
|
20
|
+
lines.push(constraint.message);
|
|
21
|
+
if (constraint.requiredAction)
|
|
22
|
+
lines.push(`Action: ${constraint.requiredAction}`);
|
|
23
|
+
}
|
|
24
|
+
lines.push('This checks execution prerequisites; task authorization and tool permissions still apply.');
|
|
25
|
+
return lines;
|
|
26
|
+
}
|
|
27
|
+
function isAdmissionPreview(value) {
|
|
28
|
+
if (!value || typeof value !== 'object')
|
|
29
|
+
return false;
|
|
30
|
+
const row = value;
|
|
31
|
+
const admission = row.executionAdmission;
|
|
32
|
+
return row.dryRun === true && typeof row.taskId === 'string' && Boolean(admission &&
|
|
33
|
+
['ready', 'blocked', 'unknown'].includes(String(admission.state)) &&
|
|
34
|
+
admission.scope === 'approval_prerequisites');
|
|
35
|
+
}
|
package/dist/lib/task-batch.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ export type BatchProgress = {
|
|
|
72
72
|
total: number;
|
|
73
73
|
round: number;
|
|
74
74
|
elapsedMs: number;
|
|
75
|
+
/** Submitted writes whose outcomes are still unknown after reconciliation. */
|
|
76
|
+
unknownKeys?: string[];
|
|
75
77
|
/** Set while waiting before the next attempt, with why. */
|
|
76
78
|
waiting?: {
|
|
77
79
|
ms: number;
|
|
@@ -79,6 +81,8 @@ export type BatchProgress = {
|
|
|
79
81
|
};
|
|
80
82
|
};
|
|
81
83
|
export type BatchCreateOptions = {
|
|
84
|
+
/** Called immediately before submitting a request; submitted writes may outlive the client. */
|
|
85
|
+
onSubmit?: (nodes: BatchCreateNode[]) => void;
|
|
82
86
|
onProgress?: (progress: BatchProgress) => void;
|
|
83
87
|
};
|
|
84
88
|
/**
|
package/dist/lib/task-batch.js
CHANGED
|
@@ -206,6 +206,7 @@ async function createNodesViaBatch(nodes, mapping, options = {}) {
|
|
|
206
206
|
total: nodes.length,
|
|
207
207
|
round,
|
|
208
208
|
elapsedMs: Date.now() - startedAt,
|
|
209
|
+
unknownKeys: [...unknown],
|
|
209
210
|
...(waiting ? { waiting } : {}),
|
|
210
211
|
});
|
|
211
212
|
/** Everything still owed becomes a failure that says whether it may exist. */
|
|
@@ -314,6 +315,7 @@ async function createNodesViaBatch(nodes, mapping, options = {}) {
|
|
|
314
315
|
let waitReason = 'the server confirmed nothing';
|
|
315
316
|
let response;
|
|
316
317
|
try {
|
|
318
|
+
options.onSubmit?.(sent);
|
|
317
319
|
response = await data_provider_1.dataService.createTasksBatch(items, {
|
|
318
320
|
idempotencyKey: batchIdempotencyKey('create', items),
|
|
319
321
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Documentation and display paths only. The server still owns allowedActions. */
|
|
2
|
+
export declare function taskActionCommand(action: string, taskId: string, targetId: string | undefined, bin?: string, context?: {
|
|
3
|
+
allowedActions?: ReadonlyArray<{
|
|
4
|
+
action: string;
|
|
5
|
+
}>;
|
|
6
|
+
}): string | undefined;
|
|
7
|
+
export declare function taskOperationsGuide(bin?: string): {
|
|
8
|
+
title: string;
|
|
9
|
+
sections: ({
|
|
10
|
+
title: string;
|
|
11
|
+
commands: {
|
|
12
|
+
command: string;
|
|
13
|
+
purpose: string;
|
|
14
|
+
}[];
|
|
15
|
+
note?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
title: string;
|
|
18
|
+
note: string;
|
|
19
|
+
commands: {
|
|
20
|
+
command: string;
|
|
21
|
+
purpose: string;
|
|
22
|
+
}[];
|
|
23
|
+
})[];
|
|
24
|
+
};
|
|
25
|
+
export declare function taskOperationsGuideLines(bin?: string): string[];
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.taskActionCommand = taskActionCommand;
|
|
4
|
+
exports.taskOperationsGuide = taskOperationsGuide;
|
|
5
|
+
exports.taskOperationsGuideLines = taskOperationsGuideLines;
|
|
6
|
+
const shell_quote_1 = require("./shell-quote");
|
|
7
|
+
/** Documentation and display paths only. The server still owns allowedActions. */
|
|
8
|
+
function taskActionCommand(action, taskId, targetId, bin = 'skrr', context = {}) {
|
|
9
|
+
const task = (0, shell_quote_1.shellQuoteArg)(taskId);
|
|
10
|
+
const target = targetId ? (0, shell_quote_1.shellQuoteArg)(targetId) : '<id>';
|
|
11
|
+
const commands = {
|
|
12
|
+
answer_human_input: `tasks input answer ${task} --request ${target} --text <answer>`,
|
|
13
|
+
assign_task: `tasks assign ${task} --help`,
|
|
14
|
+
// Managed work already has a current Result. Its server-declared
|
|
15
|
+
// continuation surface distinguishes closing from submitting a new Result.
|
|
16
|
+
complete_task: context.allowedActions?.some(item => item.action === 'continue_task')
|
|
17
|
+
? `tasks move ${task} --status done`
|
|
18
|
+
: `tasks complete ${task}`,
|
|
19
|
+
continue_task: `tasks continue ${task} --text "<instruction>" --command-key <key>`,
|
|
20
|
+
dismiss_human_input: `tasks input dismiss ${task} --request ${target}`,
|
|
21
|
+
inspect_dependency: `tasks show ${target} --json`,
|
|
22
|
+
interrupt_task: `tasks interrupt ${task}`,
|
|
23
|
+
request_approval: `tasks approvals create ${task} --type <review|sign_off|deployment>`,
|
|
24
|
+
resolve_approval: `tasks approvals resolve ${task} ${target} --status <approved|rejected>`,
|
|
25
|
+
resolve_task_hold: `tasks move ${task} --status <status>`,
|
|
26
|
+
retry_task: `tasks retry ${task}`,
|
|
27
|
+
set_execution_mode: `tasks update ${task} --execution-mode <agent|human>`,
|
|
28
|
+
start_task: `tasks start ${task}`,
|
|
29
|
+
triage_task: `tasks triage ${task}`,
|
|
30
|
+
unschedule_task: `tasks unschedule ${task}`,
|
|
31
|
+
};
|
|
32
|
+
return commands[action] ? `${bin} ${commands[action]}` : undefined;
|
|
33
|
+
}
|
|
34
|
+
function taskOperationsGuide(bin = 'skrr') {
|
|
35
|
+
const command = (usage, purpose) => ({ command: `${bin} ${usage}`, purpose });
|
|
36
|
+
return {
|
|
37
|
+
title: 'Task operations',
|
|
38
|
+
sections: [
|
|
39
|
+
{
|
|
40
|
+
title: 'Inspect and plan',
|
|
41
|
+
commands: [
|
|
42
|
+
command('tasks show <task> --json', 'Read the Task, assignment, and dependency IDs.'),
|
|
43
|
+
command('tasks actionability <task>', 'Read the canonical next actor, blocker, and allowed actions.'),
|
|
44
|
+
command('tasks preflight <task>', 'Read workflow actionability and execution prerequisites together; creates no Run.'),
|
|
45
|
+
command('tasks ready --for agent --agent <agent-id>', 'Find workflow-actionable work for an Agent; this does not verify its runtime.'),
|
|
46
|
+
command('tasks create-tree --help', 'Create a related Task tree; blockedByTempIds declares dependencies within that tree.'),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
title: 'Choose assignment',
|
|
51
|
+
note: 'Executor intent, assignment, and starting a Run are separate choices. --unassigned clears both assignee kinds and suppresses automatic defaults; it does not start work.',
|
|
52
|
+
commands: [
|
|
53
|
+
command('tasks create --title "Task title" --execution-mode agent --unassigned --dry-run --json', 'Preview Agent-intended work without selecting an Agent or writing a Task.'),
|
|
54
|
+
command('tasks assign <task> --unassigned', 'Clear current assignees while retaining executor intent; creates no Run.'),
|
|
55
|
+
command('tasks assign <task> --help', 'Choose an eligible Human or Agent explicitly using the native assignment options.'),
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
title: 'Apply and recover a batch',
|
|
60
|
+
note: 'Keep the same JSON, scope, and external-key options after an incomplete result. Explicit node externalKey values are preserved; otherwise keys derive from the file and defaults. Changing that input can name new Tasks.',
|
|
61
|
+
commands: [
|
|
62
|
+
command('tasks create-tree --from-json tasks.json --unassigned --readback --json', 'Apply the batch and reread its declared structured fields. This does not start Tasks.'),
|
|
63
|
+
command('tasks create-tree --from-json tasks.json --unassigned --resume --readback --json', 'Continue the unchanged file: confirm existing IDs without patching them, create only missing nodes, then read back.'),
|
|
64
|
+
command('tasks create-tree --from-json tasks.json --unassigned --verify-spec --json', 'Read-only structured-field comparison. Rich text and unsupported fields are explicitly unchecked; no Expectation assessment or drift repair is performed.'),
|
|
65
|
+
command('tasks create-tree --from-json tasks.json --verify --json', 'Read-only existence check by external key. This makes no specification-equality claim.'),
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: 'Name a Project or Goal',
|
|
70
|
+
note: 'Use exact scoped Project/Goal titles, native refs, or canonical IDs. Duplicate names refuse instead of choosing one. A qualified Project supplies containment; a qualified Goal changes the Goal relationship without moving the Task. Project external keys remain exact and case-sensitive, including keys containing slashes.',
|
|
71
|
+
commands: [
|
|
72
|
+
command('tasks create --title "Task title" --space <space-id> --project "Exact project title" --goal "Exact Goal title" --unassigned --dry-run --json', 'Preview exact names inside the selected Space.'),
|
|
73
|
+
command('tasks create --title "Task title" --project "<space-ref>/<project-ref-or-exact-title>" --goal "<space-ref>/<Goal-exact-title>" --unassigned --dry-run --json', 'Preview qualified references; native relationship permissions still apply.'),
|
|
74
|
+
command('tasks create --title "Task title" --space <space-id> --project "<project-external-key>" --unassigned --dry-run --json', 'Reuse an existing Project’s native external key without rewriting it.'),
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
title: 'Edit dependencies',
|
|
79
|
+
note: 'A waits for B: update A with --add-blocked-by B. These commands change dependencies; inspecting a blocker does not remove it.',
|
|
80
|
+
commands: [
|
|
81
|
+
command('tasks update <task-A> --add-blocked-by <task-B>', 'Make A wait for B.'),
|
|
82
|
+
command('tasks update <task-A> --remove-blocked-by <task-B>', 'Remove that dependency when the relationship is no longer intended.'),
|
|
83
|
+
command('tasks update <task-B> --add-blocks <task-A>', 'The same relationship, edited from B.'),
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: 'Check execution before starting',
|
|
88
|
+
note: 'Preflight reads server projections at separate times. It runs no shell command and cannot prove machine directory access, tool availability, or future approval. Starting rechecks current authority.',
|
|
89
|
+
commands: [
|
|
90
|
+
command('tasks start <task> --dry-run --json', 'Read only the server-owned execution preview through the dedicated preview endpoint.'),
|
|
91
|
+
command('agents show <agent-id>', 'Inspect the assigned Agent and its configured runtime.'),
|
|
92
|
+
command('harnesses show <harness-id> --json', 'Inspect the actual Harness record and reported provider credential readiness, where available.'),
|
|
93
|
+
command('harnesses installers --daemon <daemon-id>', 'Ask that daemon about installed coding CLIs and sign-in where it can tell; this is not a shell execution test.'),
|
|
94
|
+
command('harnesses ping <harness-id>', 'Explicitly probe a local daemon for reachability; an answer does not prove a provider can run a task.'),
|
|
95
|
+
command('tasks start <task>', 'Start a new Run after reviewing the checks. This command executes work.'),
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'Follow and finish',
|
|
100
|
+
commands: [
|
|
101
|
+
command('tasks show <task>', 'Inspect current execution and follow the Task link.'),
|
|
102
|
+
command('tasks expectations <task>', 'Read what is owed and how it will be checked.'),
|
|
103
|
+
command('tasks result submit <task> --help', 'Submit the concrete result and evidence.'),
|
|
104
|
+
command('tasks review <task> --help', 'Review another actor’s exact Result.'),
|
|
105
|
+
command('tasks complete <task> --help', 'Submit a Result and close out when appropriate.'),
|
|
106
|
+
command('instructions guide task-management', 'Read the detailed canonical workflow guide; --offline uses the bundled release copy.'),
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function taskOperationsGuideLines(bin = 'skrr') {
|
|
113
|
+
const guide = taskOperationsGuide(bin);
|
|
114
|
+
const lines = [guide.title];
|
|
115
|
+
for (const section of guide.sections) {
|
|
116
|
+
lines.push('', section.title);
|
|
117
|
+
if (section.note)
|
|
118
|
+
lines.push(section.note);
|
|
119
|
+
for (const entry of section.commands)
|
|
120
|
+
lines.push(` ${entry.command}\n ${entry.purpose}`);
|
|
121
|
+
}
|
|
122
|
+
return lines;
|
|
123
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TaskActionabilityResponse } from '@skrr-ai/data-provider';
|
|
2
|
+
type AdmissionPreview = {
|
|
3
|
+
dryRun: true;
|
|
4
|
+
taskId: string;
|
|
5
|
+
taskSpecVersion?: number | null;
|
|
6
|
+
taskRevision?: number | null;
|
|
7
|
+
executionAdmission: import('./task-admission').TaskExecutionAdmission;
|
|
8
|
+
};
|
|
9
|
+
type Observation<T> = {
|
|
10
|
+
status: 'observed';
|
|
11
|
+
certainty: 'server_projection';
|
|
12
|
+
value: T;
|
|
13
|
+
} | {
|
|
14
|
+
status: 'unavailable';
|
|
15
|
+
certainty: 'unknown';
|
|
16
|
+
code: string;
|
|
17
|
+
httpStatus?: number;
|
|
18
|
+
message: string;
|
|
19
|
+
remedy: string;
|
|
20
|
+
};
|
|
21
|
+
export type TaskPreflight = {
|
|
22
|
+
taskId: string;
|
|
23
|
+
summary: 'eligible_to_attempt' | 'blocked' | 'unknown';
|
|
24
|
+
workflow: Observation<TaskActionabilityResponse>;
|
|
25
|
+
execution: Observation<AdmissionPreview>;
|
|
26
|
+
consistency: 'independent_observations';
|
|
27
|
+
limits: string[];
|
|
28
|
+
};
|
|
29
|
+
/** Compose native reads. This module cannot dispatch execution or infer grants. */
|
|
30
|
+
export declare function readTaskPreflight(taskId: string, reads: {
|
|
31
|
+
workflow: () => Promise<unknown>;
|
|
32
|
+
execution: () => Promise<unknown>;
|
|
33
|
+
}): Promise<TaskPreflight>;
|
|
34
|
+
export declare function taskPreflightLines(report: TaskPreflight, bin?: string): string[];
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readTaskPreflight = readTaskPreflight;
|
|
4
|
+
exports.taskPreflightLines = taskPreflightLines;
|
|
5
|
+
const task_admission_1 = require("./task-admission");
|
|
6
|
+
const task_operations_1 = require("./task-operations");
|
|
7
|
+
const LIMITS = [
|
|
8
|
+
'Workflow and execution checks are separate server observations, not an atomic reservation.',
|
|
9
|
+
'No Run, shell command, machine probe, or branch checkout was performed.',
|
|
10
|
+
'Tool availability, working-directory access, and successful provider execution remain unverified.',
|
|
11
|
+
'Starting rechecks current Task authorization, runtime admission, and tool permissions.',
|
|
12
|
+
];
|
|
13
|
+
function unavailable(error, label) {
|
|
14
|
+
const row = error && typeof error === 'object' ? error : {};
|
|
15
|
+
const status = typeof row.status === 'number' ? row.status : undefined;
|
|
16
|
+
let code = typeof row.code === 'string' && /^[A-Z][A-Z0-9_]{0,100}$/.test(row.code) ? row.code : undefined;
|
|
17
|
+
// Keep the native typed refusal without echoing an arbitrary response body,
|
|
18
|
+
// HTML proxy page, request URL, or credential into diagnostics.
|
|
19
|
+
if (!code && typeof row.body === 'string') {
|
|
20
|
+
try {
|
|
21
|
+
const body = JSON.parse(row.body);
|
|
22
|
+
if (typeof body?.code === 'string' && /^[A-Z][A-Z0-9_]{0,100}$/.test(body.code))
|
|
23
|
+
code = body.code;
|
|
24
|
+
}
|
|
25
|
+
catch { /* non-JSON server refusal */ }
|
|
26
|
+
}
|
|
27
|
+
const remedy = status === 401
|
|
28
|
+
? 'Restore the current CLI sign-in or delegated runtime credential, then repeat this read-only check.'
|
|
29
|
+
: status === 403
|
|
30
|
+
? 'Ask the Task owner or an authorized administrator to check your access; preflight does not bypass permissions.'
|
|
31
|
+
: status === 404
|
|
32
|
+
? 'Check the Task reference and server support for this diagnostic. No start fallback was attempted.'
|
|
33
|
+
: 'Read tasks actionability and tasks start --dry-run separately for the native refusal, then repeat preflight after resolving it.';
|
|
34
|
+
return {
|
|
35
|
+
status: 'unavailable', certainty: 'unknown', code: code || 'TASK_PREFLIGHT_UNAVAILABLE',
|
|
36
|
+
...(status ? { httpStatus: status } : {}),
|
|
37
|
+
message: `${label} could not be confirmed${status ? ` (HTTP ${status})` : ''}.`, remedy,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function isWorkflow(value, taskId) {
|
|
41
|
+
if (!value || typeof value !== 'object')
|
|
42
|
+
return false;
|
|
43
|
+
const row = value;
|
|
44
|
+
const a = row.actionability;
|
|
45
|
+
return row.taskId === taskId && Boolean(a &&
|
|
46
|
+
['ready', 'running', 'waiting', 'terminal'].includes(a.state) &&
|
|
47
|
+
['agent', 'human', 'system', 'external', 'none'].includes(a.nextActor) &&
|
|
48
|
+
typeof a.reasonCode === 'string' && typeof a.reason === 'string' &&
|
|
49
|
+
(a.actorRefs === undefined || Array.isArray(a.actorRefs) && a.actorRefs.every(ref => ref && ['user', 'agent'].includes(ref.kind) && typeof ref.id === 'string')) &&
|
|
50
|
+
Array.isArray(a.allowedActions) && a.allowedActions.every(action => action &&
|
|
51
|
+
typeof action.action === 'string' && (action.targetId === undefined || typeof action.targetId === 'string')));
|
|
52
|
+
}
|
|
53
|
+
function isPreview(value, taskId) {
|
|
54
|
+
if (!(0, task_admission_1.isAdmissionPreview)(value) || value.taskId !== taskId)
|
|
55
|
+
return false;
|
|
56
|
+
const a = value.executionAdmission;
|
|
57
|
+
return Boolean(typeof a.unattended === 'boolean' && typeof a.approverAvailable === 'boolean' &&
|
|
58
|
+
(a.constraints === undefined || Array.isArray(a.constraints) && a.constraints.every(c => c &&
|
|
59
|
+
(c.message === undefined || typeof c.message === 'string') &&
|
|
60
|
+
(c.requiredAction === undefined || typeof c.requiredAction === 'string'))) &&
|
|
61
|
+
(a.permission === undefined || a.permission && typeof a.permission === 'object' &&
|
|
62
|
+
(a.permission.mode == null || typeof a.permission.mode === 'string') &&
|
|
63
|
+
(a.permission.source === undefined || typeof a.permission.source === 'string')) &&
|
|
64
|
+
(a.shell === undefined || a.shell && typeof a.shell === 'object' &&
|
|
65
|
+
(a.shell.state === undefined || typeof a.shell.state === 'string')) &&
|
|
66
|
+
(a.workingDirectory === undefined || a.workingDirectory &&
|
|
67
|
+
(a.workingDirectory.path === null || typeof a.workingDirectory.path === 'string') &&
|
|
68
|
+
typeof a.workingDirectory.source === 'string'));
|
|
69
|
+
}
|
|
70
|
+
/** Compose native reads. This module cannot dispatch execution or infer grants. */
|
|
71
|
+
async function readTaskPreflight(taskId, reads) {
|
|
72
|
+
const [workflowResult, executionResult] = await Promise.allSettled([
|
|
73
|
+
Promise.resolve().then(reads.workflow), Promise.resolve().then(reads.execution),
|
|
74
|
+
]);
|
|
75
|
+
const workflow = workflowResult.status === 'fulfilled' && isWorkflow(workflowResult.value, taskId)
|
|
76
|
+
? { status: 'observed', certainty: 'server_projection', value: workflowResult.value }
|
|
77
|
+
: unavailable(workflowResult.status === 'rejected' ? workflowResult.reason : { code: 'TASK_ACTIONABILITY_UNSUPPORTED' }, 'Workflow actionability');
|
|
78
|
+
const execution = executionResult.status === 'fulfilled' && isPreview(executionResult.value, taskId)
|
|
79
|
+
? { status: 'observed', certainty: 'server_projection', value: executionResult.value }
|
|
80
|
+
: unavailable(executionResult.status === 'rejected' ? executionResult.reason : { code: 'TASK_START_PREVIEW_UNSUPPORTED' }, 'Execution preview');
|
|
81
|
+
// actionability.revision is the attention revision, not Task.version from
|
|
82
|
+
// start-preview. Equal numbers would not prove the reads shared a snapshot.
|
|
83
|
+
const workflowBlocked = workflow.status === 'observed' &&
|
|
84
|
+
!workflow.value.actionability.allowedActions.some(action => action.action === 'start_task');
|
|
85
|
+
const executionBlocked = execution.status === 'observed' && execution.value.executionAdmission.state === 'blocked';
|
|
86
|
+
const summary = workflowBlocked || executionBlocked ? 'blocked'
|
|
87
|
+
: workflow.status === 'unavailable' || execution.status === 'unavailable' ||
|
|
88
|
+
execution.value.executionAdmission.state !== 'ready' ? 'unknown'
|
|
89
|
+
: 'eligible_to_attempt';
|
|
90
|
+
return { taskId, summary, workflow, execution, consistency: 'independent_observations', limits: [...LIMITS] };
|
|
91
|
+
}
|
|
92
|
+
function taskPreflightLines(report, bin = 'skrr') {
|
|
93
|
+
const lines = [`Task preflight: ${report.taskId}`, `Start eligibility: ${report.summary.replaceAll('_', ' ')} (current server projections)`];
|
|
94
|
+
if (report.workflow.status === 'observed') {
|
|
95
|
+
const a = report.workflow.value.actionability;
|
|
96
|
+
lines.push('', `Workflow: ${a.state} (server projection)`, `Next actor: ${a.nextActor}`, `Why: ${a.reason} [${a.reasonCode}]`);
|
|
97
|
+
if (a.actorRefs?.length)
|
|
98
|
+
lines.push(`Eligible actors: ${a.actorRefs.map(ref => `${ref.kind}:${ref.id}`).join(', ')}`);
|
|
99
|
+
for (const action of a.allowedActions) {
|
|
100
|
+
const command = (0, task_operations_1.taskActionCommand)(action.action, report.taskId, action.targetId, bin, {
|
|
101
|
+
allowedActions: a.allowedActions,
|
|
102
|
+
});
|
|
103
|
+
lines.push(` ${action.action}${command ? ` → ${command}` : ' (no single CLI remedy is mapped)'}`);
|
|
104
|
+
}
|
|
105
|
+
lines.push('Allowed actions describe the workflow; the caller must still have permission to perform them.');
|
|
106
|
+
}
|
|
107
|
+
else
|
|
108
|
+
lines.push('', `Workflow: unknown. ${report.workflow.message} [${report.workflow.code}]`, `Next step: ${report.workflow.remedy}`);
|
|
109
|
+
if (report.execution.status === 'observed') {
|
|
110
|
+
lines.push('', 'Execution prerequisites (server configuration; no execution test):', ...(0, task_admission_1.admissionLines)(report.execution.value.executionAdmission));
|
|
111
|
+
if (report.execution.value.executionAdmission.shell?.state) {
|
|
112
|
+
lines.push(`Shell approval prerequisites: ${report.execution.value.executionAdmission.shell.state} (policy only; shell execution unverified).`);
|
|
113
|
+
}
|
|
114
|
+
if (report.execution.value.executionAdmission.constraints?.length)
|
|
115
|
+
lines.push('Execution remedy owner: not reported by this server; ask the authorized Agent or Harness administrator.');
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
lines.push('', `Execution: unknown. ${report.execution.message} [${report.execution.code}]`, `Next step: ${report.execution.remedy}`);
|
|
119
|
+
lines.push('', ...report.limits, `More operations: ${bin} tasks guide`);
|
|
120
|
+
return lines;
|
|
121
|
+
}
|