@skrr-ai/cli 0.1.149 → 0.1.151
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/README.md +20 -20
- package/dist/base-command.d.ts +6 -6
- package/dist/base-command.js +26 -26
- package/dist/commands/agenda/trigger/list.d.ts +1 -1
- package/dist/commands/agenda/trigger/list.js +6 -6
- package/dist/commands/agents/always-on/disable.js +10 -3
- package/dist/commands/agents/always-on/enable.js +1 -1
- package/dist/commands/agents/always-on/reconcile.js +1 -1
- package/dist/commands/agents/always-on/status.js +31 -8
- package/dist/commands/agents/create.d.ts +2 -2
- package/dist/commands/agents/create.js +12 -12
- package/dist/commands/agents/delete.d.ts +17 -1
- package/dist/commands/agents/delete.js +37 -1
- package/dist/commands/agents/egress.js +1 -1
- package/dist/commands/agents/list.d.ts +1 -1
- package/dist/commands/agents/list.js +1 -1
- package/dist/commands/agents/roles/capture.d.ts +1 -1
- package/dist/commands/agents/roles/capture.js +2 -2
- package/dist/commands/agents/roles/install.js +1 -1
- package/dist/commands/agents/spawn.js +47 -38
- package/dist/commands/agents/update.d.ts +1 -1
- package/dist/commands/agents/update.js +3 -3
- package/dist/commands/code/jobs/show.js +1 -1
- package/dist/commands/compass/archive.d.ts +1 -1
- package/dist/commands/compass/archive.js +1 -1
- package/dist/commands/compass/create.js +1 -1
- package/dist/commands/compass/{commitments.d.ts → duties.d.ts} +5 -5
- package/dist/commands/compass/{commitments.js → duties.js} +14 -14
- package/dist/commands/compass/trace.d.ts +1 -1
- package/dist/commands/compass/trace.js +2 -2
- package/dist/commands/convos/messages.js +2 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/{commitments → duties}/accounting.d.ts +7 -7
- package/dist/commands/{commitments → duties}/accounting.js +13 -13
- package/dist/commands/{commitments → duties}/action-history.d.ts +3 -3
- package/dist/commands/{commitments → duties}/action-history.js +12 -12
- package/dist/commands/{commitments → duties}/action-proposal.d.ts +2 -2
- package/dist/commands/{commitments → duties}/action-proposal.js +6 -6
- package/dist/commands/{commitments → duties}/action-proposals/decide.d.ts +2 -2
- package/dist/commands/{commitments → duties}/action-proposals/decide.js +8 -8
- package/dist/commands/{commitments → duties}/action-proposals/execute.d.ts +2 -2
- package/dist/commands/{commitments → duties}/action-proposals/execute.js +7 -7
- package/dist/commands/{commitments → duties}/action-proposals/propose.d.ts +4 -4
- package/dist/commands/{commitments → duties}/action-proposals/propose.js +15 -15
- package/dist/commands/{commitments → duties}/action-proposals.d.ts +1 -1
- package/dist/commands/{commitments → duties}/action-proposals.js +6 -6
- package/dist/commands/{commitments → duties}/analytics/detail.d.ts +5 -5
- package/dist/commands/{commitments → duties}/analytics/detail.js +13 -13
- package/dist/commands/{commitments → duties}/analytics/index.d.ts +5 -5
- package/dist/commands/{commitments → duties}/analytics/index.js +30 -30
- package/dist/commands/{commitments → duties}/analytics/replay.d.ts +3 -3
- package/dist/commands/{commitments → duties}/analytics/replay.js +11 -11
- package/dist/commands/{commitments → duties}/attach.d.ts +3 -3
- package/dist/commands/{commitments → duties}/attach.js +21 -21
- package/dist/commands/{commitments → duties}/bundle.d.ts +1 -1
- package/dist/commands/{commitments → duties}/bundle.js +7 -7
- package/dist/commands/{commitments → duties}/cadence-decisions.d.ts +3 -3
- package/dist/commands/duties/cadence-decisions.js +41 -0
- package/dist/commands/{commitments → duties}/cadence-requests/decide.d.ts +4 -4
- package/dist/commands/{commitments → duties}/cadence-requests/decide.js +11 -11
- package/dist/commands/{commitments → duties}/case.d.ts +2 -2
- package/dist/commands/{commitments → duties}/case.js +8 -8
- package/dist/commands/{commitments → duties}/cases.d.ts +2 -2
- package/dist/commands/{commitments → duties}/cases.js +9 -9
- package/dist/commands/{commitments → duties}/check-now.d.ts +6 -6
- package/dist/commands/{commitments → duties}/check-now.js +29 -29
- package/dist/commands/{commitments → duties}/checks.d.ts +3 -3
- package/dist/commands/{commitments → duties}/checks.js +13 -13
- package/dist/commands/{commitments → duties}/complete.d.ts +2 -2
- package/dist/commands/duties/complete.js +40 -0
- package/dist/commands/{commitments → duties}/control/apply.d.ts +1 -1
- package/dist/commands/{commitments → duties}/control/apply.js +7 -7
- package/dist/commands/{commitments → duties}/control/preview.d.ts +1 -1
- package/dist/commands/{commitments → duties}/control/preview.js +8 -8
- package/dist/commands/{commitments → duties}/control/show.d.ts +1 -1
- package/dist/commands/{commitments → duties}/control/show.js +6 -6
- package/dist/commands/{commitments → duties}/cost.d.ts +6 -6
- package/dist/commands/{commitments → duties}/cost.js +14 -14
- package/dist/commands/{commitments → duties}/create.d.ts +8 -8
- package/dist/commands/{commitments → duties}/create.js +92 -92
- package/dist/commands/{commitments → duties}/cycles.d.ts +2 -2
- package/dist/commands/{commitments → duties}/cycles.js +11 -11
- package/dist/commands/{commitments → duties}/decide-remediation.d.ts +2 -2
- package/dist/commands/{commitments → duties}/decide-remediation.js +6 -6
- package/dist/commands/{commitments → duties}/delete.d.ts +4 -4
- package/dist/commands/{commitments → duties}/delete.js +24 -24
- package/dist/commands/{commitments → duties}/delivery.d.ts +1 -1
- package/dist/commands/{commitments → duties}/delivery.js +15 -15
- package/dist/commands/{commitments → duties}/detach.d.ts +3 -3
- package/dist/commands/{commitments → duties}/detach.js +20 -20
- package/dist/commands/{commitments → duties}/doctor.d.ts +4 -4
- package/dist/commands/{commitments → duties}/doctor.js +21 -21
- package/dist/commands/{commitments → duties}/effective-policy.d.ts +3 -3
- package/dist/commands/{commitments → duties}/effective-policy.js +24 -24
- package/dist/commands/{commitments → duties}/endpoints/connect.d.ts +2 -2
- package/dist/commands/{commitments → duties}/endpoints/connect.js +10 -10
- package/dist/commands/{commitments → duties}/endpoints/create.d.ts +3 -3
- package/dist/commands/{commitments → duties}/endpoints/create.js +16 -16
- package/dist/commands/{commitments → duties}/endpoints/delete.d.ts +3 -3
- package/dist/commands/{commitments → duties}/endpoints/delete.js +11 -11
- package/dist/commands/{commitments → duties}/endpoints/health.d.ts +2 -2
- package/dist/commands/{commitments → duties}/endpoints/health.js +10 -10
- package/dist/commands/{commitments → duties}/endpoints/list.d.ts +3 -3
- package/dist/commands/{commitments → duties}/endpoints/list.js +11 -11
- package/dist/commands/{commitments → duties}/endpoints/revoke.d.ts +4 -4
- package/dist/commands/{commitments → duties}/endpoints/revoke.js +13 -13
- package/dist/commands/{commitments → duties}/evaluations.d.ts +2 -2
- package/dist/commands/{commitments → duties}/evaluations.js +8 -8
- package/dist/commands/{commitments → duties}/execute-remediation.d.ts +2 -2
- package/dist/commands/{commitments → duties}/execute-remediation.js +7 -7
- package/dist/commands/{commitments → duties}/explain.d.ts +2 -2
- package/dist/commands/{commitments → duties}/explain.js +13 -13
- package/dist/commands/{commitments → duties}/export.d.ts +3 -3
- package/dist/commands/{commitments → duties}/export.js +15 -15
- package/dist/commands/{commitments → duties}/feedback.d.ts +4 -4
- package/dist/commands/{commitments → duties}/feedback.js +13 -13
- package/dist/commands/{commitments → duties}/fork.d.ts +3 -3
- package/dist/commands/{commitments → duties}/fork.js +11 -11
- package/dist/commands/{commitments → duties}/goals/link.d.ts +6 -6
- package/dist/commands/duties/goals/link.js +41 -0
- package/dist/commands/{commitments → duties}/goals/unlink.d.ts +4 -4
- package/dist/commands/duties/goals/unlink.js +37 -0
- package/dist/commands/{commitments → duties}/handover.d.ts +5 -5
- package/dist/commands/{commitments → duties}/handover.js +21 -21
- package/dist/commands/{commitments → duties}/hypotheses.d.ts +3 -3
- package/dist/commands/{commitments → duties}/hypotheses.js +13 -13
- package/dist/commands/{commitments → duties}/import.d.ts +2 -2
- package/dist/commands/{commitments → duties}/import.js +10 -10
- package/dist/commands/{commitments → duties}/ledger.d.ts +4 -4
- package/dist/commands/{commitments → duties}/ledger.js +12 -12
- package/dist/commands/{commitments → duties}/lineage.d.ts +5 -5
- package/dist/commands/duties/lineage.js +43 -0
- package/dist/commands/{commitments → duties}/links/create.d.ts +2 -2
- package/dist/commands/{commitments → duties}/links/create.js +9 -9
- package/dist/commands/{commitments → duties}/links/detach.d.ts +2 -2
- package/dist/commands/{commitments → duties}/links/detach.js +7 -7
- package/dist/commands/{commitments → duties}/links/list.d.ts +2 -2
- package/dist/commands/{commitments → duties}/links/list.js +9 -9
- package/dist/commands/{commitments → duties}/links/update.d.ts +2 -2
- package/dist/commands/{commitments → duties}/links/update.js +7 -7
- package/dist/commands/{commitments → duties}/list.d.ts +3 -3
- package/dist/commands/{commitments → duties}/list.js +17 -17
- package/dist/commands/{commitments → duties}/liveness.d.ts +6 -6
- package/dist/commands/{commitments → duties}/liveness.js +13 -13
- package/dist/commands/{commitments → duties}/metrics.d.ts +3 -3
- package/dist/commands/{commitments → duties}/metrics.js +12 -12
- package/dist/commands/{commitments → duties}/next-tick.d.ts +7 -7
- package/dist/commands/{commitments → duties}/next-tick.js +14 -14
- package/dist/commands/{commitments → duties}/observation/probe.d.ts +1 -1
- package/dist/commands/{commitments → duties}/observation/probe.js +12 -12
- package/dist/commands/{commitments → duties}/observation/summary.d.ts +1 -1
- package/dist/commands/{commitments → duties}/observation/summary.js +5 -5
- package/dist/commands/{commitments → duties}/observations.d.ts +4 -4
- package/dist/commands/{commitments → duties}/observations.js +18 -18
- package/dist/commands/{commitments → duties}/open.d.ts +1 -1
- package/dist/commands/{commitments → duties}/open.js +13 -13
- package/dist/commands/{commitments → duties}/operating-review.d.ts +5 -5
- package/dist/commands/{commitments → duties}/operating-review.js +21 -21
- package/dist/commands/{commitments → duties}/pack/activate.d.ts +1 -1
- package/dist/commands/{commitments → duties}/pack/activate.js +6 -6
- package/dist/commands/{commitments → duties}/pack/bind.d.ts +4 -4
- package/dist/commands/{commitments → duties}/pack/bind.js +19 -19
- package/dist/commands/{commitments → duties}/pack/list.d.ts +2 -2
- package/dist/commands/{commitments → duties}/pack/list.js +10 -10
- package/dist/commands/{commitments → duties}/pack/plan.d.ts +3 -3
- package/dist/commands/{commitments → duties}/pack/plan.js +12 -12
- package/dist/commands/{commitments → duties}/pack/preflight.d.ts +3 -3
- package/dist/commands/{commitments → duties}/pack/preflight.js +10 -10
- package/dist/commands/{commitments → duties}/patch.d.ts +1 -1
- package/dist/commands/{commitments → duties}/patch.js +7 -7
- package/dist/commands/{commitments → duties}/pause.d.ts +2 -2
- package/dist/commands/{commitments → duties}/pause.js +16 -16
- package/dist/commands/{commitments → duties}/plan.d.ts +4 -4
- package/dist/commands/{commitments → duties}/plan.js +20 -20
- package/dist/commands/{commitments → duties}/preflight.d.ts +8 -8
- package/dist/commands/{commitments → duties}/preflight.js +32 -32
- package/dist/commands/{commitments → duties}/propose-remediation.d.ts +2 -2
- package/dist/commands/{commitments → duties}/propose-remediation.js +6 -6
- package/dist/commands/{commitments → duties}/readiness/show.d.ts +1 -1
- package/dist/commands/{commitments → duties}/readiness/show.js +6 -6
- package/dist/commands/{commitments → duties}/readiness/verify.d.ts +1 -1
- package/dist/commands/{commitments → duties}/readiness/verify.js +7 -7
- package/dist/commands/{commitments → duties}/receipt-metrics.d.ts +4 -4
- package/dist/commands/{commitments → duties}/receipt-metrics.js +16 -16
- package/dist/commands/{commitments → duties}/receipt.d.ts +1 -1
- package/dist/commands/{commitments → duties}/receipt.js +10 -10
- package/dist/commands/{commitments → duties}/reflect.d.ts +4 -4
- package/dist/commands/{commitments → duties}/reflect.js +12 -12
- package/dist/commands/{commitments → duties}/reflection-decision.d.ts +2 -2
- package/dist/commands/{commitments → duties}/reflection-decision.js +7 -7
- package/dist/commands/{commitments → duties}/reflection.d.ts +2 -2
- package/dist/commands/{commitments → duties}/reflection.js +9 -9
- package/dist/commands/{commitments → duties}/remediate.d.ts +5 -5
- package/dist/commands/{commitments → duties}/remediate.js +14 -14
- package/dist/commands/{commitments → duties}/remediation-proposal.d.ts +2 -2
- package/dist/commands/{commitments → duties}/remediation-proposal.js +7 -7
- package/dist/commands/{commitments → duties}/remediation-proposals.d.ts +2 -2
- package/dist/commands/{commitments → duties}/remediation-proposals.js +8 -8
- package/dist/commands/{commitments → duties}/reports.d.ts +5 -5
- package/dist/commands/{commitments → duties}/reports.js +35 -35
- package/dist/commands/{commitments → duties}/restore.d.ts +2 -2
- package/dist/commands/duties/restore.js +46 -0
- package/dist/commands/{commitments → duties}/resume.d.ts +2 -2
- package/dist/commands/duties/resume.js +37 -0
- package/dist/commands/{commitments → duties}/roster.d.ts +2 -2
- package/dist/commands/duties/roster.js +39 -0
- package/dist/commands/{commitments → duties}/show.d.ts +7 -7
- package/dist/commands/{commitments → duties}/show.js +40 -40
- package/dist/commands/{commitments → duties}/status.d.ts +3 -3
- package/dist/commands/duties/status.js +41 -0
- package/dist/commands/{commitments → duties}/subject.d.ts +4 -4
- package/dist/commands/{commitments → duties}/subject.js +29 -29
- package/dist/commands/{commitments → duties}/trace.d.ts +3 -3
- package/dist/commands/{commitments → duties}/trace.js +12 -12
- package/dist/commands/{commitments → duties}/trigger-status.d.ts +6 -6
- package/dist/commands/{commitments → duties}/trigger-status.js +19 -19
- package/dist/commands/{commitments → duties}/update.d.ts +5 -5
- package/dist/commands/{commitments → duties}/update.js +64 -64
- package/dist/commands/{commitments → duties}/wake-capabilities.d.ts +6 -6
- package/dist/commands/{commitments → duties}/wake-capabilities.js +22 -22
- package/dist/commands/{commitments → duties}/work-plan.d.ts +1 -1
- package/dist/commands/{commitments → duties}/work-plan.js +6 -6
- package/dist/commands/goals/key-results/show.js +2 -1
- package/dist/commands/goals/plan-now.js +2 -2
- package/dist/commands/goals/planner-compare.d.ts +1 -1
- package/dist/commands/goals/planner-compare.js +2 -2
- package/dist/commands/grants/create.d.ts +1 -1
- package/dist/commands/grants/create.js +9 -9
- package/dist/commands/grants/list.d.ts +1 -1
- package/dist/commands/grants/list.js +2 -2
- package/dist/commands/initiatives/list.d.ts +1 -1
- package/dist/commands/initiatives/list.js +1 -1
- package/dist/commands/measures/create.d.ts +2 -2
- package/dist/commands/measures/create.js +4 -4
- package/dist/commands/measures/list.d.ts +1 -1
- package/dist/commands/measures/list.js +2 -2
- package/dist/commands/northstars/create.js +4 -4
- package/dist/commands/northstars/delete.d.ts +3 -3
- package/dist/commands/northstars/delete.js +8 -8
- package/dist/commands/northstars/governance/configure.js +15 -15
- package/dist/commands/northstars/intents/decide.d.ts +1 -1
- package/dist/commands/northstars/intents/decide.js +1 -1
- package/dist/commands/northstars/link.d.ts +4 -4
- package/dist/commands/northstars/link.js +8 -8
- package/dist/commands/northstars/list.d.ts +2 -2
- package/dist/commands/northstars/list.js +3 -3
- package/dist/commands/northstars/recommendations/apply.d.ts +1 -1
- package/dist/commands/northstars/recommendations/apply.js +2 -2
- package/dist/commands/northstars/review-now.js +2 -2
- package/dist/commands/northstars/show.d.ts +3 -3
- package/dist/commands/northstars/show.js +5 -5
- package/dist/commands/northstars/unlink.d.ts +3 -3
- package/dist/commands/northstars/unlink.js +6 -6
- package/dist/commands/northstars/update.js +3 -3
- package/dist/commands/proposals/list.d.ts +3 -3
- package/dist/commands/proposals/list.js +7 -7
- package/dist/commands/search/agents.d.ts +4 -1
- package/dist/commands/search/agents.js +6 -3
- package/dist/commands/search/all.d.ts +4 -1
- package/dist/commands/search/all.js +11 -7
- package/dist/commands/search/teams.d.ts +4 -1
- package/dist/commands/search/teams.js +6 -3
- package/dist/commands/spaces/auto-executor/compare.js +1 -1
- package/dist/commands/spaces/auto-executor/runs.js +1 -1
- package/dist/commands/spaces/heartbeats/list.js +2 -2
- package/dist/commands/spaces/index.js +2 -2
- package/dist/commands/spaces/list.d.ts +1 -1
- package/dist/commands/spaces/list.js +1 -1
- package/dist/commands/spaces/loops/migrate.d.ts +1 -1
- package/dist/commands/spaces/loops/migrate.js +1 -1
- package/dist/commands/spaces/loops/release.d.ts +1 -1
- package/dist/commands/spaces/loops/release.js +10 -10
- package/dist/commands/spaces/notebook.d.ts +2 -2
- package/dist/commands/spaces/notebook.js +2 -2
- package/dist/commands/spaces/proposals/discard.js +1 -1
- package/dist/commands/spaces/proposals/keep.js +1 -1
- package/dist/commands/spaces/triggers/show.js +3 -3
- package/dist/commands/spaces/write-policy/set.js +1 -1
- package/dist/commands/store/uninstall.js +2 -2
- package/dist/commands/subscriptions/health.d.ts +2 -2
- package/dist/commands/subscriptions/health.js +2 -2
- package/dist/commands/subscriptions/status.js +2 -2
- package/dist/commands/subscriptions/subscribe.js +4 -4
- package/dist/commands/tasks/create.d.ts +20 -1
- package/dist/commands/tasks/create.js +44 -3
- package/dist/commands/tasks/list.d.ts +7 -1
- package/dist/commands/tasks/list.js +2 -1
- package/dist/generated/agent-guides.json +496 -496
- package/dist/generated/managed-instruction-guides.json +2 -2
- package/dist/hooks/command-not-found.d.ts +1 -1
- package/dist/hooks/command-not-found.js +1 -1
- package/dist/lib/agent-chat-start.js +2 -1
- package/dist/lib/agent-trigger-listing.d.ts +4 -4
- package/dist/lib/agent-trigger-listing.js +7 -7
- package/dist/lib/agentic-stream.d.ts +16 -0
- package/dist/lib/agentic-stream.js +78 -21
- package/dist/lib/always-on-command-result.d.ts +8 -1
- package/dist/lib/always-on-command-result.js +11 -2
- package/dist/lib/auth-failure.js +1 -1
- package/dist/lib/capability-matrix.d.ts +3 -3
- package/dist/lib/capability-matrix.js +9 -9
- package/dist/lib/command-hygiene.js +6 -6
- package/dist/lib/command-miss.js +1 -1
- package/dist/lib/compass-refusals.d.ts +1 -1
- package/dist/lib/compass-refusals.js +1 -1
- package/dist/lib/compasses.d.ts +5 -5
- package/dist/lib/compasses.js +15 -15
- package/dist/lib/dedicated-machines.js +2 -1
- package/dist/lib/dedicated-power.js +2 -0
- package/dist/lib/{commitments.d.ts → duties.d.ts} +198 -198
- package/dist/lib/{commitments.js → duties.js} +282 -282
- package/dist/lib/{commitment-analytics.d.ts → duty-analytics.d.ts} +18 -18
- package/dist/lib/{commitment-analytics.js → duty-analytics.js} +12 -12
- package/dist/lib/{commitment-attention-copy.d.ts → duty-attention-copy.d.ts} +6 -6
- package/dist/lib/{commitment-attention-copy.js → duty-attention-copy.js} +8 -8
- package/dist/lib/{commitment-endpoints.d.ts → duty-endpoints.d.ts} +6 -6
- package/dist/lib/{commitment-endpoints.js → duty-endpoints.js} +10 -10
- package/dist/lib/{commitment-event-wakes.d.ts → duty-event-wakes.d.ts} +2 -2
- package/dist/lib/{commitment-event-wakes.js → duty-event-wakes.js} +2 -2
- package/dist/lib/{commitment-ledgers.js → duty-ledgers.js} +3 -3
- package/dist/lib/{commitment-loop-status.d.ts → duty-loop-status.d.ts} +11 -11
- package/dist/lib/{commitment-loop-status.js → duty-loop-status.js} +22 -22
- package/dist/lib/{commitment-product.d.ts → duty-product.d.ts} +6 -6
- package/dist/lib/{commitment-product.js → duty-product.js} +5 -5
- package/dist/lib/{commitment-terms.d.ts → duty-terms.d.ts} +9 -9
- package/dist/lib/{commitment-terms.js → duty-terms.js} +21 -21
- package/dist/lib/entity-open.d.ts +1 -1
- package/dist/lib/entity-open.js +1 -1
- package/dist/lib/format.d.ts +1 -1
- package/dist/lib/grants.d.ts +3 -3
- package/dist/lib/grants.js +2 -2
- package/dist/lib/initiatives.js +4 -4
- package/dist/lib/node-adapter.js +1 -1
- package/dist/lib/northstars.d.ts +13 -13
- package/dist/lib/northstars.js +56 -56
- package/dist/lib/open-target.js +1 -1
- package/dist/lib/preflight-copy.js +5 -5
- package/dist/lib/proactiveApi.d.ts +15 -4
- package/dist/lib/proposals.js +16 -16
- package/dist/lib/responsibility-controls.d.ts +1 -1
- package/dist/lib/responsibility-controls.js +6 -6
- package/dist/lib/roles.d.ts +1 -1
- package/dist/lib/schedule.d.ts +5 -5
- package/dist/lib/schedule.js +1 -1
- package/dist/lib/session-task-write.d.ts +1 -1
- package/dist/lib/session-task-write.js +2 -2
- package/dist/lib/space-loop-migration.js +6 -6
- package/dist/lib/space-notebook.js +2 -2
- package/dist/lib/space-write-policy.js +2 -2
- package/dist/lib/stewardship-output.js +2 -2
- package/dist/lib/task-spec-verification.js +1 -1
- package/dist/lib/tasks.d.ts +1 -1
- package/dist/lib/tasks.js +8 -8
- package/dist/lib/triggers.d.ts +3 -3
- package/dist/lib/triggers.js +11 -10
- package/dist/lib/usage-discovery.js +2 -4
- package/dist/lib/web-url.d.ts +6 -6
- package/dist/lib/web-url.js +13 -13
- package/dist/lib/workspaces.d.ts +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/{commitmentExecutionContract.d.ts → dutyExecutionContract.d.ts} +7 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/{commitmentExecutionContract.js → dutyExecutionContract.js} +22 -22
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceipt.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceiptV2.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +9 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +5 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +4 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/{commitmentExecutionContract.d.ts → dutyExecutionContract.d.ts} +7 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/{commitmentExecutionContract.js → dutyExecutionContract.js} +16 -16
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceipt.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceiptV2.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/profilePorts.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +9 -9
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -8
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +2 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +6 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +6 -6
- package/dist/node_modules/@skrr-ai/data-provider/index.js +8150 -8140
- package/docs/v1/lookback-plans.md +1 -1
- package/oclif.manifest.json +5365 -5350
- package/package.json +16 -16
- package/dist/commands/commitments/cadence-decisions.js +0 -41
- package/dist/commands/commitments/complete.js +0 -40
- package/dist/commands/commitments/goals/link.js +0 -41
- package/dist/commands/commitments/goals/unlink.js +0 -37
- package/dist/commands/commitments/lineage.js +0 -43
- package/dist/commands/commitments/restore.js +0 -46
- package/dist/commands/commitments/resume.js +0 -37
- package/dist/commands/commitments/roster.js +0 -39
- package/dist/commands/commitments/status.js +0 -41
- /package/dist/lib/{commitment-ledgers.d.ts → duty-ledgers.d.ts} +0 -0
|
@@ -3,25 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.formatTriggerStatus = formatTriggerStatus;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const base_command_1 = require("../../base-command");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const duties_1 = require("../../lib/duties");
|
|
7
|
+
const duty_event_wakes_1 = require("../../lib/duty-event-wakes");
|
|
8
8
|
const FORMAT_TRIGGER_STATUS_RE = /\s+/g;
|
|
9
9
|
/**
|
|
10
|
-
* `skrr
|
|
10
|
+
* `skrr duties trigger-status <id>` — what the SCHEDULER actually has.
|
|
11
11
|
*
|
|
12
|
-
* The contract says what cadence the
|
|
13
|
-
* TriggerDefinition layer converged on. When a
|
|
12
|
+
* The contract says what cadence the duty wants; this says what the
|
|
13
|
+
* TriggerDefinition layer converged on. When a duty "isn't checking", the
|
|
14
14
|
* gap between those two is nearly always the answer, and no other command shows
|
|
15
15
|
* it.
|
|
16
16
|
*/
|
|
17
|
-
class
|
|
18
|
-
static description = "Show the
|
|
17
|
+
class DutiesTriggerStatus extends base_command_1.BaseCommand {
|
|
18
|
+
static description = "Show the duty's actual trigger bindings and recent fires";
|
|
19
19
|
static examples = [
|
|
20
|
-
'<%= config.bin %>
|
|
21
|
-
'<%= config.bin %>
|
|
20
|
+
'<%= config.bin %> duties trigger-status obj_abc123',
|
|
21
|
+
'<%= config.bin %> duties trigger-status obj_abc123 --limit 20 --json',
|
|
22
22
|
];
|
|
23
23
|
static args = {
|
|
24
|
-
|
|
24
|
+
dutyId: core_1.Args.string({ ignoreStdin: true, description: 'Duty ID', required: true }),
|
|
25
25
|
};
|
|
26
26
|
static flags = {
|
|
27
27
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -29,10 +29,10 @@ class CommitmentsTriggerStatus extends base_command_1.BaseCommand {
|
|
|
29
29
|
};
|
|
30
30
|
async run() {
|
|
31
31
|
this.requireAuth();
|
|
32
|
-
const { args, flags } = await this.parse(
|
|
32
|
+
const { args, flags } = await this.parse(DutiesTriggerStatus);
|
|
33
33
|
let status;
|
|
34
34
|
try {
|
|
35
|
-
status = await
|
|
35
|
+
status = await duties_1.dutyApi.triggerStatus(args.dutyId, flags.limit);
|
|
36
36
|
}
|
|
37
37
|
catch (err) {
|
|
38
38
|
this.handleApiError(err);
|
|
@@ -48,7 +48,7 @@ class CommitmentsTriggerStatus extends base_command_1.BaseCommand {
|
|
|
48
48
|
this.log(line);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
exports.default =
|
|
51
|
+
exports.default = DutiesTriggerStatus;
|
|
52
52
|
function fmtTime(value) {
|
|
53
53
|
if (!value)
|
|
54
54
|
return '-';
|
|
@@ -56,14 +56,14 @@ function fmtTime(value) {
|
|
|
56
56
|
return Number.isNaN(date.getTime()) ? String(value) : date.toISOString();
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Pure formatter for the
|
|
59
|
+
* Pure formatter for the duty trigger-status read-model. Kept separate so
|
|
60
60
|
* it can be unit-tested without a live API, and so the command body stays a thin
|
|
61
61
|
* fetch + print.
|
|
62
62
|
*/
|
|
63
63
|
function formatTriggerStatus(status) {
|
|
64
64
|
const lines = [];
|
|
65
|
-
const
|
|
66
|
-
lines.push(`Trigger status for ${
|
|
65
|
+
const dutyId = String(status.dutyId ?? '-');
|
|
66
|
+
lines.push(`Trigger status for ${dutyId} (plan generation ${String(status.planGeneration ?? '-')})`);
|
|
67
67
|
// OSK-10961: the one-word answer an operator came for — did the plan
|
|
68
68
|
// materialize. Absent on older servers; only rendered when present.
|
|
69
69
|
const convergence = status.convergence;
|
|
@@ -80,11 +80,11 @@ function formatTriggerStatus(status) {
|
|
|
80
80
|
lines.push(` retired residue: ${Number(retired.triggers)} spent trigger` +
|
|
81
81
|
`${Number(retired.triggers) === 1 ? '' : 's'} across ` +
|
|
82
82
|
`${Number(retired.bindings)} binding${Number(retired.bindings) === 1 ? '' : 's'} ` +
|
|
83
|
-
'(fired or disabled — cannot wake this
|
|
83
|
+
'(fired or disabled — cannot wake this duty)');
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
// The plan can be converged and every row enabled while nothing can wake (Always-On off). `convergence`
|
|
87
|
-
// is a fact about the rows; this is the other fact, from the same projection `
|
|
87
|
+
// is a fact about the rows; this is the other fact, from the same projection `duties status` reads.
|
|
88
88
|
const wake = status.wake;
|
|
89
89
|
if (wake?.held) {
|
|
90
90
|
lines.push(`Wakes: HELD — ${wake.reason ?? 'blocked'}`);
|
|
@@ -114,7 +114,7 @@ function formatTriggerStatus(status) {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
lines.push('');
|
|
117
|
-
lines.push(...(0,
|
|
117
|
+
lines.push(...(0, duty_event_wakes_1.eventWakeLines)((status.eventCapabilities ?? {})));
|
|
118
118
|
const recent = (status.recent ?? {});
|
|
119
119
|
const fires = recent.fires ?? [];
|
|
120
120
|
lines.push('');
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
2
|
/**
|
|
3
|
-
* `skrr
|
|
3
|
+
* `skrr duties update <id>` — edit the contract.
|
|
4
4
|
*
|
|
5
|
-
* Retuning `--cadence` is the main lever: it changes how often the
|
|
5
|
+
* Retuning `--cadence` is the main lever: it changes how often the duty's
|
|
6
6
|
* control loop wakes. (The loop also retunes its own cadence from realized
|
|
7
7
|
* outcomes; a manual change here is a new starting point, not a lock.)
|
|
8
8
|
*
|
|
9
9
|
* MERGE SEMANTICS — the API replaces `target` and `cadence` WHOLESALE, so this
|
|
10
|
-
* command reads the
|
|
10
|
+
* command reads the duty first and merges your flags over the current
|
|
11
11
|
* values. Without that, `--timezone` alone would blank `mode`/`intervalMs` and
|
|
12
12
|
* silently stop the loop, and `--outcome` alone would drop the
|
|
13
13
|
* `freshnessExpectation` thresholds the loop uses to detect stale open loops.
|
|
14
14
|
* `--criterion` still REPLACES the criteria list (that is its purpose).
|
|
15
15
|
*
|
|
16
16
|
* Autonomy is deliberately not settable here: raising it wants a recorded
|
|
17
|
-
* reason, which `skrr
|
|
17
|
+
* reason, which `skrr duties autonomy <id>` requires and this command has
|
|
18
18
|
* no place for. Other policy fields ARE patchable — the API deep-merges a
|
|
19
19
|
* `policy` patch (`mergePolicyPatch`), so a single-key patch leaves the rest of
|
|
20
20
|
* the contract untouched.
|
|
21
21
|
*/
|
|
22
|
-
export default class
|
|
22
|
+
export default class DutiesUpdate extends BaseCommand {
|
|
23
23
|
static description: string;
|
|
24
24
|
static examples: string[];
|
|
25
25
|
static args: {
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const
|
|
5
|
+
const duty_product_1 = require("../../lib/duty-product");
|
|
6
6
|
const data_provider_2 = require("@skrr-ai/data-provider");
|
|
7
7
|
const base_command_1 = require("../../base-command");
|
|
8
8
|
const prompt_1 = require("../../lib/prompt");
|
|
9
|
-
const
|
|
9
|
+
const duty_attention_copy_1 = require("../../lib/duty-attention-copy");
|
|
10
10
|
const web_url_1 = require("../../lib/web-url");
|
|
11
11
|
const prompt_2 = require("../../lib/prompt");
|
|
12
12
|
const triggers_1 = require("../../lib/triggers");
|
|
13
|
-
const
|
|
13
|
+
const duties_1 = require("../../lib/duties");
|
|
14
14
|
/**
|
|
15
15
|
* Every field a stored cadence can carry. `satisfies` makes a key the type does not know a
|
|
16
16
|
* compile error; `update.cadence-preservation.spec.ts` pins the other direction.
|
|
@@ -25,53 +25,53 @@ const CARRIED_CADENCE_KEYS = [
|
|
|
25
25
|
'timezone',
|
|
26
26
|
];
|
|
27
27
|
/**
|
|
28
|
-
* `skrr
|
|
28
|
+
* `skrr duties update <id>` — edit the contract.
|
|
29
29
|
*
|
|
30
|
-
* Retuning `--cadence` is the main lever: it changes how often the
|
|
30
|
+
* Retuning `--cadence` is the main lever: it changes how often the duty's
|
|
31
31
|
* control loop wakes. (The loop also retunes its own cadence from realized
|
|
32
32
|
* outcomes; a manual change here is a new starting point, not a lock.)
|
|
33
33
|
*
|
|
34
34
|
* MERGE SEMANTICS — the API replaces `target` and `cadence` WHOLESALE, so this
|
|
35
|
-
* command reads the
|
|
35
|
+
* command reads the duty first and merges your flags over the current
|
|
36
36
|
* values. Without that, `--timezone` alone would blank `mode`/`intervalMs` and
|
|
37
37
|
* silently stop the loop, and `--outcome` alone would drop the
|
|
38
38
|
* `freshnessExpectation` thresholds the loop uses to detect stale open loops.
|
|
39
39
|
* `--criterion` still REPLACES the criteria list (that is its purpose).
|
|
40
40
|
*
|
|
41
41
|
* Autonomy is deliberately not settable here: raising it wants a recorded
|
|
42
|
-
* reason, which `skrr
|
|
42
|
+
* reason, which `skrr duties autonomy <id>` requires and this command has
|
|
43
43
|
* no place for. Other policy fields ARE patchable — the API deep-merges a
|
|
44
44
|
* `policy` patch (`mergePolicyPatch`), so a single-key patch leaves the rest of
|
|
45
45
|
* the contract untouched.
|
|
46
46
|
*/
|
|
47
|
-
class
|
|
48
|
-
static description = "Update a
|
|
47
|
+
class DutiesUpdate extends base_command_1.BaseCommand {
|
|
48
|
+
static description = "Update a duty's contract (title, target, cadence, sources). A cadence is manual, an interval or daily clock times; " +
|
|
49
49
|
'activeHours and daysOfWeek in --from-json select hours and weekdays. No holiday, business-day or trading-calendar fields. ' +
|
|
50
|
-
'The Compass a
|
|
50
|
+
'The Compass a duty is bound to ("compassId" in the create body) cannot be changed: create a successor duty instead';
|
|
51
51
|
static examples = [
|
|
52
|
-
'<%= config.bin %>
|
|
53
|
-
'<%= config.bin %>
|
|
54
|
-
'<%= config.bin %>
|
|
55
|
-
'<%= config.bin %>
|
|
56
|
-
'<%= config.bin %>
|
|
57
|
-
'# Nudges: how many times a day it may interrupt you. 0 mutes it; "unlimited" removes the limit.\n<%= config.bin %>
|
|
52
|
+
'<%= config.bin %> duties update <duty-id> --cadence 12h',
|
|
53
|
+
'<%= config.bin %> duties update <duty-id> --title "Ship v2 (Q3)" --outcome "v2 is live for all users"',
|
|
54
|
+
'<%= config.bin %> duties update <duty-id> --watch tasks --watch github',
|
|
55
|
+
'<%= config.bin %> duties update <duty-id> --criterion "signups confirmed" --evaluator metric --measure <measure-id>',
|
|
56
|
+
'<%= config.bin %> duties update <duty-id> --agent-directive-file ./review-policy.md',
|
|
57
|
+
'# Nudges: how many times a day it may interrupt you. 0 mutes it; "unlimited" removes the limit.\n<%= config.bin %> duties update <duty-id> --max-nudges 2\n<%= config.bin %> duties update <duty-id> --max-nudges unlimited',
|
|
58
58
|
`# Read the current contract and use its version for --if-version.
|
|
59
|
-
<%= config.bin %>
|
|
60
|
-
cat >
|
|
59
|
+
<%= config.bin %> duties show <duty-id> --json
|
|
60
|
+
cat > duty-patch.json <<'JSON'
|
|
61
61
|
{
|
|
62
62
|
"cadence": { "mode": "interval", "intervalMs": 3600000, "activeHours": { "start": "09:00", "end": "22:00" }, "daysOfWeek": ["mon", "tue", "wed", "thu", "fri"], "timezone": "Asia/Shanghai" },
|
|
63
63
|
"policy": { "executionBudget": { "maxObservationRunsPerDay": 0 } }
|
|
64
64
|
}
|
|
65
65
|
JSON
|
|
66
|
-
<%= config.bin %>
|
|
66
|
+
<%= config.bin %> duties update <duty-id> --from-json duty-patch.json --if-version <observed-version> --json`,
|
|
67
67
|
`# Quiet hours: no messages to you from 22:00 to 07:00. Times are HH:MM (00:00-23:59); without a timezone UTC is used.
|
|
68
68
|
cat > quiet-hours.json <<'JSON'
|
|
69
69
|
{ "policy": { "quietHours": { "enabled": true, "start": "22:00", "end": "07:00", "timezone": "America/Los_Angeles" } } }
|
|
70
70
|
JSON
|
|
71
|
-
<%= config.bin %>
|
|
71
|
+
<%= config.bin %> duties update <duty-id> --from-json quiet-hours.json`,
|
|
72
72
|
];
|
|
73
73
|
static args = {
|
|
74
|
-
id: core_1.Args.string({ description: '
|
|
74
|
+
id: core_1.Args.string({ description: 'Duty ID', required: true, ignoreStdin: true }),
|
|
75
75
|
};
|
|
76
76
|
static flags = {
|
|
77
77
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -80,7 +80,7 @@ JSON
|
|
|
80
80
|
description: 'Skip the confirmation prompt for an irreversible status change',
|
|
81
81
|
}),
|
|
82
82
|
'from-json': core_1.Flags.string({
|
|
83
|
-
description: `JSON patch file (or "-" for stdin). See examples below. JSON cadence and watchedSources replace those fields; policy is deep-merged. ${
|
|
83
|
+
description: `JSON patch file (or "-" for stdin). See examples below. JSON cadence and watchedSources replace those fields; policy is deep-merged. ${duty_attention_copy_1.QUIET_HOURS_HELP} ${duty_attention_copy_1.EVENT_SOURCES_HELP}`,
|
|
84
84
|
}),
|
|
85
85
|
'if-version': core_1.Flags.integer({
|
|
86
86
|
description: 'Only update this observed contract version; returns a conflict if it changed',
|
|
@@ -92,14 +92,14 @@ JSON
|
|
|
92
92
|
title: core_1.Flags.string({ description: 'New title' }),
|
|
93
93
|
description: core_1.Flags.string({ description: 'New description' }),
|
|
94
94
|
'agent-directive': core_1.Flags.string({
|
|
95
|
-
description: 'Replace the per-
|
|
95
|
+
description: 'Replace the per-Duty domain policy (max 8,000 characters). Mutually exclusive with --agent-directive-file.',
|
|
96
96
|
}),
|
|
97
97
|
'agent-directive-file': core_1.Flags.string({
|
|
98
98
|
description: 'Read replacement domain policy from a text file, or - for stdin. Mutually exclusive with --agent-directive.',
|
|
99
99
|
}),
|
|
100
100
|
status: core_1.Flags.string({
|
|
101
101
|
description: 'New status. Invalid lifecycle jumps (e.g. completed → active) are rejected by the API.',
|
|
102
|
-
options: [...
|
|
102
|
+
options: [...duties_1.DUTY_STATUSES],
|
|
103
103
|
}),
|
|
104
104
|
outcome: core_1.Flags.string({ description: 'Replace the target outcome' }),
|
|
105
105
|
deadline: core_1.Flags.string({
|
|
@@ -111,7 +111,7 @@ JSON
|
|
|
111
111
|
}),
|
|
112
112
|
evaluator: core_1.Flags.string({
|
|
113
113
|
description: 'How --criterion is evaluated (default manual). Use metric with --measure to attach a measure.',
|
|
114
|
-
options: [...
|
|
114
|
+
options: [...duties_1.DUTY_CLI_EVALUATORS],
|
|
115
115
|
}),
|
|
116
116
|
measure: core_1.Flags.string({
|
|
117
117
|
description: 'Measure ID to attach (implies --evaluator metric). Requires exactly one --criterion.',
|
|
@@ -122,7 +122,7 @@ JSON
|
|
|
122
122
|
watch: core_1.Flags.string({
|
|
123
123
|
description: 'Watched source (repeatable). Replaces the selected set and retains config for matching bindings. Some sources need companion flags: --watch-space, --watch-monitor. conversations and messages need an id (config.conversationId, config.groupChatId) that only --from-json can set.',
|
|
124
124
|
multiple: true,
|
|
125
|
-
options: [...
|
|
125
|
+
options: [...duties_1.DUTY_WATCHED_SOURCES],
|
|
126
126
|
}),
|
|
127
127
|
'watch-space': core_1.Flags.string({
|
|
128
128
|
description: 'One Space to watch. Accepts a space id, ref, or unique title. Implies --watch space.',
|
|
@@ -137,7 +137,7 @@ JSON
|
|
|
137
137
|
}),
|
|
138
138
|
'cadence-mode': core_1.Flags.string({
|
|
139
139
|
description: 'Cadence mode',
|
|
140
|
-
options: [...
|
|
140
|
+
options: [...duties_1.DUTY_AUTHORABLE_CADENCE_MODES],
|
|
141
141
|
}),
|
|
142
142
|
timezone: core_1.Flags.string({ description: 'IANA timezone for the cadence' }),
|
|
143
143
|
isolation: core_1.Flags.string({
|
|
@@ -145,23 +145,23 @@ JSON
|
|
|
145
145
|
// cannot blank an autonomy mode or an attention budget set elsewhere.
|
|
146
146
|
description: 'Each run uses an "ephemeral" Git worktree. Requires the Agent working directory ' +
|
|
147
147
|
'to be in a Git repository with an initial commit.',
|
|
148
|
-
options: [...
|
|
148
|
+
options: [...duties_1.DUTY_EXECUTION_ISOLATION_MODES],
|
|
149
149
|
}),
|
|
150
150
|
'max-nudges': core_1.Flags.string({
|
|
151
151
|
// Sent as a single-key `policy` patch, which the API deep-merges. Before this flag the only
|
|
152
152
|
// way back to unlimited was hand-writing {"policy":{"maxUserNudgesPerDay":null}}.
|
|
153
|
-
description:
|
|
153
|
+
description: duty_attention_copy_1.MAX_NUDGES_FLAG_HELP,
|
|
154
154
|
}),
|
|
155
155
|
'max-concurrent-runs': core_1.Flags.string({
|
|
156
156
|
description: 'Set 1..100, or "unlimited" to remove the owner cap. Finite values require --concurrency-reason.',
|
|
157
157
|
}),
|
|
158
158
|
'concurrency-reason': core_1.Flags.string({
|
|
159
|
-
description: 'Why the owner deliberately chose a finite
|
|
159
|
+
description: 'Why the owner deliberately chose a finite Duty concurrency cap',
|
|
160
160
|
}),
|
|
161
161
|
};
|
|
162
162
|
async run() {
|
|
163
163
|
this.requireAuth();
|
|
164
|
-
const { args, flags } = await this.parse(
|
|
164
|
+
const { args, flags } = await this.parse(DutiesUpdate);
|
|
165
165
|
// Criterion labels are FREE TEXT — never run them through `splitRepeated`,
|
|
166
166
|
// which comma-splits and would silently turn one label containing a comma
|
|
167
167
|
// ("hears back, including rejections") into two criteria.
|
|
@@ -193,14 +193,14 @@ JSON
|
|
|
193
193
|
authoredDelivery ||
|
|
194
194
|
flags['task-review-policy'] !== undefined) {
|
|
195
195
|
try {
|
|
196
|
-
const res = await
|
|
197
|
-
current = res?.
|
|
196
|
+
const res = await duties_1.dutyApi.get(args.id);
|
|
197
|
+
current = res?.duty;
|
|
198
198
|
}
|
|
199
199
|
catch (err) {
|
|
200
200
|
this.handleApiError(err);
|
|
201
201
|
}
|
|
202
202
|
if (!current) {
|
|
203
|
-
this.error(`
|
|
203
|
+
this.error(`Duty ${args.id} not found.`, { exit: 4 });
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
try {
|
|
@@ -211,7 +211,7 @@ JSON
|
|
|
211
211
|
...(current?.delivery || { version: 1, mode: 'report_only' }),
|
|
212
212
|
...authoredDelivery,
|
|
213
213
|
...(flags['task-review-policy'] !== undefined
|
|
214
|
-
? { reviewPolicy: (0,
|
|
214
|
+
? { reviewPolicy: (0, duty_product_1.normalizeTaskReviewPolicy)(flags['task-review-policy']) }
|
|
215
215
|
: {}),
|
|
216
216
|
};
|
|
217
217
|
if (payload.expectedVersion === undefined)
|
|
@@ -219,27 +219,27 @@ JSON
|
|
|
219
219
|
}
|
|
220
220
|
const declaredDelivery = payload.delivery;
|
|
221
221
|
if (declaredDelivery?.reviewPolicy !== undefined)
|
|
222
|
-
(0,
|
|
222
|
+
(0, duty_product_1.normalizeTaskReviewPolicy)(declaredDelivery.reviewPolicy);
|
|
223
223
|
if (flags.title)
|
|
224
224
|
payload.title = flags.title;
|
|
225
225
|
if (flags.description !== undefined)
|
|
226
226
|
payload.description = flags.description;
|
|
227
|
-
const agentDirective = await (0,
|
|
227
|
+
const agentDirective = await (0, duties_1.readDutyAgentDirective)({
|
|
228
228
|
directive: flags['agent-directive'],
|
|
229
229
|
file: flags['agent-directive-file'],
|
|
230
230
|
});
|
|
231
231
|
if (agentDirective !== undefined)
|
|
232
232
|
payload.agentDirective = agentDirective;
|
|
233
233
|
if (flags.status) {
|
|
234
|
-
// `completed` and `cancelled` END the
|
|
234
|
+
// `completed` and `cancelled` END the Duty: `active` is not
|
|
235
235
|
// reachable from either in one step. They were settable through this
|
|
236
|
-
// generic PATCH with no ceremony at all, while `
|
|
236
|
+
// generic PATCH with no ceremony at all, while `duties delete` —
|
|
237
237
|
// whose data is all still on disk, and which is now restorable —
|
|
238
238
|
// prompts. Ceremony should track how hard something is to undo.
|
|
239
|
-
if ((0, data_provider_2.
|
|
239
|
+
if ((0, data_provider_2.isTerminalDutyStatus)(flags.status)) {
|
|
240
240
|
let confirmed;
|
|
241
241
|
try {
|
|
242
|
-
confirmed = await (0, prompt_1.confirmDestructive)(`Set ${args.id} to ${flags.status}? This ends the
|
|
242
|
+
confirmed = await (0, prompt_1.confirmDestructive)(`Set ${args.id} to ${flags.status}? This ends the Duty — making it active again means archiving it first, then resuming.`, flags.yes);
|
|
243
243
|
}
|
|
244
244
|
catch (err) {
|
|
245
245
|
if (err.exit === 7) {
|
|
@@ -258,7 +258,7 @@ JSON
|
|
|
258
258
|
const existing = current?.target ?? {};
|
|
259
259
|
const outcome = flags.outcome ?? existing.outcome;
|
|
260
260
|
if (!outcome) {
|
|
261
|
-
throw new Error('--outcome is required: this
|
|
261
|
+
throw new Error('--outcome is required: this duty has no existing outcome to keep.');
|
|
262
262
|
}
|
|
263
263
|
payload.target = {
|
|
264
264
|
outcome,
|
|
@@ -268,7 +268,7 @@ JSON
|
|
|
268
268
|
: {}),
|
|
269
269
|
...(criteria.length
|
|
270
270
|
? {
|
|
271
|
-
successCriteria: (0,
|
|
271
|
+
successCriteria: (0, duties_1.buildSuccessCriteria)(criteria, {
|
|
272
272
|
evaluator: flags.evaluator,
|
|
273
273
|
measureId: flags.measure,
|
|
274
274
|
source: flags.source,
|
|
@@ -292,7 +292,7 @@ JSON
|
|
|
292
292
|
const resolvedSpaceIds = watchSpaces
|
|
293
293
|
? await Promise.all(watchSpaces.map((ref) => this.resolveSpaceReference(ref)))
|
|
294
294
|
: [];
|
|
295
|
-
const built = (0,
|
|
295
|
+
const built = (0, duties_1.buildWatchedSources)({
|
|
296
296
|
watch: watched,
|
|
297
297
|
spaceIds: resolvedSpaceIds,
|
|
298
298
|
monitorIds: (0, triggers_1.splitRepeated)(flags['watch-monitor']),
|
|
@@ -301,7 +301,7 @@ JSON
|
|
|
301
301
|
// A flag edit selects the full replacement set. Keep sensing declarations
|
|
302
302
|
// only for a binding it still names; explicit JSON is the authored base.
|
|
303
303
|
const declarations = Array.isArray(payload.watchedSources)
|
|
304
|
-
? (0,
|
|
304
|
+
? (0, duties_1.normalizeWatchedSourceDeclarations)(payload.watchedSources)
|
|
305
305
|
: (current?.watchedSources ?? []);
|
|
306
306
|
payload.watchedSources = built.map((next) => {
|
|
307
307
|
const scopeKey = next.source === 'space'
|
|
@@ -328,9 +328,9 @@ JSON
|
|
|
328
328
|
const existing = current?.cadence ?? {};
|
|
329
329
|
const storedCadence = {};
|
|
330
330
|
// Every authored cadence field. The API replaces `cadence` wholesale, so a field left out
|
|
331
|
-
// of this list is erased from the
|
|
331
|
+
// of this list is erased from the Duty by an edit that never mentioned it: omitting
|
|
332
332
|
// `activeHours`/`daysOfWeek` turned "weekdays 09:00-22:00" into "around the clock" on
|
|
333
|
-
// `--cadence 2h` (OSK-18366). Mirrors `cadenceShape` in api/server/routes/
|
|
333
|
+
// `--cadence 2h` (OSK-18366). Mirrors `cadenceShape` in api/server/routes/duties.js.
|
|
334
334
|
for (const key of CARRIED_CADENCE_KEYS) {
|
|
335
335
|
if (existing[key] !== undefined)
|
|
336
336
|
storedCadence[key] = existing[key];
|
|
@@ -348,8 +348,8 @@ JSON
|
|
|
348
348
|
...authoredCadence,
|
|
349
349
|
};
|
|
350
350
|
if (flags.cadence) {
|
|
351
|
-
cadence.intervalMs = (0,
|
|
352
|
-
// Setting an interval on a manual
|
|
351
|
+
cadence.intervalMs = (0, duties_1.parseIntervalToMs)(flags.cadence);
|
|
352
|
+
// Setting an interval on a manual duty implies interval mode.
|
|
353
353
|
if (!cadence.mode || cadence.mode === 'manual')
|
|
354
354
|
cadence.mode = 'interval';
|
|
355
355
|
}
|
|
@@ -365,7 +365,7 @@ JSON
|
|
|
365
365
|
const at = Array.isArray(cadence.times) && cadence.times.length
|
|
366
366
|
? ` at ${cadence.times.join(', ')}`
|
|
367
367
|
: '';
|
|
368
|
-
this.error(`This
|
|
368
|
+
this.error(`This duty's cadence is daily${at}, which has no interval, so --cadence ${flags.cadence} would change nothing. ` +
|
|
369
369
|
`To check every ${flags.cadence} instead, add --cadence-mode interval. ` +
|
|
370
370
|
'To change the daily times, use --from-json with cadence.times.', { exit: 1 });
|
|
371
371
|
}
|
|
@@ -396,11 +396,11 @@ JSON
|
|
|
396
396
|
payload.expectedVersion = current.version;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
const concurrencyPatch = (0,
|
|
399
|
+
const concurrencyPatch = (0, duties_1.dutyConcurrencyEnvelopePatch)({
|
|
400
400
|
rawValue: flags['max-concurrent-runs'],
|
|
401
401
|
reason: flags['concurrency-reason'],
|
|
402
402
|
});
|
|
403
|
-
const maxNudges = (0,
|
|
403
|
+
const maxNudges = (0, duty_attention_copy_1.parseMaxNudgesFlag)(flags['max-nudges']);
|
|
404
404
|
if (flags.isolation || concurrencyPatch || maxNudges !== undefined) {
|
|
405
405
|
const existingPolicy = payload.policy && typeof payload.policy === 'object' && !Array.isArray(payload.policy)
|
|
406
406
|
? payload.policy
|
|
@@ -428,16 +428,16 @@ JSON
|
|
|
428
428
|
!Array.isArray(finalPolicy.executionBudget)
|
|
429
429
|
? finalPolicy.executionBudget
|
|
430
430
|
: undefined;
|
|
431
|
-
const quietHoursProblem = (0,
|
|
431
|
+
const quietHoursProblem = (0, duty_attention_copy_1.quietHoursInputProblem)(finalPolicy);
|
|
432
432
|
if (quietHoursProblem)
|
|
433
433
|
throw new Error(quietHoursProblem);
|
|
434
434
|
if (process.env.OVERSKY_AUTONOMOUS_SESSION === '1' &&
|
|
435
435
|
finalEnvelope &&
|
|
436
436
|
Object.prototype.hasOwnProperty.call(finalEnvelope, 'maxConcurrentRuns')) {
|
|
437
|
-
throw new Error('An autonomous Agent cannot change owner
|
|
437
|
+
throw new Error('An autonomous Agent cannot change owner Duty concurrency policy. Ask the owner to run this update outside the Agent session.');
|
|
438
438
|
}
|
|
439
439
|
if (Array.isArray(payload.watchedSources)) {
|
|
440
|
-
payload.watchedSources = (0,
|
|
440
|
+
payload.watchedSources = (0, duties_1.normalizeWatchedSourceDeclarations)(payload.watchedSources);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
catch (err) {
|
|
@@ -446,28 +446,28 @@ JSON
|
|
|
446
446
|
if (Object.keys(payload).length === 0) {
|
|
447
447
|
this.error('Nothing to update. Pass at least one field flag or --from-json.', { exit: 1 });
|
|
448
448
|
}
|
|
449
|
-
let
|
|
449
|
+
let duty;
|
|
450
450
|
try {
|
|
451
|
-
|
|
451
|
+
duty = await duties_1.dutyApi.update(args.id, payload);
|
|
452
452
|
}
|
|
453
453
|
catch (err) {
|
|
454
454
|
this.handleApiError(err);
|
|
455
455
|
}
|
|
456
456
|
// A replacement edit is accepted as written; these say what it removed.
|
|
457
|
-
const warnings = (0,
|
|
457
|
+
const warnings = (0, duties_1.dutyWriteWarnings)(duty, {
|
|
458
458
|
before: current,
|
|
459
459
|
payload,
|
|
460
460
|
});
|
|
461
461
|
if (flags.json) {
|
|
462
|
-
this.log(JSON.stringify((0, web_url_1.
|
|
463
|
-
...
|
|
462
|
+
this.log(JSON.stringify((0, web_url_1.withDutyUrl)(this.cliConfig.baseURL, {
|
|
463
|
+
...duty,
|
|
464
464
|
...(warnings.length ? { warnings } : {}),
|
|
465
465
|
}), null, 2));
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
this.log((0,
|
|
469
|
-
(0,
|
|
470
|
-
(0,
|
|
468
|
+
this.log((0, duties_1.describeDutyRevision)(duty?.revision));
|
|
469
|
+
(0, duties_1.renderDutySummary)(duty, (line) => this.log(line));
|
|
470
|
+
(0, duties_1.renderDutyWriteWarnings)(warnings, (line) => this.warn(line));
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
exports.default =
|
|
473
|
+
exports.default = DutiesUpdate;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
-
import { type
|
|
2
|
+
import { type DutyWakeCapabilities } from '../../lib/duties';
|
|
3
3
|
/**
|
|
4
4
|
* The headline used to stop at "configured sources may wake the Agent within lifecycle and execution
|
|
5
5
|
* budgets", over a column marked ACTIVE, which read as bound while `trigger-status` said no event
|
|
@@ -12,24 +12,24 @@ export declare function wakePolicyHeadline(_result?: unknown): string;
|
|
|
12
12
|
* commands cannot disagree. No sentence here concludes "armed" or "none will fire": that depends
|
|
13
13
|
* on Always-On, the upstream installation and leftover rows, which only the facts carry.
|
|
14
14
|
*/
|
|
15
|
-
export declare function wakePolicyLines(result?:
|
|
15
|
+
export declare function wakePolicyLines(result?: DutyWakeCapabilities): string[];
|
|
16
16
|
/** Why an eligible capability is not offered, in words a person can act on (OSK-22591). */
|
|
17
17
|
export declare function describeUnavailable(reason?: string): string;
|
|
18
18
|
/**
|
|
19
|
-
* `skrr
|
|
19
|
+
* `skrr duties wake-capabilities <id>` — which wakes an Agent may pick.
|
|
20
20
|
*
|
|
21
21
|
* Two lists, and the difference between them is the whole point:
|
|
22
|
-
* ELIGIBLE — what this
|
|
22
|
+
* ELIGIBLE — what this duty's sensors/grants make technically possible.
|
|
23
23
|
* VISIBLE — what the wake permission policy actually offers the Agent.
|
|
24
24
|
*
|
|
25
25
|
* A capability that is eligible but not visible is a deliberate refusal, not a
|
|
26
26
|
* misconfiguration. Showing only one list would make those indistinguishable.
|
|
27
27
|
*/
|
|
28
|
-
export default class
|
|
28
|
+
export default class DutiesWakeCapabilities extends BaseCommand {
|
|
29
29
|
static description: string;
|
|
30
30
|
static examples: string[];
|
|
31
31
|
static args: {
|
|
32
|
-
|
|
32
|
+
dutyId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
33
33
|
};
|
|
34
34
|
static flags: {
|
|
35
35
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|