@intentic/sandbox-contract 1.326.0 → 1.327.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 +24 -12
- package/dist/chores/chores.d.ts.map +1 -1
- package/dist/chores/chores.js +29 -20
- package/dist/chores/chores.js.map +1 -1
- package/dist/chores/probes.d.ts +1 -0
- package/dist/chores/probes.d.ts.map +1 -1
- package/dist/chores/probes.js +81 -12
- package/dist/chores/probes.js.map +1 -1
- package/dist/contracts/agent.contract.d.ts +1467 -6
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +2 -2
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/agents.contract.d.ts +1391 -0
- package/dist/contracts/agents.contract.d.ts.map +1 -1
- package/dist/contracts/agents.contract.js +1 -1
- package/dist/contracts/automations.contract.d.ts +123 -4
- package/dist/contracts/automations.contract.d.ts.map +1 -1
- package/dist/contracts/automations.contract.js +13 -2
- package/dist/contracts/automations.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +79 -8
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/chores.contract.d.ts +2 -0
- package/dist/contracts/chores.contract.d.ts.map +1 -1
- package/dist/contracts/ci.contract.d.ts +2 -0
- package/dist/contracts/ci.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.d.ts +52 -0
- package/dist/contracts/device.contract.d.ts.map +1 -1
- package/dist/contracts/device.contract.js +2 -0
- package/dist/contracts/device.contract.js.map +1 -1
- package/dist/contracts/endpoints.contract.d.ts +42 -33
- package/dist/contracts/endpoints.contract.d.ts.map +1 -1
- package/dist/contracts/endpoints.contract.js +17 -7
- package/dist/contracts/endpoints.contract.js.map +1 -1
- package/dist/contracts/extensions.contract.d.ts +192 -0
- package/dist/contracts/extensions.contract.d.ts.map +1 -1
- package/dist/contracts/extensions.contract.js +37 -1
- package/dist/contracts/extensions.contract.js.map +1 -1
- package/dist/contracts/needs.contract.d.ts +1009 -0
- package/dist/contracts/needs.contract.d.ts.map +1 -1
- package/dist/contracts/pages.contract.d.ts +34 -0
- package/dist/contracts/pages.contract.d.ts.map +1 -0
- package/dist/contracts/pages.contract.js +49 -0
- package/dist/contracts/pages.contract.js.map +1 -0
- package/dist/contracts/phone.contract.d.ts +78 -0
- package/dist/contracts/phone.contract.d.ts.map +1 -0
- package/dist/contracts/phone.contract.js +11 -0
- package/dist/contracts/phone.contract.js.map +1 -0
- package/dist/contracts/privacy.contract.d.ts +20 -0
- package/dist/contracts/privacy.contract.d.ts.map +1 -1
- package/dist/contracts/privacy.contract.js +12 -2
- package/dist/contracts/privacy.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +648 -127
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +1 -1
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/secrets.contract.d.ts +88 -0
- package/dist/contracts/secrets.contract.d.ts.map +1 -1
- package/dist/contracts/secrets.contract.js +20 -1
- package/dist/contracts/secrets.contract.js.map +1 -1
- package/dist/contracts/sessions.contract.d.ts +184 -0
- package/dist/contracts/sessions.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.d.ts +16 -58
- package/dist/contracts/settings.contract.d.ts.map +1 -1
- package/dist/contracts/settings.contract.js +10 -1
- package/dist/contracts/settings.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +227 -32
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +18 -1
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/documents/conversions.d.ts.map +1 -1
- package/dist/documents/conversions.js +2 -1
- package/dist/documents/conversions.js.map +1 -1
- package/dist/documents/read.d.ts.map +1 -1
- package/dist/documents/read.js +4 -4
- package/dist/documents/read.js.map +1 -1
- package/dist/events/agent-events.d.ts +747 -1
- package/dist/events/agent-events.d.ts.map +1 -1
- package/dist/events/agent-events.js +14 -1
- package/dist/events/agent-events.js.map +1 -1
- package/dist/events/requests.d.ts +40 -0
- package/dist/events/requests.d.ts.map +1 -1
- package/dist/events/requests.js +39 -0
- package/dist/events/requests.js.map +1 -1
- package/dist/events/system-events.d.ts +120 -0
- package/dist/events/system-events.d.ts.map +1 -1
- package/dist/events/transcript.d.ts +1131 -1
- package/dist/events/transcript.d.ts.map +1 -1
- package/dist/events/transcript.js +9 -1
- package/dist/events/transcript.js.map +1 -1
- package/dist/ids/hostnames.d.ts +2 -0
- package/dist/ids/hostnames.d.ts.map +1 -1
- package/dist/ids/hostnames.js +18 -15
- package/dist/ids/hostnames.js.map +1 -1
- package/dist/ids/sandbox-id.d.ts +2 -0
- package/dist/ids/sandbox-id.d.ts.map +1 -0
- package/dist/ids/sandbox-id.js +2 -0
- package/dist/ids/sandbox-id.js.map +1 -0
- package/dist/ids/tunnel-ids.d.ts +1 -1
- package/dist/ids/tunnel-ids.d.ts.map +1 -1
- package/dist/ids/tunnel-ids.js +1 -1
- package/dist/ids/tunnel-ids.js.map +1 -1
- package/dist/index.d.ts +4902 -177
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -9
- package/dist/index.js.map +1 -1
- package/dist/models/agent-catalog.d.ts +0 -1
- package/dist/models/agent-catalog.d.ts.map +1 -1
- package/dist/models/agent-catalog.js +0 -1
- package/dist/models/agent-catalog.js.map +1 -1
- package/dist/models/agent-runtimes.d.ts +1 -1
- package/dist/models/agent-runtimes.d.ts.map +1 -1
- package/dist/models/agent-runtimes.js +1 -1
- package/dist/models/agent-runtimes.js.map +1 -1
- package/dist/models/provider-specs.d.ts +1 -0
- package/dist/models/provider-specs.d.ts.map +1 -1
- package/dist/models/provider-specs.js +11 -0
- package/dist/models/provider-specs.js.map +1 -1
- package/dist/netd/browser-wire.d.ts.map +1 -0
- package/dist/netd/browser-wire.js.map +1 -0
- package/dist/{front → netd}/generated/browser-wire.d.ts +8 -0
- package/dist/netd/generated/browser-wire.d.ts.map +1 -0
- package/dist/netd/generated/browser-wire.js.map +1 -0
- package/dist/{front → netd}/generated/wire.d.ts +20 -11
- package/dist/netd/generated/wire.d.ts.map +1 -0
- package/dist/{front → netd}/generated/wire.js.map +1 -1
- package/dist/netd/netd-wire.d.ts +9 -0
- package/dist/netd/netd-wire.d.ts.map +1 -0
- package/dist/netd/netd-wire.js +8 -0
- package/dist/netd/netd-wire.js.map +1 -0
- package/dist/policy/credential-material.d.ts +2 -0
- package/dist/policy/credential-material.d.ts.map +1 -1
- package/dist/policy/credential-material.js +14 -8
- package/dist/policy/credential-material.js.map +1 -1
- package/dist/policy/message-limits.d.ts +14 -0
- package/dist/policy/message-limits.d.ts.map +1 -0
- package/dist/policy/message-limits.js +15 -0
- package/dist/policy/message-limits.js.map +1 -0
- package/dist/policy/request-status.d.ts.map +1 -1
- package/dist/policy/request-status.js +9 -1
- package/dist/policy/request-status.js.map +1 -1
- package/dist/policy/reserved-servers.d.ts.map +1 -1
- package/dist/policy/reserved-servers.js +1 -0
- package/dist/policy/reserved-servers.js.map +1 -1
- package/dist/policy/turned-away.d.ts.map +1 -1
- package/dist/policy/turned-away.js +2 -0
- package/dist/policy/turned-away.js.map +1 -1
- package/dist/protocol/container-requirements.d.ts.map +1 -1
- package/dist/protocol/container-requirements.js +3 -4
- package/dist/protocol/container-requirements.js.map +1 -1
- package/dist/protocol/doors/host-protocol.d.ts.map +1 -0
- package/dist/protocol/doors/host-protocol.js.map +1 -0
- package/dist/protocol/{listener-protocol.d.ts → doors/listener-protocol.d.ts} +22 -0
- package/dist/protocol/doors/listener-protocol.d.ts.map +1 -0
- package/dist/protocol/doors/listener-protocol.js +38 -0
- package/dist/protocol/doors/listener-protocol.js.map +1 -0
- package/dist/protocol/doors/phone-links.d.ts +16 -0
- package/dist/protocol/doors/phone-links.d.ts.map +1 -0
- package/dist/protocol/doors/phone-links.js +28 -0
- package/dist/protocol/doors/phone-links.js.map +1 -0
- package/dist/protocol/doors/phone-protocol.d.ts +47 -0
- package/dist/protocol/doors/phone-protocol.d.ts.map +1 -0
- package/dist/protocol/doors/phone-protocol.js +33 -0
- package/dist/protocol/doors/phone-protocol.js.map +1 -0
- package/dist/protocol/doors/runner-protocol.d.ts.map +1 -0
- package/dist/protocol/{runner-protocol.js → doors/runner-protocol.js} +1 -1
- package/dist/protocol/doors/runner-protocol.js.map +1 -0
- package/dist/protocol/{webext-links.d.ts → doors/webext-links.d.ts} +1 -0
- package/dist/protocol/doors/webext-links.d.ts.map +1 -0
- package/dist/protocol/{webext-links.js → doors/webext-links.js} +1 -0
- package/dist/protocol/doors/webext-links.js.map +1 -0
- package/dist/protocol/doors/webext-protocol.d.ts.map +1 -0
- package/dist/protocol/doors/webext-protocol.js.map +1 -0
- package/dist/protocol/edge-verdict.d.ts +1 -1
- package/dist/protocol/edge-verdict.d.ts.map +1 -1
- package/dist/protocol/headers.d.ts +4 -0
- package/dist/protocol/headers.d.ts.map +1 -0
- package/dist/protocol/headers.js +4 -0
- package/dist/protocol/headers.js.map +1 -0
- package/dist/protocol/ingress-contract.d.ts +1 -1
- package/dist/protocol/ingress-contract.d.ts.map +1 -1
- package/dist/protocol/ingress-contract.js +1 -5
- package/dist/protocol/ingress-contract.js.map +1 -1
- package/dist/protocol/peer-dial.d.ts.map +1 -1
- package/dist/protocol/peer-dial.js +18 -36
- package/dist/protocol/peer-dial.js.map +1 -1
- package/dist/protocol/raw/extension-protocol.d.ts +47 -0
- package/dist/protocol/raw/extension-protocol.d.ts.map +1 -0
- package/dist/protocol/raw/extension-protocol.js +32 -0
- package/dist/protocol/raw/extension-protocol.js.map +1 -0
- package/dist/protocol/raw/raw-json-routes.d.ts +855 -0
- package/dist/protocol/raw/raw-json-routes.d.ts.map +1 -0
- package/dist/protocol/raw/raw-json-routes.js +28 -0
- package/dist/protocol/raw/raw-json-routes.js.map +1 -0
- package/dist/protocol/{raw-routes.d.ts → raw/raw-routes.d.ts} +50 -3
- package/dist/protocol/raw/raw-routes.d.ts.map +1 -0
- package/dist/protocol/{raw-routes.js → raw/raw-routes.js} +17 -3
- package/dist/protocol/raw/raw-routes.js.map +1 -0
- package/dist/protocol/raw/route-path.d.ts +3 -0
- package/dist/protocol/raw/route-path.d.ts.map +1 -0
- package/dist/protocol/raw/route-path.js +8 -0
- package/dist/protocol/raw/route-path.js.map +1 -0
- package/dist/protocol/route-meta.d.ts +1 -1
- package/dist/protocol/route-meta.d.ts.map +1 -1
- package/dist/protocol/routes.d.ts +1 -0
- package/dist/protocol/routes.d.ts.map +1 -1
- package/dist/protocol/routes.js +8 -0
- package/dist/protocol/routes.js.map +1 -1
- package/dist/protocol/sse.d.ts +2 -1
- package/dist/protocol/sse.d.ts.map +1 -1
- package/dist/protocol/sse.js +23 -12
- package/dist/protocol/sse.js.map +1 -1
- package/dist/protocol/tunnel-bulk.js +1 -1
- package/dist/protocol/tunnel-bulk.js.map +1 -1
- package/dist/protocol/vitals.d.ts +2 -1
- package/dist/protocol/vitals.d.ts.map +1 -1
- package/dist/protocol/vitals.js +1 -0
- package/dist/protocol/vitals.js.map +1 -1
- package/dist/schemas/activity.d.ts +1 -0
- package/dist/schemas/activity.d.ts.map +1 -1
- package/dist/schemas/activity.js.map +1 -1
- package/dist/schemas/agent.d.ts +6 -0
- package/dist/schemas/agent.d.ts.map +1 -1
- package/dist/schemas/agent.js +9 -4
- package/dist/schemas/agent.js.map +1 -1
- package/dist/schemas/agents-list.d.ts +404 -0
- package/dist/schemas/agents-list.d.ts.map +1 -0
- package/dist/schemas/agents-list.js +14 -0
- package/dist/schemas/agents-list.js.map +1 -0
- package/dist/schemas/agents.d.ts +203 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/agents.js +44 -0
- package/dist/schemas/agents.js.map +1 -1
- package/dist/schemas/automations.d.ts +235 -347
- package/dist/schemas/automations.d.ts.map +1 -1
- package/dist/schemas/automations.js +82 -13
- package/dist/schemas/automations.js.map +1 -1
- package/dist/schemas/capabilities.d.ts +43 -8
- package/dist/schemas/capabilities.d.ts.map +1 -1
- package/dist/schemas/capabilities.js +6 -2
- package/dist/schemas/capabilities.js.map +1 -1
- package/dist/schemas/ci.d.ts +4 -0
- package/dist/schemas/ci.d.ts.map +1 -1
- package/dist/schemas/ci.js +8 -0
- package/dist/schemas/ci.js.map +1 -1
- package/dist/schemas/devices.d.ts +67 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +8 -0
- package/dist/schemas/devices.js.map +1 -1
- package/dist/schemas/engines.d.ts +57 -0
- package/dist/schemas/engines.d.ts.map +1 -1
- package/dist/schemas/engines.js +4 -0
- package/dist/schemas/engines.js.map +1 -1
- package/dist/schemas/extension-updates.d.ts +329 -0
- package/dist/schemas/extension-updates.d.ts.map +1 -1
- package/dist/schemas/extension-updates.js +68 -3
- package/dist/schemas/extension-updates.js.map +1 -1
- package/dist/schemas/git/git.d.ts +11 -0
- package/dist/schemas/git/git.d.ts.map +1 -1
- package/dist/schemas/git/git.js +4 -4
- package/dist/schemas/git/git.js.map +1 -1
- package/dist/schemas/history.d.ts +2 -0
- package/dist/schemas/history.d.ts.map +1 -1
- package/dist/schemas/history.js.map +1 -1
- package/dist/schemas/hosts.d.ts +74 -0
- package/dist/schemas/hosts.d.ts.map +1 -1
- package/dist/schemas/hosts.js +10 -1
- package/dist/schemas/hosts.js.map +1 -1
- package/dist/schemas/loopback-catch.d.ts +1 -0
- package/dist/schemas/loopback-catch.d.ts.map +1 -1
- package/dist/schemas/loopback-catch.js +1 -0
- package/dist/schemas/loopback-catch.js.map +1 -1
- package/dist/schemas/maintenance.d.ts +8 -0
- package/dist/schemas/maintenance.d.ts.map +1 -1
- package/dist/schemas/maintenance.js +6 -0
- package/dist/schemas/maintenance.js.map +1 -1
- package/dist/schemas/members.d.ts +58 -0
- package/dist/schemas/members.d.ts.map +1 -0
- package/dist/schemas/members.js +16 -0
- package/dist/schemas/members.js.map +1 -0
- package/dist/schemas/metrics.d.ts +10 -0
- package/dist/schemas/metrics.d.ts.map +1 -1
- package/dist/schemas/metrics.js +19 -3
- package/dist/schemas/metrics.js.map +1 -1
- package/dist/schemas/needs.d.ts +1159 -1
- package/dist/schemas/needs.d.ts.map +1 -1
- package/dist/schemas/needs.js +25 -3
- package/dist/schemas/needs.js.map +1 -1
- package/dist/schemas/offload.js +1 -1
- package/dist/schemas/offload.js.map +1 -1
- package/dist/schemas/peer-enrollment.d.ts +7 -0
- package/dist/schemas/peer-enrollment.d.ts.map +1 -0
- package/dist/schemas/peer-enrollment.js +6 -0
- package/dist/schemas/peer-enrollment.js.map +1 -0
- package/dist/schemas/phone.d.ts +231 -0
- package/dist/schemas/phone.d.ts.map +1 -0
- package/dist/schemas/phone.js +57 -0
- package/dist/schemas/phone.js.map +1 -0
- package/dist/schemas/privacy.d.ts +41 -0
- package/dist/schemas/privacy.d.ts.map +1 -1
- package/dist/schemas/privacy.js +20 -3
- package/dist/schemas/privacy.js.map +1 -1
- package/dist/schemas/project-delivery.d.ts +94 -0
- package/dist/schemas/project-delivery.d.ts.map +1 -0
- package/dist/schemas/project-delivery.js +35 -0
- package/dist/schemas/project-delivery.js.map +1 -0
- package/dist/schemas/providers/plan-limits.d.ts +7 -0
- package/dist/schemas/providers/plan-limits.d.ts.map +1 -1
- package/dist/schemas/providers/plan-limits.js +22 -1
- package/dist/schemas/providers/plan-limits.js.map +1 -1
- package/dist/schemas/providers/usage.d.ts +1 -2
- package/dist/schemas/providers/usage.d.ts.map +1 -1
- package/dist/schemas/providers/usage.js +1 -2
- package/dist/schemas/providers/usage.js.map +1 -1
- package/dist/schemas/push.d.ts +1 -0
- package/dist/schemas/push.d.ts.map +1 -1
- package/dist/schemas/push.js.map +1 -1
- package/dist/schemas/secrets.d.ts +99 -0
- package/dist/schemas/secrets.d.ts.map +1 -1
- package/dist/schemas/secrets.js +34 -3
- 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 +1 -0
- package/dist/schemas/settings-history.js.map +1 -1
- package/dist/schemas/settings.d.ts +13 -58
- package/dist/schemas/settings.d.ts.map +1 -1
- package/dist/schemas/settings.js +8 -13
- package/dist/schemas/settings.js.map +1 -1
- package/dist/schemas/terminal.d.ts +32 -0
- package/dist/schemas/terminal.d.ts.map +1 -1
- package/dist/schemas/terminal.js +37 -0
- package/dist/schemas/terminal.js.map +1 -1
- package/dist/schemas/updates.d.ts +1 -0
- package/dist/schemas/updates.d.ts.map +1 -1
- package/dist/schemas/updates.js +4 -0
- package/dist/schemas/updates.js.map +1 -1
- package/dist/schemas/workspace/workspace-search.d.ts +1 -0
- package/dist/schemas/workspace/workspace-search.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-search.js.map +1 -1
- package/dist/schemas/workspace/workspace-tree.d.ts +3 -0
- package/dist/schemas/workspace/workspace-tree.d.ts.map +1 -1
- package/dist/schemas/workspace/workspace-tree.js +22 -5
- package/dist/schemas/workspace/workspace-tree.js.map +1 -1
- package/dist/state/arrival.d.ts +59 -0
- package/dist/state/arrival.d.ts.map +1 -1
- package/dist/state/arrival.js +17 -0
- package/dist/state/arrival.js.map +1 -1
- package/dist/state/contract-lock.js +2 -2
- package/dist/state/contract-lock.js.map +1 -1
- package/dist/state/definition.d.ts +82 -16
- package/dist/state/definition.d.ts.map +1 -1
- package/dist/state/history-state.d.ts.map +1 -1
- package/dist/state/history-state.js +38 -0
- package/dist/state/history-state.js.map +1 -1
- package/dist/state/runtime-state.d.ts +6 -0
- package/dist/state/runtime-state.d.ts.map +1 -1
- package/dist/state/runtime-state.js +2 -0
- package/dist/state/runtime-state.js.map +1 -1
- package/dist/state/workspace-state.d.ts +24 -6
- package/dist/state/workspace-state.d.ts.map +1 -1
- package/dist/state/workspace-state.js +29 -7
- package/dist/state/workspace-state.js.map +1 -1
- package/dist/text/embed.d.ts +10 -0
- package/dist/text/embed.d.ts.map +1 -1
- package/dist/text/embed.js +25 -0
- package/dist/text/embed.js.map +1 -1
- package/dist/text/pages.d.ts +53 -0
- package/dist/text/pages.d.ts.map +1 -0
- package/dist/text/pages.js +230 -0
- package/dist/text/pages.js.map +1 -0
- package/dist/text/transcript-fold.d.ts +1 -0
- package/dist/text/transcript-fold.d.ts.map +1 -1
- package/dist/text/transcript-fold.js +30 -2
- package/dist/text/transcript-fold.js.map +1 -1
- package/dist/webext/index.d.ts +3 -2
- package/dist/webext/index.d.ts.map +1 -1
- package/dist/webext/index.js +3 -2
- package/dist/webext/index.js.map +1 -1
- package/package.json +77 -22
- package/src/chores/chores.ts +41 -21
- package/src/chores/{probes.test.ts → probes.integration.test.ts} +134 -1
- package/src/chores/probes.ts +128 -14
- package/src/chores/verdict.test.ts +29 -0
- package/src/contracts/agent.contract.ts +2 -2
- package/src/contracts/agents.contract.ts +1 -1
- package/src/contracts/automations.contract.ts +19 -1
- package/src/contracts/device.contract.ts +5 -0
- package/src/contracts/endpoints.contract.ts +32 -26
- package/src/contracts/extensions.contract.ts +49 -0
- package/src/contracts/pages.contract.ts +61 -0
- package/src/contracts/phone.contract.ts +21 -0
- package/src/contracts/privacy.contract.ts +13 -1
- package/src/contracts/runner.contract.ts +1 -1
- package/src/contracts/secrets.contract.ts +25 -0
- package/src/contracts/settings.contract.ts +10 -0
- package/src/contracts/system.contract.ts +26 -0
- package/src/documents/conversions.ts +3 -1
- package/src/documents/read.ts +4 -5
- package/src/events/agent-events.ts +27 -3
- package/src/events/requests.ts +47 -0
- package/src/events/transcript.ts +14 -0
- package/src/ids/hostnames.fixture.json +14 -10
- package/src/ids/hostnames.test.ts +21 -2
- package/src/ids/hostnames.ts +34 -15
- package/src/ids/sandbox-id.ts +3 -0
- package/src/ids/tunnel-ids.ts +1 -2
- package/src/index.ts +29 -12
- package/src/models/agent-catalog.ts +1 -2
- package/src/models/agent-runtimes.ts +12 -6
- package/src/models/provider-specs.test.ts +12 -0
- package/src/models/provider-specs.ts +16 -0
- package/src/{front → netd}/browser-wire.ts +1 -1
- package/src/{front → netd}/generated/browser-wire.json +80 -7
- package/src/{front → netd}/generated/browser-wire.ts +34 -7
- package/src/{front/generated/front-wire.json → netd/generated/netd-wire.json} +103 -41
- package/src/{front → netd}/generated/tunnel.json +15 -1
- package/src/{front → netd}/generated/wire.ts +26 -21
- package/src/netd/netd-wire.ts +24 -0
- package/src/{front → netd}/wire-manifests.test.ts +31 -11
- package/src/policy/credential-material.ts +39 -11
- package/src/policy/message-limits.ts +25 -0
- package/src/policy/request-status.ts +10 -1
- package/src/policy/reserved-servers.ts +3 -2
- package/src/policy/tests/credential-material.test.ts +49 -1
- package/src/policy/tests/message-limits.test.ts +27 -0
- package/src/policy/tests/reserved-servers.test.ts +3 -3
- package/src/policy/turned-away.ts +5 -1
- package/src/protocol/container-requirements.ts +4 -5
- package/src/protocol/{listener-protocol.ts → doors/listener-protocol.ts} +37 -15
- package/src/protocol/doors/phone-links.ts +50 -0
- package/src/protocol/doors/phone-protocol.test.ts +136 -0
- package/src/protocol/doors/phone-protocol.ts +71 -0
- package/src/protocol/{runner-protocol.ts → doors/runner-protocol.ts} +1 -1
- package/src/protocol/{webext-links.ts → doors/webext-links.ts} +4 -0
- package/src/protocol/edge-verdict.ts +1 -1
- package/src/protocol/headers.ts +14 -0
- package/src/protocol/ingress-contract.ts +6 -10
- package/src/protocol/peer-dial.test.ts +83 -4
- package/src/protocol/peer-dial.ts +33 -40
- package/src/protocol/raw/extension-protocol.ts +59 -0
- package/src/protocol/raw/raw-json-routes.ts +61 -0
- package/src/protocol/{raw-routes.ts → raw/raw-routes.ts} +40 -7
- package/src/protocol/raw/route-path.ts +13 -0
- package/src/protocol/route-meta.ts +4 -4
- package/src/protocol/routes.ts +12 -0
- package/src/protocol/sse.test.ts +49 -0
- package/src/protocol/sse.ts +29 -14
- package/src/protocol/tunnel-bulk.test.ts +1 -1
- package/src/protocol/tunnel-bulk.ts +2 -2
- package/src/protocol/vitals.test.ts +7 -7
- package/src/protocol/vitals.ts +12 -7
- package/src/schemas/activity.ts +1 -0
- package/src/schemas/agent.ts +11 -4
- package/src/schemas/agents-list.ts +24 -0
- package/src/schemas/agents.ts +71 -2
- package/src/schemas/automations.ts +126 -24
- package/src/schemas/capabilities.ts +13 -3
- package/src/schemas/ci.ts +10 -0
- package/src/schemas/devices.ts +24 -0
- package/src/schemas/engines.ts +7 -0
- package/src/schemas/extension-updates.ts +93 -3
- package/src/schemas/git/git.ts +15 -4
- package/src/schemas/history.ts +2 -0
- package/src/schemas/hosts.ts +23 -1
- package/src/schemas/loopback-catch.ts +6 -1
- package/src/schemas/maintenance.ts +9 -0
- package/src/schemas/members.ts +33 -0
- package/src/schemas/metrics.ts +21 -3
- package/src/schemas/needs.ts +36 -3
- package/src/schemas/offload.ts +1 -1
- package/src/schemas/peer-enrollment.ts +14 -0
- package/src/schemas/phone.ts +121 -0
- package/src/schemas/privacy.ts +36 -7
- package/src/schemas/project-delivery.ts +78 -0
- package/src/schemas/providers/plan-limits.ts +27 -3
- package/src/schemas/providers/usage.ts +3 -3
- package/src/schemas/push.ts +1 -0
- package/src/schemas/secrets.ts +54 -3
- package/src/schemas/settings-history.ts +2 -0
- package/src/schemas/settings.ts +20 -22
- package/src/schemas/terminal.ts +50 -0
- package/src/schemas/updates.test.ts +47 -0
- package/src/schemas/updates.ts +4 -0
- package/src/schemas/workspace/workspace-search.ts +2 -0
- package/src/schemas/workspace/workspace-tree.ts +40 -12
- package/src/state/arrival.ts +40 -0
- package/src/state/contract-lock.test.ts +1 -1
- package/src/state/contract-lock.ts +5 -5
- package/src/state/history-state.ts +72 -1
- package/src/state/runtime-state.ts +4 -0
- package/src/state/workspace-state.ts +65 -20
- package/src/text/embed.test.ts +21 -1
- package/src/text/embed.ts +50 -3
- package/src/text/pages.test.ts +161 -0
- package/src/text/pages.ts +344 -0
- package/src/text/transcript-fold.test.ts +22 -0
- package/src/text/transcript-fold.ts +41 -2
- package/src/webext/index.ts +3 -2
- package/dist/front/browser-wire.d.ts.map +0 -1
- package/dist/front/browser-wire.js.map +0 -1
- package/dist/front/front-wire.d.ts +0 -6
- package/dist/front/front-wire.d.ts.map +0 -1
- package/dist/front/front-wire.js +0 -5
- package/dist/front/front-wire.js.map +0 -1
- package/dist/front/generated/browser-wire.d.ts.map +0 -1
- package/dist/front/generated/browser-wire.js.map +0 -1
- package/dist/front/generated/wire.d.ts.map +0 -1
- package/dist/protocol/host-protocol.d.ts.map +0 -1
- package/dist/protocol/host-protocol.js.map +0 -1
- package/dist/protocol/listener-protocol.d.ts.map +0 -1
- package/dist/protocol/listener-protocol.js +0 -33
- package/dist/protocol/listener-protocol.js.map +0 -1
- package/dist/protocol/raw-routes.d.ts.map +0 -1
- package/dist/protocol/raw-routes.js.map +0 -1
- package/dist/protocol/request-id.d.ts +0 -2
- package/dist/protocol/request-id.d.ts.map +0 -1
- package/dist/protocol/request-id.js +0 -2
- package/dist/protocol/request-id.js.map +0 -1
- package/dist/protocol/runner-protocol.d.ts.map +0 -1
- package/dist/protocol/runner-protocol.js.map +0 -1
- package/dist/protocol/webext-links.d.ts.map +0 -1
- package/dist/protocol/webext-links.js.map +0 -1
- package/dist/protocol/webext-protocol.d.ts.map +0 -1
- package/dist/protocol/webext-protocol.js.map +0 -1
- package/src/front/front-wire.ts +0 -15
- package/src/protocol/request-id.ts +0 -2
- /package/dist/{front → netd}/browser-wire.d.ts +0 -0
- /package/dist/{front → netd}/browser-wire.js +0 -0
- /package/dist/{front → netd}/generated/browser-wire.js +0 -0
- /package/dist/{front → netd}/generated/wire.js +0 -0
- /package/dist/protocol/{host-protocol.d.ts → doors/host-protocol.d.ts} +0 -0
- /package/dist/protocol/{host-protocol.js → doors/host-protocol.js} +0 -0
- /package/dist/protocol/{runner-protocol.d.ts → doors/runner-protocol.d.ts} +0 -0
- /package/dist/protocol/{webext-protocol.d.ts → doors/webext-protocol.d.ts} +0 -0
- /package/dist/protocol/{webext-protocol.js → doors/webext-protocol.js} +0 -0
- /package/src/protocol/{host-protocol.ts → doors/host-protocol.ts} +0 -0
- /package/src/protocol/{webext-protocol.ts → doors/webext-protocol.ts} +0 -0
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getEventIteratorSchemaDetails, isContractProcedure } from "@orpc/contract";
|
|
2
2
|
import type { z } from "zod";
|
|
3
|
-
import { RAW_ROUTE_LIST } from "./protocol/raw-routes.js";
|
|
3
|
+
import { RAW_ROUTE_LIST } from "./protocol/raw/raw-routes.js";
|
|
4
4
|
import type { ContractRoute } from "./protocol/routes.js";
|
|
5
5
|
import { contractRoutes, requestPathFor, routeForProcedure, routeNameForRequest, routeShapes, servedRoute } from "./protocol/routes.js";
|
|
6
6
|
import { accountsContract } from "./contracts/accounts.contract.js";
|
|
@@ -25,6 +25,7 @@ import { inventoryContract } from "./contracts/inventory.contract.js";
|
|
|
25
25
|
import { issuesContract } from "./contracts/issues.contract.js";
|
|
26
26
|
import { logsContract } from "./contracts/logs.contract.js";
|
|
27
27
|
import { loopsContract } from "./contracts/loops.contract.js";
|
|
28
|
+
import { pagesContract } from "./contracts/pages.contract.js";
|
|
28
29
|
import { panelsContract } from "./contracts/panels.contract.js";
|
|
29
30
|
import { portsContract } from "./contracts/ports.contract.js";
|
|
30
31
|
import { publicContract } from "./contracts/public.contract.js";
|
|
@@ -59,12 +60,12 @@ export { choresContract } from "./contracts/chores.contract.js";
|
|
|
59
60
|
export { ciContract } from "./contracts/ci.contract.js";
|
|
60
61
|
export {
|
|
61
62
|
endpointsContract,
|
|
62
|
-
type
|
|
63
|
-
|
|
63
|
+
type HostModelServer,
|
|
64
|
+
HostModelServerSchema,
|
|
65
|
+
type HostModelServers,
|
|
66
|
+
HostModelServersSchema,
|
|
64
67
|
LocalModelFitSchema,
|
|
65
68
|
type LocalModelFitResponse,
|
|
66
|
-
type LocalModelGpu,
|
|
67
|
-
LocalModelGpuSchema,
|
|
68
69
|
type LocalModelPrefetch,
|
|
69
70
|
LocalModelPrefetchSchema,
|
|
70
71
|
type TrialHealth,
|
|
@@ -81,18 +82,21 @@ export { historyContract } from "./contracts/history.contract.js";
|
|
|
81
82
|
export { deviceContract } from "./contracts/device.contract.js";
|
|
82
83
|
// Same inversion, spoken over a browser extension's socket, with the extension implementing it.
|
|
83
84
|
export { webextContract } from "./contracts/webext.contract.js";
|
|
85
|
+
// Same inversion, spoken over a phone app's socket as JSON-RPC (protocol/doors/phone-protocol.ts), with the app implementing it.
|
|
86
|
+
export { phoneContract } from "./contracts/phone.contract.js";
|
|
84
87
|
// Same inversion again: spoken over a runner's WebSocket, with the runner implementing it.
|
|
85
88
|
export { runnerContract } from "./contracts/runner.contract.js";
|
|
86
89
|
export { intenticContract } from "./contracts/intentic.contract.js";
|
|
87
90
|
export { inventoryContract } from "./contracts/inventory.contract.js";
|
|
88
91
|
export { issuesContract } from "./contracts/issues.contract.js";
|
|
89
92
|
export { logsContract } from "./contracts/logs.contract.js";
|
|
90
|
-
export { REQUEST_ID_HEADER } from "./protocol/
|
|
93
|
+
export { CONNECT_TOKEN_HEADER, EXTENSION_TOKEN_HEADER, REQUEST_ID_HEADER } from "./protocol/headers.js";
|
|
91
94
|
export * from "./protocol/edge-verdict.js";
|
|
92
95
|
export * from "./protocol/vitals.js";
|
|
93
96
|
export { loopsContract } from "./contracts/loops.contract.js";
|
|
94
97
|
export { panelsContract } from "./contracts/panels.contract.js";
|
|
95
98
|
export { portsContract } from "./contracts/ports.contract.js";
|
|
99
|
+
export { pagesContract, PageAppCallResultSchema, PageAppCallSchema, PageErrorsResultSchema, PageErrorsSchema } from "./contracts/pages.contract.js";
|
|
96
100
|
export { publicContract } from "./contracts/public.contract.js";
|
|
97
101
|
export { providersContract, type RunnableProviders, RunnableProvidersSchema } from "./contracts/providers.contract.js";
|
|
98
102
|
export { pushContract } from "./contracts/push.contract.js";
|
|
@@ -130,10 +134,13 @@ export * from "./policy/request-status.js";
|
|
|
130
134
|
export * from "./events/child-run.js";
|
|
131
135
|
export * from "./policy/turned-away.js";
|
|
132
136
|
export * from "./text/mentions.js";
|
|
137
|
+
export * from "./text/pages.js";
|
|
133
138
|
export * from "./protocol/sse.js";
|
|
134
139
|
export * from "./protocol/routes.js";
|
|
135
140
|
export { type ControlReach, defaultFloor, type RouteAccess, type RouteMeta, routeAccess } from "./protocol/route-meta.js";
|
|
136
|
-
export { RAW_ROUTE_LIST, RAW_ROUTES, type RawRouteKey, rawRoutePath } from "./protocol/raw-routes.js";
|
|
141
|
+
export { RAW_ROUTE_LIST, RAW_ROUTES, type RawRouteKey, type RawRouteParams, rawRoutePath, rawRouteUrl } from "./protocol/raw/raw-routes.js";
|
|
142
|
+
export * from "./protocol/raw/raw-json-routes.js";
|
|
143
|
+
export { fillRoutePath, type RoutePathParams } from "./protocol/raw/route-path.js";
|
|
137
144
|
export { tunnelBulkRoutes } from "./protocol/tunnel-bulk.js";
|
|
138
145
|
export type { SandboxCallInput, SandboxGroup, SandboxHandlerInput, SandboxHandlerOutput, SandboxProcedure } from "./protocol/procedure-types.js";
|
|
139
146
|
export * from "./policy/control-scopes.js";
|
|
@@ -161,13 +168,16 @@ export * from "./policy/capability-secrets.js";
|
|
|
161
168
|
export * from "./policy/secret-hosts.js";
|
|
162
169
|
export * from "./ids/conversation-ids.js";
|
|
163
170
|
export * from "./text/documents.js";
|
|
164
|
-
export * from "./protocol/host-protocol.js";
|
|
165
|
-
export * from "./protocol/webext-protocol.js";
|
|
166
|
-
export * from "./protocol/webext-links.js";
|
|
167
|
-
export * from "./protocol/
|
|
168
|
-
export * from "./protocol/
|
|
171
|
+
export * from "./protocol/doors/host-protocol.js";
|
|
172
|
+
export * from "./protocol/doors/webext-protocol.js";
|
|
173
|
+
export * from "./protocol/doors/webext-links.js";
|
|
174
|
+
export * from "./protocol/doors/phone-protocol.js";
|
|
175
|
+
export * from "./protocol/doors/phone-links.js";
|
|
176
|
+
export * from "./protocol/doors/runner-protocol.js";
|
|
177
|
+
export * from "./protocol/doors/listener-protocol.js";
|
|
169
178
|
export * from "./protocol/container-requirements.js";
|
|
170
179
|
export * from "./ids/hostnames.js";
|
|
180
|
+
export { SANDBOX_ID } from "./ids/sandbox-id.js";
|
|
171
181
|
export * from "./ids/project-dir.js";
|
|
172
182
|
export * from "./policy/overlay-lint.js";
|
|
173
183
|
export * from "./models/model-label.js";
|
|
@@ -180,6 +190,7 @@ export * from "./text/path-refs.js";
|
|
|
180
190
|
export * from "./text/archives.js";
|
|
181
191
|
export * from "./policy/output-fields.js";
|
|
182
192
|
export * from "./policy/approvals-execution.js";
|
|
193
|
+
export * from "./policy/message-limits.js";
|
|
183
194
|
// Wire shapes, one module per subject area, mirroring `contracts/`; a `{param}` in the route path merges into the same
|
|
184
195
|
// flat object, split back into path/body/query. `schemas/internal.ts` is absent: it's vocabulary, not a wire shape.
|
|
185
196
|
export * from "./schemas/activity.js";
|
|
@@ -191,6 +202,7 @@ export * from "./schemas/agents.js";
|
|
|
191
202
|
export * from "./schemas/speaker.js";
|
|
192
203
|
export * from "./schemas/approvals.js";
|
|
193
204
|
export * from "./schemas/automations.js";
|
|
205
|
+
export * from "./schemas/agents-list.js";
|
|
194
206
|
export * from "./schemas/capabilities.js";
|
|
195
207
|
export * from "./schemas/chat-route.js";
|
|
196
208
|
export * from "./schemas/ci.js";
|
|
@@ -198,6 +210,7 @@ export * from "./schemas/providers/claude-gate.js";
|
|
|
198
210
|
export * from "./schemas/codebase-health.js";
|
|
199
211
|
export * from "./schemas/context-trim.js";
|
|
200
212
|
export * from "./schemas/devices.js";
|
|
213
|
+
export * from "./schemas/project-delivery.js";
|
|
201
214
|
export * from "./schemas/engines.js";
|
|
202
215
|
export * from "./schemas/environment.js";
|
|
203
216
|
export * from "./schemas/exit.js";
|
|
@@ -209,6 +222,7 @@ export * from "./schemas/git/git-history.js";
|
|
|
209
222
|
export * from "./schemas/history.js";
|
|
210
223
|
export * from "./schemas/hosts.js";
|
|
211
224
|
export * from "./schemas/loopback-catch.js";
|
|
225
|
+
export * from "./schemas/peer-enrollment.js";
|
|
212
226
|
export * from "./schemas/intentic.js";
|
|
213
227
|
export * from "./schemas/inventory.js";
|
|
214
228
|
export * from "./schemas/issues.js";
|
|
@@ -216,6 +230,7 @@ export * from "./schemas/logs.js";
|
|
|
216
230
|
export * from "./schemas/loops.js";
|
|
217
231
|
export * from "./schemas/maintenance.js";
|
|
218
232
|
export * from "./schemas/marketplace.js";
|
|
233
|
+
export * from "./schemas/members.js";
|
|
219
234
|
export * from "./schemas/metrics.js";
|
|
220
235
|
export * from "./schemas/panels.js";
|
|
221
236
|
export * from "./schemas/personas.js";
|
|
@@ -247,6 +262,7 @@ export * from "./schemas/providers/usage.js";
|
|
|
247
262
|
export * from "./schemas/vpn.js";
|
|
248
263
|
export * from "./schemas/offload.js";
|
|
249
264
|
export * from "./schemas/webext.js";
|
|
265
|
+
export * from "./schemas/phone.js";
|
|
250
266
|
export * from "./schemas/workflows.js";
|
|
251
267
|
export * from "./schemas/workspace/workspace-repos.js";
|
|
252
268
|
export * from "./schemas/workspace/workspace-search.js";
|
|
@@ -296,6 +312,7 @@ export const sandboxContract = {
|
|
|
296
312
|
issues: issuesContract,
|
|
297
313
|
logs: logsContract,
|
|
298
314
|
loops: loopsContract,
|
|
315
|
+
pages: pagesContract,
|
|
299
316
|
panels: panelsContract,
|
|
300
317
|
ports: portsContract,
|
|
301
318
|
public: publicContract,
|
|
@@ -42,9 +42,8 @@ export const isTrialProvider = (provider: AgentProvider): boolean => provider ==
|
|
|
42
42
|
|
|
43
43
|
// A synthetic id, never changing; which real model answers is decided per message by the platform alone.
|
|
44
44
|
export const TRIAL_MODEL_ID = "auto";
|
|
45
|
-
//
|
|
45
|
+
// What the daemon and the trial endpoint call the free trial; the web says it in the reader's language.
|
|
46
46
|
export const TRIAL_LABEL = "Free trial";
|
|
47
|
-
export const TRIAL_NOTICE = "Trial messages pass through intentic. Connect an account to chat directly.";
|
|
48
47
|
|
|
49
48
|
export const ENDPOINT_PROVIDER_PREFIX = "endpoint/";
|
|
50
49
|
export const endpointProvider = (id: string): AgentProvider => `${ENDPOINT_PROVIDER_PREFIX}${id}`;
|
|
@@ -52,10 +52,13 @@ export interface AgentCapabilities {
|
|
|
52
52
|
// Whether a credential is masked; "none" is structural, only the Claude Code loop can rewrite a model's read.
|
|
53
53
|
readonly secrets: "masked" | "none";
|
|
54
54
|
// Whether the privacy shield can stand between this loop and its provider: `gateway` when the daemon names the base
|
|
55
|
-
// URL the loop sends its model requests to (so the gateway reads and masks every byte of them)
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
|
|
55
|
+
// URL the loop sends its model requests to (so the gateway reads and masks every byte of them); `hooks` when the wire
|
|
56
|
+
// is the vendor's own but every channel the model reads through passes the daemon first (the prompt and instructions
|
|
57
|
+
// it hands over, a hook in front of each file read, a shell whose output the daemon masks, MCP behind the masking
|
|
58
|
+
// proxy), so the shield reads by content there too; `none` when the loop talks to its provider on a wire or a
|
|
59
|
+
// configuration the daemon does not own and reads files it never sees. Only a `none` loop on an untrusted provider is
|
|
60
|
+
// refused while the shield is on.
|
|
61
|
+
readonly privacy: "gateway" | "hooks" | "none";
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
// The Claude Code Agent SDK loop, the ceiling every other runtime is measured against: the only one that owns the whole
|
|
@@ -234,6 +237,9 @@ export const CURSOR: AgentCapabilities = {
|
|
|
234
237
|
rulebook: "hooks",
|
|
235
238
|
// none, structurally: its hooks only allow/deny or are discarded, nothing here to substitute a reference into.
|
|
236
239
|
secrets: "none",
|
|
237
|
-
// Cursor's own RPC to its own servers,
|
|
238
|
-
|
|
240
|
+
// Cursor's own RPC to its own servers, so no gateway; but the daemon owns every channel the model reads through:
|
|
241
|
+
// it hands over the prompt and instructions, its hooks stand before each file read and rewrite each shell command
|
|
242
|
+
// to mask the output, the tools that read past both (grep, ls, glob, semantic search, fetch, lints) are withheld,
|
|
243
|
+
// and MCP goes through the masking proxy (runtimes/cursor/cursor-shield.ts).
|
|
244
|
+
privacy: "hooks",
|
|
239
245
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
mintedVariant,
|
|
8
8
|
mintedVariants,
|
|
9
9
|
NATIVE_PROVIDERS,
|
|
10
|
+
nativeProvidersIn,
|
|
10
11
|
PROVIDER_SPECS,
|
|
11
12
|
providerSpec,
|
|
12
13
|
} from "./provider-specs.js";
|
|
@@ -124,3 +125,14 @@ test("an id that is not a provider resolves to nothing", () => {
|
|
|
124
125
|
expect(mintedVariant(id), id).toBeUndefined();
|
|
125
126
|
}
|
|
126
127
|
});
|
|
128
|
+
|
|
129
|
+
// The desktop app's `?found=claude,codex`: what it found signed in on the computer, read back as providers.
|
|
130
|
+
test("a list of ids names known providers once each, in its own order", () => {
|
|
131
|
+
expect(nativeProvidersIn("codex,claude")).toEqual(["codex", "claude"]);
|
|
132
|
+
// Unknown ids, blanks and repeats are dropped rather than refusing the whole list.
|
|
133
|
+
expect(nativeProvidersIn(" claude , ,nope,endpoint/x,claude,gemini")).toEqual(["claude", "gemini"]);
|
|
134
|
+
// A repeated query key, as a router hands it back, and a bare `?found`.
|
|
135
|
+
expect(nativeProvidersIn(["codex", null, "cursor"])).toEqual(["codex", "cursor"]);
|
|
136
|
+
expect(nativeProvidersIn(null)).toEqual([]);
|
|
137
|
+
expect(nativeProvidersIn(undefined)).toEqual([]);
|
|
138
|
+
});
|
|
@@ -233,6 +233,22 @@ const BY_ID = new Map<string, ProviderSpec>(PROVIDER_SPECS.map((spec) => [spec.i
|
|
|
233
233
|
// surface goes through.
|
|
234
234
|
export const providerSpec = (provider: string): ProviderSpec | undefined => BY_ID.get(provider);
|
|
235
235
|
|
|
236
|
+
// The native providers a list of ids names, in its order and once each; anything else in it (an endpoint, a typo, a
|
|
237
|
+
// provider a newer build knows) is dropped rather than refusing the list. Takes a comma-separated string or an array of
|
|
238
|
+
// them, the way a query string hands it over: the desktop app's `?found=claude,codex` names the providers it found
|
|
239
|
+
// signed in on the computer it runs on.
|
|
240
|
+
export const nativeProvidersIn = (value: string | readonly (string | null)[] | null | undefined): NativeProvider[] => {
|
|
241
|
+
const raw = [value].flat().filter((entry) => entry !== null && entry !== undefined);
|
|
242
|
+
const found: NativeProvider[] = [];
|
|
243
|
+
for (const id of raw.flatMap((entry) => entry.split(",")).map((entry) => entry.trim())) {
|
|
244
|
+
const provider = NATIVE_PROVIDERS.find((candidate) => candidate === id);
|
|
245
|
+
if (provider !== undefined && !found.includes(provider)) {
|
|
246
|
+
found.push(provider);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return found;
|
|
250
|
+
};
|
|
251
|
+
|
|
236
252
|
// Providers whose model runs under Claude Code through the bundled translator (CLIProxyAPI); claude is absent, native
|
|
237
253
|
// Anthropic OAuth serves it directly. Narrowed off the auth kind so tables built on this move with it.
|
|
238
254
|
export type TranslatorProvider = Extract<Spec, { auth: { kind: "translator" } }>["id"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Everything a browser sees of a sandbox's
|
|
1
|
+
// Everything a browser sees of a sandbox's netd and of the edge in front of it, outside the daemon's oRPC contract. The
|
|
2
2
|
// Rust crates are the definition (`browser-wire`, and `tunnel` for what the edge declares): their types arrive as
|
|
3
3
|
// TypeScript in generated/, and every value here is held to the manifest they write beside it (wire-manifests.test.ts),
|
|
4
4
|
// which contract.lock.json pins.
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"type": "object"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
"description": "The client's liveness, the socket's only one: the editor sends one every 30 s and calls the socket stale after\n90 s without a frame.
|
|
74
|
+
"description": "The client's liveness, the socket's only one: the editor sends one every 30 s and calls the socket stale after\n90 s without a frame. netd answers `pong`, sends a WebSocket ping only to a client silent for 45 s, and closes\none silent for 90.",
|
|
75
75
|
"properties": {
|
|
76
76
|
"type": {
|
|
77
77
|
"const": "ping",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"body": {
|
|
163
163
|
"$defs": {
|
|
164
164
|
"NodeLink": {
|
|
165
|
-
"description": "Where
|
|
165
|
+
"description": "Where netd's control link to Node stands.",
|
|
166
166
|
"oneOf": [
|
|
167
167
|
{
|
|
168
168
|
"const": "starting",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
"const": "restarting",
|
|
179
|
-
"description": "Node was up or was restarted before, and is not up now: its link dropped, or its process exited and
|
|
179
|
+
"description": "Node was up or was restarted before, and is not up now: its link dropped, or its process exited and netd is\nstarting it again.",
|
|
180
180
|
"type": "string"
|
|
181
181
|
}
|
|
182
182
|
]
|
|
@@ -203,12 +203,73 @@
|
|
|
203
203
|
"io"
|
|
204
204
|
],
|
|
205
205
|
"type": "object"
|
|
206
|
+
},
|
|
207
|
+
"TunnelState": {
|
|
208
|
+
"description": "Where netd's tunnel stands.",
|
|
209
|
+
"oneOf": [
|
|
210
|
+
{
|
|
211
|
+
"const": "off",
|
|
212
|
+
"description": "No tunnel is configured: the sandbox is reachable on loopback only.",
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"const": "dialling",
|
|
217
|
+
"description": "Configured and not held right now: dialling, or waiting to redial.",
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"const": "held",
|
|
222
|
+
"description": "The edge holds the interactive socket.",
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"const": "elsewhere",
|
|
227
|
+
"description": "Another copy of this sandbox holds the tunnel, and the edge refused this one three times in a row; netd\ndials every 15 minutes meanwhile.",
|
|
228
|
+
"type": "string"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"const": "deleted",
|
|
232
|
+
"description": "The platform deleted this sandbox, and netd stopped dialling.",
|
|
233
|
+
"type": "string"
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"TunnelVitals": {
|
|
238
|
+
"description": "The ingress tunnel as netd holds it: the interactive socket, which every request can ride, and QUIC beside it.",
|
|
239
|
+
"properties": {
|
|
240
|
+
"dropsLastHour": {
|
|
241
|
+
"description": "How many times a registered interactive socket dropped in the last hour.",
|
|
242
|
+
"format": "uint32",
|
|
243
|
+
"minimum": 0,
|
|
244
|
+
"type": "integer"
|
|
245
|
+
},
|
|
246
|
+
"holder": {
|
|
247
|
+
"description": "Where the copy holding this sandbox's tunnel runs, as the edge named it, while `state` is `elsewhere`.",
|
|
248
|
+
"type": [
|
|
249
|
+
"string",
|
|
250
|
+
"null"
|
|
251
|
+
]
|
|
252
|
+
},
|
|
253
|
+
"quic": {
|
|
254
|
+
"description": "Whether a QUIC connection is held beside the socket.",
|
|
255
|
+
"type": "boolean"
|
|
256
|
+
},
|
|
257
|
+
"state": {
|
|
258
|
+
"$ref": "#/$defs/TunnelState"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"required": [
|
|
262
|
+
"state",
|
|
263
|
+
"dropsLastHour",
|
|
264
|
+
"quic"
|
|
265
|
+
],
|
|
266
|
+
"type": "object"
|
|
206
267
|
}
|
|
207
268
|
},
|
|
208
|
-
"description": "The sandbox's proof of life, measured by
|
|
269
|
+
"description": "The sandbox's proof of life, measured by netd and answered by it at [`VITALS_PATH`] whatever state Node is in:\nthe daemon's own heartbeat rides Node's event loop, so a sandbox busy enough to starve it would otherwise look dead.\nIt carries nothing of the workspace.",
|
|
209
270
|
"properties": {
|
|
210
271
|
"lagMs": {
|
|
211
|
-
"description": "How long Node's event loop takes to answer
|
|
272
|
+
"description": "How long Node's event loop takes to answer netd, in milliseconds: the round trip of the last ping it\nanswered, or how long the one outstanding has waited when that is longer. netd pings every 2 s, only once\nthe previous ping is answered. Null before the first ping, and while Node is not `up`.",
|
|
212
273
|
"format": "uint32",
|
|
213
274
|
"minimum": 0,
|
|
214
275
|
"type": [
|
|
@@ -231,13 +292,24 @@
|
|
|
231
292
|
"description": "The container's pressure stall; null where the cgroup's pressure files cannot be read."
|
|
232
293
|
},
|
|
233
294
|
"restarts": {
|
|
234
|
-
"description": "How many times
|
|
295
|
+
"description": "How many times netd restarted Node in the last 10 minutes.",
|
|
235
296
|
"format": "uint32",
|
|
236
297
|
"minimum": 0,
|
|
237
298
|
"type": "integer"
|
|
238
299
|
},
|
|
300
|
+
"tunnel": {
|
|
301
|
+
"anyOf": [
|
|
302
|
+
{
|
|
303
|
+
"$ref": "#/$defs/TunnelVitals"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"type": "null"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"description": "Where the ingress tunnel stands and how often it dropped (2026-10-05: a tunnel that dropped once a minute for\nfour hours was counted nowhere). Absent from an older netd."
|
|
310
|
+
},
|
|
239
311
|
"uptimeS": {
|
|
240
|
-
"description": "Seconds since
|
|
312
|
+
"description": "Seconds since netd, and so the container, started.",
|
|
241
313
|
"format": "uint32",
|
|
242
314
|
"minimum": 0,
|
|
243
315
|
"type": "integer"
|
|
@@ -251,6 +323,7 @@
|
|
|
251
323
|
"title": "SandboxVitals",
|
|
252
324
|
"type": "object"
|
|
253
325
|
},
|
|
326
|
+
"file": "/run/intentic/vitals.json",
|
|
254
327
|
"path": "/system/vitals"
|
|
255
328
|
},
|
|
256
329
|
"webTransport": {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export type EdgeVerdict = "no-tunnel" | "unknown-sandbox" | "dropped";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Where
|
|
9
|
+
* Where netd's control link to Node stands.
|
|
10
10
|
*/
|
|
11
11
|
export type NodeLink = "starting" | "up" | "restarting";
|
|
12
12
|
|
|
@@ -17,29 +17,34 @@ export type NodeLink = "starting" | "up" | "restarting";
|
|
|
17
17
|
export type Pressure = { cpu: number, memory: number, io: number, };
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* The sandbox's proof of life, measured by
|
|
20
|
+
* The sandbox's proof of life, measured by netd and answered by it at [`VITALS_PATH`] whatever state Node is in:
|
|
21
21
|
* the daemon's own heartbeat rides Node's event loop, so a sandbox busy enough to starve it would otherwise look dead.
|
|
22
22
|
* It carries nothing of the workspace.
|
|
23
23
|
*/
|
|
24
24
|
export type SandboxVitals = { node: NodeLink,
|
|
25
25
|
/**
|
|
26
|
-
* How long Node's event loop takes to answer
|
|
27
|
-
* answered, or how long the one outstanding has waited when that is longer.
|
|
26
|
+
* How long Node's event loop takes to answer netd, in milliseconds: the round trip of the last ping it
|
|
27
|
+
* answered, or how long the one outstanding has waited when that is longer. netd pings every 2 s, only once
|
|
28
28
|
* the previous ping is answered. Null before the first ping, and while Node is not `up`.
|
|
29
29
|
*/
|
|
30
30
|
lagMs: number | null,
|
|
31
31
|
/**
|
|
32
|
-
* How many times
|
|
32
|
+
* How many times netd restarted Node in the last 10 minutes.
|
|
33
33
|
*/
|
|
34
34
|
restarts: number,
|
|
35
35
|
/**
|
|
36
|
-
* Seconds since
|
|
36
|
+
* Seconds since netd, and so the container, started.
|
|
37
37
|
*/
|
|
38
38
|
uptimeS: number,
|
|
39
39
|
/**
|
|
40
40
|
* The container's pressure stall; null where the cgroup's pressure files cannot be read.
|
|
41
41
|
*/
|
|
42
|
-
pressure: Pressure | null,
|
|
42
|
+
pressure: Pressure | null,
|
|
43
|
+
/**
|
|
44
|
+
* Where the ingress tunnel stands and how often it dropped (2026-10-05: a tunnel that dropped once a minute for
|
|
45
|
+
* four hours was counted nowhere). Absent from an older netd.
|
|
46
|
+
*/
|
|
47
|
+
tunnel?: TunnelVitals, };
|
|
43
48
|
|
|
44
49
|
/**
|
|
45
50
|
* What the browser sends on a terminal socket, each a JSON text message.
|
|
@@ -50,3 +55,25 @@ export type TerminalClientMessage = { "type": "input", data: string, } | { "type
|
|
|
50
55
|
* What a terminal socket sends as JSON text; the pane's own bytes travel as binary messages.
|
|
51
56
|
*/
|
|
52
57
|
export type TerminalServerMessage = { "type": "grid", cols: number, rows: number, } | { "type": "exit", code: number, reason?: string, } | { "type": "pong" };
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Where netd's tunnel stands.
|
|
61
|
+
*/
|
|
62
|
+
export type TunnelState = "off" | "dialling" | "held" | "elsewhere" | "deleted";
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The ingress tunnel as netd holds it: the interactive socket, which every request can ride, and QUIC beside it.
|
|
66
|
+
*/
|
|
67
|
+
export type TunnelVitals = { state: TunnelState,
|
|
68
|
+
/**
|
|
69
|
+
* How many times a registered interactive socket dropped in the last hour.
|
|
70
|
+
*/
|
|
71
|
+
dropsLastHour: number,
|
|
72
|
+
/**
|
|
73
|
+
* Where the copy holding this sandbox's tunnel runs, as the edge named it, while `state` is `elsewhere`.
|
|
74
|
+
*/
|
|
75
|
+
holder?: string,
|
|
76
|
+
/**
|
|
77
|
+
* Whether a QUIC connection is held beside the socket.
|
|
78
|
+
*/
|
|
79
|
+
quic: boolean, };
|