@skrr-ai/cli 0.1.150 → 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/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 +38 -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/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/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 +4 -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 +5337 -5337
- 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
|
@@ -4,25 +4,25 @@ exports.applyWatchedSourceFlags = applyWatchedSourceFlags;
|
|
|
4
4
|
exports.hasEventCapableWatchedSource = hasEventCapableWatchedSource;
|
|
5
5
|
exports.assertEventDrivenWatchedSource = assertEventDrivenWatchedSource;
|
|
6
6
|
exports.createCadenceFromFlags = createCadenceFromFlags;
|
|
7
|
-
exports.
|
|
7
|
+
exports.dutyActivationRefusal = dutyActivationRefusal;
|
|
8
8
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
9
9
|
const core_1 = require("@oclif/core");
|
|
10
10
|
const base_command_1 = require("../../base-command");
|
|
11
11
|
const guide_pointer_1 = require("../../lib/guide-pointer");
|
|
12
12
|
const web_url_1 = require("../../lib/web-url");
|
|
13
13
|
const prompt_1 = require("../../lib/prompt");
|
|
14
|
-
const
|
|
14
|
+
const duty_attention_copy_1 = require("../../lib/duty-attention-copy");
|
|
15
15
|
const triggers_1 = require("../../lib/triggers");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
16
|
+
const duty_product_1 = require("../../lib/duty-product");
|
|
17
|
+
const duties_1 = require("../../lib/duties");
|
|
18
|
+
const DUTY_ACTIVATION_REFUSAL_RE = /^[A-Za-z][A-Za-z0-9_]*$/;
|
|
19
19
|
const DEFAULT_EVENT_DRIVEN_BACKSTOP_MS = 24 * 60 * 60 * 1000;
|
|
20
20
|
const DEFAULT_EVENT_SOURCES = new Set(['github', 'slack', 'email', 'calendar']);
|
|
21
21
|
/**
|
|
22
|
-
* Every GitHub event a
|
|
23
|
-
* (`GITHUB_EVENT_DELIVERY_PERMISSION` in
|
|
22
|
+
* Every GitHub event a Duty's watched source can receive: the server's own list
|
|
23
|
+
* (`GITHUB_EVENT_DELIVERY_PERMISSION` in DutyTriggerBindings). The selector offered seven of
|
|
24
24
|
* the ten, so `workflow_run_failed`, `workflow_run_succeeded` and `pull_request_synchronized` —
|
|
25
|
-
* all in the event catalog — were refused locally with no word on whether
|
|
25
|
+
* all in the event catalog — were refused locally with no word on whether Duties support them
|
|
26
26
|
* (OSK-21683). They do.
|
|
27
27
|
*/
|
|
28
28
|
const GITHUB_EVENT_OPTIONS = [
|
|
@@ -83,7 +83,7 @@ function hasStructurallyValidExplicitEvent(config) {
|
|
|
83
83
|
/**
|
|
84
84
|
* True only when the authored create body can materialize at least one event
|
|
85
85
|
* binding. A polling-only source must not make `--event-driven` look successful
|
|
86
|
-
* while the resulting
|
|
86
|
+
* while the resulting Duty still wakes exclusively on its backstop.
|
|
87
87
|
*/
|
|
88
88
|
function hasEventCapableWatchedSource(payload) {
|
|
89
89
|
const goalId = typeof payload.goalId === 'string' && payload.goalId.trim().length > 0;
|
|
@@ -161,13 +161,13 @@ function createCadenceFromFlags({ eventDriven, cadence: cadenceInput, cadenceMod
|
|
|
161
161
|
}
|
|
162
162
|
return {
|
|
163
163
|
mode: 'event_plus_interval',
|
|
164
|
-
intervalMs: cadenceInput ? (0,
|
|
164
|
+
intervalMs: cadenceInput ? (0, duties_1.parseIntervalToMs)(cadenceInput) : DEFAULT_EVENT_DRIVEN_BACKSTOP_MS,
|
|
165
165
|
...(timezone ? { timezone } : {}),
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
const cadence = {};
|
|
169
169
|
if (cadenceInput) {
|
|
170
|
-
cadence.intervalMs = (0,
|
|
170
|
+
cadence.intervalMs = (0, duties_1.parseIntervalToMs)(cadenceInput);
|
|
171
171
|
cadence.mode = cadenceMode || 'interval';
|
|
172
172
|
}
|
|
173
173
|
else if (cadenceMode) {
|
|
@@ -205,57 +205,57 @@ function activationBlockers(body) {
|
|
|
205
205
|
}
|
|
206
206
|
return blockers;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function dutyActivationRefusal(err, { id, bin }) {
|
|
209
209
|
const refusal = (0, base_command_1.apiRefusal)(err);
|
|
210
210
|
// `resume` answers with every blocking gate, but only the first is in the message. Fixing it
|
|
211
211
|
// revealed the next one on the following try (Always-On, then the runtime), so the refusal says
|
|
212
|
-
// all of them when there is more than one (dogfood df-261031-
|
|
212
|
+
// all of them when there is more than one (dogfood df-261031-duty-authoring, F12).
|
|
213
213
|
const blockers = activationBlockers(refusal.body);
|
|
214
214
|
const errorField = refusal.body?.error;
|
|
215
215
|
const code = refusal.code ||
|
|
216
|
-
(typeof errorField === 'string' &&
|
|
216
|
+
(typeof errorField === 'string' && DUTY_ACTIVATION_REFUSAL_RE.test(errorField)
|
|
217
217
|
? errorField
|
|
218
218
|
: undefined) ||
|
|
219
|
-
'
|
|
219
|
+
'DUTY_ACTIVATION_REFUSED';
|
|
220
220
|
const guide = (0, guide_pointer_1.agentGuidePointerFor)(code);
|
|
221
221
|
// The blocking gate's own remedy beats the generic "fix the gate the reason names": the reason is
|
|
222
222
|
// a token, and the sentence that says what to run is the hint beside it (OSK-21126).
|
|
223
|
-
const hint = (0, base_command_1.
|
|
223
|
+
const hint = (0, base_command_1.dutyActivationHint)(refusal.body);
|
|
224
224
|
return {
|
|
225
225
|
code,
|
|
226
226
|
reason: refusal.message || (err instanceof Error ? err.message : 'Activation was refused.'),
|
|
227
227
|
fix: hint
|
|
228
|
-
? `${hint} Then run \`${bin}
|
|
229
|
-
: (0, data_provider_1.
|
|
228
|
+
? `${hint} Then run \`${bin} duties resume ${id}\`.`
|
|
229
|
+
: (0, data_provider_1.describeDutyActivationFix)(code === 'DUTY_ACTIVATION_REFUSED' ? undefined : code, { turnOn: `run \`${bin} duties resume ${id}\`` }),
|
|
230
230
|
...(guide ? { guide } : {}),
|
|
231
231
|
...(blockers.length > 1 ? { blockers } : {}),
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
* `skrr
|
|
235
|
+
* `skrr duties create` — author a durable duty contract.
|
|
236
236
|
*
|
|
237
|
-
* A
|
|
237
|
+
* A Duty is a standing duty ("hold this outcome true"), watched on a
|
|
238
238
|
* cadence by its own control loop — not a task. Create it `draft` first and
|
|
239
239
|
* activate once the contract reads right — or pass `--activate` to turn it on
|
|
240
|
-
* in the same call (the same resume + Preflight boundary `
|
|
241
|
-
* runs; a refusal keeps the draft and says why). An `active`
|
|
240
|
+
* in the same call (the same resume + Preflight boundary `duties resume`
|
|
241
|
+
* runs; a refusal keeps the draft and says why). An `active` duty with a
|
|
242
242
|
* non-manual cadence starts spending compute on every check.
|
|
243
243
|
*
|
|
244
|
-
* For a natural-language draft instead of flags, use `skrr
|
|
244
|
+
* For a natural-language draft instead of flags, use `skrr duties plan`.
|
|
245
245
|
*/
|
|
246
|
-
class
|
|
247
|
-
static description = 'Create a
|
|
246
|
+
class DutiesCreate extends base_command_1.BaseCommand {
|
|
247
|
+
static description = 'Create a duty (a durable agent contract). Its cadence is manual, an interval or daily clock times; ' +
|
|
248
248
|
'activeHours and daysOfWeek in --from-json select hours and weekdays. No holiday, business-day or trading-calendar fields';
|
|
249
249
|
static examples = [
|
|
250
|
-
'<%= config.bin %>
|
|
251
|
-
'<%= config.bin %>
|
|
252
|
-
'<%= config.bin %>
|
|
253
|
-
'<%= config.bin %>
|
|
254
|
-
'<%= config.bin %>
|
|
250
|
+
'<%= config.bin %> duties create --agent <agent-id> --title "Ship v2" --outcome "v2 is live for all users" --cadence 6h --activate',
|
|
251
|
+
'<%= config.bin %> duties create --agent <agent-id> --title "Hiring loop" --outcome "Every candidate hears back in 48h" --watch tasks --watch email --cadence 12h',
|
|
252
|
+
'<%= config.bin %> duties create --agent <agent-id> --title "SLA" --outcome "p95 under 200ms" --criterion "p95 latency confirmed" --evaluator metric --measure <measure-id>',
|
|
253
|
+
'<%= config.bin %> duties create --agent <agent-id> --title "AWS cost watch" --outcome "Cost regressions are investigated" --agent-directive-file ./aws-cost-policy.md',
|
|
254
|
+
'<%= config.bin %> duties create --from-json duty.json --json',
|
|
255
255
|
`# Replace <agent-id> with your Agent ID; this creates a draft, not a running loop.
|
|
256
256
|
# In "policy", 0 is a ZERO budget (nothing may run or be spent), not "no limit".
|
|
257
257
|
# To remove a limit set it to null (e.g. "maxCostUsdPerDay": null) or leave the key out.
|
|
258
|
-
cat >
|
|
258
|
+
cat > duty.json <<'JSON'
|
|
259
259
|
{
|
|
260
260
|
"agentId": "<agent-id>",
|
|
261
261
|
"title": "Daily queue review",
|
|
@@ -277,13 +277,13 @@ cat > commitment.json <<'JSON'
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
JSON
|
|
280
|
-
<%= config.bin %>
|
|
281
|
-
<%= config.bin %>
|
|
282
|
-
'<%= config.bin %>
|
|
283
|
-
`# Govern a
|
|
280
|
+
<%= config.bin %> duties preflight --from-json duty.json
|
|
281
|
+
<%= config.bin %> duties create --from-json duty.json --json`,
|
|
282
|
+
'<%= config.bin %> duties create --agent <agent-id> --title "Keep CI healthy" --outcome "Failed checks are repaired" --watch github --github-event check_run_failed --event-driven --delivery draft-pr --repo owner/repo --base main --status draft',
|
|
283
|
+
`# Govern a Duty with a Compass. There is no flag: "compassId" goes in the --from-json body.
|
|
284
284
|
# It must be an active Compass of the same Agent (a draft may name an archived one).
|
|
285
|
-
# The binding cannot be changed later: bind a successor
|
|
286
|
-
cat >
|
|
285
|
+
# The binding cannot be changed later: bind a successor Duty to another Compass instead.
|
|
286
|
+
cat > duty.json <<'JSON'
|
|
287
287
|
{
|
|
288
288
|
"agentId": "<agent-id>",
|
|
289
289
|
"compassId": "<compass-id>",
|
|
@@ -292,50 +292,50 @@ cat > commitment.json <<'JSON'
|
|
|
292
292
|
"target": { "outcome": "p99 API latency stays under 300 ms" }
|
|
293
293
|
}
|
|
294
294
|
JSON
|
|
295
|
-
<%= config.bin %>
|
|
296
|
-
<%= config.bin %> compass
|
|
295
|
+
<%= config.bin %> duties create --from-json duty.json --json
|
|
296
|
+
<%= config.bin %> compass duties <compass-id> --agent <agent-id> # lists it once it is bound`,
|
|
297
297
|
];
|
|
298
298
|
static flags = {
|
|
299
299
|
json: core_1.Flags.boolean({
|
|
300
|
-
description: 'Output the created
|
|
300
|
+
description: 'Output the created duty as JSON: the duty itself, not wrapped (duties show --json puts it under .duty)',
|
|
301
301
|
}),
|
|
302
302
|
'from-json': core_1.Flags.string({
|
|
303
|
-
description: `JSON file (or "-" for stdin) for fields not exposed as flags. See examples below for daily times, named agent_run keys, zero budgets and "compassId" (binds a Compass; fixed at creation). ${
|
|
303
|
+
description: `JSON file (or "-" for stdin) for fields not exposed as flags. See examples below for daily times, named agent_run keys, zero budgets and "compassId" (binds a Compass; fixed at creation). ${duty_attention_copy_1.QUIET_HOURS_HELP} ${duty_attention_copy_1.EVENT_SOURCES_HELP}`,
|
|
304
304
|
}),
|
|
305
|
-
agent: core_1.Flags.string({ description: 'Agent that owns and watches this
|
|
305
|
+
agent: core_1.Flags.string({ description: 'Agent that owns and watches this duty (required)' }),
|
|
306
306
|
kind: core_1.Flags.string({
|
|
307
307
|
description: 'Lifecycle kind: achieve is terminal-capable; maintain is perpetual',
|
|
308
|
-
options: [...
|
|
308
|
+
options: [...duties_1.DUTY_KIND_VALUES],
|
|
309
309
|
}),
|
|
310
|
-
title: core_1.Flags.string({ description: 'Short
|
|
310
|
+
title: core_1.Flags.string({ description: 'Short duty title (required)' }),
|
|
311
311
|
outcome: core_1.Flags.string({
|
|
312
312
|
description: 'The outcome to hold true — required when setting any target field',
|
|
313
313
|
}),
|
|
314
314
|
description: core_1.Flags.string({ description: 'Longer description' }),
|
|
315
315
|
'agent-directive': core_1.Flags.string({
|
|
316
|
-
description: 'Per-
|
|
316
|
+
description: 'Per-Duty domain policy (max 8,000 characters). Mutually exclusive with --agent-directive-file.',
|
|
317
317
|
}),
|
|
318
318
|
'agent-directive-file': core_1.Flags.string({
|
|
319
|
-
description: 'Read the per-
|
|
319
|
+
description: 'Read the per-Duty domain policy from a text file, or - for stdin. Mutually exclusive with --agent-directive.',
|
|
320
320
|
}),
|
|
321
321
|
goal: core_1.Flags.string({ description: 'Link to a goal ID' }),
|
|
322
322
|
status: core_1.Flags.string({
|
|
323
|
-
description: 'Create as a draft (default); activate later with
|
|
323
|
+
description: 'Create as a draft (default); activate later with duties resume',
|
|
324
324
|
options: ['draft'],
|
|
325
325
|
}),
|
|
326
326
|
activate: core_1.Flags.boolean({
|
|
327
|
-
description: 'Turn the
|
|
328
|
-
"as `
|
|
327
|
+
description: 'Turn the duty on right after creating it — the same resume + Preflight boundary ' +
|
|
328
|
+
"as `duties resume`. A refused activation keeps the draft and reports the refusal's " +
|
|
329
329
|
'code, reason and fix, and exits nonzero. Use the returned ID to resume it instead of creating another.',
|
|
330
330
|
}),
|
|
331
|
-
deadline: core_1.Flags.string({ description: 'ISO-8601 deadline for an `achieve`
|
|
331
|
+
deadline: core_1.Flags.string({ description: 'ISO-8601 deadline for an `achieve` duty' }),
|
|
332
332
|
criterion: core_1.Flags.string({
|
|
333
333
|
description: 'Success criterion label (repeatable). Evaluated manually unless --evaluator/--measure is set.',
|
|
334
334
|
multiple: true,
|
|
335
335
|
}),
|
|
336
336
|
evaluator: core_1.Flags.string({
|
|
337
337
|
description: 'How --criterion is evaluated (default manual). Use metric with --measure to attach a measure.',
|
|
338
|
-
options: [...
|
|
338
|
+
options: [...duties_1.DUTY_CLI_EVALUATORS],
|
|
339
339
|
}),
|
|
340
340
|
measure: core_1.Flags.string({
|
|
341
341
|
description: 'Measure ID to attach (implies --evaluator metric). Requires exactly one --criterion.',
|
|
@@ -344,9 +344,9 @@ JSON
|
|
|
344
344
|
description: 'Watched source the criterion reads (implies --evaluator source_state), e.g. github',
|
|
345
345
|
}),
|
|
346
346
|
watch: core_1.Flags.string({
|
|
347
|
-
description: `Watched source (repeatable). One of: ${
|
|
347
|
+
description: `Watched source (repeatable). One of: ${duties_1.DUTY_WATCHED_SOURCES.join(', ')}. Some sources need companion flags: --watch-space, --watch-monitor, --metric-key. conversations and messages need an id (config.conversationId, config.groupChatId) that only --from-json can set.`,
|
|
348
348
|
multiple: true,
|
|
349
|
-
options: [...
|
|
349
|
+
options: [...duties_1.DUTY_WATCHED_SOURCES],
|
|
350
350
|
}),
|
|
351
351
|
'github-event': core_1.Flags.string({
|
|
352
352
|
description: 'GitHub event to watch (repeatable; implies --watch github). Use check_run_failed for one failing check, workflow_run_failed or workflow_run_succeeded for a whole workflow.',
|
|
@@ -375,16 +375,16 @@ JSON
|
|
|
375
375
|
description: 'Check interval, e.g. "15m", "6h", "30d" (1m..365d). Defaults to interval mode; with --event-driven, this is the recovery interval: a missed event is not replayed, the next interval re-checks current state.',
|
|
376
376
|
}),
|
|
377
377
|
'event-driven': core_1.Flags.boolean({
|
|
378
|
-
description: 'Wake on matching watched-source events, so checks come sooner than --cadence (default 24h). An event can be missed and is not replayed; every interval the
|
|
378
|
+
description: 'Wake on matching watched-source events, so checks come sooner than --cadence (default 24h). An event can be missed and is not replayed; every interval the Duty re-checks current state instead. Requires an event-capable watched source and cannot be combined with a different --cadence-mode.',
|
|
379
379
|
}),
|
|
380
380
|
'cadence-mode': core_1.Flags.string({
|
|
381
381
|
description: 'Advanced cadence mode (default: interval when --cadence is set, else manual). Prefer --event-driven for event_plus_interval with a 24h default backstop.',
|
|
382
|
-
options: [...
|
|
382
|
+
options: [...duties_1.DUTY_AUTHORABLE_CADENCE_MODES],
|
|
383
383
|
}),
|
|
384
384
|
timezone: core_1.Flags.string({ description: 'IANA timezone for the cadence' }),
|
|
385
385
|
delivery: core_1.Flags.string({
|
|
386
386
|
description: 'Requested delivery artifact or destination',
|
|
387
|
-
options: [...
|
|
387
|
+
options: [...duty_product_1.DUTY_DELIVERY_CHOICES],
|
|
388
388
|
}),
|
|
389
389
|
'task-review-policy': core_1.Flags.string({
|
|
390
390
|
options: [...data_provider_1.TASK_REVIEW_POLICIES],
|
|
@@ -394,31 +394,31 @@ JSON
|
|
|
394
394
|
base: core_1.Flags.string({ description: 'Delivery target branch' }),
|
|
395
395
|
isolation: core_1.Flags.string({
|
|
396
396
|
// Keep the CLI optional without declaring a default; the server owns
|
|
397
|
-
//
|
|
397
|
+
// Duty isolation policy. Describe only its supported vocabulary.
|
|
398
398
|
description: 'Each run uses an "ephemeral" Git worktree. Requires the Agent working directory ' +
|
|
399
399
|
'to be in a Git repository with an initial commit. Omit to keep the platform default.',
|
|
400
|
-
options: [...
|
|
400
|
+
options: [...duties_1.DUTY_EXECUTION_ISOLATION_MODES],
|
|
401
401
|
hidden: true,
|
|
402
402
|
}),
|
|
403
|
-
'max-nudges': core_1.Flags.string({ description:
|
|
403
|
+
'max-nudges': core_1.Flags.string({ description: duty_attention_copy_1.MAX_NUDGES_FLAG_HELP }),
|
|
404
404
|
'max-concurrent-runs': core_1.Flags.string({
|
|
405
405
|
description: 'Owner concurrency policy: "unlimited" (default) or 1..100. Finite values require --concurrency-reason and cannot be activated by an autonomous Agent session.',
|
|
406
406
|
}),
|
|
407
407
|
'concurrency-reason': core_1.Flags.string({
|
|
408
|
-
description: 'Why the owner deliberately chose a finite
|
|
408
|
+
description: 'Why the owner deliberately chose a finite Duty concurrency cap',
|
|
409
409
|
}),
|
|
410
410
|
};
|
|
411
411
|
async run() {
|
|
412
412
|
this.requireAuth();
|
|
413
|
-
const { flags } = await this.parse(
|
|
413
|
+
const { flags } = await this.parse(DutiesCreate);
|
|
414
414
|
let payload;
|
|
415
415
|
try {
|
|
416
416
|
// `createBodySchema` is a z.strictObject, so unwrap a `plan --json`
|
|
417
417
|
// envelope and drop any key it does not declare (a contract dumped from
|
|
418
418
|
// `list --json` carries id/version/state/… and would otherwise 400).
|
|
419
419
|
const rawBody = await (0, prompt_1.readJsonBody)(flags['from-json']);
|
|
420
|
-
payload = (0,
|
|
421
|
-
const ignoredWarning = (0,
|
|
420
|
+
payload = (0, duties_1.normalizeCreateBody)(rawBody);
|
|
421
|
+
const ignoredWarning = (0, duties_1.ignoredCreateKeysWarning)((0, duties_1.ignoredCreateKeys)(rawBody));
|
|
422
422
|
if (ignoredWarning)
|
|
423
423
|
this.warn(ignoredWarning);
|
|
424
424
|
if (flags.agent)
|
|
@@ -429,7 +429,7 @@ JSON
|
|
|
429
429
|
payload.title = flags.title;
|
|
430
430
|
if (flags.description !== undefined)
|
|
431
431
|
payload.description = flags.description;
|
|
432
|
-
const agentDirective = await (0,
|
|
432
|
+
const agentDirective = await (0, duties_1.readDutyAgentDirective)({
|
|
433
433
|
directive: flags['agent-directive'],
|
|
434
434
|
file: flags['agent-directive-file'],
|
|
435
435
|
});
|
|
@@ -452,7 +452,7 @@ JSON
|
|
|
452
452
|
...(flags.deadline ? { deadlineAt: flags.deadline } : {}),
|
|
453
453
|
...(criteria.length
|
|
454
454
|
? {
|
|
455
|
-
successCriteria: (0,
|
|
455
|
+
successCriteria: (0, duties_1.buildSuccessCriteria)(criteria, {
|
|
456
456
|
evaluator: flags.evaluator,
|
|
457
457
|
measureId: flags.measure,
|
|
458
458
|
source: flags.source,
|
|
@@ -471,7 +471,7 @@ JSON
|
|
|
471
471
|
const resolvedSpaceIds = watchSpaces
|
|
472
472
|
? await Promise.all(watchSpaces.map((ref) => this.resolveSpaceReference(ref)))
|
|
473
473
|
: [];
|
|
474
|
-
const built = (0,
|
|
474
|
+
const built = (0, duties_1.buildWatchedSources)({
|
|
475
475
|
watch: (0, triggers_1.splitRepeated)(flags.watch),
|
|
476
476
|
metricKey: (0, triggers_1.splitRepeated)(flags['metric-key']),
|
|
477
477
|
spaceIds: resolvedSpaceIds,
|
|
@@ -498,24 +498,24 @@ JSON
|
|
|
498
498
|
if (flags.delivery)
|
|
499
499
|
payload.delivery = {
|
|
500
500
|
...(record(payload.delivery) || {}),
|
|
501
|
-
...(0,
|
|
501
|
+
...(0, duty_product_1.deliveryInput)(flags.delivery, flags),
|
|
502
502
|
};
|
|
503
503
|
else if (flags.repo || flags.base)
|
|
504
504
|
throw new Error('--repo and --base require --delivery.');
|
|
505
505
|
if (flags['task-review-policy'] !== undefined)
|
|
506
506
|
payload.delivery = {
|
|
507
507
|
...(record(payload.delivery) || { version: 1, mode: 'report_only' }),
|
|
508
|
-
reviewPolicy: (0,
|
|
508
|
+
reviewPolicy: (0, duty_product_1.normalizeTaskReviewPolicy)(flags['task-review-policy']),
|
|
509
509
|
};
|
|
510
510
|
const declaredDelivery = record(payload.delivery);
|
|
511
511
|
if (declaredDelivery?.reviewPolicy !== undefined)
|
|
512
|
-
(0,
|
|
512
|
+
(0, duty_product_1.normalizeTaskReviewPolicy)(declaredDelivery.reviewPolicy);
|
|
513
513
|
if (flags.isolation)
|
|
514
514
|
policy.executionIsolation = flags.isolation;
|
|
515
|
-
const maxNudges = (0,
|
|
515
|
+
const maxNudges = (0, duty_attention_copy_1.parseMaxNudgesFlag)(flags['max-nudges']);
|
|
516
516
|
if (maxNudges !== undefined)
|
|
517
517
|
policy.maxUserNudgesPerDay = maxNudges;
|
|
518
|
-
const concurrencyPatch = (0,
|
|
518
|
+
const concurrencyPatch = (0, duties_1.dutyConcurrencyEnvelopePatch)({
|
|
519
519
|
rawValue: flags['max-concurrent-runs'],
|
|
520
520
|
reason: flags['concurrency-reason'],
|
|
521
521
|
});
|
|
@@ -529,7 +529,7 @@ JSON
|
|
|
529
529
|
}
|
|
530
530
|
if (Object.keys(policy).length)
|
|
531
531
|
payload.policy = policy;
|
|
532
|
-
const quietHoursProblem = (0,
|
|
532
|
+
const quietHoursProblem = (0, duty_attention_copy_1.quietHoursInputProblem)(policy);
|
|
533
533
|
if (quietHoursProblem)
|
|
534
534
|
throw new Error(quietHoursProblem);
|
|
535
535
|
if (payload.createdVia === undefined) {
|
|
@@ -541,14 +541,14 @@ JSON
|
|
|
541
541
|
if (envelope && Object.prototype.hasOwnProperty.call(envelope, 'maxConcurrentRuns')) {
|
|
542
542
|
const value = envelope.maxConcurrentRuns;
|
|
543
543
|
if (process.env.OVERSKY_AUTONOMOUS_SESSION === '1' && value != null) {
|
|
544
|
-
throw new Error('An autonomous Agent cannot activate a finite
|
|
544
|
+
throw new Error('An autonomous Agent cannot activate a finite Duty concurrency cap from --from-json. Omit it or set it to null; an owner may set it later.');
|
|
545
545
|
}
|
|
546
546
|
if (value != null && !String(envelope.maxConcurrentRunsReason || '').trim()) {
|
|
547
547
|
throw new Error('A finite policy.executionBudget.maxConcurrentRuns in --from-json requires maxConcurrentRunsReason.');
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
if (Array.isArray(payload.watchedSources)) {
|
|
551
|
-
payload.watchedSources = (0,
|
|
551
|
+
payload.watchedSources = (0, duties_1.normalizeWatchedSourceDeclarations)(payload.watchedSources);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
catch (err) {
|
|
@@ -567,37 +567,37 @@ JSON
|
|
|
567
567
|
// Creation is authoring only. Activation is a separate resume boundary
|
|
568
568
|
// that runs the current preflight; JSON imports cannot bypass it.
|
|
569
569
|
payload.status = 'draft';
|
|
570
|
-
let
|
|
570
|
+
let duty;
|
|
571
571
|
try {
|
|
572
|
-
|
|
572
|
+
duty = await duties_1.dutyApi.create(payload);
|
|
573
573
|
}
|
|
574
574
|
catch (err) {
|
|
575
575
|
this.handleApiError(err);
|
|
576
576
|
}
|
|
577
|
-
// `--activate` is the same resume + Preflight boundary `
|
|
577
|
+
// `--activate` is the same resume + Preflight boundary `duties
|
|
578
578
|
// resume` runs, composed onto the create so the caller gets one answer.
|
|
579
579
|
// A refusal is reported on the result — never thrown over the draft's id.
|
|
580
580
|
let activation = null;
|
|
581
581
|
if (flags.activate) {
|
|
582
582
|
try {
|
|
583
|
-
|
|
583
|
+
duty = await duties_1.dutyApi.resume(String(duty.id));
|
|
584
584
|
activation = { activated: true };
|
|
585
585
|
}
|
|
586
586
|
catch (err) {
|
|
587
587
|
activation = {
|
|
588
588
|
activated: false,
|
|
589
|
-
refusal:
|
|
590
|
-
id: String(
|
|
589
|
+
refusal: dutyActivationRefusal(err, {
|
|
590
|
+
id: String(duty.id),
|
|
591
591
|
bin: this.config.bin,
|
|
592
592
|
}),
|
|
593
593
|
};
|
|
594
594
|
// Report the row as it now is: a failed materialization rolls the
|
|
595
595
|
// activation back to paused, and printing the create-time snapshot
|
|
596
|
-
// would claim "draft" of a paused
|
|
596
|
+
// would claim "draft" of a paused Duty.
|
|
597
597
|
try {
|
|
598
|
-
const live = await
|
|
599
|
-
if (live?.
|
|
600
|
-
|
|
598
|
+
const live = await duties_1.dutyApi.get(String(duty.id));
|
|
599
|
+
if (live?.duty)
|
|
600
|
+
duty = live.duty;
|
|
601
601
|
}
|
|
602
602
|
catch {
|
|
603
603
|
/* the refusal is the news; the create-time row is the fallback */
|
|
@@ -608,18 +608,18 @@ JSON
|
|
|
608
608
|
// Keep the receipt on stdout and let it drain before returning a failure to scripts.
|
|
609
609
|
if (activation && !activation.activated)
|
|
610
610
|
process.exitCode = 1;
|
|
611
|
-
const warnings = (0,
|
|
611
|
+
const warnings = (0, duties_1.dutyWriteWarnings)(duty, { payload });
|
|
612
612
|
if (flags.json) {
|
|
613
|
-
this.log(JSON.stringify((0, web_url_1.
|
|
614
|
-
...
|
|
613
|
+
this.log(JSON.stringify((0, web_url_1.withDutyUrl)(this.cliConfig.baseURL, {
|
|
614
|
+
...duty,
|
|
615
615
|
...(activation ?? {}),
|
|
616
616
|
...(warnings.length ? { warnings } : {}),
|
|
617
617
|
}), null, 2));
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
|
-
this.log(activation?.activated ? 'Created and activated
|
|
621
|
-
(0,
|
|
622
|
-
(0,
|
|
620
|
+
this.log(activation?.activated ? 'Created and activated duty:' : 'Created duty:');
|
|
621
|
+
(0, duties_1.renderDutySummary)(duty, (line) => this.log(line));
|
|
622
|
+
(0, duties_1.renderDutyWriteWarnings)(warnings, (line) => this.warn(line));
|
|
623
623
|
if (activation && !activation.activated) {
|
|
624
624
|
const { refusal } = activation;
|
|
625
625
|
this.warn(`Activation refused (${refusal.code}): ${refusal.reason}`);
|
|
@@ -627,7 +627,7 @@ JSON
|
|
|
627
627
|
this.warn(`All ${refusal.blockers.length} things blocking it (it stays a draft until each is fixed):`);
|
|
628
628
|
for (const blocker of refusal.blockers)
|
|
629
629
|
this.warn(` - ${blocker.gate}: ${blocker.reason}`);
|
|
630
|
-
this.warn(`Details: ${this.config.bin}
|
|
630
|
+
this.warn(`Details: ${this.config.bin} duties preflight ${String(duty?.id)}`);
|
|
631
631
|
}
|
|
632
632
|
if (refusal.fix)
|
|
633
633
|
this.warn(`Fix: ${refusal.fix}`);
|
|
@@ -636,4 +636,4 @@ JSON
|
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
exports.default =
|
|
639
|
+
exports.default = DutiesCreate;
|
|
@@ -4,11 +4,11 @@ import { BaseCommand } from '../../base-command';
|
|
|
4
4
|
* never became one), each with one outcome and, when it stopped, the one
|
|
5
5
|
* reason and what to do about it.
|
|
6
6
|
*/
|
|
7
|
-
export default class
|
|
7
|
+
export default class DutiesCycles extends BaseCommand {
|
|
8
8
|
static description: string;
|
|
9
9
|
static examples: string[];
|
|
10
10
|
static args: {
|
|
11
|
-
|
|
11
|
+
dutyId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
12
12
|
};
|
|
13
13
|
static flags: {
|
|
14
14
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const base_command_1 = require("../../base-command");
|
|
5
|
-
const
|
|
5
|
+
const duties_1 = require("../../lib/duties");
|
|
6
6
|
/**
|
|
7
7
|
* The Cycle is the unit a person reads: one row per check (and per wake that
|
|
8
8
|
* never became one), each with one outcome and, when it stopped, the one
|
|
9
9
|
* reason and what to do about it.
|
|
10
10
|
*/
|
|
11
|
-
class
|
|
12
|
-
static description = "List a
|
|
11
|
+
class DutiesCycles extends base_command_1.BaseCommand {
|
|
12
|
+
static description = "List a duty's cycles, newest first: what woke it, how each ended, and why it stopped";
|
|
13
13
|
static examples = [
|
|
14
|
-
'<%= config.bin %>
|
|
15
|
-
'<%= config.bin %>
|
|
16
|
-
'<%= config.bin %>
|
|
14
|
+
'<%= config.bin %> duties cycles obj_abc123',
|
|
15
|
+
'<%= config.bin %> duties cycles obj_abc123 --limit 50 --json',
|
|
16
|
+
'<%= config.bin %> duties cycles obj_abc123 --cursor <next_cursor>',
|
|
17
17
|
];
|
|
18
18
|
static args = {
|
|
19
|
-
|
|
19
|
+
dutyId: core_1.Args.string({ ignoreStdin: true, description: 'Duty ID', required: true }),
|
|
20
20
|
};
|
|
21
21
|
static flags = {
|
|
22
22
|
json: core_1.Flags.boolean({ description: 'Output as JSON' }),
|
|
@@ -25,9 +25,9 @@ class CommitmentsCycles extends base_command_1.BaseCommand {
|
|
|
25
25
|
};
|
|
26
26
|
async run() {
|
|
27
27
|
this.requireAuth();
|
|
28
|
-
const { args, flags } = await this.parse(
|
|
28
|
+
const { args, flags } = await this.parse(DutiesCycles);
|
|
29
29
|
try {
|
|
30
|
-
const page = await
|
|
30
|
+
const page = await duties_1.dutyApi.cycles(args.dutyId, {
|
|
31
31
|
...(typeof flags.limit === 'number' ? { limit: flags.limit } : {}),
|
|
32
32
|
...(flags.cursor ? { cursor: flags.cursor } : {}),
|
|
33
33
|
});
|
|
@@ -35,7 +35,7 @@ class CommitmentsCycles extends base_command_1.BaseCommand {
|
|
|
35
35
|
this.log(JSON.stringify(page, null, 2));
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
|
-
for (const line of (0,
|
|
38
|
+
for (const line of (0, duties_1.formatDutyCycles)(page))
|
|
39
39
|
this.log(line);
|
|
40
40
|
}
|
|
41
41
|
catch (err) {
|
|
@@ -43,4 +43,4 @@ class CommitmentsCycles extends base_command_1.BaseCommand {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
exports.default =
|
|
46
|
+
exports.default = DutiesCycles;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
|
-
export default class
|
|
2
|
+
export default class DutiesDecideRemediation extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
-
|
|
5
|
+
dutyId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
6
|
proposalId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const base_command_1 = require("../../base-command");
|
|
5
|
-
const
|
|
6
|
-
class
|
|
5
|
+
const duties_1 = require("../../lib/duties");
|
|
6
|
+
class DutiesDecideRemediation extends base_command_1.BaseCommand {
|
|
7
7
|
static description = 'Approve, reject, or expire a remediation proposal without executing it';
|
|
8
8
|
static args = {
|
|
9
|
-
|
|
9
|
+
dutyId: core_1.Args.string({ ignoreStdin: true, description: 'Duty ID', required: true }),
|
|
10
10
|
proposalId: core_1.Args.string({ ignoreStdin: true, description: 'Proposal ID', required: true }),
|
|
11
11
|
};
|
|
12
12
|
static flags = {
|
|
@@ -20,10 +20,10 @@ class CommitmentsDecideRemediation extends base_command_1.BaseCommand {
|
|
|
20
20
|
};
|
|
21
21
|
async run() {
|
|
22
22
|
this.requireAuth();
|
|
23
|
-
const { args, flags } = await this.parse(
|
|
23
|
+
const { args, flags } = await this.parse(DutiesDecideRemediation);
|
|
24
24
|
let result;
|
|
25
25
|
try {
|
|
26
|
-
result = await
|
|
26
|
+
result = await duties_1.dutyApi.decideRemediationProposal(args.dutyId, args.proposalId, {
|
|
27
27
|
decision: flags.decision,
|
|
28
28
|
execute: false,
|
|
29
29
|
...(flags.reason ? { reason: flags.reason } : {}),
|
|
@@ -35,4 +35,4 @@ class CommitmentsDecideRemediation extends base_command_1.BaseCommand {
|
|
|
35
35
|
this.log(JSON.stringify(result, null, 2));
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
exports.default =
|
|
38
|
+
exports.default = DutiesDecideRemediation;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { BaseCommand } from '../../base-command';
|
|
2
2
|
/**
|
|
3
|
-
* `sky
|
|
3
|
+
* `sky duties delete <id>` — remove a duty from every board.
|
|
4
4
|
*
|
|
5
5
|
* SOFT. The contract is marked deleted and disappears from reads, while the
|
|
6
6
|
* checks, runs, cases, hypotheses and Tasks that reference it stay resolvable —
|
|
7
|
-
* a
|
|
7
|
+
* a Duty is the root of append-oriented ledgers that outlive it, and a
|
|
8
8
|
* dangling reference is worse than a row a reader can still resolve.
|
|
9
9
|
*
|
|
10
|
-
* Refused for an ACTIVE
|
|
10
|
+
* Refused for an ACTIVE duty: pause or archive it first. Deleting
|
|
11
11
|
* something mid-flight orphans a check or run that already holds a lease, and
|
|
12
12
|
* one deliberate step is the right price for an operation whose job is removal.
|
|
13
13
|
* Refused for system-managed loops, which the platform re-creates anyway.
|
|
14
14
|
*/
|
|
15
|
-
export default class
|
|
15
|
+
export default class DutiesDelete extends BaseCommand {
|
|
16
16
|
static description: string;
|
|
17
17
|
static examples: string[];
|
|
18
18
|
static args: {
|