@skrr-ai/cli 0.1.119 → 0.1.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.d.ts +31 -0
- package/dist/base-command.js +117 -6
- package/dist/commands/agent/message/context.d.ts +1 -0
- package/dist/commands/agent/message/context.js +3 -2
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commitments/action-proposal.d.ts +13 -0
- package/dist/commands/commitments/action-proposal.js +39 -0
- package/dist/commands/commitments/action-proposals/decide.js +8 -1
- package/dist/commands/commitments/action-proposals/execute.js +11 -1
- package/dist/commands/commitments/create.js +2 -2
- package/dist/commands/commitments/doctor.d.ts +8 -0
- package/dist/commands/commitments/doctor.js +22 -0
- package/dist/commands/commitments/execute-remediation.js +12 -1
- package/dist/commands/commitments/observations.js +2 -2
- package/dist/commands/commitments/pack/bind.d.ts +18 -1
- package/dist/commands/commitments/pack/bind.js +66 -8
- package/dist/commands/commitments/pack/plan.d.ts +4 -1
- package/dist/commands/commitments/pack/plan.js +30 -2
- package/dist/commands/commitments/update.js +8 -2
- package/dist/commands/completion/index.js +1 -1
- package/dist/commands/completion/values.js +1 -1
- package/dist/commands/computer-use/audio.d.ts +1 -0
- package/dist/commands/computer-use/audio.js +1 -0
- package/dist/commands/computer-use/browser.d.ts +1 -0
- package/dist/commands/computer-use/browser.js +1 -0
- package/dist/commands/computer-use/disable.d.ts +1 -0
- package/dist/commands/computer-use/disable.js +1 -0
- package/dist/commands/computer-use/enable.d.ts +1 -0
- package/dist/commands/computer-use/enable.js +1 -0
- package/dist/commands/computer-use/index.d.ts +1 -0
- package/dist/commands/computer-use/index.js +1 -0
- package/dist/commands/computer-use/install.d.ts +1 -0
- package/dist/commands/computer-use/install.js +1 -0
- package/dist/commands/computer-use/recover.d.ts +1 -0
- package/dist/commands/computer-use/recover.js +1 -0
- package/dist/commands/computer-use/status.d.ts +1 -0
- package/dist/commands/computer-use/status.js +1 -0
- package/dist/commands/computer-use/stop.d.ts +1 -0
- package/dist/commands/computer-use/stop.js +1 -0
- package/dist/commands/context.js +16 -11
- package/dist/commands/convos/recovery.js +1 -1
- package/dist/commands/daemon/diagnostics.d.ts +9 -0
- package/dist/commands/daemon/diagnostics.js +53 -0
- package/dist/commands/daemon/index.js +2 -0
- package/dist/commands/daemon/maintenance/attest.d.ts +15 -0
- package/dist/commands/daemon/maintenance/attest.js +52 -0
- package/dist/commands/daemon/maintenance/hold.d.ts +17 -0
- package/dist/commands/daemon/maintenance/hold.js +70 -0
- package/dist/commands/daemon/maintenance/index.d.ts +12 -0
- package/dist/commands/daemon/maintenance/index.js +30 -0
- package/dist/commands/daemon/maintenance/resume.d.ts +13 -0
- package/dist/commands/daemon/maintenance/resume.js +36 -0
- package/dist/commands/daemon/maintenance/status.d.ts +13 -0
- package/dist/commands/daemon/maintenance/status.js +36 -0
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.js +50 -6
- package/dist/commands/followups/plans/cancel-batch.js +6 -3
- package/dist/commands/followups/plans/capacity.js +7 -3
- package/dist/commands/followups/plans/observability.js +11 -3
- package/dist/commands/followups/plans/preferences/set.js +26 -8
- package/dist/commands/followups/plans/preferences.js +1 -1
- package/dist/commands/followups/plans/show.js +1 -1
- package/dist/commands/goals/key-results/assess.d.ts +36 -0
- package/dist/commands/goals/key-results/assess.js +110 -0
- package/dist/commands/goals/key-results/history.d.ts +30 -0
- package/dist/commands/goals/key-results/history.js +104 -0
- package/dist/commands/goals/key-results/list.d.ts +5 -4
- package/dist/commands/goals/key-results/list.js +12 -6
- package/dist/commands/goals/key-results/show.d.ts +4 -2
- package/dist/commands/goals/key-results/show.js +25 -4
- package/dist/commands/goals/key-results/update.d.ts +4 -0
- package/dist/commands/goals/key-results/update.js +18 -24
- package/dist/commands/goals/plan-now.js +12 -1
- package/dist/commands/goals/planner-compare.d.ts +30 -0
- package/dist/commands/goals/planner-compare.js +136 -0
- package/dist/commands/machines/dedicated/service/exec.d.ts +3 -0
- package/dist/commands/machines/dedicated/service/exec.js +70 -11
- package/dist/commands/machines/hosted/destroy.d.ts +1 -0
- package/dist/commands/machines/hosted/destroy.js +11 -1
- package/dist/commands/machines/hosted/exec.d.ts +1 -0
- package/dist/commands/machines/hosted/exec.js +12 -1
- package/dist/commands/machines/hosted/index.js +1 -0
- package/dist/commands/machines/hosted/operation.d.ts +14 -0
- package/dist/commands/machines/hosted/operation.js +51 -0
- package/dist/commands/machines/hosted/pull.js +1 -1
- package/dist/commands/machines/hosted/start.js +6 -2
- package/dist/commands/search/agents.js +5 -1
- package/dist/commands/search/all.js +74 -22
- package/dist/commands/search/skills.d.ts +1 -0
- package/dist/commands/search/skills.js +12 -1
- package/dist/commands/search/spaces.d.ts +8 -1
- package/dist/commands/search/spaces.js +50 -12
- package/dist/commands/search/tasks.d.ts +13 -2
- package/dist/commands/search/tasks.js +78 -14
- package/dist/commands/search/teams.js +5 -1
- package/dist/commands/search/workspace.d.ts +19 -0
- package/dist/commands/search/workspace.js +126 -0
- package/dist/commands/skills/browse.d.ts +1 -0
- package/dist/commands/skills/browse.js +8 -1
- package/dist/commands/skills/search.d.ts +1 -0
- package/dist/commands/skills/search.js +12 -1
- package/dist/commands/spaces/auto-executor/compare.d.ts +18 -0
- package/dist/commands/spaces/auto-executor/compare.js +139 -0
- package/dist/commands/spaces/auto-executor/runs.d.ts +3 -0
- package/dist/commands/spaces/auto-executor/runs.js +13 -1
- package/dist/commands/spaces/charter/create-from-description.d.ts +21 -0
- package/dist/commands/spaces/charter/create-from-description.js +77 -0
- package/dist/commands/spaces/charter/show.d.ts +22 -0
- package/dist/commands/spaces/charter/show.js +61 -0
- package/dist/commands/spaces/heartbeats/list.d.ts +1 -16
- package/dist/commands/spaces/heartbeats/list.js +13 -0
- package/dist/commands/spaces/install-template.js +3 -0
- package/dist/commands/spaces/list.d.ts +1 -0
- package/dist/commands/spaces/list.js +12 -3
- package/dist/commands/spaces/loops/migrate.d.ts +32 -0
- package/dist/commands/spaces/loops/migrate.js +103 -0
- package/dist/commands/spaces/loops/release.d.ts +14 -0
- package/dist/commands/spaces/loops/release.js +59 -0
- package/dist/commands/spaces/notebook.d.ts +25 -0
- package/dist/commands/spaces/notebook.js +75 -0
- package/dist/commands/spaces/proposals/discard.d.ts +17 -0
- package/dist/commands/spaces/proposals/discard.js +17 -0
- package/dist/commands/spaces/proposals/keep.d.ts +17 -0
- package/dist/commands/spaces/proposals/keep.js +17 -0
- package/dist/commands/spaces/proposals/list.d.ts +24 -0
- package/dist/commands/spaces/proposals/list.js +89 -0
- package/dist/commands/spaces/search.d.ts +1 -0
- package/dist/commands/spaces/search.js +9 -0
- package/dist/commands/spaces/skills/propose.d.ts +29 -0
- package/dist/commands/spaces/skills/propose.js +82 -0
- package/dist/commands/spaces/templates/fork.js +3 -0
- package/dist/commands/spaces/triggers/show.js +6 -0
- package/dist/commands/spaces/workflows/retry.d.ts +1 -0
- package/dist/commands/spaces/workflows/retry.js +8 -1
- package/dist/commands/spaces/workflows/triggers/create.js +3 -2
- package/dist/commands/spaces/workflows/triggers/fire.js +4 -0
- package/dist/commands/spaces/workflows/triggers/update.js +2 -1
- package/dist/commands/spaces/write-policy/set.d.ts +22 -0
- package/dist/commands/spaces/write-policy/set.js +82 -0
- package/dist/commands/spaces/write-policy/show.d.ts +19 -0
- package/dist/commands/spaces/write-policy/show.js +49 -0
- package/dist/commands/store/artifacts/receipt.d.ts +14 -0
- package/dist/commands/store/artifacts/receipt.js +34 -0
- package/dist/commands/store/artifacts/release.d.ts +2 -0
- package/dist/commands/store/artifacts/release.js +11 -0
- package/dist/commands/store/governance/publish-release.d.ts +2 -0
- package/dist/commands/store/governance/publish-release.js +30 -1
- package/dist/commands/store/governance/release-receipt.d.ts +12 -0
- package/dist/commands/store/governance/release-receipt.js +32 -0
- package/dist/commands/tasks/approvals/list.d.ts +11 -5
- package/dist/commands/tasks/approvals/list.js +13 -6
- package/dist/commands/tasks/attachments/facts.d.ts +12 -0
- package/dist/commands/tasks/attachments/facts.js +29 -0
- package/dist/commands/tasks/attachments/upload.d.ts +1 -0
- package/dist/commands/tasks/attachments/upload.js +16 -0
- package/dist/commands/tasks/bulk-update.js +35 -1
- package/dist/commands/tasks/context.d.ts +15 -0
- package/dist/commands/tasks/context.js +69 -0
- package/dist/commands/tasks/copy.d.ts +18 -0
- package/dist/commands/tasks/copy.js +85 -0
- package/dist/commands/tasks/create-tree.js +97 -23
- package/dist/commands/tasks/create.js +9 -1
- package/dist/commands/tasks/deliverable/add.js +20 -10
- package/dist/commands/tasks/move.js +8 -1
- package/dist/commands/tasks/operations/show.d.ts +16 -0
- package/dist/commands/tasks/operations/show.js +98 -0
- package/dist/commands/tasks/operations/wait.d.ts +22 -0
- package/dist/commands/tasks/operations/wait.js +114 -0
- package/dist/commands/tasks/preflight.d.ts +1 -0
- package/dist/commands/tasks/preflight.js +11 -1
- package/dist/commands/tasks/rearm-recurrence.js +4 -0
- package/dist/commands/tasks/result/show.js +22 -0
- package/dist/commands/tasks/result/submit.d.ts +1 -0
- package/dist/commands/tasks/result/submit.js +3 -0
- package/dist/commands/tasks/retry-receipt.d.ts +15 -0
- package/dist/commands/tasks/retry-receipt.js +89 -0
- package/dist/commands/tasks/retry-review.d.ts +16 -0
- package/dist/commands/tasks/retry-review.js +66 -0
- package/dist/commands/tasks/retry.d.ts +4 -8
- package/dist/commands/tasks/retry.js +34 -68
- package/dist/commands/tasks/runs.d.ts +21 -0
- package/dist/commands/tasks/runs.js +95 -0
- package/dist/commands/tasks/search.d.ts +1 -0
- package/dist/commands/tasks/search.js +9 -0
- package/dist/commands/tasks/show.d.ts +2 -0
- package/dist/commands/tasks/show.js +15 -1
- package/dist/commands/tasks/start-receipt.d.ts +15 -0
- package/dist/commands/tasks/start-receipt.js +95 -0
- package/dist/commands/tasks/start.d.ts +4 -0
- package/dist/commands/tasks/start.js +49 -3
- package/dist/commands/tasks/update.js +3 -0
- package/dist/commands/tasks/upsert.js +17 -3
- package/dist/commands/tasks/watch.d.ts +3 -0
- package/dist/commands/tasks/watch.js +85 -20
- package/dist/commands/wiki/history.d.ts +33 -0
- package/dist/commands/wiki/history.js +134 -0
- package/dist/commands/wiki/ls.d.ts +2 -0
- package/dist/commands/wiki/ls.js +8 -0
- package/dist/commands/wiki/update.d.ts +3 -1
- package/dist/commands/wiki/update.js +24 -2
- package/dist/commands/wiki/write.d.ts +22 -0
- package/dist/commands/wiki/write.js +144 -6
- package/dist/generated/agent-guides.json +81 -81
- package/dist/generated/managed-instruction-guides.json +1 -1
- package/dist/lib/agent-guides.d.ts +9 -0
- package/dist/lib/agent-guides.js +23 -1
- package/dist/lib/agentic-stream.d.ts +5 -0
- package/dist/lib/agentic-stream.js +122 -3
- package/dist/lib/api-error-reason.d.ts +2 -0
- package/dist/lib/api-error-reason.js +14 -0
- package/dist/lib/api-fetch.js +3 -0
- package/dist/lib/auth-diagnostics.d.ts +39 -0
- package/dist/lib/auth-diagnostics.js +71 -0
- package/dist/lib/cli-client-identity.d.ts +6 -0
- package/dist/lib/cli-client-identity.js +16 -0
- package/dist/lib/cli-installation-diagnostics.d.ts +52 -0
- package/dist/lib/cli-installation-diagnostics.js +254 -0
- package/dist/lib/command-hygiene.d.ts +45 -0
- package/dist/lib/command-hygiene.js +413 -0
- package/dist/lib/commitments.d.ts +64 -3
- package/dist/lib/commitments.js +34 -6
- package/dist/lib/completion-index.d.ts +16 -4
- package/dist/lib/completion-index.js +50 -14
- package/dist/lib/config.js +7 -1
- package/dist/lib/daemon-maintenance-command.d.ts +22 -0
- package/dist/lib/daemon-maintenance-command.js +39 -0
- package/dist/lib/daemon-maintenance.d.ts +275 -0
- package/dist/lib/daemon-maintenance.js +1035 -0
- package/dist/lib/dedicated-service.d.ts +3 -2
- package/dist/lib/dedicated-service.js +11 -3
- package/dist/lib/governed-store.d.ts +8 -0
- package/dist/lib/governed-store.js +5 -0
- package/dist/lib/hosted-machines.d.ts +33 -2
- package/dist/lib/hosted-machines.js +19 -1
- package/dist/lib/json-output.d.ts +1 -1
- package/dist/lib/machines.d.ts +9 -1
- package/dist/lib/machines.js +15 -1
- package/dist/lib/node-adapter.js +13 -0
- package/dist/lib/record-output.d.ts +22 -0
- package/dist/lib/record-output.js +78 -0
- package/dist/lib/roles.d.ts +3 -3
- package/dist/lib/scoped-memory-command.d.ts +18 -0
- package/dist/lib/scoped-memory-command.js +53 -2
- package/dist/lib/search-display.d.ts +7 -0
- package/dist/lib/search-display.js +31 -0
- package/dist/lib/skill-store-pagination.d.ts +8 -0
- package/dist/lib/skill-store-pagination.js +35 -0
- package/dist/lib/space-charter.d.ts +49 -0
- package/dist/lib/space-charter.js +78 -0
- package/dist/lib/space-loop-migration.d.ts +18 -0
- package/dist/lib/space-loop-migration.js +128 -0
- package/dist/lib/space-notebook.d.ts +22 -0
- package/dist/lib/space-notebook.js +140 -0
- package/dist/lib/space-proposal-decision-command.d.ts +36 -0
- package/dist/lib/space-proposal-decision-command.js +108 -0
- package/dist/lib/space-proposals.d.ts +44 -0
- package/dist/lib/space-proposals.js +186 -0
- package/dist/lib/space-templates.d.ts +8 -0
- package/dist/lib/space-templates.js +17 -0
- package/dist/lib/space-write-policy.d.ts +24 -0
- package/dist/lib/space-write-policy.js +103 -0
- package/dist/lib/task-agent-context-capabilities.d.ts +10 -0
- package/dist/lib/task-agent-context-capabilities.js +22 -0
- package/dist/lib/task-agent-context-compatibility.d.ts +9 -0
- package/dist/lib/task-agent-context-compatibility.js +30 -0
- package/dist/lib/task-asset-upload.d.ts +22 -0
- package/dist/lib/task-asset-upload.js +257 -29
- package/dist/lib/task-batch.d.ts +15 -1
- package/dist/lib/task-batch.js +35 -2
- package/dist/lib/task-operation-watch.d.ts +66 -0
- package/dist/lib/task-operation-watch.js +159 -0
- package/dist/lib/task-resolver.d.ts +1 -1
- package/dist/lib/task-resolver.js +4 -3
- package/dist/lib/task-work.d.ts +1 -1
- package/dist/lib/task-work.js +35 -1
- package/dist/lib/task-write-attribution.d.ts +14 -0
- package/dist/lib/task-write-attribution.js +35 -2
- package/dist/lib/triggers.d.ts +11 -0
- package/dist/lib/triggers.js +7 -0
- package/dist/lib/wiki-update.d.ts +1 -0
- package/dist/lib/wiki-update.js +10 -1
- package/dist/lib/wiki.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +31 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.d.ts +10 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +147 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.d.ts +20 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.js +72 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +13 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.d.ts +21 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.js +96 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.d.ts +2 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +102 -20
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +315 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.d.ts +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.js +161 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.d.ts +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.js +41 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +15 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/macos.js +20 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.js +262 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +106 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +32 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.d.ts +10 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +172 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.d.ts +20 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.js +43 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +33 -14
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.d.ts +21 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.js +62 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.d.ts +2 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +133 -25
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +404 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.d.ts +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.js +132 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.d.ts +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.js +15 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/macos.js +28 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.js +342 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +138 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +51 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +27181 -20293
- package/oclif.manifest.json +5745 -1813
- package/package.json +20 -2
|
@@ -268,16 +268,13 @@ class TasksDeliverableAdd extends base_command_1.BaseCommand {
|
|
|
268
268
|
expectationIds: opts.expectationIds,
|
|
269
269
|
},
|
|
270
270
|
});
|
|
271
|
+
assertArchivedDeliverableReceipt(asset);
|
|
271
272
|
}
|
|
272
273
|
catch (err) {
|
|
273
274
|
this.handleApiError(err);
|
|
274
275
|
return false;
|
|
275
276
|
}
|
|
276
277
|
const { resourceReceipt, ...archived } = asset;
|
|
277
|
-
if (!resourceReceipt?.link.id) {
|
|
278
|
-
this.warn('The file was archived, but this server did not return its Deliverable link. ' +
|
|
279
|
-
`Run skrr tasks deliverable list ${opts.taskId} --json to find the exact version before submitting a Result.`);
|
|
280
|
-
}
|
|
281
278
|
if (opts.json) {
|
|
282
279
|
// `--status` is overridden for an archived copy, and --json used to say nothing of it: the
|
|
283
280
|
// receipt's observation read `available` and the requested status appeared nowhere (OSK-15437).
|
|
@@ -288,15 +285,13 @@ class TasksDeliverableAdd extends base_command_1.BaseCommand {
|
|
|
288
285
|
identity: opts.identity,
|
|
289
286
|
...(notes ? { requestedStatus: opts.requestedStatus, notes: [notes] } : {}),
|
|
290
287
|
}, {
|
|
291
|
-
resource: { kind: 'task_resource_link', id: resourceReceipt
|
|
292
|
-
task: { id: resourceReceipt
|
|
288
|
+
resource: { kind: 'task_resource_link', id: resourceReceipt.link.id },
|
|
289
|
+
task: { id: resourceReceipt.link.taskId },
|
|
293
290
|
});
|
|
294
291
|
return true;
|
|
295
292
|
}
|
|
296
|
-
const recorded = resourceReceipt
|
|
297
|
-
|
|
298
|
-
: `Archived ${opts.identity}`;
|
|
299
|
-
const version = resourceReceipt?.version.id ? `version ${resourceReceipt.version.id}; ` : '';
|
|
293
|
+
const recorded = `Recorded Deliverable ${resourceReceipt.link.id}: ${opts.identity}`;
|
|
294
|
+
const version = `version ${resourceReceipt.version.id}; `;
|
|
300
295
|
this.log(`${recorded} — archived copy ${asset.id} ` +
|
|
301
296
|
`(${version}sha256 pinned; observed available; self reported).`);
|
|
302
297
|
const notApplied = statusNotApplied(opts.requestedStatus);
|
|
@@ -309,6 +304,21 @@ class TasksDeliverableAdd extends base_command_1.BaseCommand {
|
|
|
309
304
|
}
|
|
310
305
|
}
|
|
311
306
|
exports.default = TasksDeliverableAdd;
|
|
307
|
+
/** Availability and a named Resource version require the server's complete archive receipt. */
|
|
308
|
+
function assertArchivedDeliverableReceipt(asset) {
|
|
309
|
+
const receipt = asset?.resourceReceipt;
|
|
310
|
+
const ids = [asset?.id, receipt?.resource?.id, receipt?.version?.id, receipt?.link?.id,
|
|
311
|
+
receipt?.observation?.id];
|
|
312
|
+
const stored = asset?.digest;
|
|
313
|
+
const versionDigest = receipt?.version?.contentDigest;
|
|
314
|
+
if (asset?.status !== 'ready' || ids.some((id) => typeof id !== 'string' || !id.trim()) ||
|
|
315
|
+
receipt?.observation?.status !== 'available' || typeof stored !== 'string' ||
|
|
316
|
+
!/^[a-f0-9]{64}$/i.test(stored) || typeof versionDigest !== 'string' ||
|
|
317
|
+
versionDigest.toLowerCase() !== `sha256:${stored.toLowerCase()}`) {
|
|
318
|
+
throw new Error('The server did not confirm a ready archived Deliverable with its exact Resource receipt. ' +
|
|
319
|
+
'Re-read the Task attachments and Deliverables before retrying.');
|
|
320
|
+
}
|
|
321
|
+
}
|
|
312
322
|
/** The sentence for a `--status` an archived copy overrides, or null when nothing was overridden. */
|
|
313
323
|
function statusNotApplied(requestedStatus) {
|
|
314
324
|
return requestedStatus && requestedStatus !== 'available'
|
|
@@ -131,6 +131,10 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
131
131
|
force: flags.force === true ? true : undefined,
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
+
// Held for approval by the Space write policy: nothing moved, and the
|
|
135
|
+
// project change below is not sent on top of a held move.
|
|
136
|
+
if (this.reportHeldSpaceWrite(updated, { json: flags.json }))
|
|
137
|
+
return;
|
|
134
138
|
}
|
|
135
139
|
if (projectId !== undefined) {
|
|
136
140
|
// Project membership is an ordinary task field — PATCH /tasks/:id.
|
|
@@ -139,6 +143,8 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
139
143
|
taskId: taskRef,
|
|
140
144
|
data: { projectId },
|
|
141
145
|
});
|
|
146
|
+
if (this.reportHeldSpaceWrite(updated, { json: flags.json }))
|
|
147
|
+
return;
|
|
142
148
|
}
|
|
143
149
|
}
|
|
144
150
|
catch (err) {
|
|
@@ -155,7 +161,8 @@ class TasksMove extends base_command_1.BaseCommand {
|
|
|
155
161
|
}
|
|
156
162
|
if (flags.json) {
|
|
157
163
|
this.printJsonOperation((0, web_url_1.withTaskUrl)(this.cliConfig.baseURL, updated), {
|
|
158
|
-
resource: { kind: 'task', id: updated?.id },
|
|
164
|
+
resource: { kind: 'task', id: updated?.id },
|
|
165
|
+
task: { id: updated?.id },
|
|
159
166
|
});
|
|
160
167
|
return;
|
|
161
168
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/** Inspect one durable Task Operation without replaying it or changing execution. */
|
|
3
|
+
export default class TasksOperationsShow extends BaseCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'operation-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'request-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
/** Inspect one durable Task Operation without replaying it or changing execution. */
|
|
8
|
+
class TasksOperationsShow extends base_command_1.BaseCommand {
|
|
9
|
+
static description = 'Inspect one server-authoritative Task operation by its operation ID or original request ID. Read-only; never replays work.';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> tasks operations show <task-id> --operation-id opr_…',
|
|
12
|
+
'<%= config.bin %> tasks operations show <task-id> --request-id task-retry:deploy-42',
|
|
13
|
+
'<%= config.bin %> tasks operations show <task-id> --request-id task-start:deploy-42 --json',
|
|
14
|
+
];
|
|
15
|
+
static args = {
|
|
16
|
+
id: core_1.Args.string({
|
|
17
|
+
description: 'Task ID; defaults to OVERSKY_SESSION_TASK_ID in task runtimes',
|
|
18
|
+
required: false,
|
|
19
|
+
ignoreStdin: true,
|
|
20
|
+
}),
|
|
21
|
+
};
|
|
22
|
+
static flags = {
|
|
23
|
+
task: core_1.Flags.string({ description: 'Task ID; overrides daemon runtime context' }),
|
|
24
|
+
'operation-id': core_1.Flags.string({ description: 'Opaque operation ID returned by the server' }),
|
|
25
|
+
'request-id': core_1.Flags.string({
|
|
26
|
+
description: 'Original start/retry request ID, when the operation response was lost',
|
|
27
|
+
}),
|
|
28
|
+
json: core_1.Flags.boolean({ description: 'Output the full operation projection as JSON' }),
|
|
29
|
+
};
|
|
30
|
+
async run() {
|
|
31
|
+
this.requireAuth();
|
|
32
|
+
const { args, flags } = await this.parse(TasksOperationsShow);
|
|
33
|
+
let taskIdentity;
|
|
34
|
+
try {
|
|
35
|
+
taskIdentity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
const failure = (0, task_resolver_1.taskResolutionFailure)(err);
|
|
39
|
+
this.failWithCliError({
|
|
40
|
+
message: failure.message,
|
|
41
|
+
code: failure.code,
|
|
42
|
+
exit: 2,
|
|
43
|
+
retryable: false,
|
|
44
|
+
details: { suggestion: failure.suggestion, context: failure.details },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const operationId = flags['operation-id'];
|
|
48
|
+
const requestId = flags['request-id'];
|
|
49
|
+
if ((operationId && requestId) || (!operationId && !requestId)) {
|
|
50
|
+
this.error('Provide exactly one of --operation-id or --request-id.', { exit: 2 });
|
|
51
|
+
}
|
|
52
|
+
// `resolveTaskIdentity` decides which INPUT wins; it does no lookup. This
|
|
53
|
+
// turns whatever it picked into something the API can resolve — a UUID and
|
|
54
|
+
// an OSK-2423 ref pass through untouched, a title is searched.
|
|
55
|
+
const taskId = await this.resolveTaskReference(taskIdentity.id);
|
|
56
|
+
// Published CLI builds can lag the data-provider declaration during an
|
|
57
|
+
// additive rollout. The methods are still runtime functions exported by
|
|
58
|
+
// this same package, so this narrow cast preserves compatibility.
|
|
59
|
+
const service = data_provider_1.dataService;
|
|
60
|
+
let operation;
|
|
61
|
+
try {
|
|
62
|
+
operation = operationId
|
|
63
|
+
? await service.getTaskOperation(taskId, operationId)
|
|
64
|
+
: await service.getTaskOperationByRequest(taskId, requestId);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
this.handleApiError(error, { subject: `Task ${taskId} operation` });
|
|
68
|
+
}
|
|
69
|
+
if (flags.json) {
|
|
70
|
+
this.printJsonResult(operation);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this.log(`Operation ${operation.operationId}: ${operation.state}`);
|
|
74
|
+
this.log(`Intent: ${operation.intent}`);
|
|
75
|
+
this.log(`Phase: ${operation.phase}`);
|
|
76
|
+
if (operation.outcome)
|
|
77
|
+
this.log(`Outcome: ${operation.outcome}`);
|
|
78
|
+
this.log(`Task: ${operation.task.identifier || operation.task.id}`);
|
|
79
|
+
if (operation.task.state.workflowGeneration !== undefined) {
|
|
80
|
+
this.log(`Workflow generation: ${operation.task.state.workflowGeneration}`);
|
|
81
|
+
}
|
|
82
|
+
if (operation.receipt?.requestId)
|
|
83
|
+
this.log(`Request receipt: ${operation.receipt.requestId}`);
|
|
84
|
+
if (operation.executionReference?.runId)
|
|
85
|
+
this.log(`Execution Run: ${operation.executionReference.runId}`);
|
|
86
|
+
const attempt = operation.execution?.run.activeExecutorAttemptRef ||
|
|
87
|
+
operation.execution?.run.terminalExecutorAttemptRef;
|
|
88
|
+
if (attempt) {
|
|
89
|
+
this.log(`Executor attempt: ${attempt.kind}/${attempt.runId} #${attempt.attempt} generation ${attempt.generation}`);
|
|
90
|
+
}
|
|
91
|
+
if (operation.provenance.code)
|
|
92
|
+
this.log(`Observation: ${operation.provenance.code}`);
|
|
93
|
+
this.log(operation.recovery.disposition === 'do_not_resend'
|
|
94
|
+
? 'This operation is not confirmed. Do not resend it; inspect the same operation or execution state.'
|
|
95
|
+
: 'This is inspect-only. Use execution-state for current execution authority.');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.default = TasksOperationsShow;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* Wait on a Task Operation's server-owned projection. This is intentionally a
|
|
4
|
+
* read-only command: it never retries, redrives, changes Task workflow, or
|
|
5
|
+
* reconstructs an action from the operation's intent.
|
|
6
|
+
*/
|
|
7
|
+
export default class TasksOperationsWait extends BaseCommand {
|
|
8
|
+
static description: string;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
static args: {
|
|
11
|
+
id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
static flags: {
|
|
14
|
+
task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
operation: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
interval: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
timeout: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
};
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
private printCheckpoint;
|
|
22
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
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_operation_watch_1 = require("../../../lib/task-operation-watch");
|
|
8
|
+
/**
|
|
9
|
+
* Wait on a Task Operation's server-owned projection. This is intentionally a
|
|
10
|
+
* read-only command: it never retries, redrives, changes Task workflow, or
|
|
11
|
+
* reconstructs an action from the operation's intent.
|
|
12
|
+
*/
|
|
13
|
+
class TasksOperationsWait extends base_command_1.BaseCommand {
|
|
14
|
+
static description = 'Wait read-only for one immutable Task Operation; never retries or dispatches another run';
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> tasks operations wait <task-id> --operation task-retry:deploy-42',
|
|
17
|
+
'<%= config.bin %> tasks operations wait <task-id> --operation task-start:deploy-42 --timeout 10m --json',
|
|
18
|
+
];
|
|
19
|
+
static args = {
|
|
20
|
+
id: core_1.Args.string({
|
|
21
|
+
description: 'Task ID; defaults to OVERSKY_SESSION_TASK_ID in task runtimes',
|
|
22
|
+
required: false,
|
|
23
|
+
ignoreStdin: true,
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
static flags = {
|
|
27
|
+
task: core_1.Flags.string({ description: 'Task ID; overrides daemon runtime context' }),
|
|
28
|
+
operation: core_1.Flags.string({ description: 'Immutable Task Operation ID to observe', required: true }),
|
|
29
|
+
interval: core_1.Flags.integer({ description: 'Polling interval in seconds', default: 5 }),
|
|
30
|
+
timeout: core_1.Flags.string({ description: 'Timeout such as 30s, 10m, 2h' }),
|
|
31
|
+
json: core_1.Flags.boolean({ description: 'Emit newline-delimited JSON operation checkpoints' }),
|
|
32
|
+
};
|
|
33
|
+
async run() {
|
|
34
|
+
this.requireAuth();
|
|
35
|
+
const { args, flags } = await this.parse(TasksOperationsWait);
|
|
36
|
+
let taskIdentity;
|
|
37
|
+
try {
|
|
38
|
+
taskIdentity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const failure = (0, task_resolver_1.taskResolutionFailure)(error);
|
|
42
|
+
this.failWithCliError({
|
|
43
|
+
code: failure.code,
|
|
44
|
+
message: failure.message,
|
|
45
|
+
exit: 2,
|
|
46
|
+
retryable: false,
|
|
47
|
+
details: failure.suggestion ? { suggestion: failure.suggestion } : undefined,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const taskId = await this.resolveTaskReference(taskIdentity.id);
|
|
51
|
+
let timeoutMs;
|
|
52
|
+
try {
|
|
53
|
+
timeoutMs = (0, task_operation_watch_1.parseTaskOperationWatchDuration)(flags.timeout);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
this.error(error.message, { exit: 2 });
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const operationId = flags.operation.trim();
|
|
60
|
+
if (!operationId || operationId.length > 200) {
|
|
61
|
+
this.error('--operation must be a non-empty operation ID of at most 200 characters.', { exit: 2 });
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const getTaskOperation = data_provider_1.dataService.getTaskOperation;
|
|
65
|
+
if (!getTaskOperation) {
|
|
66
|
+
this.failWithCliError({
|
|
67
|
+
code: 'TASK_OPERATION_READER_UNAVAILABLE',
|
|
68
|
+
message: 'This CLI build cannot read Task Operations. Update skrr before waiting on this operation.',
|
|
69
|
+
exit: 2,
|
|
70
|
+
retryable: false,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
try {
|
|
74
|
+
const result = await (0, task_operation_watch_1.watchTaskOperation)({
|
|
75
|
+
taskId,
|
|
76
|
+
operationId,
|
|
77
|
+
intervalMs: Math.max(1, flags.interval) * 1000,
|
|
78
|
+
timeoutMs,
|
|
79
|
+
read: getTaskOperation,
|
|
80
|
+
onCheckpoint: (checkpoint) => this.printCheckpoint(checkpoint, Boolean(flags.json)),
|
|
81
|
+
});
|
|
82
|
+
if (result.result === 'failed')
|
|
83
|
+
this.exit(1);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
const candidate = error;
|
|
87
|
+
if (candidate?.code === 'TASK_OPERATION_WAIT_TIMEOUT') {
|
|
88
|
+
this.exit(124);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (candidate?.code === 'TASK_OPERATION_TERMINAL_UNKNOWN') {
|
|
92
|
+
this.failWithCliError({
|
|
93
|
+
code: 'TASK_OPERATION_TERMINAL_UNKNOWN',
|
|
94
|
+
message: 'The Task Operation is terminal but does not report a recognized outcome. Inspect it; do not issue a fresh operation by guesswork.',
|
|
95
|
+
exit: 2,
|
|
96
|
+
retryable: false,
|
|
97
|
+
details: { taskId, operationId },
|
|
98
|
+
});
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.handleApiError(error, { subject: `Task operation ${operationId}` });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
printCheckpoint(checkpoint, json) {
|
|
105
|
+
if (json) {
|
|
106
|
+
this.log(JSON.stringify(checkpoint));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (checkpoint.changed || checkpoint.terminal || checkpoint.observation === 'timeout') {
|
|
110
|
+
this.log((0, task_operation_watch_1.taskOperationCheckpointLine)(checkpoint));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.default = TasksOperationsWait;
|
|
@@ -8,6 +8,7 @@ export default class TasksPreflight extends BaseCommand {
|
|
|
8
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
9
|
task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
skill: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
capability: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
};
|
|
12
13
|
static examples: string[];
|
|
13
14
|
run(): Promise<void>;
|
|
@@ -14,6 +14,10 @@ class TasksPreflight extends base_command_1.BaseCommand {
|
|
|
14
14
|
json: core_1.Flags.boolean({ description: 'Output native observations, uncertainty, and CLI verification metadata as JSON' }),
|
|
15
15
|
task: core_1.Flags.string({ description: 'Task ID/ref; overrides current Task runtime context' }),
|
|
16
16
|
skill: core_1.Flags.string({ description: 'Skill ID for the existing server execution preview' }),
|
|
17
|
+
capability: core_1.Flags.string({
|
|
18
|
+
multiple: true,
|
|
19
|
+
description: 'Capability required of the execution target. Repeat for every requirement.',
|
|
20
|
+
}),
|
|
17
21
|
};
|
|
18
22
|
static examples = [
|
|
19
23
|
'<%= config.bin %> tasks preflight OSK-123',
|
|
@@ -56,7 +60,13 @@ class TasksPreflight extends base_command_1.BaseCommand {
|
|
|
56
60
|
}
|
|
57
61
|
const report = await (0, task_preflight_1.readTaskPreflight)(taskId, {
|
|
58
62
|
workflow: () => data_provider_1.dataService.getTaskActionability(taskId),
|
|
59
|
-
execution: () =>
|
|
63
|
+
execution: () => {
|
|
64
|
+
const options = {
|
|
65
|
+
...(flags.skill ? { skillId: flags.skill } : {}),
|
|
66
|
+
...(flags.capability?.length ? { requestedCapabilities: flags.capability } : {}),
|
|
67
|
+
};
|
|
68
|
+
return data_provider_1.dataService.previewTaskStart(taskId, Object.keys(options).length ? options : undefined);
|
|
69
|
+
},
|
|
60
70
|
});
|
|
61
71
|
// Only native diagnostic responses establish an identity for _cli; a
|
|
62
72
|
// requested ref is not itself a confirmed Task record.
|
|
@@ -56,6 +56,10 @@ class TasksRearmRecurrence extends base_command_1.BaseCommand {
|
|
|
56
56
|
}, null, 2));
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
|
+
if (result.pending === true) {
|
|
60
|
+
this.log(result.message);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
59
63
|
const finished = result.task;
|
|
60
64
|
const from = finished.identifier || finished.id || taskRef;
|
|
61
65
|
const next = result.successor.identifier || result.successor.id;
|
|
@@ -13,10 +13,32 @@ const task_legacy_1 = require("../../../lib/task-legacy");
|
|
|
13
13
|
*/
|
|
14
14
|
function describeResultDetail(current, all = []) {
|
|
15
15
|
const lines = [];
|
|
16
|
+
if (current.sourceFacts?.length) {
|
|
17
|
+
lines.push('Source declarations (referenced artifacts and inferred semantics unverified):');
|
|
18
|
+
for (const receipt of current.sourceFacts) {
|
|
19
|
+
lines.push(` ${receipt.source.id} · SHA-256 ${receipt.source.digest} · ${receipt.facts.length} declarations`);
|
|
20
|
+
for (const fact of receipt.facts)
|
|
21
|
+
lines.push(` ${JSON.stringify(fact.pointer)}: ${JSON.stringify(fact.literal)}`);
|
|
22
|
+
}
|
|
23
|
+
lines.push('Result interpretation is reported by its submitter.');
|
|
24
|
+
}
|
|
16
25
|
if (current.supersedesResultId) {
|
|
17
26
|
const previous = all.find((row) => row.id === current.supersedesResultId);
|
|
18
27
|
lines.push(`Supersedes: ${current.supersedesResultId}${previous ? ` (v${previous.version})` : ''}`);
|
|
19
28
|
}
|
|
29
|
+
const sourceRuns = Array.from(new Set([current.runId, ...(current.sourceRunIds ?? [])].filter((runId) => typeof runId === 'string' && runId.length > 0)));
|
|
30
|
+
// A Result describes the work that produced it, not whether that work is
|
|
31
|
+
// still current after a later input. `execution-state` evaluates that latter
|
|
32
|
+
// question against the current server heads, so keep the link visible but do
|
|
33
|
+
// not manufacture an applicability claim here.
|
|
34
|
+
if (sourceRuns.length > 0)
|
|
35
|
+
lines.push(`Source run${sourceRuns.length === 1 ? '' : 's'}: ${sourceRuns.join(', ')}`);
|
|
36
|
+
const coverage = current.inputCoverage;
|
|
37
|
+
if (coverage && Number.isInteger(coverage.throughWorkInputRevision)) {
|
|
38
|
+
lines.push(`Work coverage: through input revision ${coverage.throughWorkInputRevision}` +
|
|
39
|
+
`${Number.isInteger(coverage.workflowGeneration) ? ` (generation ${coverage.workflowGeneration})` : ''}` +
|
|
40
|
+
'; current applicability is reported by tasks execution-state.');
|
|
41
|
+
}
|
|
20
42
|
const links = current.resourceLinkIds ?? [];
|
|
21
43
|
lines.push(`Deliverables: ${links.length > 0 ? links.join(', ') : 'none linked'}`);
|
|
22
44
|
const evidence = current.evidenceRefs ?? [];
|
|
@@ -14,6 +14,7 @@ export default class TasksResultSubmit extends BaseCommand {
|
|
|
14
14
|
'conclusion-json': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
15
|
'structured-schema': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
'structured-json': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'source-attachment': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
18
|
deliverable: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
evidence: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
attach: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -37,6 +37,8 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
|
|
|
37
37
|
'conclusion-json': core_1.Flags.string({ description: 'JSON value for the domain conclusion' }),
|
|
38
38
|
'structured-schema': core_1.Flags.string({ description: 'Schema name for --structured-json' }),
|
|
39
39
|
'structured-json': core_1.Flags.string({ description: 'Task-type-specific structured Result JSON' }),
|
|
40
|
+
'source-attachment': core_1.Flags.string({ multiple: true,
|
|
41
|
+
description: 'Exact Task JSON attachment ID; server records its literal declarations separately from this Result interpretation (up to four)' }),
|
|
40
42
|
deliverable: core_1.Flags.string({
|
|
41
43
|
multiple: true,
|
|
42
44
|
description: 'Task Resource link id (repeatable)',
|
|
@@ -129,6 +131,7 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
|
|
|
129
131
|
expectedSpecVersion: flags['spec-version'],
|
|
130
132
|
runId: flags['run-id'],
|
|
131
133
|
sourceRunIds: flags['source-run'],
|
|
134
|
+
sourceAttachmentIds: flags['source-attachment'],
|
|
132
135
|
resourceLinkIds: flags.deliverable,
|
|
133
136
|
evidenceRefs,
|
|
134
137
|
remainingWork: (flags.remaining || []).map((summary) => ({ summary })),
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/** Read-only recovery for one server-owned compound Task retry. */
|
|
3
|
+
export default class TasksRetryReceipt extends BaseCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
id: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'request-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
/** Read-only recovery for one server-owned compound Task retry. */
|
|
8
|
+
class TasksRetryReceipt extends base_command_1.BaseCommand {
|
|
9
|
+
static description = 'Read a task retry receipt without changing status or dispatching another run.';
|
|
10
|
+
static examples = [
|
|
11
|
+
'<%= config.bin %> tasks retry-receipt <task-id> --request-id task-retry:deploy-42',
|
|
12
|
+
'<%= config.bin %> tasks retry-receipt <task-id> --request-id task-retry:deploy-42 --json',
|
|
13
|
+
];
|
|
14
|
+
static args = {
|
|
15
|
+
id: core_1.Args.string({
|
|
16
|
+
description: 'Task ID; defaults to OVERSKY_SESSION_TASK_ID in task runtimes',
|
|
17
|
+
required: false,
|
|
18
|
+
ignoreStdin: true,
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
static flags = {
|
|
22
|
+
task: core_1.Flags.string({ description: 'Task ID; overrides daemon runtime context' }),
|
|
23
|
+
'request-id': core_1.Flags.string({
|
|
24
|
+
description: 'The request id printed by tasks retry',
|
|
25
|
+
required: true,
|
|
26
|
+
}),
|
|
27
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
this.requireAuth();
|
|
31
|
+
const { args, flags } = await this.parse(TasksRetryReceipt);
|
|
32
|
+
let taskIdentity;
|
|
33
|
+
try {
|
|
34
|
+
taskIdentity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
const failure = (0, task_resolver_1.taskResolutionFailure)(err);
|
|
38
|
+
this.failWithCliError({
|
|
39
|
+
message: failure.message,
|
|
40
|
+
code: failure.code,
|
|
41
|
+
exit: 2,
|
|
42
|
+
retryable: false,
|
|
43
|
+
details: { suggestion: failure.suggestion, context: failure.details },
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
// `resolveTaskIdentity` decides which INPUT wins; it does no lookup. This
|
|
47
|
+
// turns whatever it picked into something the API can resolve — a UUID and
|
|
48
|
+
// an OSK-2423 ref pass through untouched, a title is searched.
|
|
49
|
+
const taskId = await this.resolveTaskReference(taskIdentity.id);
|
|
50
|
+
const getTaskRetryReceipt = data_provider_1.dataService
|
|
51
|
+
.getTaskRetryReceipt;
|
|
52
|
+
let receipt;
|
|
53
|
+
try {
|
|
54
|
+
receipt = await getTaskRetryReceipt(taskId, flags['request-id']);
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
this.handleApiError(err, { subject: `Task ${taskId} retry receipt` });
|
|
58
|
+
}
|
|
59
|
+
if (flags.json) {
|
|
60
|
+
this.printJsonResult(receipt);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.log(`Retry request ${receipt.requestId}: ${receipt.state}`);
|
|
64
|
+
if (receipt.responseStatus !== undefined)
|
|
65
|
+
this.log(`Response status: ${receipt.responseStatus}`);
|
|
66
|
+
if (receipt.statusTransition?.state) {
|
|
67
|
+
this.log(`Status transition: ${receipt.statusTransition.state}`);
|
|
68
|
+
}
|
|
69
|
+
if (receipt.statusTransition?.task?.status) {
|
|
70
|
+
this.log(`Transitioned status: ${receipt.statusTransition.task.status}`);
|
|
71
|
+
}
|
|
72
|
+
if (receipt.dispatch?.state)
|
|
73
|
+
this.log(`Dispatch: ${receipt.dispatch.state}`);
|
|
74
|
+
if (receipt.dispatch?.code)
|
|
75
|
+
this.log(`Dispatch code: ${receipt.dispatch.code}`);
|
|
76
|
+
if (receipt.dispatch?.run?.runId)
|
|
77
|
+
this.log(`Run: ${receipt.dispatch.run.runId}`);
|
|
78
|
+
if (receipt.dispatch?.run?.autonomousRunId) {
|
|
79
|
+
this.log(`Autonomous Run: ${receipt.dispatch.run.autonomousRunId}`);
|
|
80
|
+
}
|
|
81
|
+
if (receipt.dispatch?.run?.conversationId) {
|
|
82
|
+
this.log(`Conversation: ${receipt.dispatch.run.conversationId}`);
|
|
83
|
+
}
|
|
84
|
+
if (receipt.dispatch?.run?.sessionId)
|
|
85
|
+
this.log(`Session: ${receipt.dispatch.run.sessionId}`);
|
|
86
|
+
this.log('This is inspect-only. Do not resend the retry from this receipt.');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.default = TasksRetryReceipt;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/** Explicit DRI continuation; never composes move-to-todo with a leaf start. */
|
|
3
|
+
export default class TasksRetryReview extends BaseCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
execute: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'run-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'expected-manifest': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'request-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const node_crypto_1 = require("node:crypto");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const base_command_1 = require("../../base-command");
|
|
6
|
+
const api_fetch_1 = require("../../lib/api-fetch");
|
|
7
|
+
/** Explicit DRI continuation; never composes move-to-todo with a leaf start. */
|
|
8
|
+
class TasksRetryReview extends base_command_1.BaseCommand {
|
|
9
|
+
static description = 'Preview or explicitly retry exact blocked DRI review work on the same Task';
|
|
10
|
+
static args = {
|
|
11
|
+
id: core_1.Args.string({ required: true, ignoreStdin: true, description: 'Review Task id or ref' }),
|
|
12
|
+
};
|
|
13
|
+
static flags = {
|
|
14
|
+
json: core_1.Flags.boolean({ description: 'Output JSON' }),
|
|
15
|
+
execute: core_1.Flags.boolean({
|
|
16
|
+
description: 'Request one fresh genuine DRI Run using the exact preview below',
|
|
17
|
+
}),
|
|
18
|
+
'run-id': core_1.Flags.string({
|
|
19
|
+
description: 'Original blocked DRI Run returned by the preview',
|
|
20
|
+
dependsOn: ['execute'],
|
|
21
|
+
}),
|
|
22
|
+
'expected-manifest': core_1.Flags.string({
|
|
23
|
+
description: 'Exact preview manifest SHA-256',
|
|
24
|
+
dependsOn: ['execute'],
|
|
25
|
+
}),
|
|
26
|
+
'request-id': core_1.Flags.string({
|
|
27
|
+
description: 'Stable request UUID; retain it when retrying an ambiguous response',
|
|
28
|
+
dependsOn: ['execute'],
|
|
29
|
+
}),
|
|
30
|
+
};
|
|
31
|
+
async run() {
|
|
32
|
+
this.requireAuth();
|
|
33
|
+
const { args, flags } = await this.parse(TasksRetryReview);
|
|
34
|
+
const taskId = await this.resolveEntityRef('task', args.id);
|
|
35
|
+
const endpoint = `/api/tasks/${encodeURIComponent(taskId)}/dri-review-retry`;
|
|
36
|
+
if (flags.execute && (!flags['run-id'] || !flags['expected-manifest'] || !flags['request-id']))
|
|
37
|
+
this.error('Execution requires --run-id, --expected-manifest and --request-id from the reviewed preview.');
|
|
38
|
+
let result;
|
|
39
|
+
try {
|
|
40
|
+
result = await (0, api_fetch_1.apiFetch)(endpoint, flags.execute
|
|
41
|
+
? {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
body: {
|
|
44
|
+
runId: flags['run-id'],
|
|
45
|
+
expectedManifest: flags['expected-manifest'],
|
|
46
|
+
requestId: flags['request-id'],
|
|
47
|
+
},
|
|
48
|
+
headers: { 'X-Idempotency-Key': `dri-review-retry:${flags['request-id']}` },
|
|
49
|
+
}
|
|
50
|
+
: undefined);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
this.handleApiError(error);
|
|
54
|
+
}
|
|
55
|
+
if (flags.json)
|
|
56
|
+
return this.printJsonResult(result);
|
|
57
|
+
if (flags.execute) {
|
|
58
|
+
this.log(`Requested DRI review retry on ${taskId}. Request: ${result.requestId}; phase: ${result.phase}.`);
|
|
59
|
+
this.log('The server owns admission and delivery. An accepted request is not a completed Review.');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
this.log(JSON.stringify(result, null, 2));
|
|
63
|
+
this.log(`After reviewing the exact obligations, run: ${this.config.bin} tasks retry-review ${taskId} --execute --run-id ${result.runId} --expected-manifest ${result.manifestSha256} --request-id ${(0, node_crypto_1.randomUUID)()}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.default = TasksRetryReview;
|