@intentic/sandbox-contract 1.325.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/chores/probes.ts
CHANGED
|
@@ -74,16 +74,99 @@ const semverKind = (current: string, latest: string): OutdatedPackage["kind"] =>
|
|
|
74
74
|
return latestMinor !== currentMinor ? `minor` : `patch`;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
+
// ---- packages the workspace leaves out -------------------------------------------------------------------------
|
|
78
|
+
// `pnpm outdated -r` and `pnpm audit` read the workspace's own tree, so a package the repo deliberately keeps OUT of
|
|
79
|
+
// it (the iOS shell, whose dependencies Xcode consumes and which is installed with npm on the Mac that builds it)
|
|
80
|
+
// was measured by neither, while Dependabot reads every manifest: GitHub reported a critical Capacitor advisory
|
|
81
|
+
// this panel never saw. Every literal `!dir` under `packages:` in pnpm-workspace.yaml naming a folder with its own
|
|
82
|
+
// package.json counts. A glob negation (`!**/fixtures/**`) is how fixtures are left out; it never names a folder
|
|
83
|
+
// that exists, so the package.json test drops it without a rule of its own.
|
|
84
|
+
const STANDALONE_DIRS =
|
|
85
|
+
`sed -n '/^packages:/,/^[^[:space:]#-]/p' pnpm-workspace.yaml 2>/dev/null | tr -d "\\"'" | ` +
|
|
86
|
+
`sed -n -e 's|/\\*\\*[[:space:]]*$||' -e 's|^[[:space:]]*-[[:space:]]*!\\([^[:space:]#]*\\).*$|\\1|p'`;
|
|
87
|
+
|
|
88
|
+
// The line that opens one standalone package's report, as JSON so a guard can still read the stream with `jq -s`.
|
|
89
|
+
const STANDALONE_KEY = `standalone`;
|
|
90
|
+
const STANDALONE_LINE = /^\{"standalone":"([^"]*)"\}$/;
|
|
91
|
+
|
|
92
|
+
// Runs `measure` against each standalone package in a scratch copy, never in place: `--lockfile-only` would write
|
|
93
|
+
// a pnpm lockfile into a folder whose whole point is that pnpm does not manage it. A lockfile the folder already
|
|
94
|
+
// has is honoured (an npm one through `pnpm import`); without one the tree is what a fresh install there resolves
|
|
95
|
+
// today, which for a folder that commits none is exactly what its next build installs. A copy that cannot be
|
|
96
|
+
// resolved prints nothing after its marker, and the parser turns that into a failed probe, never a clean package.
|
|
97
|
+
const standaloneCommand = (measure: string): string =>
|
|
98
|
+
`${STANDALONE_DIRS} | while IFS= read -r dir; do ` +
|
|
99
|
+
`[ -f "$dir/package.json" ] || continue; ` +
|
|
100
|
+
`printf '{"${STANDALONE_KEY}":"%s"}\\n' "$dir"; ` +
|
|
101
|
+
`scratch=$(mktemp -d) || continue; ` +
|
|
102
|
+
`for file in package.json pnpm-lock.yaml package-lock.json .npmrc; do [ -f "$dir/$file" ] && cp "$dir/$file" "$scratch/"; done; ` +
|
|
103
|
+
`( cd "$scratch" && { [ -f pnpm-lock.yaml ] || { [ -f package-lock.json ] && pnpm import >/dev/null 2>&1; } || ` +
|
|
104
|
+
`pnpm install --lockfile-only --ignore-workspace --ignore-scripts >/dev/null 2>&1; } && ${measure} ); ` +
|
|
105
|
+
`rm -rf "$scratch"; ` +
|
|
106
|
+
`done`;
|
|
107
|
+
|
|
108
|
+
// The workspace's own report, then one per standalone package; `true` at the end because pnpm exits non-zero when
|
|
109
|
+
// it has findings, and the runner judges by whether the output parses.
|
|
110
|
+
const withStandalone = (measure: string, standaloneMeasure: string): string => `${measure}; ${standaloneCommand(standaloneMeasure)}; true`;
|
|
111
|
+
|
|
112
|
+
interface Section {
|
|
113
|
+
readonly standalone?: string;
|
|
114
|
+
readonly text: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Splits a probe's output at each standalone marker; the first section, before any marker, is the workspace's own.
|
|
118
|
+
const sectionsOf = (stdout: string): Section[] => {
|
|
119
|
+
const sections: { standalone?: string; lines: string[] }[] = [{ lines: [] }];
|
|
120
|
+
for (const line of stdout.split(`\n`)) {
|
|
121
|
+
const marker = STANDALONE_LINE.exec(line.trim());
|
|
122
|
+
if (marker === null) {
|
|
123
|
+
sections.at(-1)?.lines.push(line);
|
|
124
|
+
} else {
|
|
125
|
+
sections.push({ standalone: marker[1] ?? ``, lines: [] });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return sections.map(({ standalone, lines }) => ({ ...(standalone === undefined ? {} : { standalone }), text: lines.join(`\n`) }));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// Every section has to parse: a standalone package that could not be measured is not a clean one, so one unreadable
|
|
132
|
+
// report fails the whole probe rather than vanishing from it.
|
|
133
|
+
const parseSections = <T>(stdout: string, parse: (section: Section) => readonly T[] | undefined): T[] | undefined => {
|
|
134
|
+
const found: T[] = [];
|
|
135
|
+
for (const section of sectionsOf(stdout)) {
|
|
136
|
+
const parsed = parse(section);
|
|
137
|
+
if (parsed === undefined) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
found.push(...parsed);
|
|
141
|
+
}
|
|
142
|
+
return found;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const standaloneOf = (section: Section): { standalone?: string } => (section.standalone === undefined ? {} : { standalone: section.standalone });
|
|
146
|
+
|
|
147
|
+
// pnpm 12 keys a package that appears more than once in the workspace (two versions, or both a dependency and a
|
|
148
|
+
// devDependency somewhere) as `name@version` and `name@version (dev)`; taken as the name, that listed mermaid twice
|
|
149
|
+
// under a name no registry knows.
|
|
150
|
+
const DISAMBIGUATED_KEY = /^(@?[^@\s]+)@\S+(?:\s+\([^)]*\))?$/;
|
|
151
|
+
const packageNameOf = (key: string): string => DISAMBIGUATED_KEY.exec(key)?.[1] ?? key;
|
|
152
|
+
|
|
153
|
+
// What ships outranks what only builds, so the merged row says `dependencies` if any of its copies does.
|
|
154
|
+
const SECTION_RANK = [`dependencies`, `optionalDependencies`, `peerDependencies`, `devDependencies`];
|
|
155
|
+
const rankOf = (section: string): number => {
|
|
156
|
+
const rank = SECTION_RANK.indexOf(section);
|
|
157
|
+
return rank === -1 ? SECTION_RANK.length : rank;
|
|
158
|
+
};
|
|
159
|
+
|
|
77
160
|
// `pnpm outdated --json` prints a name→{current,latest,dependencyType} map; the recursive workspace form merges into
|
|
78
161
|
// the same shape.
|
|
79
162
|
// Entries missing `current` or `latest` are skipped: pnpm could not resolve them against the registry.
|
|
80
|
-
const
|
|
81
|
-
const root = asObject(
|
|
163
|
+
const parseOutdatedSection = (section: Section): OutdatedPackage[] | undefined => {
|
|
164
|
+
const root = asObject(section.text);
|
|
82
165
|
if (root === undefined) {
|
|
83
166
|
return undefined;
|
|
84
167
|
}
|
|
85
|
-
const packages
|
|
86
|
-
for (const [
|
|
168
|
+
const packages = new Map<string, OutdatedPackage>();
|
|
169
|
+
for (const [key, raw] of Object.entries(root)) {
|
|
87
170
|
if (typeof raw !== `object` || raw === null) {
|
|
88
171
|
continue;
|
|
89
172
|
}
|
|
@@ -93,9 +176,28 @@ const parseOutdated = (stdout: string): ProbeFacts | undefined => {
|
|
|
93
176
|
if (current === undefined || latest === undefined || current === latest) {
|
|
94
177
|
continue;
|
|
95
178
|
}
|
|
96
|
-
|
|
179
|
+
const name = packageNameOf(key);
|
|
180
|
+
const row: OutdatedPackage = {
|
|
181
|
+
name,
|
|
182
|
+
current,
|
|
183
|
+
latest,
|
|
184
|
+
kind: semverKind(current, latest),
|
|
185
|
+
section: asString(entry[`dependencyType`]) ?? `dependencies`,
|
|
186
|
+
...standaloneOf(section),
|
|
187
|
+
};
|
|
188
|
+
// One row per version pair: the same upgrade seen from a dependency and a devDependency is one upgrade.
|
|
189
|
+
const identity = `${name}@${current}→${latest}`;
|
|
190
|
+
const seen = packages.get(identity);
|
|
191
|
+
if (seen === undefined || rankOf(row.section) < rankOf(seen.section)) {
|
|
192
|
+
packages.set(identity, row);
|
|
193
|
+
}
|
|
97
194
|
}
|
|
98
|
-
return
|
|
195
|
+
return [...packages.values()];
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const parseOutdated = (stdout: string): ProbeFacts | undefined => {
|
|
199
|
+
const packages = parseSections(stdout, parseOutdatedSection);
|
|
200
|
+
return packages === undefined ? undefined : { id: `outdated`, packages };
|
|
99
201
|
};
|
|
100
202
|
|
|
101
203
|
const SEVERITIES = new Set([`critical`, `high`, `moderate`, `low`, `info`]);
|
|
@@ -104,15 +206,15 @@ const SEVERITIES = new Set([`critical`, `high`, `moderate`, `low`, `info`]);
|
|
|
104
206
|
// and whether a patch exists.
|
|
105
207
|
// `dev` is read from the findings' own flag: a build-time-only advisory is a different risk than one in a running
|
|
106
208
|
// service.
|
|
107
|
-
const
|
|
108
|
-
const root = asObject(
|
|
209
|
+
const parseAuditSection = (section: Section): Advisory[] | undefined => {
|
|
210
|
+
const root = asObject(section.text);
|
|
109
211
|
if (root === undefined) {
|
|
110
212
|
return undefined;
|
|
111
213
|
}
|
|
112
214
|
const raw = root[`advisories`];
|
|
113
215
|
// No `advisories` key is pnpm's clean report (empty list), not an unrecognized shape.
|
|
114
216
|
if (raw === undefined) {
|
|
115
|
-
return
|
|
217
|
+
return [];
|
|
116
218
|
}
|
|
117
219
|
if (typeof raw !== `object` || raw === null) {
|
|
118
220
|
return undefined;
|
|
@@ -137,11 +239,22 @@ const parseAudit = (stdout: string): ProbeFacts | undefined => {
|
|
|
137
239
|
// `<0.0.0` is npm's spelling of "no patch exists"; treated as absent rather than a fixable range.
|
|
138
240
|
...(patched === undefined || patched === `<0.0.0` ? {} : { patched }),
|
|
139
241
|
dev: findings.length > 0 && findings.every((finding) => finding[`dev`] === true),
|
|
242
|
+
...standaloneOf(section),
|
|
140
243
|
});
|
|
141
244
|
}
|
|
142
|
-
return
|
|
245
|
+
return advisories;
|
|
143
246
|
};
|
|
144
247
|
|
|
248
|
+
const parseAudit = (stdout: string): ProbeFacts | undefined => {
|
|
249
|
+
const advisories = parseSections(stdout, parseAuditSection);
|
|
250
|
+
return advisories === undefined ? undefined : { id: `audit`, advisories };
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// Shared with the security chore's nightly guard, so the automation wakes on exactly what the panel shows. The output
|
|
254
|
+
// is a stream of JSON documents (`jq -s` reads it whole): pnpm's report, then a `{"standalone": dir}` line and that
|
|
255
|
+
// package's report for each standalone package.
|
|
256
|
+
export const AUDIT_COMMAND = withStandalone(`pnpm audit --json 2>/dev/null`, `pnpm audit --json --ignore-workspace 2>/dev/null`);
|
|
257
|
+
|
|
145
258
|
// Sample of paths only; the agent re-runs knip live, so a full list would already be stale.
|
|
146
259
|
const DEAD_CODE_SAMPLE = 8;
|
|
147
260
|
|
|
@@ -404,9 +517,10 @@ export const PROBES: readonly ProbeSpec[] = [
|
|
|
404
517
|
timeoutMs: 5 * 60_000,
|
|
405
518
|
available: `test -f package.json`,
|
|
406
519
|
unavailable: `no package.json`,
|
|
407
|
-
// `-r` reports every workspace package, not just root
|
|
408
|
-
//
|
|
409
|
-
|
|
520
|
+
// `-r` reports every workspace package, not just root, and resolves `catalog:` through pnpm-workspace.yaml,
|
|
521
|
+
// so the catalog is what gets measured. It also honours `minimumReleaseAge`: a release younger than the
|
|
522
|
+
// floor is not reported as latest, by the same policy that would refuse to install it.
|
|
523
|
+
command: withStandalone(`pnpm outdated -r --json 2>/dev/null`, `pnpm outdated --json --ignore-workspace 2>/dev/null`),
|
|
410
524
|
parse: parseOutdated,
|
|
411
525
|
},
|
|
412
526
|
{
|
|
@@ -419,7 +533,7 @@ export const PROBES: readonly ProbeSpec[] = [
|
|
|
419
533
|
// A lockfile, not package.json: audit resolves the installed tree, and without one pnpm has nothing to check.
|
|
420
534
|
available: `test -f pnpm-lock.yaml || test -f package-lock.json`,
|
|
421
535
|
unavailable: `no lockfile`,
|
|
422
|
-
command:
|
|
536
|
+
command: AUDIT_COMMAND,
|
|
423
537
|
parse: parseAudit,
|
|
424
538
|
},
|
|
425
539
|
{
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
UiScan,
|
|
11
11
|
} from "../schemas/maintenance.js";
|
|
12
12
|
import { choreById, CHORES } from "./chores.js";
|
|
13
|
+
import { digestOf } from "./digest.js";
|
|
13
14
|
import { assessReport, choreAnswer, choreAnswered, ledgerKey, unseenVerdicts } from "./verdict.js";
|
|
14
15
|
|
|
15
16
|
// The chore verdict state machine, tested at the distinctions a simpler design gets wrong: reporting an unmeasured repo
|
|
@@ -101,6 +102,34 @@ describe(`what "we have not measured this" means`, () => {
|
|
|
101
102
|
});
|
|
102
103
|
});
|
|
103
104
|
|
|
105
|
+
// A package the pnpm workspace leaves out is fixed in its own folder, so its findings have to say which folder; the
|
|
106
|
+
// workspace's own findings keep the digest they always had, so adding the field rebadges nothing already settled.
|
|
107
|
+
describe(`findings from a package the workspace leaves out`, () => {
|
|
108
|
+
const advisory = (name: string, standalone?: string) => ({
|
|
109
|
+
name,
|
|
110
|
+
severity: `critical` as const,
|
|
111
|
+
title: `${name} is bad`,
|
|
112
|
+
patched: `>=2`,
|
|
113
|
+
dev: false,
|
|
114
|
+
...(standalone === undefined ? {} : { standalone }),
|
|
115
|
+
});
|
|
116
|
+
const withFacts = (advisories: ReturnType<typeof advisory>[]) =>
|
|
117
|
+
report({ repos: [{ repo: `app`, probes: [probe({ id: `audit`, facts: { id: `audit`, advisories } })], signals: signals() }] });
|
|
118
|
+
|
|
119
|
+
test(`name their folder in the panel and in the prompt`, () => {
|
|
120
|
+
const verdict = verdictFor(withFacts([advisory(`@capacitor/ios`, `_editor/ios-app`)]), `security-advisories`);
|
|
121
|
+
expect(verdict.detail).toEqual([`critical · @capacitor/ios in _editor/ios-app, @capacitor/ios is bad`]);
|
|
122
|
+
expect(verdict.prompt).toContain(`@capacitor/ios in _editor/ios-app (critical`);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
test(`are a different finding from the same package in the workspace, which keeps its old digest`, () => {
|
|
126
|
+
const workspace = verdictFor(withFacts([advisory(`left-pad`)]), `security-advisories`);
|
|
127
|
+
const standalone = verdictFor(withFacts([advisory(`left-pad`, `shell`)]), `security-advisories`);
|
|
128
|
+
expect(workspace.digest).toBe(digestOf(`left-pad@critical`));
|
|
129
|
+
expect(standalone.digest).not.toBe(workspace.digest);
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
|
|
104
133
|
describe(`the ledger debounces; it cannot hide`, () => {
|
|
105
134
|
const withAdvisories = report({ repos: [{ repo: `app`, probes: [auditProbe([`left-pad`])], signals: signals() }] });
|
|
106
135
|
const ledgerEntry = (over: Partial<ChoreLedgerEntry> = {}): ChoreLedgerEntry => ({
|
|
@@ -112,7 +112,7 @@ export const agentContract = {
|
|
|
112
112
|
path: "/agent/queue/resume",
|
|
113
113
|
summary: "Let waiting messages go",
|
|
114
114
|
description:
|
|
115
|
-
"Releases a queue held after a stop or a refusal: what waits goes out now as one turn when nothing is running, or after the running turn otherwise. Name who serves that turn when the conversation has been re-pointed since the messages were queued.",
|
|
115
|
+
"Releases a queue held after a stop or a refusal: what waits goes out now as one turn when nothing is running, or after the running turn otherwise. Name who serves that turn when the conversation has been re-pointed since the messages were queued. Name messages by id to let only those go (a scheduled one now, ahead of its time), leaving every other booking on its time.",
|
|
116
116
|
})
|
|
117
117
|
.meta({ floor: "collaborator", guest: true })
|
|
118
118
|
.input(QueueResumeSchema)
|
|
@@ -124,7 +124,7 @@ export const agentContract = {
|
|
|
124
124
|
path: "/agent/queue/schedule",
|
|
125
125
|
summary: "Reschedule waiting messages",
|
|
126
126
|
description:
|
|
127
|
-
"Books what waits in the conversation's queue to go out by itself at another instant, or once another conversation has finished and its work has landed, holding it until then. Works on a queue that is held for any reason, or on messages waiting behind a running turn. A time already past, or a conversation with nothing left to land, lets them go now.",
|
|
127
|
+
"Books what waits in the conversation's queue to go out by itself at another instant, or once another conversation has finished and its work has landed, holding it until then. Works on a queue that is held for any reason, or on messages waiting behind a running turn. Name messages by id to re-time only those; every other keeps its own booking. A time already past, or a conversation with nothing left to land, lets them go now.",
|
|
128
128
|
})
|
|
129
129
|
.meta({ floor: "collaborator", guest: true })
|
|
130
130
|
.input(QueueScheduleSchema)
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
AgentUnsentSchema,
|
|
26
26
|
LandResultSchema,
|
|
27
27
|
} from "../schemas/agents.js";
|
|
28
|
-
import { AgentsListSchema } from "../schemas/
|
|
28
|
+
import { AgentsListSchema } from "../schemas/agents-list.js";
|
|
29
29
|
import { AgentChangesSchema, AgentConflictsSchema, AgentScratchSchema, AgentHistorySchema } from "../schemas/git/git.js";
|
|
30
30
|
import { FileDiffSchema } from "../schemas/history.js";
|
|
31
31
|
import { OkSchema } from "../schemas/shared.js";
|
|
@@ -9,20 +9,38 @@ import {
|
|
|
9
9
|
AutomationsListSchema,
|
|
10
10
|
SendersProviderParamSchema,
|
|
11
11
|
SendersRosterSchema,
|
|
12
|
+
WatchCheckInputSchema,
|
|
13
|
+
WatchCheckResultSchema,
|
|
12
14
|
} from "../schemas/automations.js";
|
|
13
15
|
import { DoorTokenSchema, OkSchema } from "../schemas/shared.js";
|
|
14
16
|
|
|
15
17
|
// Automations manifest (scheduled agent wake-ups); `pending*` is the owner's approval queue for wakes a
|
|
16
18
|
// `requireApproval` automation holds instead of firing directly.
|
|
17
19
|
export const automationsContract = {
|
|
20
|
+
// The `automations` CLI reads it on the agent token; a door's credential is attached for an operator only, which the
|
|
21
|
+
// agent token never is.
|
|
18
22
|
list: procedure
|
|
23
|
+
.meta({ agent: true })
|
|
19
24
|
.route({
|
|
20
25
|
method: "GET",
|
|
21
26
|
path: "/automations",
|
|
22
27
|
summary: "Things that wake an agent on their own",
|
|
23
|
-
description: "Every automation with its recent runs and when it fires next.",
|
|
28
|
+
description: "Every automation with its recent runs, what its check saw last, and when it fires next.",
|
|
24
29
|
})
|
|
25
30
|
.output(AutomationsListSchema),
|
|
31
|
+
// A source only, never a guard command: a command run here would carry whichever persona's credentials the caller
|
|
32
|
+
// named, and the agent can run its own command in its own shell.
|
|
33
|
+
check: procedure
|
|
34
|
+
.meta({ agent: true })
|
|
35
|
+
.route({
|
|
36
|
+
method: "POST",
|
|
37
|
+
path: "/automations/check",
|
|
38
|
+
summary: "Try a watch's check once",
|
|
39
|
+
description:
|
|
40
|
+
"Runs a ready-made source's check now and answers what it sees, without saving or remembering anything: what to look at before proposing a watch, and what the composer shows beside the source it is editing.",
|
|
41
|
+
})
|
|
42
|
+
.input(WatchCheckInputSchema)
|
|
43
|
+
.output(WatchCheckResultSchema),
|
|
26
44
|
catalog: procedure
|
|
27
45
|
.route({
|
|
28
46
|
method: "GET",
|
|
@@ -6,6 +6,7 @@ import { DeviceScopesSchema } from "../schemas/capabilities.js";
|
|
|
6
6
|
import { DeviceFactsSchema } from "../schemas/hosts.js";
|
|
7
7
|
import { LoopbackCatchEventSchema, LoopbackCatchSchema } from "../schemas/loopback-catch.js";
|
|
8
8
|
import { OkSchema } from "../schemas/shared.js";
|
|
9
|
+
import { ProjectDeliveryResultSchema, ProjectDeliverySchema } from "../schemas/project-delivery.js";
|
|
9
10
|
|
|
10
11
|
// What a connected device can be asked, over the socket it opened; the machine is the oRPC server, the daemon the
|
|
11
12
|
// client. No `.route()`: the procedure path is the address, not HTTP. Every input is strict (devices.ts says why). `mcp` stays opaque (`z.unknown()`) so a machine
|
|
@@ -31,4 +32,8 @@ export const deviceContract = {
|
|
|
31
32
|
// daemon arms it, never a tool, and aborting the stream is how it stops. Sent only to an agent advertising
|
|
32
33
|
// `loopback-catch`.
|
|
33
34
|
catchLoopback: oc.input(LoopbackCatchSchema).output(streamOf(LoopbackCatchEventSchema)),
|
|
35
|
+
// Landed work written into the owner's folder that `/work/<name>` copies (schemas/project-delivery.ts). Only the
|
|
36
|
+
// daemon calls it, after a land, and only on an agent advertising `project-delivery`; the machine refuses a folder
|
|
37
|
+
// that did not opt into delivery, takes a restore point first, and never writes over an edit of the owner's own.
|
|
38
|
+
deliverProject: oc.input(ProjectDeliverySchema).output(ProjectDeliveryResultSchema),
|
|
34
39
|
};
|
|
@@ -27,27 +27,28 @@ export const TrialStatusSchema = z.object({
|
|
|
27
27
|
});
|
|
28
28
|
export type TrialStatusResponse = z.infer<typeof TrialStatusSchema>;
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
// A model server found running on the computer that hosts the sandbox.
|
|
31
|
+
export const HostModelServerSchema = z.object({
|
|
32
|
+
kind: z.enum(["ollama", "lmstudio", "llamacpp", "vllm"]).describe("Which program usually listens on the port it answered on."),
|
|
33
|
+
label: z.string().describe("Its name, for the row."),
|
|
34
|
+
baseUrl: z.string().describe("Where the container reaches it, as a model endpoint's base URL."),
|
|
35
|
+
models: z.array(z.string()).describe("The models it lists right now."),
|
|
36
|
+
capability: z.string().optional().describe("The connection that already points at it, if one does."),
|
|
37
|
+
});
|
|
38
|
+
export type HostModelServer = z.infer<typeof HostModelServerSchema>;
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
export const LocalModelDeviceSchema = z.enum(["gpu", "host"]);
|
|
40
|
-
export type LocalModelDevice = z.infer<typeof LocalModelDeviceSchema>;
|
|
40
|
+
export const HostModelServersSchema = z.object({ servers: z.array(HostModelServerSchema) });
|
|
41
|
+
export type HostModelServers = z.infer<typeof HostModelServersSchema>;
|
|
41
42
|
|
|
42
43
|
// One window rung priced against one model, so a surface never has to redo the arithmetic the start check will.
|
|
43
44
|
const LocalModelWindowFitSchema = z.object({
|
|
44
45
|
tokens: z.number().int().positive(),
|
|
45
46
|
// Weights + KV cache + the runtime's own floor: the same estimate the admission check refuses a start on.
|
|
46
47
|
totalBytes: z.number().int().nonnegative(),
|
|
47
|
-
// Whether it can load at all
|
|
48
|
+
// Whether it can load at all: what a start is refused on.
|
|
48
49
|
fits: z.boolean(),
|
|
49
|
-
// Whether all of it fits in the free memory
|
|
50
|
-
//
|
|
50
|
+
// Whether all of it fits in the sandbox's free memory, so it runs at full speed. Absent from a daemon older than the
|
|
51
|
+
// distinction.
|
|
51
52
|
fullSpeed: z.boolean().optional(),
|
|
52
53
|
});
|
|
53
54
|
|
|
@@ -79,18 +80,12 @@ export const LocalModelFitSchema = z.object({
|
|
|
79
80
|
// True when the number above is a container limit rather than the machine's: worth saying, since the host may look
|
|
80
81
|
// much larger than what a model can have.
|
|
81
82
|
memoryCapped: z.boolean(),
|
|
82
|
-
|
|
83
|
-
gpuMemoryBytes: z.number().int().nonnegative(),
|
|
84
|
-
// The GPU's free memory, on the card with the most of it; zero before the grant. Absent from an older daemon.
|
|
85
|
-
gpuFreeBytes: z.number().int().nonnegative().optional(),
|
|
86
|
-
// What a start is refused on: the host and the GPU together, since llama.cpp can split a model between them. Only a
|
|
87
|
-
// model that cannot load at all is turned away here; a model that fits only this way runs mostly on the CPU.
|
|
83
|
+
// What a start is refused on: the sandbox's memory, by total. Only a model that cannot load at all is turned away.
|
|
88
84
|
budgetBytes: z.number().int().nonnegative(),
|
|
89
|
-
// What a model may take and still run at full speed: the free memory
|
|
90
|
-
//
|
|
91
|
-
//
|
|
85
|
+
// What a model may take and still run at full speed: the sandbox's free memory, plus whatever its own local model
|
|
86
|
+
// holds now, since a start stops it first. Both offers are sized against this. Zero means unmeasurable. Absent from
|
|
87
|
+
// a daemon older than the distinction.
|
|
92
88
|
fullSpeedBytes: z.number().int().nonnegative().optional(),
|
|
93
|
-
fullSpeedDevice: LocalModelDeviceSchema.optional(),
|
|
94
89
|
// Whether llama-server is in this image. False means the local lane costs a rebuild before it can serve anything.
|
|
95
90
|
serverReady: z.boolean(),
|
|
96
91
|
options: z.array(LocalModelOptionFitSchema),
|
|
@@ -122,17 +117,28 @@ export const endpointsContract = {
|
|
|
122
117
|
"The allowance, what has been used, when it resets, and which model actually answered the last message. Not being available is the ordinary answer rather than a failure: most sandboxes run against a platform that offers no trial at all.",
|
|
123
118
|
})
|
|
124
119
|
.output(TrialStatusSchema),
|
|
125
|
-
// Sized against this machine rather than a table in the browser, because the numbers that matter (a cgroup cap,
|
|
126
|
-
//
|
|
120
|
+
// Sized against this machine rather than a table in the browser, because the numbers that matter (a cgroup cap, the
|
|
121
|
+
// memory free now, weights already on disk) are only knowable in here.
|
|
127
122
|
localModelFit: procedure
|
|
128
123
|
.route({
|
|
129
124
|
method: "GET",
|
|
130
125
|
path: "/endpoints/local-model/fit",
|
|
131
126
|
summary: "Which local models this machine can actually run",
|
|
132
127
|
description:
|
|
133
|
-
"The memory this sandbox may use,
|
|
128
|
+
"The memory this sandbox may use, and every curated model priced two ways: whether it fits in the free memory and so runs at full speed, and whether it can load at all. The two the connect view offers, one that downloads in a minute and the best this machine runs at full speed, come from the first; a start is refused only on the second. These run on the sandbox's CPU; a GPU model is a server on the host, which hostServers finds.",
|
|
134
129
|
})
|
|
135
130
|
.output(LocalModelFitSchema),
|
|
131
|
+
// A GPU model runs in a server on the computer that hosts the sandbox, never inside it; this finds the ones already
|
|
132
|
+
// running, so pointing at one is a press rather than a form.
|
|
133
|
+
hostServers: procedure
|
|
134
|
+
.route({
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "/endpoints/host-servers",
|
|
137
|
+
summary: "Model servers already running on the computer that hosts this sandbox",
|
|
138
|
+
description:
|
|
139
|
+
"Asks the usual ports of the hosting computer (Ollama 11434, LM Studio 1234, llama.cpp 8080, vLLM 8000) for their model list, as the container reaches them at host.docker.internal. Only servers that answer with models are listed, each with the connection that already points at it, if one does. Nothing is added.",
|
|
140
|
+
})
|
|
141
|
+
.output(HostModelServersSchema),
|
|
136
142
|
// Start or stop fetching the instant model's weights before anyone has asked for them, so the first local turn does
|
|
137
143
|
// not begin with a download. Idempotent: starting twice joins the transfer already running.
|
|
138
144
|
localModelPrefetch: procedure
|
|
@@ -2,6 +2,11 @@ import { procedure } from "../protocol/route-meta.js";
|
|
|
2
2
|
import { CapabilityIdParamSchema } from "../schemas/capabilities.js";
|
|
3
3
|
import {
|
|
4
4
|
ExtensionApproveInputSchema,
|
|
5
|
+
ExtensionDevClearedSchema,
|
|
6
|
+
ExtensionDevListSchema,
|
|
7
|
+
ExtensionDevSetInputSchema,
|
|
8
|
+
ExtensionDevStateSchema,
|
|
9
|
+
ExtensionDevTargetSchema,
|
|
5
10
|
ExtensionEnabledInputSchema,
|
|
6
11
|
ExtensionProcessParamSchema,
|
|
7
12
|
ExtensionProcessStatusSchema,
|
|
@@ -22,6 +27,10 @@ import {
|
|
|
22
27
|
import { ExtensionReadinessSchema } from "../schemas/maintenance.js";
|
|
23
28
|
import { OkSchema } from "../schemas/shared.js";
|
|
24
29
|
|
|
30
|
+
// Dev mode's verbs: the agent's `extension` CLI drives them on the agent token, and the Extensions tab's way back
|
|
31
|
+
// calls devClear. None reads or moves a credential.
|
|
32
|
+
const devRoute = procedure.meta({ agent: true });
|
|
33
|
+
|
|
25
34
|
// Installed extensions resolved to their approved manifests. The bundle itself is a plain Hono route, `GET
|
|
26
35
|
// /extensions/{id}/bundle`, not part of this oRPC contract: raw ESM bytes aren't a JSON payload.
|
|
27
36
|
export const extensionsContract = {
|
|
@@ -209,4 +218,44 @@ export const extensionsContract = {
|
|
|
209
218
|
})
|
|
210
219
|
.input(ExtensionProcessParamSchema)
|
|
211
220
|
.output(OkSchema),
|
|
221
|
+
// Dev mode (.intentic/local/extension-dev.json): an installed extension served from a source checkout. Same powers
|
|
222
|
+
// only: a checkout declaring more is held, and the pinned version keeps running.
|
|
223
|
+
devList: devRoute
|
|
224
|
+
.route({
|
|
225
|
+
method: "GET",
|
|
226
|
+
path: "/extensions/dev",
|
|
227
|
+
summary: "Installed extensions and their source checkouts",
|
|
228
|
+
description:
|
|
229
|
+
"Every extension installed from a repository, with its pinned commit, whether it runs from a source checkout, and the checkout of its repository this workspace holds, if any. The calling conversation's own copy is named first.",
|
|
230
|
+
})
|
|
231
|
+
.output(ExtensionDevListSchema),
|
|
232
|
+
devSet: devRoute
|
|
233
|
+
.route({
|
|
234
|
+
method: "POST",
|
|
235
|
+
path: "/extensions/{id}/dev",
|
|
236
|
+
summary: "Run an installed extension from its source checkout",
|
|
237
|
+
description:
|
|
238
|
+
"Serves the extension's browser bundle, backend, processes, skills and contributions from a checkout of its source instead of its pinned copy, so a change to it shows on reload without being landed first. The checkout must hold the same extension and declare the same powers; one asking for more, or not built yet, is held and the pinned version keeps running, with the reason. Nothing is installed or updated: the pinned copy stays where it is.",
|
|
239
|
+
})
|
|
240
|
+
.input(ExtensionDevSetInputSchema)
|
|
241
|
+
.output(ExtensionDevStateSchema),
|
|
242
|
+
devClear: devRoute
|
|
243
|
+
.route({
|
|
244
|
+
method: "POST",
|
|
245
|
+
path: "/extensions/{id}/dev/clear",
|
|
246
|
+
summary: "Go back to the pinned version",
|
|
247
|
+
description: "Stops serving the extension from its source checkout. The checkout itself is left exactly as it is.",
|
|
248
|
+
})
|
|
249
|
+
.input(ExtensionDevTargetSchema)
|
|
250
|
+
.output(ExtensionDevClearedSchema),
|
|
251
|
+
devReload: devRoute
|
|
252
|
+
.route({
|
|
253
|
+
method: "POST",
|
|
254
|
+
path: "/extensions/{id}/dev/reload",
|
|
255
|
+
summary: "Pick up a rebuilt checkout",
|
|
256
|
+
description:
|
|
257
|
+
"Call after rebuilding an extension that runs from its source checkout: its backend restarts on the new code, and an open app is told the list changed, so it offers to reload the new browser bundle.",
|
|
258
|
+
})
|
|
259
|
+
.input(ExtensionDevTargetSchema)
|
|
260
|
+
.output(ExtensionDevStateSchema),
|
|
212
261
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { procedure } from "../protocol/route-meta.js";
|
|
3
|
+
import { PAGE_ERROR_CHARS, PAGE_ERRORS_MAX } from "../text/pages.js";
|
|
4
|
+
|
|
5
|
+
// Pages the agent showed in a chat. The pages themselves are files the workspace already serves; the routes here are
|
|
6
|
+
// what an MCP server's app asks of its server while a reader uses it (`tools/call` over the bridge), carried by the
|
|
7
|
+
// daemon since the app's frame reaches no network of its own, and what a page's own scripts threw as it drew, carried
|
|
8
|
+
// back to the agent that showed it.
|
|
9
|
+
export const PageAppCallSchema = z.object({
|
|
10
|
+
page: z.string().min(1).describe("The stored page the app is drawn from, as a workspace path; it names the server and the tool the app belongs to."),
|
|
11
|
+
name: z.string().min(1).describe("The tool the app asks to call, on its own server."),
|
|
12
|
+
arguments: z.record(z.string(), z.unknown()).optional().describe("What the app passes it."),
|
|
13
|
+
pressed: z
|
|
14
|
+
.boolean()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe(
|
|
17
|
+
"Whether the reader had just pressed something in the app when it asked. Without a press, only a tool its server marks read-only is called: an app's own script cannot make a change nobody asked for.",
|
|
18
|
+
),
|
|
19
|
+
});
|
|
20
|
+
export const PageAppCallResultSchema = z.object({
|
|
21
|
+
result: z.unknown().describe("The server's answer, as the MCP call result it sent (`content`, `structuredContent`, `isError`)."),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const PageErrorsSchema = z.object({
|
|
25
|
+
page: z.string().min(1).describe("The stored page that threw, as a workspace path."),
|
|
26
|
+
errors: z
|
|
27
|
+
.array(z.string().min(1).max(PAGE_ERROR_CHARS))
|
|
28
|
+
.min(1)
|
|
29
|
+
.max(PAGE_ERRORS_MAX)
|
|
30
|
+
.describe("Its uncaught errors as its frame caught them, each with the first line of its stack."),
|
|
31
|
+
});
|
|
32
|
+
export const PageErrorsResultSchema = z.object({
|
|
33
|
+
told: z
|
|
34
|
+
.boolean()
|
|
35
|
+
.describe(
|
|
36
|
+
"Whether the agent heard: true when the turn that showed the page was still running and took the errors. False when that turn is over, the page is an MCP server's app, or these errors were already told.",
|
|
37
|
+
),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const pagesContract = {
|
|
41
|
+
appCall: procedure
|
|
42
|
+
.route({
|
|
43
|
+
method: "POST",
|
|
44
|
+
path: "/pages/app-call",
|
|
45
|
+
summary: "Call a tool for an MCP app shown in a chat",
|
|
46
|
+
description:
|
|
47
|
+
"Calls one tool of the connected MCP server whose app a chat is showing, on behalf of a reader using that app. Only a tool the server marks as callable by its app is answered, and only on the server the page was shown for. The answer goes back to the app, not to the agent.",
|
|
48
|
+
})
|
|
49
|
+
.input(PageAppCallSchema)
|
|
50
|
+
.output(PageAppCallResultSchema),
|
|
51
|
+
reportErrors: procedure
|
|
52
|
+
.route({
|
|
53
|
+
method: "POST",
|
|
54
|
+
path: "/pages/errors",
|
|
55
|
+
summary: "Tell the agent that a page it showed threw",
|
|
56
|
+
description:
|
|
57
|
+
"Hands the uncaught errors a page's own scripts threw in a reader's chat to the agent that showed it, as the sandbox's notice inside that agent's running turn, so it fixes the page and draws it again. Only the turn that showed the page hears it, once per drawing, and never for an MCP server's app; afterwards nothing is said, and the reader can ask from the page's own line.",
|
|
58
|
+
})
|
|
59
|
+
.input(PageErrorsSchema)
|
|
60
|
+
.output(PageErrorsResultSchema),
|
|
61
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { PhoneFactsSchema, PhoneScopesSchema } from "../schemas/phone.js";
|
|
4
|
+
import { OkSchema } from "../schemas/shared.js";
|
|
5
|
+
|
|
6
|
+
// What a connected phone can be asked, over the socket its app opened; the phone answers, the daemon asks, inverted
|
|
7
|
+
// as every peer door is, since a phone cannot be dialled. Carried as JSON-RPC rather than oRPC frames
|
|
8
|
+
// (protocol/doors/phone-protocol.ts says why); each key here is a JSON-RPC method name.
|
|
9
|
+
// `mcp` stays one opaque procedure so the app can gain a tool without a matching daemon release.
|
|
10
|
+
export const phoneContract = {
|
|
11
|
+
// Refetched on connect and each card read: the person changes the app's access in Android's settings, not here.
|
|
12
|
+
describe: oc.output(PhoneFactsSchema),
|
|
13
|
+
// Pushed on connect and on every card edit; enforced by the app, never checked here. The daemon sends the card's
|
|
14
|
+
// whole config, so its `platform` is accepted and ignored. Not strict, unlike a computer's: the app ships on its own
|
|
15
|
+
// schedule, and it reads a switch it does not know as off rather than refusing the grant and dropping the link.
|
|
16
|
+
setScopes: oc.input(PhoneScopesSchema.extend({ platform: z.string().optional() })).output(OkSchema),
|
|
17
|
+
// Liveness and keepalive; a failure means the phone went away, not that it is merely quiet.
|
|
18
|
+
ping: oc.output(OkSchema),
|
|
19
|
+
// One MCP JSON-RPC message forwarded verbatim in both directions.
|
|
20
|
+
mcp: oc.input(z.unknown()).output(z.unknown()),
|
|
21
|
+
};
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
PrivacyKnownSourceSchema,
|
|
7
7
|
PrivacyKnownValueSchema,
|
|
8
8
|
PrivacyLedgerEntrySchema,
|
|
9
|
+
PrivacyRevealSchema,
|
|
9
10
|
PrivacyShieldPolicySchema,
|
|
10
11
|
PrivacyShieldStatusSchema,
|
|
11
12
|
} from "../schemas/privacy.js";
|
|
@@ -42,9 +43,20 @@ export const privacyContract = {
|
|
|
42
43
|
path: "/privacy/log",
|
|
43
44
|
summary: "What the privacy shield did lately",
|
|
44
45
|
description:
|
|
45
|
-
"Each model request the gateway handled: which provider, whether it was trusted,
|
|
46
|
+
"Each model request the gateway handled: which provider, whether it was trusted, how many of each kind of personal data it found, and the tokens it gave with the masked text around them. Never the values.",
|
|
46
47
|
})
|
|
47
48
|
.output(z.array(PrivacyLedgerEntrySchema)),
|
|
49
|
+
reveal: procedure
|
|
50
|
+
.route({
|
|
51
|
+
method: "POST",
|
|
52
|
+
path: "/privacy/reveal",
|
|
53
|
+
summary: "Read tokens back to their values",
|
|
54
|
+
description:
|
|
55
|
+
"The value each token stands for, from the vault, so the owner can check what the shield masked and spot a value it should have left alone. Only the owner may ask; a token the vault never gave out is left out.",
|
|
56
|
+
})
|
|
57
|
+
.meta({ floor: "owner", control: "never", panel: false })
|
|
58
|
+
.input(PrivacyRevealSchema)
|
|
59
|
+
.output(z.record(z.string(), z.string())),
|
|
48
60
|
dictionary: procedure
|
|
49
61
|
.route({
|
|
50
62
|
method: "GET",
|
|
@@ -2,7 +2,7 @@ import { oc } from "@orpc/contract";
|
|
|
2
2
|
import { streamOf } from "../protocol/routes.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { AgentEventSchema } from "../events/agent-events.js";
|
|
5
|
-
import { RunnerCommandFrameSchema, RunnerCommandSchema, RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../protocol/runner-protocol.js";
|
|
5
|
+
import { RunnerCommandFrameSchema, RunnerCommandSchema, RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../protocol/doors/runner-protocol.js";
|
|
6
6
|
import { EditorContextSchema } from "../schemas/agent.js";
|
|
7
7
|
import { AgentReplySchema } from "../schemas/providers/plan-limits.js";
|
|
8
8
|
import { OkSchema } from "../schemas/shared.js";
|