@intentic/sandbox-contract 1.430.0 → 1.432.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 +22 -5
- package/dist/app-routes/app-pages.d.ts +1 -0
- package/dist/app-routes/app-pages.d.ts.map +1 -1
- package/dist/app-routes/app-pages.js +1 -0
- package/dist/app-routes/app-pages.js.map +1 -1
- package/dist/app-routes/index.d.ts +1 -0
- package/dist/app-routes/index.d.ts.map +1 -1
- package/dist/app-routes/index.js +1 -0
- package/dist/app-routes/index.js.map +1 -1
- package/dist/app-routes/return-path.d.ts +2 -0
- package/dist/app-routes/return-path.d.ts.map +1 -0
- package/dist/app-routes/return-path.js +8 -0
- package/dist/app-routes/return-path.js.map +1 -0
- 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/accounts.contract.d.ts.map +1 -1
- package/dist/contracts/accounts.contract.js +2 -0
- package/dist/contracts/accounts.contract.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1226 -12
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.d.ts +2665 -733
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +35 -5
- package/dist/contracts/agents.contract.js.map +1 -1
- package/dist/contracts/automations.contract.d.ts +90 -8
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +1 -0
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +49 -0
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +24 -1
- 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-ci-runners.contract.d.ts +108 -0
- package/dist/contracts/device-ci-runners.contract.d.ts.map +1 -0
- package/dist/contracts/device-ci-runners.contract.js +56 -0
- package/dist/contracts/device-ci-runners.contract.js.map +1 -0
- 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 +74 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +604 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +11 -2
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/git.contract.d.ts +7 -0
- package/dist/contracts/git.contract.d.ts.map +1 -1
- package/dist/contracts/needs.contract.d.ts +1097 -18
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/offload.contract.d.ts +25 -0
- package/dist/contracts/offload.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.d.ts +8 -0
- package/dist/contracts/ports.contract.d.ts.map +1 -1
- package/dist/contracts/ports.contract.js +6 -5
- package/dist/contracts/ports.contract.js.map +1 -1
- package/dist/contracts/remote.contract.d.ts +1 -0
- package/dist/contracts/remote.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.d.ts +1203 -9
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +49 -2
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/runners.contract.d.ts +16 -0
- package/dist/contracts/runners.contract.d.ts.map +1 -0
- package/dist/contracts/runners.contract.js +15 -0
- package/dist/contracts/runners.contract.js.map +1 -0
- package/dist/contracts/safety.contract.d.ts.map +1 -1
- package/dist/contracts/safety.contract.js +1 -0
- package/dist/contracts/safety.contract.js.map +1 -1
- package/dist/contracts/seal.contract.d.ts +100 -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 +27 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +159 -2
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +59 -42
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +19 -0
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/skills.contract.d.ts +6 -0
- package/dist/contracts/skills.contract.d.ts.map +1 -1
- package/dist/contracts/stack-grants.contract.d.ts +418 -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 +516 -69
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +26 -45
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/usage.contract.d.ts +3 -0
- package/dist/contracts/usage.contract.d.ts.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 +615 -8
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +2 -2
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/agent-transcript.d.ts +159 -2
- package/dist/events/agent-transcript.d.ts.map +1 -1
- package/dist/events/agent-words.d.ts +5 -0
- package/dist/events/agent-words.d.ts.map +1 -1
- package/dist/events/agent-words.js +22 -2
- 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/refusal-incidents.d.ts +1 -0
- package/dist/events/refusal-incidents.d.ts.map +1 -1
- package/dist/events/refusal-incidents.js +42 -19
- package/dist/events/refusal-incidents.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 +98 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +799 -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 +1 -0
- package/dist/ids/conversation-ids.d.ts.map +1 -1
- package/dist/ids/conversation-ids.js +2 -1
- package/dist/ids/conversation-ids.js.map +1 -1
- package/dist/ids/project-id.d.ts.map +1 -1
- package/dist/ids/project-id.js +4 -4
- package/dist/ids/project-id.js.map +1 -1
- package/dist/ids/run-row-ids.d.ts +8 -0
- package/dist/ids/run-row-ids.d.ts.map +1 -0
- package/dist/ids/run-row-ids.js +32 -0
- package/dist/ids/run-row-ids.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/models/agent-catalog.d.ts.map +1 -1
- package/dist/models/agent-catalog.js +3 -2
- package/dist/models/agent-catalog.js.map +1 -1
- package/dist/models/agent-lanes.d.ts.map +1 -1
- package/dist/models/agent-lanes.js +4 -1
- package/dist/models/agent-lanes.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +2 -2
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/models/agent-standing.d.ts +6 -1
- package/dist/models/agent-standing.d.ts.map +1 -1
- package/dist/models/agent-standing.js +1 -0
- package/dist/models/agent-standing.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/models/providers/provider-traits.d.ts +215 -0
- package/dist/models/providers/provider-traits.d.ts.map +1 -0
- package/dist/models/providers/provider-traits.js +60 -0
- package/dist/models/providers/provider-traits.js.map +1 -0
- package/dist/netd/browser-wire.d.ts +8 -0
- package/dist/netd/browser-wire.d.ts.map +1 -1
- package/dist/netd/browser-wire.js +5 -0
- package/dist/netd/browser-wire.js.map +1 -1
- package/dist/netd/generated/wire.d.ts +42 -1
- package/dist/netd/generated/wire.d.ts.map +1 -1
- package/dist/policy/admin/admin-grant.d.ts +21 -0
- package/dist/policy/admin/admin-grant.d.ts.map +1 -0
- package/dist/policy/admin/admin-grant.js +41 -0
- package/dist/policy/admin/admin-grant.js.map +1 -0
- 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/capabilities/capability-kinds.d.ts +268 -0
- package/dist/policy/capabilities/capability-kinds.d.ts.map +1 -0
- package/dist/policy/capabilities/capability-kinds.js +47 -0
- package/dist/policy/capabilities/capability-kinds.js.map +1 -0
- package/dist/policy/command-classes.d.ts.map +1 -1
- package/dist/policy/command-classes.js +3 -1
- package/dist/policy/command-classes.js.map +1 -1
- package/dist/policy/device-programs.d.ts +79 -2
- package/dist/policy/device-programs.d.ts.map +1 -1
- package/dist/policy/device-programs.js +15 -16
- package/dist/policy/device-programs.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/reserved-servers.d.ts.map +1 -1
- package/dist/policy/reserved-servers.js +5 -1
- package/dist/policy/reserved-servers.js.map +1 -1
- package/dist/policy/role-capability.d.ts.map +1 -1
- package/dist/policy/role-capability.js +2 -1
- package/dist/policy/role-capability.js.map +1 -1
- package/dist/policy/shell/command-normalise.d.ts +10 -0
- package/dist/policy/shell/command-normalise.d.ts.map +1 -0
- package/dist/policy/shell/command-normalise.js +153 -0
- package/dist/policy/shell/command-normalise.js.map +1 -0
- 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 +11 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/listener-protocol.js +5 -0
- package/dist/protocol/doors/listener-protocol.js.map +1 -1
- package/dist/protocol/doors/loopback-proof.d.ts +8 -0
- package/dist/protocol/doors/loopback-proof.d.ts.map +1 -0
- package/dist/protocol/doors/loopback-proof.js +11 -0
- package/dist/protocol/doors/loopback-proof.js.map +1 -0
- package/dist/protocol/doors/pass-scopes.d.ts +4 -0
- package/dist/protocol/doors/pass-scopes.d.ts.map +1 -0
- package/dist/protocol/doors/pass-scopes.js +3 -0
- package/dist/protocol/doors/pass-scopes.js.map +1 -0
- package/dist/protocol/doors/runner-protocol.d.ts +187 -0
- package/dist/protocol/doors/runner-protocol.d.ts.map +1 -1
- package/dist/protocol/doors/runner-protocol.js +48 -1
- package/dist/protocol/doors/runner-protocol.js.map +1 -1
- package/dist/protocol/doors/sandbox-pass.d.ts +19 -2
- package/dist/protocol/doors/sandbox-pass.d.ts.map +1 -1
- package/dist/protocol/doors/sandbox-pass.js +42 -10
- package/dist/protocol/doors/sandbox-pass.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/member-reach.d.ts +6 -0
- package/dist/protocol/member-reach.d.ts.map +1 -1
- package/dist/protocol/member-reach.js +24 -0
- package/dist/protocol/member-reach.js.map +1 -1
- package/dist/protocol/peer-mcp-server.d.ts +2 -0
- package/dist/protocol/peer-mcp-server.d.ts.map +1 -1
- package/dist/protocol/peer-mcp-server.js +1 -0
- package/dist/protocol/peer-mcp-server.js.map +1 -1
- package/dist/protocol/raw/extension-protocol.d.ts +518 -0
- package/dist/protocol/raw/extension-protocol.d.ts.map +1 -1
- package/dist/protocol/raw/extension-protocol.js +276 -0
- package/dist/protocol/raw/extension-protocol.js.map +1 -1
- package/dist/protocol/raw/raw-json-routes.d.ts +572 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-json-routes.js +25 -2
- package/dist/protocol/raw/raw-json-routes.js.map +1 -1
- package/dist/protocol/raw/raw-routes.d.ts +245 -3
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -1
- package/dist/protocol/raw/raw-routes.js +79 -36
- package/dist/protocol/raw/raw-routes.js.map +1 -1
- package/dist/protocol/route-meta.d.ts.map +1 -1
- package/dist/protocol/route-meta.js.map +1 -1
- package/dist/schemas/account-routes.d.ts +176 -0
- package/dist/schemas/account-routes.d.ts.map +1 -0
- package/dist/schemas/account-routes.js +73 -0
- package/dist/schemas/account-routes.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-background.d.ts +48 -0
- package/dist/schemas/agent-background.d.ts.map +1 -0
- package/dist/schemas/agent-background.js +63 -0
- package/dist/schemas/agent-background.js.map +1 -0
- package/dist/schemas/agent-land.d.ts +7 -0
- package/dist/schemas/agent-land.d.ts.map +1 -1
- package/dist/schemas/agent-land.js +11 -0
- package/dist/schemas/agent-land.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 +40 -0
- package/dist/schemas/agents-list.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +668 -17
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +16 -41
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/auto-approve.d.ts +12 -0
- package/dist/schemas/auto-approve.d.ts.map +1 -0
- package/dist/schemas/auto-approve.js +12 -0
- package/dist/schemas/auto-approve.js.map +1 -0
- package/dist/schemas/automations.d.ts +170 -27
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +26 -34
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/bridge-heads.d.ts +57 -0
- package/dist/schemas/bridge-heads.d.ts.map +1 -0
- package/dist/schemas/bridge-heads.js +22 -0
- package/dist/schemas/bridge-heads.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +21 -0
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +6 -0
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/checkout-hooks.d.ts +24 -0
- package/dist/schemas/checkout-hooks.d.ts.map +1 -0
- package/dist/schemas/checkout-hooks.js +23 -0
- package/dist/schemas/checkout-hooks.js.map +1 -0
- 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-fleet.d.ts +216 -0
- package/dist/schemas/ci-fleet.d.ts.map +1 -0
- package/dist/schemas/ci-fleet.js +87 -0
- package/dist/schemas/ci-fleet.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-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/connection-hub.d.ts +3 -1
- package/dist/schemas/connection-hub.d.ts.map +1 -1
- package/dist/schemas/connection-hub.js +2 -1
- package/dist/schemas/connection-hub.js.map +1 -1
- package/dist/schemas/context-continues.d.ts.map +1 -1
- package/dist/schemas/context-continues.js +2 -2
- package/dist/schemas/context-continues.js.map +1 -1
- 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 +137 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +11 -2
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/environment.d.ts +1 -0
- package/dist/schemas/environment.d.ts.map +1 -1
- package/dist/schemas/environment.js +1 -0
- package/dist/schemas/environment.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +1186 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +22 -4
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/git/git.d.ts +13 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +7 -7
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/git/index-run.d.ts +1 -0
- package/dist/schemas/git/index-run.d.ts.map +1 -1
- package/dist/schemas/host-power.d.ts +76 -0
- package/dist/schemas/host-power.d.ts.map +1 -0
- package/dist/schemas/host-power.js +101 -0
- package/dist/schemas/host-power.js.map +1 -0
- package/dist/schemas/hosts.d.ts +365 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +33 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/issues.d.ts +55 -225
- package/dist/schemas/issues.d.ts.map +1 -1
- package/dist/schemas/issues.js +21 -43
- package/dist/schemas/issues.js.map +1 -1
- package/dist/schemas/keyring-native.d.ts.map +1 -1
- package/dist/schemas/keyring-native.js +3 -1
- package/dist/schemas/keyring-native.js.map +1 -1
- package/dist/schemas/keyring.d.ts +1 -0
- package/dist/schemas/keyring.d.ts.map +1 -1
- package/dist/schemas/keyring.js +3 -1
- package/dist/schemas/keyring.js.map +1 -1
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/members.d.ts.map +1 -1
- package/dist/schemas/members.js +2 -14
- package/dist/schemas/members.js.map +1 -1
- package/dist/schemas/metrics.d.ts +33 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +26 -0
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/need-kinds.d.ts +19 -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 +868 -27
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +79 -9
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.d.ts +61 -0
- package/dist/schemas/offload.d.ts.map +1 -1
- package/dist/schemas/offload.js +14 -1
- 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/ports.d.ts +4 -0
- package/dist/schemas/ports.d.ts.map +1 -1
- package/dist/schemas/ports.js +3 -0
- package/dist/schemas/ports.js.map +1 -1
- package/dist/schemas/providers/capacity.d.ts +6 -0
- package/dist/schemas/providers/capacity.d.ts.map +1 -1
- 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/providers/refusals.d.ts +12 -0
- package/dist/schemas/providers/refusals.d.ts.map +1 -1
- package/dist/schemas/providers/refusals.js +4 -0
- package/dist/schemas/providers/refusals.js.map +1 -1
- package/dist/schemas/remote-access.d.ts +1 -0
- package/dist/schemas/remote-access.d.ts.map +1 -1
- package/dist/schemas/remote-access.js +1 -0
- package/dist/schemas/remote-access.js.map +1 -1
- package/dist/schemas/run-targets.d.ts.map +1 -1
- package/dist/schemas/run-targets.js +2 -1
- package/dist/schemas/run-targets.js.map +1 -1
- package/dist/schemas/runner-views.d.ts +24 -0
- package/dist/schemas/runner-views.d.ts.map +1 -0
- package/dist/schemas/runner-views.js +16 -0
- package/dist/schemas/runner-views.js.map +1 -0
- package/dist/schemas/sandbox-reach.d.ts +157 -0
- package/dist/schemas/sandbox-reach.d.ts.map +1 -0
- package/dist/schemas/sandbox-reach.js +112 -0
- package/dist/schemas/sandbox-reach.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 +20 -42
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +24 -7
- 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/system.d.ts +19 -0
- package/dist/schemas/system.d.ts.map +1 -1
- package/dist/schemas/system.js +9 -0
- package/dist/schemas/system.js.map +1 -1
- package/dist/schemas/terminal.d.ts +46 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +19 -0
- package/dist/schemas/terminal.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 +3 -0
- package/dist/state/auth-state.js.map +1 -1
- package/dist/state/definition.d.ts +16 -8
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/runtime-state.d.ts +1 -1
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +1 -1
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +9 -4
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +9 -4
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/sync/workspace-sync-ignores.d.ts +4 -0
- package/dist/sync/workspace-sync-ignores.d.ts.map +1 -0
- package/dist/sync/workspace-sync-ignores.js +75 -0
- package/dist/sync/workspace-sync-ignores.js.map +1 -0
- package/dist/text/pages.d.ts.map +1 -1
- package/dist/text/pages.js +17 -4
- package/dist/text/pages.js.map +1 -1
- package/dist/text/transcript-fold.js +2 -2
- package/dist/text/transcript-fold.js.map +1 -1
- package/package.json +5 -5
- package/src/app-routes/app-pages.ts +3 -0
- package/src/app-routes/index.ts +1 -0
- package/src/app-routes/return-path.ts +16 -0
- 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/accounts.contract.ts +3 -0
- package/src/contracts/agents.contract.ts +41 -5
- package/src/contracts/automations.contract.ts +2 -0
- package/src/contracts/capabilities.contract.ts +31 -2
- package/src/contracts/ci.contract.ts +119 -37
- package/src/contracts/device-ci-runners.contract.ts +81 -0
- package/src/contracts/device-stacks.contract.ts +97 -0
- package/src/contracts/extensions.contract.ts +12 -1
- package/src/contracts/ports.contract.ts +6 -6
- package/src/contracts/runner.contract.ts +117 -3
- package/src/contracts/runners.contract.ts +19 -0
- package/src/contracts/safety.contract.ts +2 -0
- package/src/contracts/secrets.contract.ts +39 -0
- package/src/contracts/settings.contract.ts +26 -0
- package/src/contracts/stack-grants.contract.ts +51 -0
- package/src/contracts/system.contract.ts +36 -62
- package/src/contracts/workspace.contract.ts +0 -22
- package/src/events/agent-events.ts +3 -2
- package/src/events/agent-words.test.ts +19 -1
- package/src/events/agent-words.ts +36 -2
- 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/refusal-incidents.ts +60 -19
- package/src/events/requests.ts +18 -0
- package/src/events/transcript.ts +10 -1
- package/src/ids/conversation-ids.test.ts +3 -1
- package/src/ids/conversation-ids.ts +6 -4
- package/src/ids/project-dir.test.ts +1 -1
- package/src/ids/project-dir.ts +1 -1
- package/src/ids/project-id.test.ts +14 -0
- package/src/ids/project-id.ts +6 -4
- package/src/ids/run-row-ids.test.ts +38 -0
- package/src/ids/run-row-ids.ts +49 -0
- package/src/index.ts +6 -6
- package/src/models/agent-catalog.test.ts +7 -4
- package/src/models/agent-catalog.ts +3 -2
- package/src/models/agent-lanes.ts +8 -1
- package/src/models/agent-runtimes.ts +7 -6
- package/src/models/agent-standing.ts +13 -0
- 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/models/provider-specs.test.ts +2 -2
- package/src/models/providers/provider-traits.test.ts +71 -0
- package/src/models/providers/provider-traits.ts +144 -0
- package/src/netd/browser-wire.ts +13 -0
- package/src/netd/generated/browser-wire.json +10 -0
- package/src/netd/generated/netd-wire.json +224 -1
- package/src/netd/generated/wire.ts +18 -6
- package/src/netd/wire-manifests.test.ts +16 -0
- package/src/policy/admin/admin-grant.ts +69 -0
- package/src/policy/approvals-execution.ts +11 -6
- package/src/policy/batch-runs.ts +2 -2
- package/src/policy/capabilities/capability-kinds.test.ts +112 -0
- package/src/policy/capabilities/capability-kinds.ts +110 -0
- package/src/policy/command-classes.ts +5 -3
- package/src/policy/credential-material.ts +1 -1
- package/src/policy/device-programs.ts +29 -20
- package/src/policy/message-limits.ts +8 -4
- package/src/policy/org-locks.ts +1 -0
- package/src/policy/overlay-lint.ts +1 -1
- package/src/policy/reserved-servers.ts +5 -1
- package/src/policy/role-capability.ts +3 -1
- package/src/policy/shell/command-normalise.test.ts +72 -0
- package/src/policy/shell/command-normalise.ts +212 -0
- package/src/policy/shell/workspace-root-exclude.ts +11 -0
- package/src/policy/tests/admin-grant.test.ts +35 -0
- package/src/policy/tests/command-classes.test.ts +41 -0
- package/src/protocol/doors/listener-protocol.ts +32 -1
- package/src/protocol/doors/loopback-proof.ts +34 -0
- package/src/protocol/doors/pass-scopes.ts +12 -0
- package/src/protocol/doors/runner-protocol.ts +133 -4
- package/src/protocol/doors/sandbox-pass.test.ts +33 -1
- package/src/protocol/doors/sandbox-pass.ts +92 -16
- package/src/protocol/doors/webext-links.ts +3 -1
- package/src/protocol/ingress-contract.fixture.json +5 -1
- package/src/protocol/member-reach.test.ts +40 -1
- package/src/protocol/member-reach.ts +40 -0
- package/src/protocol/peer-mcp-server.ts +6 -0
- package/src/protocol/raw/extension-protocol.ts +469 -2
- package/src/protocol/raw/raw-json-routes.ts +45 -1
- package/src/protocol/raw/raw-routes.ts +133 -40
- package/src/protocol/route-meta.ts +4 -1
- package/src/schemas/account-routes.ts +126 -0
- package/src/schemas/activity.ts +6 -4
- package/src/schemas/agent-background.ts +104 -0
- package/src/schemas/agent-land.ts +21 -2
- package/src/schemas/agent.test.ts +3 -0
- package/src/schemas/agent.ts +10 -4
- package/src/schemas/agents.ts +26 -65
- package/src/schemas/auto-approve.ts +31 -0
- package/src/schemas/automations.ts +51 -42
- package/src/schemas/bridge-heads.ts +33 -0
- package/src/schemas/capabilities.ts +23 -0
- package/src/schemas/checkout-hooks.ts +44 -0
- package/src/schemas/ci-deployments.ts +26 -0
- package/src/schemas/ci-fleet.ts +180 -0
- package/src/schemas/ci.ts +185 -45
- package/src/schemas/command-run.ts +44 -0
- package/src/schemas/compose-overlay.test.ts +1 -1
- package/src/schemas/compose-overlay.ts +1 -1
- package/src/schemas/connection-hub.ts +4 -2
- package/src/schemas/context-continues.ts +6 -3
- package/src/schemas/data-protection.ts +28 -34
- package/src/schemas/device-stacks.ts +162 -3
- package/src/schemas/device-swaps.test.ts +1 -1
- package/src/schemas/devices.ts +31 -2
- package/src/schemas/egress-private.test.ts +1 -1
- package/src/schemas/environment.ts +4 -0
- package/src/schemas/extension-updates.ts +35 -7
- package/src/schemas/git/git.ts +14 -14
- package/src/schemas/host-power.test.ts +53 -0
- package/src/schemas/host-power.ts +173 -0
- package/src/schemas/hosts.test.ts +32 -0
- package/src/schemas/hosts.ts +86 -2
- package/src/schemas/intentic-os.ts +2 -2
- package/src/schemas/issues.ts +43 -86
- package/src/schemas/keyring-native.test.ts +11 -3
- package/src/schemas/keyring-native.ts +3 -1
- package/src/schemas/keyring.ts +6 -1
- package/src/schemas/maintenance.ts +4 -3
- package/src/schemas/members.ts +4 -16
- package/src/schemas/metrics.test.ts +9 -1
- package/src/schemas/metrics.ts +43 -0
- package/src/schemas/need-kinds.ts +13 -0
- package/src/schemas/needs.ts +118 -14
- package/src/schemas/offload.ts +37 -3
- package/src/schemas/outward-action.ts +47 -0
- package/src/schemas/ports.ts +5 -0
- package/src/schemas/providers/plan-limits.ts +1 -0
- package/src/schemas/providers/refusals.ts +9 -0
- package/src/schemas/remote-access.ts +3 -0
- package/src/schemas/run-targets.ts +2 -1
- package/src/schemas/runner-views.ts +27 -0
- package/src/schemas/sandbox-reach.ts +161 -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 +24 -23
- package/src/schemas/settings.ts +55 -22
- package/src/schemas/stack-grants.ts +59 -0
- package/src/schemas/state-plan.test.ts +1 -1
- package/src/schemas/state-plan.ts +2 -2
- package/src/schemas/system.ts +16 -1
- package/src/schemas/terminal.ts +28 -0
- package/src/schemas/updates.test.ts +1 -1
- package/src/schemas/updates.ts +1 -1
- package/src/schemas/version-seam.test.ts +4 -1
- 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 +10 -0
- package/src/state/runtime-state.test.ts +3 -2
- package/src/state/runtime-state.ts +3 -1
- package/src/state/update-probation.ts +1 -1
- package/src/state/ways-back.test.ts +1 -1
- package/src/state/workspace-state.test.ts +2 -0
- package/src/state/workspace-state.ts +21 -21
- package/src/sync/workspace-sync-ignores.test.ts +48 -0
- package/src/sync/workspace-sync-ignores.ts +143 -0
- package/src/text/embed.ts +2 -2
- package/src/text/pages.ts +34 -7
- package/src/text/transcript-fold.test.ts +40 -2
- package/src/text/transcript-fold.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 -95
- 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
|
@@ -30,6 +30,16 @@ export const StackServiceSchema = z.object({
|
|
|
30
30
|
});
|
|
31
31
|
export type StackService = z.infer<typeof StackServiceSchema>;
|
|
32
32
|
|
|
33
|
+
// (2026-11-25) Who deployed a stack: the machine records the calling sandbox (its link, never a value the call names) in
|
|
34
|
+
// `.intentic-deploy.json`, and refuses deploy_stack, stack_action and stack_logs on that stack to every other sandbox.
|
|
35
|
+
// `list_stacks` shows it on managed stacks so a board can say "deployed by another sandbox" instead of offering buttons.
|
|
36
|
+
export const StackOwnerSchema = z.object({
|
|
37
|
+
// The sandbox's URL as the link knows it, and whether that is the caller.
|
|
38
|
+
sandbox: z.string(),
|
|
39
|
+
you: z.boolean(),
|
|
40
|
+
});
|
|
41
|
+
export type StackOwner = z.infer<typeof StackOwnerSchema>;
|
|
42
|
+
|
|
33
43
|
export const DeviceStackSchema = z.object({
|
|
34
44
|
name: StackNameSchema,
|
|
35
45
|
// Compose's own summary ("running(2)", "exited(1), running(1)"), passed through.
|
|
@@ -41,6 +51,9 @@ export const DeviceStackSchema = z.object({
|
|
|
41
51
|
workingDir: z.string().optional(),
|
|
42
52
|
// Deployed by Intentic into the machine's stacks folder (`root`), rather than started by hand or by another tool.
|
|
43
53
|
managed: z.boolean(),
|
|
54
|
+
// (2026-11-25) The sandbox that deployed a managed stack, from an agent with `stacks-managed`; absent on an unmanaged
|
|
55
|
+
// stack, on one deployed before the agent recorded owners, and from an older agent.
|
|
56
|
+
owner: StackOwnerSchema.optional(),
|
|
44
57
|
// A project whose containers belong to an Intentic sandbox (`dev.intentic.kind`): the Devices view drives those,
|
|
45
58
|
// not a deployments board.
|
|
46
59
|
sandbox: z.boolean(),
|
|
@@ -90,8 +103,9 @@ export type DeviceStackLogsInput = z.infer<typeof DeviceStackLogsInputSchema>;
|
|
|
90
103
|
|
|
91
104
|
// Deploy a workspace repository's COMMITTED tree (its HEAD, never the uncommitted edits around it) to a device as a
|
|
92
105
|
// compose stack: the daemon packs it, carries it over the device link, and the machine copies it into `<root>/<name>`
|
|
93
|
-
// and brings it up with `--build`. A `.env` already in that folder is kept and never overwritten or sent
|
|
94
|
-
//
|
|
106
|
+
// and brings it up with `--build`. A `.env` already in that folder is kept and never overwritten or sent. A managed
|
|
107
|
+
// deploy (DeviceStackManagedDeployInputSchema below) is how the Deployments extension deploys a stack a repository
|
|
108
|
+
// declares, its `.env` filled from the sandbox's secrets under that stack's grant (stack-grants.ts).
|
|
95
109
|
export const DeviceStackDeployInputSchema = z.object({
|
|
96
110
|
id: DeviceIdSchema,
|
|
97
111
|
name: StackNameSchema,
|
|
@@ -113,14 +127,159 @@ export const DeviceStackDeployResultSchema = z.object({
|
|
|
113
127
|
});
|
|
114
128
|
export type DeviceStackDeployResult = z.infer<typeof DeviceStackDeployResultSchema>;
|
|
115
129
|
|
|
130
|
+
// (2026-11-25) MANAGED DEPLOYS: what a managed deploy (DeviceStackManagedDeployInputSchema) adds to the machine's deploy
|
|
131
|
+
// tool. The daemon renders every `{{secret:…}}` before sending, so these fields carry values, over the
|
|
132
|
+
// device link only, and the machine writes them where compose and docker read them and nowhere else. Sent only to an
|
|
133
|
+
// agent advertising `stacks-managed` (hosts.ts): the args are strict, and an older agent rejects a field it lacks.
|
|
134
|
+
|
|
135
|
+
// How the stack's images come to be: `build` is `up --build` from the deployed tree (what every deploy did before),
|
|
136
|
+
// `images` pulls what the compose file names and never builds.
|
|
137
|
+
export const StackDeployModeSchema = z.enum(["images", "build"]);
|
|
138
|
+
export type StackDeployMode = z.infer<typeof StackDeployModeSchema>;
|
|
139
|
+
|
|
140
|
+
// A registry login, rendered: written into the stack's OWN docker config (`<stack>/.intentic-stack/docker/config.json`), never
|
|
141
|
+
// the machine's, and handed to compose as DOCKER_CONFIG for this stack's pulls alone.
|
|
142
|
+
export const StackRegistryLoginSchema = z
|
|
143
|
+
.object({
|
|
144
|
+
host: z
|
|
145
|
+
.string()
|
|
146
|
+
.min(1)
|
|
147
|
+
.max(253)
|
|
148
|
+
.regex(/^[A-Za-z0-9.-]+(?::\d{1,5})?$/, "a registry host, like ghcr.io or registry.gitlab.com"),
|
|
149
|
+
username: z.string().min(1).max(200),
|
|
150
|
+
password: z.string().min(1).max(10_000),
|
|
151
|
+
})
|
|
152
|
+
.strict();
|
|
153
|
+
export type StackRegistryLogin = z.infer<typeof StackRegistryLoginSchema>;
|
|
154
|
+
|
|
155
|
+
// A command run by the machine's shell in the stack's folder (`sh -c` on Linux and macOS), with COMPOSE_PROJECT_NAME set
|
|
156
|
+
// to the stack. `preDeploy` runs after the new files are in place and before compose touches a container, and a non-zero
|
|
157
|
+
// exit stops the deploy there; `postDeploy` runs once the stack is healthy, and its failure fails the deploy.
|
|
158
|
+
export const StackHookSchema = z.string().min(1).max(4000);
|
|
159
|
+
export const StackHooksSchema = z.object({ preDeploy: StackHookSchema.optional(), postDeploy: StackHookSchema.optional() }).strict();
|
|
160
|
+
export type StackHooks = z.infer<typeof StackHooksSchema>;
|
|
161
|
+
|
|
162
|
+
export const STACK_HEALTH_TIMEOUT_DEFAULT_S = 180;
|
|
163
|
+
// At most ten minutes: the whole deploy (files, hooks, pull, up, health) is one device call under the daemon's ceiling.
|
|
164
|
+
export const STACK_HEALTH_TIMEOUT_MAX_S = 600;
|
|
165
|
+
// How the machine decides a deploy came up: every service running and none restarting, each healthcheck a service
|
|
166
|
+
// declares `healthy`, and each `http` URL (fetched from the machine, so a stack's own loopback ports count) answering
|
|
167
|
+
// 2xx, all within `timeoutSeconds`. The first seconds are not trusted: an old container may still be answering.
|
|
168
|
+
export const StackHealthSchema = z
|
|
169
|
+
.object({
|
|
170
|
+
timeoutSeconds: z.number().int().min(10).max(STACK_HEALTH_TIMEOUT_MAX_S).default(STACK_HEALTH_TIMEOUT_DEFAULT_S),
|
|
171
|
+
http: z.array(z.string().url().max(2000)).max(5).default([]),
|
|
172
|
+
})
|
|
173
|
+
.strict();
|
|
174
|
+
export type StackHealth = z.infer<typeof StackHealthSchema>;
|
|
175
|
+
|
|
176
|
+
// service → image reference pinned by digest (`ghcr.io/o/api@sha256:…`), laid over the compose file as an override
|
|
177
|
+
// (`<stack>/.intentic-stack/pins.yaml`): how a rollback runs exactly the images the earlier deploy ran.
|
|
178
|
+
export const StackImagePinsSchema = z.record(z.string().min(1).max(200), z.string().min(1).max(500));
|
|
179
|
+
export type StackImagePins = z.infer<typeof StackImagePinsSchema>;
|
|
180
|
+
|
|
116
181
|
// The machine's own tool arguments for a deploy: the folder `stageArtifact` unpacked the bundle into, the stack name,
|
|
117
|
-
// the compose file inside it and the commit, recorded beside the stack.
|
|
182
|
+
// the compose file inside it and the commit, recorded beside the stack. Every field after `commit` is a managed deploy's
|
|
183
|
+
// (`stacks-managed`), absent from a plain one, which behaves exactly as before: `--build`, and any `.env` there kept.
|
|
118
184
|
export const DeployStackToolArgsSchema = z
|
|
119
185
|
.object({
|
|
120
186
|
source: z.string().min(1),
|
|
121
187
|
name: StackNameSchema,
|
|
122
188
|
composeFile: ComposeFilePathSchema,
|
|
123
189
|
commit: z.string().regex(/^[0-9a-f]{40,64}$/),
|
|
190
|
+
mode: StackDeployModeSchema.optional(),
|
|
191
|
+
// The whole `.env`, rendered (dotenv lines). Written 0600 and atomically, its sha256 kept in the deploy record; a
|
|
192
|
+
// `.env` there that is not the one the last managed deploy wrote (hand-placed, or edited since) is refused, never
|
|
193
|
+
// overwritten, and the refusal says so. Absent: a `.env` there is left as it is.
|
|
194
|
+
env: z.string().max(256 * 1024).optional(),
|
|
195
|
+
registries: z.array(StackRegistryLoginSchema).max(10).optional(),
|
|
196
|
+
hooks: StackHooksSchema.optional(),
|
|
197
|
+
health: StackHealthSchema.optional(),
|
|
198
|
+
pins: StackImagePinsSchema.optional(),
|
|
199
|
+
// Take over a compose project of this name that no deploy put here (a stack another tool ran, such as Komodo),
|
|
200
|
+
// when none of its containers is running: its named volumes, which compose prefixes with the project name, carry
|
|
201
|
+
// over. A running one is still refused.
|
|
202
|
+
adopt: z.boolean().optional(),
|
|
124
203
|
})
|
|
125
204
|
.strict();
|
|
126
205
|
export type DeployStackToolArgs = z.infer<typeof DeployStackToolArgsSchema>;
|
|
206
|
+
|
|
207
|
+
// service → the image it runs, pinned (`repo@sha256:…`); a locally built image has no registry digest and reads as its
|
|
208
|
+
// image id (`sha256:…`).
|
|
209
|
+
export const StackImageDigestsSchema = z.record(z.string(), z.string());
|
|
210
|
+
export type StackImageDigests = z.infer<typeof StackImageDigestsSchema>;
|
|
211
|
+
|
|
212
|
+
// What `deploy_stack` answers. A plain deploy answers `path` and `output` alone, as it always did; a managed one adds
|
|
213
|
+
// what it ran and how it came up. A failure is a tool error carrying the same story in words.
|
|
214
|
+
export const DeployStackToolResultSchema = z.object({
|
|
215
|
+
path: z.string(),
|
|
216
|
+
output: z.string(),
|
|
217
|
+
digests: StackImageDigestsSchema.optional(),
|
|
218
|
+
// sha256 (hex) of the `.env` this deploy wrote; absent when it wrote none.
|
|
219
|
+
envDigest: z.string().optional(),
|
|
220
|
+
// How long the stack took to come up healthy, in seconds.
|
|
221
|
+
healthySeconds: z.number().optional(),
|
|
222
|
+
});
|
|
223
|
+
export type DeployStackToolResult = z.infer<typeof DeployStackToolResultSchema>;
|
|
224
|
+
|
|
225
|
+
// ---- (2026-11-25) the managed deploy route: the core primitive the Deployments extension's engine stands on ----------
|
|
226
|
+
// The extension holds the policy (its stacks manifest, queue, history, triggers, rollback); the daemon holds what no
|
|
227
|
+
// extension may: secret VALUES. The extension sends `env` and registry passwords with `{{secret:NAME}}` references in
|
|
228
|
+
// them (its own placeholders already filled); the daemon checks the stack's grant (stack-grants.ts), fills the
|
|
229
|
+
// references from its own secret store, logs each use, packs the repository at the commit, carries it to the computer
|
|
230
|
+
// and relays `deploy_stack`. No value reaches the extension: not in the answer, not in an error.
|
|
231
|
+
export const DeviceStackManagedDeployInputSchema = z
|
|
232
|
+
.object({
|
|
233
|
+
id: DeviceIdSchema,
|
|
234
|
+
name: StackNameSchema,
|
|
235
|
+
repo: z.string().min(1).max(500),
|
|
236
|
+
// A full or abbreviated commit, fetched from the repository's remote when the checkout lacks it. Absent: HEAD.
|
|
237
|
+
commit: z
|
|
238
|
+
.string()
|
|
239
|
+
.regex(/^[0-9a-f]{7,64}$/)
|
|
240
|
+
.optional(),
|
|
241
|
+
composeFile: ComposeFilePathSchema.optional(),
|
|
242
|
+
mode: StackDeployModeSchema,
|
|
243
|
+
// Variable → value; a value may hold `{{secret:NAME}}` references, filled here and nowhere else.
|
|
244
|
+
env: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,127}$/), z.string().max(64 * 1024)).optional(),
|
|
245
|
+
// `password` is normally a `{{secret:NAME}}` reference; `host` and `username` are never filled.
|
|
246
|
+
registries: z.array(StackRegistryLoginSchema).max(10).optional(),
|
|
247
|
+
hooks: StackHooksSchema.optional(),
|
|
248
|
+
health: StackHealthSchema.optional(),
|
|
249
|
+
pins: StackImagePinsSchema.optional(),
|
|
250
|
+
adopt: z.boolean().optional(),
|
|
251
|
+
// One line for the secret-use log: what started it ("CI job images-platform", "by a@b.c").
|
|
252
|
+
reason: z.string().max(200).optional(),
|
|
253
|
+
})
|
|
254
|
+
.strict();
|
|
255
|
+
export type DeviceStackManagedDeployInput = z.infer<typeof DeviceStackManagedDeployInputSchema>;
|
|
256
|
+
|
|
257
|
+
export const DeviceStackManagedDeployResultSchema = DeployStackToolResultSchema.extend({
|
|
258
|
+
stack: StackNameSchema,
|
|
259
|
+
// The full commit that went.
|
|
260
|
+
commit: z.string(),
|
|
261
|
+
// The secret names filled in (never a value), and a keyed mark of each value as it went (secrets.ts
|
|
262
|
+
// SecretMarksResponseSchema): what lets the extension tell later that one changed in the store, never holding it.
|
|
263
|
+
secretNames: z.array(z.string()),
|
|
264
|
+
secretMarks: z.record(z.string(), z.string()),
|
|
265
|
+
});
|
|
266
|
+
export type DeviceStackManagedDeployResult = z.infer<typeof DeviceStackManagedDeployResultSchema>;
|
|
267
|
+
|
|
268
|
+
// What `host_stats` answers (device feature `host-stats`), relayed by `GET /system/devices/{id}/host-stats`.
|
|
269
|
+
export const HostStatsSchema = z.object({
|
|
270
|
+
disks: z.array(
|
|
271
|
+
z.object({
|
|
272
|
+
// What the path is: Docker's data root, the stacks folder.
|
|
273
|
+
role: z.enum(["docker", "stacks"]),
|
|
274
|
+
path: z.string(),
|
|
275
|
+
totalBytes: z.number(),
|
|
276
|
+
freeBytes: z.number(),
|
|
277
|
+
}),
|
|
278
|
+
),
|
|
279
|
+
memory: z.object({ totalBytes: z.number(), availableBytes: z.number() }),
|
|
280
|
+
// 1, 5 and 15 minute load averages; zeros where the OS keeps none (Windows).
|
|
281
|
+
load: z.tuple([z.number(), z.number(), z.number()]),
|
|
282
|
+
cpus: z.number(),
|
|
283
|
+
});
|
|
284
|
+
export type HostStats = z.infer<typeof HostStatsSchema>;
|
|
285
|
+
export const DeviceHostStatsInputSchema = z.object({ id: DeviceIdSchema });
|
|
@@ -4,7 +4,7 @@ import { packageRoot } from "@intentic/constants/node";
|
|
|
4
4
|
import { DeviceSwapsSchema } from "./device-swaps.js";
|
|
5
5
|
|
|
6
6
|
// The rows `ic sandbox swaps --json` answers, as examples: golden/swap-verdicts.json holds each of ic's records and the
|
|
7
|
-
// row it gives (the Rust test,
|
|
7
|
+
// row it gives (the Rust test, _hosts/ic/src/sandbox/swaps.rs, builds every one; the machine agent's fallback is held
|
|
8
8
|
// to the same rows). This is the TS half: the rows ic gives are the rows the contract reads, to the field.
|
|
9
9
|
|
|
10
10
|
interface VerdictCase {
|
package/src/schemas/devices.ts
CHANGED
|
@@ -82,6 +82,10 @@ export const DeviceSandboxSchema = z.object({
|
|
|
82
82
|
sandboxId: z.string().nullable().optional(),
|
|
83
83
|
localPort: z.number().int().nullable().optional(),
|
|
84
84
|
platformId: z.string().nullable().optional(),
|
|
85
|
+
// (2026-11-21) Whose runner this container is: its parent sandbox's address (the RUNNER_PARENT_URL it was made with)
|
|
86
|
+
// and that sandbox's name as the parent last told it (runnerContract.present). Null for a person's sandbox; absent
|
|
87
|
+
// from an older ic.
|
|
88
|
+
runnerOf: z.object({ url: z.string(), name: z.string().nullable().optional() }).nullable().optional(),
|
|
85
89
|
});
|
|
86
90
|
export type DeviceSandbox = z.infer<typeof DeviceSandboxSchema>;
|
|
87
91
|
// One operation on one sandbox, streamed as lines ending in a `result` or `error` frame. `prepare` builds the pending
|
|
@@ -214,9 +218,22 @@ export type DeviceFlowLine = z.infer<typeof DeviceFlowLineSchema>;
|
|
|
214
218
|
// on every sandbox's page and a sibling restarting or asleep must keep this machine, and never the link carrying the
|
|
215
219
|
// request, which is by definition answering. Before 2026-11-17 it took any link that had failed twenty dials (about
|
|
216
220
|
// eight minutes), and one sandbox's button disconnected the machine from another.
|
|
217
|
-
|
|
221
|
+
// `power-stay-on` (2026-11-22) changes the power settings that would sleep the computer through scheduled work, on mains
|
|
222
|
+
// power only (`intentic-machine power stay-on`, `DeviceFacts.power`); only an agent advertising DEVICE_FEATURE_POWER has it.
|
|
223
|
+
// `update-pause` and `before-sign-in` (2026-11-27) answer Windows Update's night restarts (`update-restart` in
|
|
224
|
+
// host-power.ts): Windows Update paused until `until`, and Windows' boot task that starts the agent, and with it intentic's
|
|
225
|
+
// engine, before anyone signs in (Windows asks for permission on that PC's screen); only an agent advertising
|
|
226
|
+
// DEVICE_FEATURE_POWER_RESTART has them.
|
|
227
|
+
export const DeviceAgentOpSchema = z.enum(["upgrade", "restart", "forget-unreachable", "power-stay-on", "wsl-memory", "update-pause", "before-sign-in"]);
|
|
218
228
|
export type DeviceAgentOp = z.infer<typeof DeviceAgentOpSchema>;
|
|
219
|
-
|
|
229
|
+
// (2026-11-26) `memoryGb` goes with `wsl-memory` alone, the size the owner approved; sent only to an agent that advertises
|
|
230
|
+
// `wsl-memory`, since the input is strict and an older agent refuses a field it does not know. (2026-11-27) `until` goes
|
|
231
|
+
// with `update-pause` alone, the moment (epoch ms) Windows Update stays paused until.
|
|
232
|
+
export const DeviceAgentFlowSchema = z.strictObject({
|
|
233
|
+
op: DeviceAgentOpSchema,
|
|
234
|
+
memoryGb: z.number().int().min(1).max(1024).optional(),
|
|
235
|
+
until: z.number().int().positive().optional(),
|
|
236
|
+
});
|
|
220
237
|
export type DeviceAgentFlow = z.infer<typeof DeviceAgentFlowSchema>;
|
|
221
238
|
// Adds the device id to the flow input.
|
|
222
239
|
export const DeviceAgentFlowInputSchema = DeviceAgentFlowSchema.extend({ id: z.string().min(1) });
|
|
@@ -647,3 +664,15 @@ export const SyncStatusSchema = z.object({
|
|
|
647
664
|
machines: z.array(DeviceReportSchema).optional(),
|
|
648
665
|
});
|
|
649
666
|
export type SyncStatus = z.infer<typeof SyncStatusSchema>;
|
|
667
|
+
|
|
668
|
+
// GET /system/sync/changes: the workspace's change signal, held open by the daemon until something file sync carries has
|
|
669
|
+
// changed (2026-11-24). A device asks with the generation it last saw (`?after=`, beside `?epoch=`) and is answered at
|
|
670
|
+
// once when the daemon has moved past it or restarted since, else when a change comes or the hold runs out. A device that
|
|
671
|
+
// gets this answer at all knows the sandbox pushes, and lets its own scan of the sandbox fall back to a backstop.
|
|
672
|
+
export const SyncChangesSchema = z.object({
|
|
673
|
+
// This daemon run: a restart starts the count over, so a generation is only comparable within one epoch.
|
|
674
|
+
epoch: z.string(),
|
|
675
|
+
// How many coalesced batches of carried changes this run has seen.
|
|
676
|
+
generation: z.number().int().nonnegative(),
|
|
677
|
+
});
|
|
678
|
+
export type SyncChanges = z.infer<typeof SyncChangesSchema>;
|
|
@@ -3,7 +3,7 @@ import { join } from "node:path";
|
|
|
3
3
|
import { packageRoot } from "@intentic/constants/node";
|
|
4
4
|
import { EGRESS_PRIVATE_V4, EGRESS_PRIVATE_V6 } from "./egress.js";
|
|
5
5
|
|
|
6
|
-
// ic renders these ranges into its nftables rules (
|
|
6
|
+
// ic renders these ranges into its nftables rules (_hosts/ic/src/sandbox/egress/render.rs), and its Rust test reads the
|
|
7
7
|
// same golden, so a range added here and not there fails one side or the other instead of fencing differently.
|
|
8
8
|
// SAFETY: the golden is this package's own file; the assertions below fail on any field it lacks.
|
|
9
9
|
const GOLDEN = JSON.parse(readFileSync(join(packageRoot(import.meta.url), "golden", "egress-private.json"), "utf8")) as {
|
|
@@ -169,6 +169,10 @@ export const EnvironmentSchema = z.object({
|
|
|
169
169
|
// folder holding its file, so the update card offers that rather than an `ic` swap. Absent from an older daemon too,
|
|
170
170
|
// which is why the card still names the compose way beside the `ic` one when it cannot tell.
|
|
171
171
|
manager: z.literal("compose").optional(),
|
|
172
|
+
// Beside `manager`: the file a Compose sandbox's file reads its credentials from (`env_file:`, COMPOSE_CREDENTIALS_FILE
|
|
173
|
+
// in @intentic/sandbox-run). Absent where they are interpolated from the folder's `.env`, as setup wrote them before
|
|
174
|
+
// 2026-11-23, so the rebuild card renders the file that way again.
|
|
175
|
+
composeCredentials: z.string().optional(),
|
|
172
176
|
// A rebuild waiting for the agents to be idle, or started or refused once they were; absent when none is asked.
|
|
173
177
|
rebuildWhenIdle: EnvironmentRebuildWaitSchema.optional(),
|
|
174
178
|
// A checkout rebuild's restart held until no agent is mid-turn; absent when none is asked.
|
|
@@ -11,9 +11,10 @@ const extensionId = z
|
|
|
11
11
|
.min(1)
|
|
12
12
|
.max(121)
|
|
13
13
|
.regex(/^[a-zA-Z0-9][a-zA-Z0-9_.-]*$/);
|
|
14
|
-
// Owner's
|
|
15
|
-
// updates:
|
|
16
|
-
//
|
|
14
|
+
// Owner's update posture, for one extension or as the sandbox's default for every extension without its own answer.
|
|
15
|
+
// updates: auto (the default: apply unattended any release its registry admitted whose powers didn't grow and whose
|
|
16
|
+
// engines this app satisfies, health-watched with auto-revert; anything else waits as with notify), notify (badge and
|
|
17
|
+
// wait) or agent (also prepares an agent diff-read).
|
|
17
18
|
// advisories: auto-disable (default, since disabling runs no new code) or notify.
|
|
18
19
|
export const ExtensionUpdatePolicySchema = z.object({
|
|
19
20
|
updates: z.enum(["notify", "agent", "auto"]),
|
|
@@ -41,7 +42,7 @@ export const ExtensionUpdateSchema = z.object({
|
|
|
41
42
|
.string()
|
|
42
43
|
.optional()
|
|
43
44
|
.describe(
|
|
44
|
-
"Why this one was not taken automatically and is asking for a person instead: it wants more than it used to,
|
|
45
|
+
"Why this one was not taken automatically and is asking for a person instead: it wants more than it used to, needs a newer sandbox, or taking it failed.",
|
|
45
46
|
),
|
|
46
47
|
review: z
|
|
47
48
|
.object({
|
|
@@ -78,6 +79,10 @@ export const ExtensionHealthSchema = z.object({
|
|
|
78
79
|
.boolean()
|
|
79
80
|
.optional()
|
|
80
81
|
.describe("The update was already rolled back without anybody asking. The record stays rather than pretending the attempt never happened."),
|
|
82
|
+
automatic: z
|
|
83
|
+
.boolean()
|
|
84
|
+
.optional()
|
|
85
|
+
.describe("The update was taken by itself under the owner's automatic-updates answer, not by anybody pressing Update."),
|
|
81
86
|
});
|
|
82
87
|
export type ExtensionHealth = z.infer<typeof ExtensionHealthSchema>;
|
|
83
88
|
// Mechanical comparison of two manifests' declared reach (`diffPowers`), as plain sentences the update dialog can
|
|
@@ -122,11 +127,19 @@ export const ExtensionUpdateAppliedSchema = z.object({
|
|
|
122
127
|
export const ExtensionUpdatePolicyInputSchema = z.object({
|
|
123
128
|
id: extensionId.describe("Which extension."),
|
|
124
129
|
updates: z
|
|
125
|
-
.enum(["notify", "agent", "auto"])
|
|
130
|
+
.enum(["notify", "agent", "auto", "default"])
|
|
126
131
|
.optional()
|
|
127
|
-
.describe(
|
|
132
|
+
.describe(
|
|
133
|
+
"What to do about a newer version: tell you, have an agent read the difference first, or just take it. `default` drops this extension's own answer, so it follows the sandbox's.",
|
|
134
|
+
),
|
|
128
135
|
advisories: z.enum(["auto-disable", "notify"]).optional().describe("What to do about a security warning: switch it off at once, or tell you."),
|
|
129
136
|
});
|
|
137
|
+
// The sandbox's answer for every installed extension that has none of its own.
|
|
138
|
+
export const ExtensionUpdateDefaultsInputSchema = z.object({
|
|
139
|
+
updates: z
|
|
140
|
+
.enum(["notify", "agent", "auto"])
|
|
141
|
+
.describe("What every extension without its own answer does about a newer version: tell you, have an agent read it first, or take it."),
|
|
142
|
+
});
|
|
130
143
|
export const ExtensionUpdatesCheckedSchema = z.object({
|
|
131
144
|
ok: z.literal(true).describe("The check ran."),
|
|
132
145
|
checkedAt: z.string().describe("When, so a screen can date the answer."),
|
|
@@ -240,11 +253,23 @@ export const ExtensionSummarySchema = z.object({
|
|
|
240
253
|
.optional()
|
|
241
254
|
.describe("The version kept one step back, which is what going back means."),
|
|
242
255
|
updatePolicy: ExtensionUpdatePolicySchema.optional().describe(
|
|
243
|
-
"The
|
|
256
|
+
"The standing answer that applies to this one: tell me, have an agent look, or just do it. Its own when `updatePolicyOwn`, else the sandbox's default.",
|
|
244
257
|
),
|
|
258
|
+
updatePolicyOwn: z
|
|
259
|
+
.boolean()
|
|
260
|
+
.optional()
|
|
261
|
+
.describe("This extension has its own answer about updates, set for it alone. Absent or false means it follows the sandbox's default."),
|
|
245
262
|
dev: ExtensionDevSchema.optional().describe(
|
|
246
263
|
"Set while an extension installed from a repository is pointed at a source checkout in this workspace, for working on the extension itself: its code is served from there instead of the pinned copy. `commit` keeps naming the pinned version, which is what updates and the registry compare against.",
|
|
247
264
|
),
|
|
265
|
+
// A workspace folder has no commit to pin (`commit` reads "workspace"), so a land or an edit moving its code is
|
|
266
|
+
// seen by this instead: the editor loads it again when it moves.
|
|
267
|
+
revision: z
|
|
268
|
+
.string()
|
|
269
|
+
.optional()
|
|
270
|
+
.describe(
|
|
271
|
+
"For an extension written in this workspace: a short fingerprint of what the browser runs of it, its declaration and its built bundle. It changes whenever either does, which is how a screen tells the copy it loaded is behind. Absent for other sources.",
|
|
272
|
+
),
|
|
248
273
|
});
|
|
249
274
|
export type ExtensionSummary = z.infer<typeof ExtensionSummarySchema>;
|
|
250
275
|
// The dev-mode verbs address an installed extension any of the ways a person names one.
|
|
@@ -345,6 +370,9 @@ export const ExtensionsListSchema = z.object({
|
|
|
345
370
|
.describe(
|
|
346
371
|
"When updates were last looked for. Absent until the first check has run. Sent so a screen can say checked an hour ago rather than presenting staleness as certainty.",
|
|
347
372
|
),
|
|
373
|
+
updateDefaults: ExtensionUpdatePolicySchema.optional().describe(
|
|
374
|
+
"The sandbox's answer for every extension installed from a repository that has none of its own. Absent from a sandbox that predates it.",
|
|
375
|
+
),
|
|
348
376
|
});
|
|
349
377
|
// Persisted at .intentic/config/extension-settings.json, keyed by extension id so a re-clone never loses them. Secret
|
|
350
378
|
// values are stripped from `settings`; `secretsSet` names which ones are set.
|
package/src/schemas/git/git.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GitRepoParamSchema } from "./git-view.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { AgentProviderSchema } from "../agent.js";
|
|
4
|
-
import { LandConflictSchema, LandedMessageSchema } from "../agents.js";
|
|
4
|
+
import { LandConflictSchema, LandedMessageSchema, LandingExtensionsSchema } from "../agents.js";
|
|
5
5
|
import { CommandRunSchema } from "../ci.js";
|
|
6
6
|
import { RefNameSchema } from "../internal.js";
|
|
7
7
|
import { MainBranchSchema } from "../shared.js";
|
|
@@ -260,9 +260,9 @@ export const GitOperationStateSchema = z.object({
|
|
|
260
260
|
export type GitOperationState = z.infer<typeof GitOperationStateSchema>;
|
|
261
261
|
// Judged by shape alone: the names scratch arrives under are made up fresh every time, so no list of names could hold.
|
|
262
262
|
export const ScratchReasonSchema = z
|
|
263
|
-
.enum(["hidden", "byproduct", "checkout", "oversized", "root"])
|
|
263
|
+
.enum(["hidden", "byproduct", "checkout", "oversized", "root", "bulk"])
|
|
264
264
|
.describe(
|
|
265
|
-
"Why it looks like scratch. A new hidden directory that is not one a project keeps on purpose (like `.github`). A log, dump, backup or editor leftover. A git checkout of its own. A new file past the size source code reaches.
|
|
265
|
+
"Why it looks like scratch. A new hidden directory that is not one a project keeps on purpose (like `.github`). A log, dump, backup or editor leftover. A git checkout of its own. A new file past the size source code reaches. A new dotfile at the top of a workspace whose projects are the repositories inside it. Or a new folder holding more files, or more bytes, than any change a person writes: build output an ignore rule stopped hiding, an unpacked archive, a download.",
|
|
266
266
|
);
|
|
267
267
|
export type ScratchReason = z.infer<typeof ScratchReasonSchema>;
|
|
268
268
|
export const ScratchPathSchema = z.object({
|
|
@@ -362,6 +362,12 @@ export const OriginAgentSchema = z.object({
|
|
|
362
362
|
),
|
|
363
363
|
});
|
|
364
364
|
export type OriginAgent = z.infer<typeof OriginAgentSchema>;
|
|
365
|
+
// Sandbox-wide and read at response time, not from the memoized scan: a discard waits on its restore point, and a
|
|
366
|
+
// press that showed nothing for minutes was pressed again after a reload (2026-11-21).
|
|
367
|
+
const runningIn = (what: string, doing: string) =>
|
|
368
|
+
z.array(z.string()).optional().describe(
|
|
369
|
+
`Repositories with ${what} running right now. The sandbox's answer rather than any one tab's, so a reload, a second window and another device all know. Absent means nothing is ${doing}.`,
|
|
370
|
+
);
|
|
365
371
|
// Aggregated review set across every repo (root + every discovered repo).
|
|
366
372
|
export const GitChangesSchema = z.object({
|
|
367
373
|
repos: z
|
|
@@ -377,14 +383,8 @@ export const GitChangesSchema = z.object({
|
|
|
377
383
|
.describe(
|
|
378
384
|
"Who each conversation named above is, keyed by id, so a caller need not look them up. Absent when nothing in the review can be attributed.",
|
|
379
385
|
),
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
committing: z
|
|
383
|
-
.array(z.string())
|
|
384
|
-
.optional()
|
|
385
|
-
.describe(
|
|
386
|
-
"Repositories with a commit running right now. The sandbox's answer rather than any one tab's, so a reload, a second window and another device all know. Absent means nothing is committing.",
|
|
387
|
-
),
|
|
386
|
+
committing: runningIn("a commit", "committing"),
|
|
387
|
+
discarding: runningIn("a discard (its restore point being taken, or the files going)", "being discarded"),
|
|
388
388
|
});
|
|
389
389
|
export type GitChanges = z.infer<typeof GitChangesSchema>;
|
|
390
390
|
// Re-read inside the same lock the commit used, so the caller redraws from here instead of a full rescan. `changes`
|
|
@@ -462,8 +462,6 @@ export const AgentRepoChangesSchema = z.object({
|
|
|
462
462
|
),
|
|
463
463
|
});
|
|
464
464
|
export type AgentRepoChanges = z.infer<typeof AgentRepoChangesSchema>;
|
|
465
|
-
// The review, plus why the last land refused: a conflict is found when the turn ends but resolved later on this
|
|
466
|
-
// surface, so it rides here rather than only in the land response, and refreshes on every land.
|
|
467
465
|
// A workspace repo this conversation's copy does not carry, where the copy nonetheless holds files at its path: what a
|
|
468
466
|
// turn wrote into a folder that was no checkout of its own, which therefore reached no branch.
|
|
469
467
|
export const OutsideCheckoutSchema = z.object({
|
|
@@ -476,7 +474,8 @@ export const OutsideCheckoutSchema = z.object({
|
|
|
476
474
|
files: z.number().describe("How many files the copy holds at its path. A floor past a thousand, which is where the count stops."),
|
|
477
475
|
});
|
|
478
476
|
export type OutsideCheckout = z.infer<typeof OutsideCheckoutSchema>;
|
|
479
|
-
|
|
477
|
+
// The review, plus why the last land refused: a conflict is found when the turn ends but resolved later on this
|
|
478
|
+
// surface, so it rides here rather than only in the land response, and refreshes on every land.
|
|
480
479
|
export const AgentChangesSchema = z.object({
|
|
481
480
|
repos: z.array(AgentRepoChangesSchema).describe("One entry per repository the conversation touched."),
|
|
482
481
|
// Disambiguates two opposite reasons for an empty list: nothing written, versus everything already committed.
|
|
@@ -555,6 +554,7 @@ export const AgentChangesSchema = z.object({
|
|
|
555
554
|
.describe(
|
|
556
555
|
"Repositories of your workspace this conversation's copy does not carry, where it nonetheless wrote files at their path. Nothing written there is on its branch, so no merge brings it; an `unborn` one is taken into the copy, with those files, on the conversation's next turn after its first commit. Absent when there are none.",
|
|
557
556
|
),
|
|
557
|
+
extensions: LandingExtensionsSchema,
|
|
558
558
|
});
|
|
559
559
|
export type AgentChanges = z.infer<typeof AgentChangesSchema>;
|
|
560
560
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { HostPowerFindingSchema, pauseUntilFor, restartBlocks, UPDATE_PAUSE_MAX_MS } from "./host-power.js";
|
|
2
|
+
|
|
3
|
+
// What answers Windows Update's night restart (2026-11-27): how long a pause holds for work booked on the PC, and whether
|
|
4
|
+
// a restart still stops that work once paused or once the PC starts its sandboxes by itself.
|
|
5
|
+
|
|
6
|
+
const HOUR = 3_600_000;
|
|
7
|
+
// 2026-11-26 23:35 UTC: 00:35 on 2026-11-27 on rog, an hour east of UTC.
|
|
8
|
+
const NOW = Date.UTC(2026, 10, 26, 23, 35);
|
|
9
|
+
const ROG = 60;
|
|
10
|
+
// rog's restart window: outside active hours 08:00 to 02:00.
|
|
11
|
+
const NIGHT = { window: { fromHour: 2, toHour: 8 } };
|
|
12
|
+
// The work booked on rog for Friday 05:00 local, which is 04:00 UTC.
|
|
13
|
+
const FRIDAY_FIVE = Date.UTC(2026, 10, 28, 4, 0);
|
|
14
|
+
|
|
15
|
+
describe("pauseUntilFor", () => {
|
|
16
|
+
it("holds Windows Update until the end of the restart window the work falls in, on the PC's own clock", () => {
|
|
17
|
+
// Friday 08:00 local is 07:00 UTC.
|
|
18
|
+
expect(pauseUntilFor(NIGHT, ROG, NOW, FRIDAY_FIVE)).toBe(Date.UTC(2026, 10, 28, 7, 0));
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("holds through the next window when the work falls outside one, so a restart never lands just after it", () => {
|
|
22
|
+
// Friday 10:00 local: the next window ends Saturday 08:00 local.
|
|
23
|
+
expect(pauseUntilFor(NIGHT, ROG, NOW, Date.UTC(2026, 10, 28, 9, 0))).toBe(Date.UTC(2026, 10, 29, 7, 0));
|
|
24
|
+
// Exactly at the window's end is the end.
|
|
25
|
+
expect(pauseUntilFor(NIGHT, ROG, NOW, Date.UTC(2026, 10, 28, 7, 0))).toBe(Date.UTC(2026, 10, 28, 7, 0));
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("holds two hours past the work where no window was said, and refuses what Windows could not pause for", () => {
|
|
29
|
+
expect(pauseUntilFor({}, ROG, NOW, FRIDAY_FIVE)).toBe(FRIDAY_FIVE + 2 * HOUR);
|
|
30
|
+
expect(pauseUntilFor({}, ROG, NOW, NOW + UPDATE_PAUSE_MAX_MS)).toBeUndefined();
|
|
31
|
+
expect(pauseUntilFor({}, ROG, NOW, NOW + UPDATE_PAUSE_MAX_MS - 2 * HOUR)).toBe(NOW + UPDATE_PAUSE_MAX_MS);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe("restartBlocks", () => {
|
|
36
|
+
it("stops work whose span crosses the window, and not once paused past the work or once the PC brings its sandboxes back", () => {
|
|
37
|
+
expect(restartBlocks(NIGHT, ROG, NOW, FRIDAY_FIVE)).toBe(true);
|
|
38
|
+
expect(restartBlocks({ ...NIGHT, pausedUntil: Date.UTC(2026, 10, 28, 7, 0) }, ROG, NOW, FRIDAY_FIVE)).toBe(false);
|
|
39
|
+
expect(restartBlocks({ ...NIGHT, comesBack: "boot" }, ROG, NOW, FRIDAY_FIVE)).toBe(false);
|
|
40
|
+
// A pause ending Thursday 06:00 local leaves Friday's window from 02:00.
|
|
41
|
+
expect(restartBlocks({ ...NIGHT, pausedUntil: Date.UTC(2026, 10, 27, 5, 0) }, ROG, NOW, FRIDAY_FIVE)).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
describe("HostPowerFindingSchema", () => {
|
|
46
|
+
it("reads what brings the sandboxes back as unknown when a newer agent says something this build does not know", () => {
|
|
47
|
+
expect(HostPowerFindingSchema.parse({ id: "update-restart", fixable: false, text: "x", comesBack: "wake-on-lan" }).comesBack).toBeUndefined();
|
|
48
|
+
expect(HostPowerFindingSchema.parse({ id: "update-restart", fixable: false, text: "x", comesBack: "boot", offers: ["update-pause"] })).toMatchObject({
|
|
49
|
+
comesBack: "boot",
|
|
50
|
+
offers: ["update-pause"],
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|