@viewportai/daemon 0.30.0 → 0.32.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/LICENSE +25 -0
- package/README.md +339 -242
- package/dist/chunk-33YDFYW2.js +355 -0
- package/dist/chunk-5MLJY3NS.js +182 -0
- package/dist/chunk-62D4ICYA.js +634 -0
- package/dist/chunk-76ISR4QO.js +5045 -0
- package/dist/chunk-BFV7PIQD.js +639 -0
- package/dist/chunk-EACFI34X.js +2307 -0
- package/dist/chunk-FXZH5JGQ.js +599 -0
- package/dist/chunk-K2WDCPZB.js +377 -0
- package/dist/chunk-NBLB22VR.js +70 -0
- package/dist/chunk-YJFNBSD3.js +229 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +2311 -0
- package/dist/client/index.d.ts +294 -0
- package/dist/client/index.js +708 -0
- package/dist/identity-CH_omX_I.d.ts +20 -0
- package/dist/index.d.ts +109 -26
- package/dist/index.js +34 -223
- package/dist/info-aU2-5A8G.d.ts +602 -0
- package/dist/pipe-BlqIy51a.d.ts +19 -0
- package/dist/protocol/index.d.ts +113 -0
- package/dist/protocol/index.js +222 -0
- package/dist/pushes-B1v3BF2N.d.ts +659 -0
- package/dist/relay/index.d.ts +122 -0
- package/dist/relay/index.js +26 -0
- package/dist/results-Ct1ZVYOZ.d.ts +716 -0
- package/dist/serve-MuBojIIs.d.ts +155 -0
- package/dist/server/index.d.ts +165 -0
- package/dist/server/index.js +31 -0
- package/dist/supervisor-CZ_i_hSc.d.ts +791 -0
- package/dist/testing/index.d.ts +163 -0
- package/dist/testing/index.js +445 -0
- package/dist/testing/vitest.d.ts +12 -0
- package/dist/testing/vitest.js +58 -0
- package/package.json +88 -86
- package/spec/schemas/daemon/channel/v1.json +176 -0
- package/spec/schemas/daemon/event/v1.json +551 -0
- package/spec/schemas/daemon/protocol/v1.json +1557 -0
- package/bin/vpd.js +0 -2
- package/dist/adapters/claude-message-normalizer.d.ts +0 -24
- package/dist/adapters/claude-message-normalizer.d.ts.map +0 -1
- package/dist/adapters/claude-message-normalizer.js +0 -192
- package/dist/adapters/claude-message-normalizer.js.map +0 -1
- package/dist/adapters/claude.d.ts +0 -104
- package/dist/adapters/claude.d.ts.map +0 -1
- package/dist/adapters/claude.js +0 -503
- package/dist/adapters/claude.js.map +0 -1
- package/dist/adapters/codex-event-normalizers.d.ts +0 -10
- package/dist/adapters/codex-event-normalizers.d.ts.map +0 -1
- package/dist/adapters/codex-event-normalizers.js +0 -261
- package/dist/adapters/codex-event-normalizers.js.map +0 -1
- package/dist/adapters/codex-sdk-loader.d.ts +0 -48
- package/dist/adapters/codex-sdk-loader.d.ts.map +0 -1
- package/dist/adapters/codex-sdk-loader.js +0 -19
- package/dist/adapters/codex-sdk-loader.js.map +0 -1
- package/dist/adapters/codex.d.ts +0 -65
- package/dist/adapters/codex.d.ts.map +0 -1
- package/dist/adapters/codex.js +0 -606
- package/dist/adapters/codex.js.map +0 -1
- package/dist/adapters/gemini-cli.d.ts +0 -50
- package/dist/adapters/gemini-cli.d.ts.map +0 -1
- package/dist/adapters/gemini-cli.js +0 -205
- package/dist/adapters/gemini-cli.js.map +0 -1
- package/dist/adapters/pty.d.ts +0 -57
- package/dist/adapters/pty.d.ts.map +0 -1
- package/dist/adapters/pty.js +0 -250
- package/dist/adapters/pty.js.map +0 -1
- package/dist/agents/aider.d.ts +0 -9
- package/dist/agents/aider.d.ts.map +0 -1
- package/dist/agents/aider.js +0 -37
- package/dist/agents/aider.js.map +0 -1
- package/dist/agents/built-in.d.ts +0 -4
- package/dist/agents/built-in.d.ts.map +0 -1
- package/dist/agents/built-in.js +0 -6
- package/dist/agents/built-in.js.map +0 -1
- package/dist/agents/claude.d.ts +0 -12
- package/dist/agents/claude.d.ts.map +0 -1
- package/dist/agents/claude.js +0 -93
- package/dist/agents/claude.js.map +0 -1
- package/dist/agents/codex-defaults.d.ts +0 -2
- package/dist/agents/codex-defaults.d.ts.map +0 -1
- package/dist/agents/codex-defaults.js +0 -2
- package/dist/agents/codex-defaults.js.map +0 -1
- package/dist/agents/codex.d.ts +0 -6
- package/dist/agents/codex.d.ts.map +0 -1
- package/dist/agents/codex.js +0 -82
- package/dist/agents/codex.js.map +0 -1
- package/dist/agents/command-detection.d.ts +0 -6
- package/dist/agents/command-detection.d.ts.map +0 -1
- package/dist/agents/command-detection.js +0 -12
- package/dist/agents/command-detection.js.map +0 -1
- package/dist/agents/custom-command.d.ts +0 -3
- package/dist/agents/custom-command.d.ts.map +0 -1
- package/dist/agents/custom-command.js +0 -58
- package/dist/agents/custom-command.js.map +0 -1
- package/dist/agents/gemini.d.ts +0 -6
- package/dist/agents/gemini.d.ts.map +0 -1
- package/dist/agents/gemini.js +0 -36
- package/dist/agents/gemini.js.map +0 -1
- package/dist/cli/agent-commands.d.ts +0 -2
- package/dist/cli/agent-commands.d.ts.map +0 -1
- package/dist/cli/agent-commands.js +0 -97
- package/dist/cli/agent-commands.js.map +0 -1
- package/dist/cli/args.d.ts +0 -9
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -96
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/bind-command.d.ts +0 -2
- package/dist/cli/bind-command.d.ts.map +0 -1
- package/dist/cli/bind-command.js +0 -61
- package/dist/cli/bind-command.js.map +0 -1
- package/dist/cli/check-command.d.ts +0 -2
- package/dist/cli/check-command.d.ts.map +0 -1
- package/dist/cli/check-command.js +0 -168
- package/dist/cli/check-command.js.map +0 -1
- package/dist/cli/command-shared.d.ts +0 -81
- package/dist/cli/command-shared.d.ts.map +0 -1
- package/dist/cli/command-shared.js +0 -237
- package/dist/cli/command-shared.js.map +0 -1
- package/dist/cli/commands.d.ts +0 -36
- package/dist/cli/commands.d.ts.map +0 -1
- package/dist/cli/commands.js +0 -36
- package/dist/cli/commands.js.map +0 -1
- package/dist/cli/context-access-command.d.ts +0 -3
- package/dist/cli/context-access-command.d.ts.map +0 -1
- package/dist/cli/context-access-command.js +0 -63
- package/dist/cli/context-access-command.js.map +0 -1
- package/dist/cli/context-add-command.d.ts +0 -2
- package/dist/cli/context-add-command.d.ts.map +0 -1
- package/dist/cli/context-add-command.js +0 -74
- package/dist/cli/context-add-command.js.map +0 -1
- package/dist/cli/context-candidate-preview-command.d.ts +0 -2
- package/dist/cli/context-candidate-preview-command.d.ts.map +0 -1
- package/dist/cli/context-candidate-preview-command.js +0 -52
- package/dist/cli/context-candidate-preview-command.js.map +0 -1
- package/dist/cli/context-command-parsers.d.ts +0 -4
- package/dist/cli/context-command-parsers.d.ts.map +0 -1
- package/dist/cli/context-command-parsers.js +0 -32
- package/dist/cli/context-command-parsers.js.map +0 -1
- package/dist/cli/context-command.d.ts +0 -2
- package/dist/cli/context-command.d.ts.map +0 -1
- package/dist/cli/context-command.js +0 -950
- package/dist/cli/context-command.js.map +0 -1
- package/dist/cli/context-github-use-command.d.ts +0 -2
- package/dist/cli/context-github-use-command.d.ts.map +0 -1
- package/dist/cli/context-github-use-command.js +0 -68
- package/dist/cli/context-github-use-command.js.map +0 -1
- package/dist/cli/context-provider-command.d.ts +0 -4
- package/dist/cli/context-provider-command.d.ts.map +0 -1
- package/dist/cli/context-provider-command.js +0 -277
- package/dist/cli/context-provider-command.js.map +0 -1
- package/dist/cli/context-provider-propose.d.ts +0 -27
- package/dist/cli/context-provider-propose.d.ts.map +0 -1
- package/dist/cli/context-provider-propose.js +0 -31
- package/dist/cli/context-provider-propose.js.map +0 -1
- package/dist/cli/context-provider-resolve.d.ts +0 -11
- package/dist/cli/context-provider-resolve.d.ts.map +0 -1
- package/dist/cli/context-provider-resolve.js +0 -22
- package/dist/cli/context-provider-resolve.js.map +0 -1
- package/dist/cli/context-rules-command.d.ts +0 -2
- package/dist/cli/context-rules-command.d.ts.map +0 -1
- package/dist/cli/context-rules-command.js +0 -93
- package/dist/cli/context-rules-command.js.map +0 -1
- package/dist/cli/context-sync-target.d.ts +0 -37
- package/dist/cli/context-sync-target.d.ts.map +0 -1
- package/dist/cli/context-sync-target.js +0 -180
- package/dist/cli/context-sync-target.js.map +0 -1
- package/dist/cli/context-vault-metadata-command.d.ts +0 -36
- package/dist/cli/context-vault-metadata-command.d.ts.map +0 -1
- package/dist/cli/context-vault-metadata-command.js +0 -250
- package/dist/cli/context-vault-metadata-command.js.map +0 -1
- package/dist/cli/context-vault-use-command.d.ts +0 -2
- package/dist/cli/context-vault-use-command.d.ts.map +0 -1
- package/dist/cli/context-vault-use-command.js +0 -55
- package/dist/cli/context-vault-use-command.js.map +0 -1
- package/dist/cli/contract-authorization.d.ts +0 -25
- package/dist/cli/contract-authorization.d.ts.map +0 -1
- package/dist/cli/contract-authorization.js +0 -97
- package/dist/cli/contract-authorization.js.map +0 -1
- package/dist/cli/daemon-client.d.ts +0 -31
- package/dist/cli/daemon-client.d.ts.map +0 -1
- package/dist/cli/daemon-client.js +0 -208
- package/dist/cli/daemon-client.js.map +0 -1
- package/dist/cli/daemon-lifecycle.d.ts +0 -19
- package/dist/cli/daemon-lifecycle.d.ts.map +0 -1
- package/dist/cli/daemon-lifecycle.js +0 -298
- package/dist/cli/daemon-lifecycle.js.map +0 -1
- package/dist/cli/daemon-runtime-state.d.ts +0 -47
- package/dist/cli/daemon-runtime-state.d.ts.map +0 -1
- package/dist/cli/daemon-runtime-state.js +0 -2
- package/dist/cli/daemon-runtime-state.js.map +0 -1
- package/dist/cli/daemon-settings.d.ts +0 -9
- package/dist/cli/daemon-settings.d.ts.map +0 -1
- package/dist/cli/daemon-settings.js +0 -321
- package/dist/cli/daemon-settings.js.map +0 -1
- package/dist/cli/diagnostic-command.d.ts +0 -2
- package/dist/cli/diagnostic-command.d.ts.map +0 -1
- package/dist/cli/diagnostic-command.js +0 -102
- package/dist/cli/diagnostic-command.js.map +0 -1
- package/dist/cli/directory-commands.d.ts +0 -4
- package/dist/cli/directory-commands.d.ts.map +0 -1
- package/dist/cli/directory-commands.js +0 -198
- package/dist/cli/directory-commands.js.map +0 -1
- package/dist/cli/global-flags.d.ts +0 -2
- package/dist/cli/global-flags.d.ts.map +0 -1
- package/dist/cli/global-flags.js +0 -9
- package/dist/cli/global-flags.js.map +0 -1
- package/dist/cli/guard-command.d.ts +0 -34
- package/dist/cli/guard-command.d.ts.map +0 -1
- package/dist/cli/guard-command.js +0 -161
- package/dist/cli/guard-command.js.map +0 -1
- package/dist/cli/hook-command.d.ts +0 -23
- package/dist/cli/hook-command.d.ts.map +0 -1
- package/dist/cli/hook-command.js +0 -169
- package/dist/cli/hook-command.js.map +0 -1
- package/dist/cli/install-command.d.ts +0 -6
- package/dist/cli/install-command.d.ts.map +0 -1
- package/dist/cli/install-command.js +0 -125
- package/dist/cli/install-command.js.map +0 -1
- package/dist/cli/lifecycle-commands.d.ts +0 -15
- package/dist/cli/lifecycle-commands.d.ts.map +0 -1
- package/dist/cli/lifecycle-commands.js +0 -369
- package/dist/cli/lifecycle-commands.js.map +0 -1
- package/dist/cli/lifecycle-doctor-command.d.ts +0 -2
- package/dist/cli/lifecycle-doctor-command.d.ts.map +0 -1
- package/dist/cli/lifecycle-doctor-command.js +0 -100
- package/dist/cli/lifecycle-doctor-command.js.map +0 -1
- package/dist/cli/lifecycle-pair-command.d.ts +0 -6
- package/dist/cli/lifecycle-pair-command.d.ts.map +0 -1
- package/dist/cli/lifecycle-pair-command.js +0 -358
- package/dist/cli/lifecycle-pair-command.js.map +0 -1
- package/dist/cli/lifecycle-pair-server.d.ts +0 -29
- package/dist/cli/lifecycle-pair-server.d.ts.map +0 -1
- package/dist/cli/lifecycle-pair-server.js +0 -208
- package/dist/cli/lifecycle-pair-server.js.map +0 -1
- package/dist/cli/lifecycle-status-command.d.ts +0 -2
- package/dist/cli/lifecycle-status-command.d.ts.map +0 -1
- package/dist/cli/lifecycle-status-command.js +0 -340
- package/dist/cli/lifecycle-status-command.js.map +0 -1
- package/dist/cli/lifecycle-update-command.d.ts +0 -2
- package/dist/cli/lifecycle-update-command.d.ts.map +0 -1
- package/dist/cli/lifecycle-update-command.js +0 -92
- package/dist/cli/lifecycle-update-command.js.map +0 -1
- package/dist/cli/listen-target.d.ts +0 -13
- package/dist/cli/listen-target.d.ts.map +0 -1
- package/dist/cli/listen-target.js +0 -102
- package/dist/cli/listen-target.js.map +0 -1
- package/dist/cli/local-tls.d.ts +0 -9
- package/dist/cli/local-tls.d.ts.map +0 -1
- package/dist/cli/local-tls.js +0 -84
- package/dist/cli/local-tls.js.map +0 -1
- package/dist/cli/managed-session-verification-contract.d.ts +0 -46
- package/dist/cli/managed-session-verification-contract.d.ts.map +0 -1
- package/dist/cli/managed-session-verification-contract.js +0 -2
- package/dist/cli/managed-session-verification-contract.js.map +0 -1
- package/dist/cli/network.d.ts +0 -11
- package/dist/cli/network.d.ts.map +0 -1
- package/dist/cli/network.js +0 -173
- package/dist/cli/network.js.map +0 -1
- package/dist/cli/open-url.d.ts +0 -2
- package/dist/cli/open-url.d.ts.map +0 -1
- package/dist/cli/open-url.js +0 -21
- package/dist/cli/open-url.js.map +0 -1
- package/dist/cli/orchestration-commands.d.ts +0 -8
- package/dist/cli/orchestration-commands.d.ts.map +0 -1
- package/dist/cli/orchestration-commands.js +0 -340
- package/dist/cli/orchestration-commands.js.map +0 -1
- package/dist/cli/org-binding.d.ts +0 -41
- package/dist/cli/org-binding.d.ts.map +0 -1
- package/dist/cli/org-binding.js +0 -211
- package/dist/cli/org-binding.js.map +0 -1
- package/dist/cli/pairing-name-resolver.d.ts +0 -2
- package/dist/cli/pairing-name-resolver.d.ts.map +0 -1
- package/dist/cli/pairing-name-resolver.js +0 -48
- package/dist/cli/pairing-name-resolver.js.map +0 -1
- package/dist/cli/permission-commands.d.ts +0 -2
- package/dist/cli/permission-commands.d.ts.map +0 -1
- package/dist/cli/permission-commands.js +0 -148
- package/dist/cli/permission-commands.js.map +0 -1
- package/dist/cli/policy-schema-validator.d.ts +0 -240
- package/dist/cli/policy-schema-validator.d.ts.map +0 -1
- package/dist/cli/policy-schema-validator.js +0 -315
- package/dist/cli/policy-schema-validator.js.map +0 -1
- package/dist/cli/profile-command.d.ts +0 -3
- package/dist/cli/profile-command.d.ts.map +0 -1
- package/dist/cli/profile-command.js +0 -320
- package/dist/cli/profile-command.js.map +0 -1
- package/dist/cli/profile-runtime-commands.d.ts +0 -6
- package/dist/cli/profile-runtime-commands.d.ts.map +0 -1
- package/dist/cli/profile-runtime-commands.js +0 -127
- package/dist/cli/profile-runtime-commands.js.map +0 -1
- package/dist/cli/relay-binding-config.d.ts +0 -8
- package/dist/cli/relay-binding-config.d.ts.map +0 -1
- package/dist/cli/relay-binding-config.js +0 -62
- package/dist/cli/relay-binding-config.js.map +0 -1
- package/dist/cli/relay-diagnostics.d.ts +0 -8
- package/dist/cli/relay-diagnostics.d.ts.map +0 -1
- package/dist/cli/relay-diagnostics.js +0 -45
- package/dist/cli/relay-diagnostics.js.map +0 -1
- package/dist/cli/relay-launch-bindings.d.ts +0 -22
- package/dist/cli/relay-launch-bindings.d.ts.map +0 -1
- package/dist/cli/relay-launch-bindings.js +0 -36
- package/dist/cli/relay-launch-bindings.js.map +0 -1
- package/dist/cli/remote-commands.d.ts +0 -3
- package/dist/cli/remote-commands.d.ts.map +0 -1
- package/dist/cli/remote-commands.js +0 -312
- package/dist/cli/remote-commands.js.map +0 -1
- package/dist/cli/remote-decision-keys.d.ts +0 -8
- package/dist/cli/remote-decision-keys.d.ts.map +0 -1
- package/dist/cli/remote-decision-keys.js +0 -59
- package/dist/cli/remote-decision-keys.js.map +0 -1
- package/dist/cli/resource-config-command.d.ts +0 -9
- package/dist/cli/resource-config-command.d.ts.map +0 -1
- package/dist/cli/resource-config-command.js +0 -295
- package/dist/cli/resource-config-command.js.map +0 -1
- package/dist/cli/runtime-toolchain.d.ts +0 -35
- package/dist/cli/runtime-toolchain.d.ts.map +0 -1
- package/dist/cli/runtime-toolchain.js +0 -184
- package/dist/cli/runtime-toolchain.js.map +0 -1
- package/dist/cli/service-commands.d.ts +0 -21
- package/dist/cli/service-commands.d.ts.map +0 -1
- package/dist/cli/service-commands.js +0 -295
- package/dist/cli/service-commands.js.map +0 -1
- package/dist/cli/session-commands.d.ts +0 -5
- package/dist/cli/session-commands.d.ts.map +0 -1
- package/dist/cli/session-commands.js +0 -237
- package/dist/cli/session-commands.js.map +0 -1
- package/dist/cli/setup-command.d.ts +0 -17
- package/dist/cli/setup-command.d.ts.map +0 -1
- package/dist/cli/setup-command.js +0 -278
- package/dist/cli/setup-command.js.map +0 -1
- package/dist/cli/signal-command.d.ts +0 -2
- package/dist/cli/signal-command.d.ts.map +0 -1
- package/dist/cli/signal-command.js +0 -258
- package/dist/cli/signal-command.js.map +0 -1
- package/dist/cli/skills-command.d.ts +0 -2
- package/dist/cli/skills-command.d.ts.map +0 -1
- package/dist/cli/skills-command.js +0 -208
- package/dist/cli/skills-command.js.map +0 -1
- package/dist/cli/supervisor-protocol.d.ts +0 -55
- package/dist/cli/supervisor-protocol.d.ts.map +0 -1
- package/dist/cli/supervisor-protocol.js +0 -5
- package/dist/cli/supervisor-protocol.js.map +0 -1
- package/dist/cli/supervisor-runtime-config.d.ts +0 -4
- package/dist/cli/supervisor-runtime-config.d.ts.map +0 -1
- package/dist/cli/supervisor-runtime-config.js +0 -112
- package/dist/cli/supervisor-runtime-config.js.map +0 -1
- package/dist/cli/supervisor.d.ts +0 -10
- package/dist/cli/supervisor.d.ts.map +0 -1
- package/dist/cli/supervisor.js +0 -252
- package/dist/cli/supervisor.js.map +0 -1
- package/dist/cli/support-packet.d.ts +0 -7
- package/dist/cli/support-packet.d.ts.map +0 -1
- package/dist/cli/support-packet.js +0 -19
- package/dist/cli/support-packet.js.map +0 -1
- package/dist/cli/team-resource-command.d.ts +0 -2
- package/dist/cli/team-resource-command.d.ts.map +0 -1
- package/dist/cli/team-resource-command.js +0 -364
- package/dist/cli/team-resource-command.js.map +0 -1
- package/dist/cli/uninstall-command.d.ts +0 -2
- package/dist/cli/uninstall-command.d.ts.map +0 -1
- package/dist/cli/uninstall-command.js +0 -111
- package/dist/cli/uninstall-command.js.map +0 -1
- package/dist/cli/unlock-command.d.ts +0 -2
- package/dist/cli/unlock-command.d.ts.map +0 -1
- package/dist/cli/unlock-command.js +0 -35
- package/dist/cli/unlock-command.js.map +0 -1
- package/dist/cli/watch-command.d.ts +0 -3
- package/dist/cli/watch-command.d.ts.map +0 -1
- package/dist/cli/watch-command.js +0 -42
- package/dist/cli/watch-command.js.map +0 -1
- package/dist/cli/worker-command.d.ts +0 -3
- package/dist/cli/worker-command.d.ts.map +0 -1
- package/dist/cli/worker-command.js +0 -518
- package/dist/cli/worker-command.js.map +0 -1
- package/dist/cli/worker-process-lock.d.ts +0 -27
- package/dist/cli/worker-process-lock.d.ts.map +0 -1
- package/dist/cli/worker-process-lock.js +0 -150
- package/dist/cli/worker-process-lock.js.map +0 -1
- package/dist/cli/worker-profile.d.ts +0 -90
- package/dist/cli/worker-profile.d.ts.map +0 -1
- package/dist/cli/worker-profile.js +0 -302
- package/dist/cli/worker-profile.js.map +0 -1
- package/dist/cli/worker-runtime.d.ts +0 -83
- package/dist/cli/worker-runtime.d.ts.map +0 -1
- package/dist/cli/worker-runtime.js +0 -1825
- package/dist/cli/worker-runtime.js.map +0 -1
- package/dist/cli/workflow-commands.d.ts +0 -3
- package/dist/cli/workflow-commands.d.ts.map +0 -1
- package/dist/cli/workflow-commands.js +0 -404
- package/dist/cli/workflow-commands.js.map +0 -1
- package/dist/cli/workflow-contract-resolver.d.ts +0 -13
- package/dist/cli/workflow-contract-resolver.d.ts.map +0 -1
- package/dist/cli/workflow-contract-resolver.js +0 -68
- package/dist/cli/workflow-contract-resolver.js.map +0 -1
- package/dist/cli/workflow-run-json.d.ts +0 -34
- package/dist/cli/workflow-run-json.d.ts.map +0 -1
- package/dist/cli/workflow-run-json.js +0 -118
- package/dist/cli/workflow-run-json.js.map +0 -1
- package/dist/cli/worktree-commands.d.ts +0 -2
- package/dist/cli/worktree-commands.d.ts.map +0 -1
- package/dist/cli/worktree-commands.js +0 -260
- package/dist/cli/worktree-commands.js.map +0 -1
- package/dist/cli/ws-client.d.ts +0 -20
- package/dist/cli/ws-client.d.ts.map +0 -1
- package/dist/cli/ws-client.js +0 -128
- package/dist/cli/ws-client.js.map +0 -1
- package/dist/config-resolution/approval-rules.d.ts +0 -5
- package/dist/config-resolution/approval-rules.d.ts.map +0 -1
- package/dist/config-resolution/approval-rules.js +0 -14
- package/dist/config-resolution/approval-rules.js.map +0 -1
- package/dist/config-resolution/config-writer.d.ts +0 -51
- package/dist/config-resolution/config-writer.d.ts.map +0 -1
- package/dist/config-resolution/config-writer.js +0 -164
- package/dist/config-resolution/config-writer.js.map +0 -1
- package/dist/config-resolution/context-package-manifest.d.ts +0 -3
- package/dist/config-resolution/context-package-manifest.d.ts.map +0 -1
- package/dist/config-resolution/context-package-manifest.js +0 -23
- package/dist/config-resolution/context-package-manifest.js.map +0 -1
- package/dist/config-resolution/discovery.d.ts +0 -18
- package/dist/config-resolution/discovery.d.ts.map +0 -1
- package/dist/config-resolution/discovery.js +0 -225
- package/dist/config-resolution/discovery.js.map +0 -1
- package/dist/config-resolution/index.d.ts +0 -4
- package/dist/config-resolution/index.d.ts.map +0 -1
- package/dist/config-resolution/index.js +0 -4
- package/dist/config-resolution/index.js.map +0 -1
- package/dist/config-resolution/provider-defaults.d.ts +0 -4
- package/dist/config-resolution/provider-defaults.d.ts.map +0 -1
- package/dist/config-resolution/provider-defaults.js +0 -27
- package/dist/config-resolution/provider-defaults.js.map +0 -1
- package/dist/config-resolution/resolver.d.ts +0 -16
- package/dist/config-resolution/resolver.d.ts.map +0 -1
- package/dist/config-resolution/resolver.js +0 -329
- package/dist/config-resolution/resolver.js.map +0 -1
- package/dist/config-resolution/schema.d.ts +0 -127
- package/dist/config-resolution/schema.d.ts.map +0 -1
- package/dist/config-resolution/schema.js +0 -189
- package/dist/config-resolution/schema.js.map +0 -1
- package/dist/config-resolution/stable-json.d.ts +0 -3
- package/dist/config-resolution/stable-json.d.ts.map +0 -1
- package/dist/config-resolution/stable-json.js +0 -18
- package/dist/config-resolution/stable-json.js.map +0 -1
- package/dist/config-resolution/types.d.ts +0 -134
- package/dist/config-resolution/types.d.ts.map +0 -1
- package/dist/config-resolution/types.js +0 -5
- package/dist/config-resolution/types.js.map +0 -1
- package/dist/context/local-edge-auto-sync.d.ts +0 -17
- package/dist/context/local-edge-auto-sync.d.ts.map +0 -1
- package/dist/context/local-edge-auto-sync.js +0 -94
- package/dist/context/local-edge-auto-sync.js.map +0 -1
- package/dist/context/local-edge-candidates.d.ts +0 -58
- package/dist/context/local-edge-candidates.d.ts.map +0 -1
- package/dist/context/local-edge-candidates.js +0 -276
- package/dist/context/local-edge-candidates.js.map +0 -1
- package/dist/context/local-edge-crypto.d.ts +0 -28
- package/dist/context/local-edge-crypto.d.ts.map +0 -1
- package/dist/context/local-edge-crypto.js +0 -76
- package/dist/context/local-edge-crypto.js.map +0 -1
- package/dist/context/local-edge-decision-applications.d.ts +0 -13
- package/dist/context/local-edge-decision-applications.d.ts.map +0 -1
- package/dist/context/local-edge-decision-applications.js +0 -78
- package/dist/context/local-edge-decision-applications.js.map +0 -1
- package/dist/context/local-edge-decision-signature.d.ts +0 -3
- package/dist/context/local-edge-decision-signature.d.ts.map +0 -1
- package/dist/context/local-edge-decision-signature.js +0 -67
- package/dist/context/local-edge-decision-signature.js.map +0 -1
- package/dist/context/local-edge-engine.d.ts +0 -38
- package/dist/context/local-edge-engine.d.ts.map +0 -1
- package/dist/context/local-edge-engine.js +0 -138
- package/dist/context/local-edge-engine.js.map +0 -1
- package/dist/context/local-edge-key-store.d.ts +0 -4
- package/dist/context/local-edge-key-store.d.ts.map +0 -1
- package/dist/context/local-edge-key-store.js +0 -21
- package/dist/context/local-edge-key-store.js.map +0 -1
- package/dist/context/local-edge-metadata.d.ts +0 -8
- package/dist/context/local-edge-metadata.d.ts.map +0 -1
- package/dist/context/local-edge-metadata.js +0 -105
- package/dist/context/local-edge-metadata.js.map +0 -1
- package/dist/context/local-edge-paths.d.ts +0 -4
- package/dist/context/local-edge-paths.d.ts.map +0 -1
- package/dist/context/local-edge-paths.js +0 -11
- package/dist/context/local-edge-paths.js.map +0 -1
- package/dist/context/local-edge-store.d.ts +0 -137
- package/dist/context/local-edge-store.d.ts.map +0 -1
- package/dist/context/local-edge-store.js +0 -284
- package/dist/context/local-edge-store.js.map +0 -1
- package/dist/context/local-edge-sync.d.ts +0 -104
- package/dist/context/local-edge-sync.d.ts.map +0 -1
- package/dist/context/local-edge-sync.js +0 -716
- package/dist/context/local-edge-sync.js.map +0 -1
- package/dist/context/local-edge-types.d.ts +0 -330
- package/dist/context/local-edge-types.d.ts.map +0 -1
- package/dist/context/local-edge-types.js +0 -5
- package/dist/context/local-edge-types.js.map +0 -1
- package/dist/context-providers/confluence-provider.d.ts +0 -3
- package/dist/context-providers/confluence-provider.d.ts.map +0 -1
- package/dist/context-providers/confluence-provider.js +0 -170
- package/dist/context-providers/confluence-provider.js.map +0 -1
- package/dist/context-providers/github-repo-provider.d.ts +0 -3
- package/dist/context-providers/github-repo-provider.d.ts.map +0 -1
- package/dist/context-providers/github-repo-provider.js +0 -313
- package/dist/context-providers/github-repo-provider.js.map +0 -1
- package/dist/context-providers/notion-provider.d.ts +0 -3
- package/dist/context-providers/notion-provider.d.ts.map +0 -1
- package/dist/context-providers/notion-provider.js +0 -157
- package/dist/context-providers/notion-provider.js.map +0 -1
- package/dist/context-providers/registry.d.ts +0 -5
- package/dist/context-providers/registry.d.ts.map +0 -1
- package/dist/context-providers/registry.js +0 -19
- package/dist/context-providers/registry.js.map +0 -1
- package/dist/context-providers/repo-docs-provider.d.ts +0 -19
- package/dist/context-providers/repo-docs-provider.d.ts.map +0 -1
- package/dist/context-providers/repo-docs-provider.js +0 -188
- package/dist/context-providers/repo-docs-provider.js.map +0 -1
- package/dist/context-providers/types.d.ts +0 -75
- package/dist/context-providers/types.d.ts.map +0 -1
- package/dist/context-providers/types.js +0 -2
- package/dist/context-providers/types.js.map +0 -1
- package/dist/context-providers/viewport-vault-provider.d.ts +0 -3
- package/dist/context-providers/viewport-vault-provider.d.ts.map +0 -1
- package/dist/context-providers/viewport-vault-provider.js +0 -84
- package/dist/context-providers/viewport-vault-provider.js.map +0 -1
- package/dist/core/agent-registry.d.ts +0 -130
- package/dist/core/agent-registry.d.ts.map +0 -1
- package/dist/core/agent-registry.js +0 -131
- package/dist/core/agent-registry.js.map +0 -1
- package/dist/core/config-schema.d.ts +0 -230
- package/dist/core/config-schema.d.ts.map +0 -1
- package/dist/core/config-schema.js +0 -175
- package/dist/core/config-schema.js.map +0 -1
- package/dist/core/config.d.ts +0 -305
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js +0 -453
- package/dist/core/config.js.map +0 -1
- package/dist/core/daemon.d.ts +0 -147
- package/dist/core/daemon.d.ts.map +0 -1
- package/dist/core/daemon.js +0 -275
- package/dist/core/daemon.js.map +0 -1
- package/dist/core/discovered-sessions.d.ts +0 -7
- package/dist/core/discovered-sessions.d.ts.map +0 -1
- package/dist/core/discovered-sessions.js +0 -44
- package/dist/core/discovered-sessions.js.map +0 -1
- package/dist/core/error-codes.d.ts +0 -32
- package/dist/core/error-codes.d.ts.map +0 -1
- package/dist/core/error-codes.js +0 -31
- package/dist/core/error-codes.js.map +0 -1
- package/dist/core/errors.d.ts +0 -16
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/errors.js +0 -45
- package/dist/core/errors.js.map +0 -1
- package/dist/core/events.d.ts +0 -213
- package/dist/core/events.d.ts.map +0 -1
- package/dist/core/events.js +0 -61
- package/dist/core/events.js.map +0 -1
- package/dist/core/interfaces.d.ts +0 -304
- package/dist/core/interfaces.d.ts.map +0 -1
- package/dist/core/interfaces.js +0 -9
- package/dist/core/interfaces.js.map +0 -1
- package/dist/core/logger.d.ts +0 -11
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js +0 -23
- package/dist/core/logger.js.map +0 -1
- package/dist/core/machine-name.d.ts +0 -3
- package/dist/core/machine-name.d.ts.map +0 -1
- package/dist/core/machine-name.js +0 -11
- package/dist/core/machine-name.js.map +0 -1
- package/dist/core/metrics.d.ts +0 -24
- package/dist/core/metrics.d.ts.map +0 -1
- package/dist/core/metrics.js +0 -32
- package/dist/core/metrics.js.map +0 -1
- package/dist/core/output.d.ts +0 -13
- package/dist/core/output.d.ts.map +0 -1
- package/dist/core/output.js +0 -23
- package/dist/core/output.js.map +0 -1
- package/dist/core/package-meta.d.ts +0 -12
- package/dist/core/package-meta.d.ts.map +0 -1
- package/dist/core/package-meta.js +0 -87
- package/dist/core/package-meta.js.map +0 -1
- package/dist/core/permission-coordinator.d.ts +0 -67
- package/dist/core/permission-coordinator.d.ts.map +0 -1
- package/dist/core/permission-coordinator.js +0 -211
- package/dist/core/permission-coordinator.js.map +0 -1
- package/dist/core/profiles.d.ts +0 -43
- package/dist/core/profiles.d.ts.map +0 -1
- package/dist/core/profiles.js +0 -181
- package/dist/core/profiles.js.map +0 -1
- package/dist/core/redaction.d.ts +0 -4
- package/dist/core/redaction.d.ts.map +0 -1
- package/dist/core/redaction.js +0 -76
- package/dist/core/redaction.js.map +0 -1
- package/dist/core/runtime-identity.d.ts +0 -45
- package/dist/core/runtime-identity.d.ts.map +0 -1
- package/dist/core/runtime-identity.js +0 -130
- package/dist/core/runtime-identity.js.map +0 -1
- package/dist/core/session-context-prompt.d.ts +0 -22
- package/dist/core/session-context-prompt.d.ts.map +0 -1
- package/dist/core/session-context-prompt.js +0 -213
- package/dist/core/session-context-prompt.js.map +0 -1
- package/dist/core/session-discovery-runner.d.ts +0 -11
- package/dist/core/session-discovery-runner.d.ts.map +0 -1
- package/dist/core/session-discovery-runner.js +0 -37
- package/dist/core/session-discovery-runner.js.map +0 -1
- package/dist/core/session-manager.d.ts +0 -130
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js +0 -434
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/session-state-file.d.ts +0 -20
- package/dist/core/session-state-file.d.ts.map +0 -1
- package/dist/core/session-state-file.js +0 -51
- package/dist/core/session-state-file.js.map +0 -1
- package/dist/core/types.d.ts +0 -290
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -88
- package/dist/core/types.js.map +0 -1
- package/dist/core/workflow-linked-discovery.d.ts +0 -17
- package/dist/core/workflow-linked-discovery.d.ts.map +0 -1
- package/dist/core/workflow-linked-discovery.js +0 -53
- package/dist/core/workflow-linked-discovery.js.map +0 -1
- package/dist/directories/manager.d.ts +0 -33
- package/dist/directories/manager.d.ts.map +0 -1
- package/dist/directories/manager.js +0 -129
- package/dist/directories/manager.js.map +0 -1
- package/dist/discovery/claude.d.ts +0 -29
- package/dist/discovery/claude.d.ts.map +0 -1
- package/dist/discovery/claude.js +0 -66
- package/dist/discovery/claude.js.map +0 -1
- package/dist/discovery/codex-parser.d.ts +0 -20
- package/dist/discovery/codex-parser.d.ts.map +0 -1
- package/dist/discovery/codex-parser.js +0 -378
- package/dist/discovery/codex-parser.js.map +0 -1
- package/dist/discovery/codex-summary.d.ts +0 -6
- package/dist/discovery/codex-summary.d.ts.map +0 -1
- package/dist/discovery/codex-summary.js +0 -27
- package/dist/discovery/codex-summary.js.map +0 -1
- package/dist/discovery/codex.d.ts +0 -32
- package/dist/discovery/codex.d.ts.map +0 -1
- package/dist/discovery/codex.js +0 -206
- package/dist/discovery/codex.js.map +0 -1
- package/dist/discovery/dedupe.d.ts +0 -3
- package/dist/discovery/dedupe.d.ts.map +0 -1
- package/dist/discovery/dedupe.js +0 -13
- package/dist/discovery/dedupe.js.map +0 -1
- package/dist/discovery/gemini.d.ts +0 -15
- package/dist/discovery/gemini.d.ts.map +0 -1
- package/dist/discovery/gemini.js +0 -151
- package/dist/discovery/gemini.js.map +0 -1
- package/dist/discovery/jsonl-entry-parser.d.ts +0 -74
- package/dist/discovery/jsonl-entry-parser.d.ts.map +0 -1
- package/dist/discovery/jsonl-entry-parser.js +0 -1034
- package/dist/discovery/jsonl-entry-parser.js.map +0 -1
- package/dist/discovery/jsonl-paths.d.ts +0 -17
- package/dist/discovery/jsonl-paths.d.ts.map +0 -1
- package/dist/discovery/jsonl-paths.js +0 -56
- package/dist/discovery/jsonl-paths.js.map +0 -1
- package/dist/discovery/jsonl-reader.d.ts +0 -121
- package/dist/discovery/jsonl-reader.d.ts.map +0 -1
- package/dist/discovery/jsonl-reader.js +0 -458
- package/dist/discovery/jsonl-reader.js.map +0 -1
- package/dist/discovery/watcher.d.ts +0 -29
- package/dist/discovery/watcher.d.ts.map +0 -1
- package/dist/discovery/watcher.js +0 -426
- package/dist/discovery/watcher.js.map +0 -1
- package/dist/hooks/capabilities.d.ts +0 -17
- package/dist/hooks/capabilities.d.ts.map +0 -1
- package/dist/hooks/capabilities.js +0 -114
- package/dist/hooks/capabilities.js.map +0 -1
- package/dist/hooks/context-injector.d.ts +0 -7
- package/dist/hooks/context-injector.d.ts.map +0 -1
- package/dist/hooks/context-injector.js +0 -91
- package/dist/hooks/context-injector.js.map +0 -1
- package/dist/hooks/ephemeral-plan-drafts.d.ts +0 -34
- package/dist/hooks/ephemeral-plan-drafts.d.ts.map +0 -1
- package/dist/hooks/ephemeral-plan-drafts.js +0 -62
- package/dist/hooks/ephemeral-plan-drafts.js.map +0 -1
- package/dist/hooks/index.d.ts +0 -12
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -9
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/installers/base.d.ts +0 -27
- package/dist/hooks/installers/base.d.ts.map +0 -1
- package/dist/hooks/installers/base.js +0 -9
- package/dist/hooks/installers/base.js.map +0 -1
- package/dist/hooks/installers/claude.d.ts +0 -18
- package/dist/hooks/installers/claude.d.ts.map +0 -1
- package/dist/hooks/installers/claude.js +0 -146
- package/dist/hooks/installers/claude.js.map +0 -1
- package/dist/hooks/plan-extractor.d.ts +0 -20
- package/dist/hooks/plan-extractor.d.ts.map +0 -1
- package/dist/hooks/plan-extractor.js +0 -128
- package/dist/hooks/plan-extractor.js.map +0 -1
- package/dist/hooks/platform-plan-sync.d.ts +0 -24
- package/dist/hooks/platform-plan-sync.d.ts.map +0 -1
- package/dist/hooks/platform-plan-sync.js +0 -115
- package/dist/hooks/platform-plan-sync.js.map +0 -1
- package/dist/hooks/router.d.ts +0 -64
- package/dist/hooks/router.d.ts.map +0 -1
- package/dist/hooks/router.js +0 -245
- package/dist/hooks/router.js.map +0 -1
- package/dist/hooks/specific-events.d.ts +0 -11
- package/dist/hooks/specific-events.d.ts.map +0 -1
- package/dist/hooks/specific-events.js +0 -201
- package/dist/hooks/specific-events.js.map +0 -1
- package/dist/hooks/supervision.d.ts +0 -29
- package/dist/hooks/supervision.d.ts.map +0 -1
- package/dist/hooks/supervision.js +0 -79
- package/dist/hooks/supervision.js.map +0 -1
- package/dist/hooks/trusted-edge-plan-artifacts.d.ts +0 -118
- package/dist/hooks/trusted-edge-plan-artifacts.d.ts.map +0 -1
- package/dist/hooks/trusted-edge-plan-artifacts.js +0 -386
- package/dist/hooks/trusted-edge-plan-artifacts.js.map +0 -1
- package/dist/hooks/types.d.ts +0 -204
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/types.js +0 -184
- package/dist/hooks/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/permissions/engine.d.ts +0 -23
- package/dist/permissions/engine.d.ts.map +0 -1
- package/dist/permissions/engine.js +0 -43
- package/dist/permissions/engine.js.map +0 -1
- package/dist/plugins/loader.d.ts +0 -44
- package/dist/plugins/loader.d.ts.map +0 -1
- package/dist/plugins/loader.js +0 -200
- package/dist/plugins/loader.js.map +0 -1
- package/dist/relay/bridge-backoff.d.ts +0 -3
- package/dist/relay/bridge-backoff.d.ts.map +0 -1
- package/dist/relay/bridge-backoff.js +0 -10
- package/dist/relay/bridge-backoff.js.map +0 -1
- package/dist/relay/bridge-connections.d.ts +0 -26
- package/dist/relay/bridge-connections.d.ts.map +0 -1
- package/dist/relay/bridge-connections.js +0 -34
- package/dist/relay/bridge-connections.js.map +0 -1
- package/dist/relay/bridge-constants.d.ts +0 -12
- package/dist/relay/bridge-constants.d.ts.map +0 -1
- package/dist/relay/bridge-constants.js +0 -12
- package/dist/relay/bridge-constants.js.map +0 -1
- package/dist/relay/bridge-crypto.d.ts +0 -19
- package/dist/relay/bridge-crypto.d.ts.map +0 -1
- package/dist/relay/bridge-crypto.js +0 -72
- package/dist/relay/bridge-crypto.js.map +0 -1
- package/dist/relay/bridge-daemon-key-registration.d.ts +0 -18
- package/dist/relay/bridge-daemon-key-registration.d.ts.map +0 -1
- package/dist/relay/bridge-daemon-key-registration.js +0 -94
- package/dist/relay/bridge-daemon-key-registration.js.map +0 -1
- package/dist/relay/bridge-errors.d.ts +0 -8
- package/dist/relay/bridge-errors.d.ts.map +0 -1
- package/dist/relay/bridge-errors.js +0 -23
- package/dist/relay/bridge-errors.js.map +0 -1
- package/dist/relay/bridge-frame-logger.d.ts +0 -2
- package/dist/relay/bridge-frame-logger.d.ts.map +0 -1
- package/dist/relay/bridge-frame-logger.js +0 -37
- package/dist/relay/bridge-frame-logger.js.map +0 -1
- package/dist/relay/bridge-handshake-profile.d.ts +0 -3
- package/dist/relay/bridge-handshake-profile.d.ts.map +0 -1
- package/dist/relay/bridge-handshake-profile.js +0 -7
- package/dist/relay/bridge-handshake-profile.js.map +0 -1
- package/dist/relay/bridge-identity-store.d.ts +0 -9
- package/dist/relay/bridge-identity-store.d.ts.map +0 -1
- package/dist/relay/bridge-identity-store.js +0 -77
- package/dist/relay/bridge-identity-store.js.map +0 -1
- package/dist/relay/bridge-jwt.d.ts +0 -18
- package/dist/relay/bridge-jwt.d.ts.map +0 -1
- package/dist/relay/bridge-jwt.js +0 -130
- package/dist/relay/bridge-jwt.js.map +0 -1
- package/dist/relay/bridge-key-exchange.d.ts +0 -46
- package/dist/relay/bridge-key-exchange.d.ts.map +0 -1
- package/dist/relay/bridge-key-exchange.js +0 -186
- package/dist/relay/bridge-key-exchange.js.map +0 -1
- package/dist/relay/bridge-network.d.ts +0 -12
- package/dist/relay/bridge-network.d.ts.map +0 -1
- package/dist/relay/bridge-network.js +0 -90
- package/dist/relay/bridge-network.js.map +0 -1
- package/dist/relay/bridge-noise-v3.d.ts +0 -74
- package/dist/relay/bridge-noise-v3.d.ts.map +0 -1
- package/dist/relay/bridge-noise-v3.js +0 -406
- package/dist/relay/bridge-noise-v3.js.map +0 -1
- package/dist/relay/bridge-org-routing-filter.d.ts +0 -8
- package/dist/relay/bridge-org-routing-filter.d.ts.map +0 -1
- package/dist/relay/bridge-org-routing-filter.js +0 -129
- package/dist/relay/bridge-org-routing-filter.js.map +0 -1
- package/dist/relay/bridge-pairing-channel.d.ts +0 -12
- package/dist/relay/bridge-pairing-channel.d.ts.map +0 -1
- package/dist/relay/bridge-pairing-channel.js +0 -30
- package/dist/relay/bridge-pairing-channel.js.map +0 -1
- package/dist/relay/bridge-pairing-control-handler.d.ts +0 -26
- package/dist/relay/bridge-pairing-control-handler.d.ts.map +0 -1
- package/dist/relay/bridge-pairing-control-handler.js +0 -136
- package/dist/relay/bridge-pairing-control-handler.js.map +0 -1
- package/dist/relay/bridge-relay-sessions.d.ts +0 -45
- package/dist/relay/bridge-relay-sessions.d.ts.map +0 -1
- package/dist/relay/bridge-relay-sessions.js +0 -88
- package/dist/relay/bridge-relay-sessions.js.map +0 -1
- package/dist/relay/bridge-token-issuer.d.ts +0 -33
- package/dist/relay/bridge-token-issuer.d.ts.map +0 -1
- package/dist/relay/bridge-token-issuer.js +0 -173
- package/dist/relay/bridge-token-issuer.js.map +0 -1
- package/dist/relay/daemon-relay-bridge.d.ts +0 -92
- package/dist/relay/daemon-relay-bridge.d.ts.map +0 -1
- package/dist/relay/daemon-relay-bridge.js +0 -549
- package/dist/relay/daemon-relay-bridge.js.map +0 -1
- package/dist/relay/relay-control-frames.d.ts +0 -31
- package/dist/relay/relay-control-frames.d.ts.map +0 -1
- package/dist/relay/relay-control-frames.js +0 -65
- package/dist/relay/relay-control-frames.js.map +0 -1
- package/dist/security/child-env.d.ts +0 -3
- package/dist/security/child-env.d.ts.map +0 -1
- package/dist/security/child-env.js +0 -44
- package/dist/security/child-env.js.map +0 -1
- package/dist/security/epoch-enrollment.d.ts +0 -48
- package/dist/security/epoch-enrollment.d.ts.map +0 -1
- package/dist/security/epoch-enrollment.js +0 -290
- package/dist/security/epoch-enrollment.js.map +0 -1
- package/dist/security/epoch-protocol.d.ts +0 -181
- package/dist/security/epoch-protocol.d.ts.map +0 -1
- package/dist/security/epoch-protocol.js +0 -285
- package/dist/security/epoch-protocol.js.map +0 -1
- package/dist/security/epoch-public-pins.d.ts +0 -19
- package/dist/security/epoch-public-pins.d.ts.map +0 -1
- package/dist/security/epoch-public-pins.js +0 -129
- package/dist/security/epoch-public-pins.js.map +0 -1
- package/dist/security/epoch-recovery.d.ts +0 -56
- package/dist/security/epoch-recovery.d.ts.map +0 -1
- package/dist/security/epoch-recovery.js +0 -314
- package/dist/security/epoch-recovery.js.map +0 -1
- package/dist/security/epoch-store.d.ts +0 -111
- package/dist/security/epoch-store.d.ts.map +0 -1
- package/dist/security/epoch-store.js +0 -224
- package/dist/security/epoch-store.js.map +0 -1
- package/dist/security/epoch-sync.d.ts +0 -47
- package/dist/security/epoch-sync.d.ts.map +0 -1
- package/dist/security/epoch-sync.js +0 -371
- package/dist/security/epoch-sync.js.map +0 -1
- package/dist/security/team-epoch-grant-payloads.d.ts +0 -44
- package/dist/security/team-epoch-grant-payloads.d.ts.map +0 -1
- package/dist/security/team-epoch-grant-payloads.js +0 -100
- package/dist/security/team-epoch-grant-payloads.js.map +0 -1
- package/dist/security/team-epoch-grants.d.ts +0 -31
- package/dist/security/team-epoch-grants.d.ts.map +0 -1
- package/dist/security/team-epoch-grants.js +0 -194
- package/dist/security/team-epoch-grants.js.map +0 -1
- package/dist/server/auth.d.ts +0 -33
- package/dist/server/auth.d.ts.map +0 -1
- package/dist/server/auth.js +0 -82
- package/dist/server/auth.js.map +0 -1
- package/dist/server/context-preview-service.d.ts +0 -26
- package/dist/server/context-preview-service.d.ts.map +0 -1
- package/dist/server/context-preview-service.js +0 -71
- package/dist/server/context-preview-service.js.map +0 -1
- package/dist/server/discovered-session-window.d.ts +0 -4
- package/dist/server/discovered-session-window.d.ts.map +0 -1
- package/dist/server/discovered-session-window.js +0 -5
- package/dist/server/discovered-session-window.js.map +0 -1
- package/dist/server/discovered-watch-key.d.ts +0 -5
- package/dist/server/discovered-watch-key.d.ts.map +0 -1
- package/dist/server/discovered-watch-key.js +0 -31
- package/dist/server/discovered-watch-key.js.map +0 -1
- package/dist/server/hello-builder.d.ts +0 -102
- package/dist/server/hello-builder.d.ts.map +0 -1
- package/dist/server/hello-builder.js +0 -227
- package/dist/server/hello-builder.js.map +0 -1
- package/dist/server/http-context-routes.d.ts +0 -4
- package/dist/server/http-context-routes.d.ts.map +0 -1
- package/dist/server/http-context-routes.js +0 -283
- package/dist/server/http-context-routes.js.map +0 -1
- package/dist/server/http-health-routes.d.ts +0 -11
- package/dist/server/http-health-routes.d.ts.map +0 -1
- package/dist/server/http-health-routes.js +0 -69
- package/dist/server/http-health-routes.js.map +0 -1
- package/dist/server/http-lifecycle-routes.d.ts +0 -6
- package/dist/server/http-lifecycle-routes.d.ts.map +0 -1
- package/dist/server/http-lifecycle-routes.js +0 -17
- package/dist/server/http-lifecycle-routes.js.map +0 -1
- package/dist/server/http-pairing-routes.d.ts +0 -14
- package/dist/server/http-pairing-routes.d.ts.map +0 -1
- package/dist/server/http-pairing-routes.js +0 -110
- package/dist/server/http-pairing-routes.js.map +0 -1
- package/dist/server/http-request-schemas.d.ts +0 -152
- package/dist/server/http-request-schemas.d.ts.map +0 -1
- package/dist/server/http-request-schemas.js +0 -183
- package/dist/server/http-request-schemas.js.map +0 -1
- package/dist/server/http-route-types.d.ts +0 -11
- package/dist/server/http-route-types.d.ts.map +0 -1
- package/dist/server/http-route-types.js +0 -2
- package/dist/server/http-route-types.js.map +0 -1
- package/dist/server/http-server.d.ts +0 -26
- package/dist/server/http-server.d.ts.map +0 -1
- package/dist/server/http-server.js +0 -400
- package/dist/server/http-server.js.map +0 -1
- package/dist/server/http-session-routes.d.ts +0 -4
- package/dist/server/http-session-routes.d.ts.map +0 -1
- package/dist/server/http-session-routes.js +0 -234
- package/dist/server/http-session-routes.js.map +0 -1
- package/dist/server/message-normalizers.d.ts +0 -11
- package/dist/server/message-normalizers.d.ts.map +0 -1
- package/dist/server/message-normalizers.js +0 -104
- package/dist/server/message-normalizers.js.map +0 -1
- package/dist/server/pairing-file-store.d.ts +0 -10
- package/dist/server/pairing-file-store.d.ts.map +0 -1
- package/dist/server/pairing-file-store.js +0 -69
- package/dist/server/pairing-file-store.js.map +0 -1
- package/dist/server/pairing-identity-store.d.ts +0 -5
- package/dist/server/pairing-identity-store.d.ts.map +0 -1
- package/dist/server/pairing-identity-store.js +0 -121
- package/dist/server/pairing-identity-store.js.map +0 -1
- package/dist/server/pairing-offer-types.d.ts +0 -98
- package/dist/server/pairing-offer-types.d.ts.map +0 -1
- package/dist/server/pairing-offer-types.js +0 -2
- package/dist/server/pairing-offer-types.js.map +0 -1
- package/dist/server/pairing-offers.d.ts +0 -29
- package/dist/server/pairing-offers.d.ts.map +0 -1
- package/dist/server/pairing-offers.js +0 -351
- package/dist/server/pairing-offers.js.map +0 -1
- package/dist/server/pairing-peer-bindings.d.ts +0 -18
- package/dist/server/pairing-peer-bindings.d.ts.map +0 -1
- package/dist/server/pairing-peer-bindings.js +0 -198
- package/dist/server/pairing-peer-bindings.js.map +0 -1
- package/dist/server/rate-limiter.d.ts +0 -21
- package/dist/server/rate-limiter.d.ts.map +0 -1
- package/dist/server/rate-limiter.js +0 -70
- package/dist/server/rate-limiter.js.map +0 -1
- package/dist/server/replay-events.d.ts +0 -6
- package/dist/server/replay-events.d.ts.map +0 -1
- package/dist/server/replay-events.js +0 -104
- package/dist/server/replay-events.js.map +0 -1
- package/dist/server/replay-persistence.d.ts +0 -18
- package/dist/server/replay-persistence.d.ts.map +0 -1
- package/dist/server/replay-persistence.js +0 -123
- package/dist/server/replay-persistence.js.map +0 -1
- package/dist/server/replay-types.d.ts +0 -25
- package/dist/server/replay-types.d.ts.map +0 -1
- package/dist/server/replay-types.js +0 -2
- package/dist/server/replay-types.js.map +0 -1
- package/dist/server/ring-buffer.d.ts +0 -48
- package/dist/server/ring-buffer.d.ts.map +0 -1
- package/dist/server/ring-buffer.js +0 -235
- package/dist/server/ring-buffer.js.map +0 -1
- package/dist/server/security.d.ts +0 -22
- package/dist/server/security.d.ts.map +0 -1
- package/dist/server/security.js +0 -127
- package/dist/server/security.js.map +0 -1
- package/dist/server/session-message-reader.d.ts +0 -15
- package/dist/server/session-message-reader.d.ts.map +0 -1
- package/dist/server/session-message-reader.js +0 -107
- package/dist/server/session-message-reader.js.map +0 -1
- package/dist/server/trusted-edge-command-capability.d.ts +0 -15
- package/dist/server/trusted-edge-command-capability.d.ts.map +0 -1
- package/dist/server/trusted-edge-command-capability.js +0 -118
- package/dist/server/trusted-edge-command-capability.js.map +0 -1
- package/dist/server/ws-command-handlers.d.ts +0 -28
- package/dist/server/ws-command-handlers.d.ts.map +0 -1
- package/dist/server/ws-command-handlers.js +0 -489
- package/dist/server/ws-command-handlers.js.map +0 -1
- package/dist/server/ws-daemon-event-bridge.d.ts +0 -22
- package/dist/server/ws-daemon-event-bridge.d.ts.map +0 -1
- package/dist/server/ws-daemon-event-bridge.js +0 -392
- package/dist/server/ws-daemon-event-bridge.js.map +0 -1
- package/dist/server/ws-limits.d.ts +0 -2
- package/dist/server/ws-limits.d.ts.map +0 -1
- package/dist/server/ws-limits.js +0 -12
- package/dist/server/ws-limits.js.map +0 -1
- package/dist/server/ws-protocol.d.ts +0 -858
- package/dist/server/ws-protocol.d.ts.map +0 -1
- package/dist/server/ws-protocol.js +0 -417
- package/dist/server/ws-protocol.js.map +0 -1
- package/dist/server/ws-server.d.ts +0 -26
- package/dist/server/ws-server.d.ts.map +0 -1
- package/dist/server/ws-server.js +0 -314
- package/dist/server/ws-server.js.map +0 -1
- package/dist/server/ws-session-command-handlers.d.ts +0 -29
- package/dist/server/ws-session-command-handlers.d.ts.map +0 -1
- package/dist/server/ws-session-command-handlers.js +0 -320
- package/dist/server/ws-session-command-handlers.js.map +0 -1
- package/dist/server/ws-workflow-command-handlers.d.ts +0 -17
- package/dist/server/ws-workflow-command-handlers.d.ts.map +0 -1
- package/dist/server/ws-workflow-command-handlers.js +0 -68
- package/dist/server/ws-workflow-command-handlers.js.map +0 -1
- package/dist/session-enrichment/git.d.ts +0 -9
- package/dist/session-enrichment/git.d.ts.map +0 -1
- package/dist/session-enrichment/git.js +0 -48
- package/dist/session-enrichment/git.js.map +0 -1
- package/dist/startup-agents.d.ts +0 -6
- package/dist/startup-agents.d.ts.map +0 -1
- package/dist/startup-agents.js +0 -102
- package/dist/startup-agents.js.map +0 -1
- package/dist/startup-prereqs.d.ts +0 -29
- package/dist/startup-prereqs.d.ts.map +0 -1
- package/dist/startup-prereqs.js +0 -209
- package/dist/startup-prereqs.js.map +0 -1
- package/dist/startup-relay-security.d.ts +0 -3
- package/dist/startup-relay-security.d.ts.map +0 -1
- package/dist/startup-relay-security.js +0 -61
- package/dist/startup-relay-security.js.map +0 -1
- package/dist/startup-session-persistence.d.ts +0 -7
- package/dist/startup-session-persistence.d.ts.map +0 -1
- package/dist/startup-session-persistence.js +0 -72
- package/dist/startup-session-persistence.js.map +0 -1
- package/dist/startup-watchers.d.ts +0 -7
- package/dist/startup-watchers.d.ts.map +0 -1
- package/dist/startup-watchers.js +0 -196
- package/dist/startup-watchers.js.map +0 -1
- package/dist/startup.d.ts +0 -29
- package/dist/startup.d.ts.map +0 -1
- package/dist/startup.js +0 -549
- package/dist/startup.js.map +0 -1
- package/dist/tracking/git-tracker.d.ts +0 -56
- package/dist/tracking/git-tracker.d.ts.map +0 -1
- package/dist/tracking/git-tracker.js +0 -342
- package/dist/tracking/git-tracker.js.map +0 -1
- package/dist/tracking/noop-tracker.d.ts +0 -27
- package/dist/tracking/noop-tracker.d.ts.map +0 -1
- package/dist/tracking/noop-tracker.js +0 -42
- package/dist/tracking/noop-tracker.js.map +0 -1
- package/dist/workflows/action-adapters.d.ts +0 -10
- package/dist/workflows/action-adapters.d.ts.map +0 -1
- package/dist/workflows/action-adapters.js +0 -203
- package/dist/workflows/action-adapters.js.map +0 -1
- package/dist/workflows/action-digest.d.ts +0 -8
- package/dist/workflows/action-digest.d.ts.map +0 -1
- package/dist/workflows/action-digest.js +0 -36
- package/dist/workflows/action-digest.js.map +0 -1
- package/dist/workflows/action-execution-ledger.d.ts +0 -8
- package/dist/workflows/action-execution-ledger.d.ts.map +0 -1
- package/dist/workflows/action-execution-ledger.js +0 -64
- package/dist/workflows/action-execution-ledger.js.map +0 -1
- package/dist/workflows/action-policy.d.ts +0 -3
- package/dist/workflows/action-policy.d.ts.map +0 -1
- package/dist/workflows/action-policy.js +0 -13
- package/dist/workflows/action-policy.js.map +0 -1
- package/dist/workflows/action-provider-adapters.d.ts +0 -17
- package/dist/workflows/action-provider-adapters.d.ts.map +0 -1
- package/dist/workflows/action-provider-adapters.js +0 -674
- package/dist/workflows/action-provider-adapters.js.map +0 -1
- package/dist/workflows/action-provider-utils.d.ts +0 -25
- package/dist/workflows/action-provider-utils.d.ts.map +0 -1
- package/dist/workflows/action-provider-utils.js +0 -121
- package/dist/workflows/action-provider-utils.js.map +0 -1
- package/dist/workflows/approval-actor.d.ts +0 -6
- package/dist/workflows/approval-actor.d.ts.map +0 -1
- package/dist/workflows/approval-actor.js +0 -27
- package/dist/workflows/approval-actor.js.map +0 -1
- package/dist/workflows/approval-on-reject.d.ts +0 -17
- package/dist/workflows/approval-on-reject.d.ts.map +0 -1
- package/dist/workflows/approval-on-reject.js +0 -64
- package/dist/workflows/approval-on-reject.js.map +0 -1
- package/dist/workflows/artifact-collector.d.ts +0 -11
- package/dist/workflows/artifact-collector.d.ts.map +0 -1
- package/dist/workflows/artifact-collector.js +0 -59
- package/dist/workflows/artifact-collector.js.map +0 -1
- package/dist/workflows/checkout-node.d.ts +0 -22
- package/dist/workflows/checkout-node.d.ts.map +0 -1
- package/dist/workflows/checkout-node.js +0 -201
- package/dist/workflows/checkout-node.js.map +0 -1
- package/dist/workflows/context-node-resolver.d.ts +0 -51
- package/dist/workflows/context-node-resolver.d.ts.map +0 -1
- package/dist/workflows/context-node-resolver.js +0 -932
- package/dist/workflows/context-node-resolver.js.map +0 -1
- package/dist/workflows/context-update-targets.d.ts +0 -12
- package/dist/workflows/context-update-targets.d.ts.map +0 -1
- package/dist/workflows/context-update-targets.js +0 -52
- package/dist/workflows/context-update-targets.js.map +0 -1
- package/dist/workflows/contract-binding.d.ts +0 -3
- package/dist/workflows/contract-binding.d.ts.map +0 -1
- package/dist/workflows/contract-binding.js +0 -19
- package/dist/workflows/contract-binding.js.map +0 -1
- package/dist/workflows/daemon-session.d.ts +0 -47
- package/dist/workflows/daemon-session.d.ts.map +0 -1
- package/dist/workflows/daemon-session.js +0 -320
- package/dist/workflows/daemon-session.js.map +0 -1
- package/dist/workflows/event-types.d.ts +0 -10
- package/dist/workflows/event-types.d.ts.map +0 -1
- package/dist/workflows/event-types.js +0 -2
- package/dist/workflows/event-types.js.map +0 -1
- package/dist/workflows/expression.d.ts +0 -81
- package/dist/workflows/expression.d.ts.map +0 -1
- package/dist/workflows/expression.js +0 -149
- package/dist/workflows/expression.js.map +0 -1
- package/dist/workflows/git-publish-node.d.ts +0 -43
- package/dist/workflows/git-publish-node.d.ts.map +0 -1
- package/dist/workflows/git-publish-node.js +0 -322
- package/dist/workflows/git-publish-node.js.map +0 -1
- package/dist/workflows/hook-registry.d.ts +0 -24
- package/dist/workflows/hook-registry.d.ts.map +0 -1
- package/dist/workflows/hook-registry.js +0 -52
- package/dist/workflows/hook-registry.js.map +0 -1
- package/dist/workflows/hook-types.d.ts +0 -21
- package/dist/workflows/hook-types.d.ts.map +0 -1
- package/dist/workflows/hook-types.js +0 -2
- package/dist/workflows/hook-types.js.map +0 -1
- package/dist/workflows/inline-agent-types.d.ts +0 -28
- package/dist/workflows/inline-agent-types.d.ts.map +0 -1
- package/dist/workflows/inline-agent-types.js +0 -2
- package/dist/workflows/inline-agent-types.js.map +0 -1
- package/dist/workflows/inline-agents.d.ts +0 -8
- package/dist/workflows/inline-agents.d.ts.map +0 -1
- package/dist/workflows/inline-agents.js +0 -108
- package/dist/workflows/inline-agents.js.map +0 -1
- package/dist/workflows/loop-executor.d.ts +0 -17
- package/dist/workflows/loop-executor.d.ts.map +0 -1
- package/dist/workflows/loop-executor.js +0 -175
- package/dist/workflows/loop-executor.js.map +0 -1
- package/dist/workflows/node-executor.d.ts +0 -31
- package/dist/workflows/node-executor.d.ts.map +0 -1
- package/dist/workflows/node-executor.js +0 -405
- package/dist/workflows/node-executor.js.map +0 -1
- package/dist/workflows/node-registry.d.ts +0 -42
- package/dist/workflows/node-registry.d.ts.map +0 -1
- package/dist/workflows/node-registry.js +0 -931
- package/dist/workflows/node-registry.js.map +0 -1
- package/dist/workflows/parser.d.ts +0 -17
- package/dist/workflows/parser.d.ts.map +0 -1
- package/dist/workflows/parser.js +0 -361
- package/dist/workflows/parser.js.map +0 -1
- package/dist/workflows/platform-command-applier.d.ts +0 -17
- package/dist/workflows/platform-command-applier.d.ts.map +0 -1
- package/dist/workflows/platform-command-applier.js +0 -264
- package/dist/workflows/platform-command-applier.js.map +0 -1
- package/dist/workflows/platform-context-client.d.ts +0 -59
- package/dist/workflows/platform-context-client.d.ts.map +0 -1
- package/dist/workflows/platform-context-client.internal.d.ts +0 -23
- package/dist/workflows/platform-context-client.internal.d.ts.map +0 -1
- package/dist/workflows/platform-context-client.internal.js +0 -124
- package/dist/workflows/platform-context-client.internal.js.map +0 -1
- package/dist/workflows/platform-context-client.js +0 -272
- package/dist/workflows/platform-context-client.js.map +0 -1
- package/dist/workflows/platform-context-client.types.d.ts +0 -41
- package/dist/workflows/platform-context-client.types.d.ts.map +0 -1
- package/dist/workflows/platform-context-client.types.js +0 -2
- package/dist/workflows/platform-context-client.types.js.map +0 -1
- package/dist/workflows/platform-runtime-command.d.ts +0 -40
- package/dist/workflows/platform-runtime-command.d.ts.map +0 -1
- package/dist/workflows/platform-runtime-command.js +0 -104
- package/dist/workflows/platform-runtime-command.js.map +0 -1
- package/dist/workflows/platform-sync-format.d.ts +0 -12
- package/dist/workflows/platform-sync-format.d.ts.map +0 -1
- package/dist/workflows/platform-sync-format.js +0 -60
- package/dist/workflows/platform-sync-format.js.map +0 -1
- package/dist/workflows/platform-sync-payload.d.ts +0 -9
- package/dist/workflows/platform-sync-payload.d.ts.map +0 -1
- package/dist/workflows/platform-sync-payload.js +0 -504
- package/dist/workflows/platform-sync-payload.js.map +0 -1
- package/dist/workflows/platform-sync.d.ts +0 -37
- package/dist/workflows/platform-sync.d.ts.map +0 -1
- package/dist/workflows/platform-sync.js +0 -243
- package/dist/workflows/platform-sync.js.map +0 -1
- package/dist/workflows/plugin-loader.d.ts +0 -28
- package/dist/workflows/plugin-loader.d.ts.map +0 -1
- package/dist/workflows/plugin-loader.js +0 -143
- package/dist/workflows/plugin-loader.js.map +0 -1
- package/dist/workflows/policy-enforcement.d.ts +0 -43
- package/dist/workflows/policy-enforcement.d.ts.map +0 -1
- package/dist/workflows/policy-enforcement.js +0 -0
- package/dist/workflows/policy-enforcement.js.map +0 -1
- package/dist/workflows/preflight.d.ts +0 -9
- package/dist/workflows/preflight.d.ts.map +0 -1
- package/dist/workflows/preflight.js +0 -171
- package/dist/workflows/preflight.js.map +0 -1
- package/dist/workflows/prompt-output.d.ts +0 -10
- package/dist/workflows/prompt-output.d.ts.map +0 -1
- package/dist/workflows/prompt-output.js +0 -93
- package/dist/workflows/prompt-output.js.map +0 -1
- package/dist/workflows/provider-reconciliation.d.ts +0 -28
- package/dist/workflows/provider-reconciliation.d.ts.map +0 -1
- package/dist/workflows/provider-reconciliation.js +0 -218
- package/dist/workflows/provider-reconciliation.js.map +0 -1
- package/dist/workflows/retry-classifier.d.ts +0 -18
- package/dist/workflows/retry-classifier.d.ts.map +0 -1
- package/dist/workflows/retry-classifier.js +0 -30
- package/dist/workflows/retry-classifier.js.map +0 -1
- package/dist/workflows/review-packet.d.ts +0 -3
- package/dist/workflows/review-packet.d.ts.map +0 -1
- package/dist/workflows/review-packet.js +0 -155
- package/dist/workflows/review-packet.js.map +0 -1
- package/dist/workflows/run-preparation.d.ts +0 -24
- package/dist/workflows/run-preparation.d.ts.map +0 -1
- package/dist/workflows/run-preparation.js +0 -258
- package/dist/workflows/run-preparation.js.map +0 -1
- package/dist/workflows/run-types.d.ts +0 -261
- package/dist/workflows/run-types.d.ts.map +0 -1
- package/dist/workflows/run-types.js +0 -2
- package/dist/workflows/run-types.js.map +0 -1
- package/dist/workflows/runner-canceler.d.ts +0 -22
- package/dist/workflows/runner-canceler.d.ts.map +0 -1
- package/dist/workflows/runner-canceler.js +0 -91
- package/dist/workflows/runner-canceler.js.map +0 -1
- package/dist/workflows/runner-hook-events.d.ts +0 -19
- package/dist/workflows/runner-hook-events.d.ts.map +0 -1
- package/dist/workflows/runner-hook-events.js +0 -16
- package/dist/workflows/runner-hook-events.js.map +0 -1
- package/dist/workflows/runner-reconciler.d.ts +0 -19
- package/dist/workflows/runner-reconciler.d.ts.map +0 -1
- package/dist/workflows/runner-reconciler.js +0 -109
- package/dist/workflows/runner-reconciler.js.map +0 -1
- package/dist/workflows/runner-resumer.d.ts +0 -33
- package/dist/workflows/runner-resumer.d.ts.map +0 -1
- package/dist/workflows/runner-resumer.js +0 -81
- package/dist/workflows/runner-resumer.js.map +0 -1
- package/dist/workflows/runner-scheduler.d.ts +0 -38
- package/dist/workflows/runner-scheduler.d.ts.map +0 -1
- package/dist/workflows/runner-scheduler.js +0 -243
- package/dist/workflows/runner-scheduler.js.map +0 -1
- package/dist/workflows/runner-shared.d.ts +0 -21
- package/dist/workflows/runner-shared.d.ts.map +0 -1
- package/dist/workflows/runner-shared.js +0 -92
- package/dist/workflows/runner-shared.js.map +0 -1
- package/dist/workflows/runner.d.ts +0 -49
- package/dist/workflows/runner.d.ts.map +0 -1
- package/dist/workflows/runner.js +0 -661
- package/dist/workflows/runner.js.map +0 -1
- package/dist/workflows/runtime-helpers.d.ts +0 -60
- package/dist/workflows/runtime-helpers.d.ts.map +0 -1
- package/dist/workflows/runtime-helpers.js +0 -267
- package/dist/workflows/runtime-helpers.js.map +0 -1
- package/dist/workflows/session-completion.d.ts +0 -7
- package/dist/workflows/session-completion.d.ts.map +0 -1
- package/dist/workflows/session-completion.js +0 -117
- package/dist/workflows/session-completion.js.map +0 -1
- package/dist/workflows/session-links.d.ts +0 -21
- package/dist/workflows/session-links.d.ts.map +0 -1
- package/dist/workflows/session-links.js +0 -77
- package/dist/workflows/session-links.js.map +0 -1
- package/dist/workflows/session-output.d.ts +0 -30
- package/dist/workflows/session-output.d.ts.map +0 -1
- package/dist/workflows/session-output.js +0 -231
- package/dist/workflows/session-output.js.map +0 -1
- package/dist/workflows/session-policy.d.ts +0 -39
- package/dist/workflows/session-policy.d.ts.map +0 -1
- package/dist/workflows/session-policy.js +0 -93
- package/dist/workflows/session-policy.js.map +0 -1
- package/dist/workflows/shell-abort-registry.d.ts +0 -11
- package/dist/workflows/shell-abort-registry.d.ts.map +0 -1
- package/dist/workflows/shell-abort-registry.js +0 -35
- package/dist/workflows/shell-abort-registry.js.map +0 -1
- package/dist/workflows/store.d.ts +0 -14
- package/dist/workflows/store.d.ts.map +0 -1
- package/dist/workflows/store.js +0 -160
- package/dist/workflows/store.js.map +0 -1
- package/dist/workflows/structured-outputs.d.ts +0 -24
- package/dist/workflows/structured-outputs.d.ts.map +0 -1
- package/dist/workflows/structured-outputs.js +0 -174
- package/dist/workflows/structured-outputs.js.map +0 -1
- package/dist/workflows/subflow-executor.d.ts +0 -15
- package/dist/workflows/subflow-executor.d.ts.map +0 -1
- package/dist/workflows/subflow-executor.js +0 -181
- package/dist/workflows/subflow-executor.js.map +0 -1
- package/dist/workflows/trigger-rule.d.ts +0 -22
- package/dist/workflows/trigger-rule.d.ts.map +0 -1
- package/dist/workflows/trigger-rule.js +0 -57
- package/dist/workflows/trigger-rule.js.map +0 -1
- package/dist/workflows/types.d.ts +0 -418
- package/dist/workflows/types.d.ts.map +0 -1
- package/dist/workflows/types.js +0 -2
- package/dist/workflows/types.js.map +0 -1
- package/dist/workflows/workflow-authority-contract.d.ts +0 -25
- package/dist/workflows/workflow-authority-contract.d.ts.map +0 -1
- package/dist/workflows/workflow-authority-contract.js +0 -389
- package/dist/workflows/workflow-authority-contract.js.map +0 -1
- package/dist/workflows/workflow-executor-schema.d.ts +0 -51
- package/dist/workflows/workflow-executor-schema.d.ts.map +0 -1
- package/dist/workflows/workflow-executor-schema.js +0 -81
- package/dist/workflows/workflow-executor-schema.js.map +0 -1
- package/dist/workflows/workflow-production-schema.d.ts +0 -178
- package/dist/workflows/workflow-production-schema.d.ts.map +0 -1
- package/dist/workflows/workflow-production-schema.js +0 -202
- package/dist/workflows/workflow-production-schema.js.map +0 -1
- package/dist/workflows/workflow-production-types.d.ts +0 -123
- package/dist/workflows/workflow-production-types.d.ts.map +0 -1
- package/dist/workflows/workflow-production-types.js +0 -2
- package/dist/workflows/workflow-production-types.js.map +0 -1
- package/dist/workflows/workflow-schema-common.d.ts +0 -332
- package/dist/workflows/workflow-schema-common.d.ts.map +0 -1
- package/dist/workflows/workflow-schema-common.js +0 -135
- package/dist/workflows/workflow-schema-common.js.map +0 -1
- package/dist/workflows/workflow-schema.d.ts +0 -3037
- package/dist/workflows/workflow-schema.d.ts.map +0 -1
- package/dist/workflows/workflow-schema.js +0 -415
- package/dist/workflows/workflow-schema.js.map +0 -1
- package/dist/workflows/workflow-source.d.ts +0 -3
- package/dist/workflows/workflow-source.d.ts.map +0 -1
- package/dist/workflows/workflow-source.js +0 -29
- package/dist/workflows/workflow-source.js.map +0 -1
- package/docs/README.md +0 -18
- package/docs/configuration.md +0 -248
- package/docs/developer-workflows.md +0 -123
- package/docs/protocol-matrix.json +0 -375
- package/docs/protocol-pin.json +0 -5
- package/docs/releasing.md +0 -36
- package/docs/security.md +0 -49
- package/docs/test-vectors/relay-noise-v2.json +0 -42
- package/docs/test-vectors/relay-noise-v3.json +0 -51
- package/docs/testing.md +0 -112
- package/node_modules/@viewportai/context-engine/README.md +0 -33
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/README.md +0 -37
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/bundle-manifest.json +0 -50
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/erase-receipt.json +0 -10
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/event.json +0 -29
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/hpke-key-grant.json +0 -24
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/key-grant.json +0 -21
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/profile.json +0 -12
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/signed-event.json +0 -28
- package/node_modules/@viewportai/context-engine/fixtures/protocol-vectors/standalone-decoder.mjs +0 -124
- package/node_modules/@viewportai/context-engine/package.json +0 -11
- package/node_modules/@viewportai/context-engine/schemas/context_bundle_manifest_v1.schema.json +0 -134
- package/node_modules/@viewportai/context-engine/schemas/context_erase_receipt_v1.schema.json +0 -27
- package/node_modules/@viewportai/context-engine/schemas/context_event_v1.schema.json +0 -216
- package/node_modules/@viewportai/context-engine/schemas/context_key_grant_hpke_draft_01.schema.json +0 -27
- package/node_modules/@viewportai/context-engine/schemas/context_key_grant_v1.schema.json +0 -24
- package/node_modules/@viewportai/context-engine/schemas/context_profile_v1.schema.json +0 -24
- package/node_modules/@viewportai/context-engine/src/cli.js +0 -177
- package/node_modules/@viewportai/context-engine/src/crypto/canonical.js +0 -21
- package/node_modules/@viewportai/context-engine/src/crypto/envelope.js +0 -37
- package/node_modules/@viewportai/context-engine/src/crypto/hpke-grants.js +0 -298
- package/node_modules/@viewportai/context-engine/src/crypto/keys.js +0 -122
- package/node_modules/@viewportai/context-engine/src/crypto/signatures.js +0 -23
- package/node_modules/@viewportai/context-engine/src/index.js +0 -12
- package/node_modules/@viewportai/context-engine/src/protocol/schemas.js +0 -50
- package/node_modules/@viewportai/context-engine/src/repo/access-model.js +0 -170
- package/node_modules/@viewportai/context-engine/src/repo/bundles.js +0 -180
- package/node_modules/@viewportai/context-engine/src/repo/candidates.js +0 -207
- package/node_modules/@viewportai/context-engine/src/repo/devices.js +0 -141
- package/node_modules/@viewportai/context-engine/src/repo/events.js +0 -101
- package/node_modules/@viewportai/context-engine/src/repo/files.js +0 -33
- package/node_modules/@viewportai/context-engine/src/repo/identities.js +0 -132
- package/node_modules/@viewportai/context-engine/src/repo/key-store.js +0 -126
- package/node_modules/@viewportai/context-engine/src/repo/materializer.js +0 -314
- package/node_modules/@viewportai/context-engine/src/repo/membership.js +0 -192
- package/node_modules/@viewportai/context-engine/src/repo/paths.js +0 -25
- package/node_modules/@viewportai/context-engine/src/repo/profiles.js +0 -54
- package/node_modules/@viewportai/context-engine/src/repo/receipts.js +0 -68
- package/node_modules/@viewportai/context-engine/src/repo/sync.js +0 -163
- package/node_modules/@viewportai/context-engine/src/repo/users.js +0 -134
- package/node_modules/@viewportai/context-engine/src/repo/vault.js +0 -548
- package/node_modules/@viewportai/context-engine/src/store/local-semantic.js +0 -69
- package/node_modules/@viewportai/context-engine/src/store/search.js +0 -25
- package/node_modules/@viewportai/context-engine/src/store/sqlite.js +0 -76
- package/schemas/viewport-config-v1.schema.json +0 -213
- package/schemas/workflow-v1.schema.json +0 -510
|
@@ -0,0 +1,791 @@
|
|
|
1
|
+
import { j as Decision, A as Action, R as ResolvedBy, S as SessionEvent, b as SessionInfo, K as RunnerInfo, T as SessionEventInit, X as Status, M as MessageEvent } from './info-aU2-5A8G.js';
|
|
2
|
+
import { I as Identity } from './identity-CH_omX_I.js';
|
|
3
|
+
|
|
4
|
+
/** Time, injectable so tests are deterministic (FakeClock in `./testing`). */
|
|
5
|
+
interface Clock {
|
|
6
|
+
/** Milliseconds since the epoch. */
|
|
7
|
+
now(): number;
|
|
8
|
+
setTimeout(callback: () => void, ms: number): ClockTimer;
|
|
9
|
+
clearTimeout(timer: ClockTimer): void;
|
|
10
|
+
}
|
|
11
|
+
/** Opaque timer handle. */
|
|
12
|
+
interface ClockTimer {
|
|
13
|
+
readonly __timer?: never;
|
|
14
|
+
}
|
|
15
|
+
declare const systemClock: Clock;
|
|
16
|
+
|
|
17
|
+
type IdPrefix = "ses" | "apr" | "msg" | "off";
|
|
18
|
+
/** Produces `<prefix>_<ulid>` ids. Same shape as core's `IdGenerator`; injectable (SequentialIds in `./testing`). */
|
|
19
|
+
interface IdGenerator {
|
|
20
|
+
next(prefix: IdPrefix): string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Monotonic ULIDs (time-ordered, 80 random bits). Within one millisecond the random part increments, so ids from
|
|
24
|
+
* one generator always sort in creation order, which `sessions.list` relies on.
|
|
25
|
+
*/
|
|
26
|
+
declare function ulidIds(clock?: Clock): IdGenerator;
|
|
27
|
+
|
|
28
|
+
/** What a handler decides. `"ask"` hands the decision to the humans watching. */
|
|
29
|
+
type ApprovalEffect = Decision | "ask";
|
|
30
|
+
type ApprovalDecision = ApprovalEffect | {
|
|
31
|
+
effect: ApprovalEffect;
|
|
32
|
+
reason?: string;
|
|
33
|
+
updatedInput?: unknown;
|
|
34
|
+
};
|
|
35
|
+
interface ApprovalRequest {
|
|
36
|
+
sessionId: string;
|
|
37
|
+
approvalId: string;
|
|
38
|
+
action: Action;
|
|
39
|
+
reason?: string;
|
|
40
|
+
}
|
|
41
|
+
/** In-process approval policy. Runs before any human sees the request (wire 3.8 step 2). */
|
|
42
|
+
type ApprovalHandler = (request: ApprovalRequest, context: {
|
|
43
|
+
signal: AbortSignal;
|
|
44
|
+
}) => ApprovalDecision | Promise<ApprovalDecision>;
|
|
45
|
+
/** Anything with `evaluate(action)`, such as a Viewport HITL Gate. Duck-typed: the daemon never imports HITL. */
|
|
46
|
+
interface ApprovalEvaluator {
|
|
47
|
+
evaluate(action: Action): {
|
|
48
|
+
effect: ApprovalEffect;
|
|
49
|
+
reason?: string;
|
|
50
|
+
} | Promise<{
|
|
51
|
+
effect: ApprovalEffect;
|
|
52
|
+
reason?: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
type ApprovalPolicy = ApprovalHandler | ApprovalEvaluator;
|
|
56
|
+
/** The final decision a runner receives. */
|
|
57
|
+
interface ApprovalOutcome {
|
|
58
|
+
approvalId: string;
|
|
59
|
+
decision: Decision;
|
|
60
|
+
resolvedBy: ResolvedBy;
|
|
61
|
+
reason?: string;
|
|
62
|
+
updatedInput?: unknown;
|
|
63
|
+
actor?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Child environment scrubbing (wire 7). Two policies:
|
|
68
|
+
*
|
|
69
|
+
* - `inherit: "all"` (the library default): children inherit the daemon's environment, so agents keep whatever
|
|
70
|
+
* credentials it holds (ANTHROPIC_API_KEY, but also AWS_*, GITHUB_TOKEN and anything else exported where it started).
|
|
71
|
+
* - `inherit: "minimal"` (the `viewport-daemon` CLI default): children get only {@link MINIMAL_ENV_KEYS}, `LC_*`,
|
|
72
|
+
* the names in `allow`, and the variables their own runner asks for (`Runner.preflight` `env`: claude-code's auth).
|
|
73
|
+
*
|
|
74
|
+
* Under both, everything that belongs to Viewport is dropped: every `VIEWPORT_*` variable, and any variable whose value
|
|
75
|
+
* contains a known daemon secret such as the relay token, whatever it is named. Containment, not equality:
|
|
76
|
+
* `Authorization=Bearer <token>`, `URL=wss://relay/?t=<token>` or a JSON blob holding the token are dropped too. This
|
|
77
|
+
* fails toward dropping: a short secret registered with `addSecret` drops every variable that happens to contain it.
|
|
78
|
+
*/
|
|
79
|
+
interface EnvPolicy {
|
|
80
|
+
/**
|
|
81
|
+
* `"all"` (default) inherits the daemon's environment; `"minimal"` keeps only {@link MINIMAL_ENV_KEYS}, `LC_*` and
|
|
82
|
+
* `allow`. The CLI defaults to `"minimal"`.
|
|
83
|
+
*/
|
|
84
|
+
inherit?: "all" | "minimal";
|
|
85
|
+
/** Under `"minimal"`: also keep these variables (exact names). `VIEWPORT_*` and secret-holding values still drop. */
|
|
86
|
+
allow?: readonly string[];
|
|
87
|
+
/** Extra names or patterns to drop. `VIEWPORT_*` is always dropped. */
|
|
88
|
+
drop?: readonly (string | RegExp)[];
|
|
89
|
+
/** Secret values: any variable whose value contains one of these is dropped. `serve()` adds the local token and `connectRelay()` the relay tokens (`Supervisor.addSecret`). */
|
|
90
|
+
secrets?: readonly string[];
|
|
91
|
+
/** Set after scrubbing (before the per-session `env`). */
|
|
92
|
+
set?: Readonly<Record<string, string>>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* What `inherit: "minimal"` keeps, besides every `LC_*` locale variable: enough to find binaries, a home, a user, a
|
|
96
|
+
* locale, a time zone, a terminal and the system's TLS trust settings. No credentials.
|
|
97
|
+
*/
|
|
98
|
+
declare const MINIMAL_ENV_KEYS: readonly ["PATH", "HOME", "USER", "LOGNAME", "SHELL", "TMPDIR", "TEMP", "TMP", "LANG", "LANGUAGE", "LC_ALL", "TZ", "TERM", "COLORTERM", "SSH_AUTH_SOCK", "DISPLAY", "XDG_RUNTIME_DIR", "NODE_EXTRA_CA_CERTS", "SSL_CERT_FILE", "SSL_CERT_DIR", "SystemRoot", "ComSpec", "PATHEXT"];
|
|
99
|
+
|
|
100
|
+
declare const TRAJECTORY_SCHEMA = "https://getviewport.com/schemas/trajectory/v1.json";
|
|
101
|
+
/** A trajectory/v1 document, the shape Viewport packages share for agent runs. Events are plain JSON. */
|
|
102
|
+
interface Trajectory {
|
|
103
|
+
$schema: typeof TRAJECTORY_SCHEMA;
|
|
104
|
+
id: string;
|
|
105
|
+
started_at: string;
|
|
106
|
+
latency_ms?: number;
|
|
107
|
+
input?: unknown;
|
|
108
|
+
output?: unknown;
|
|
109
|
+
error: {
|
|
110
|
+
type: string;
|
|
111
|
+
message: string;
|
|
112
|
+
} | null;
|
|
113
|
+
attributes: Record<string, unknown>;
|
|
114
|
+
events: Record<string, unknown>[];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Convert a session's events to a trajectory/v1 document. Message, tool and model events keep their field names;
|
|
118
|
+
* `tool_call` status changes merge into one event per `call_id`; approvals become trajectory `approval` events.
|
|
119
|
+
* Terminal output, status and exit events are not part of a trajectory.
|
|
120
|
+
*/
|
|
121
|
+
declare function toTrajectory(events: readonly SessionEvent[], options?: {
|
|
122
|
+
info?: SessionInfo;
|
|
123
|
+
input?: unknown;
|
|
124
|
+
}): Trajectory;
|
|
125
|
+
|
|
126
|
+
/** Structured logging. Silent by default; pass any object with these methods (pino, console). */
|
|
127
|
+
interface Logger {
|
|
128
|
+
debug(message: string, fields?: Record<string, unknown>): void;
|
|
129
|
+
info(message: string, fields?: Record<string, unknown>): void;
|
|
130
|
+
warn(message: string, fields?: Record<string, unknown>): void;
|
|
131
|
+
error(message: string, fields?: Record<string, unknown>): void;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
type ExitLabel = {
|
|
135
|
+
exitCode: number | null;
|
|
136
|
+
signal: string | null;
|
|
137
|
+
};
|
|
138
|
+
type ProbeResult = {
|
|
139
|
+
ok: true;
|
|
140
|
+
bwrap?: string;
|
|
141
|
+
} | {
|
|
142
|
+
ok: false;
|
|
143
|
+
reason: string;
|
|
144
|
+
};
|
|
145
|
+
interface LinuxProbeOptions {
|
|
146
|
+
bwrap?: string;
|
|
147
|
+
path?: string | undefined;
|
|
148
|
+
run?: (command: string, args: string[]) => {
|
|
149
|
+
status: number | null;
|
|
150
|
+
stderr: string;
|
|
151
|
+
error?: Error | undefined;
|
|
152
|
+
};
|
|
153
|
+
exists?: (p: string) => boolean;
|
|
154
|
+
read?: (p: string) => string | undefined;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/** A path children may write: a directory tree, or every path starting with `prefix` (files written atomically). */
|
|
158
|
+
type WritablePath = string | {
|
|
159
|
+
prefix: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/** `hello.child_isolation` (wire 7). */
|
|
163
|
+
type ChildIsolation = "home" | "none";
|
|
164
|
+
/** The configurable part of the sandbox (wire 7: "extensible in config"). */
|
|
165
|
+
interface SandboxConfig {
|
|
166
|
+
/** Default `"home"`. `"none"` runs children unsandboxed, and `hello` says so. */
|
|
167
|
+
childIsolation?: ChildIsolation;
|
|
168
|
+
/** More paths children may neither read nor write (added to the built-in list, never replacing it). */
|
|
169
|
+
denyRead?: readonly string[];
|
|
170
|
+
/**
|
|
171
|
+
* More paths children may write. Owner config only (no request sets it). Each entry is logged as a warning at
|
|
172
|
+
* startup: code written here may run outside the sandbox later. Caches are code.
|
|
173
|
+
*/
|
|
174
|
+
allowWrite?: readonly string[];
|
|
175
|
+
/**
|
|
176
|
+
* Session cwds allowed although they sit in a home dot-dir, ~/Library, a toolchain root or a system location
|
|
177
|
+
* (refused by default). Deny and protected roots are refused whatever this says.
|
|
178
|
+
*/
|
|
179
|
+
allowCwd?: readonly string[];
|
|
180
|
+
/**
|
|
181
|
+
* `host` (default): children use the network as you do. `none`: no network. On Linux a new network namespace
|
|
182
|
+
* (also closing abstract unix sockets); on macOS every IP connection is denied, localhost included, while the
|
|
183
|
+
* unix-socket allowlist (DNS, ssh-agent) still works. claude-code needs the network for the model API.
|
|
184
|
+
*/
|
|
185
|
+
network?: "host" | "none";
|
|
186
|
+
/**
|
|
187
|
+
* More TCP ports children may not listen on, beyond the Console's default 7071 (the daemon adds the configured
|
|
188
|
+
* Console URL's port). macOS only: Linux children share the host network unless `network` is `none`. A child
|
|
189
|
+
* listening where you open a pair link would read its secret.
|
|
190
|
+
*/
|
|
191
|
+
denyListen?: readonly number[];
|
|
192
|
+
/** Also deny `~/.ssh`, cloud CLI configs and other tool credentials ({@link CREDENTIAL_PATHS}). Default `false`. */
|
|
193
|
+
denyCredentials?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* More unix sockets (or directories of them) children may connect to, beyond the built-in list in
|
|
196
|
+
* `src/sandbox/allowlist.ts` and `$SSH_AUTH_SOCK`. Every other socket is refused.
|
|
197
|
+
*/
|
|
198
|
+
allowUnixSockets?: readonly string[];
|
|
199
|
+
/**
|
|
200
|
+
* macOS: more Mach services children may look up (exact global names), beyond the built-in list in
|
|
201
|
+
* `src/sandbox/allowlist.ts`. Every other lookup is refused.
|
|
202
|
+
*/
|
|
203
|
+
allowMachServices?: readonly string[];
|
|
204
|
+
/**
|
|
205
|
+
* macOS: more directories children may run executables from, beyond the built-in roots in
|
|
206
|
+
* `src/sandbox/allowlist.ts`, the daemon's PATH, the session cwd and temp.
|
|
207
|
+
*/
|
|
208
|
+
allowExec?: readonly string[];
|
|
209
|
+
}
|
|
210
|
+
interface SandboxOptions extends SandboxConfig {
|
|
211
|
+
/**
|
|
212
|
+
* Every daemon home in the user's registry (`src/sandbox/daemon-homes.ts`), denied like the daemon's own. The
|
|
213
|
+
* supervisor re-reads the registry at each session start and rebuilds the sandbox when it changed.
|
|
214
|
+
*/
|
|
215
|
+
daemonHomes?: readonly string[];
|
|
216
|
+
/** The registry those homes come from: denied to children too. */
|
|
217
|
+
daemonHomesDir?: string;
|
|
218
|
+
/** The daemon's home (the supervisor's `home`). */
|
|
219
|
+
daemonHome?: string | undefined;
|
|
220
|
+
/** The daemon's environment: `HOME`, `VIEWPORT_HOME`, `VIEWPORT_CONSOLE_HOME`, `XDG_CONFIG_HOME`, `TMPDIR`, `PATH`. */
|
|
221
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
222
|
+
/** Injectable for tests. */
|
|
223
|
+
platform?: NodeJS.Platform;
|
|
224
|
+
/** Home directories whose profile roots are denied. Default: `$HOME` and the account's home. */
|
|
225
|
+
homes?: readonly string[];
|
|
226
|
+
/** Injectable for tests: the backend check. Default: run the backend once with an empty policy. */
|
|
227
|
+
probe?: () => ProbeResult;
|
|
228
|
+
/** Injectable for tests. */
|
|
229
|
+
realpath?: (p: string) => string;
|
|
230
|
+
/** Injectable for tests (Linux). */
|
|
231
|
+
linux?: LinuxProbeOptions;
|
|
232
|
+
/** Injectable for tests (Linux): the Node binary that runs the exit-status relay. Default `process.execPath`. */
|
|
233
|
+
node?: string;
|
|
234
|
+
/** Injectable for tests: the CPU whose platform packages the dependency closure keeps. Default `process.arch`. */
|
|
235
|
+
arch?: string;
|
|
236
|
+
/** Injectable for tests: trees never writable besides the persistence list. Default: {@link installRoots}. */
|
|
237
|
+
install?: readonly string[];
|
|
238
|
+
/**
|
|
239
|
+
* Injectable for tests: the daemon's own package root ({@link packageRoot} of this module by default), or `null`
|
|
240
|
+
* for none. Its code paths (PACKAGE_CODE_PATHS) are never writable; the whole root is not writable and is no
|
|
241
|
+
* session cwd unless `allowCwd` lists it.
|
|
242
|
+
*/
|
|
243
|
+
packageRoot?: string | null;
|
|
244
|
+
/** Injectable for tests (macOS): the python3 for the kernel sweep; `null` forces the best-effort sweep. */
|
|
245
|
+
sweepHelper?: string | null;
|
|
246
|
+
/** Where an aborted stop sweep is reported (error level). */
|
|
247
|
+
logger?: Logger;
|
|
248
|
+
}
|
|
249
|
+
/** A runner's own state on disk: writable in addition to `cwd` and temp. */
|
|
250
|
+
interface RunnerState {
|
|
251
|
+
writable?: readonly WritablePath[];
|
|
252
|
+
/** Files inside a writable tree that stay read-only. A symlink's own path and its target are both protected. */
|
|
253
|
+
readOnly?: readonly string[];
|
|
254
|
+
/** Set in the child's environment after the session's own `env`, so a session cannot move the state. */
|
|
255
|
+
env?: Readonly<Record<string, string>>;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Where a runner keeps its state, from the daemon's own home and environment. Never from the session's `env`: a
|
|
259
|
+
* controller could otherwise point `CLAUDE_CONFIG_DIR` at `~/Library/LaunchAgents` and make it writable. It may
|
|
260
|
+
* create and seed the directories it returns; it runs once per spawn.
|
|
261
|
+
*/
|
|
262
|
+
type RunnerStateFn = (daemon: {
|
|
263
|
+
home: string;
|
|
264
|
+
env: Readonly<Record<string, string | undefined>>;
|
|
265
|
+
platform: NodeJS.Platform;
|
|
266
|
+
/** The supervisor's home, if any (for per-daemon state). */
|
|
267
|
+
daemonHome: string | undefined;
|
|
268
|
+
/** Real paths children may neither read nor write: never copy anything from under them into runner state. */
|
|
269
|
+
denied: readonly string[];
|
|
270
|
+
}) => RunnerState;
|
|
271
|
+
/** One spawn, before wrapping. */
|
|
272
|
+
interface WrapSpec {
|
|
273
|
+
command: string;
|
|
274
|
+
args: readonly string[];
|
|
275
|
+
env: Record<string, string>;
|
|
276
|
+
cwd: string;
|
|
277
|
+
state?: RunnerStateFn;
|
|
278
|
+
/**
|
|
279
|
+
* A terminal session: the command is spawned in a new pty (node-pty), which becomes its controlling terminal.
|
|
280
|
+
* macOS keeps that one pty, and `/dev/tty`, usable; every other terminal device stays denied. Pipe sessions and the
|
|
281
|
+
* Claude Code spawn get no terminal device at all.
|
|
282
|
+
*/
|
|
283
|
+
terminal?: boolean;
|
|
284
|
+
}
|
|
285
|
+
interface Wrapped {
|
|
286
|
+
command: string;
|
|
287
|
+
args: string[];
|
|
288
|
+
env: Record<string, string>;
|
|
289
|
+
/**
|
|
290
|
+
* After the process ended: the command's real exit code and signal when the launcher can know them better than
|
|
291
|
+
* the process's own status (bwrap turns a signal death into 128+N). Undefined means use the process's status.
|
|
292
|
+
*/
|
|
293
|
+
/**
|
|
294
|
+
* After the process ended: its exit as the daemon should report it, given its own status and the signals the
|
|
295
|
+
* daemon sent it (bwrap folds a signal death into 128+N; the relay reports the real end). ADVISORY: the command
|
|
296
|
+
* can misreport its end, as it can choose its exit code; never branch on it for policy.
|
|
297
|
+
*/
|
|
298
|
+
resolveExit?: (raw: ExitLabel, sent: ReadonlySet<string>) => Promise<ExitLabel>;
|
|
299
|
+
/** Drop per-spawn state (the relay's status file) when the spawn failed. Idempotent. */
|
|
300
|
+
release?: () => void;
|
|
301
|
+
/**
|
|
302
|
+
* macOS: SIGKILL every process still running in this spawn's sandbox, wherever it went (double fork, setsid,
|
|
303
|
+
* reparented to launchd). Runners call it after stop's grace. Resolves to how many were killed.
|
|
304
|
+
*/
|
|
305
|
+
sweep?: () => Promise<number>;
|
|
306
|
+
/** macOS: drop the spawn's marker once the process ended and any sweep ran. Idempotent. */
|
|
307
|
+
dispose?: () => void;
|
|
308
|
+
/** macOS without the kernel sweep: the runner reports the spawned pid, so its descendants are remembered. */
|
|
309
|
+
watch?: (pid: number) => void;
|
|
310
|
+
}
|
|
311
|
+
interface Sandbox {
|
|
312
|
+
/** The configured mode. */
|
|
313
|
+
readonly mode: ChildIsolation;
|
|
314
|
+
/** `"home"` and a working backend, or `"none"`. When false, {@link wrap} throws `daemon.runner_unavailable`. */
|
|
315
|
+
readonly available: boolean;
|
|
316
|
+
/** Why it is unavailable, naming the one-command fix. */
|
|
317
|
+
readonly reason?: string;
|
|
318
|
+
readonly backend: "sandbox-exec" | "bwrap" | "none";
|
|
319
|
+
/** Real paths children can neither read nor write. */
|
|
320
|
+
readonly denied: readonly string[];
|
|
321
|
+
/** Real paths children can never write (persistence locations, the daemon's install), whatever the cwd. */
|
|
322
|
+
readonly protected: readonly string[];
|
|
323
|
+
/**
|
|
324
|
+
* How stop reaches processes that left the spawn's process group: `namespace` (Linux: bwrap's PID namespace),
|
|
325
|
+
* `kernel` (macOS: sandbox_check attribution), `process-tree` (macOS fallback, best effort) or `none`.
|
|
326
|
+
*/
|
|
327
|
+
readonly stopSweep: StopSweep;
|
|
328
|
+
/**
|
|
329
|
+
* Throws `daemon.invalid_request` for a session cwd that would make the policy meaningless: `/`, a home
|
|
330
|
+
* directory, anything inside a denied or protected root, or an ancestor of one.
|
|
331
|
+
*/
|
|
332
|
+
checkCwd(cwd: string): void;
|
|
333
|
+
/** The spawn to run instead. Identity when the mode is `"none"`. */
|
|
334
|
+
wrap(spec: WrapSpec): Wrapped;
|
|
335
|
+
}
|
|
336
|
+
type StopSweep = "namespace" | "kernel" | "process-tree" | "none";
|
|
337
|
+
|
|
338
|
+
/** Options of the `claude-code` runner (Claude Agent SDK). */
|
|
339
|
+
interface ClaudeCodeOptions {
|
|
340
|
+
/** Stay open for more input after each turn. Default: one turn when a prompt is given, interactive without one. */
|
|
341
|
+
interactive?: boolean;
|
|
342
|
+
/** Continue an existing Claude Code session by its id (`agent_session_id`). */
|
|
343
|
+
resume?: string;
|
|
344
|
+
/**
|
|
345
|
+
* The SDK permission mode. Default: `default`, which asks before edits and commands, so they reach the daemon's
|
|
346
|
+
* approvals; settings files never pick the mode. Any other mode is the in-process controller's choice (the wire
|
|
347
|
+
* cannot set it): `acceptEdits` runs edits without asking and `bypassPermissions` never asks, so no approval ever
|
|
348
|
+
* reaches the daemon.
|
|
349
|
+
*/
|
|
350
|
+
permissionMode?: "default" | "acceptEdits" | "plan" | "bypassPermissions" | "dontAsk" | "auto";
|
|
351
|
+
/** Tools that run without asking. Also lets allow rules from the seeded user settings apply again (see index.ts). */
|
|
352
|
+
allowedTools?: string[];
|
|
353
|
+
/** Tools the agent may not use at all. */
|
|
354
|
+
disallowedTools?: string[];
|
|
355
|
+
/** Replaces the default system prompt. */
|
|
356
|
+
systemPrompt?: string;
|
|
357
|
+
maxTurns?: number;
|
|
358
|
+
maxBudgetUsd?: number;
|
|
359
|
+
/** A Claude Code executable to use instead of the one bundled with the SDK. */
|
|
360
|
+
executable?: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/** Options of the `command` runner. */
|
|
364
|
+
interface CommandOptions {
|
|
365
|
+
/** The program. Resolved through `PATH`. */
|
|
366
|
+
command: string;
|
|
367
|
+
args?: string[];
|
|
368
|
+
/** A real terminal (PTY) when `node-pty` is installed. Default `true`; `false` uses pipes. */
|
|
369
|
+
terminal?: boolean;
|
|
370
|
+
cols?: number;
|
|
371
|
+
rows?: number;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Per-runner start options, keyed by runner name. Custom runners add themselves by declaration merging:
|
|
376
|
+
*
|
|
377
|
+
* declare module "@viewportai/daemon" { interface RunnerOptions { agent: { persona: string } } }
|
|
378
|
+
*/
|
|
379
|
+
interface RunnerOptions {
|
|
380
|
+
command: CommandOptions;
|
|
381
|
+
"claude-code": ClaudeCodeOptions;
|
|
382
|
+
}
|
|
383
|
+
/** Options every runner accepts. */
|
|
384
|
+
interface CommonStartOptions {
|
|
385
|
+
/** Working directory. Defaults to `process.cwd()`. */
|
|
386
|
+
cwd?: string;
|
|
387
|
+
prompt?: string;
|
|
388
|
+
name?: string;
|
|
389
|
+
model?: string;
|
|
390
|
+
/** Merged over the scrubbed child environment (wire 7). */
|
|
391
|
+
env?: Record<string, string>;
|
|
392
|
+
/** Same key and same intent returns the same session; a different intent is `daemon.idempotency_conflict`. */
|
|
393
|
+
idempotencyKey?: string;
|
|
394
|
+
/** A label for multi-tenant viewers (wire 3.3): stored, listed and filtered on, never an isolation boundary. */
|
|
395
|
+
tenant?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Free-form data stored on `SessionInfo.attributes` (library only, not settable over the wire). Shaped like the
|
|
398
|
+
* rest of `SessionInfo` on the wire (wire 3.6 "Size"): dropped with `attributes_truncated` when too large.
|
|
399
|
+
*/
|
|
400
|
+
attributes?: Record<string, unknown>;
|
|
401
|
+
/** Mirror output to this process and forward its stdin. For `run()` and the CLI. */
|
|
402
|
+
stdio?: "inherit";
|
|
403
|
+
}
|
|
404
|
+
/** What a runner receives in `start`. */
|
|
405
|
+
interface RunnerStartSpec<O = Record<string, unknown>> {
|
|
406
|
+
sessionId: string;
|
|
407
|
+
cwd: string;
|
|
408
|
+
prompt?: string;
|
|
409
|
+
model?: string;
|
|
410
|
+
/** The runner-specific options (`command`, `args`, `terminal`, ...). */
|
|
411
|
+
options: O;
|
|
412
|
+
}
|
|
413
|
+
/** Statuses a runner may report. The supervisor owns every other transition. */
|
|
414
|
+
type RunnerStatus = "running" | "waiting_input";
|
|
415
|
+
/** Events a runner emits. `status`, `approval_*` and `exit` are the supervisor's. */
|
|
416
|
+
type RunnerEvent = Exclude<SessionEventInit, {
|
|
417
|
+
type: "status";
|
|
418
|
+
} | {
|
|
419
|
+
type: "approval_requested";
|
|
420
|
+
} | {
|
|
421
|
+
type: "approval_resolved";
|
|
422
|
+
} | {
|
|
423
|
+
type: "exit";
|
|
424
|
+
}>;
|
|
425
|
+
interface RunnerIO {
|
|
426
|
+
/** Sequenced, persisted and fanned out by the supervisor, in call order. */
|
|
427
|
+
emit(event: RunnerEvent): void;
|
|
428
|
+
setStatus(status: RunnerStatus): void;
|
|
429
|
+
/** Ask for a decision on a tool call (wire 3.8). Resolves with the final decision; never rejects. */
|
|
430
|
+
requestApproval(action: Action, options?: {
|
|
431
|
+
reason?: string;
|
|
432
|
+
signal?: AbortSignal;
|
|
433
|
+
}): Promise<ApprovalOutcome>;
|
|
434
|
+
/** Report the agent's own session id (Claude session id, Codex thread id). */
|
|
435
|
+
setAgentSessionId(id: string): void;
|
|
436
|
+
readonly env: Record<string, string>;
|
|
437
|
+
/**
|
|
438
|
+
* The child sandbox (wire 7). Every process a runner starts goes through `sandbox.wrap()`: spawn the command,
|
|
439
|
+
* args and env it returns. It is the identity when `child_isolation` is `"none"`.
|
|
440
|
+
*/
|
|
441
|
+
readonly sandbox: Sandbox;
|
|
442
|
+
readonly clock: Clock;
|
|
443
|
+
readonly logger: Logger;
|
|
444
|
+
/** Fresh `msg_<ulid>` ids for message events. */
|
|
445
|
+
messageId(): string;
|
|
446
|
+
}
|
|
447
|
+
interface RunnerExit {
|
|
448
|
+
exitCode: number | null;
|
|
449
|
+
signal: string | null;
|
|
450
|
+
}
|
|
451
|
+
interface RunnerProcess {
|
|
452
|
+
input(input: string | Uint8Array): Promise<void>;
|
|
453
|
+
resize?(cols: number, rows: number): Promise<void>;
|
|
454
|
+
interrupt(): Promise<void>;
|
|
455
|
+
/** Ask the process to end, then force it after `graceMs`. Resolves once it is gone. */
|
|
456
|
+
stop(graceMs: number): Promise<void>;
|
|
457
|
+
/** Resolves when the process ends. Rejects when the runner failed (the session becomes `failed`). */
|
|
458
|
+
readonly exited: Promise<RunnerExit>;
|
|
459
|
+
/** Whether `approval.respond` may carry `updated_input` (wire 3.8 step 6). */
|
|
460
|
+
readonly supportsUpdatedInput?: boolean;
|
|
461
|
+
/**
|
|
462
|
+
* Whether the process runs in a PTY (true) or over pipes (false), as the runner actually started it. Recorded as
|
|
463
|
+
* `SessionInfo.terminal`. Leave it out for runners without a terminal (agent runners).
|
|
464
|
+
*/
|
|
465
|
+
readonly terminal?: boolean;
|
|
466
|
+
}
|
|
467
|
+
/** What the supervisor knows when it probes or starts a runner. */
|
|
468
|
+
interface RunnerContext {
|
|
469
|
+
readonly sandbox: Sandbox;
|
|
470
|
+
/** The daemon's own environment (before scrubbing). */
|
|
471
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
472
|
+
/** The supervisor's home, if any. */
|
|
473
|
+
readonly daemonHome?: string | undefined;
|
|
474
|
+
/** The session's `env`, when starting. */
|
|
475
|
+
readonly sessionEnv?: Readonly<Record<string, string>>;
|
|
476
|
+
}
|
|
477
|
+
interface Runner<O = Record<string, unknown>> {
|
|
478
|
+
readonly name: string;
|
|
479
|
+
/** Availability and capabilities. Cheap, side-effect free. */
|
|
480
|
+
probe(context?: RunnerContext): Promise<RunnerInfo>;
|
|
481
|
+
/**
|
|
482
|
+
* Checked before a session exists: a returned `problem` fails `start` with `daemon.runner_unavailable`. `secrets`
|
|
483
|
+
* are daemon secrets this runner holds (scrubbed from every child environment except where the runner injects
|
|
484
|
+
* them through its sandbox state). `env` holds variables from the daemon's environment that this runner's own
|
|
485
|
+
* sessions need (claude-code: its auth variables): they reach this runner's children even under
|
|
486
|
+
* `inherit: "minimal"`, and never another runner's.
|
|
487
|
+
*/
|
|
488
|
+
preflight?(context: RunnerContext): {
|
|
489
|
+
problem?: string;
|
|
490
|
+
secrets?: readonly string[];
|
|
491
|
+
env?: Readonly<Record<string, string>>;
|
|
492
|
+
};
|
|
493
|
+
/** Validate runner options before a session exists. Throw `daemon.invalid_request`. */
|
|
494
|
+
parseOptions?(options: Record<string, unknown>): O;
|
|
495
|
+
start(spec: RunnerStartSpec<O>, io: RunnerIO): Promise<RunnerProcess>;
|
|
496
|
+
}
|
|
497
|
+
/** A runner of any option type, as stored in the registry. */
|
|
498
|
+
type AnyRunner = Runner<any>;
|
|
499
|
+
|
|
500
|
+
/** An idempotency key and the digest of the intent it was first used with. */
|
|
501
|
+
interface IdempotencyIntent {
|
|
502
|
+
key: string;
|
|
503
|
+
digest: string;
|
|
504
|
+
}
|
|
505
|
+
type CreateResult = {
|
|
506
|
+
created: true;
|
|
507
|
+
} | {
|
|
508
|
+
created: false;
|
|
509
|
+
sessionId: string;
|
|
510
|
+
digest: string;
|
|
511
|
+
};
|
|
512
|
+
interface ListQuery {
|
|
513
|
+
status?: readonly Status[];
|
|
514
|
+
pendingApprovals?: boolean;
|
|
515
|
+
tenant?: string;
|
|
516
|
+
limit: number;
|
|
517
|
+
/** Only sessions strictly older (smaller id) than this one. */
|
|
518
|
+
before?: string;
|
|
519
|
+
}
|
|
520
|
+
interface EventQuery {
|
|
521
|
+
afterSeq: number;
|
|
522
|
+
limit: number;
|
|
523
|
+
maxBytes?: number;
|
|
524
|
+
}
|
|
525
|
+
interface EventPage {
|
|
526
|
+
/** Stored events with `seq > afterSeq`, in order, at most `limit`. */
|
|
527
|
+
events: SessionEvent[];
|
|
528
|
+
earliestSeq: number;
|
|
529
|
+
latestSeq: number;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Session records and event logs. One supervisor owns a store at a time. Implementations must make
|
|
533
|
+
* `createSession` with an intent atomic: a known key is never bound to a second session.
|
|
534
|
+
*/
|
|
535
|
+
interface Store {
|
|
536
|
+
/** Acquire ownership and recover: sessions left non-terminal become `failed` (daemon.interrupted_by_restart). */
|
|
537
|
+
open(): Promise<void>;
|
|
538
|
+
close(): Promise<void>;
|
|
539
|
+
createSession(info: SessionInfo, intent?: IdempotencyIntent): Promise<CreateResult>;
|
|
540
|
+
updateSession(info: SessionInfo): Promise<void>;
|
|
541
|
+
getSession(id: string): Promise<SessionInfo | undefined>;
|
|
542
|
+
/** Newest first. */
|
|
543
|
+
listSessions(query: ListQuery): Promise<SessionInfo[]>;
|
|
544
|
+
/** Appends in order. Callers append each session's events from a single writer, in `seq` order. */
|
|
545
|
+
appendEvents(sessionId: string, events: readonly SessionEvent[]): Promise<void>;
|
|
546
|
+
/**
|
|
547
|
+
* Stored events with `seq > afterSeq`, at most `limit`. With `maxBytes`, stops once the events read so far
|
|
548
|
+
* encode to at least that many bytes (always at least one event), so one read never holds an unbounded page.
|
|
549
|
+
*/
|
|
550
|
+
readEvents(sessionId: string, query: EventQuery): Promise<EventPage>;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
type EventListener = (event: SessionEvent) => void;
|
|
554
|
+
/**
|
|
555
|
+
* One session's single writer. `emit` assigns `seq` and `at` synchronously, so call order is log order. Events are
|
|
556
|
+
* persisted in batches, then fanned out: a listener never sees an event the store does not have (wire 3.5).
|
|
557
|
+
*/
|
|
558
|
+
declare class SessionCore {
|
|
559
|
+
#private;
|
|
560
|
+
private readonly deps;
|
|
561
|
+
constructor(info: SessionInfo, deps: {
|
|
562
|
+
store: Store;
|
|
563
|
+
clock: Clock;
|
|
564
|
+
logger: Logger;
|
|
565
|
+
/** After a record write: the persisted SessionInfo (drives `session.updated`). */
|
|
566
|
+
onInfo(info: SessionInfo): void;
|
|
567
|
+
});
|
|
568
|
+
get id(): string;
|
|
569
|
+
/** The latest persisted info. */
|
|
570
|
+
get info(): SessionInfo;
|
|
571
|
+
get status(): Status;
|
|
572
|
+
get terminal(): boolean;
|
|
573
|
+
/** Resolves with the final info once the terminal status is persisted. */
|
|
574
|
+
get ended(): Promise<SessionInfo>;
|
|
575
|
+
/**
|
|
576
|
+
* Sequence an event. Events after the terminal status are dropped: the log is closed. Every event is checked
|
|
577
|
+
* against `SessionEventInit` first, and fields the schema does not name are stripped, so a runner can never write
|
|
578
|
+
* an unknown field; an invalid event is logged as an `error` event in its place. An `output` event whose push
|
|
579
|
+
* would pass 32 KiB (wire 2) is split into consecutive events here, whatever the runner did, so it can always be
|
|
580
|
+
* pushed and paged; the last one is returned.
|
|
581
|
+
*/
|
|
582
|
+
emit(init: SessionEventInit): SessionEvent | undefined;
|
|
583
|
+
/** Change status: emits `status` and rewrites the record. No-op if unchanged or already terminal. */
|
|
584
|
+
setStatus(status: Status, patch?: Partial<SessionInfo>): boolean;
|
|
585
|
+
/** Patch the record (persisted with the next flush). */
|
|
586
|
+
update(patch: Partial<SessionInfo>): void;
|
|
587
|
+
subscribe(listener: EventListener): () => void;
|
|
588
|
+
/**
|
|
589
|
+
* Stored events, never ahead of the persisted record. A flush appends to the log, then writes the record, then fans
|
|
590
|
+
* out, so for a moment the log holds events (a terminal `status`, say) that `sessions.list` and `get` do not
|
|
591
|
+
* reflect yet. A reader handed those from the log could see a session end and then list it as `starting`. So
|
|
592
|
+
* while the session is live, events past the persisted `last_seq` are left out (and `latestSeq` is cut to it):
|
|
593
|
+
* they reach live readers through the fan-out, right after the record that covers them is written.
|
|
594
|
+
*/
|
|
595
|
+
readEvents(afterSeq: number, limit: number, options?: Pick<EventQuery, "maxBytes">): Promise<EventPage>;
|
|
596
|
+
/** Resolves once everything emitted so far is persisted and fanned out. */
|
|
597
|
+
flushed(): Promise<void>;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
interface SessionResult {
|
|
601
|
+
status: Status;
|
|
602
|
+
exitCode: number | null;
|
|
603
|
+
signal: string | null;
|
|
604
|
+
events: SessionEvent[];
|
|
605
|
+
trajectory: Trajectory;
|
|
606
|
+
}
|
|
607
|
+
interface PendingApproval {
|
|
608
|
+
id: string;
|
|
609
|
+
action: Action;
|
|
610
|
+
expiresAt: string;
|
|
611
|
+
approve(options?: {
|
|
612
|
+
updatedInput?: unknown;
|
|
613
|
+
reason?: string;
|
|
614
|
+
}): Promise<void>;
|
|
615
|
+
deny(options?: {
|
|
616
|
+
reason?: string;
|
|
617
|
+
}): Promise<void>;
|
|
618
|
+
}
|
|
619
|
+
/** What a Session needs from its supervisor to act on the process. */
|
|
620
|
+
interface SessionControl {
|
|
621
|
+
input(id: string, input: string | Uint8Array): Promise<void>;
|
|
622
|
+
resize(id: string, cols: number, rows: number): Promise<void>;
|
|
623
|
+
interrupt(id: string): Promise<void>;
|
|
624
|
+
stop(id: string, graceMs?: number): Promise<SessionInfo>;
|
|
625
|
+
answer(id: string, approvalId: string, answer: {
|
|
626
|
+
decision: "allow" | "deny";
|
|
627
|
+
reason?: string;
|
|
628
|
+
updatedInput?: unknown;
|
|
629
|
+
}): Promise<void>;
|
|
630
|
+
isPending(approvalId: string): boolean;
|
|
631
|
+
}
|
|
632
|
+
/**
|
|
633
|
+
* One supervised run. Async iterable over its events: replay from the store, then live, with no gap and no
|
|
634
|
+
* duplicate, ending after the terminal `status` event.
|
|
635
|
+
*/
|
|
636
|
+
declare class Session implements AsyncIterable<SessionEvent> {
|
|
637
|
+
#private;
|
|
638
|
+
constructor(core: SessionCore, control: SessionControl);
|
|
639
|
+
get id(): string;
|
|
640
|
+
/** The latest persisted SessionInfo. */
|
|
641
|
+
get info(): SessionInfo;
|
|
642
|
+
/** One page of stored events with `seq > afterSeq` (wire 3.3 `session.events`). */
|
|
643
|
+
page(afterSeq: number, limit: number, options?: {
|
|
644
|
+
maxBytes?: number;
|
|
645
|
+
}): Promise<EventPage>;
|
|
646
|
+
[Symbol.asyncIterator](): AsyncIterator<SessionEvent>;
|
|
647
|
+
events(options?: {
|
|
648
|
+
afterSeq?: number;
|
|
649
|
+
signal?: AbortSignal;
|
|
650
|
+
}): AsyncGenerator<SessionEvent>;
|
|
651
|
+
/** Final messages only (partials are skipped). */
|
|
652
|
+
messages(options?: {
|
|
653
|
+
signal?: AbortSignal;
|
|
654
|
+
}): AsyncGenerator<MessageEvent>;
|
|
655
|
+
/** Approvals still waiting for an answer, as they arrive. */
|
|
656
|
+
approvals(options?: {
|
|
657
|
+
signal?: AbortSignal;
|
|
658
|
+
}): AsyncGenerator<PendingApproval>;
|
|
659
|
+
input(input: string | Uint8Array): Promise<void>;
|
|
660
|
+
resize(cols: number, rows: number): Promise<void>;
|
|
661
|
+
interrupt(): Promise<void>;
|
|
662
|
+
stop(options?: {
|
|
663
|
+
graceMs?: number;
|
|
664
|
+
}): Promise<SessionInfo>;
|
|
665
|
+
approve(approvalId: string, options?: {
|
|
666
|
+
updatedInput?: unknown;
|
|
667
|
+
reason?: string;
|
|
668
|
+
}): Promise<void>;
|
|
669
|
+
deny(approvalId: string, options?: {
|
|
670
|
+
reason?: string;
|
|
671
|
+
}): Promise<void>;
|
|
672
|
+
trajectory(): Promise<Trajectory>;
|
|
673
|
+
/** Resolves when the session reaches a terminal status. */
|
|
674
|
+
result(): Promise<SessionResult>;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
interface SupervisorOptions {
|
|
678
|
+
/** A home directory: file store, writer lock and `identity.json` under it. Without one: memory, ephemeral identity. */
|
|
679
|
+
home?: string;
|
|
680
|
+
/** Overrides the store chosen by `home`. */
|
|
681
|
+
store?: Store;
|
|
682
|
+
/** Added to the built-ins; a runner with a built-in's name replaces it. */
|
|
683
|
+
runners?: readonly AnyRunner[];
|
|
684
|
+
/** Decides approvals before humans: a function or anything with `evaluate(action)`. */
|
|
685
|
+
approvals?: ApprovalPolicy;
|
|
686
|
+
/** Unanswered approvals deny after this long. Default 5 minutes. */
|
|
687
|
+
approvalTimeoutMs?: number;
|
|
688
|
+
/** Sessions running at once. Default 16; `start()` beyond it throws `daemon.capacity`. */
|
|
689
|
+
maxSessions?: number;
|
|
690
|
+
clock?: Clock;
|
|
691
|
+
ids?: IdGenerator;
|
|
692
|
+
env?: EnvPolicy;
|
|
693
|
+
/** The environment children inherit from. Default `process.env`. */
|
|
694
|
+
baseEnv?: Readonly<Record<string, string | undefined>>;
|
|
695
|
+
logger?: Logger;
|
|
696
|
+
/** Use this identity instead of loading or creating one. */
|
|
697
|
+
identity?: Identity | Promise<Identity>;
|
|
698
|
+
/**
|
|
699
|
+
* The child sandbox (wire 7). Default `childIsolation: "home"`: every child runs under `sandbox-exec` (macOS)
|
|
700
|
+
* or `bwrap` (Linux), and without one every runner is unavailable. `{ childIsolation: "none" }` opts out.
|
|
701
|
+
*/
|
|
702
|
+
sandbox?: Omit<SandboxOptions, "daemonHome" | "env">;
|
|
703
|
+
}
|
|
704
|
+
type StartOptions<R extends keyof RunnerOptions> = RunnerOptions[R] & CommonStartOptions;
|
|
705
|
+
interface Supervisor {
|
|
706
|
+
/** The home directory given in the options, if any. `serve()` keeps the local socket, token and peers there. */
|
|
707
|
+
readonly home: string | undefined;
|
|
708
|
+
/** The daemon's static identity (from `home`, or ephemeral). */
|
|
709
|
+
identity(): Promise<Identity>;
|
|
710
|
+
start<R extends keyof RunnerOptions>(runner: R, options: StartOptions<R>): Promise<Session>;
|
|
711
|
+
/** `start` then `result`. */
|
|
712
|
+
run<R extends keyof RunnerOptions>(runner: R, options: StartOptions<R>): Promise<SessionResult>;
|
|
713
|
+
get(id: string): Promise<Session | undefined>;
|
|
714
|
+
list(filter?: ListFilter): Promise<SessionInfo[]>;
|
|
715
|
+
/** Current sessions, then every change, until aborted or closed. */
|
|
716
|
+
watch(options?: {
|
|
717
|
+
signal?: AbortSignal;
|
|
718
|
+
}): AsyncIterable<SessionInfo>;
|
|
719
|
+
runners(): Promise<RunnerInfo[]>;
|
|
720
|
+
/** Answer an approval from outside a Session handle (`approval.respond`). */
|
|
721
|
+
respond(approvalId: string, answer: {
|
|
722
|
+
decision: "allow" | "deny";
|
|
723
|
+
reason?: string;
|
|
724
|
+
updatedInput?: unknown;
|
|
725
|
+
resolvedBy?: `peer:${string}` | "local";
|
|
726
|
+
/** Who the responder says decided (wire 3.8 step 8). */
|
|
727
|
+
actor?: string;
|
|
728
|
+
/** Required to allow, and must match the approval's `action_digest` (wire 3.8 step 7). */
|
|
729
|
+
actionDigest?: string;
|
|
730
|
+
}): Promise<{
|
|
731
|
+
approval_id: string;
|
|
732
|
+
decision: "allow" | "deny";
|
|
733
|
+
resolved_by: string;
|
|
734
|
+
}>;
|
|
735
|
+
/**
|
|
736
|
+
* An approval's session and full action (`approval.get`): open approvals, and resolved ones whose session is
|
|
737
|
+
* still stored. `undefined` when unknown.
|
|
738
|
+
*/
|
|
739
|
+
approval(approvalId: string): Promise<ApprovalRecord | undefined>;
|
|
740
|
+
/**
|
|
741
|
+
* Treat `value` as a daemon secret (wire 7): children started from now on never see a variable holding it,
|
|
742
|
+
* whatever its name. `serve()` adds the local token and `connectRelay()` the relay tokens.
|
|
743
|
+
*/
|
|
744
|
+
addSecret(value: string): void;
|
|
745
|
+
/** The child sandbox every runner spawns through (wire 7). */
|
|
746
|
+
readonly sandbox: Sandbox;
|
|
747
|
+
/**
|
|
748
|
+
* Change the sandbox settings (merged over the current ones), for example `serve({ childIsolation })`. Only
|
|
749
|
+
* before the first session starts: `daemon.invalid_request` after.
|
|
750
|
+
*/
|
|
751
|
+
configureSandbox(config: SandboxConfig): void;
|
|
752
|
+
/**
|
|
753
|
+
* Add read-deny roots at any time, also after sessions started: they apply to every spawn from now on (running
|
|
754
|
+
* children keep the policy they started with). Additive only: nothing can remove a deny root this way.
|
|
755
|
+
*/
|
|
756
|
+
addDenyRead(paths: readonly string[]): void;
|
|
757
|
+
/**
|
|
758
|
+
* Record this supervisor's home in the user's registry of daemon homes (`~/.viewport/daemon-homes`, see
|
|
759
|
+
* `src/sandbox/daemon-homes.ts`), so every other daemon denies it to its children. `serve()` calls it before it
|
|
760
|
+
* accepts anything. Throws `daemon.store_corrupt` for a registry that cannot be trusted. No home: nothing to do.
|
|
761
|
+
*/
|
|
762
|
+
registerHome(home?: string): Promise<void>;
|
|
763
|
+
/**
|
|
764
|
+
* The registered daemon homes that existed at the last read (every session start re-reads the registry and
|
|
765
|
+
* denies any new one to children spawned from then on). Real paths.
|
|
766
|
+
*/
|
|
767
|
+
readonly daemonHomes: readonly string[];
|
|
768
|
+
/** Stop every session, then release the store. */
|
|
769
|
+
close(options?: {
|
|
770
|
+
graceMs?: number;
|
|
771
|
+
}): Promise<void>;
|
|
772
|
+
}
|
|
773
|
+
/** What `Supervisor.approval` finds: the full action as the runner asked for it. */
|
|
774
|
+
interface ApprovalRecord {
|
|
775
|
+
sessionId: string;
|
|
776
|
+
action: Action;
|
|
777
|
+
actionDigest: string;
|
|
778
|
+
}
|
|
779
|
+
/** `sessions.list` filters (wire 3.3). */
|
|
780
|
+
interface ListFilter {
|
|
781
|
+
status?: Status[];
|
|
782
|
+
/** Only sessions with open approvals. */
|
|
783
|
+
pendingApprovals?: boolean;
|
|
784
|
+
tenant?: string;
|
|
785
|
+
limit?: number;
|
|
786
|
+
before?: string;
|
|
787
|
+
}
|
|
788
|
+
declare function createSupervisor(options?: SupervisorOptions): Supervisor;
|
|
789
|
+
|
|
790
|
+
export { Session as B, createSupervisor as H, systemClock as J, toTrajectory as K, MINIMAL_ENV_KEYS as M, ulidIds as N, TRAJECTORY_SCHEMA as T };
|
|
791
|
+
export type { ApprovalDecision as A, Clock as C, SessionResult as D, EnvPolicy as E, StartOptions as F, Trajectory as G, IdGenerator as I, Logger as L, PendingApproval as P, Runner as R, Supervisor as S, ClockTimer as a, IdPrefix as b, SupervisorOptions as c, ClaudeCodeOptions as d, CommandOptions as e, Store as f, ApprovalEffect as g, ApprovalEvaluator as h, ApprovalHandler as i, ApprovalOutcome as j, ApprovalPolicy as k, ApprovalRecord as l, ApprovalRequest as m, CommonStartOptions as n, CreateResult as o, EventPage as p, IdempotencyIntent as q, ListFilter as r, ListQuery as s, RunnerEvent as t, RunnerExit as u, RunnerIO as v, RunnerOptions as w, RunnerProcess as x, RunnerStartSpec as y, RunnerStatus as z };
|