@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
|
@@ -23,6 +23,17 @@ const space_output_1 = require("../../../lib/space-output");
|
|
|
23
23
|
*
|
|
24
24
|
* Exported for the unit test.
|
|
25
25
|
*/
|
|
26
|
+
/**
|
|
27
|
+
* The Space loop a heartbeat was converted into (`skrr spaces loops migrate`,
|
|
28
|
+
* OSK-18009): `pending` while the loop is not active (the heartbeat still runs
|
|
29
|
+
* and is read-only), `retired` once the loop replaced it.
|
|
30
|
+
*/
|
|
31
|
+
function loopCell(loop) {
|
|
32
|
+
const pointer = loop;
|
|
33
|
+
if (!pointer?.commitmentId)
|
|
34
|
+
return '-';
|
|
35
|
+
return `${(0, format_1.formatCell)(pointer.state)} -> ${(0, format_1.formatCell)(pointer.commitmentId)}`;
|
|
36
|
+
}
|
|
26
37
|
function heartbeatRow(h) {
|
|
27
38
|
const schedule = h.schedule;
|
|
28
39
|
const freqObj = h.frequency;
|
|
@@ -34,6 +45,7 @@ function heartbeatRow(h) {
|
|
|
34
45
|
pattern: (0, format_1.formatCell)(pattern),
|
|
35
46
|
timezone: (0, format_1.formatCell)(schedule?.timezone),
|
|
36
47
|
enabled: h.enabled === true ? 'yes' : 'no',
|
|
48
|
+
loop: loopCell(h.loop),
|
|
37
49
|
updated: h.updatedAt ? (0, format_1.localTime)(h.updatedAt) : '-',
|
|
38
50
|
};
|
|
39
51
|
}
|
|
@@ -85,6 +97,7 @@ class SpacesHeartbeatsList extends base_command_1.BaseCommand {
|
|
|
85
97
|
{ key: 'pattern', header: 'PATTERN' },
|
|
86
98
|
{ key: 'timezone', header: 'TIMEZONE' },
|
|
87
99
|
{ key: 'enabled', header: 'ENABLED' },
|
|
100
|
+
{ key: 'loop', header: 'LOOP' },
|
|
88
101
|
{ key: 'updated', header: 'UPDATED' },
|
|
89
102
|
], (line) => this.log(line));
|
|
90
103
|
this.log('');
|
|
@@ -140,6 +140,9 @@ class SpacesInstallTemplate extends base_command_1.BaseCommand {
|
|
|
140
140
|
}
|
|
141
141
|
const verb = installed.attachedToExistingSpace ? 'Installed into' : 'Created';
|
|
142
142
|
this.log(`${verb} space ${spaceId} — ${installed.taskCount ?? 0} task(s), ${installed.goalCount ?? 0} goal(s).`);
|
|
143
|
+
for (const notice of (0, space_templates_1.wikiPageInstallNotices)(installed.outcomes)) {
|
|
144
|
+
this.log(notice);
|
|
145
|
+
}
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
148
|
exports.default = SpacesInstallTemplate;
|
|
@@ -25,6 +25,7 @@ export default class SpacesList extends BaseCommand {
|
|
|
25
25
|
status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
26
|
label: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
27
|
'include-archived': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
|
+
'archived-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
29
|
q: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
30
|
match: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
30
31
|
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -15,7 +15,7 @@ function noSpacesMatchedMessage(q, bin = 'skrr', mode = 'fuzzy') {
|
|
|
15
15
|
: mode === 'phrase'
|
|
16
16
|
? 'Phrase matches use a literal case-insensitive substring; word order matters.'
|
|
17
17
|
: 'Fuzzy discovery can use tokenized, typo-tolerant search or a substring fallback.';
|
|
18
|
-
return (`No spaces matched ${JSON.stringify(q)}.\n` +
|
|
18
|
+
return (`No spaces matched ${JSON.stringify(q)} on this page.\n` +
|
|
19
19
|
` → ${explanation} Fields: title, description and identifier.\n` +
|
|
20
20
|
` → retry with one distinctive word, or list them all with \`${bin} spaces list\`.`);
|
|
21
21
|
}
|
|
@@ -45,6 +45,7 @@ class SpacesList extends base_command_1.BaseCommand {
|
|
|
45
45
|
'<%= config.bin %> spaces list --q "always on" --match phrase',
|
|
46
46
|
'<%= config.bin %> spaces list --q "My workspace" --match exact --json',
|
|
47
47
|
'<%= config.bin %> spaces list --include-archived --json',
|
|
48
|
+
'<%= config.bin %> spaces list --archived-only --json',
|
|
48
49
|
'<%= config.bin %> spaces list --compact --json',
|
|
49
50
|
'<%= config.bin %> spaces list --fields id,identifier,title --ndjson',
|
|
50
51
|
];
|
|
@@ -62,7 +63,8 @@ class SpacesList extends base_command_1.BaseCommand {
|
|
|
62
63
|
description: 'Filter by label ID (repeatable). Multiple labels AND together — a space must carry all of them.',
|
|
63
64
|
multiple: true,
|
|
64
65
|
}),
|
|
65
|
-
'include-archived': core_1.Flags.boolean({ description: 'Include archived spaces' }),
|
|
66
|
+
'include-archived': core_1.Flags.boolean({ description: 'Include archived spaces', exclusive: ['archived-only'] }),
|
|
67
|
+
'archived-only': core_1.Flags.boolean({ description: 'List only archived spaces', exclusive: ['include-archived'] }),
|
|
66
68
|
q: core_1.Flags.string({
|
|
67
69
|
description: 'Search title, description, or identifier. Default fuzzy discovery may tokenize and tolerate typos; ' +
|
|
68
70
|
'use --match phrase for a literal substring or --match exact for whole-field equality. Maximum 200 characters.',
|
|
@@ -86,6 +88,7 @@ class SpacesList extends base_command_1.BaseCommand {
|
|
|
86
88
|
...(flags.label?.length ? { labelIds: flags.label } : {}),
|
|
87
89
|
...(flags.q ? { q: flags.q, ...(flags.match ? { match: flags.match } : {}) } : {}),
|
|
88
90
|
includeArchived: flags['include-archived'],
|
|
91
|
+
archivedOnly: flags['archived-only'],
|
|
89
92
|
limit: flags.limit,
|
|
90
93
|
cursor: flags.cursor,
|
|
91
94
|
});
|
|
@@ -107,6 +110,8 @@ class SpacesList extends base_command_1.BaseCommand {
|
|
|
107
110
|
}
|
|
108
111
|
const r = response;
|
|
109
112
|
const items = r?.data ?? [];
|
|
113
|
+
if (flags.q && (r?.degraded || r?.warnings?.length))
|
|
114
|
+
this.warn('Search may be incomplete. Inspect --json diagnostics.');
|
|
110
115
|
if (r?.search) {
|
|
111
116
|
this.log(`Search: ${r.search.mode}; ${r.search.semantics}; backend=${r.search.backend}.`);
|
|
112
117
|
if (r.search.candidates_may_be_truncated) {
|
|
@@ -116,7 +121,11 @@ class SpacesList extends base_command_1.BaseCommand {
|
|
|
116
121
|
if (items.length === 0) {
|
|
117
122
|
this.log(flags.q
|
|
118
123
|
? noSpacesMatchedMessage(flags.q, this.config.bin, r?.search?.mode ?? 'fuzzy')
|
|
119
|
-
:
|
|
124
|
+
: flags['archived-only'] || flags.status || flags.label?.length || r?.next_cursor
|
|
125
|
+
? 'No spaces on this page under the current filters.'
|
|
126
|
+
: noSpacesEmptyMessage(this.config.bin));
|
|
127
|
+
if (r?.next_cursor)
|
|
128
|
+
this.log(`Next page: --cursor ${r.next_cursor}`);
|
|
120
129
|
return;
|
|
121
130
|
}
|
|
122
131
|
const rows = items.map((s) => ({
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr spaces loops migrate <space> --from heartbeats|oracle_triggers|assistants`
|
|
4
|
+
* (OSK-18009, OSK-18011, OSK-18010; design §5.11): converts a Space's older
|
|
5
|
+
* periodic agent turns into Space loops. The sources are the server's (its
|
|
6
|
+
* adapter registry), so `--from` is passed through and an unknown one is
|
|
7
|
+
* answered with the list. A Space assistant is private to its member, so its
|
|
8
|
+
* plan lists only the caller's own.
|
|
9
|
+
*
|
|
10
|
+
* Without `--apply` it prints the plan, a pure read: every entry, what it
|
|
11
|
+
* becomes (the Space's loop when its owner is the Space's execution principal,
|
|
12
|
+
* otherwise its owner's own Commitment), its cadence before and after (never
|
|
13
|
+
* rounded silently), what the loop does differently, the entries it cannot
|
|
14
|
+
* convert and why, and who may apply each. With `--apply --plan-digest <digest>`
|
|
15
|
+
* it converts the entries the caller may, acting only on the plan that digest
|
|
16
|
+
* names. Each entry keeps firing until its loop is active, and is retired then.
|
|
17
|
+
*/
|
|
18
|
+
export default class SpacesLoopsMigrate extends BaseCommand {
|
|
19
|
+
static description: string;
|
|
20
|
+
static examples: string[];
|
|
21
|
+
static args: {
|
|
22
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
23
|
+
};
|
|
24
|
+
static flags: {
|
|
25
|
+
from: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
26
|
+
apply: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
27
|
+
'plan-digest': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
28
|
+
entry: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
29
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
30
|
+
};
|
|
31
|
+
run(): Promise<void>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 space_loop_migration_1 = require("../../../lib/space-loop-migration");
|
|
7
|
+
/**
|
|
8
|
+
* `skrr spaces loops migrate <space> --from heartbeats|oracle_triggers|assistants`
|
|
9
|
+
* (OSK-18009, OSK-18011, OSK-18010; design §5.11): converts a Space's older
|
|
10
|
+
* periodic agent turns into Space loops. The sources are the server's (its
|
|
11
|
+
* adapter registry), so `--from` is passed through and an unknown one is
|
|
12
|
+
* answered with the list. A Space assistant is private to its member, so its
|
|
13
|
+
* plan lists only the caller's own.
|
|
14
|
+
*
|
|
15
|
+
* Without `--apply` it prints the plan, a pure read: every entry, what it
|
|
16
|
+
* becomes (the Space's loop when its owner is the Space's execution principal,
|
|
17
|
+
* otherwise its owner's own Commitment), its cadence before and after (never
|
|
18
|
+
* rounded silently), what the loop does differently, the entries it cannot
|
|
19
|
+
* convert and why, and who may apply each. With `--apply --plan-digest <digest>`
|
|
20
|
+
* it converts the entries the caller may, acting only on the plan that digest
|
|
21
|
+
* names. Each entry keeps firing until its loop is active, and is retired then.
|
|
22
|
+
*/
|
|
23
|
+
class SpacesLoopsMigrate extends base_command_1.BaseCommand {
|
|
24
|
+
static description = "Convert a space's heartbeats, custom oracle triggers or your Space assistant (or another older periodic agent turn) into Space loops: print the plan, then apply it";
|
|
25
|
+
static examples = [
|
|
26
|
+
'<%= config.bin %> spaces loops migrate <space-id> --from heartbeats',
|
|
27
|
+
'<%= config.bin %> spaces loops migrate <space-id> --from assistants',
|
|
28
|
+
'<%= config.bin %> spaces loops migrate "Growth lab" --from heartbeats --json',
|
|
29
|
+
'<%= config.bin %> spaces loops migrate <space-id> --from oracle_triggers',
|
|
30
|
+
'<%= config.bin %> spaces loops migrate <space-id> --from heartbeats --apply --plan-digest <digest>',
|
|
31
|
+
'<%= config.bin %> spaces loops migrate <space-id> --from heartbeats --apply --plan-digest <digest> --entry <entry-id>',
|
|
32
|
+
];
|
|
33
|
+
static args = {
|
|
34
|
+
id: core_1.Args.string({
|
|
35
|
+
description: 'Space ID, or a title to resolve',
|
|
36
|
+
required: true,
|
|
37
|
+
ignoreStdin: true,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
static flags = {
|
|
41
|
+
from: core_1.Flags.string({
|
|
42
|
+
description: 'What to convert: heartbeats, oracle_triggers (custom space_oracle triggers), or assistants (your own Space assistant)',
|
|
43
|
+
required: true,
|
|
44
|
+
}),
|
|
45
|
+
apply: core_1.Flags.boolean({
|
|
46
|
+
description: 'Apply the plan (needs --plan-digest from a plan you reviewed)',
|
|
47
|
+
default: false,
|
|
48
|
+
}),
|
|
49
|
+
'plan-digest': core_1.Flags.string({
|
|
50
|
+
description: 'The digest the plan printed; apply refuses a plan that changed since',
|
|
51
|
+
}),
|
|
52
|
+
entry: core_1.Flags.string({
|
|
53
|
+
description: 'Apply only this entry of the plan (repeatable)',
|
|
54
|
+
multiple: true,
|
|
55
|
+
}),
|
|
56
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
57
|
+
};
|
|
58
|
+
async run() {
|
|
59
|
+
this.requireAuth();
|
|
60
|
+
const { args, flags } = await this.parse(SpacesLoopsMigrate);
|
|
61
|
+
const source = String(flags.from).trim();
|
|
62
|
+
if (flags.apply && !flags['plan-digest']) {
|
|
63
|
+
this.error('Apply acts on the plan you reviewed: run without --apply first, then pass the digest it prints as --plan-digest.', { exit: 2 });
|
|
64
|
+
}
|
|
65
|
+
if (!flags.apply && (flags['plan-digest'] || flags.entry?.length)) {
|
|
66
|
+
this.error('--plan-digest and --entry apply a plan: add --apply.', { exit: 2 });
|
|
67
|
+
}
|
|
68
|
+
const spaceId = await this.resolveSpaceReference(args.id);
|
|
69
|
+
if (!flags.apply) {
|
|
70
|
+
let plan;
|
|
71
|
+
try {
|
|
72
|
+
plan = await data_provider_1.dataService.planSpaceLoopMigration(spaceId, source);
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
this.handleApiError(err, { subject: `space ${args.id}` });
|
|
76
|
+
}
|
|
77
|
+
if (flags.json) {
|
|
78
|
+
this.printJsonResult(plan);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
for (const line of (0, space_loop_migration_1.planLines)(plan, { binName: this.config.bin }))
|
|
82
|
+
this.log(line);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
let applied;
|
|
86
|
+
try {
|
|
87
|
+
applied = await data_provider_1.dataService.applySpaceLoopMigration(spaceId, source, {
|
|
88
|
+
planDigest: String(flags['plan-digest']),
|
|
89
|
+
...(flags.entry?.length ? { entryIds: flags.entry } : {}),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
this.handleApiError(err, { subject: `space ${args.id}` });
|
|
94
|
+
}
|
|
95
|
+
if (flags.json) {
|
|
96
|
+
this.printJsonResult(applied);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
for (const line of (0, space_loop_migration_1.applyLines)(applied))
|
|
100
|
+
this.log(line);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.default = SpacesLoopsMigrate;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class SpacesLoopsRelease extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
commitment: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
link: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
class SpacesLoopsRelease extends base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Pause a loop and release its Space and Goals to built-in planners (requires Space SHARE permission)';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> spaces loops release <space-id> --commitment <commitment-id>',
|
|
10
|
+
'<%= config.bin %> spaces loops release "Growth lab" --commitment <commitment-id> --json',
|
|
11
|
+
];
|
|
12
|
+
static args = {
|
|
13
|
+
id: core_1.Args.string({ description: 'Space ID, or a title to resolve', required: true, ignoreStdin: true }),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
commitment: core_1.Flags.string({ description: 'The loop Commitment to pause and release', required: true }),
|
|
17
|
+
link: core_1.Flags.string({ description: 'Pin the reviewed home link ID; otherwise resolve the current active home link once' }),
|
|
18
|
+
json: core_1.Flags.boolean({ description: 'Output the release receipt as JSON' }),
|
|
19
|
+
};
|
|
20
|
+
async run() {
|
|
21
|
+
this.requireAuth();
|
|
22
|
+
const { args, flags } = await this.parse(SpacesLoopsRelease);
|
|
23
|
+
const spaceId = await this.resolveSpaceReference(args.id);
|
|
24
|
+
let receipt;
|
|
25
|
+
try {
|
|
26
|
+
let linkId = flags.link;
|
|
27
|
+
if (!linkId) {
|
|
28
|
+
const links = await data_provider_1.dataService.listCommitmentWorkLinksForTarget({ targetType: 'space', targetId: spaceId });
|
|
29
|
+
const homes = links.data.filter((link) => link.commitmentId === flags.commitment && link.status === 'active' && link.roles.includes('home'));
|
|
30
|
+
if (homes.length !== 1) {
|
|
31
|
+
this.error('No unique active home link found. Supply --link <home-link-id> to release a reviewed link or retry its receipt.', { exit: 2 });
|
|
32
|
+
}
|
|
33
|
+
linkId = homes[0].id;
|
|
34
|
+
}
|
|
35
|
+
receipt = await data_provider_1.dataService.releaseSpaceLoop(spaceId, flags.commitment, { linkId });
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
this.handleApiError(err, { subject: `loop ${flags.commitment} in space ${args.id}` });
|
|
39
|
+
}
|
|
40
|
+
if (flags.json) {
|
|
41
|
+
this.printJsonResult(receipt);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.log(receipt.outcome === 'already_released'
|
|
45
|
+
? `Loop ${receipt.commitmentId} was already released from this Space.`
|
|
46
|
+
: `Loop ${receipt.commitmentId} is paused and released from this Space.`);
|
|
47
|
+
this.log(`Home link: ${receipt.linkId}`);
|
|
48
|
+
this.log(receipt.outcome === 'released'
|
|
49
|
+
? 'Its Space and Goal planning turns are released after current turns finish. The owner may explicitly resume the Commitment personally.'
|
|
50
|
+
: 'This receipt refers to the previously released home link. Current planning may have changed.');
|
|
51
|
+
if (receipt.teardown?.status === 'degraded') {
|
|
52
|
+
this.log('Some running work could not be stopped. Review the teardown receipt before assuming all work has ended.');
|
|
53
|
+
for (const failure of receipt.teardown.failures ?? []) {
|
|
54
|
+
this.log(` ${failure.step}: ${failure.reason}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.default = SpacesLoopsRelease;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr spaces notebook <space>` — the Space's notebook (OSK-17996): one page
|
|
4
|
+
* of its Task Results, loop Cycles, hypothesis verdicts and journal / report
|
|
5
|
+
* pages, newest first. A view over records that already exist: each row is a
|
|
6
|
+
* summary and a link, and the body is read from the record itself. VIEW on
|
|
7
|
+
* the Space. A loop's Cycles are shared with the Space's members while its
|
|
8
|
+
* rules hold; a Commitment that only watches the Space, and every hypothesis
|
|
9
|
+
* verdict, show only to people who can open the Commitment. Each loop row says
|
|
10
|
+
* which.
|
|
11
|
+
*/
|
|
12
|
+
export default class SpacesNotebook extends BaseCommand {
|
|
13
|
+
static description: string;
|
|
14
|
+
static examples: string[];
|
|
15
|
+
static args: {
|
|
16
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
17
|
+
};
|
|
18
|
+
static flags: {
|
|
19
|
+
kinds: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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 space_notebook_1 = require("../../lib/space-notebook");
|
|
7
|
+
const web_url_1 = require("../../lib/web-url");
|
|
8
|
+
/**
|
|
9
|
+
* `skrr spaces notebook <space>` — the Space's notebook (OSK-17996): one page
|
|
10
|
+
* of its Task Results, loop Cycles, hypothesis verdicts and journal / report
|
|
11
|
+
* pages, newest first. A view over records that already exist: each row is a
|
|
12
|
+
* summary and a link, and the body is read from the record itself. VIEW on
|
|
13
|
+
* the Space. A loop's Cycles are shared with the Space's members while its
|
|
14
|
+
* rules hold; a Commitment that only watches the Space, and every hypothesis
|
|
15
|
+
* verdict, show only to people who can open the Commitment. Each loop row says
|
|
16
|
+
* which.
|
|
17
|
+
*/
|
|
18
|
+
class SpacesNotebook extends base_command_1.BaseCommand {
|
|
19
|
+
static description = "Show a space's notebook: its task results, loop cycles, hypothesis verdicts and journal and report pages, newest first";
|
|
20
|
+
static examples = [
|
|
21
|
+
'<%= config.bin %> spaces notebook <space-id>',
|
|
22
|
+
'<%= config.bin %> spaces notebook "Growth lab" --kinds task_result,hypothesis',
|
|
23
|
+
'<%= config.bin %> spaces notebook <space-id> --limit 50 --json',
|
|
24
|
+
'<%= config.bin %> spaces notebook <space-id> --cursor <next-cursor>',
|
|
25
|
+
];
|
|
26
|
+
static args = {
|
|
27
|
+
id: core_1.Args.string({
|
|
28
|
+
description: 'Space ID, or a title to resolve',
|
|
29
|
+
required: true,
|
|
30
|
+
ignoreStdin: true,
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
static flags = {
|
|
34
|
+
kinds: core_1.Flags.string({
|
|
35
|
+
description: `Only these kinds, comma-separated: ${data_provider_1.SPACE_NOTEBOOK_KINDS.join(', ')} (default: all)`,
|
|
36
|
+
}),
|
|
37
|
+
limit: core_1.Flags.integer({ description: 'Rows per page (1-100, default 30)', min: 1, max: 100 }),
|
|
38
|
+
cursor: core_1.Flags.string({
|
|
39
|
+
description: 'The cursor the previous page printed; pass the same --kinds with it',
|
|
40
|
+
}),
|
|
41
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
42
|
+
};
|
|
43
|
+
async run() {
|
|
44
|
+
this.requireAuth();
|
|
45
|
+
const { args, flags } = await this.parse(SpacesNotebook);
|
|
46
|
+
const kinds = (0, data_provider_1.readSpaceNotebookKinds)(flags.kinds);
|
|
47
|
+
if (!kinds.ok) {
|
|
48
|
+
this.error(`Unknown notebook kind: ${kinds.unknown.join(', ')}. Use: ${data_provider_1.SPACE_NOTEBOOK_KINDS.join(', ')}`, { exit: 2 });
|
|
49
|
+
}
|
|
50
|
+
const spaceId = await this.resolveSpaceReference(args.id);
|
|
51
|
+
let page;
|
|
52
|
+
try {
|
|
53
|
+
page = await data_provider_1.dataService.getSpaceNotebook(spaceId, {
|
|
54
|
+
// Every kind is the default; sending none keeps the URL short.
|
|
55
|
+
...(kinds.kinds.length < data_provider_1.SPACE_NOTEBOOK_KINDS.length ? { kinds: kinds.kinds } : {}),
|
|
56
|
+
...(typeof flags.limit === 'number' ? { limit: flags.limit } : {}),
|
|
57
|
+
...(flags.cursor ? { cursor: flags.cursor } : {}),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
this.handleApiError(err, { subject: `space ${args.id}` });
|
|
62
|
+
}
|
|
63
|
+
if (flags.json) {
|
|
64
|
+
this.printJsonResult(page);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
for (const line of (0, space_notebook_1.notebookLines)(page, {
|
|
68
|
+
webOrigin: (0, web_url_1.webOrigin)(this.cliConfig.baseURL),
|
|
69
|
+
binName: this.config.bin,
|
|
70
|
+
})) {
|
|
71
|
+
this.log(line);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.default = SpacesNotebook;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SpaceProposalDecisionCommand } from '../../../lib/space-proposal-decision-command';
|
|
2
|
+
/** `skrr spaces proposals discard <space> <KIND:ID>`: reject through the item's own endpoint. */
|
|
3
|
+
export default class SpacesProposalsDiscard extends SpaceProposalDecisionCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
space: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
item: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
expected: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
reason: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'reason-code': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
static decision: "discard";
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const space_proposal_decision_command_1 = require("../../../lib/space-proposal-decision-command");
|
|
4
|
+
/** `skrr spaces proposals discard <space> <KIND:ID>`: reject through the item's own endpoint. */
|
|
5
|
+
class SpacesProposalsDiscard extends space_proposal_decision_command_1.SpaceProposalDecisionCommand {
|
|
6
|
+
static description = "Discard (reject) one item in a space's proposals inbox, through the item's own decision endpoint";
|
|
7
|
+
static examples = [
|
|
8
|
+
`<%= config.bin %> spaces proposals discard <space-id> commitment_action_proposal:cap_123 --expected '{"snapshotDigest":"…","bundleVersion":2}' --reason-code not_worth_it`,
|
|
9
|
+
'<%= config.bin %> spaces proposals discard <space-id> memory_proposal:<uuid> --reason "Not true any more"',
|
|
10
|
+
'<%= config.bin %> spaces proposals discard <space-id> space_lesson:<uuid> --reason-code incorrect --reason "Step 2 is the old flow"',
|
|
11
|
+
];
|
|
12
|
+
// Own, not inherited: oclif drops a static a subclass only inherits (OSK-15346).
|
|
13
|
+
static args = space_proposal_decision_command_1.SpaceProposalDecisionCommand.args;
|
|
14
|
+
static flags = { ...space_proposal_decision_command_1.spaceProposalDecisionFlags };
|
|
15
|
+
static decision = 'discard';
|
|
16
|
+
}
|
|
17
|
+
exports.default = SpacesProposalsDiscard;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SpaceProposalDecisionCommand } from '../../../lib/space-proposal-decision-command';
|
|
2
|
+
/** `skrr spaces proposals keep <space> <KIND:ID>`: approve through the item's own endpoint. */
|
|
3
|
+
export default class SpacesProposalsKeep extends SpaceProposalDecisionCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static args: {
|
|
7
|
+
space: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
item: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
expected: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
reason: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'reason-code': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
};
|
|
16
|
+
static decision: "keep";
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const space_proposal_decision_command_1 = require("../../../lib/space-proposal-decision-command");
|
|
4
|
+
/** `skrr spaces proposals keep <space> <KIND:ID>`: approve through the item's own endpoint. */
|
|
5
|
+
class SpacesProposalsKeep extends space_proposal_decision_command_1.SpaceProposalDecisionCommand {
|
|
6
|
+
static description = "Keep (approve) one item in a space's proposals inbox, through the item's own decision endpoint";
|
|
7
|
+
static examples = [
|
|
8
|
+
`<%= config.bin %> spaces proposals keep <space-id> commitment_action_proposal:cap_123 --expected '{"snapshotDigest":"…","bundleVersion":2}'`,
|
|
9
|
+
'<%= config.bin %> spaces proposals keep <space-id> memory_proposal:<uuid>',
|
|
10
|
+
'<%= config.bin %> spaces proposals keep <space-id> space_lesson:<uuid>',
|
|
11
|
+
];
|
|
12
|
+
// Own, not inherited: oclif drops a static a subclass only inherits (OSK-15346).
|
|
13
|
+
static args = space_proposal_decision_command_1.SpaceProposalDecisionCommand.args;
|
|
14
|
+
static flags = { ...space_proposal_decision_command_1.spaceProposalDecisionFlags };
|
|
15
|
+
static decision = 'keep';
|
|
16
|
+
}
|
|
17
|
+
exports.default = SpacesProposalsKeep;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
/**
|
|
3
|
+
* `skrr spaces proposals list <space>` (OSK-17993): the pending objects that
|
|
4
|
+
* target one Space (writes the Space held for approval, its loops' bundles,
|
|
5
|
+
* its Memory proposals), each with whether YOU can decide it. VIEW on the
|
|
6
|
+
* Space. A read-time projection: nothing here is the Space's own state, and
|
|
7
|
+
* a decision goes to the item's own endpoint (`spaces proposals keep|discard`).
|
|
8
|
+
*/
|
|
9
|
+
export default class SpacesProposalsList extends BaseCommand {
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: string[];
|
|
12
|
+
static args: {
|
|
13
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
+
};
|
|
15
|
+
static flags: {
|
|
16
|
+
kind: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
disposition: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
all: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
cursor: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
22
|
+
};
|
|
23
|
+
run(): Promise<void>;
|
|
24
|
+
}
|
|
@@ -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 format_1 = require("../../../lib/format");
|
|
7
|
+
const list_output_1 = require("../../../lib/list-output");
|
|
8
|
+
const space_proposals_1 = require("../../../lib/space-proposals");
|
|
9
|
+
/**
|
|
10
|
+
* `skrr spaces proposals list <space>` (OSK-17993): the pending objects that
|
|
11
|
+
* target one Space (writes the Space held for approval, its loops' bundles,
|
|
12
|
+
* its Memory proposals), each with whether YOU can decide it. VIEW on the
|
|
13
|
+
* Space. A read-time projection: nothing here is the Space's own state, and
|
|
14
|
+
* a decision goes to the item's own endpoint (`spaces proposals keep|discard`).
|
|
15
|
+
*/
|
|
16
|
+
class SpacesProposalsList extends base_command_1.BaseCommand {
|
|
17
|
+
static description = "List a space's proposals inbox: held writes, its loops' bundles and its Memory proposals, with who can decide each";
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> spaces proposals list <space-id>',
|
|
20
|
+
'<%= config.bin %> spaces proposals list "Growth lab" --disposition proposed',
|
|
21
|
+
'<%= config.bin %> spaces proposals list <space-id> --kind memory_proposal --json',
|
|
22
|
+
];
|
|
23
|
+
static args = {
|
|
24
|
+
id: core_1.Args.string({
|
|
25
|
+
description: 'Space ID, or a title to resolve',
|
|
26
|
+
required: true,
|
|
27
|
+
ignoreStdin: true,
|
|
28
|
+
}),
|
|
29
|
+
};
|
|
30
|
+
static flags = {
|
|
31
|
+
kind: core_1.Flags.string({ options: [...data_provider_1.SPACE_PROPOSAL_KINDS] }),
|
|
32
|
+
disposition: core_1.Flags.string({
|
|
33
|
+
options: [...data_provider_1.PROPOSAL_DISPOSITIONS],
|
|
34
|
+
default: 'proposed',
|
|
35
|
+
description: 'proposed (waiting for a decision) by default',
|
|
36
|
+
}),
|
|
37
|
+
all: core_1.Flags.boolean({ description: 'Every disposition, not only the ones waiting' }),
|
|
38
|
+
limit: core_1.Flags.integer({ min: 1, max: 100, default: 50 }),
|
|
39
|
+
cursor: core_1.Flags.string(),
|
|
40
|
+
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
41
|
+
};
|
|
42
|
+
async run() {
|
|
43
|
+
this.requireAuth();
|
|
44
|
+
const { args, flags } = await this.parse(SpacesProposalsList);
|
|
45
|
+
const spaceId = await this.resolveSpaceReference(args.id);
|
|
46
|
+
let result;
|
|
47
|
+
try {
|
|
48
|
+
result = await space_proposals_1.spaceProposalsApi.list(spaceId, {
|
|
49
|
+
kind: flags.kind,
|
|
50
|
+
disposition: flags.all ? undefined : flags.disposition,
|
|
51
|
+
limit: flags.limit,
|
|
52
|
+
cursor: flags.cursor,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
this.handleApiError(error, { subject: `space ${args.id}` });
|
|
57
|
+
}
|
|
58
|
+
if (flags.json) {
|
|
59
|
+
this.printJsonResult((0, list_output_1.listResult)(result));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!result.data.length) {
|
|
63
|
+
for (const line of (0, space_proposals_1.emptySpaceInboxLines)(result.nextCursor))
|
|
64
|
+
this.log(line);
|
|
65
|
+
}
|
|
66
|
+
(0, format_1.renderTable)(result.data.map(space_proposals_1.spaceProposalRow), [
|
|
67
|
+
{ key: 'id', header: 'PROPOSAL', verbatim: true },
|
|
68
|
+
{ key: 'title', header: 'TITLE' },
|
|
69
|
+
{ key: 'scope', header: 'WHY HERE' },
|
|
70
|
+
{ key: 'disposition', header: 'DISPOSITION' },
|
|
71
|
+
{ key: 'deadline', header: 'DEADLINE' },
|
|
72
|
+
{ key: 'note', header: 'NOTE' },
|
|
73
|
+
], (line) => this.log(line));
|
|
74
|
+
const bin = this.config?.bin || 'skrr';
|
|
75
|
+
for (const item of result.data) {
|
|
76
|
+
for (const line of (0, space_proposals_1.spaceProposalDetailLines)(item, bin))
|
|
77
|
+
this.log(line);
|
|
78
|
+
}
|
|
79
|
+
if (!result.coverage.complete) {
|
|
80
|
+
this.log(`Partial coverage: ${result.coverage.sources
|
|
81
|
+
.filter((source) => source.status !== 'available')
|
|
82
|
+
.map((source) => `${source.kind}:${source.status}${source.code ? ` (${source.code})` : ''}`)
|
|
83
|
+
.join(', ')}`);
|
|
84
|
+
}
|
|
85
|
+
if (result.nextCursor)
|
|
86
|
+
this.log(`Next cursor: ${result.nextCursor}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.default = SpacesProposalsList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../search/spaces';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// Both spellings share one implementation and result contract.
|
|
8
|
+
var spaces_1 = require("../search/spaces");
|
|
9
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(spaces_1).default; } });
|