@intentic/sandbox-contract 1.431.0 → 1.433.0
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 +25 -3
- package/dist/briefs/agent-ask.d.ts +10 -0
- package/dist/briefs/agent-ask.d.ts.map +1 -0
- package/dist/briefs/agent-ask.js +2 -0
- package/dist/briefs/agent-ask.js.map +1 -0
- package/dist/{chores/extension-update.d.ts → briefs/extension-update-brief.d.ts} +1 -1
- package/dist/briefs/extension-update-brief.d.ts.map +1 -0
- package/dist/{chores/extension-update.js → briefs/extension-update-brief.js} +2 -2
- package/dist/briefs/extension-update-brief.js.map +1 -0
- package/dist/chores/digest.d.ts.map +1 -1
- package/dist/chores/digest.js.map +1 -1
- package/dist/chores/index.d.ts +2 -2
- package/dist/chores/index.d.ts.map +1 -1
- package/dist/chores/index.js +1 -1
- package/dist/chores/index.js.map +1 -1
- package/dist/chores/prompt.d.ts +1 -9
- package/dist/chores/prompt.d.ts.map +1 -1
- package/dist/chores/prompt.js +1 -1
- package/dist/chores/prompt.js.map +1 -1
- package/dist/chores/stack.d.ts.map +1 -1
- package/dist/chores/stack.js.map +1 -1
- package/dist/chores/verdict.d.ts.map +1 -1
- package/dist/chores/verdict.js.map +1 -1
- package/dist/chores/workspace-scope.d.ts +1 -3
- package/dist/chores/workspace-scope.d.ts.map +1 -1
- package/dist/chores/workspace-scope.js +1 -3
- package/dist/chores/workspace-scope.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1049 -12
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +358 -4
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/approvals.contract.d.ts +35 -0
- package/dist/contracts/approvals.contract.d.ts.map +1 -1
- package/dist/contracts/approvals.contract.js +13 -3
- package/dist/contracts/approvals.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +60 -8
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +40 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +21 -0
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/ci.contract.d.ts +222 -95
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/ci.contract.js +87 -26
- package/dist/contracts/ci.contract.js.map +1 -1
- package/dist/contracts/device-stacks.contract.d.ts +129 -0
- package/dist/contracts/device-stacks.contract.d.ts.map +1 -0
- package/dist/contracts/device-stacks.contract.js +66 -0
- package/dist/contracts/device-stacks.contract.js.map +1 -0
- package/dist/contracts/device.contract.d.ts +47 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +607 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +10 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/needs.contract.d.ts +887 -18
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/offload.contract.d.ts +21 -0
- package/dist/contracts/offload.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +653 -40
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/seal.contract.d.ts +20 -0
- package/dist/contracts/seal.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +15 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +21 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +133 -2
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +73 -42
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +18 -0
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/stack-grants.contract.d.ts +440 -0
- package/dist/contracts/stack-grants.contract.d.ts.map +1 -0
- package/dist/contracts/stack-grants.contract.js +46 -0
- package/dist/contracts/stack-grants.contract.js.map +1 -0
- package/dist/contracts/system.contract.d.ts +191 -69
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +12 -42
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/workspace.contract.d.ts +0 -55
- package/dist/contracts/workspace.contract.d.ts.map +1 -1
- package/dist/contracts/workspace.contract.js +0 -19
- package/dist/contracts/workspace.contract.js.map +1 -1
- package/dist/events/agent-events.d.ts +509 -8
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-transcript.d.ts +133 -2
- package/dist/events/agent-transcript.d.ts.map +1 -1
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +2 -1
- package/dist/events/agent-words.js.map +1 -1
- package/dist/events/child-news.d.ts +32 -0
- package/dist/events/child-news.d.ts.map +1 -0
- package/dist/events/child-news.js +171 -0
- package/dist/events/child-news.js.map +1 -0
- package/dist/events/prompt-origins.d.ts +42 -0
- package/dist/events/prompt-origins.d.ts.map +1 -1
- package/dist/events/prompt-origins.js +28 -0
- package/dist/events/prompt-origins.js.map +1 -1
- package/dist/events/requests.d.ts +14 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +12 -0
- package/dist/events/requests.js.map +1 -1
- package/dist/events/system-events.d.ts +16 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +669 -10
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +2 -1
- package/dist/events/transcript.js.map +1 -1
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/models/model-roles.d.ts +91 -37
- package/dist/models/model-roles.d.ts.map +1 -1
- package/dist/models/model-roles.js +106 -35
- package/dist/models/model-roles.js.map +1 -1
- package/dist/models/model-setups.d.ts +10 -8
- package/dist/models/model-setups.d.ts.map +1 -1
- package/dist/models/model-setups.js +15 -15
- package/dist/models/model-setups.js.map +1 -1
- package/dist/policy/approvals-execution.d.ts +5 -2
- package/dist/policy/approvals-execution.d.ts.map +1 -1
- package/dist/policy/approvals-execution.js +3 -4
- package/dist/policy/approvals-execution.js.map +1 -1
- package/dist/policy/batch-runs.d.ts +1 -1
- package/dist/policy/batch-runs.d.ts.map +1 -1
- package/dist/policy/batch-runs.js +2 -1
- package/dist/policy/batch-runs.js.map +1 -1
- package/dist/policy/message-limits.d.ts.map +1 -1
- package/dist/policy/message-limits.js.map +1 -1
- package/dist/policy/org-locks.d.ts +1 -1
- package/dist/policy/org-locks.d.ts.map +1 -1
- package/dist/policy/org-locks.js +1 -0
- package/dist/policy/org-locks.js.map +1 -1
- package/dist/policy/shell/workspace-root-exclude.d.ts +4 -0
- package/dist/policy/shell/workspace-root-exclude.d.ts.map +1 -0
- package/dist/policy/shell/workspace-root-exclude.js +4 -0
- package/dist/policy/shell/workspace-root-exclude.js.map +1 -0
- package/dist/protocol/doors/listener-protocol.d.ts +7 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +1 -0
- package/dist/protocol/doors/listener-protocol.js.map +1 -1
- package/dist/protocol/doors/webext-links.d.ts.map +1 -1
- package/dist/protocol/doors/webext-links.js.map +1 -1
- package/dist/protocol/raw/extension-protocol.d.ts +634 -0
- package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
- package/dist/protocol/raw/extension-protocol.js +292 -0
- package/dist/protocol/raw/extension-protocol.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +3034 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +39 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +260 -1
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +57 -1
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/protocol/s2s/address.d.ts +53 -0
- package/dist/protocol/s2s/address.d.ts.map +1 -0
- package/dist/protocol/s2s/address.js +111 -0
- package/dist/protocol/s2s/address.js.map +1 -0
- package/dist/protocol/s2s/attestation.d.ts +41 -0
- package/dist/protocol/s2s/attestation.d.ts.map +1 -0
- package/dist/protocol/s2s/attestation.js +96 -0
- package/dist/protocol/s2s/attestation.js.map +1 -0
- package/dist/protocol/s2s/canonical.d.ts +10 -0
- package/dist/protocol/s2s/canonical.d.ts.map +1 -0
- package/dist/protocol/s2s/canonical.js +94 -0
- package/dist/protocol/s2s/canonical.js.map +1 -0
- package/dist/protocol/s2s/envelope.d.ts +40 -0
- package/dist/protocol/s2s/envelope.d.ts.map +1 -0
- package/dist/protocol/s2s/envelope.js +116 -0
- package/dist/protocol/s2s/envelope.js.map +1 -0
- package/dist/protocol/s2s/extension-sign.d.ts +21 -0
- package/dist/protocol/s2s/extension-sign.d.ts.map +1 -0
- package/dist/protocol/s2s/extension-sign.js +41 -0
- package/dist/protocol/s2s/extension-sign.js.map +1 -0
- package/dist/protocol/s2s/identity-doc.d.ts +50 -0
- package/dist/protocol/s2s/identity-doc.d.ts.map +1 -0
- package/dist/protocol/s2s/identity-doc.js +89 -0
- package/dist/protocol/s2s/identity-doc.js.map +1 -0
- package/dist/protocol/s2s/index.d.ts +12 -0
- package/dist/protocol/s2s/index.d.ts.map +1 -0
- package/dist/protocol/s2s/index.js +12 -0
- package/dist/protocol/s2s/index.js.map +1 -0
- package/dist/protocol/s2s/kem.d.ts +15 -0
- package/dist/protocol/s2s/kem.d.ts.map +1 -0
- package/dist/protocol/s2s/kem.js +34 -0
- package/dist/protocol/s2s/kem.js.map +1 -0
- package/dist/protocol/s2s/keys.d.ts +34 -0
- package/dist/protocol/s2s/keys.d.ts.map +1 -0
- package/dist/protocol/s2s/keys.js +81 -0
- package/dist/protocol/s2s/keys.js.map +1 -0
- package/dist/protocol/s2s/passkey-cosign.d.ts +44 -0
- package/dist/protocol/s2s/passkey-cosign.d.ts.map +1 -0
- package/dist/protocol/s2s/passkey-cosign.js +139 -0
- package/dist/protocol/s2s/passkey-cosign.js.map +1 -0
- package/dist/protocol/s2s/session.d.ts +61 -0
- package/dist/protocol/s2s/session.d.ts.map +1 -0
- package/dist/protocol/s2s/session.js +98 -0
- package/dist/protocol/s2s/session.js.map +1 -0
- package/dist/protocol/s2s/sign.d.ts +12 -0
- package/dist/protocol/s2s/sign.d.ts.map +1 -0
- package/dist/protocol/s2s/sign.js +33 -0
- package/dist/protocol/s2s/sign.js.map +1 -0
- package/dist/schemas/activity.d.ts.map +1 -1
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent.d.ts +4 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +4 -2
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +8 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +16 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/approvals.d.ts +100 -0
- package/dist/schemas/approvals.d.ts.map +1 -1
- package/dist/schemas/approvals.js +21 -0
- package/dist/schemas/approvals.js.map +1 -1
- package/dist/schemas/automations.d.ts +89 -27
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +15 -33
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +1 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/ci-deployments.d.ts +30 -0
- package/dist/schemas/ci-deployments.d.ts.map +1 -0
- package/dist/schemas/ci-deployments.js +18 -0
- package/dist/schemas/ci-deployments.js.map +1 -0
- package/dist/schemas/ci.d.ts +348 -21
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +110 -19
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/command-admission.d.ts +6 -0
- package/dist/schemas/command-admission.d.ts.map +1 -1
- package/dist/schemas/command-admission.js +2 -1
- package/dist/schemas/command-admission.js.map +1 -1
- package/dist/schemas/command-run.d.ts +29 -0
- package/dist/schemas/command-run.d.ts.map +1 -0
- package/dist/schemas/command-run.js +20 -0
- package/dist/schemas/command-run.js.map +1 -0
- package/dist/schemas/contact-need.d.ts +50 -0
- package/dist/schemas/contact-need.d.ts.map +1 -0
- package/dist/schemas/contact-need.js +19 -0
- package/dist/schemas/contact-need.js.map +1 -0
- package/dist/schemas/contacts-settings.d.ts +5 -0
- package/dist/schemas/contacts-settings.d.ts.map +1 -0
- package/dist/schemas/contacts-settings.js +11 -0
- package/dist/schemas/contacts-settings.js.map +1 -0
- package/dist/schemas/data-protection.d.ts +15 -2
- package/dist/schemas/data-protection.d.ts.map +1 -1
- package/dist/schemas/data-protection.js +15 -23
- package/dist/schemas/data-protection.js.map +1 -1
- package/dist/schemas/device-stacks.d.ts +131 -0
- package/dist/schemas/device-stacks.d.ts.map +1 -1
- package/dist/schemas/device-stacks.js +81 -0
- package/dist/schemas/device-stacks.js.map +1 -1
- package/dist/schemas/devices.d.ts +73 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +6 -2
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +1192 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +18 -4
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/host-power.d.ts +22 -0
- package/dist/schemas/host-power.d.ts.map +1 -1
- package/dist/schemas/host-power.js +55 -0
- package/dist/schemas/host-power.js.map +1 -1
- package/dist/schemas/hosts.d.ts +226 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +24 -0
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +37 -249
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +10 -43
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/links.d.ts +8 -0
- package/dist/schemas/links.d.ts.map +1 -1
- package/dist/schemas/links.js +4 -0
- package/dist/schemas/links.js.map +1 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/metrics.d.ts +25 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +18 -0
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/need-kinds.d.ts +20 -0
- package/dist/schemas/need-kinds.d.ts.map +1 -0
- package/dist/schemas/need-kinds.js +7 -0
- package/dist/schemas/need-kinds.js.map +1 -0
- package/dist/schemas/needs.d.ts +666 -30
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +29 -6
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.d.ts +52 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +12 -0
- package/dist/schemas/offload.js.map +1 -1
- package/dist/schemas/outward-action.d.ts +39 -0
- package/dist/schemas/outward-action.d.ts.map +1 -0
- package/dist/schemas/outward-action.js +40 -0
- package/dist/schemas/outward-action.js.map +1 -0
- package/dist/schemas/providers/plan-limits.d.ts +1 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +1 -0
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/redirect-need.d.ts +15 -0
- package/dist/schemas/redirect-need.d.ts.map +1 -0
- package/dist/schemas/redirect-need.js +14 -0
- package/dist/schemas/redirect-need.js.map +1 -0
- package/dist/schemas/s2s-identity.d.ts +521 -0
- package/dist/schemas/s2s-identity.d.ts.map +1 -0
- package/dist/schemas/s2s-identity.js +208 -0
- package/dist/schemas/s2s-identity.js.map +1 -0
- package/dist/schemas/s2s-views.d.ts +2127 -0
- package/dist/schemas/s2s-views.d.ts.map +1 -0
- package/dist/schemas/s2s-views.js +217 -0
- package/dist/schemas/s2s-views.js.map +1 -0
- package/dist/schemas/s2s-wire.d.ts +1616 -0
- package/dist/schemas/s2s-wire.d.ts.map +1 -0
- package/dist/schemas/s2s-wire.js +276 -0
- package/dist/schemas/s2s-wire.js.map +1 -0
- package/dist/schemas/s2s.d.ts +5 -0
- package/dist/schemas/s2s.d.ts.map +1 -0
- package/dist/schemas/s2s.js +5 -0
- package/dist/schemas/s2s.js.map +1 -0
- package/dist/schemas/secrets.d.ts +17 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +12 -5
- package/dist/schemas/secrets.js.map +1 -1
- package/dist/schemas/settings-history.d.ts +1 -1
- package/dist/schemas/settings-history.d.ts.map +1 -1
- package/dist/schemas/settings-history.js +5 -4
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings-savings.d.ts +58 -0
- package/dist/schemas/settings-savings.d.ts.map +1 -1
- package/dist/schemas/settings-savings.js +22 -0
- package/dist/schemas/settings-savings.js.map +1 -1
- package/dist/schemas/settings.d.ts +18 -42
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +7 -6
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/stack-grants.d.ts +60 -0
- package/dist/schemas/stack-grants.d.ts.map +1 -0
- package/dist/schemas/stack-grants.js +33 -0
- package/dist/schemas/stack-grants.js.map +1 -0
- package/dist/schemas/terminal.d.ts +2 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +4 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/vpn.d.ts +4 -0
- package/dist/schemas/vpn.d.ts.map +1 -1
- package/dist/schemas/vpn.js +9 -0
- package/dist/schemas/vpn.js.map +1 -1
- package/dist/schemas/watch-sources.d.ts +72 -0
- package/dist/schemas/watch-sources.d.ts.map +1 -0
- package/dist/schemas/watch-sources.js +88 -0
- package/dist/schemas/watch-sources.js.map +1 -0
- package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-search.js +1 -1
- package/dist/schemas/workspace/workspace-search.js.map +1 -1
- package/dist/schemas/wsl-memory.d.ts +76 -0
- package/dist/schemas/wsl-memory.d.ts.map +1 -0
- package/dist/schemas/wsl-memory.js +36 -0
- package/dist/schemas/wsl-memory.js.map +1 -0
- package/dist/state/auth-state.d.ts.map +1 -1
- package/dist/state/auth-state.js +8 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +22 -8
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/workspace-state.d.ts +8 -3
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +8 -3
- package/dist/state/workspace-state.js.map +1 -1
- package/package.json +20 -5
- package/src/briefs/agent-ask.ts +23 -0
- package/src/{chores/extension-update.ts → briefs/extension-update-brief.ts} +3 -2
- package/src/chores/digest.ts +1 -0
- package/src/chores/index.ts +13 -2
- package/src/chores/prompt.ts +3 -18
- package/src/chores/stack.ts +1 -0
- package/src/chores/verdict.ts +1 -0
- package/src/chores/workspace-scope.ts +3 -8
- package/src/contracts/approvals.contract.ts +24 -3
- package/src/contracts/capabilities.contract.ts +24 -0
- package/src/contracts/ci.contract.ts +119 -37
- package/src/contracts/device-stacks.contract.ts +97 -0
- package/src/contracts/extensions.contract.ts +11 -0
- package/src/contracts/secrets.contract.ts +27 -0
- package/src/contracts/settings.contract.ts +24 -0
- package/src/contracts/stack-grants.contract.ts +51 -0
- package/src/contracts/system.contract.ts +16 -59
- package/src/contracts/workspace.contract.ts +0 -22
- package/src/events/agent-words.ts +3 -1
- package/src/events/child-news.test.ts +91 -0
- package/src/events/child-news.ts +269 -0
- package/src/events/prompt-origins.ts +35 -0
- package/src/events/requests.ts +18 -0
- package/src/events/transcript.ts +10 -1
- package/src/ids/conversation-ids.test.ts +22 -3
- package/src/ids/conversation-ids.ts +5 -7
- package/src/index.ts +3 -6
- package/src/models/model-roles.test.ts +61 -4
- package/src/models/model-roles.ts +153 -49
- package/src/models/model-setups.ts +49 -26
- package/src/policy/approvals-execution.ts +11 -6
- package/src/policy/batch-runs.ts +2 -2
- package/src/policy/message-limits.ts +8 -4
- package/src/policy/org-locks.ts +1 -0
- package/src/policy/shell/workspace-root-exclude.ts +11 -0
- package/src/protocol/doors/listener-protocol.ts +14 -0
- package/src/protocol/doors/webext-links.ts +3 -1
- package/src/protocol/ingress-contract.fixture.json +6 -1
- package/src/protocol/raw/extension-protocol.ts +513 -2
- package/src/protocol/raw/raw-json-routes.ts +85 -0
- package/src/protocol/raw/raw-routes.ts +111 -7
- package/src/protocol/s2s/address.test.ts +157 -0
- package/src/protocol/s2s/address.ts +193 -0
- package/src/protocol/s2s/attestation.test.ts +262 -0
- package/src/protocol/s2s/attestation.ts +173 -0
- package/src/protocol/s2s/canonical.test.ts +70 -0
- package/src/protocol/s2s/canonical.ts +119 -0
- package/src/protocol/s2s/envelope.test.ts +162 -0
- package/src/protocol/s2s/envelope.ts +194 -0
- package/src/protocol/s2s/extension-sign.test.ts +117 -0
- package/src/protocol/s2s/extension-sign.ts +76 -0
- package/src/protocol/s2s/identity-doc.test.ts +187 -0
- package/src/protocol/s2s/identity-doc.ts +169 -0
- package/src/protocol/s2s/index.ts +15 -0
- package/src/protocol/s2s/kem.ts +62 -0
- package/src/protocol/s2s/keys.test.ts +76 -0
- package/src/protocol/s2s/keys.ts +155 -0
- package/src/protocol/s2s/passkey-cosign.test.ts +98 -0
- package/src/protocol/s2s/passkey-cosign.testing.ts +86 -0
- package/src/protocol/s2s/passkey-cosign.ts +192 -0
- package/src/protocol/s2s/s2s.testing.ts +22 -0
- package/src/protocol/s2s/session.test.ts +133 -0
- package/src/protocol/s2s/session.ts +179 -0
- package/src/protocol/s2s/sign.test.ts +66 -0
- package/src/protocol/s2s/sign.ts +53 -0
- package/src/schemas/activity.ts +2 -1
- package/src/schemas/agent.test.ts +3 -0
- package/src/schemas/agent.ts +10 -4
- package/src/schemas/approvals.ts +41 -0
- package/src/schemas/automations.ts +26 -41
- package/src/schemas/ci-deployments.ts +26 -0
- package/src/schemas/ci.ts +185 -45
- package/src/schemas/command-admission.ts +4 -1
- package/src/schemas/command-run.ts +44 -0
- package/src/schemas/contact-need.ts +26 -0
- package/src/schemas/contacts-settings.ts +16 -0
- package/src/schemas/data-protection.ts +28 -34
- package/src/schemas/device-stacks.ts +162 -3
- package/src/schemas/devices.ts +13 -2
- package/src/schemas/extension-updates.ts +27 -7
- package/src/schemas/host-power.test.ts +53 -0
- package/src/schemas/host-power.ts +96 -2
- package/src/schemas/hosts.test.ts +32 -0
- package/src/schemas/hosts.ts +62 -0
- package/src/schemas/issues.ts +30 -86
- package/src/schemas/links.ts +4 -0
- package/src/schemas/maintenance.ts +4 -3
- package/src/schemas/metrics.ts +35 -0
- package/src/schemas/need-kinds.ts +13 -0
- package/src/schemas/needs.ts +44 -16
- package/src/schemas/offload.ts +31 -0
- package/src/schemas/outward-action.ts +47 -0
- package/src/schemas/providers/plan-limits.ts +1 -0
- package/src/schemas/redirect-need.ts +19 -0
- package/src/schemas/s2s-identity.ts +329 -0
- package/src/schemas/s2s-views.ts +326 -0
- package/src/schemas/s2s-wire.ts +401 -0
- package/src/schemas/s2s.test.ts +175 -0
- package/src/schemas/s2s.ts +9 -0
- package/src/schemas/secrets.ts +23 -5
- package/src/schemas/settings-history.ts +10 -5
- package/src/schemas/settings-savings.ts +29 -0
- package/src/schemas/settings.test.ts +23 -23
- package/src/schemas/settings.ts +12 -12
- package/src/schemas/stack-grants.ts +59 -0
- package/src/schemas/terminal.ts +6 -0
- package/src/schemas/version-seam.test.ts +13 -1
- package/src/schemas/vpn.ts +13 -0
- package/src/schemas/watch-sources.ts +127 -0
- package/src/schemas/workspace/workspace-search.ts +5 -2
- package/src/schemas/wsl-memory.ts +59 -0
- package/src/state/auth-state.ts +17 -0
- package/src/state/workspace-state.ts +18 -18
- package/src/text/embed.ts +2 -2
- package/dist/chores/extension-update.d.ts.map +0 -1
- package/dist/chores/extension-update.js.map +0 -1
- package/dist/contracts/chores.contract.d.ts +0 -213
- package/dist/contracts/chores.contract.d.ts.map +0 -1
- package/dist/contracts/chores.contract.js +0 -32
- package/dist/contracts/chores.contract.js.map +0 -1
- package/dist/contracts/issues.contract.d.ts +0 -106
- package/dist/contracts/issues.contract.d.ts.map +0 -1
- package/dist/contracts/issues.contract.js +0 -50
- package/dist/contracts/issues.contract.js.map +0 -1
- package/src/chores/chores.test.ts +0 -24
- package/src/chores/digest.test.ts +0 -27
- package/src/chores/probes.integration.test.ts +0 -494
- package/src/chores/stack.test.ts +0 -140
- package/src/chores/verdict.test.ts +0 -761
- package/src/contracts/chores.contract.ts +0 -39
- package/src/contracts/issues.contract.ts +0 -53
package/src/schemas/issues.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// Bug reports from the owner's own sites and apps, as they travel: what the reporter SDK sends, what an intake's
|
|
2
|
+
// automation is configured with, and what one sandbox of the owner's account reports to another. The inbox they are
|
|
3
|
+
// grouped into (.intentic/records/issues/, one file per fingerprint) is the issues extension's own since 2026-11-26, and
|
|
4
|
+
// so are its shapes.
|
|
3
5
|
import { z } from "zod";
|
|
4
|
-
import { entryId } from "./internal.js";
|
|
5
6
|
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// the SDK reads back). Imported as types only, so zod never reaches a browser.
|
|
7
|
+
// `IssueReportSchema` (untrusted, from a stranger's POST), and `IssuesConfigSchema`/`IssuePublicConfigSchema` (owner
|
|
8
|
+
// settings vs. what the SDK reads back). Imported as types only, so zod never reaches a browser.
|
|
9
9
|
|
|
10
10
|
// `crash` and `detection` group under one fingerprint with a rising count; `report` never groups, since two people's
|
|
11
11
|
// own words are two different things.
|
|
@@ -55,8 +55,11 @@ export const IssueReportSchema = z.object({
|
|
|
55
55
|
});
|
|
56
56
|
export type IssueReport = z.infer<typeof IssueReportSchema>;
|
|
57
57
|
|
|
58
|
-
// POSTed to
|
|
59
|
-
// keeps the stored sample pure evidence, not doorman's paperwork.
|
|
58
|
+
// POSTed to an intake's report door: the report plus what the gate needs (client id, anti-bot answer) but never stores,
|
|
59
|
+
// which keeps the stored sample pure evidence, not doorman's paperwork. Since 2026-11-26 the door is the issues
|
|
60
|
+
// extension's (/door/intentic.issues/<id>/report), where the key travels as `?key=` and a proof of work in the door's
|
|
61
|
+
// headers; `powNonce` and `key` are what an SDK from before then puts in the body at /intake/<id>/report, which the
|
|
62
|
+
// daemon still forwards there.
|
|
60
63
|
export const IssueIngestSchema = z.object({
|
|
61
64
|
report: IssueReportSchema,
|
|
62
65
|
// Per-minute limit key; distinct from the daily budget below.
|
|
@@ -69,25 +72,12 @@ export const IssueIngestSchema = z.object({
|
|
|
69
72
|
});
|
|
70
73
|
export type IssueIngest = z.infer<typeof IssueIngestSchema>;
|
|
71
74
|
|
|
72
|
-
// `investigating` is set only by the daemon when a turn actually starts (a wake, or the Investigate button); never
|
|
73
|
-
// guessed, never settable by a click.
|
|
74
|
-
export const IssueStatusSchema = z.enum(["open", "investigating", "resolved", "ignored"]);
|
|
75
|
-
export type IssueStatus = z.infer<typeof IssueStatusSchema>;
|
|
76
|
-
|
|
77
|
-
// Store only the conversation id for an issue run.
|
|
78
|
-
export const IssueRunSchema = z.object({
|
|
79
|
-
conversationId: z.string().describe("The conversation this run became."),
|
|
80
|
-
at: z.number().describe("When it started, in milliseconds."),
|
|
81
|
-
// Lets a post-fix recurrence read as "it came back", not "already looked at".
|
|
82
|
-
atCount: z.number().describe("How many times it had happened when this run started."),
|
|
83
|
-
});
|
|
84
|
-
export type IssueRun = z.infer<typeof IssueRunSchema>;
|
|
85
|
-
|
|
86
75
|
// Who reported it, when the reporter was another sandbox on the owner's account (account-level report routing). Read
|
|
87
76
|
// from the platform-signed pass, except `conversationId`, which the sending daemon names for its own conversation.
|
|
88
77
|
export const IssueSenderSchema = z.object({
|
|
89
78
|
sandboxId: z.string().max(40).describe("The reporting sandbox's id."),
|
|
90
79
|
sandboxName: z.string().max(120).describe("Its name on your account."),
|
|
80
|
+
address: z.string().max(300).optional().describe("Its address, when the report came as a message from a contact (docs/architecture/messages.md)."),
|
|
91
81
|
project: z.string().max(200).describe("The project it reported about, as this sandbox claims it."),
|
|
92
82
|
conversationId: z.string().max(120).optional().describe("The conversation over there that reported it."),
|
|
93
83
|
person: z
|
|
@@ -120,6 +110,16 @@ export const AccountReportSchema = z.object({
|
|
|
120
110
|
});
|
|
121
111
|
export type AccountReport = z.infer<typeof AccountReportSchema>;
|
|
122
112
|
|
|
113
|
+
// (2026-11-26) An admitted account report as the receiving door hands it to the extension that keeps the issues inbox
|
|
114
|
+
// (its `account-report` fire handler, the fire's payload as JSON): the problem, how many arrivals it stands for, and the
|
|
115
|
+
// sender as the platform's pass named it, which the inbox keeps outside everything the reporter wrote.
|
|
116
|
+
export const AccountReportFiledSchema = z.object({
|
|
117
|
+
report: AccountProblemSchema,
|
|
118
|
+
times: z.number().int().min(1).max(10_000),
|
|
119
|
+
sender: IssueSenderSchema,
|
|
120
|
+
});
|
|
121
|
+
export type AccountReportFiled = z.infer<typeof AccountReportFiledSchema>;
|
|
122
|
+
|
|
123
123
|
// The sending side, over loopback from the `projects report` command: a problem for whichever sandbox on the owner's
|
|
124
124
|
// account claims `project`, and what came of it (delivered now, waiting in the outbox, or refused for good).
|
|
125
125
|
export const AccountSendSchema = z.object({
|
|
@@ -149,62 +149,18 @@ export const AccountOutboxSchema = z.object({
|
|
|
149
149
|
export type AccountOutbox = z.infer<typeof AccountOutboxSchema>;
|
|
150
150
|
export const AccountProjectsSchema = z.object({ projects: z.array(z.string()) });
|
|
151
151
|
|
|
152
|
-
// One group; the id is the fingerprint and the filename, never in the body, so a body cannot disagree with its own
|
|
153
|
-
// grouping.
|
|
154
|
-
export const IssueSchema = z.object({
|
|
155
|
-
kind: IssueKindSchema,
|
|
156
|
-
// Derived from the report, never typed, so two recurrences of one crash can't end up under two titles.
|
|
157
|
-
title: z.string().min(1).max(300).describe("The one line this is listed under."),
|
|
158
|
-
culprit: z.string().max(300).optional().describe("The frame it came from, when the stack named one."),
|
|
159
|
-
// A workspace can run several intakes (one per site); the inbox is one list across all of them.
|
|
160
|
-
automationId: entryId.describe("Which intake received it."),
|
|
161
|
-
// Absent for a keyed client (mobile app, server) with no Origin header to send.
|
|
162
|
-
origin: z.string().max(400).optional().describe("Which site it came from."),
|
|
163
|
-
firstSeen: z.number().describe("When it first happened, in milliseconds."),
|
|
164
|
-
lastSeen: z.number().describe("When it last happened, in milliseconds."),
|
|
165
|
-
count: z.number().describe("How many times this exact thing has arrived."),
|
|
166
|
-
status: IssueStatusSchema.default("open").describe("Where it stands with you."),
|
|
167
|
-
statusAt: z.number().optional().describe("When the status last changed, in milliseconds."),
|
|
168
|
-
release: z.string().max(200).optional().describe("The build the latest one came from."),
|
|
169
|
-
// Latest, not first: a fix must match what it looks like now, not a build that may no longer exist.
|
|
170
|
-
sample: IssueReportSchema.describe("The most recent one, in full."),
|
|
171
|
-
// Escalation rule lives in this number: fires once when new, again only once count has moved this far past it.
|
|
172
|
-
// Stored, since a restart can't derive it from a count and timestamp.
|
|
173
|
-
firedAt: z.number().optional().describe("What the count stood at the last time this woke an agent."),
|
|
174
|
-
runs: z.array(IssueRunSchema).max(20).optional().describe("The turns started for it."),
|
|
175
|
-
// Set only by the daemon, from a pass the platform signed: never a field a reporter can type.
|
|
176
|
-
sender: IssueSenderSchema.optional().describe("The sandbox on your account that reported the latest one, when another sandbox did."),
|
|
177
|
-
});
|
|
178
|
-
export type Issue = z.infer<typeof IssueSchema>;
|
|
179
|
-
|
|
180
|
-
// The list row: the stored group plus its filename id (the fingerprint).
|
|
181
|
-
export const IssueSummarySchema = IssueSchema.extend({ id: entryId.describe("The issue's id, which is its fingerprint.") });
|
|
182
|
-
export type IssueSummary = z.infer<typeof IssueSummarySchema>;
|
|
183
|
-
|
|
184
|
-
// `invalid`: nothing but the daemon writes these files, so one that fails to parse is a bug in this daemon or a
|
|
185
|
-
// half-written volume, worth surfacing not skipping.
|
|
186
|
-
export const IssuesListSchema = z.object({
|
|
187
|
-
issues: z.array(IssueSummarySchema).describe("The inbox, most recently seen first."),
|
|
188
|
-
invalid: z.array(z.string()).describe("Files in the issues directory that could not be read at all."),
|
|
189
|
-
});
|
|
190
|
-
export type IssuesList = z.infer<typeof IssuesListSchema>;
|
|
191
|
-
|
|
192
|
-
export const IssueIdParamSchema = z.object({ id: entryId.describe("Which issue.") });
|
|
193
|
-
// `investigating` is not offered here: the daemon sets it when a turn actually starts, so a click can't fake the one
|
|
194
|
-
// status that means something.
|
|
195
|
-
export const IssueStatusInputSchema = z.object({
|
|
196
|
-
id: entryId.describe("Which issue."),
|
|
197
|
-
status: z.enum(["open", "resolved", "ignored"]).describe("Where it now stands with you."),
|
|
198
|
-
});
|
|
199
|
-
export type IssueStatusInput = z.infer<typeof IssueStatusInputSchema>;
|
|
200
|
-
|
|
201
152
|
// Present only on `issues` listener automations. `allowedOrigins` is not here: it lives on the trigger, since the
|
|
202
153
|
// ingest route reads it as the admission gate, not a rendering choice.
|
|
203
154
|
export const IssuesConfigSchema = z.object({
|
|
204
155
|
// Ingest key lives in the secrets store (`AutomationSummary.ingestKey`), not here — an abuse label the origin
|
|
205
|
-
// allowlist and ceilings actually bound, not a secret.
|
|
206
|
-
//
|
|
207
|
-
|
|
156
|
+
// allowlist and ceilings actually bound, not a secret. `keyFromBrowsers` left for the listener trigger (2026-11-26),
|
|
157
|
+
// where any extension's public door reads it; the automations file's conversion moves a stored one there. It stays
|
|
158
|
+
// accepted here, read by nothing, because a runner of an older release still speaks it inside an automation need's
|
|
159
|
+
// event (the runner door lags in the field: _tools/checks/lib/release-doors.mjs).
|
|
160
|
+
keyFromBrowsers: z
|
|
161
|
+
.boolean()
|
|
162
|
+
.optional()
|
|
163
|
+
.describe("Deprecated: moved to the listener trigger. Let a browser report with the key alone, rather than only from a site you listed."),
|
|
208
164
|
// Per UTC day, counted in reports that reach the store; absent means ISSUES_DAILY_MAX_DEFAULT, never uncapped.
|
|
209
165
|
dailyReportMax: z.number().int().positive().optional().describe("How many reports a day this intake accepts at all."),
|
|
210
166
|
// Wakes an agent on new, then again once count has grown this much since the last wake; absent means
|
|
@@ -247,18 +203,6 @@ export type IssuePublicConfig = z.infer<typeof IssuePublicConfigSchema>;
|
|
|
247
203
|
export const IssueAcceptedSchema = z.object({ ok: z.literal(true), id: z.string() });
|
|
248
204
|
export type IssueAccepted = z.infer<typeof IssueAcceptedSchema>;
|
|
249
205
|
|
|
250
|
-
// Which origins loaded this intake's SDK, and which were turned away: a snippet never pasted and one pasted on a
|
|
251
|
-
// disallowed origin both look like "no reports".
|
|
252
|
-
export const IssueInstallSchema = z.object({
|
|
253
|
-
origin: z.string(),
|
|
254
|
-
allowed: z.boolean(),
|
|
255
|
-
lastSeenAt: z.number(),
|
|
256
|
-
loads: z.number(),
|
|
257
|
-
});
|
|
258
|
-
export const IssueInstallsSchema = z.object({ origins: z.array(IssueInstallSchema) });
|
|
259
|
-
export type IssueInstalls = z.infer<typeof IssueInstallsSchema>;
|
|
260
|
-
export const IssueIntakeIdParamSchema = z.object({ automationId: entryId.describe("Which intake.") });
|
|
261
|
-
|
|
262
206
|
// Constants both the editor and the route need, so a limit is visible to the owner before it is hit.
|
|
263
207
|
|
|
264
208
|
// Default daily ceiling; higher than the Visitor chat's 200 since a report is only sometimes a turn (dedup decides),
|
package/src/schemas/links.ts
CHANGED
|
@@ -94,6 +94,10 @@ export const InboundLinkSummarySchema = z.object({
|
|
|
94
94
|
lastUsedAt: z.number().optional().describe("The last time it was used, coarse on purpose; absent means never."),
|
|
95
95
|
conversations: z.number().int().nonnegative().describe("How many conversations it has opened here."),
|
|
96
96
|
requests: z.array(LinkRequestSchema).describe("Tasks waiting for the owner's yes, oldest first."),
|
|
97
|
+
upgraded: z
|
|
98
|
+
.object({ contact: z.string(), at: z.number() })
|
|
99
|
+
.optional()
|
|
100
|
+
.describe("Set once both sandboxes spoke s2s/1 and the link became a contact (its id here, and when): its token works nowhere any more."),
|
|
97
101
|
});
|
|
98
102
|
export type InboundLinkSummary = z.infer<typeof InboundLinkSummarySchema>;
|
|
99
103
|
export const InboundLinksListSchema = z.object({ links: z.array(InboundLinkSummarySchema) });
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// maintenance: the standing evidence a chore is decided from
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
//
|
|
4
|
-
// (
|
|
5
|
-
//
|
|
3
|
+
// FROZEN (2026-11-26), with the `chores` subpath whose types it gives: the maintenance extension's backend measures and
|
|
4
|
+
// serves this evidence now (its src/chores/schema.ts), and the daemon's GET /chores, POST /chores/probe and
|
|
5
|
+
// POST /chores/ledger are gone. Kept for that subpath until extension API 3.0.0, and for the extension-readiness schemas
|
|
6
|
+
// at the bottom, which the extensions contract reads and which stay.
|
|
6
7
|
|
|
7
8
|
export const PROBE_IDS = ["outdated", "audit", "knip", "jscpd", "ui", "bundle", "mutation"] as const;
|
|
8
9
|
export const ProbeIdSchema = z.enum(PROBE_IDS);
|
package/src/schemas/metrics.ts
CHANGED
|
@@ -438,3 +438,38 @@ export const StorageCleanResultSchema = z.object({
|
|
|
438
438
|
failed: z.number().describe("How many removals the filesystem refused."),
|
|
439
439
|
});
|
|
440
440
|
export type StorageCleanResult = z.infer<typeof StorageCleanResultSchema>;
|
|
441
|
+
|
|
442
|
+
/* GIVING MEMORY BACK TO THE COMPUTER THIS SANDBOX RUNS ON, ON A PERSON'S PRESS (2026-11-26). The composer says when that
|
|
443
|
+
computer is what is short of memory (offload.ts MachineHostSchema), and offers to free some: this sandbox reclaims
|
|
444
|
+
from its own cgroup now, as it does by itself while the computer is under its low line (hosts/reclaim/host-reclaim.ts
|
|
445
|
+
in the daemon), and Windows' Available memory is read just before and a settle after, so the answer says what Windows
|
|
446
|
+
actually got rather than what the sandbox let go. Inside the WSL VM most of a reclaim lands in blocks too small to
|
|
447
|
+
hand back, so "Windows got none of it" is an answer it can give. */
|
|
448
|
+
export const MemoryReclaimRefusalSchema = z.enum([
|
|
449
|
+
// The computer this sandbox runs on says nothing of its memory (not a Windows PC, or an agent older than the reading).
|
|
450
|
+
"no-host",
|
|
451
|
+
// The kernel here takes no reclaim (no memory.reclaim, or a read-only cgroup).
|
|
452
|
+
"unsupported",
|
|
453
|
+
// This sandbox is short of memory itself right now: reclaiming would stall its own work.
|
|
454
|
+
"stalling",
|
|
455
|
+
// This sandbox holds too little to give any back.
|
|
456
|
+
"small",
|
|
457
|
+
]);
|
|
458
|
+
export type MemoryReclaimRefusal = z.infer<typeof MemoryReclaimRefusalSchema>;
|
|
459
|
+
|
|
460
|
+
export const MemoryReclaimResultSchema = z.discriminatedUnion("outcome", [
|
|
461
|
+
z.object({
|
|
462
|
+
outcome: z.literal("reclaimed"),
|
|
463
|
+
// What this sandbox let go inside the VM, in bytes.
|
|
464
|
+
givenBytes: z.number().int().nonnegative(),
|
|
465
|
+
// The computer, and Windows' Available memory just before and a few seconds after; `afterBytes` is absent when
|
|
466
|
+
// the computer stopped answering in between.
|
|
467
|
+
host: z.object({
|
|
468
|
+
name: z.string().min(1),
|
|
469
|
+
beforeBytes: z.number().int().nonnegative(),
|
|
470
|
+
afterBytes: z.number().int().nonnegative().optional(),
|
|
471
|
+
}),
|
|
472
|
+
}),
|
|
473
|
+
z.object({ outcome: z.literal("refused"), why: MemoryReclaimRefusalSchema }),
|
|
474
|
+
]);
|
|
475
|
+
export type MemoryReclaimResult = z.infer<typeof MemoryReclaimResultSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// What a need asks for (needs.ts), one word per kind; each kind's subject and ask live in needs.ts, and the deploy
|
|
4
|
+
// need's in stack-grants.ts. Its own module so the list can grow without pushing needs.ts past its size.
|
|
5
|
+
|
|
6
|
+
const FIRST_KINDS = ["capability", "secret", "grant", "release", "environment", "automation", "instruction", "host-power"] as const;
|
|
7
|
+
export const NEED_KINDS = [...FIRST_KINDS, "claim", "route", "redirect", "deploy", "wsl-memory", "contact"] as const;
|
|
8
|
+
export const NeedKindSchema = z
|
|
9
|
+
.enum(NEED_KINDS)
|
|
10
|
+
.describe(
|
|
11
|
+
"What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended, a standing rule written into an AGENTS.md, power settings changed on the computer this sandbox runs on, a project claimed for this sandbox so the owner's other sandboxes report its problems here, a person's leave for this sandbox to act as them in another, a person's message sent on to the sandbox it was meant for, a managed stack let receive the secrets its manifest reads, a smaller WSL VM for the PC this sandbox runs on, or another sandbox added or accepted as a contact.",
|
|
12
|
+
);
|
|
13
|
+
export type NeedKind = z.infer<typeof NeedKindSchema>;
|
package/src/schemas/needs.ts
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { KeyringShareModeSchema } from "./keyring.js";
|
|
3
|
-
import {
|
|
3
|
+
import { NeedKindSchema } from "./need-kinds.js";
|
|
4
|
+
import { AutomationSchema, WatchKindSchema } from "./automations.js";
|
|
5
|
+
import { DeployNeedAskSchema, DeployNeedSchema } from "./stack-grants.js";
|
|
4
6
|
import { HostPowerFindingSchema } from "./host-power.js";
|
|
7
|
+
import { WslMemoryNeedSchema } from "./wsl-memory.js";
|
|
8
|
+
import { RedirectNeedSchema } from "./redirect-need.js";
|
|
9
|
+
import { ContactNeedAskSchema, ContactNeedSchema } from "./contact-need.js";
|
|
5
10
|
import { entryId } from "./internal.js";
|
|
6
11
|
import { PASS_SCOPES } from "../protocol/doors/pass-scopes.js";
|
|
12
|
+
import { SECRET_HOSTS_MAX } from "../policy/secret-hosts.js";
|
|
13
|
+
import { SecretHostSchema } from "./secrets.js";
|
|
7
14
|
|
|
8
15
|
// A need: something an agent cannot finish its task without that only a person can provide (a connection, a secret's
|
|
9
16
|
// value, wider reach, a tool in the image). Unlike a parked card it outlives the turn that raised it: the sandbox keeps
|
|
10
17
|
// it until someone answers, draws it wherever it is waiting, and wakes the conversation when it is met
|
|
11
18
|
// (docs/architecture/needs.md). Every word on a need is the daemon's except `why`, the agent's own case.
|
|
12
19
|
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
.enum(NEED_KINDS)
|
|
16
|
-
.describe(
|
|
17
|
-
"What is being asked for: a connection, a secret's value, wider reach, a gated credential, a tool in the image, an automation to run unattended, a standing rule written into an AGENTS.md, power settings changed on the computer this sandbox runs on, a project claimed for this sandbox so the owner's other sandboxes report its problems here, or a person's leave for this sandbox to act as them in another.",
|
|
18
|
-
);
|
|
19
|
-
export type NeedKind = z.infer<typeof NeedKindSchema>;
|
|
20
|
+
export { NEED_KINDS, type NeedKind, NeedKindSchema } from "./need-kinds.js";
|
|
21
|
+
export { REDIRECT_WORDS_MAX, type RedirectNeed, RedirectNeedSchema } from "./redirect-need.js";
|
|
20
22
|
|
|
21
23
|
// `working` is a yes still being carried out: a connection whose form is open, an overlay approved but not yet built.
|
|
22
24
|
export const NeedStatusSchema = z
|
|
@@ -73,6 +75,8 @@ export const SECRET_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/;
|
|
|
73
75
|
// Group 1 is the name in both forms, so every reader that only needs the name reads both alike.
|
|
74
76
|
export const SECRET_REFERENCE = /\{\{secret:([A-Za-z0-9_./-]+)(?:\|(file))?\}\}/;
|
|
75
77
|
|
|
78
|
+
// A secret's host guard list as a card starts it (needs/kinds/secret-need.ts in the sandbox).
|
|
79
|
+
const SecretHostsSchema = z.array(SecretHostSchema).max(SECRET_HOSTS_MAX);
|
|
76
80
|
export const SecretNeedSchema = z.object({
|
|
77
81
|
kind: z.literal("secret"),
|
|
78
82
|
name: z.string().regex(SECRET_NAME).describe("The name it is stored under, and what `{{secret:NAME}}` will resolve."),
|
|
@@ -89,6 +93,12 @@ export const SecretNeedSchema = z.object({
|
|
|
89
93
|
.boolean()
|
|
90
94
|
.optional()
|
|
91
95
|
.describe("A value with lines (a key file, a whole .env): the card takes it in a box with lines and keeps it exactly as pasted."),
|
|
96
|
+
// The agent's proposal: what a person keeps on the card starts the secret guarded, rather than off until someone acts.
|
|
97
|
+
hosts: SecretHostsSchema.min(1)
|
|
98
|
+
.optional()
|
|
99
|
+
.describe(
|
|
100
|
+
"Where it will be sent, as the agent proposes it. The card shows each host for the person to keep or drop, and the secret's host guard starts on with the ones they keep: it goes unasked only there, and anywhere else asks first.",
|
|
101
|
+
),
|
|
92
102
|
});
|
|
93
103
|
export type SecretNeed = z.infer<typeof SecretNeedSchema>;
|
|
94
104
|
|
|
@@ -175,6 +185,9 @@ export const AutomationNeedSchema = z.object({
|
|
|
175
185
|
automation: AutomationSchema.describe("The automation as it would be saved, switched on, the moment a person approves it."),
|
|
176
186
|
replaces: z.boolean().optional().describe("An automation of this id already exists, and approving replaces it."),
|
|
177
187
|
firstCheck: AutomationFirstCheckSchema.optional(),
|
|
188
|
+
// (2026-11-26) The declaration of the kind its source names, when an extension declares it, so the card says what the
|
|
189
|
+
// watch looks at in that kind's own words. Absent for a page, a guard, and from a daemon before contributed kinds.
|
|
190
|
+
watchKind: WatchKindSchema.optional(),
|
|
178
191
|
});
|
|
179
192
|
export type AutomationNeed = z.infer<typeof AutomationNeedSchema>;
|
|
180
193
|
|
|
@@ -194,16 +207,15 @@ export const InstructionNeedSchema = z.object({
|
|
|
194
207
|
});
|
|
195
208
|
export type InstructionNeed = z.infer<typeof InstructionNeedSchema>;
|
|
196
209
|
|
|
197
|
-
// The computer this sandbox runs on would sleep through work just booked on it (2026-11-22, host-power.ts)
|
|
198
|
-
//
|
|
199
|
-
//
|
|
200
|
-
// computer's `power-stay-on` op, which changes what `fixable` findings say on mains power. Its outcome is the person's
|
|
201
|
-
// alone: the conversation is never woken to hear it, since a woken turn would run the booked work early.
|
|
210
|
+
// The computer this sandbox runs on would sleep through work just booked on it (2026-11-22, host-power.ts). Raised by the
|
|
211
|
+
// daemon itself in the booking conversation; a yes runs `power-stay-on` and the chosen answer to a Windows Update restart
|
|
212
|
+
// (`remedy`). Told to nobody: a woken turn would run the booked work early.
|
|
202
213
|
export const HostPowerNeedSchema = z.object({
|
|
203
214
|
kind: z.literal("host-power"),
|
|
204
215
|
device: z.string().min(1).describe("The connected computer this sandbox runs on, by its device id."),
|
|
205
216
|
findings: z.array(HostPowerFindingSchema).describe("What its OS would do to the work, as read when the card was raised."),
|
|
206
217
|
dueAt: z.number().optional().describe("When the booked work that raised it is due, in milliseconds."),
|
|
218
|
+
utcOffsetMinutes: z.number().int().optional().describe("The computer's local time minus UTC when read: what places its findings' local hours on another clock."),
|
|
207
219
|
});
|
|
208
220
|
export type HostPowerNeed = z.infer<typeof HostPowerNeedSchema>;
|
|
209
221
|
|
|
@@ -243,14 +255,17 @@ export const NeedSubjectSchema = z
|
|
|
243
255
|
AutomationNeedSchema,
|
|
244
256
|
InstructionNeedSchema,
|
|
245
257
|
HostPowerNeedSchema,
|
|
258
|
+
WslMemoryNeedSchema,
|
|
246
259
|
ClaimNeedSchema,
|
|
247
260
|
RouteNeedSchema,
|
|
261
|
+
RedirectNeedSchema,
|
|
262
|
+
DeployNeedSchema,
|
|
263
|
+
ContactNeedSchema,
|
|
248
264
|
])
|
|
249
265
|
.describe("What exactly is asked for.");
|
|
250
266
|
export type NeedSubject = z.infer<typeof NeedSubjectSchema>;
|
|
251
267
|
|
|
252
|
-
// How the agent learned the outcome: the call it raised the need with, words into its live turn,
|
|
253
|
-
// queued behind what the conversation was doing.
|
|
268
|
+
// How the agent learned the outcome: the call it raised the need with, words into its live turn, its own turn, or queued.
|
|
254
269
|
export const NeedToldSchema = z.enum(["call", "turn", "queued"]);
|
|
255
270
|
export type NeedTold = z.infer<typeof NeedToldSchema>;
|
|
256
271
|
|
|
@@ -320,6 +335,15 @@ export const NeedAskSchema = z.discriminatedUnion("kind", [
|
|
|
320
335
|
.optional()
|
|
321
336
|
.describe("What it is for: drop, read or task (all three when left out)."),
|
|
322
337
|
}),
|
|
338
|
+
// Where the person's message belongs, as the agent has it: a sandbox by name or id, or a project whose claim finds it.
|
|
339
|
+
// The words and the person are the daemon's, never named here.
|
|
340
|
+
z.object({
|
|
341
|
+
kind: z.literal("redirect"),
|
|
342
|
+
target: z.string().trim().min(1).max(120).optional().describe("The sandbox the message belongs in, by its name or id."),
|
|
343
|
+
project: z.string().trim().min(1).max(400).optional().describe("Or the project it is about: the sandbox claiming it is the target."),
|
|
344
|
+
}),
|
|
345
|
+
DeployNeedAskSchema,
|
|
346
|
+
ContactNeedAskSchema,
|
|
323
347
|
]);
|
|
324
348
|
export type NeedAsk = z.infer<typeof NeedAskSchema>;
|
|
325
349
|
|
|
@@ -360,7 +384,8 @@ export const NeedAnswerSchema = z.discriminatedUnion("kind", [
|
|
|
360
384
|
// 2026-11-18: was `{ scope }`, a yes that lifted what the role withheld; now the role the conversation switches to.
|
|
361
385
|
z.object({ kind: z.literal("grant"), role: entryId.describe("Which of the need's roles the conversation switches to.") }),
|
|
362
386
|
z.object({ kind: z.literal("release") }),
|
|
363
|
-
|
|
387
|
+
// (2026-11-27) `remedy`: a host-power card's answer to a Windows Update restart (POWER_REMEDY); absent is the pause.
|
|
388
|
+
z.object({ kind: z.literal("approve"), remedy: z.enum(["update-pause", "before-sign-in"]).optional() }),
|
|
364
389
|
]);
|
|
365
390
|
export type NeedAnswer = z.infer<typeof NeedAnswerSchema>;
|
|
366
391
|
|
|
@@ -385,6 +410,9 @@ export const NeedSecretInputSchema = NeedIdParamSchema.extend({
|
|
|
385
410
|
})
|
|
386
411
|
.optional()
|
|
387
412
|
.describe("Keep it in the keyring on one of your computers instead of in the sandbox."),
|
|
413
|
+
hosts: SecretHostsSchema.optional().describe(
|
|
414
|
+
"The hosts you let it go to unasked, of those the agent proposed: its host guard starts on with them. Absent or empty leaves its host guard as it is, and a guard already on is never widened from here. Ignored with keepOn, whose keyring keeps its own list.",
|
|
415
|
+
),
|
|
388
416
|
});
|
|
389
417
|
export const NeedsQuerySchema = z.object({
|
|
390
418
|
conversationId: z.string().optional().describe("One conversation's needs. Absent is every conversation's."),
|
package/src/schemas/offload.ts
CHANGED
|
@@ -108,6 +108,31 @@ export type MachineStanding = z.infer<typeof MachineStandingSchema>;
|
|
|
108
108
|
export const MachineStrainSchema = z.enum(["memory", "memory-stall", "cpu", "agents", "disk"]);
|
|
109
109
|
export type MachineStrain = z.infer<typeof MachineStrainSchema>;
|
|
110
110
|
|
|
111
|
+
/* THE COMPUTER UNDER A MACHINE, IN FIGURES ITS OWNER CAN CHECK (2026-11-26). A machine's free memory is the tighter of its
|
|
112
|
+
own budget and its host's room above the line under which the host counts as short (machine-facts.ts), so "1.9 GB
|
|
113
|
+
free" on rog was Windows' Available less a 3.1 GB line nobody could see, while the sandbox itself had 10.5 GB and the
|
|
114
|
+
WSL VM held 16.6 GB of Windows' memory. Said beside the verdict so the composer can name what is short: Windows' own
|
|
115
|
+
figures as Task Manager shows them, and the VM's share and its unused part where that computer's agent reads them.
|
|
116
|
+
Absent where the host says nothing of its memory (a Linux host, an agent older than the reading). */
|
|
117
|
+
export const MachineHostSchema = z.object({
|
|
118
|
+
// The computer, by the word the owner knows it by (its device card).
|
|
119
|
+
name: z.string().min(1),
|
|
120
|
+
// What Windows could hand out now (its Available memory, standby cache included), and how much it has.
|
|
121
|
+
availableMb: z.number().int().nonnegative(),
|
|
122
|
+
totalMb: z.number().int().positive(),
|
|
123
|
+
// The line under which it counts as short (hosts.ts hostMemoryLowBytes): never counted as room for new work.
|
|
124
|
+
reserveMb: z.number().int().nonnegative(),
|
|
125
|
+
// The WSL VM's footprint in Windows' memory, and the part of it free inside the VM but too fragmented to hand back
|
|
126
|
+
// (hosts.ts GuestFreeMemorySchema `strandedBytes`); each absent where that computer's agent did not read it.
|
|
127
|
+
vmMb: z.number().int().nonnegative().optional(),
|
|
128
|
+
vmUnusedMb: z.number().int().nonnegative().optional(),
|
|
129
|
+
// What the machine's own budget has free, before its host's room is folded in; absent where nothing measures it.
|
|
130
|
+
ownFreeMb: z.number().int().nonnegative().optional(),
|
|
131
|
+
// Whether the host's room, not the machine's own budget, is what its free memory came to: the host is what is short.
|
|
132
|
+
binding: z.boolean(),
|
|
133
|
+
});
|
|
134
|
+
export type MachineHost = z.infer<typeof MachineHostSchema>;
|
|
135
|
+
|
|
111
136
|
export const MachineLoadSchema = z.object({
|
|
112
137
|
standing: MachineStandingSchema,
|
|
113
138
|
// Why it is not calm, strongest first; empty when it is.
|
|
@@ -126,6 +151,9 @@ export const MachineLoadSchema = z.object({
|
|
|
126
151
|
// The share of the machine still free by its tightest measure (slots, memory, CPU), so two machines of different
|
|
127
152
|
// sizes compare: 0 is none, 1 is idle.
|
|
128
153
|
headroom: z.number().min(0).max(1),
|
|
154
|
+
// (2026-11-26) The computer it runs on, as that computer's agent last said (MachineHostSchema); absent where it says
|
|
155
|
+
// nothing of its memory.
|
|
156
|
+
host: MachineHostSchema.optional(),
|
|
129
157
|
});
|
|
130
158
|
export type MachineLoad = z.infer<typeof MachineLoadSchema>;
|
|
131
159
|
|
|
@@ -163,6 +191,9 @@ export const FleetAdviceSchema = z.object({
|
|
|
163
191
|
machines: z.array(FleetMachineSchema),
|
|
164
192
|
// Where a new session should start instead of here: absent while here is calm, or when no machine is better off.
|
|
165
193
|
suggestion: z.object({ runner: z.string().min(1), name: z.string().min(1) }).optional(),
|
|
194
|
+
// (2026-11-26) Whether this sandbox could give memory back to the computer it runs on now (POST /system/memory/reclaim):
|
|
195
|
+
// that computer says what memory it has, and the kernel here takes a reclaim. Absent from a daemon older than it.
|
|
196
|
+
reclaim: z.boolean().optional(),
|
|
166
197
|
});
|
|
167
198
|
export type FleetAdvice = z.infer<typeof FleetAdviceSchema>;
|
|
168
199
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// POST /capabilities/{id}/outward-action: an extension's backend, about to carry out an outward action with one of its
|
|
4
|
+
// cards' credentials, asks the owner's action rules for the verdict. The daemon decides, records and, on a hold, drafts
|
|
5
|
+
// the approvals-queue item the extension carries out once a person says yes; the extension decides nothing of the rule.
|
|
6
|
+
|
|
7
|
+
// The parts every call about one action carries, for its verdict and for its outcome alike.
|
|
8
|
+
const OutwardActionCallSchema = z.object({
|
|
9
|
+
id: z.string().describe("The card whose credential it would use. Only a card the calling extension contributes."),
|
|
10
|
+
action: z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1)
|
|
13
|
+
.max(100)
|
|
14
|
+
.describe("The action below the card's kind, as the card's manifest declares it (`message.send`): the rules' key is `<kind>.<action>`."),
|
|
15
|
+
conversationId: z.string().max(200).optional().describe("The conversation the action is for, as the call that asked for it named it. Absent for an approved one."),
|
|
16
|
+
endpoint: z.string().max(500).optional().describe("Where it goes below the service (`/me/sendMail`), for its Activity row. Never a credential."),
|
|
17
|
+
channel: z.string().max(500).optional().describe("Who or where it goes to, for its Activity row."),
|
|
18
|
+
content: z.string().max(256 * 1024).optional().describe("What it says, for its Activity row."),
|
|
19
|
+
});
|
|
20
|
+
export const OutwardActionAskSchema = OutwardActionCallSchema.extend({
|
|
21
|
+
hold: z
|
|
22
|
+
.object({
|
|
23
|
+
summary: z.string().min(1).max(200).describe("The approval's headline."),
|
|
24
|
+
details: z.string().max(64 * 1024).describe("Everything the person should read before saying yes."),
|
|
25
|
+
digest: z
|
|
26
|
+
.string()
|
|
27
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
28
|
+
.describe("The SHA-256 of exactly what the extension will carry out, which it recomputes before acting."),
|
|
29
|
+
})
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("What to put before the owner when the rules hold it. Absent, a hold is only answered, never drafted (an approved action asking again)."),
|
|
32
|
+
});
|
|
33
|
+
export const OutwardActionVerdictSchema = z.discriminatedUnion("verdict", [
|
|
34
|
+
z.object({ verdict: z.literal("allow").describe("Go ahead, then report how it went.") }),
|
|
35
|
+
z.object({ verdict: z.literal("deny"), reason: z.string().describe("The rule's reason, to say to whoever asked.") }),
|
|
36
|
+
z.object({
|
|
37
|
+
verdict: z.literal("hold"),
|
|
38
|
+
reason: z.string().describe("Why it waits."),
|
|
39
|
+
approvalId: z.string().optional().describe("The approvals-queue item drafted for it, when the ask carried one."),
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
export type OutwardActionVerdict = z.infer<typeof OutwardActionVerdictSchema>;
|
|
43
|
+
// POST /capabilities/{id}/outward-action/outcome: how an allowed or approved action went, for its Activity row.
|
|
44
|
+
export const OutwardActionOutcomeSchema = OutwardActionCallSchema.extend({
|
|
45
|
+
outcome: z.enum(["ok", "error"]).describe("Whether it happened."),
|
|
46
|
+
error: z.string().max(2000).optional().describe("What went wrong, in the service's own words."),
|
|
47
|
+
});
|
|
@@ -264,6 +264,7 @@ export const AgentReplySchema = z.discriminatedUnion("kind", [
|
|
|
264
264
|
"Once allows this call alone; always allows what the request's always-label names (a tool, a rule, a secret) for the rest of the conversation; everything allows this call and every later request in this conversation that an allow-once could settle, until it is taken back on Grants; no blocks it. A request that always asks (alwaysAsks) reads everything as once.",
|
|
265
265
|
),
|
|
266
266
|
feedback: z.string().optional().describe("Why not, which goes back to the model as the reason."),
|
|
267
|
+
keep: z.literal(true).optional().describe("With always: the request's keepLabel answer rather than its alwaysLabel one."),
|
|
267
268
|
// Whole, not a patch: effort or an account named for one model means nothing on another.
|
|
268
269
|
child: ChildRunSchema.optional().describe(
|
|
269
270
|
"For a request to start a subagent: what to start it on instead of what the agent asked for. It replaces the whole run (model, account, effort and the rest), not only the fields it names. Ignored with a no, and on any other request.",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// A person's message that reached the wrong sandbox, offered to the one it was meant for (account-routing.md, 2026-11-25).
|
|
4
|
+
// The words are the daemon's copy of what the person opened a turn with, never the agent's retelling, and only that
|
|
5
|
+
// person can press it: their editor, signed in to both, opens a chat in the target and sends the words there as they
|
|
6
|
+
// would by hand. No pass and no pairing travel. The platform only found the target among the sandboxes they are in.
|
|
7
|
+
export const REDIRECT_WORDS_MAX = 20_000;
|
|
8
|
+
export const RedirectNeedSchema = z.object({
|
|
9
|
+
kind: z.literal("redirect"),
|
|
10
|
+
target: z.string().min(1).max(40).describe("The target sandbox's tunnel id."),
|
|
11
|
+
targetName: z.string().max(120).describe("Its name, as the platform gave it."),
|
|
12
|
+
address: z.string().max(400).optional().describe("The target's address, as the platform gave it, which the card finds it by."),
|
|
13
|
+
person: z.string().min(1).max(254).describe("Whose words they are, and the only one who can send them on."),
|
|
14
|
+
words: z.string().max(REDIRECT_WORDS_MAX).describe("The message, exactly as the person sent it here."),
|
|
15
|
+
clipped: z.boolean().optional().describe("The message was longer than the card carries, so only its head goes."),
|
|
16
|
+
attachments: z.number().int().min(0).optional().describe("How many files went with it, which stay here."),
|
|
17
|
+
project: z.string().max(400).optional().describe("The project the target was found by, when it was found by its claim."),
|
|
18
|
+
});
|
|
19
|
+
export type RedirectNeed = z.infer<typeof RedirectNeedSchema>;
|