@0xmaxma/claude-gateway 2.0.9 β 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/config.template.json +6 -4
- package/dist/agent/runner.d.ts +126 -11
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +102 -10
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/skill-learning/reviewer.d.ts.map +1 -1
- package/dist/agent/skill-learning/reviewer.js +1 -2
- package/dist/agent/skill-learning/reviewer.js.map +1 -1
- package/dist/api/browser-bindings-router.d.ts +6 -0
- package/dist/api/browser-bindings-router.d.ts.map +1 -0
- package/dist/api/browser-bindings-router.js +150 -0
- package/dist/api/browser-bindings-router.js.map +1 -0
- package/dist/api/capabilities.d.ts +53 -0
- package/dist/api/capabilities.d.ts.map +1 -0
- package/dist/api/capabilities.js +66 -0
- package/dist/api/capabilities.js.map +1 -0
- package/dist/api/connectors-router.js +1 -1
- package/dist/api/connectors-router.js.map +1 -1
- package/dist/api/gateway-router.d.ts.map +1 -1
- package/dist/api/gateway-router.js +38 -14
- package/dist/api/gateway-router.js.map +1 -1
- package/dist/api/gateway-version.d.ts +9 -0
- package/dist/api/gateway-version.d.ts.map +1 -0
- package/dist/api/gateway-version.js +57 -0
- package/dist/api/gateway-version.js.map +1 -0
- package/dist/api/jev-router.d.ts +8 -0
- package/dist/api/jev-router.d.ts.map +1 -0
- package/dist/api/jev-router.js +128 -0
- package/dist/api/jev-router.js.map +1 -0
- package/dist/api/router.d.ts.map +1 -1
- package/dist/api/router.js +53 -6
- package/dist/api/router.js.map +1 -1
- package/dist/api/voice-router.d.ts.map +1 -1
- package/dist/api/voice-router.js +42 -3
- package/dist/api/voice-router.js.map +1 -1
- package/dist/automation/browser-command.d.ts +79 -0
- package/dist/automation/browser-command.d.ts.map +1 -0
- package/dist/automation/browser-command.js +118 -0
- package/dist/automation/browser-command.js.map +1 -0
- package/dist/automation/browser-outcome.d.ts +3 -0
- package/dist/automation/browser-outcome.d.ts.map +1 -0
- package/dist/automation/browser-outcome.js +78 -0
- package/dist/automation/browser-outcome.js.map +1 -0
- package/dist/automation/browser-steps.d.ts +33 -0
- package/dist/automation/browser-steps.d.ts.map +1 -0
- package/dist/automation/browser-steps.js +293 -0
- package/dist/automation/browser-steps.js.map +1 -0
- package/dist/automation/browser-trace.d.ts +60 -0
- package/dist/automation/browser-trace.d.ts.map +1 -0
- package/dist/automation/browser-trace.js +24 -0
- package/dist/automation/browser-trace.js.map +1 -0
- package/dist/automation/browser-use.d.ts +210 -0
- package/dist/automation/browser-use.d.ts.map +1 -0
- package/dist/automation/browser-use.js +1271 -0
- package/dist/automation/browser-use.js.map +1 -0
- package/dist/automation/command-speech.d.ts +33 -0
- package/dist/automation/command-speech.d.ts.map +1 -0
- package/dist/automation/command-speech.js +117 -0
- package/dist/automation/command-speech.js.map +1 -0
- package/dist/automation/command-steps.d.ts +35 -0
- package/dist/automation/command-steps.d.ts.map +1 -0
- package/dist/automation/command-steps.js +155 -0
- package/dist/automation/command-steps.js.map +1 -0
- package/dist/automation/computer-choice-ids.d.ts +7 -0
- package/dist/automation/computer-choice-ids.d.ts.map +1 -0
- package/dist/automation/computer-choice-ids.js +24 -0
- package/dist/automation/computer-choice-ids.js.map +1 -0
- package/dist/automation/computer-command.d.ts +126 -0
- package/dist/automation/computer-command.d.ts.map +1 -0
- package/dist/automation/computer-command.js +313 -0
- package/dist/automation/computer-command.js.map +1 -0
- package/dist/automation/computer-outcome.d.ts +8 -0
- package/dist/automation/computer-outcome.d.ts.map +1 -0
- package/dist/automation/computer-outcome.js +82 -0
- package/dist/automation/computer-outcome.js.map +1 -0
- package/dist/automation/computer-policy.d.ts +84 -0
- package/dist/automation/computer-policy.d.ts.map +1 -0
- package/dist/automation/computer-policy.js +56 -0
- package/dist/automation/computer-policy.js.map +1 -0
- package/dist/automation/computer-safety.d.ts +27 -0
- package/dist/automation/computer-safety.d.ts.map +1 -0
- package/dist/automation/computer-safety.js +47 -0
- package/dist/automation/computer-safety.js.map +1 -0
- package/dist/automation/computer-steps.d.ts +20 -0
- package/dist/automation/computer-steps.d.ts.map +1 -0
- package/dist/automation/computer-steps.js +251 -0
- package/dist/automation/computer-steps.js.map +1 -0
- package/dist/automation/computer-use.d.ts +315 -0
- package/dist/automation/computer-use.d.ts.map +1 -0
- package/dist/automation/computer-use.js +864 -0
- package/dist/automation/computer-use.js.map +1 -0
- package/dist/automation/direct-command.d.ts +51 -0
- package/dist/automation/direct-command.d.ts.map +1 -0
- package/dist/automation/direct-command.js +152 -0
- package/dist/automation/direct-command.js.map +1 -0
- package/dist/automation/interrupt.d.ts +4 -0
- package/dist/automation/interrupt.d.ts.map +1 -0
- package/dist/automation/interrupt.js +26 -0
- package/dist/automation/interrupt.js.map +1 -0
- package/dist/build-provenance.json +4 -4
- package/dist/child-env-exclusions.d.ts +4 -0
- package/dist/child-env-exclusions.d.ts.map +1 -0
- package/dist/child-env-exclusions.js +23 -0
- package/dist/child-env-exclusions.js.map +1 -0
- package/dist/cli/startup-diagnostics.d.ts.map +1 -1
- package/dist/cli/startup-diagnostics.js +19 -0
- package/dist/cli/startup-diagnostics.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +4 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/config/reload-policy.d.ts.map +1 -1
- package/dist/config/reload-policy.js +2 -1
- package/dist/config/reload-policy.js.map +1 -1
- package/dist/jev/automatic-browser-bindings.d.ts +15 -0
- package/dist/jev/automatic-browser-bindings.d.ts.map +1 -0
- package/dist/jev/automatic-browser-bindings.js +115 -0
- package/dist/jev/automatic-browser-bindings.js.map +1 -0
- package/dist/jev/browser-connector.d.ts +29 -0
- package/dist/jev/browser-connector.d.ts.map +1 -0
- package/dist/jev/browser-connector.js +347 -0
- package/dist/jev/browser-connector.js.map +1 -0
- package/dist/jev/browser-consent.d.ts +6 -0
- package/dist/jev/browser-consent.d.ts.map +1 -0
- package/dist/jev/browser-consent.js +50 -0
- package/dist/jev/browser-consent.js.map +1 -0
- package/dist/jev/browser-contract.d.ts +215 -0
- package/dist/jev/browser-contract.d.ts.map +1 -0
- package/dist/jev/browser-contract.js +10 -0
- package/dist/jev/browser-contract.js.map +1 -0
- package/dist/jev/browser-evidence-summary.d.ts +73 -0
- package/dist/jev/browser-evidence-summary.d.ts.map +1 -0
- package/dist/jev/browser-evidence-summary.js +22 -0
- package/dist/jev/browser-evidence-summary.js.map +1 -0
- package/dist/jev/browser-module-import.d.ts +3 -0
- package/dist/jev/browser-module-import.d.ts.map +1 -0
- package/dist/jev/browser-module-import.js +6 -0
- package/dist/jev/browser-module-import.js.map +1 -0
- package/dist/jev/child-env.d.ts +11 -0
- package/dist/jev/child-env.d.ts.map +1 -0
- package/dist/jev/child-env.js +60 -0
- package/dist/jev/child-env.js.map +1 -0
- package/dist/jev/computer-connector.d.ts +34 -0
- package/dist/jev/computer-connector.d.ts.map +1 -0
- package/dist/jev/computer-connector.js +82 -0
- package/dist/jev/computer-connector.js.map +1 -0
- package/dist/jev/computer-inputs.d.ts +41 -0
- package/dist/jev/computer-inputs.d.ts.map +1 -0
- package/dist/jev/computer-inputs.js +7 -0
- package/dist/jev/computer-inputs.js.map +1 -0
- package/dist/jev/index.d.ts +6 -0
- package/dist/jev/index.d.ts.map +1 -0
- package/dist/jev/index.js +25 -0
- package/dist/jev/index.js.map +1 -0
- package/dist/jev/relay-grants.d.ts +9 -0
- package/dist/jev/relay-grants.d.ts.map +1 -0
- package/dist/jev/relay-grants.js +49 -0
- package/dist/jev/relay-grants.js.map +1 -0
- package/dist/jev/service.d.ts +27 -0
- package/dist/jev/service.d.ts.map +1 -0
- package/dist/jev/service.js +264 -0
- package/dist/jev/service.js.map +1 -0
- package/dist/jev/thinking-provider.d.ts +7 -0
- package/dist/jev/thinking-provider.d.ts.map +1 -0
- package/dist/jev/thinking-provider.js +25 -0
- package/dist/jev/thinking-provider.js.map +1 -0
- package/dist/jev/types.d.ts +124 -0
- package/dist/jev/types.d.ts.map +1 -0
- package/dist/jev/types.js +13 -0
- package/dist/jev/types.js.map +1 -0
- package/dist/jev/validation.d.ts +45 -0
- package/dist/jev/validation.d.ts.map +1 -0
- package/dist/jev/validation.js +179 -0
- package/dist/jev/validation.js.map +1 -0
- package/dist/load-dotenv.d.ts.map +1 -1
- package/dist/load-dotenv.js +5 -1
- package/dist/load-dotenv.js.map +1 -1
- package/dist/orchestration/agent-tool-schemas.d.ts.map +1 -1
- package/dist/orchestration/agent-tool-schemas.js +12 -7
- package/dist/orchestration/agent-tool-schemas.js.map +1 -1
- package/dist/orchestration/background-work.d.ts +1 -0
- package/dist/orchestration/background-work.d.ts.map +1 -1
- package/dist/orchestration/background-work.js +1 -0
- package/dist/orchestration/background-work.js.map +1 -1
- package/dist/orchestration/bridge.d.ts +4 -0
- package/dist/orchestration/bridge.d.ts.map +1 -1
- package/dist/orchestration/bridge.js +227 -41
- package/dist/orchestration/bridge.js.map +1 -1
- package/dist/orchestration/browser-fields.d.ts +25 -0
- package/dist/orchestration/browser-fields.d.ts.map +1 -0
- package/dist/orchestration/browser-fields.js +23 -0
- package/dist/orchestration/browser-fields.js.map +1 -0
- package/dist/orchestration/browser-routing.d.ts +1 -1
- package/dist/orchestration/browser-routing.d.ts.map +1 -1
- package/dist/orchestration/browser-routing.js +7 -3
- package/dist/orchestration/browser-routing.js.map +1 -1
- package/dist/orchestration/capabilities.d.ts +5 -2
- package/dist/orchestration/capabilities.d.ts.map +1 -1
- package/dist/orchestration/capabilities.js +24 -24
- package/dist/orchestration/capabilities.js.map +1 -1
- package/dist/orchestration/channel-controls.js +1 -1
- package/dist/orchestration/channel-controls.js.map +1 -1
- package/dist/orchestration/cli-skills.d.ts +1 -1
- package/dist/orchestration/cli-skills.d.ts.map +1 -1
- package/dist/orchestration/cli-skills.js +16 -10
- package/dist/orchestration/cli-skills.js.map +1 -1
- package/dist/orchestration/computer-end-screenshot.d.ts +11 -0
- package/dist/orchestration/computer-end-screenshot.d.ts.map +1 -0
- package/dist/orchestration/computer-end-screenshot.js +37 -0
- package/dist/orchestration/computer-end-screenshot.js.map +1 -0
- package/dist/orchestration/computer-prompt.d.ts +6 -0
- package/dist/orchestration/computer-prompt.d.ts.map +1 -0
- package/dist/orchestration/computer-prompt.js +24 -0
- package/dist/orchestration/computer-prompt.js.map +1 -0
- package/dist/orchestration/config.d.ts +17 -0
- package/dist/orchestration/config.d.ts.map +1 -1
- package/dist/orchestration/config.js +10 -4
- package/dist/orchestration/config.js.map +1 -1
- package/dist/orchestration/container-tool-schemas.d.ts +47 -3
- package/dist/orchestration/container-tool-schemas.d.ts.map +1 -1
- package/dist/orchestration/container-tool-schemas.js +41 -6
- package/dist/orchestration/container-tool-schemas.js.map +1 -1
- package/dist/orchestration/container.d.ts +4 -1
- package/dist/orchestration/container.d.ts.map +1 -1
- package/dist/orchestration/container.js +48 -29
- package/dist/orchestration/container.js.map +1 -1
- package/dist/orchestration/context-footprint.d.ts +1 -1
- package/dist/orchestration/context-footprint.d.ts.map +1 -1
- package/dist/orchestration/context-footprint.js +5 -5
- package/dist/orchestration/context-footprint.js.map +1 -1
- package/dist/orchestration/control-notification.d.ts +6 -0
- package/dist/orchestration/control-notification.d.ts.map +1 -0
- package/dist/orchestration/control-notification.js +23 -0
- package/dist/orchestration/control-notification.js.map +1 -0
- package/dist/orchestration/dashboard-reader-worker.js +2 -2
- package/dist/orchestration/dashboard-reader-worker.js.map +1 -1
- package/dist/orchestration/execution-observation.d.ts +3 -0
- package/dist/orchestration/execution-observation.d.ts.map +1 -1
- package/dist/orchestration/execution-observation.js.map +1 -1
- package/dist/orchestration/gateway-tasks/browser.d.ts +59 -0
- package/dist/orchestration/gateway-tasks/browser.d.ts.map +1 -0
- package/dist/orchestration/gateway-tasks/browser.js +426 -0
- package/dist/orchestration/gateway-tasks/browser.js.map +1 -0
- package/dist/orchestration/gateway-tasks/computer-context.d.ts +6 -0
- package/dist/orchestration/gateway-tasks/computer-context.d.ts.map +1 -0
- package/dist/orchestration/gateway-tasks/computer-context.js +19 -0
- package/dist/orchestration/gateway-tasks/computer-context.js.map +1 -0
- package/dist/orchestration/gateway-tasks/computer.d.ts +123 -0
- package/dist/orchestration/gateway-tasks/computer.d.ts.map +1 -0
- package/dist/orchestration/gateway-tasks/computer.js +519 -0
- package/dist/orchestration/gateway-tasks/computer.js.map +1 -0
- package/dist/orchestration/gateway-tasks/controller.d.ts +40 -6
- package/dist/orchestration/gateway-tasks/controller.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/controller.js +118 -12
- package/dist/orchestration/gateway-tasks/controller.js.map +1 -1
- package/dist/orchestration/gateway-tasks/safemode.d.ts.map +1 -1
- package/dist/orchestration/gateway-tasks/safemode.js +2 -1
- package/dist/orchestration/gateway-tasks/safemode.js.map +1 -1
- package/dist/orchestration/jev-gateway.d.ts +25 -0
- package/dist/orchestration/jev-gateway.d.ts.map +1 -0
- package/dist/orchestration/jev-gateway.js +103 -0
- package/dist/orchestration/jev-gateway.js.map +1 -0
- package/dist/orchestration/jev-tool.d.ts +45 -0
- package/dist/orchestration/jev-tool.d.ts.map +1 -0
- package/dist/orchestration/jev-tool.js +10 -0
- package/dist/orchestration/jev-tool.js.map +1 -0
- package/dist/orchestration/live-execution-input.d.ts +26 -0
- package/dist/orchestration/live-execution-input.d.ts.map +1 -0
- package/dist/orchestration/live-execution-input.js +70 -0
- package/dist/orchestration/live-execution-input.js.map +1 -0
- package/dist/orchestration/notification-mailbox.d.ts.map +1 -1
- package/dist/orchestration/notification-mailbox.js +5 -2
- package/dist/orchestration/notification-mailbox.js.map +1 -1
- package/dist/orchestration/process-activity.d.ts +4 -2
- package/dist/orchestration/process-activity.d.ts.map +1 -1
- package/dist/orchestration/process-activity.js +31 -42
- package/dist/orchestration/process-activity.js.map +1 -1
- package/dist/orchestration/process-platform.d.ts +72 -0
- package/dist/orchestration/process-platform.d.ts.map +1 -0
- package/dist/orchestration/process-platform.js +396 -0
- package/dist/orchestration/process-platform.js.map +1 -0
- package/dist/orchestration/process-supervisor.d.ts +31 -7
- package/dist/orchestration/process-supervisor.d.ts.map +1 -1
- package/dist/orchestration/process-supervisor.js +89 -61
- package/dist/orchestration/process-supervisor.js.map +1 -1
- package/dist/orchestration/process-turn.d.ts +8 -0
- package/dist/orchestration/process-turn.d.ts.map +1 -1
- package/dist/orchestration/process-turn.js +97 -13
- package/dist/orchestration/process-turn.js.map +1 -1
- package/dist/orchestration/progress-review.d.ts +1 -1
- package/dist/orchestration/progress-review.d.ts.map +1 -1
- package/dist/orchestration/progress-review.js +5 -1
- package/dist/orchestration/progress-review.js.map +1 -1
- package/dist/orchestration/report-fidelity.d.ts +31 -0
- package/dist/orchestration/report-fidelity.d.ts.map +1 -0
- package/dist/orchestration/report-fidelity.js +34 -0
- package/dist/orchestration/report-fidelity.js.map +1 -0
- package/dist/orchestration/response-errors.d.ts.map +1 -1
- package/dist/orchestration/response-errors.js +1 -0
- package/dist/orchestration/response-errors.js.map +1 -1
- package/dist/orchestration/runtime.d.ts +51 -1
- package/dist/orchestration/runtime.d.ts.map +1 -1
- package/dist/orchestration/runtime.js +404 -33
- package/dist/orchestration/runtime.js.map +1 -1
- package/dist/orchestration/skill-catalog-budget.d.ts +6 -0
- package/dist/orchestration/skill-catalog-budget.d.ts.map +1 -0
- package/dist/orchestration/skill-catalog-budget.js +9 -0
- package/dist/orchestration/skill-catalog-budget.js.map +1 -0
- package/dist/orchestration/skills.d.ts +4 -2
- package/dist/orchestration/skills.d.ts.map +1 -1
- package/dist/orchestration/skills.js +44 -3
- package/dist/orchestration/skills.js.map +1 -1
- package/dist/orchestration/speech.d.ts +1 -1
- package/dist/orchestration/speech.d.ts.map +1 -1
- package/dist/orchestration/speech.js +1 -1
- package/dist/orchestration/store.d.ts +1 -0
- package/dist/orchestration/store.d.ts.map +1 -1
- package/dist/orchestration/store.js +2 -0
- package/dist/orchestration/store.js.map +1 -1
- package/dist/orchestration/task-controls.d.ts +78 -8
- package/dist/orchestration/task-controls.d.ts.map +1 -1
- package/dist/orchestration/task-controls.js +6 -1
- package/dist/orchestration/task-controls.js.map +1 -1
- package/dist/orchestration/task-questions.js +2 -2
- package/dist/orchestration/task-questions.js.map +1 -1
- package/dist/orchestration/tasks/automation-session.d.ts +25 -0
- package/dist/orchestration/tasks/automation-session.d.ts.map +1 -0
- package/dist/orchestration/tasks/automation-session.js +68 -0
- package/dist/orchestration/tasks/automation-session.js.map +1 -0
- package/dist/orchestration/tasks/driver.d.ts.map +1 -1
- package/dist/orchestration/tasks/driver.js +7 -5
- package/dist/orchestration/tasks/driver.js.map +1 -1
- package/dist/orchestration/tasks/failure.d.ts +6 -0
- package/dist/orchestration/tasks/failure.d.ts.map +1 -1
- package/dist/orchestration/tasks/failure.js +26 -2
- package/dist/orchestration/tasks/failure.js.map +1 -1
- package/dist/orchestration/tasks/scheduler.d.ts +1 -1
- package/dist/orchestration/tasks/scheduler.d.ts.map +1 -1
- package/dist/orchestration/tasks/scheduler.js +3 -1
- package/dist/orchestration/tasks/scheduler.js.map +1 -1
- package/dist/orchestration/tasks/service.d.ts +68 -7
- package/dist/orchestration/tasks/service.d.ts.map +1 -1
- package/dist/orchestration/tasks/service.js +647 -45
- package/dist/orchestration/tasks/service.js.map +1 -1
- package/dist/orchestration/types.d.ts +90 -3
- package/dist/orchestration/types.d.ts.map +1 -1
- package/dist/orchestration/types.js.map +1 -1
- package/dist/safemode/native.d.ts.map +1 -1
- package/dist/safemode/native.js +8 -3
- package/dist/safemode/native.js.map +1 -1
- package/dist/session/claude-bin.d.ts +29 -0
- package/dist/session/claude-bin.d.ts.map +1 -1
- package/dist/session/claude-bin.js +63 -12
- package/dist/session/claude-bin.js.map +1 -1
- package/dist/session/codex-extension-discovery.d.ts.map +1 -1
- package/dist/session/codex-extension-discovery.js +4 -2
- package/dist/session/codex-extension-discovery.js.map +1 -1
- package/dist/session/codex-native-mcp-client.d.ts.map +1 -1
- package/dist/session/codex-native-mcp-client.js +2 -1
- package/dist/session/codex-native-mcp-client.js.map +1 -1
- package/dist/session/codex-process.d.ts +4 -0
- package/dist/session/codex-process.d.ts.map +1 -1
- package/dist/session/codex-process.js +16 -6
- package/dist/session/codex-process.js.map +1 -1
- package/dist/session/compactor.d.ts.map +1 -1
- package/dist/session/compactor.js +1 -2
- package/dist/session/compactor.js.map +1 -1
- package/dist/session/process.d.ts +18 -0
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +175 -67
- package/dist/session/process.js.map +1 -1
- package/dist/session/runtime-profile.d.ts +18 -0
- package/dist/session/runtime-profile.d.ts.map +1 -1
- package/dist/session/runtime-profile.js +23 -0
- package/dist/session/runtime-profile.js.map +1 -1
- package/dist/session/worker-extensions.d.ts.map +1 -1
- package/dist/session/worker-extensions.js +4 -3
- package/dist/session/worker-extensions.js.map +1 -1
- package/dist/shell/claude-pty-shell.js +5 -4
- package/dist/shell/claude-pty-shell.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/dashboard-client.d.ts.map +1 -1
- package/dist/ui/dashboard-client.js +33 -3
- package/dist/ui/dashboard-client.js.map +1 -1
- package/dist/ui/web-ui.js +1 -1
- package/dist/utils/paths.d.ts +8 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +11 -0
- package/dist/utils/paths.js.map +1 -1
- package/lib/automation/browser-thinking.cjs +9 -0
- package/lib/automation/browser-thinking.d.cts +2 -0
- package/lib/automation/computer-thinking.cjs +10 -0
- package/lib/automation/computer-thinking.d.cts +2 -0
- package/lib/automation/index.cjs +47 -0
- package/lib/automation/index.d.cts +3 -0
- package/lib/automation/reasoning-instructions.cjs +5 -0
- package/lib/automation/thinking.cjs +35 -0
- package/lib/automation/thinking.d.cts +2 -0
- package/mcp/capability-catalog.ts +2 -2
- package/mcp/server.ts +1 -1
- package/mcp/tools/tasks/module.ts +9 -0
- package/mcp/tools/telegram/receiver-server.ts +4 -2
- package/package.json +6 -4
package/dist/agent/runner.js
CHANGED
|
@@ -134,20 +134,27 @@ exports.MAX_IMAGE_SIZE_BYTES = 10 * 1024 * 1024;
|
|
|
134
134
|
// the Opus 5 -> Opus 4.8 demotion above and the Fable 5.1 -> Fable 5 one.
|
|
135
135
|
// Selection still stores the resolved id, so an agent already on Opus 5 stays
|
|
136
136
|
// on claude-opus-5 β only `/model opus` from now on resolves to 5.5.
|
|
137
|
+
//
|
|
138
|
+
// Sonnet 5.5 (`claude-sonnet-5-5`) does the same on the Sonnet family: it takes
|
|
139
|
+
// `sonnet` / `sonnet[1m]` and Sonnet 5 is demoted to `sonnet5` / `sonnet5[1m]`;
|
|
140
|
+
// Sonnet 4.6 keeps `sonnet46`. An agent already on Sonnet 5 stays on
|
|
141
|
+
// claude-sonnet-5.
|
|
137
142
|
exports.DEFAULT_MODELS = [
|
|
138
143
|
{ id: 'claude-fable-5-1[1m]', label: 'Fable 5.1 (1M)', alias: 'fable[1m]', contextWindow: 1000000 },
|
|
139
144
|
{ id: 'claude-fable-5[1m]', label: 'Fable 5 (1M)', alias: 'fable5[1m]', contextWindow: 1000000 },
|
|
140
145
|
{ id: 'claude-opus-5-5[1m]', label: 'Opus 5.5 (1M)', alias: 'opus[1m]', contextWindow: 1000000 },
|
|
141
146
|
{ id: 'claude-opus-5[1m]', label: 'Opus 5 (1M)', alias: 'opus5[1m]', contextWindow: 1000000 },
|
|
142
147
|
{ id: 'claude-opus-4-8[1m]', label: 'Opus 4.8 (1M)', alias: 'opus48[1m]', contextWindow: 1000000 },
|
|
143
|
-
{ id: 'claude-sonnet-5[1m]', label: 'Sonnet 5 (1M)', alias: 'sonnet[1m]', contextWindow: 1000000 },
|
|
148
|
+
{ id: 'claude-sonnet-5-5[1m]', label: 'Sonnet 5.5 (1M)', alias: 'sonnet[1m]', contextWindow: 1000000 },
|
|
149
|
+
{ id: 'claude-sonnet-5[1m]', label: 'Sonnet 5 (1M)', alias: 'sonnet5[1m]', contextWindow: 1000000 },
|
|
144
150
|
{ id: 'claude-fable-5-1', label: 'Fable 5.1', alias: 'fable', contextWindow: 200000 },
|
|
145
151
|
{ id: 'claude-fable-5', label: 'Fable 5', alias: 'fable5', contextWindow: 200000 },
|
|
146
152
|
{ id: 'claude-opus-5-5', label: 'Opus 5.5', alias: 'opus', contextWindow: 200000 },
|
|
147
153
|
{ id: 'claude-opus-5', label: 'Opus 5', alias: 'opus5', contextWindow: 200000 },
|
|
148
154
|
{ id: 'claude-opus-4-8', label: 'Opus 4.8', alias: 'opus48', contextWindow: 200000 },
|
|
149
155
|
{ id: 'claude-opus-4-6', label: 'Opus 4.6', alias: 'opus46', contextWindow: 200000 },
|
|
150
|
-
{ id: 'claude-sonnet-5', label: 'Sonnet 5', alias: 'sonnet', contextWindow: 200000 },
|
|
156
|
+
{ id: 'claude-sonnet-5-5', label: 'Sonnet 5.5', alias: 'sonnet', contextWindow: 200000 },
|
|
157
|
+
{ id: 'claude-sonnet-5', label: 'Sonnet 5', alias: 'sonnet5', contextWindow: 200000 },
|
|
151
158
|
{ id: 'claude-sonnet-4-6', label: 'Sonnet 4.6', alias: 'sonnet46', contextWindow: 200000 },
|
|
152
159
|
{ id: 'claude-haiku-4-5-20251001', label: 'Haiku 4.5', alias: 'haiku', contextWindow: 200000 },
|
|
153
160
|
{ id: 'gpt-6-sol[1m]', label: 'GPT 6 Sol', alias: 'gpt6sol', contextWindow: 1050000 },
|
|
@@ -419,18 +426,28 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
419
426
|
recordVoicePlayback(responseId, principalId, progress, state) {
|
|
420
427
|
this.orchestration?.recordPlayback(responseId, principalId, progress, state);
|
|
421
428
|
}
|
|
422
|
-
async submitVoiceUtterance(sessionId, chatId, principalId, text, utteranceId, allowTools, model) {
|
|
429
|
+
async submitVoiceUtterance(sessionId, chatId, principalId, text, utteranceId, allowTools, model, executionTaskId) {
|
|
423
430
|
if (!this.agentConfig.orchestration?.enabled || !this.agentConfig.voice?.enabled)
|
|
424
431
|
throw new Error('Voice is disabled');
|
|
425
432
|
if (!(await this.apiSessionExists(chatId, sessionId)))
|
|
426
433
|
throw new Error('Session not found');
|
|
427
434
|
const orchestration = await this.getOrchestration();
|
|
428
435
|
const accepted = orchestration.submitInput({ scope: { agentId: this.agentConfig.id, agentSessionId: sessionId, source: 'api', accountId: principalId,
|
|
429
|
-
chatId, threadKey: '', principalId }, text, model, modality: 'live_voice', ingressKey: `utterance:${utteranceId}` }, { execute: allowTools, writeMemory: false });
|
|
436
|
+
chatId, threadKey: '', principalId }, text, model, metadata: { executionTaskId }, modality: 'live_voice', ingressKey: `utterance:${utteranceId}` }, { execute: allowTools, writeMemory: false });
|
|
430
437
|
// The browser refreshes history on utterance.accepted, before inference finishes.
|
|
431
438
|
await orchestration.flushHistory();
|
|
432
439
|
return { ...accepted, responseId: () => orchestration.responseIdForInput(accepted.inputId) };
|
|
433
440
|
}
|
|
441
|
+
async browserSessionScope(sessionId, principalId) {
|
|
442
|
+
if (!this.agentConfig.orchestration?.enabled)
|
|
443
|
+
throw new Error('ORCHESTRATION_DISABLED');
|
|
444
|
+
return (await this.getOrchestration()).browserSessionScope(sessionId, principalId);
|
|
445
|
+
}
|
|
446
|
+
async browserEvidence(sessionId, principalId, taskId, refresh = false) {
|
|
447
|
+
if (!this.agentConfig.orchestration?.enabled)
|
|
448
|
+
throw new Error('ORCHESTRATION_DISABLED');
|
|
449
|
+
return (await this.getOrchestration()).browserEvidence(sessionId, principalId, taskId, refresh);
|
|
450
|
+
}
|
|
434
451
|
async listApiTasks(sessionId, principalId, page = 0, pageSize = 10, includeFinished = false) {
|
|
435
452
|
if (!this.agentConfig.orchestration?.enabled)
|
|
436
453
|
throw new Error('ORCHESTRATION_DISABLED');
|
|
@@ -447,6 +464,35 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
447
464
|
// Full retained result, with worker-only skill context removed by status().
|
|
448
465
|
return { ...runtime.tasks.status(task.conversationId, principalId, taskId)[0], ...detail };
|
|
449
466
|
}
|
|
467
|
+
/** Provisional: returns the pause id so releaseVoicePause can undo it if the speech yields no command. */
|
|
468
|
+
async pauseVoiceExecution(sessionId, principalId, taskId) {
|
|
469
|
+
const runtime = await this.getOrchestration();
|
|
470
|
+
const detail = runtime.taskControls.detail(sessionId, principalId, taskId);
|
|
471
|
+
const task = runtime.store.task(taskId);
|
|
472
|
+
if (task.executionControl?.action === 'pause' && ['pending', 'paused'].includes(task.executionControl.phase))
|
|
473
|
+
return;
|
|
474
|
+
if (!['queued', 'starting', 'running', 'interrupting'].includes(task.state))
|
|
475
|
+
return;
|
|
476
|
+
if (!runtime.tasks.voicePauseApplies(detail.taskId))
|
|
477
|
+
return;
|
|
478
|
+
const id = (0, crypto_1.randomUUID)();
|
|
479
|
+
runtime.controlTask(sessionId, principalId, detail.taskId, { id, action: 'pause', expectedRevision: task.revision });
|
|
480
|
+
return id;
|
|
481
|
+
}
|
|
482
|
+
/** Speech that produced no command (empty, muted or lost) resumes the task,
|
|
483
|
+
* but only if this voice pause is still the latest control. */
|
|
484
|
+
async releaseVoicePause(sessionId, principalId, taskId, pauseId) {
|
|
485
|
+
const runtime = await this.getOrchestration();
|
|
486
|
+
const task = runtime.store.task(taskId);
|
|
487
|
+
if (task?.executionControl?.id !== pauseId || task.executionControl.action !== 'pause')
|
|
488
|
+
return;
|
|
489
|
+
runtime.controlTask(sessionId, principalId, taskId, { id: (0, crypto_1.randomUUID)(), action: 'resume', expectedRevision: task.revision });
|
|
490
|
+
}
|
|
491
|
+
async controlApiTask(sessionId, principalId, taskId, command) {
|
|
492
|
+
if (!this.agentConfig.orchestration?.enabled)
|
|
493
|
+
throw new Error('ORCHESTRATION_DISABLED');
|
|
494
|
+
return (await this.getOrchestration()).controlTask(sessionId, principalId, taskId, command);
|
|
495
|
+
}
|
|
450
496
|
async cancelApiTask(sessionId, principalId, taskId) {
|
|
451
497
|
if (!this.agentConfig.orchestration?.enabled)
|
|
452
498
|
throw new Error('ORCHESTRATION_DISABLED');
|
|
@@ -474,12 +520,12 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
474
520
|
}
|
|
475
521
|
async sendOrchestratedApi(sessionId, chatId, message, opts, onText, onTool) {
|
|
476
522
|
const semantic = this.agentConfig.orchestration?.conversation?.semanticIntake === true;
|
|
477
|
-
if (!semantic && !opts.acceptOnly && this.pendingApiSessions.has(sessionId))
|
|
523
|
+
if (!opts.executionTaskId && !semantic && !opts.acceptOnly && this.pendingApiSessions.has(sessionId))
|
|
478
524
|
throw Object.assign(new Error('Session already has a pending request'), { code: 'CONFLICT' });
|
|
479
525
|
if (!opts.principalId)
|
|
480
526
|
throw new Error('Authenticated principal required for conversation orchestration');
|
|
481
527
|
const deadline = Date.now() + opts.timeoutMs;
|
|
482
|
-
if (!semantic && !opts.acceptOnly)
|
|
528
|
+
if (!opts.executionTaskId && !semantic && !opts.acceptOnly)
|
|
483
529
|
this.pendingApiSessions.add(sessionId); // reserve before the first await
|
|
484
530
|
const preparationDir = opts.acceptOnly ? `api-${sessionId}/admission-${(0, crypto_1.randomUUID)()}` : undefined;
|
|
485
531
|
let keepPreparedMedia = false;
|
|
@@ -490,7 +536,7 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
490
536
|
source: 'api', accountId: opts.principalId, chatId, threadKey: '', principalId: opts.principalId };
|
|
491
537
|
const ingressKey = opts.clientMessageId ? `web:${sessionId}:${opts.clientMessageId}` : undefined;
|
|
492
538
|
const requestFingerprint = opts.clientMessageId ? (0, store_1.payloadHash)({ scope, message,
|
|
493
|
-
mediaFiles: opts.mediaFiles ?? [], model: opts.model, imageParams: opts.imageParams,
|
|
539
|
+
executionTaskId: opts.executionTaskId, mediaFiles: opts.mediaFiles ?? [], model: opts.model, imageParams: opts.imageParams,
|
|
494
540
|
videoParams: opts.videoParams, storeUserMessage: !opts.skipUserMessage, allowTools: opts.allowTools ?? false }) : undefined;
|
|
495
541
|
if (opts.acceptOnly && requestFingerprint) {
|
|
496
542
|
const prior = orchestration.store.apiReceipt(scope, ingressKey, requestFingerprint);
|
|
@@ -517,7 +563,7 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
517
563
|
const requestId = opts.requestId ?? (0, crypto_1.randomUUID)();
|
|
518
564
|
const scopedInput = { scope, text: message || '[Attachment inspection requested]', attachmentIds: media,
|
|
519
565
|
requestId, ingressKey, requestFingerprint, storeUserMessage: !opts.skipUserMessage,
|
|
520
|
-
metadata: { clientMessageId: opts.clientMessageId, promptContext: (imageParams ? AgentRunner.buildImageParamsNote(imageParams) : '') + (videoParams ? AgentRunner.buildVideoParamsNote(videoParams) : ''), imageRefs: imageParams?.image_refs } };
|
|
566
|
+
metadata: { executionTaskId: opts.executionTaskId, clientMessageId: opts.clientMessageId, promptContext: (imageParams ? AgentRunner.buildImageParamsNote(imageParams) : '') + (videoParams ? AgentRunner.buildVideoParamsNote(videoParams) : ''), imageRefs: imageParams?.image_refs } };
|
|
521
567
|
if (opts.acceptOnly) {
|
|
522
568
|
const accepted = orchestration.submitInput({ ...scopedInput, model: opts.model }, { execute: opts.allowTools ?? false, writeMemory: false });
|
|
523
569
|
// Concurrent retries can prepare separate copies; only the winning
|
|
@@ -531,7 +577,7 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
531
577
|
return { text: '', attachments: [], inputId: accepted.inputId };
|
|
532
578
|
}
|
|
533
579
|
let text;
|
|
534
|
-
if (semantic) {
|
|
580
|
+
if (semantic || opts.executionTaskId) {
|
|
535
581
|
const accepted = orchestration.submitInput({ ...scopedInput, model: opts.model }, { execute: opts.allowTools ?? false, writeMemory: false }, onTool);
|
|
536
582
|
const lengths = new Map();
|
|
537
583
|
const unsubscribe = orchestration.subscribeText(sessionId, opts.principalId, event => {
|
|
@@ -565,7 +611,7 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
565
611
|
this.logger.warn('Unused admission media cleanup failed', { error: String(error) });
|
|
566
612
|
}
|
|
567
613
|
}
|
|
568
|
-
if (!semantic && !opts.acceptOnly)
|
|
614
|
+
if (!opts.executionTaskId && !semantic && !opts.acceptOnly)
|
|
569
615
|
this.pendingApiSessions.delete(sessionId);
|
|
570
616
|
}
|
|
571
617
|
}
|
|
@@ -3603,6 +3649,15 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
3603
3649
|
}
|
|
3604
3650
|
this.pendingRestarts.add(chatId);
|
|
3605
3651
|
}
|
|
3652
|
+
/**
|
|
3653
|
+
* Format the webβchannel echo. Attribute it to the sender when known so
|
|
3654
|
+
* multi-user web messages are distinguishable in the channel; fall back to the
|
|
3655
|
+
* bare prefix when no sender name is available (senderName is persisted to
|
|
3656
|
+
* history on the adjacent line either way).
|
|
3657
|
+
*/
|
|
3658
|
+
webEchoText(message, senderName) {
|
|
3659
|
+
return senderName ? `π± Web (${senderName}): ${message}` : 'π± Web: ' + message;
|
|
3660
|
+
}
|
|
3606
3661
|
writeAutoForward(chatId, text, format = 'text', forceDeliver = false) {
|
|
3607
3662
|
// LINE has no .forward consumer β route through LineReplyManager's push path.
|
|
3608
3663
|
if (this.channelFor(chatId) === 'line') {
|
|
@@ -4758,6 +4813,17 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
4758
4813
|
*/
|
|
4759
4814
|
async sendApiMessageStream(sessionId, chatId, message, callbacks, opts) {
|
|
4760
4815
|
if (this.orchestrationForApi(sessionId)) {
|
|
4816
|
+
if (opts.executionTaskId) {
|
|
4817
|
+
// A task control applies immediately, then its scoped agent reply streams independently.
|
|
4818
|
+
let detached = false;
|
|
4819
|
+
void this.sendOrchestratedApi(sessionId, chatId, message, opts, text => { if (!detached)
|
|
4820
|
+
callbacks.onChunk({ type: 'text_delta', text }); })
|
|
4821
|
+
.then(result => { if (!detached)
|
|
4822
|
+
callbacks.onDone(result.text, result.attachments); })
|
|
4823
|
+
.catch(error => { if (!detached)
|
|
4824
|
+
callbacks.onError((0, response_errors_1.presentedResponseError)(error)); });
|
|
4825
|
+
return () => { detached = true; };
|
|
4826
|
+
}
|
|
4761
4827
|
if (this.pendingApiSessions.has(sessionId))
|
|
4762
4828
|
throw Object.assign(new Error('Session already has a pending request'), { code: 'CONFLICT' });
|
|
4763
4829
|
const turn = this.turnStreams.start((0, turn_stream_1.turnStreamKey)('api', sessionId), opts.requestId ?? (0, crypto_1.randomUUID)());
|
|
@@ -5585,6 +5651,23 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
5585
5651
|
source: channel, accountId: String(rows[0]?.account_id ?? this.agentConfig.id), chatId: rawChatId,
|
|
5586
5652
|
threadKey: String(rows[0]?.thread_key ?? ''), principalId: opts.principalId },
|
|
5587
5653
|
text: message, requestId, trustedChannelMember: true, metadata: { senderName, senderId: opts.principalId } }, { execute: opts.allowTools ?? false, writeMemory: false });
|
|
5654
|
+
// Echo the web-UI message back to the originating channel so its users see
|
|
5655
|
+
// what was typed from the web (fixes the one-sided conversation on every
|
|
5656
|
+
// channel the endpoint serves, not just Telegram). Placed after the
|
|
5657
|
+
// validation above AND after submitInput has accepted the input into the
|
|
5658
|
+
// store, so a rejected request β whether from validation (Authenticated
|
|
5659
|
+
// principal, Ambiguous/mismatched session, Session not found) or from
|
|
5660
|
+
// admission (QUEUE_FULL, ORCHESTRATION_CLOSING thrown by submitInput) β
|
|
5661
|
+
// sends no phantom echo. channelSourceMap is set first so writeAutoForward
|
|
5662
|
+
// routes to the right channel receiver β the orchestrated path never
|
|
5663
|
+
// reaches the legacy set. forceDeliver=true (null turnId) because the echo
|
|
5664
|
+
// is standalone text no `.replied` marker covers: without it the entry
|
|
5665
|
+
// carries readCurrentTurnId(), which a concurrent channel turn's marker (or
|
|
5666
|
+
// a stale one) with the same turn id would dedup-swallow β defeating the
|
|
5667
|
+
// one-sided-conversation fix. Same convention as the socket-drop notice
|
|
5668
|
+
// (2706) and the reply-failure fallback (3738-3742).
|
|
5669
|
+
this.channelSourceMap.set(rawChatId, channel);
|
|
5670
|
+
this.writeAutoForward(rawChatId, this.webEchoText(message, senderName), 'text', true);
|
|
5588
5671
|
const turn = this.turnStreams.start((0, turn_stream_1.turnStreamKey)(channel, sessionId), requestId);
|
|
5589
5672
|
const sink = (0, turn_stream_1.callbackSink)(callbacks);
|
|
5590
5673
|
turn.attach(sink, 0);
|
|
@@ -5678,6 +5761,15 @@ class AgentRunner extends events_1.EventEmitter {
|
|
|
5678
5761
|
this.channelSourceMap.set(rawChatId, channel);
|
|
5679
5762
|
// Channel sessions use agent-level model (not per-session)
|
|
5680
5763
|
const session = await this.getOrSpawnSession(rawChatId, channel, sessionId);
|
|
5764
|
+
// Echo the web-UI message back to the originating channel so its users see
|
|
5765
|
+
// what was typed from the web (fixes the one-sided conversation on every
|
|
5766
|
+
// channel the endpoint serves, not just Telegram). Placed after
|
|
5767
|
+
// getOrSpawnSession so a rejected request or a failed spawn sends no phantom
|
|
5768
|
+
// echo. channelSourceMap was set just above, so writeAutoForward routes to
|
|
5769
|
+
// the right channel receiver. forceDeliver=true (null turnId): see the
|
|
5770
|
+
// orchestrated path above β the echo is standalone text no `.replied` marker
|
|
5771
|
+
// covers, so a same-turn-id marker must not dedup it away.
|
|
5772
|
+
this.writeAutoForward(rawChatId, this.webEchoText(message, senderName), 'text', true);
|
|
5681
5773
|
// Persist user message (Layer 1 session JSON + Layer 2 history DB)
|
|
5682
5774
|
const uiUserTs = Date.now();
|
|
5683
5775
|
await this.sessionStore.appendTelegramMessage(this.agentConfig.id, rawChatId, sessionId, {
|