@skrr-ai/cli 0.1.119 → 0.1.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-command.d.ts +31 -0
- package/dist/base-command.js +117 -6
- package/dist/commands/agent/message/context.d.ts +1 -0
- package/dist/commands/agent/message/context.js +3 -2
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commitments/action-proposal.d.ts +13 -0
- package/dist/commands/commitments/action-proposal.js +39 -0
- package/dist/commands/commitments/action-proposals/decide.js +8 -1
- package/dist/commands/commitments/action-proposals/execute.js +11 -1
- package/dist/commands/commitments/create.js +2 -2
- package/dist/commands/commitments/doctor.d.ts +8 -0
- package/dist/commands/commitments/doctor.js +22 -0
- package/dist/commands/commitments/execute-remediation.js +12 -1
- package/dist/commands/commitments/observations.js +2 -2
- package/dist/commands/commitments/pack/bind.d.ts +18 -1
- package/dist/commands/commitments/pack/bind.js +66 -8
- package/dist/commands/commitments/pack/plan.d.ts +4 -1
- package/dist/commands/commitments/pack/plan.js +30 -2
- package/dist/commands/commitments/update.js +8 -2
- package/dist/commands/completion/index.js +1 -1
- package/dist/commands/completion/values.js +1 -1
- package/dist/commands/computer-use/audio.d.ts +1 -0
- package/dist/commands/computer-use/audio.js +1 -0
- package/dist/commands/computer-use/browser.d.ts +1 -0
- package/dist/commands/computer-use/browser.js +1 -0
- package/dist/commands/computer-use/disable.d.ts +1 -0
- package/dist/commands/computer-use/disable.js +1 -0
- package/dist/commands/computer-use/enable.d.ts +1 -0
- package/dist/commands/computer-use/enable.js +1 -0
- package/dist/commands/computer-use/index.d.ts +1 -0
- package/dist/commands/computer-use/index.js +1 -0
- package/dist/commands/computer-use/install.d.ts +1 -0
- package/dist/commands/computer-use/install.js +1 -0
- package/dist/commands/computer-use/recover.d.ts +1 -0
- package/dist/commands/computer-use/recover.js +1 -0
- package/dist/commands/computer-use/status.d.ts +1 -0
- package/dist/commands/computer-use/status.js +1 -0
- package/dist/commands/computer-use/stop.d.ts +1 -0
- package/dist/commands/computer-use/stop.js +1 -0
- package/dist/commands/context.js +16 -11
- package/dist/commands/convos/recovery.js +1 -1
- package/dist/commands/daemon/diagnostics.d.ts +9 -0
- package/dist/commands/daemon/diagnostics.js +53 -0
- package/dist/commands/daemon/index.js +2 -0
- package/dist/commands/daemon/maintenance/attest.d.ts +15 -0
- package/dist/commands/daemon/maintenance/attest.js +52 -0
- package/dist/commands/daemon/maintenance/hold.d.ts +17 -0
- package/dist/commands/daemon/maintenance/hold.js +70 -0
- package/dist/commands/daemon/maintenance/index.d.ts +12 -0
- package/dist/commands/daemon/maintenance/index.js +30 -0
- package/dist/commands/daemon/maintenance/resume.d.ts +13 -0
- package/dist/commands/daemon/maintenance/resume.js +36 -0
- package/dist/commands/daemon/maintenance/status.d.ts +13 -0
- package/dist/commands/daemon/maintenance/status.js +36 -0
- package/dist/commands/doctor.d.ts +4 -1
- package/dist/commands/doctor.js +50 -6
- package/dist/commands/followups/plans/cancel-batch.js +6 -3
- package/dist/commands/followups/plans/capacity.js +7 -3
- package/dist/commands/followups/plans/observability.js +11 -3
- package/dist/commands/followups/plans/preferences/set.js +26 -8
- package/dist/commands/followups/plans/preferences.js +1 -1
- package/dist/commands/followups/plans/show.js +1 -1
- package/dist/commands/goals/key-results/assess.d.ts +36 -0
- package/dist/commands/goals/key-results/assess.js +110 -0
- package/dist/commands/goals/key-results/history.d.ts +30 -0
- package/dist/commands/goals/key-results/history.js +104 -0
- package/dist/commands/goals/key-results/list.d.ts +5 -4
- package/dist/commands/goals/key-results/list.js +12 -6
- package/dist/commands/goals/key-results/show.d.ts +4 -2
- package/dist/commands/goals/key-results/show.js +25 -4
- package/dist/commands/goals/key-results/update.d.ts +4 -0
- package/dist/commands/goals/key-results/update.js +18 -24
- package/dist/commands/goals/plan-now.js +12 -1
- package/dist/commands/goals/planner-compare.d.ts +30 -0
- package/dist/commands/goals/planner-compare.js +136 -0
- package/dist/commands/machines/dedicated/service/exec.d.ts +3 -0
- package/dist/commands/machines/dedicated/service/exec.js +70 -11
- package/dist/commands/machines/hosted/destroy.d.ts +1 -0
- package/dist/commands/machines/hosted/destroy.js +11 -1
- package/dist/commands/machines/hosted/exec.d.ts +1 -0
- package/dist/commands/machines/hosted/exec.js +12 -1
- package/dist/commands/machines/hosted/index.js +1 -0
- package/dist/commands/machines/hosted/operation.d.ts +14 -0
- package/dist/commands/machines/hosted/operation.js +51 -0
- package/dist/commands/machines/hosted/pull.js +1 -1
- package/dist/commands/machines/hosted/start.js +6 -2
- package/dist/commands/search/agents.js +5 -1
- package/dist/commands/search/all.js +74 -22
- package/dist/commands/search/skills.d.ts +1 -0
- package/dist/commands/search/skills.js +12 -1
- package/dist/commands/search/spaces.d.ts +8 -1
- package/dist/commands/search/spaces.js +50 -12
- package/dist/commands/search/tasks.d.ts +13 -2
- package/dist/commands/search/tasks.js +78 -14
- package/dist/commands/search/teams.js +5 -1
- package/dist/commands/search/workspace.d.ts +19 -0
- package/dist/commands/search/workspace.js +126 -0
- package/dist/commands/skills/browse.d.ts +1 -0
- package/dist/commands/skills/browse.js +8 -1
- package/dist/commands/skills/search.d.ts +1 -0
- package/dist/commands/skills/search.js +12 -1
- package/dist/commands/spaces/auto-executor/compare.d.ts +18 -0
- package/dist/commands/spaces/auto-executor/compare.js +139 -0
- package/dist/commands/spaces/auto-executor/runs.d.ts +3 -0
- package/dist/commands/spaces/auto-executor/runs.js +13 -1
- package/dist/commands/spaces/charter/create-from-description.d.ts +21 -0
- package/dist/commands/spaces/charter/create-from-description.js +77 -0
- package/dist/commands/spaces/charter/show.d.ts +22 -0
- package/dist/commands/spaces/charter/show.js +61 -0
- package/dist/commands/spaces/heartbeats/list.d.ts +1 -16
- package/dist/commands/spaces/heartbeats/list.js +13 -0
- package/dist/commands/spaces/install-template.js +3 -0
- package/dist/commands/spaces/list.d.ts +1 -0
- package/dist/commands/spaces/list.js +12 -3
- package/dist/commands/spaces/loops/migrate.d.ts +32 -0
- package/dist/commands/spaces/loops/migrate.js +103 -0
- package/dist/commands/spaces/loops/release.d.ts +14 -0
- package/dist/commands/spaces/loops/release.js +59 -0
- package/dist/commands/spaces/notebook.d.ts +25 -0
- package/dist/commands/spaces/notebook.js +75 -0
- package/dist/commands/spaces/proposals/discard.d.ts +17 -0
- package/dist/commands/spaces/proposals/discard.js +17 -0
- package/dist/commands/spaces/proposals/keep.d.ts +17 -0
- package/dist/commands/spaces/proposals/keep.js +17 -0
- package/dist/commands/spaces/proposals/list.d.ts +24 -0
- package/dist/commands/spaces/proposals/list.js +89 -0
- package/dist/commands/spaces/search.d.ts +1 -0
- package/dist/commands/spaces/search.js +9 -0
- package/dist/commands/spaces/skills/propose.d.ts +29 -0
- package/dist/commands/spaces/skills/propose.js +82 -0
- package/dist/commands/spaces/templates/fork.js +3 -0
- package/dist/commands/spaces/triggers/show.js +6 -0
- package/dist/commands/spaces/workflows/retry.d.ts +1 -0
- package/dist/commands/spaces/workflows/retry.js +8 -1
- package/dist/commands/spaces/workflows/triggers/create.js +3 -2
- package/dist/commands/spaces/workflows/triggers/fire.js +4 -0
- package/dist/commands/spaces/workflows/triggers/update.js +2 -1
- package/dist/commands/spaces/write-policy/set.d.ts +22 -0
- package/dist/commands/spaces/write-policy/set.js +82 -0
- package/dist/commands/spaces/write-policy/show.d.ts +19 -0
- package/dist/commands/spaces/write-policy/show.js +49 -0
- package/dist/commands/store/artifacts/receipt.d.ts +14 -0
- package/dist/commands/store/artifacts/receipt.js +34 -0
- package/dist/commands/store/artifacts/release.d.ts +2 -0
- package/dist/commands/store/artifacts/release.js +11 -0
- package/dist/commands/store/governance/publish-release.d.ts +2 -0
- package/dist/commands/store/governance/publish-release.js +30 -1
- package/dist/commands/store/governance/release-receipt.d.ts +12 -0
- package/dist/commands/store/governance/release-receipt.js +32 -0
- package/dist/commands/tasks/approvals/list.d.ts +11 -5
- package/dist/commands/tasks/approvals/list.js +13 -6
- package/dist/commands/tasks/attachments/facts.d.ts +12 -0
- package/dist/commands/tasks/attachments/facts.js +29 -0
- package/dist/commands/tasks/attachments/upload.d.ts +1 -0
- package/dist/commands/tasks/attachments/upload.js +16 -0
- package/dist/commands/tasks/bulk-update.js +35 -1
- package/dist/commands/tasks/context.d.ts +15 -0
- package/dist/commands/tasks/context.js +69 -0
- package/dist/commands/tasks/copy.d.ts +18 -0
- package/dist/commands/tasks/copy.js +85 -0
- package/dist/commands/tasks/create-tree.js +97 -23
- package/dist/commands/tasks/create.js +9 -1
- package/dist/commands/tasks/deliverable/add.js +20 -10
- package/dist/commands/tasks/move.js +8 -1
- package/dist/commands/tasks/operations/show.d.ts +16 -0
- package/dist/commands/tasks/operations/show.js +98 -0
- package/dist/commands/tasks/operations/wait.d.ts +22 -0
- package/dist/commands/tasks/operations/wait.js +114 -0
- package/dist/commands/tasks/preflight.d.ts +1 -0
- package/dist/commands/tasks/preflight.js +11 -1
- package/dist/commands/tasks/rearm-recurrence.js +4 -0
- package/dist/commands/tasks/result/show.js +22 -0
- package/dist/commands/tasks/result/submit.d.ts +1 -0
- package/dist/commands/tasks/result/submit.js +3 -0
- package/dist/commands/tasks/retry-receipt.d.ts +15 -0
- package/dist/commands/tasks/retry-receipt.js +89 -0
- package/dist/commands/tasks/retry-review.d.ts +16 -0
- package/dist/commands/tasks/retry-review.js +66 -0
- package/dist/commands/tasks/retry.d.ts +4 -8
- package/dist/commands/tasks/retry.js +34 -68
- package/dist/commands/tasks/runs.d.ts +21 -0
- package/dist/commands/tasks/runs.js +95 -0
- package/dist/commands/tasks/search.d.ts +1 -0
- package/dist/commands/tasks/search.js +9 -0
- package/dist/commands/tasks/show.d.ts +2 -0
- package/dist/commands/tasks/show.js +15 -1
- package/dist/commands/tasks/start-receipt.d.ts +15 -0
- package/dist/commands/tasks/start-receipt.js +95 -0
- package/dist/commands/tasks/start.d.ts +4 -0
- package/dist/commands/tasks/start.js +49 -3
- package/dist/commands/tasks/update.js +3 -0
- package/dist/commands/tasks/upsert.js +17 -3
- package/dist/commands/tasks/watch.d.ts +3 -0
- package/dist/commands/tasks/watch.js +85 -20
- package/dist/commands/wiki/history.d.ts +33 -0
- package/dist/commands/wiki/history.js +134 -0
- package/dist/commands/wiki/ls.d.ts +2 -0
- package/dist/commands/wiki/ls.js +8 -0
- package/dist/commands/wiki/update.d.ts +3 -1
- package/dist/commands/wiki/update.js +24 -2
- package/dist/commands/wiki/write.d.ts +22 -0
- package/dist/commands/wiki/write.js +144 -6
- package/dist/generated/agent-guides.json +81 -81
- package/dist/generated/managed-instruction-guides.json +1 -1
- package/dist/lib/agent-guides.d.ts +9 -0
- package/dist/lib/agent-guides.js +23 -1
- package/dist/lib/agentic-stream.d.ts +5 -0
- package/dist/lib/agentic-stream.js +122 -3
- package/dist/lib/api-error-reason.d.ts +2 -0
- package/dist/lib/api-error-reason.js +14 -0
- package/dist/lib/api-fetch.js +3 -0
- package/dist/lib/auth-diagnostics.d.ts +39 -0
- package/dist/lib/auth-diagnostics.js +71 -0
- package/dist/lib/cli-client-identity.d.ts +6 -0
- package/dist/lib/cli-client-identity.js +16 -0
- package/dist/lib/cli-installation-diagnostics.d.ts +52 -0
- package/dist/lib/cli-installation-diagnostics.js +254 -0
- package/dist/lib/command-hygiene.d.ts +45 -0
- package/dist/lib/command-hygiene.js +413 -0
- package/dist/lib/commitments.d.ts +64 -3
- package/dist/lib/commitments.js +34 -6
- package/dist/lib/completion-index.d.ts +16 -4
- package/dist/lib/completion-index.js +50 -14
- package/dist/lib/config.js +7 -1
- package/dist/lib/daemon-maintenance-command.d.ts +22 -0
- package/dist/lib/daemon-maintenance-command.js +39 -0
- package/dist/lib/daemon-maintenance.d.ts +275 -0
- package/dist/lib/daemon-maintenance.js +1035 -0
- package/dist/lib/dedicated-service.d.ts +3 -2
- package/dist/lib/dedicated-service.js +11 -3
- package/dist/lib/governed-store.d.ts +8 -0
- package/dist/lib/governed-store.js +5 -0
- package/dist/lib/hosted-machines.d.ts +33 -2
- package/dist/lib/hosted-machines.js +19 -1
- package/dist/lib/json-output.d.ts +1 -1
- package/dist/lib/machines.d.ts +9 -1
- package/dist/lib/machines.js +15 -1
- package/dist/lib/node-adapter.js +13 -0
- package/dist/lib/record-output.d.ts +22 -0
- package/dist/lib/record-output.js +78 -0
- package/dist/lib/roles.d.ts +3 -3
- package/dist/lib/scoped-memory-command.d.ts +18 -0
- package/dist/lib/scoped-memory-command.js +53 -2
- package/dist/lib/search-display.d.ts +7 -0
- package/dist/lib/search-display.js +31 -0
- package/dist/lib/skill-store-pagination.d.ts +8 -0
- package/dist/lib/skill-store-pagination.js +35 -0
- package/dist/lib/space-charter.d.ts +49 -0
- package/dist/lib/space-charter.js +78 -0
- package/dist/lib/space-loop-migration.d.ts +18 -0
- package/dist/lib/space-loop-migration.js +128 -0
- package/dist/lib/space-notebook.d.ts +22 -0
- package/dist/lib/space-notebook.js +140 -0
- package/dist/lib/space-proposal-decision-command.d.ts +36 -0
- package/dist/lib/space-proposal-decision-command.js +108 -0
- package/dist/lib/space-proposals.d.ts +44 -0
- package/dist/lib/space-proposals.js +186 -0
- package/dist/lib/space-templates.d.ts +8 -0
- package/dist/lib/space-templates.js +17 -0
- package/dist/lib/space-write-policy.d.ts +24 -0
- package/dist/lib/space-write-policy.js +103 -0
- package/dist/lib/task-agent-context-capabilities.d.ts +10 -0
- package/dist/lib/task-agent-context-capabilities.js +22 -0
- package/dist/lib/task-agent-context-compatibility.d.ts +9 -0
- package/dist/lib/task-agent-context-compatibility.js +30 -0
- package/dist/lib/task-asset-upload.d.ts +22 -0
- package/dist/lib/task-asset-upload.js +257 -29
- package/dist/lib/task-batch.d.ts +15 -1
- package/dist/lib/task-batch.js +35 -2
- package/dist/lib/task-operation-watch.d.ts +66 -0
- package/dist/lib/task-operation-watch.js +159 -0
- package/dist/lib/task-resolver.d.ts +1 -1
- package/dist/lib/task-resolver.js +4 -3
- package/dist/lib/task-work.d.ts +1 -1
- package/dist/lib/task-work.js +35 -1
- package/dist/lib/task-write-attribution.d.ts +14 -0
- package/dist/lib/task-write-attribution.js +35 -2
- package/dist/lib/triggers.d.ts +11 -0
- package/dist/lib/triggers.js +7 -0
- package/dist/lib/wiki-update.d.ts +1 -0
- package/dist/lib/wiki-update.js +10 -1
- package/dist/lib/wiki.js +4 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +31 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.d.ts +10 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/credentialEnvelopeBridge.js +147 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.d.ts +20 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonConsentProof.js +72 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +13 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.d.ts +21 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/desktopDaemonProof.js +96 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.d.ts +2 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/deviceIdentityBridge.js +102 -20
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/guidedUpdate.js +315 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.d.ts +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineReservation.js +161 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.d.ts +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/independentMachineScopes.js +41 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +15 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/kek/macos.js +20 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/maintenanceReportWire.js +262 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +106 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +9 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +32 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.d.ts +10 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/credentialEnvelopeBridge.js +172 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.d.ts +20 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonConsentProof.js +43 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +1 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +33 -14
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.d.ts +21 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/desktopDaemonProof.js +62 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.d.ts +2 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/deviceIdentityBridge.js +133 -25
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.d.ts +370 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/guidedUpdate.js +404 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.d.ts +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineReservation.js +132 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.d.ts +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/independentMachineScopes.js +15 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/kek/macos.js +28 -15
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.d.ts +178 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/maintenanceReportWire.js +342 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +51 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +138 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +51 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +27181 -20293
- package/oclif.manifest.json +5745 -1813
- package/package.json +20 -2
|
@@ -44,6 +44,13 @@ export const TOOL_APPROVAL_SIGNED_CAPABILITY = 'tool_approval_signed_v1';
|
|
|
44
44
|
*/
|
|
45
45
|
const ATTESTATION_SIGNING_DOMAIN = 'skrr-tool-approval-v2\n';
|
|
46
46
|
const KEYSET_SIGNING_DOMAIN = 'skrr-tool-approval-keyset-v1\n';
|
|
47
|
+
/**
|
|
48
|
+
* A distinct domain for the local personal-data executor. A tool approval is
|
|
49
|
+
* a user's decision about one action; an executor lease is evidence that the
|
|
50
|
+
* platform authenticated one particular trusted local process. Neither
|
|
51
|
+
* signature can be substituted for the other.
|
|
52
|
+
*/
|
|
53
|
+
const PERSONAL_DATA_EXECUTOR_LEASE_SIGNING_DOMAIN = 'skrr-personal-data-executor-lease-v1\n';
|
|
47
54
|
/** A key id: short, printable, and safe to put in a log line. */
|
|
48
55
|
const KID_PATTERN = /^[A-Za-z0-9._-]{1,64}$/;
|
|
49
56
|
/** Bounds on untrusted wire input, so a hostile document cannot cost much. */
|
|
@@ -51,6 +58,11 @@ const MAX_PAYLOAD_BYTES = 4096;
|
|
|
51
58
|
const MAX_KEYSET_BYTES = 16 * 1024;
|
|
52
59
|
const MAX_KEYSET_KEYS = 16;
|
|
53
60
|
const MAX_KEYSET_SIGNATURES = 16;
|
|
61
|
+
const MAX_EXECUTOR_LEASE_CAPABILITIES = 8;
|
|
62
|
+
const MAX_EXECUTOR_LEASE_TTL_MS = 5 * 60 * 1000;
|
|
63
|
+
const EXECUTOR_LEASE_CLOCK_SKEW_MS = 30_000;
|
|
64
|
+
const EXECUTOR_LEASE_ID_PATTERN = /^[A-Za-z0-9_-]{16,128}$/;
|
|
65
|
+
const EXECUTOR_CAPABILITY_PATTERN = /^[a-z0-9_.:-]{1,128}$/;
|
|
54
66
|
/** Derive the wire public key from a private (or public) Ed25519 KeyObject. */
|
|
55
67
|
export function approvalPublicKeyFromKeyObject(kid, key) {
|
|
56
68
|
const publicKey = key.type === 'private' ? createPublicKey(key) : key;
|
|
@@ -86,6 +98,24 @@ function verifySignature(domain, message, sigB64, key) {
|
|
|
86
98
|
function signMessage(domain, message, privateKey) {
|
|
87
99
|
return signEd25519(null, Buffer.from(domain + message, 'utf8'), privateKey).toString('base64');
|
|
88
100
|
}
|
|
101
|
+
function isExecutorLeaseId(value) {
|
|
102
|
+
return typeof value === 'string' && EXECUTOR_LEASE_ID_PATTERN.test(value);
|
|
103
|
+
}
|
|
104
|
+
function isExecutorLeaseText(value, max = 128) {
|
|
105
|
+
return typeof value === 'string' && value.length > 0 && value.length <= max && !/[\u0000-\u001f]/.test(value);
|
|
106
|
+
}
|
|
107
|
+
function canonicalExecutorCapabilities(value) {
|
|
108
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > MAX_EXECUTOR_LEASE_CAPABILITIES) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const capabilities = value.map((entry) => typeof entry === 'string' ? entry : '');
|
|
112
|
+
if (capabilities.some((entry) => !EXECUTOR_CAPABILITY_PATTERN.test(entry)))
|
|
113
|
+
return null;
|
|
114
|
+
const sorted = [...capabilities].sort();
|
|
115
|
+
if (new Set(sorted).size !== sorted.length)
|
|
116
|
+
return null;
|
|
117
|
+
return sorted;
|
|
118
|
+
}
|
|
89
119
|
/** Code-unit order: the same on every runtime, unlike `localeCompare`. */
|
|
90
120
|
function compareKid(a, b) {
|
|
91
121
|
if (a === b)
|
|
@@ -255,6 +285,114 @@ export function signToolApproval(args) {
|
|
|
255
285
|
sig: signMessage(ATTESTATION_SIGNING_DOMAIN, text, args.signer.privateKey),
|
|
256
286
|
};
|
|
257
287
|
}
|
|
288
|
+
/** Server-side mint. The caller must authorize the requesting user separately. */
|
|
289
|
+
export function signPersonalDataExecutorLease(args) {
|
|
290
|
+
const capabilities = canonicalExecutorCapabilities(args.capabilities);
|
|
291
|
+
const ttlMs = args.ttlMs ?? MAX_EXECUTOR_LEASE_TTL_MS;
|
|
292
|
+
const now = args.now ?? Date.now();
|
|
293
|
+
if (!isExecutorLeaseId(args.leaseId) ||
|
|
294
|
+
!isExecutorLeaseText(args.daemonId) ||
|
|
295
|
+
!isExecutorLeaseId(args.daemonInstanceId) ||
|
|
296
|
+
!isExecutorLeaseText(args.ownerUserId) ||
|
|
297
|
+
!capabilities ||
|
|
298
|
+
!Number.isSafeInteger(now) ||
|
|
299
|
+
!Number.isSafeInteger(ttlMs) ||
|
|
300
|
+
ttlMs <= 0 ||
|
|
301
|
+
ttlMs > MAX_EXECUTOR_LEASE_TTL_MS) {
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
const payload = {
|
|
305
|
+
v: 1,
|
|
306
|
+
leaseId: args.leaseId,
|
|
307
|
+
daemonId: args.daemonId,
|
|
308
|
+
daemonInstanceId: args.daemonInstanceId,
|
|
309
|
+
ownerUserId: args.ownerUserId,
|
|
310
|
+
capabilities,
|
|
311
|
+
issuedAt: now,
|
|
312
|
+
expiresAt: now + ttlMs,
|
|
313
|
+
};
|
|
314
|
+
const text = canonicalApprovalJson(payload);
|
|
315
|
+
return {
|
|
316
|
+
v: 1,
|
|
317
|
+
payload: text,
|
|
318
|
+
kid: args.signer.kid,
|
|
319
|
+
sig: signMessage(PERSONAL_DATA_EXECUTOR_LEASE_SIGNING_DOMAIN, text, args.signer.privateKey),
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Daemon-side verifier. It trusts the same independently pinned platform
|
|
324
|
+
* keyset as v2 tool approvals, but a separate signature domain and schema.
|
|
325
|
+
*/
|
|
326
|
+
export function verifyPersonalDataExecutorLease(lease, expected, keyset) {
|
|
327
|
+
if (lease === undefined || lease === null)
|
|
328
|
+
return { ok: false, reason: 'absent' };
|
|
329
|
+
if (!lease || typeof lease !== 'object' || Array.isArray(lease)) {
|
|
330
|
+
return { ok: false, reason: 'malformed' };
|
|
331
|
+
}
|
|
332
|
+
const wire = lease;
|
|
333
|
+
if (wire.v !== 1 ||
|
|
334
|
+
typeof wire.payload !== 'string' ||
|
|
335
|
+
wire.payload.length === 0 ||
|
|
336
|
+
wire.payload.length > MAX_PAYLOAD_BYTES ||
|
|
337
|
+
typeof wire.kid !== 'string' ||
|
|
338
|
+
typeof wire.sig !== 'string') {
|
|
339
|
+
return { ok: false, reason: 'malformed' };
|
|
340
|
+
}
|
|
341
|
+
const pinnedKey = keyset.keys.find((key) => key.kid === wire.kid);
|
|
342
|
+
const key = pinnedKey ? ed25519PublicKey(pinnedKey.publicKeySpkiB64) : null;
|
|
343
|
+
if (!key)
|
|
344
|
+
return { ok: false, reason: 'unknown_key' };
|
|
345
|
+
if (!verifySignature(PERSONAL_DATA_EXECUTOR_LEASE_SIGNING_DOMAIN, wire.payload, wire.sig, key)) {
|
|
346
|
+
return { ok: false, reason: 'signature' };
|
|
347
|
+
}
|
|
348
|
+
let parsed;
|
|
349
|
+
try {
|
|
350
|
+
parsed = JSON.parse(wire.payload);
|
|
351
|
+
}
|
|
352
|
+
catch {
|
|
353
|
+
return { ok: false, reason: 'malformed' };
|
|
354
|
+
}
|
|
355
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
356
|
+
return { ok: false, reason: 'malformed' };
|
|
357
|
+
}
|
|
358
|
+
const payload = parsed;
|
|
359
|
+
const issuedAt = payload.issuedAt;
|
|
360
|
+
const expiresAt = payload.expiresAt;
|
|
361
|
+
const capabilities = canonicalExecutorCapabilities(payload.capabilities);
|
|
362
|
+
if (payload.v !== 1 ||
|
|
363
|
+
!isExecutorLeaseId(payload.leaseId) ||
|
|
364
|
+
!isExecutorLeaseText(payload.daemonId) ||
|
|
365
|
+
!isExecutorLeaseId(payload.daemonInstanceId) ||
|
|
366
|
+
!isExecutorLeaseText(payload.ownerUserId) ||
|
|
367
|
+
!capabilities ||
|
|
368
|
+
typeof issuedAt !== 'number' ||
|
|
369
|
+
typeof expiresAt !== 'number' ||
|
|
370
|
+
!Number.isSafeInteger(issuedAt) ||
|
|
371
|
+
!Number.isSafeInteger(expiresAt)) {
|
|
372
|
+
return { ok: false, reason: 'malformed' };
|
|
373
|
+
}
|
|
374
|
+
const expectedCapabilities = canonicalExecutorCapabilities(expected.capabilities);
|
|
375
|
+
if (!expectedCapabilities || capabilities.join('\u0000') !== expectedCapabilities.join('\u0000')) {
|
|
376
|
+
return { ok: false, reason: 'capabilities' };
|
|
377
|
+
}
|
|
378
|
+
if (payload.daemonId !== expected.daemonId || payload.daemonInstanceId !== expected.daemonInstanceId) {
|
|
379
|
+
return { ok: false, reason: 'daemon_binding' };
|
|
380
|
+
}
|
|
381
|
+
const now = expected.now ?? Date.now();
|
|
382
|
+
if (expiresAt <= issuedAt ||
|
|
383
|
+
expiresAt - issuedAt > MAX_EXECUTOR_LEASE_TTL_MS ||
|
|
384
|
+
issuedAt > now + EXECUTOR_LEASE_CLOCK_SKEW_MS) {
|
|
385
|
+
return { ok: false, reason: 'window' };
|
|
386
|
+
}
|
|
387
|
+
if (expiresAt <= now)
|
|
388
|
+
return { ok: false, reason: 'expired' };
|
|
389
|
+
return {
|
|
390
|
+
ok: true,
|
|
391
|
+
leaseId: payload.leaseId,
|
|
392
|
+
ownerUserId: payload.ownerUserId,
|
|
393
|
+
expiresAt,
|
|
394
|
+
};
|
|
395
|
+
}
|
|
258
396
|
/**
|
|
259
397
|
* Daemon side: verify a v2 attestation against the pinned keyset and the call.
|
|
260
398
|
* Order matters: nothing in the payload is READ until the signature verified
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skrr-ai/auth-core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"types": "dist/esm/index.d.ts",
|
|
6
6
|
"exports": {
|
|
7
|
+
"./desktop-daemon-proof": {
|
|
8
|
+
"import": {
|
|
9
|
+
"types": "./dist/esm/desktopDaemonProof.d.ts",
|
|
10
|
+
"default": "./dist/esm/desktopDaemonProof.js"
|
|
11
|
+
},
|
|
12
|
+
"require": {
|
|
13
|
+
"types": "./dist/cjs/desktopDaemonProof.d.ts",
|
|
14
|
+
"default": "./dist/cjs/desktopDaemonProof.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"./independent-machine-scopes": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/esm/independentMachineScopes.d.ts",
|
|
20
|
+
"default": "./dist/esm/independentMachineScopes.js"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./dist/cjs/independentMachineScopes.d.ts",
|
|
24
|
+
"default": "./dist/cjs/independentMachineScopes.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
7
27
|
".": {
|
|
8
28
|
"import": {
|
|
9
29
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -114,6 +134,16 @@
|
|
|
114
134
|
"default": "./dist/cjs/dedicatedRuntimeBusyWire.js"
|
|
115
135
|
}
|
|
116
136
|
},
|
|
137
|
+
"./maintenance-report-wire": {
|
|
138
|
+
"import": {
|
|
139
|
+
"types": "./dist/esm/maintenanceReportWire.d.ts",
|
|
140
|
+
"default": "./dist/esm/maintenanceReportWire.js"
|
|
141
|
+
},
|
|
142
|
+
"require": {
|
|
143
|
+
"types": "./dist/cjs/maintenanceReportWire.d.ts",
|
|
144
|
+
"default": "./dist/cjs/maintenanceReportWire.js"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
117
147
|
"./computer-wire": {
|
|
118
148
|
"import": {
|
|
119
149
|
"types": "./dist/esm/computerWire.d.ts",
|
|
@@ -264,6 +294,26 @@
|
|
|
264
294
|
"default": "./dist/cjs/restartArtifact.js"
|
|
265
295
|
}
|
|
266
296
|
},
|
|
297
|
+
"./daemon-consent-proof": {
|
|
298
|
+
"import": {
|
|
299
|
+
"types": "./dist/esm/daemonConsentProof.d.ts",
|
|
300
|
+
"default": "./dist/esm/daemonConsentProof.js"
|
|
301
|
+
},
|
|
302
|
+
"require": {
|
|
303
|
+
"types": "./dist/cjs/daemonConsentProof.d.ts",
|
|
304
|
+
"default": "./dist/cjs/daemonConsentProof.js"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"./guided-update": {
|
|
308
|
+
"import": {
|
|
309
|
+
"types": "./dist/esm/guidedUpdate.d.ts",
|
|
310
|
+
"default": "./dist/esm/guidedUpdate.js"
|
|
311
|
+
},
|
|
312
|
+
"require": {
|
|
313
|
+
"types": "./dist/cjs/guidedUpdate.d.ts",
|
|
314
|
+
"default": "./dist/cjs/guidedUpdate.js"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
267
317
|
"./tool-operation-outcome": {
|
|
268
318
|
"import": {
|
|
269
319
|
"types": "./dist/esm/toolOperationOutcome.d.ts",
|