@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
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// THE SELF-HOSTED CI RUNNERS ON ONE OF THE OWNER'S COMPUTERS: GitHub Actions runner instances registered as systemd
|
|
4
|
+
// units (`actions.runner.*.service`, as the runner's own svc.sh names them), read and driven over the connection the
|
|
5
|
+
// machine's agent already holds open. The agent runs as the person; what needs root (starting a system unit, emptying a
|
|
6
|
+
// job's leftovers that a job container wrote as root, holding the test-memory pool's slots) is done by the machine's
|
|
7
|
+
// fleet service, `intentic-ci-fleet.service`, the same agent binary from a root-owned copy, which the agent asks over a
|
|
8
|
+
// local socket (_devices/machine src/ci-fleet/). Without that service a computer still lists its runners, read-only.
|
|
9
|
+
// The daemon relays (_sandbox/sandbox hosts/ci-fleet/device-ci-fleet.ts); the Pipelines view draws the Runners section.
|
|
10
|
+
|
|
11
|
+
// A runner's name as GitHub accepts one and as the runner's own config.sh writes it into the unit's name: letters,
|
|
12
|
+
// digits, dot, dash and underscore. Also the folder the fleet service registers a new one in, so one plain segment.
|
|
13
|
+
export const CiRunnerNameSchema = z
|
|
14
|
+
.string()
|
|
15
|
+
.regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/, "letters, digits, dot, dash and underscore, starting with a letter or digit, at most 64");
|
|
16
|
+
export type CiRunnerName = z.infer<typeof CiRunnerNameSchema>;
|
|
17
|
+
|
|
18
|
+
// systemd's own ActiveState words, plus `unknown` for one a newer systemd says that this list does not know, and
|
|
19
|
+
// `not-installed` for a runner folder whose `.service` names a unit systemd no longer has: configured, never started
|
|
20
|
+
// again (z440's four on 2026-11-24, their units gone since 2026-11-09 while the folders stayed). Only re-registering,
|
|
21
|
+
// or the runner's own `svc.sh install`, brings one back; the keeper cannot.
|
|
22
|
+
export const CiRunnerStateSchema = z.enum(["active", "activating", "deactivating", "reloading", "inactive", "failed", "unknown", "not-installed"]);
|
|
23
|
+
export type CiRunnerState = z.infer<typeof CiRunnerStateSchema>;
|
|
24
|
+
|
|
25
|
+
// Why a runner is down on purpose, so neither the fleet service's keeper nor a reader takes it for broken: stopped from
|
|
26
|
+
// the board (`board`), drained and stopped once its job ended (`drain`), or paused by `wsl-workers.sh` for a Windows
|
|
27
|
+
// smoke job (`smoke`).
|
|
28
|
+
export const CiRunnerHoldSchema = z.enum(["board", "drain", "smoke"]);
|
|
29
|
+
export type CiRunnerHold = z.infer<typeof CiRunnerHoldSchema>;
|
|
30
|
+
|
|
31
|
+
export const CiRunnerSchema = z.object({
|
|
32
|
+
// The runner's name at GitHub (`agentName` in its `.runner`), else the one its unit's name carries.
|
|
33
|
+
name: CiRunnerNameSchema,
|
|
34
|
+
// The systemd unit, `actions.runner.<scope>.<name>.service`.
|
|
35
|
+
unit: z.string(),
|
|
36
|
+
// The runner's own folder (the unit's WorkingDirectory), as the machine spells it.
|
|
37
|
+
dir: z.string(),
|
|
38
|
+
// The account the unit runs the runner as.
|
|
39
|
+
user: z.string(),
|
|
40
|
+
// What it is registered to (`gitHubUrl` in its `.runner`): a repository or an organisation.
|
|
41
|
+
url: z.string().optional(),
|
|
42
|
+
// The runner's version, read off the `bin` link a self-update points at `bin.<version>`.
|
|
43
|
+
version: z.string().optional(),
|
|
44
|
+
// The light lane (ci-runner.md): an instance named `<host>-light-<n>`, which takes only a pipeline's first two jobs.
|
|
45
|
+
light: z.boolean(),
|
|
46
|
+
state: CiRunnerStateSchema,
|
|
47
|
+
// Running a job right now: its Runner.Worker process is alive.
|
|
48
|
+
busy: z.boolean(),
|
|
49
|
+
// When that job's worker started, ISO; absent while idle.
|
|
50
|
+
busySince: z.string().optional(),
|
|
51
|
+
// The job's name, read from the worker's own log where it says it; absent while idle or where the log does not.
|
|
52
|
+
job: z.string().optional(),
|
|
53
|
+
// Down on purpose, and why; absent for a runner nobody holds down.
|
|
54
|
+
held: CiRunnerHoldSchema.optional(),
|
|
55
|
+
// A drain is waiting for its job to end, after which the runner is stopped.
|
|
56
|
+
draining: z.boolean(),
|
|
57
|
+
});
|
|
58
|
+
export type CiRunner = z.infer<typeof CiRunnerSchema>;
|
|
59
|
+
|
|
60
|
+
// One pass of one of the fleet service's rounds: when, whether it only reported (`dryRun`), what it freed, and its lines.
|
|
61
|
+
export const CiFleetPassSchema = z.object({
|
|
62
|
+
at: z.string(),
|
|
63
|
+
dryRun: z.boolean(),
|
|
64
|
+
freedBytes: z.number().int().nonnegative(),
|
|
65
|
+
// What it did, one sentence a line, as the old scripts' journal lines read; at most the newest 200.
|
|
66
|
+
lines: z.array(z.string()),
|
|
67
|
+
});
|
|
68
|
+
export type CiFleetPass = z.infer<typeof CiFleetPassSchema>;
|
|
69
|
+
|
|
70
|
+
// A shared cache under the fleet's cache root (`/ci-cache/<name>`), as the last janitor pass measured it.
|
|
71
|
+
export const CiCacheSchema = z.object({ name: z.string(), bytes: z.number().int().nonnegative() });
|
|
72
|
+
export type CiCache = z.infer<typeof CiCacheSchema>;
|
|
73
|
+
|
|
74
|
+
// The test-memory pool on this computer (`test-memory-pool.mjs`: one-GiB slot files that CI jobs flock), and what the
|
|
75
|
+
// fleet service holds of it for the Intentic sandboxes on the same engine, so CI sizes its test workers from what they
|
|
76
|
+
// leave. Slots 1..`reserved` are the gate band the service never takes.
|
|
77
|
+
export const CiSlotsSchema = z.object({
|
|
78
|
+
dir: z.string(),
|
|
79
|
+
total: z.number().int().positive(),
|
|
80
|
+
reserved: z.number().int().nonnegative(),
|
|
81
|
+
// Slots kept from CI for good, whatever the sandboxes hold: the host's floor (`--slots-usable` keeps this many usable).
|
|
82
|
+
floor: z.number().int().nonnegative(),
|
|
83
|
+
// Slots the service holds now: the floor and the sandboxes' share together.
|
|
84
|
+
heldForSandboxes: z.number().int().nonnegative(),
|
|
85
|
+
// Memory the sandboxes and sandbox runners on this engine use, as last measured.
|
|
86
|
+
sandboxBytes: z.number().int().nonnegative(),
|
|
87
|
+
// Slots CI jobs hold now, and slots nobody holds.
|
|
88
|
+
heldByCi: z.number().int().nonnegative(),
|
|
89
|
+
free: z.number().int().nonnegative(),
|
|
90
|
+
at: z.string(),
|
|
91
|
+
});
|
|
92
|
+
export type CiSlots = z.infer<typeof CiSlotsSchema>;
|
|
93
|
+
|
|
94
|
+
// The fleet service as the agent found it.
|
|
95
|
+
export const CiFleetServiceSchema = z.object({
|
|
96
|
+
// Installed and answering on its socket.
|
|
97
|
+
running: z.boolean(),
|
|
98
|
+
// Its unit exists, answering or not.
|
|
99
|
+
installed: z.boolean(),
|
|
100
|
+
version: z.string().optional(),
|
|
101
|
+
// Why it is not answering, in words, where it is installed.
|
|
102
|
+
problem: z.string().optional(),
|
|
103
|
+
});
|
|
104
|
+
export type CiFleetService = z.infer<typeof CiFleetServiceSchema>;
|
|
105
|
+
|
|
106
|
+
export const CiFleetSchema = z.object({
|
|
107
|
+
service: CiFleetServiceSchema,
|
|
108
|
+
runners: z.array(CiRunnerSchema),
|
|
109
|
+
// The fleet's shared cache root on this computer.
|
|
110
|
+
cacheRoot: z.string(),
|
|
111
|
+
caches: z.array(CiCacheSchema),
|
|
112
|
+
slots: CiSlotsSchema.optional(),
|
|
113
|
+
keeper: CiFleetPassSchema.optional(),
|
|
114
|
+
janitor: CiFleetPassSchema.optional(),
|
|
115
|
+
// The host prune (Docker images, build cache, volumes), on a computer whose Docker is its own rather than shared
|
|
116
|
+
// with Windows: omen's Docker Desktop is pruned by wsl-maintenance.ps1.
|
|
117
|
+
prune: CiFleetPassSchema.optional(),
|
|
118
|
+
});
|
|
119
|
+
export type CiFleet = z.infer<typeof CiFleetSchema>;
|
|
120
|
+
|
|
121
|
+
// `start` and `stop` act now; `stop` refuses a runner that is running a job. `drain` stops it the moment its job ends
|
|
122
|
+
// (at once when idle) and `restart` is a drain followed by a start. A runner stopped from here is held down: the keeper
|
|
123
|
+
// leaves it until a `start`.
|
|
124
|
+
export const CiRunnerOpSchema = z.enum(["start", "stop", "drain", "restart"]);
|
|
125
|
+
export type CiRunnerOp = z.infer<typeof CiRunnerOpSchema>;
|
|
126
|
+
|
|
127
|
+
export const CiRunnerOpResultSchema = z.object({ said: z.string() });
|
|
128
|
+
export type CiRunnerOpResult = z.infer<typeof CiRunnerOpResultSchema>;
|
|
129
|
+
|
|
130
|
+
export const CI_RUNNER_LOG_TAIL_DEFAULT = 200;
|
|
131
|
+
export const CI_RUNNER_LOG_TAIL_MAX = 5000;
|
|
132
|
+
export const CiRunnerLogsSchema = z.object({ text: z.string() });
|
|
133
|
+
export type CiRunnerLogs = z.infer<typeof CiRunnerLogsSchema>;
|
|
134
|
+
|
|
135
|
+
// A GitHub Actions label as config.sh takes one: no comma, which separates them.
|
|
136
|
+
export const CiRunnerLabelSchema = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/);
|
|
137
|
+
|
|
138
|
+
// What the machine's `ci_runner_register` takes: a registration token GitHub minted for `url` an hour's use, the new
|
|
139
|
+
// runner's name and labels. The fleet service downloads the runner release, checks its SHA-256, configures it as
|
|
140
|
+
// `user` (default: the account the existing runners run as) in `<user's home>/actions-runner-<name>` and installs its unit.
|
|
141
|
+
export const CiRunnerRegisterArgsSchema = z
|
|
142
|
+
.object({
|
|
143
|
+
url: z.string().url().startsWith("https://github.com/"),
|
|
144
|
+
token: z.string().min(10).max(200),
|
|
145
|
+
name: CiRunnerNameSchema,
|
|
146
|
+
labels: z.array(CiRunnerLabelSchema).min(1).max(20),
|
|
147
|
+
user: z.string().regex(/^[a-z_][a-z0-9_-]{0,31}$/).optional(),
|
|
148
|
+
})
|
|
149
|
+
.strict();
|
|
150
|
+
export type CiRunnerRegisterArgs = z.infer<typeof CiRunnerRegisterArgsSchema>;
|
|
151
|
+
|
|
152
|
+
// What `ci_runner_remove` takes: the runner and a removal token GitHub minted for its registration. Refused while it runs a job.
|
|
153
|
+
export const CiRunnerRemoveArgsSchema = z.object({ name: CiRunnerNameSchema, token: z.string().min(10).max(200) }).strict();
|
|
154
|
+
export type CiRunnerRemoveArgs = z.infer<typeof CiRunnerRemoveArgsSchema>;
|
|
155
|
+
|
|
156
|
+
// The daemon's route inputs: the device by its card id, then what the machine is asked.
|
|
157
|
+
const DeviceIdSchema = z.string().min(1);
|
|
158
|
+
export const DeviceCiFleetInputSchema = z.object({ id: DeviceIdSchema });
|
|
159
|
+
export type DeviceCiFleetInput = z.infer<typeof DeviceCiFleetInputSchema>;
|
|
160
|
+
export const DeviceCiRunnerOpInputSchema = z.object({ id: DeviceIdSchema, name: CiRunnerNameSchema, op: CiRunnerOpSchema });
|
|
161
|
+
export type DeviceCiRunnerOpInput = z.infer<typeof DeviceCiRunnerOpInputSchema>;
|
|
162
|
+
export const DeviceCiRunnerLogsInputSchema = z.object({
|
|
163
|
+
id: DeviceIdSchema,
|
|
164
|
+
name: CiRunnerNameSchema,
|
|
165
|
+
tail: z.coerce.number().int().positive().max(CI_RUNNER_LOG_TAIL_MAX).optional(),
|
|
166
|
+
});
|
|
167
|
+
export type DeviceCiRunnerLogsInput = z.infer<typeof DeviceCiRunnerLogsInputSchema>;
|
|
168
|
+
|
|
169
|
+
// Register a new runner on a device for one workspace repository's GitHub remote: the daemon mints the registration
|
|
170
|
+
// token through the GitHub connection and never stores it.
|
|
171
|
+
export const DeviceCiRunnerRegisterInputSchema = z.object({
|
|
172
|
+
id: DeviceIdSchema,
|
|
173
|
+
// Workspace-relative repository directory whose GitHub remote the runner serves.
|
|
174
|
+
repo: z.string().min(1).max(500),
|
|
175
|
+
name: CiRunnerNameSchema,
|
|
176
|
+
labels: z.array(CiRunnerLabelSchema).min(1).max(20),
|
|
177
|
+
});
|
|
178
|
+
export type DeviceCiRunnerRegisterInput = z.infer<typeof DeviceCiRunnerRegisterInputSchema>;
|
|
179
|
+
export const DeviceCiRunnerRemoveInputSchema = z.object({ id: DeviceIdSchema, name: CiRunnerNameSchema });
|
|
180
|
+
export type DeviceCiRunnerRemoveInput = z.infer<typeof DeviceCiRunnerRemoveInputSchema>;
|
package/src/schemas/ci.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// ci: pipeline runs on the workspace repos' github/gitlab remotes
|
|
2
|
+
import { isInfraStep } from "@intentic/constants/ci-infra-steps";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { AgentRunPickSchema } from "./agent.js";
|
|
5
|
+
|
|
6
|
+
// Split out to keep this module one reading (2026-11-26), served from this subpath as before.
|
|
7
|
+
export * from "./ci-deployments.js";
|
|
8
|
+
export * from "./command-run.js";
|
|
4
9
|
// The daemon maps each workspace repo to its CI project via a connected github/gitlab capability, registers a webhook
|
|
5
10
|
// to fire `ci` listener automations instantly, and serves the Pipelines rail from a webhook-freshened, poll-backfilled
|
|
6
11
|
// cache. `host` names which provider API serves a repo; the listener provider is always `ci`, since a trigger narrows
|
|
@@ -253,16 +258,16 @@ export const CiRunsResponseSchema = z.object({
|
|
|
253
258
|
repos: z.array(CiRepoSchema).describe("Which workspace repositories are wired to a forge, and how each one's notifications are set up."),
|
|
254
259
|
// Newest first, across all mapped repos.
|
|
255
260
|
runs: z.array(PipelineRunSchema).describe("Runs across all of them, newest first."),
|
|
261
|
+
// (2026-11-26) Filled by the pipelines extension's backend, whose board read answers this same shape; the daemon's own
|
|
262
|
+
// GET /ci/runs leaves both out since main's fix agent moved there, and an older daemon fills them itself.
|
|
256
263
|
failures: z
|
|
257
264
|
.array(CiMainFailureSchema)
|
|
258
265
|
.optional()
|
|
259
|
-
.describe("Every main-line branch failing right now, with the fix agent on it. Absent
|
|
266
|
+
.describe("Every main-line branch failing right now, with the fix agent on it. Absent where nothing keeps them."),
|
|
260
267
|
ownerSteps: z
|
|
261
268
|
.array(CiOwnerStepSchema)
|
|
262
269
|
.optional()
|
|
263
|
-
.describe(
|
|
264
|
-
"Steps outside the repository that CI fix agents ended their latest turn on, one per agent. Absent from a daemon that keeps none.",
|
|
265
|
-
),
|
|
270
|
+
.describe("Steps outside the repository that CI fix agents ended their latest turn on, one per agent. Absent where nothing keeps them."),
|
|
266
271
|
});
|
|
267
272
|
export type CiRunsResponse = z.infer<typeof CiRunsResponseSchema>;
|
|
268
273
|
// 2026-11-17, the shinobi-society audit: conversation after conversation spent calls finding out whether a test that
|
|
@@ -398,45 +403,180 @@ export const CiFixResponseSchema = z.object({
|
|
|
398
403
|
conversationId: z.string().describe("The conversation that was opened, already holding the failure. Open it to watch, or attach to its turn."),
|
|
399
404
|
});
|
|
400
405
|
export type CiFixResponse = z.infer<typeof CiFixResponseSchema>;
|
|
401
|
-
|
|
402
|
-
//
|
|
403
|
-
//
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
//
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
.
|
|
431
|
-
.
|
|
432
|
-
|
|
433
|
-
),
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
.string()
|
|
438
|
-
.
|
|
439
|
-
|
|
440
|
-
),
|
|
406
|
+
|
|
407
|
+
// ---- (2026-11-25) CI events for code: GET /ci/feed ------------------------------------------------------------------
|
|
408
|
+
// What the forges' webhooks (and the poller, for repositories without one) said, as it is heard, for a program rather
|
|
409
|
+
// than an agent: the Deployments extension's engine starts a deploy the moment the job that publishes images passes,
|
|
410
|
+
// not when the whole workflow ends. A Server-Sent Events stream of these frames, one `data:` line each; a reader that
|
|
411
|
+
// was away reads `/ci/runs` to catch up on runs (jobs it missed are gone, so a trigger should also accept the run).
|
|
412
|
+
// Reached by an extension that declares `GET /ci/feed` in its `permissions.daemon`; listener automations are not fed
|
|
413
|
+
// job frames, which are many.
|
|
414
|
+
// (2026-11-26) What the forge said of one failed job (`failed` on its `job` frame), for main's fix agent in the pipelines
|
|
415
|
+
// extension: the forge's id for it, which its log is read by (POST /ci/jobs/log), the step it failed in first and every
|
|
416
|
+
// step it failed in where the forge names steps, the forge's reason (GitLab's `failure_reason`; on GitHub, why a job it
|
|
417
|
+
// reports as cancelled failed after all: `timed_out` or `runner_unavailable`), what set its run off where the core knows,
|
|
418
|
+
// its check run annotations where they were read, and the runner that ran it.
|
|
419
|
+
export const CiJobFailureSchema = z.object({
|
|
420
|
+
jobId: z.number(),
|
|
421
|
+
step: z.string().optional(),
|
|
422
|
+
steps: z.array(z.string()).optional(),
|
|
423
|
+
reason: z.string().optional(),
|
|
424
|
+
trigger: z.string().optional(),
|
|
425
|
+
annotations: z.array(z.string()).optional(),
|
|
426
|
+
runner: z.string().optional(),
|
|
427
|
+
});
|
|
428
|
+
export type CiJobFailure = z.infer<typeof CiJobFailureSchema>;
|
|
429
|
+
export const CiFeedEventSchema = z.discriminatedUnion("kind", [
|
|
430
|
+
z.object({
|
|
431
|
+
kind: z.literal("run"),
|
|
432
|
+
run: PipelineRunSchema,
|
|
433
|
+
}),
|
|
434
|
+
z.object({
|
|
435
|
+
kind: z.literal("job"),
|
|
436
|
+
repo: z.string(),
|
|
437
|
+
host: CiHostSchema,
|
|
438
|
+
project: z.string(),
|
|
439
|
+
runId: z.number(),
|
|
440
|
+
workflow: z.string().optional(),
|
|
441
|
+
job: z.string(),
|
|
442
|
+
branch: z.string(),
|
|
443
|
+
sha: z.string(),
|
|
444
|
+
status: PipelineStatusSchema,
|
|
445
|
+
url: z.string(),
|
|
446
|
+
// (2026-11-26) Present on a job that failed, a job allowed to fail excepted: what the forge said of it.
|
|
447
|
+
failed: CiJobFailureSchema.optional(),
|
|
448
|
+
}),
|
|
449
|
+
]);
|
|
450
|
+
export type CiFeedEvent = z.infer<typeof CiFeedEventSchema>;
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
// (2026-11-26) Whether a CI job's step is one the runner owns rather than the repository (Set up job, Complete job, a Post
|
|
454
|
+
// step): a job that died in one never ran a line of the checkout, so an agent on the code can do nothing for it. The one
|
|
455
|
+
// list `_tools/constants` keeps for the CI audit script, read here for the pipelines extension's fix agent and board.
|
|
456
|
+
export const isCiInfraStep = (step: string): boolean => isInfraStep(step);
|
|
457
|
+
|
|
458
|
+
// ---- (2026-11-26) the forge's word for a program: what main's fix agent and the Pipelines board read ---------------------
|
|
459
|
+
// The forge clients and their credentials are the core's (CI ingestion); main's fix agent and the Pipelines board's
|
|
460
|
+
// backend are the pipelines extension's, which reads the forges through these, each declared in its
|
|
461
|
+
// `permissions.daemon`. Each resolves repo -> project and token per call, as every CI route does.
|
|
462
|
+
|
|
463
|
+
// One failed job of a run, as the forge lists it (POST /ci/runs/failed-steps): every job that failed, and every one the
|
|
464
|
+
// forge reports as cancelled whose cancel was a failure after all, in the run's order; a job allowed to fail is none.
|
|
465
|
+
export const CiFailedStepSchema = z.object({
|
|
466
|
+
job: z.string().describe("The job, by name."),
|
|
467
|
+
id: z.number().describe("The forge's id for it, which its log is read by."),
|
|
468
|
+
step: z.string().optional().describe("The first step that failed it, where the forge names steps."),
|
|
469
|
+
steps: z.array(z.string()).optional().describe("Every step that failed it, in order, where the forge names steps."),
|
|
470
|
+
reason: z.string().optional().describe("The forge's own word for why it failed, where it gives one."),
|
|
471
|
+
annotations: z.array(z.string()).optional().describe("What its check run annotations say, where the forge has them."),
|
|
472
|
+
runner: z.string().optional().describe("The runner that ran it, by the name its forge knows it by."),
|
|
473
|
+
});
|
|
474
|
+
export type CiFailedStep = z.infer<typeof CiFailedStepSchema>;
|
|
475
|
+
export const CiFailedStepsResponseSchema = z.object({ steps: z.array(CiFailedStepSchema).describe("The run's failed jobs, in its order.") });
|
|
476
|
+
export const CiPassedJobsResponseSchema = z.object({ jobs: z.array(z.string()).describe("The names of the run's jobs that passed.") });
|
|
477
|
+
export const CiRunListParamSchema = z.object({
|
|
478
|
+
repo: z.string().describe("Which workspace repository."),
|
|
479
|
+
limit: z.number().int().min(1).max(100).describe("How many of its newest runs."),
|
|
480
|
+
});
|
|
481
|
+
export const CiRunListResponseSchema = z.object({ runs: z.array(PipelineRunSchema).describe("Its newest runs, newest first, asked of the forge now.") });
|
|
482
|
+
export const CiRunResponseSchema = z.object({ run: PipelineRunSchema.describe("The run, asked of the forge now.") });
|
|
483
|
+
// The workflow file a GitHub run ran, at its commit, and every reusable workflow it calls that could be read, by the key
|
|
484
|
+
// its call names it with: what the board's backend draws the run's job graph from. Absent where the forge has no such
|
|
485
|
+
// file (GitLab) or it could not be read.
|
|
486
|
+
export const CiRunWorkflowResponseSchema = z.object({
|
|
487
|
+
root: z.string().optional().describe("The run's workflow file, at the run's commit."),
|
|
488
|
+
called: z.record(z.string(), z.string()).describe("Each reusable workflow it calls that could be read, by the key its call names it with."),
|
|
489
|
+
});
|
|
490
|
+
export const CiJobParamSchema = z.object({
|
|
491
|
+
repo: z.string().describe("Which workspace repository."),
|
|
492
|
+
jobId: z.number().describe("Which job, by the forge's own id."),
|
|
493
|
+
});
|
|
494
|
+
export const CiJobLogResponseSchema = z.object({
|
|
495
|
+
log: z.string().describe("The job's whole log, as plain text; a log the forge would not serve says so in place of it."),
|
|
496
|
+
});
|
|
497
|
+
export const CiJobAnnotationsResponseSchema = z.object({ annotations: z.array(z.string()).describe("What the job's check run annotations say.") });
|
|
498
|
+
// Each repository wired to CI, and which branches are its main line: the forge's default branch, learned at the hook
|
|
499
|
+
// reconcile and from every delivery, else the clone's `origin/HEAD`, else `main` and `master` both (ci/main-line.ts).
|
|
500
|
+
export const CiMainLineSchema = z.object({
|
|
501
|
+
repo: z.string().describe("Which workspace repository."),
|
|
502
|
+
host: CiHostSchema.describe("Which forge it lives on."),
|
|
503
|
+
project: z.string().describe("The project there."),
|
|
504
|
+
branches: z.array(z.string()).describe("Its main line: the default branch, or `main` and `master` when nothing has said which."),
|
|
505
|
+
named: z.boolean().describe("Whether the forge or the clone named the default branch, rather than the two usual names standing in."),
|
|
506
|
+
concluded: z
|
|
507
|
+
.array(z.object({ branch: z.string(), status: z.enum(["success", "failed"]), at: z.number() }))
|
|
508
|
+
.describe("The newest finished run heard on each of those branches, any workflow: how it ended and when it was heard. Empty when none was."),
|
|
509
|
+
});
|
|
510
|
+
export type CiMainLine = z.infer<typeof CiMainLineSchema>;
|
|
511
|
+
export const CiMainLinesResponseSchema = z.object({ lines: z.array(CiMainLineSchema) });
|
|
512
|
+
// An extension taking main lines' failures for itself (POST /ci/main-lines/claim): while a claim of an enabled extension
|
|
513
|
+
// stands, a main line's failure reaches no `ci` automation listening on every branch (ci/events.ts), so the extension's
|
|
514
|
+
// one fix agent is the only agent on it. Kept across restarts; an extension switched off holds none.
|
|
515
|
+
export const CiMainLineClaimSchema = z.object({ claimed: z.boolean().describe("Take main lines' failures (true), or let them go (false).") });
|
|
516
|
+
// What the sandbox's own test runs saw fail on clean trees at main commits (GET /ci/main/local), in rows and in words.
|
|
517
|
+
export const CiLocalMainResponseSchema = z.object({
|
|
518
|
+
local: z.array(CiLocalMainSchema),
|
|
519
|
+
text: z.string().describe("The same in words, as `agents ci` prints it below CI's own; empty when nothing is recorded."),
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
// ---- (2026-11-26) main's repair, as the daemon kept it until it moved to the pipelines extension ---------------------
|
|
523
|
+
// The shapes `.intentic/secrets/ci.json` held for main's one fix agent (`failures`, `passes`, `fleetReruns`,
|
|
524
|
+
// `ownerSteps`), handed once to the extension that takes main's repair over (POST /ci/repair/hand-over), so a sandbox's
|
|
525
|
+
// streaks, their turn counts and its fix agents carry across the update.
|
|
526
|
+
|
|
527
|
+
// One job failing on a main-line branch: its name, under the workflow it is a job of as its `source`, and an id derived
|
|
528
|
+
// from both, so the same job failing again in a later run is the same finding.
|
|
529
|
+
export const CiFindingSchema = z.object({
|
|
530
|
+
id: z.string(),
|
|
531
|
+
source: z.string(),
|
|
532
|
+
text: z.string(),
|
|
533
|
+
// Whether it failed by running out of time, the last time it failed.
|
|
534
|
+
timedOut: z.boolean().optional(),
|
|
535
|
+
// What the fixer read of the job when it last failed: the run and its commit, when it was read, and the error lines
|
|
536
|
+
// its log named. Absent on a finding kept before 2026-11-17.
|
|
537
|
+
runId: z.number().optional(),
|
|
538
|
+
sha: z.string().optional(),
|
|
539
|
+
readAt: z.number().optional(),
|
|
540
|
+
errors: z.array(z.string()).optional(),
|
|
541
|
+
});
|
|
542
|
+
export type CiFinding = z.infer<typeof CiFindingSchema>;
|
|
543
|
+
// Main's CI failing on one branch, as its one fix agent's streak keeps it.
|
|
544
|
+
export const CiFailureSchema = z.object({
|
|
545
|
+
// When its first job failed, which began the streak.
|
|
546
|
+
since: z.number(),
|
|
547
|
+
findings: z.array(CiFindingSchema).default([]),
|
|
548
|
+
// Oldest first.
|
|
549
|
+
decisions: z.array(MainFailureDecisionSchema).default([]),
|
|
550
|
+
// The run the streak began in, which names its fix agent, and the newest run failing on it.
|
|
551
|
+
firstRunId: z.number(),
|
|
552
|
+
runId: z.number(),
|
|
553
|
+
// How many runs have failed on it.
|
|
554
|
+
count: z.number(),
|
|
555
|
+
// Each workflow failing on it, with the newest run of it that failed. Empty for a failure kept before 2026-09-27.
|
|
556
|
+
workflows: z.record(z.string(), z.number()).default({}),
|
|
557
|
+
// Each workflow in `workflows`, timed apart (2026-11-03): when it began failing, when it last failed, and what set its
|
|
558
|
+
// newest failed run off.
|
|
559
|
+
spans: z.record(z.string(), z.object({ since: z.number(), failedAt: z.number(), trigger: z.string().optional() })).default({}),
|
|
560
|
+
// Every failed job the streak has heard of, as `<runId>/<jobId>`, oldest first. Bounded.
|
|
561
|
+
heard: z.array(z.string()).default([]),
|
|
562
|
+
// Turns the sandbox started for its fix agent this streak; a person's Fix press gives them back.
|
|
563
|
+
turns: z.number().default(0),
|
|
564
|
+
// Whether its fix agent has left a change this streak.
|
|
565
|
+
changed: z.boolean().default(false),
|
|
566
|
+
});
|
|
567
|
+
export type CiFailure = z.infer<typeof CiFailureSchema>;
|
|
568
|
+
export const CiOwnerStepKeptSchema = z.object({ step: z.string(), at: z.number() });
|
|
569
|
+
export const CiRepairHandOverSchema = z.object({
|
|
570
|
+
// Keyed "<repo>\n<branch>": only branches failing when it was handed over.
|
|
571
|
+
failures: z.record(z.string(), CiFailureSchema),
|
|
572
|
+
// Keyed like `failures`: the newest run of each workflow that passed on a main-line branch.
|
|
573
|
+
passes: z.record(z.string(), z.record(z.string(), z.number())),
|
|
574
|
+
// Keyed by workspace repo: the runs re-run because the CI fleet, not the code, failed them, newest first.
|
|
575
|
+
fleetReruns: z.record(z.string(), z.array(z.number())),
|
|
576
|
+
// Keyed by fix conversation id: the step outside the repository its latest turn ended on.
|
|
577
|
+
ownerSteps: z.record(z.string(), CiOwnerStepKeptSchema),
|
|
578
|
+
// Whether the owner had switched repairs off in the sandbox's own setting, which the taking extension's own setting
|
|
579
|
+
// of the same name now holds. Absent: they had not.
|
|
580
|
+
autoRepair: z.literal(false).optional(),
|
|
441
581
|
});
|
|
442
|
-
export type
|
|
582
|
+
export type CiRepairHandOver = z.infer<typeof CiRepairHandOverSchema>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
// One shape for any command the daemon runs on a click with a verdict and a quotable tail (the push via PushRunSchema in
|
|
4
|
+
// schemas/git/git.ts, which runs the repository's own pre-push hook), so the fields the browser reads (terminal, tail,
|
|
5
|
+
// kill vs timeout) have one definition.
|
|
6
|
+
// idle: nothing has run yet, or the last run was cleared
|
|
7
|
+
// running: live; its output is the terminal's, not this object's
|
|
8
|
+
// passed: exited 0
|
|
9
|
+
// failed: exited non-zero, or killed by its ceiling (`timedOut`)
|
|
10
|
+
// error: not spawnable at all; not fixable, since nothing is wrong with the code
|
|
11
|
+
// cancelled: the user stopped it
|
|
12
|
+
export const CommandRunStatusSchema = z.enum(["idle", "running", "passed", "failed", "error", "cancelled"]);
|
|
13
|
+
export type CommandRunStatus = z.infer<typeof CommandRunStatusSchema>;
|
|
14
|
+
export const CommandRunSchema = z.object({
|
|
15
|
+
status: CommandRunStatusSchema.describe(
|
|
16
|
+
"Where the run is. Failed and error are deliberately different: failed means the code is wrong, error means the command could not be run at all, and calling the second one a test failure would send an agent hunting a bug that is not there.",
|
|
17
|
+
),
|
|
18
|
+
// Echoed rather than read from settings, so a result seen after the setting changed still says what produced it.
|
|
19
|
+
command: z
|
|
20
|
+
.string()
|
|
21
|
+
.describe(
|
|
22
|
+
"What actually ran, echoed here rather than read back from the settings, so a result looked at after the setting changed still says what produced it.",
|
|
23
|
+
),
|
|
24
|
+
startedAt: z.number().optional().describe("When it began, in milliseconds."),
|
|
25
|
+
finishedAt: z.number().optional().describe("When it ended, in milliseconds."),
|
|
26
|
+
exitCode: z.number().optional().describe("How the command exited."),
|
|
27
|
+
timedOut: z.boolean().optional().describe("It was killed for taking too long rather than finishing."),
|
|
28
|
+
// The tmux session to open, since watching a run is the terminal panel's job, not this object's; absent where the
|
|
29
|
+
// sandbox has no tmux wrapper.
|
|
30
|
+
session: z
|
|
31
|
+
.string()
|
|
32
|
+
.optional()
|
|
33
|
+
.describe(
|
|
34
|
+
"The terminal it runs in, which is where to watch it. Absent where the sandbox has no terminals, in which case there is nothing to attach to.",
|
|
35
|
+
),
|
|
36
|
+
// Tail-capped plain text, colour codes and redrawn progress lines stripped, so a fix prompt quotes a verdict, not
|
|
37
|
+
// terminal litter; empty while running or for a killed run.
|
|
38
|
+
output: z
|
|
39
|
+
.string()
|
|
40
|
+
.describe(
|
|
41
|
+
"The end of what it printed, as plain text with the colour codes and redrawn progress lines resolved away. The end rather than the beginning, because a suite's verdict is at the end. Empty while it runs, and for one that was killed.",
|
|
42
|
+
),
|
|
43
|
+
});
|
|
44
|
+
export type CommandRun = z.infer<typeof CommandRunSchema>;
|
|
@@ -5,7 +5,7 @@ import { packageRoot } from "@intentic/constants/node";
|
|
|
5
5
|
import { ComposedOverlayLineSchema } from "./compose-overlay.js";
|
|
6
6
|
|
|
7
7
|
// The lines a target image's composer prints, as examples: golden/compose-overlay.json, which ic's reader is held to
|
|
8
|
-
// (
|
|
8
|
+
// (_hosts/ic/src/sandbox/composition.rs). This is the TS half: each is a line the contract reads, its hash its overlay's.
|
|
9
9
|
|
|
10
10
|
interface ComposeCase {
|
|
11
11
|
readonly name: string;
|
|
@@ -3,7 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
// WHAT A TARGET IMAGE COMPOSES FOR A SANDBOX, as the host reads it: the one line the image's own composer prints
|
|
4
4
|
// (`node /opt/sandbox/dist/environment/compose-overlay.js --base <image>`, _sandbox/sandbox/src/environment/compose-overlay.ts) over read-only
|
|
5
5
|
// mounts of the sandbox's volumes before a swap onto it, which `ic` builds instead of the overlay the running daemon
|
|
6
|
-
// composed (
|
|
6
|
+
// composed (_hosts/ic/src/sandbox/composition.rs). golden/compose-overlay.json holds examples the Rust test reads.
|
|
7
7
|
|
|
8
8
|
// The one format `ic` reads; any other, or none, sends it back to the running daemon's overlay.
|
|
9
9
|
export const COMPOSE_OVERLAY_FORMAT = 1;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { HUB_PROVIDERS } from "../models/providers/provider-traits.js";
|
|
2
3
|
import { KEYRING_NAME_RE } from "./keyring.js";
|
|
3
4
|
|
|
4
5
|
// THE CONNECTIONS HUB: the keyring on one of the owner's computers as the place their connections live, so a sandbox can
|
|
@@ -31,8 +32,9 @@ export const HubCardKindSchema = z.enum(["cli", "mcp", "endpoint"]);
|
|
|
31
32
|
export type HubCardKind = z.infer<typeof HubCardKindSchema>;
|
|
32
33
|
|
|
33
34
|
// The model providers whose account is a key that does not rotate: what a sign-in there would write is the whole
|
|
34
|
-
// account: Cursor and Devin keys, and the minted Z.ai and Meta keys. (Endpoints are cards, above.)
|
|
35
|
-
|
|
35
|
+
// account: Cursor and Devin keys, and the minted Z.ai and Meta keys. (Endpoints are cards, above.) Read off the providers'
|
|
36
|
+
// `hubAccount` trait (models/providers/provider-traits.ts).
|
|
37
|
+
export const HUB_ACCOUNT_PROVIDERS = HUB_PROVIDERS;
|
|
36
38
|
export const HubAccountProviderSchema = z.enum(HUB_ACCOUNT_PROVIDERS);
|
|
37
39
|
export type HubAccountProvider = z.infer<typeof HubAccountProviderSchema>;
|
|
38
40
|
|
|
@@ -31,10 +31,13 @@ export const continueWhenNeedMetSetting = z
|
|
|
31
31
|
"Whether a conversation carries on by itself once something it asked a person for arrives: a connection made, a secret given, access allowed, a tool built into the image. Off leaves the answer on the conversation's card until someone sends a message.",
|
|
32
32
|
);
|
|
33
33
|
|
|
34
|
-
// A switch rather than a policy: a restart is the one ending with nobody watching it.
|
|
34
|
+
// A switch rather than a policy: a restart is the one ending with nobody watching it. On to begin with (2026-11-23): off,
|
|
35
|
+
// a restart left every conversation it cut waiting for a press, and one whose turn was waiting on its own subagents (cut
|
|
36
|
+
// by the same restart) had nothing left that would ever wake it. A restart storm still resumes nothing
|
|
37
|
+
// (restart-resume-policy.ts), and a restart traced to memory goes by memoryKillPolicy.
|
|
35
38
|
export const autoResumeOnRestartSetting = z
|
|
36
39
|
.boolean()
|
|
37
|
-
.default(
|
|
40
|
+
.default(true)
|
|
38
41
|
.describe(
|
|
39
|
-
"Whether a turn killed by the sandbox restarting is re-run once it comes back. A switch rather than one of the policies above, because a restart is the one ending with nobody watching it, so there is no in-chat question to answer.
|
|
42
|
+
"Whether a turn killed by the sandbox restarting is re-run once it comes back. A switch rather than one of the policies above, because a restart is the one ending with nobody watching it, so there is no in-chat question to answer. On to begin with, so work a restart cut carries on rather than waiting for a press; turn it off if you would rather not have the allowance spent and files edited while you are not watching. A burst of restarts in a row resumes nothing. Either way the interruption is recorded rather than silently lost. A restart the sandbox traces to memory running out goes by `memoryKillPolicy` instead, whatever this says.",
|
|
40
43
|
);
|
|
@@ -98,40 +98,34 @@ export const AuditSettingsSchema = z.object({
|
|
|
98
98
|
});
|
|
99
99
|
export type AuditSettings = z.infer<typeof AuditSettingsSchema>;
|
|
100
100
|
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
// (
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
|
|
110
|
-
export const OUTWARD_ACTION_KEYS = [
|
|
111
|
-
"discord.message.send",
|
|
112
|
-
"discord.reaction.add",
|
|
113
|
-
"slack.message.send",
|
|
114
|
-
"slack.message.edit",
|
|
115
|
-
"slack.reaction.add",
|
|
116
|
-
"slack.reaction.remove",
|
|
117
|
-
"telegram.message.send",
|
|
118
|
-
"telegram.message.edit",
|
|
119
|
-
"telegram.reaction.add",
|
|
120
|
-
"whatsapp.message.send",
|
|
121
|
-
"imap.message.send",
|
|
122
|
-
"microsoft365.mail.send",
|
|
123
|
-
"microsoft365.calendar.write",
|
|
124
|
-
"microsoft365.files.upload",
|
|
125
|
-
"ezdrp.document.register-incoming",
|
|
126
|
-
"ezdrp.document.register-outgoing",
|
|
127
|
-
"ezdrp.case.attach-draft",
|
|
128
|
-
"edoreczenia.delivery.send",
|
|
129
|
-
"edoreczenia.delivery.open",
|
|
130
|
-
"agents.spawn",
|
|
131
|
-
] as const;
|
|
132
|
-
export type OutwardActionKey = (typeof OUTWARD_ACTION_KEYS)[number];
|
|
101
|
+
// The outward action the core's own gate consults: starting a subagent (the daemon's guard/actions.ts childSpawn). Every
|
|
102
|
+
// other key the action rules (SandboxSettings.actionRules) gate is declared by the extension that performs it, as
|
|
103
|
+
// `<card id>.<action>` (a cli card's `broker.actions` and `commandActions`, extension-manifest capability-broker.ts), and
|
|
104
|
+
// the daemon serves the enabled extensions' union (`GET /settings/outward-actions`) to the Guardrails page and the
|
|
105
|
+
// public-office preset. Writes only: a rule on `messages.read` would hold a bot reading its own channel.
|
|
106
|
+
// (2026-11-25) Until then this file listed every service's keys (Discord, Slack, Telegram and WhatsApp, which the
|
|
107
|
+
// daemon's outbound sniffer matched; IMAP and Microsoft 365, whose CLIs consult them; e-urzad's office acts), and the
|
|
108
|
+
// list drifted from what the gates consulted. A stored rule keeps its key, so every one written before still applies.
|
|
109
|
+
export const SPAWN_ACTION_KEY = "agents.spawn";
|
|
133
110
|
|
|
134
|
-
|
|
111
|
+
export const OutwardActionSchema = z.object({
|
|
112
|
+
key: z.string().min(1).describe("The key a rule for it is written under: `<card id>.<action>`, such as `slack.message.send`."),
|
|
113
|
+
extension: z.string().min(1).describe("The enabled extension that declares it (`publisher.name`)."),
|
|
114
|
+
unruled: z
|
|
115
|
+
.literal("hold")
|
|
116
|
+
.optional()
|
|
117
|
+
.describe("What it comes to while no rule names it, when that is not allow: its tool holds it for the owner until a rule says otherwise."),
|
|
118
|
+
});
|
|
119
|
+
export type OutwardAction = z.infer<typeof OutwardActionSchema>;
|
|
120
|
+
|
|
121
|
+
export const OutwardActionsSchema = z.object({
|
|
122
|
+
actions: z
|
|
123
|
+
.array(OutwardActionSchema)
|
|
124
|
+
.describe("Every outward action the enabled extensions declare that is more than a read, once each. Starting a subagent is the sandbox's own, and not among them."),
|
|
125
|
+
});
|
|
126
|
+
export type OutwardActions = z.infer<typeof OutwardActionsSchema>;
|
|
127
|
+
|
|
128
|
+
// The service an action key belongs to: its first segment, the card id (`discord`, `imap`), or `agents`.
|
|
135
129
|
export const outwardActionService = (key: string): string => key.split(".")[0] ?? key;
|
|
136
130
|
|
|
137
131
|
// The rule an action's gate applies today: the exact key, else the service's wildcard (guard/actions.ts outboundSend).
|
|
@@ -141,7 +135,7 @@ export const effectiveActionRule = (rules: Readonly<Record<string, AdmissionRule
|
|
|
141
135
|
if (rules[key] !== undefined) {
|
|
142
136
|
return rules[key];
|
|
143
137
|
}
|
|
144
|
-
return key ===
|
|
138
|
+
return key === SPAWN_ACTION_KEY ? undefined : rules[`${outwardActionService(key)}.*`];
|
|
145
139
|
};
|
|
146
140
|
|
|
147
141
|
export const AI_NOTICE_TEXT_MAX = 4000;
|