@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
package/dist/lib/web-url.js
CHANGED
|
@@ -27,7 +27,7 @@ exports.spaceUrlFrom = spaceUrlFrom;
|
|
|
27
27
|
exports.conversationUrlFrom = conversationUrlFrom;
|
|
28
28
|
exports.groupChatUrlFrom = groupChatUrlFrom;
|
|
29
29
|
exports.goalUrlFrom = goalUrlFrom;
|
|
30
|
-
exports.
|
|
30
|
+
exports.dutyUrlFrom = dutyUrlFrom;
|
|
31
31
|
exports.northstarUrlFrom = northstarUrlFrom;
|
|
32
32
|
exports.agentUrlFrom = agentUrlFrom;
|
|
33
33
|
exports.compassUrlFrom = compassUrlFrom;
|
|
@@ -39,7 +39,7 @@ exports.projectUrlFrom = projectUrlFrom;
|
|
|
39
39
|
exports.withProjectUrl = withProjectUrl;
|
|
40
40
|
exports.wikiPageUrlFrom = wikiPageUrlFrom;
|
|
41
41
|
exports.withWikiPageUrl = withWikiPageUrl;
|
|
42
|
-
exports.
|
|
42
|
+
exports.withDutyUrl = withDutyUrl;
|
|
43
43
|
exports.withNorthstarUrl = withNorthstarUrl;
|
|
44
44
|
exports.withAgentUrl = withAgentUrl;
|
|
45
45
|
exports.withDataUrls = withDataUrls;
|
|
@@ -85,9 +85,9 @@ function webPath(ref) {
|
|
|
85
85
|
const spaceId = encodeId(ref.spaceId);
|
|
86
86
|
return spaceId ? `/spaces/${spaceId}/goals/${goalId}` : `/goals/${goalId}`;
|
|
87
87
|
}
|
|
88
|
-
case '
|
|
89
|
-
const
|
|
90
|
-
return
|
|
88
|
+
case 'duty': {
|
|
89
|
+
const dutyId = encodeId(ref.dutyId);
|
|
90
|
+
return dutyId ? `/duties/${dutyId}` : null;
|
|
91
91
|
}
|
|
92
92
|
case 'northstar': {
|
|
93
93
|
const northstarId = encodeId(ref.northstarId);
|
|
@@ -259,12 +259,12 @@ function goalUrlFrom(baseURL, goal) {
|
|
|
259
259
|
return null;
|
|
260
260
|
return webUrl(baseURL, { kind: 'goal', goalId, spaceId: idOf(goal, 'spaceId') ?? null });
|
|
261
261
|
}
|
|
262
|
-
/** Build a
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
if (!
|
|
262
|
+
/** Build a duty URL from a raw server duty record. */
|
|
263
|
+
function dutyUrlFrom(baseURL, duty) {
|
|
264
|
+
const dutyId = idOf(duty, 'id', '_id');
|
|
265
|
+
if (!dutyId)
|
|
266
266
|
return null;
|
|
267
|
-
return webUrl(baseURL, { kind: '
|
|
267
|
+
return webUrl(baseURL, { kind: 'duty', dutyId });
|
|
268
268
|
}
|
|
269
269
|
/** Build a Northstar detail URL from a raw server Northstar record. */
|
|
270
270
|
function northstarUrlFrom(baseURL, northstar) {
|
|
@@ -348,9 +348,9 @@ function wikiPageUrlFrom(baseURL, page) {
|
|
|
348
348
|
function withWikiPageUrl(baseURL, page) {
|
|
349
349
|
return { ...page, url: wikiPageUrlFrom(baseURL, page) };
|
|
350
350
|
}
|
|
351
|
-
/** Return a shallow copy of a
|
|
352
|
-
function
|
|
353
|
-
return { ...
|
|
351
|
+
/** Return a shallow copy of a duty record with a `url` field attached. */
|
|
352
|
+
function withDutyUrl(baseURL, duty) {
|
|
353
|
+
return { ...duty, url: dutyUrlFrom(baseURL, duty) };
|
|
354
354
|
}
|
|
355
355
|
/** Return a shallow copy of a Northstar record with a canonical web URL. */
|
|
356
356
|
function withNorthstarUrl(baseURL, northstar) {
|
package/dist/lib/workspaces.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface StewardshipSource {
|
|
|
4
4
|
status: 'available' | 'unavailable';
|
|
5
5
|
truncated: boolean;
|
|
6
6
|
code?: string;
|
|
7
|
-
/** `unattributedGrants` only: Grants in this workspace by Agent or
|
|
7
|
+
/** `unattributedGrants` only: Grants in this workspace by Agent or Duty that carry no workspace stamp and so are not listed. */
|
|
8
8
|
unlisted?: number;
|
|
9
9
|
}
|
|
10
10
|
export interface StewardshipCoverage {
|
|
@@ -24,7 +24,7 @@ export interface WorkspaceGrantReport {
|
|
|
24
24
|
grants: WorkspaceGrantMetadata[] | null;
|
|
25
25
|
coverage: StewardshipCoverage;
|
|
26
26
|
}
|
|
27
|
-
export interface
|
|
27
|
+
export interface StewardshipDutyMetadata {
|
|
28
28
|
id: string;
|
|
29
29
|
title?: string;
|
|
30
30
|
status?: string;
|
|
@@ -38,8 +38,8 @@ export interface WorkspaceStewardshipReport extends WorkspaceGrantReport {
|
|
|
38
38
|
/** `false` on `absent`: a removed member and an id that never existed read alike. */
|
|
39
39
|
canDistinguishRemoved?: boolean;
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
approverSeats:
|
|
41
|
+
duties: StewardshipDutyMetadata[] | null;
|
|
42
|
+
approverSeats: StewardshipDutyMetadata[] | null;
|
|
43
43
|
agents: Array<{
|
|
44
44
|
id: string;
|
|
45
45
|
name?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Mode-free responsibility context. Tool permissions belong to the Agent runtime. */
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export interface
|
|
2
|
+
export declare const DUTY_EXECUTION_CONTRACT_VERSION: 3;
|
|
3
|
+
export declare const DUTY_EXECUTION_CONTRACT_CAPABILITY = "duty_execution_contract_v3";
|
|
4
|
+
export interface DutyExecutionContract {
|
|
5
5
|
version: 3;
|
|
6
|
-
kind: '
|
|
6
|
+
kind: 'duty' | 'task_delivery';
|
|
7
7
|
responsibilityRef: {
|
|
8
|
-
kind: '
|
|
8
|
+
kind: 'duty' | 'task';
|
|
9
9
|
id: string;
|
|
10
10
|
version: number;
|
|
11
11
|
};
|
|
@@ -38,8 +38,8 @@ export interface CommitmentExecutionContract {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
mustNot: string[];
|
|
41
|
-
return: '
|
|
41
|
+
return: 'duty_result_v1' | 'task_output';
|
|
42
42
|
}
|
|
43
43
|
export declare function eventRepository(event: Record<string, unknown> | null | undefined): string;
|
|
44
44
|
/** One strict parser used at storage admission and at runtime admission. */
|
|
45
|
-
export declare function
|
|
45
|
+
export declare function normalizeDutyExecutionContract(value: unknown): DutyExecutionContract | null;
|
|
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
var dutyExecutionContract_exports = {};
|
|
20
|
+
__export(dutyExecutionContract_exports, {
|
|
21
|
+
DUTY_EXECUTION_CONTRACT_CAPABILITY: () => DUTY_EXECUTION_CONTRACT_CAPABILITY,
|
|
22
|
+
DUTY_EXECUTION_CONTRACT_VERSION: () => DUTY_EXECUTION_CONTRACT_VERSION,
|
|
23
23
|
eventRepository: () => eventRepository,
|
|
24
|
-
|
|
24
|
+
normalizeDutyExecutionContract: () => normalizeDutyExecutionContract
|
|
25
25
|
});
|
|
26
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(dutyExecutionContract_exports);
|
|
27
27
|
var import_node_util = require("node:util");
|
|
28
28
|
const VALID_CI_LOG_EVIDENCE_RE = /^[\w.-]+\/[\w.-]+$/;
|
|
29
29
|
const VALID_CI_LOG_EVIDENCE_RE_2 = /^\d{1,20}$/;
|
|
@@ -36,8 +36,8 @@ const VALID_BRANCH_RE = /[\s~^:?*[\\\x00-\x1f\x7f]/;
|
|
|
36
36
|
const VALID_DELIVERY_RE = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
|
|
37
37
|
const VALID_DELIVERY_SOURCE_RE = /^[A-Za-z0-9][A-Za-z0-9_./-]{0,239}$/;
|
|
38
38
|
const VALID_DELIVERY_SOURCE_RE_2 = /^[a-f0-9]{40,64}$/i;
|
|
39
|
-
const
|
|
40
|
-
const
|
|
39
|
+
const DUTY_EXECUTION_CONTRACT_VERSION = 3;
|
|
40
|
+
const DUTY_EXECUTION_CONTRACT_CAPABILITY = "duty_execution_contract_v3";
|
|
41
41
|
const DELIVERY_MODES = /* @__PURE__ */ new Set([
|
|
42
42
|
"report_only",
|
|
43
43
|
"local_patch",
|
|
@@ -120,14 +120,14 @@ const CAPABILITY_SOURCE_KEYS = /* @__PURE__ */ new Set([
|
|
|
120
120
|
"reason"
|
|
121
121
|
]);
|
|
122
122
|
const WORKSPACE_CONSTRAINT_KEYS = /* @__PURE__ */ new Set([
|
|
123
|
-
"
|
|
123
|
+
"allowedDutyDeliveryModes",
|
|
124
124
|
"requireAttestedAccessForDeliveryModes",
|
|
125
125
|
"maxInitiativesPerDay",
|
|
126
126
|
"maxAutoRunsPerDay",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
127
|
+
"maxDutyActionRunsPerDay",
|
|
128
|
+
"maxDutyObservationRunsPerDay",
|
|
129
|
+
"maxDutyConcurrentRuns",
|
|
130
|
+
"maxDutyCostUsdPerDay",
|
|
131
131
|
"requireApprovalRiskLevels",
|
|
132
132
|
"requireApprovalActionClasses",
|
|
133
133
|
"blockedSourceKinds"
|
|
@@ -309,10 +309,10 @@ function validWorkspacePolicy(value) {
|
|
|
309
309
|
for (const [key, item] of Object.entries(value.hardConstraints)) {
|
|
310
310
|
if (item === null)
|
|
311
311
|
continue;
|
|
312
|
-
if (key === "
|
|
312
|
+
if (key === "allowedDutyDeliveryModes" || key === "requireAttestedAccessForDeliveryModes") {
|
|
313
313
|
if (!validStringArray(item, 5, DELIVERY_MODES))
|
|
314
314
|
return false;
|
|
315
|
-
} else if (key === "
|
|
315
|
+
} else if (key === "maxDutyCostUsdPerDay") {
|
|
316
316
|
if (typeof item !== "number" || !Number.isFinite(item) || item < 0)
|
|
317
317
|
return false;
|
|
318
318
|
} else if (key.startsWith("max")) {
|
|
@@ -360,7 +360,7 @@ function validDelivery(value) {
|
|
|
360
360
|
if (!hasOnlyKeys(expectation, allowed) || !["code", "page", "url", "file", "message", "dataset"].includes(String(expectation.kind)))
|
|
361
361
|
return false;
|
|
362
362
|
if (expectation.id !== void 0) {
|
|
363
|
-
if (!boundedString(expectation.id, 64) || expectation.id === "
|
|
363
|
+
if (!boundedString(expectation.id, 64) || expectation.id === "duty-delivery" || ids.has(expectation.id))
|
|
364
364
|
return false;
|
|
365
365
|
ids.add(expectation.id);
|
|
366
366
|
}
|
|
@@ -405,7 +405,7 @@ function failedGitHubCheck(event) {
|
|
|
405
405
|
const eventType = String(event?.eventType || event?.type || "").toLowerCase();
|
|
406
406
|
return eventType === "github.check_run_failed" || eventType === "check_run_failed";
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function normalizeDutyExecutionContract(value) {
|
|
409
409
|
if (!hasOnlyKeys(value, /* @__PURE__ */ new Set([
|
|
410
410
|
"version",
|
|
411
411
|
"kind",
|
|
@@ -427,18 +427,18 @@ function normalizeCommitmentExecutionContract(value) {
|
|
|
427
427
|
const eventSha = eventSourceRevision(event);
|
|
428
428
|
const eventRepo = eventRepository(event);
|
|
429
429
|
const taskDelivery = contract.kind === "task_delivery";
|
|
430
|
-
if (contract.version !==
|
|
430
|
+
if (contract.version !== DUTY_EXECUTION_CONTRACT_VERSION || !["duty", "task_delivery"].includes(contract.kind) || !hasOnlyKeys(contract.responsibilityRef, /* @__PURE__ */ new Set(["kind", "id", "version"])) || contract.responsibilityRef.kind !== (taskDelivery ? "task" : "duty") || !boundedString(contract.responsibilityRef.id, 240) || !Number.isSafeInteger(contract.responsibilityRef.version) || contract.responsibilityRef.version < 1 || !boundedString(contract.responsibility, 2e3) || !hasOnlyKeys(contract.workspace, /* @__PURE__ */ new Set(["kind", "base", "fetchBase"])) || contract.workspace.kind !== "ephemeral" || !boundedString(contract.workspace.base, 255) || contract.workspace.fetchBase !== void 0 && (contract.workspace.fetchBase !== true || contract.workspace.kind !== "ephemeral") || !validDelivery(contract.delivery) || !Array.isArray(contract.capabilitySources) || contract.capabilitySources.length > 32 || !contract.capabilitySources.every(validCapabilitySource) || !validWorkspacePolicy(contract.workspacePolicy ?? {}) || !(0, import_node_util.isDeepStrictEqual)(contract.mustNot, [
|
|
431
431
|
"change_workspace_administration",
|
|
432
432
|
"broaden_credentials",
|
|
433
433
|
...taskDelivery ? ["reimplement_source_work"] : []
|
|
434
|
-
]) || (taskDelivery ? contract.return !== "task_output" : contract.return !== "
|
|
434
|
+
]) || (taskDelivery ? contract.return !== "task_output" : contract.return !== "duty_result_v1") || event !== null && (!plainObject(event) || !(0, import_node_util.isDeepStrictEqual)(event, normalizedEventFacts(event))) || eventSha && contract.workspace.base.toLowerCase() !== eventSha || eventRepo && contract.delivery.repo && String(contract.delivery.repo).toLowerCase() !== eventRepo || failedGitHubCheck(event) && (!eventSha || !eventRepo) || contract.evidence !== void 0 && (taskDelivery || !validEvidence(contract.evidence) || !contract.evidence.ci.every((row) => evidenceMatchesEvent(row, event))) || taskDelivery && (event !== null || !["draft_pr", "push_branch", "direct_branch"].includes(contract.delivery.mode) || contract.workspace.kind !== "ephemeral" || !validDeliverySource(contract.deliverySource) || contract.responsibilityRef.id !== contract.deliverySource?.parentTaskId || contract.workspace.base.toLowerCase() !== String(contract.deliverySource?.baseCommit).toLowerCase()) || !taskDelivery && contract.deliverySource !== void 0)
|
|
435
435
|
return null;
|
|
436
436
|
return JSON.parse(JSON.stringify(contract));
|
|
437
437
|
}
|
|
438
438
|
// Annotate the CommonJS export names for ESM import in node:
|
|
439
439
|
0 && (module.exports = {
|
|
440
|
-
|
|
441
|
-
|
|
440
|
+
DUTY_EXECUTION_CONTRACT_CAPABILITY,
|
|
441
|
+
DUTY_EXECUTION_CONTRACT_VERSION,
|
|
442
442
|
eventRepository,
|
|
443
|
-
|
|
443
|
+
normalizeDutyExecutionContract
|
|
444
444
|
});
|
|
@@ -102,7 +102,7 @@ async function signExecutorStopReceipt(signer, body, options = {}) {
|
|
|
102
102
|
const proof = await (0, import_deviceKey.signProofWith)(signer, {
|
|
103
103
|
method: "POST",
|
|
104
104
|
url: executorStopReceiptHtu(parsed.dispatchId),
|
|
105
|
-
// `accessToken` is hashed inline into the `ath` claim: the
|
|
105
|
+
// `accessToken` is hashed inline into the `ath` claim: the duty to the body.
|
|
106
106
|
accessToken: canonicalReceiptJson(parsed),
|
|
107
107
|
...options.iat !== void 0 ? { iat: options.iat } : {},
|
|
108
108
|
...options.jti !== void 0 ? { jti: options.jti } : {}
|
|
@@ -121,7 +121,7 @@ async function signExecutorStopReceiptV2(signer, body, options = {}) {
|
|
|
121
121
|
const proof = await (0, import_deviceKey.signProofWith)(signer, {
|
|
122
122
|
method: "POST",
|
|
123
123
|
url: executorStopReceiptV2Htu(parsed.dispatchId),
|
|
124
|
-
// `accessToken` is hashed inline into the `ath` claim: the
|
|
124
|
+
// `accessToken` is hashed inline into the `ath` claim: the duty to the body.
|
|
125
125
|
accessToken: (0, import_executorStopReceipt.canonicalReceiptJson)(parsed),
|
|
126
126
|
...options.iat !== void 0 ? { iat: options.iat } : {},
|
|
127
127
|
...options.jti !== void 0 ? { jti: options.jti } : {}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Duty context never overrides Agent permissions. Version 3 admission
|
|
2
2
|
* rejects old contracts; typed Task delivery is a separate frozen operation. */
|
|
3
3
|
/** The wire vocabulary for `permissionSource`. Top-level session field. */
|
|
4
4
|
export declare const SESSION_PERMISSION_SOURCES: readonly ["agent"];
|
|
5
5
|
export type SessionPermissionSource = (typeof SESSION_PERMISSION_SOURCES)[number];
|
|
6
6
|
/**
|
|
7
7
|
* The daemon capability that proves a build honours `permissionSource`. The
|
|
8
|
-
* server announces it in preflight and refuses to dispatch a
|
|
9
|
-
* a daemon without it (`
|
|
8
|
+
* server announces it in preflight and refuses to dispatch a Duty Run to
|
|
9
|
+
* a daemon without it (`DUTY_AGENT_PERMISSIONS_RUNTIME_UNSUPPORTED`), so
|
|
10
10
|
* the marker never reaches a daemon that would ignore it.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const DUTY_AGENT_PERMISSIONS_CAPABILITY = "duty_execution_contract_v3";
|
|
13
13
|
/**
|
|
14
14
|
* The minimal contract shape this rule reads. The predicate only ever needs
|
|
15
15
|
* `kind` — keeping the input structural means this module never imports the
|
|
16
|
-
* full `
|
|
17
|
-
* (`daemon/src/
|
|
18
|
-
*
|
|
16
|
+
* full `DutyExecutionContract` type, which lives daemon-side
|
|
17
|
+
* (`daemon/src/duty-execution-contract.ts`) and server-side in the
|
|
18
|
+
* duty services.
|
|
19
19
|
*/
|
|
20
20
|
export type PermissionContractKind = {
|
|
21
21
|
kind?: unknown;
|
|
@@ -26,13 +26,13 @@ export type PermissionContractKind = {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function normalizeSessionPermissionSource(value: unknown): SessionPermissionSource | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* What the server stamps on the wire for this contract. A `
|
|
29
|
+
* What the server stamps on the wire for this contract. A `duty`
|
|
30
30
|
* contract no longer carries permissions (OSK-11975); every other contract
|
|
31
31
|
* kind keeps its own authority and stamps nothing.
|
|
32
32
|
*/
|
|
33
33
|
export declare function permissionSourceForContract(contract: PermissionContractKind): SessionPermissionSource | undefined;
|
|
34
34
|
/** Only typed Task delivery owns an effect-specific permission boundary.
|
|
35
|
-
* A
|
|
35
|
+
* A Duty is context for the Agent and cannot grant or restrict tools.
|
|
36
36
|
*/
|
|
37
37
|
export declare function contractGovernsPermissions(contract: PermissionContractKind, _permissionSource?: unknown): boolean;
|
|
38
38
|
/**
|
|
@@ -18,7 +18,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var sessionPermissionAuthority_exports = {};
|
|
20
20
|
__export(sessionPermissionAuthority_exports, {
|
|
21
|
-
|
|
21
|
+
DUTY_AGENT_PERMISSIONS_CAPABILITY: () => DUTY_AGENT_PERMISSIONS_CAPABILITY,
|
|
22
22
|
SESSION_PERMISSION_SOURCES: () => SESSION_PERMISSION_SOURCES,
|
|
23
23
|
contractGovernsPermissions: () => contractGovernsPermissions,
|
|
24
24
|
normalizeSessionPermissionSource: () => normalizeSessionPermissionSource,
|
|
@@ -27,22 +27,22 @@ __export(sessionPermissionAuthority_exports, {
|
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(sessionPermissionAuthority_exports);
|
|
29
29
|
const SESSION_PERMISSION_SOURCES = ["agent"];
|
|
30
|
-
const
|
|
30
|
+
const DUTY_AGENT_PERMISSIONS_CAPABILITY = "duty_execution_contract_v3";
|
|
31
31
|
function normalizeSessionPermissionSource(value) {
|
|
32
32
|
return SESSION_PERMISSION_SOURCES.includes(value) ? value : void 0;
|
|
33
33
|
}
|
|
34
34
|
function permissionSourceForContract(contract) {
|
|
35
|
-
return contract?.kind === "
|
|
35
|
+
return contract?.kind === "duty" ? "agent" : void 0;
|
|
36
36
|
}
|
|
37
37
|
function contractGovernsPermissions(contract, _permissionSource) {
|
|
38
|
-
return Boolean(contract && contract.kind !== "
|
|
38
|
+
return Boolean(contract && contract.kind !== "duty");
|
|
39
39
|
}
|
|
40
40
|
function permissionGoverningContract(contract, permissionSource) {
|
|
41
41
|
return contract && contractGovernsPermissions(contract, permissionSource) ? contract : void 0;
|
|
42
42
|
}
|
|
43
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
44
|
0 && (module.exports = {
|
|
45
|
-
|
|
45
|
+
DUTY_AGENT_PERMISSIONS_CAPABILITY,
|
|
46
46
|
SESSION_PERMISSION_SOURCES,
|
|
47
47
|
contractGovernsPermissions,
|
|
48
48
|
normalizeSessionPermissionSource,
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* ## Unknown is a member, and it is never hidden
|
|
44
44
|
*
|
|
45
45
|
* Each list carries an explicit `unknown`. A missing, empty or unrecognised
|
|
46
|
-
* value normalizes to it, and its copy
|
|
46
|
+
* value normalizes to it, and its copy gives a simple sign-in prompt.
|
|
47
47
|
* It is never folded into the nearest reassuring reading: "Everything reads
|
|
48
48
|
* healthy and the thing is unusable" (root CLAUDE.md) is exactly what an
|
|
49
49
|
* optimistic default here would produce.
|
|
@@ -128,7 +128,7 @@ export interface SessionRevocationDescription {
|
|
|
128
128
|
/**
|
|
129
129
|
* THE copy for a revoked session. Never throws, whatever it is given: the server
|
|
130
130
|
* can ship a reason before a client knows it, and that case must still say
|
|
131
|
-
*
|
|
131
|
+
* that the person was signed out, without speculating about the cause.
|
|
132
132
|
*/
|
|
133
133
|
export declare function describeSessionRevocation(value: unknown, { surface, bin, }?: {
|
|
134
134
|
surface?: SessionRevocationSurface;
|
|
@@ -159,9 +159,9 @@ const REASON_COPY = Object.freeze({
|
|
|
159
159
|
nextStep: "cancel_deletion"
|
|
160
160
|
},
|
|
161
161
|
unknown: {
|
|
162
|
-
title: "You were signed out
|
|
163
|
-
detail: "
|
|
164
|
-
nextStep: "
|
|
162
|
+
title: "You were signed out.",
|
|
163
|
+
detail: "",
|
|
164
|
+
nextStep: "sign_in"
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
167
|
function nextStepCopy(step, surface, bin) {
|
|
@@ -201,7 +201,7 @@ function describeSessionRevocation(value, { surface = "app", bin = SESSION_REVOC
|
|
|
201
201
|
function formatSessionRevocation(value, options = {}) {
|
|
202
202
|
const d = describeSessionRevocation(value, options);
|
|
203
203
|
const code = d.unrecognized ? ` (reason code: ${d.unrecognized})` : "";
|
|
204
|
-
return `${d.title}${code}
|
|
204
|
+
return [`${d.title}${code}`, d.detail, d.nextStepText].filter(Boolean).join(" ");
|
|
205
205
|
}
|
|
206
206
|
const SESSION_REVOCATION_TRIGGERS = [
|
|
207
207
|
"account_owner",
|
|
@@ -93,7 +93,7 @@ export declare class PermanentAuthFailure extends Error {
|
|
|
93
93
|
* `SESSION_REVOCATION_REASONS` value, `./sessionRevocation.ts`) exactly as
|
|
94
94
|
* received, or undefined when the server sent none. Deliberately not
|
|
95
95
|
* normalized here: a surface rendering it with `describeSessionRevocation`
|
|
96
|
-
* turns a missing or unknown value into the
|
|
96
|
+
* turns a missing or unknown value into the generic signed-out copy,
|
|
97
97
|
* and keeps an unrecognised code visible rather than losing it.
|
|
98
98
|
*/
|
|
99
99
|
readonly revocationReason?: string;
|
|
@@ -29,7 +29,7 @@ class PermanentAuthFailure extends Error {
|
|
|
29
29
|
* `SESSION_REVOCATION_REASONS` value, `./sessionRevocation.ts`) exactly as
|
|
30
30
|
* received, or undefined when the server sent none. Deliberately not
|
|
31
31
|
* normalized here: a surface rendering it with `describeSessionRevocation`
|
|
32
|
-
* turns a missing or unknown value into the
|
|
32
|
+
* turns a missing or unknown value into the generic signed-out copy,
|
|
33
33
|
* and keeps an unrecognised code visible rather than losing it.
|
|
34
34
|
*/
|
|
35
35
|
revocationReason;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The workspace-isolation probe wire contract (OSK-15099).
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
4
|
+
* A Duty Run is always isolated: the daemon cuts it a private git
|
|
5
5
|
* worktree from the directory the Run is rooted in, and refuses the Run with
|
|
6
6
|
* `EXECUTION_ISOLATION_UNAVAILABLE` before any tool when it cannot. Preflight
|
|
7
7
|
* had no way to read that machine's filesystem, so it reported `ready`,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/** Mode-free responsibility context. Tool permissions belong to the Agent runtime. */
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export interface
|
|
2
|
+
export declare const DUTY_EXECUTION_CONTRACT_VERSION: 3;
|
|
3
|
+
export declare const DUTY_EXECUTION_CONTRACT_CAPABILITY = "duty_execution_contract_v3";
|
|
4
|
+
export interface DutyExecutionContract {
|
|
5
5
|
version: 3;
|
|
6
|
-
kind: '
|
|
6
|
+
kind: 'duty' | 'task_delivery';
|
|
7
7
|
responsibilityRef: {
|
|
8
|
-
kind: '
|
|
8
|
+
kind: 'duty' | 'task';
|
|
9
9
|
id: string;
|
|
10
10
|
version: number;
|
|
11
11
|
};
|
|
@@ -38,8 +38,8 @@ export interface CommitmentExecutionContract {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
mustNot: string[];
|
|
41
|
-
return: '
|
|
41
|
+
return: 'duty_result_v1' | 'task_output';
|
|
42
42
|
}
|
|
43
43
|
export declare function eventRepository(event: Record<string, unknown> | null | undefined): string;
|
|
44
44
|
/** One strict parser used at storage admission and at runtime admission. */
|
|
45
|
-
export declare function
|
|
45
|
+
export declare function normalizeDutyExecutionContract(value: unknown): DutyExecutionContract | null;
|
|
@@ -12,8 +12,8 @@ const VALID_DELIVERY_RE = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
|
|
|
12
12
|
const VALID_DELIVERY_SOURCE_RE = /^[A-Za-z0-9][A-Za-z0-9_./-]{0,239}$/;
|
|
13
13
|
const VALID_DELIVERY_SOURCE_RE_2 = /^[a-f0-9]{40,64}$/i;
|
|
14
14
|
/** Mode-free responsibility context. Tool permissions belong to the Agent runtime. */
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
15
|
+
export const DUTY_EXECUTION_CONTRACT_VERSION = 3;
|
|
16
|
+
export const DUTY_EXECUTION_CONTRACT_CAPABILITY = 'duty_execution_contract_v3';
|
|
17
17
|
const DELIVERY_MODES = new Set([
|
|
18
18
|
'report_only',
|
|
19
19
|
'local_patch',
|
|
@@ -96,14 +96,14 @@ const CAPABILITY_SOURCE_KEYS = new Set([
|
|
|
96
96
|
'reason',
|
|
97
97
|
]);
|
|
98
98
|
const WORKSPACE_CONSTRAINT_KEYS = new Set([
|
|
99
|
-
'
|
|
99
|
+
'allowedDutyDeliveryModes',
|
|
100
100
|
'requireAttestedAccessForDeliveryModes',
|
|
101
101
|
'maxInitiativesPerDay',
|
|
102
102
|
'maxAutoRunsPerDay',
|
|
103
|
-
'
|
|
104
|
-
'
|
|
105
|
-
'
|
|
106
|
-
'
|
|
103
|
+
'maxDutyActionRunsPerDay',
|
|
104
|
+
'maxDutyObservationRunsPerDay',
|
|
105
|
+
'maxDutyConcurrentRuns',
|
|
106
|
+
'maxDutyCostUsdPerDay',
|
|
107
107
|
'requireApprovalRiskLevels',
|
|
108
108
|
'requireApprovalActionClasses',
|
|
109
109
|
'blockedSourceKinds',
|
|
@@ -242,7 +242,7 @@ function validEvidence(value) {
|
|
|
242
242
|
value.ci.every(validCiLogEvidence));
|
|
243
243
|
}
|
|
244
244
|
// Mirror of `validObserve` in
|
|
245
|
-
// api/server/services/
|
|
245
|
+
// api/server/services/Duties/DutyExecutionContract.js. The daemon
|
|
246
246
|
// has no projector, so canonical form is part of validity on both sides:
|
|
247
247
|
// `egress` must be strictly ascending (sorted AND unique). The shared parity
|
|
248
248
|
// fixture holds the two to one verdict.
|
|
@@ -341,12 +341,12 @@ function validWorkspacePolicy(value) {
|
|
|
341
341
|
for (const [key, item] of Object.entries(value.hardConstraints)) {
|
|
342
342
|
if (item === null)
|
|
343
343
|
continue;
|
|
344
|
-
if (key === '
|
|
344
|
+
if (key === 'allowedDutyDeliveryModes' ||
|
|
345
345
|
key === 'requireAttestedAccessForDeliveryModes') {
|
|
346
346
|
if (!validStringArray(item, 5, DELIVERY_MODES))
|
|
347
347
|
return false;
|
|
348
348
|
}
|
|
349
|
-
else if (key === '
|
|
349
|
+
else if (key === 'maxDutyCostUsdPerDay') {
|
|
350
350
|
if (typeof item !== 'number' || !Number.isFinite(item) || item < 0)
|
|
351
351
|
return false;
|
|
352
352
|
}
|
|
@@ -415,7 +415,7 @@ function validDelivery(value) {
|
|
|
415
415
|
return false;
|
|
416
416
|
if (expectation.id !== undefined) {
|
|
417
417
|
if (!boundedString(expectation.id, 64) ||
|
|
418
|
-
expectation.id === '
|
|
418
|
+
expectation.id === 'duty-delivery' ||
|
|
419
419
|
ids.has(expectation.id))
|
|
420
420
|
return false;
|
|
421
421
|
ids.add(expectation.id);
|
|
@@ -481,7 +481,7 @@ function failedGitHubCheck(event) {
|
|
|
481
481
|
return eventType === 'github.check_run_failed' || eventType === 'check_run_failed';
|
|
482
482
|
}
|
|
483
483
|
/** One strict parser used at storage admission and at runtime admission. */
|
|
484
|
-
export function
|
|
484
|
+
export function normalizeDutyExecutionContract(value) {
|
|
485
485
|
if (!hasOnlyKeys(value, new Set([
|
|
486
486
|
'version',
|
|
487
487
|
'kind',
|
|
@@ -503,10 +503,10 @@ export function normalizeCommitmentExecutionContract(value) {
|
|
|
503
503
|
const eventSha = eventSourceRevision(event);
|
|
504
504
|
const eventRepo = eventRepository(event);
|
|
505
505
|
const taskDelivery = contract.kind === 'task_delivery';
|
|
506
|
-
if (contract.version !==
|
|
507
|
-
!['
|
|
506
|
+
if (contract.version !== DUTY_EXECUTION_CONTRACT_VERSION ||
|
|
507
|
+
!['duty', 'task_delivery'].includes(contract.kind) ||
|
|
508
508
|
!hasOnlyKeys(contract.responsibilityRef, new Set(['kind', 'id', 'version'])) ||
|
|
509
|
-
contract.responsibilityRef.kind !== (taskDelivery ? 'task' : '
|
|
509
|
+
contract.responsibilityRef.kind !== (taskDelivery ? 'task' : 'duty') ||
|
|
510
510
|
!boundedString(contract.responsibilityRef.id, 240) ||
|
|
511
511
|
!Number.isSafeInteger(contract.responsibilityRef.version) ||
|
|
512
512
|
contract.responsibilityRef.version < 1 ||
|
|
@@ -528,7 +528,7 @@ export function normalizeCommitmentExecutionContract(value) {
|
|
|
528
528
|
]) ||
|
|
529
529
|
(taskDelivery
|
|
530
530
|
? contract.return !== 'task_output'
|
|
531
|
-
: contract.return !== '
|
|
531
|
+
: contract.return !== 'duty_result_v1') ||
|
|
532
532
|
(event !== null &&
|
|
533
533
|
(!plainObject(event) || !isDeepStrictEqual(event, normalizedEventFacts(event)))) ||
|
|
534
534
|
(eventSha && contract.workspace.base.toLowerCase() !== eventSha) ||
|
|
@@ -119,7 +119,7 @@ export async function signExecutorStopReceipt(signer, body, options = {}) {
|
|
|
119
119
|
const proof = await signProofWith(signer, {
|
|
120
120
|
method: 'POST',
|
|
121
121
|
url: executorStopReceiptHtu(parsed.dispatchId),
|
|
122
|
-
// `accessToken` is hashed inline into the `ath` claim: the
|
|
122
|
+
// `accessToken` is hashed inline into the `ath` claim: the duty to the body.
|
|
123
123
|
accessToken: canonicalReceiptJson(parsed),
|
|
124
124
|
...(options.iat !== undefined ? { iat: options.iat } : {}),
|
|
125
125
|
...(options.jti !== undefined ? { jti: options.jti } : {}),
|
|
@@ -129,7 +129,7 @@ export async function signExecutorStopReceiptV2(signer, body, options = {}) {
|
|
|
129
129
|
const proof = await signProofWith(signer, {
|
|
130
130
|
method: 'POST',
|
|
131
131
|
url: executorStopReceiptV2Htu(parsed.dispatchId),
|
|
132
|
-
// `accessToken` is hashed inline into the `ath` claim: the
|
|
132
|
+
// `accessToken` is hashed inline into the `ath` claim: the duty to the body.
|
|
133
133
|
accessToken: canonicalReceiptJson(parsed),
|
|
134
134
|
...(options.iat !== undefined ? { iat: options.iat } : {}),
|
|
135
135
|
...(options.jti !== undefined ? { jti: options.jti } : {}),
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* loopback. Their default ports used to be DERIVED: `base + fnv1a32(profile) % 100`.
|
|
6
6
|
* A hundred slots is a birthday problem (an even chance of some collision at
|
|
7
7
|
* about twelve profiles), and a colliding pair of names collides every time.
|
|
8
|
-
* Measured on one machine: `default`, `
|
|
8
|
+
* Measured on one machine: `default`, `duty-local` and
|
|
9
9
|
* `df-261101-gateway-v139` all derive health 19674 and relay 18886 (OSK-22134,
|
|
10
10
|
* OSK-22128). The second profile could not start its relay, and its `status`
|
|
11
11
|
* read the first profile's health server as its own.
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Duty context never overrides Agent permissions. Version 3 admission
|
|
2
2
|
* rejects old contracts; typed Task delivery is a separate frozen operation. */
|
|
3
3
|
/** The wire vocabulary for `permissionSource`. Top-level session field. */
|
|
4
4
|
export declare const SESSION_PERMISSION_SOURCES: readonly ["agent"];
|
|
5
5
|
export type SessionPermissionSource = (typeof SESSION_PERMISSION_SOURCES)[number];
|
|
6
6
|
/**
|
|
7
7
|
* The daemon capability that proves a build honours `permissionSource`. The
|
|
8
|
-
* server announces it in preflight and refuses to dispatch a
|
|
9
|
-
* a daemon without it (`
|
|
8
|
+
* server announces it in preflight and refuses to dispatch a Duty Run to
|
|
9
|
+
* a daemon without it (`DUTY_AGENT_PERMISSIONS_RUNTIME_UNSUPPORTED`), so
|
|
10
10
|
* the marker never reaches a daemon that would ignore it.
|
|
11
11
|
*/
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const DUTY_AGENT_PERMISSIONS_CAPABILITY = "duty_execution_contract_v3";
|
|
13
13
|
/**
|
|
14
14
|
* The minimal contract shape this rule reads. The predicate only ever needs
|
|
15
15
|
* `kind` — keeping the input structural means this module never imports the
|
|
16
|
-
* full `
|
|
17
|
-
* (`daemon/src/
|
|
18
|
-
*
|
|
16
|
+
* full `DutyExecutionContract` type, which lives daemon-side
|
|
17
|
+
* (`daemon/src/duty-execution-contract.ts`) and server-side in the
|
|
18
|
+
* duty services.
|
|
19
19
|
*/
|
|
20
20
|
export type PermissionContractKind = {
|
|
21
21
|
kind?: unknown;
|
|
@@ -26,13 +26,13 @@ export type PermissionContractKind = {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function normalizeSessionPermissionSource(value: unknown): SessionPermissionSource | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* What the server stamps on the wire for this contract. A `
|
|
29
|
+
* What the server stamps on the wire for this contract. A `duty`
|
|
30
30
|
* contract no longer carries permissions (OSK-11975); every other contract
|
|
31
31
|
* kind keeps its own authority and stamps nothing.
|
|
32
32
|
*/
|
|
33
33
|
export declare function permissionSourceForContract(contract: PermissionContractKind): SessionPermissionSource | undefined;
|
|
34
34
|
/** Only typed Task delivery owns an effect-specific permission boundary.
|
|
35
|
-
* A
|
|
35
|
+
* A Duty is context for the Agent and cannot grant or restrict tools.
|
|
36
36
|
*/
|
|
37
37
|
export declare function contractGovernsPermissions(contract: PermissionContractKind, _permissionSource?: unknown): boolean;
|
|
38
38
|
/**
|