agentxgo 0.0.0-stage → 0.1.1
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 +9 -2
- package/dist/adapters/codex/client.js +6 -0
- package/dist/adapters/dsh/client.js +6 -0
- package/dist/adapters/runtime-http/client.js +101 -0
- package/dist/adapters/runtime-http/endpoint.js +15 -0
- package/dist/bootstrap.js +161 -0
- package/dist/cli.js +134 -0
- package/dist/communication/assembly.js +172 -0
- package/dist/communication/calls.js +107 -0
- package/dist/communication/config.js +33 -0
- package/dist/communication/pump.js +136 -0
- package/dist/computer/authority.js +67 -0
- package/dist/computer/automatic.js +163 -0
- package/dist/computer/automation-main.js +59 -0
- package/dist/computer/automation.js +229 -0
- package/dist/computer/backend.js +160 -0
- package/dist/computer/clipboard.js +72 -0
- package/dist/computer/config.js +66 -0
- package/dist/computer/controller.js +378 -0
- package/dist/computer/desktop.js +225 -0
- package/dist/computer/job-main.js +114 -0
- package/dist/computer/main.js +9 -0
- package/dist/computer/native.js +28 -0
- package/dist/computer/processes.js +165 -0
- package/dist/computer/release.js +40 -0
- package/dist/computer/scratch.js +171 -0
- package/dist/computer/service.js +46 -0
- package/dist/computer/worker.js +70 -0
- package/dist/config.js +156 -0
- package/dist/continuation/checkpoints.js +98 -0
- package/dist/continuation/commands.js +81 -0
- package/dist/continuation/coordinator.js +490 -0
- package/dist/continuation/corrections.js +154 -0
- package/dist/continuation/events.js +171 -0
- package/dist/continuation/failure.js +93 -0
- package/dist/continuation/listening.js +24 -0
- package/dist/continuation/local-wait.js +67 -0
- package/dist/continuation/observations.js +100 -0
- package/dist/continuation/parking.js +190 -0
- package/dist/continuation/reading.js +77 -0
- package/dist/conversations/pump.js +158 -0
- package/dist/conversations/runtime-http.js +88 -0
- package/dist/deployment/cold-qualification.js +119 -0
- package/dist/deployment/cold-release.js +56 -0
- package/dist/deployment/components/cli.js +45 -0
- package/dist/deployment/components/lock.js +38 -0
- package/dist/deployment/components/manager.js +281 -0
- package/dist/deployment/components/release.js +50 -0
- package/dist/deployment/components/runner.js +15 -0
- package/dist/deployment/components/supervisor.js +289 -0
- package/dist/deployment/components/verify.js +66 -0
- package/dist/deployment/components/windows.js +70 -0
- package/dist/deployment/config.js +89 -0
- package/dist/deployment/failure.js +24 -0
- package/dist/deployment/kernel.js +85 -0
- package/dist/deployment/macos/activate.js +140 -0
- package/dist/deployment/macos/attachment.js +42 -0
- package/dist/deployment/macos/handoff.js +140 -0
- package/dist/deployment/macos/install.js +223 -0
- package/dist/deployment/macos/plan.js +155 -0
- package/dist/deployment/macos/proof.js +24 -0
- package/dist/deployment/main.js +16 -0
- package/dist/deployment/members.js +58 -0
- package/dist/deployment/preflight.js +41 -0
- package/dist/deployment/recovery-route.js +18 -0
- package/dist/deployment/runtime.js +114 -0
- package/dist/deployment/system.js +112 -0
- package/dist/deployment/windows-state.js +32 -0
- package/dist/doctor/config.js +155 -0
- package/dist/doctor/probe.js +212 -0
- package/dist/doctor/process.js +31 -0
- package/dist/doctor/run.js +105 -0
- package/dist/enrollment/cli.js +57 -0
- package/dist/enrollment/defaults.js +54 -0
- package/dist/enrollment/device.js +314 -0
- package/dist/enrollment/login.js +107 -0
- package/dist/enrollment/setup.js +164 -0
- package/dist/enrollment/terminal.js +55 -0
- package/dist/execution/artifact.js +157 -0
- package/dist/execution/codex/authority.js +356 -0
- package/dist/execution/codex/catalog.js +24 -0
- package/dist/execution/codex/config.js +77 -0
- package/dist/execution/codex/directories.js +67 -0
- package/dist/execution/codex/main.js +17 -0
- package/dist/execution/codex/read.js +35 -0
- package/dist/execution/codex/record.js +121 -0
- package/dist/execution/codex/role.js +2 -0
- package/dist/execution/codex/stream.js +2 -0
- package/dist/execution/codex/window-receipts.js +73 -0
- package/dist/execution/codex/wire.js +56 -0
- package/dist/execution/codex/worker.js +143 -0
- package/dist/execution/config.js +215 -0
- package/dist/execution/environment.js +61 -0
- package/dist/execution/gateway.js +212 -0
- package/dist/execution/lease-watchdog.js +172 -0
- package/dist/execution/local.js +159 -0
- package/dist/execution/main.js +71 -0
- package/dist/execution/native/config.js +45 -0
- package/dist/execution/native/input.js +7 -0
- package/dist/execution/native/main.js +9 -0
- package/dist/execution/native/records.js +168 -0
- package/dist/execution/native/worker.js +128 -0
- package/dist/execution/native-job-gate.js +63 -0
- package/dist/execution/process-types.js +1 -0
- package/dist/execution/process.js +246 -0
- package/dist/execution/results.js +111 -0
- package/dist/execution/role.js +210 -0
- package/dist/execution/runner.js +338 -0
- package/dist/execution/scope.js +415 -0
- package/dist/execution/scratch-files.js +352 -0
- package/dist/execution/scratch-paths.js +56 -0
- package/dist/execution/scratch.js +126 -0
- package/dist/execution/stdio.js +83 -0
- package/dist/execution/stream.js +159 -0
- package/dist/execution/watchdog.js +181 -0
- package/dist/execution/work.js +76 -0
- package/dist/execution/worker.js +106 -0
- package/dist/help.js +21 -0
- package/dist/lifecycle/http.js +178 -0
- package/dist/lifecycle/runtime.js +263 -0
- package/dist/lifecycle/status-command.js +78 -0
- package/dist/lifecycle/status.js +37 -0
- package/dist/lifecycle/wake-hints.js +68 -0
- package/dist/main.js +59 -0
- package/dist/ports/reports.js +1 -0
- package/dist/ports/runtime.js +1 -0
- package/dist/preparation/backend.js +44 -0
- package/dist/preparation/binding.js +47 -0
- package/dist/preparation/bootstrap.js +165 -0
- package/dist/preparation/config.js +143 -0
- package/dist/preparation/coordinator.js +251 -0
- package/dist/preparation/main.js +58 -0
- package/dist/preparation/runtime.js +122 -0
- package/dist/receptions/pump.js +109 -0
- package/dist/receptions/runtime-http.js +115 -0
- package/dist/recovery/activation.js +178 -0
- package/dist/recovery/admission.js +95 -0
- package/dist/recovery/automatic-preparation.js +194 -0
- package/dist/recovery/automatic-recovery.js +210 -0
- package/dist/recovery/confirmed-binding.js +45 -0
- package/dist/recovery/coordinator.js +351 -0
- package/dist/recovery/execution-policy.js +26 -0
- package/dist/recovery/preparation-policy.js +30 -0
- package/dist/recovery/prestart.js +62 -0
- package/dist/recovery/quarantine.js +153 -0
- package/dist/recovery/service-restart-view.js +32 -0
- package/dist/recovery/service-restart.js +368 -0
- package/dist/reports/pump.js +98 -0
- package/dist/resources/admission.js +25 -0
- package/dist/resources/guard.js +14 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/account.js +42 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/connection-file.js +32 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/direct.js +114 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/local.js +238 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/operations-arguments.js +20 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/operations-communication.js +56 -0
- package/node_modules/@agent-stack/adapter-agentim/dist/operations-operator.js +40 -0
- package/node_modules/@agent-stack/adapter-agentim/package.json +15 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/automatic-activation.js +94 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/automatic-preparation.js +90 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/checkpoint-seal.js +89 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/communication.js +238 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/computer-scratch.js +56 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/computer.js +183 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/database.js +174 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/index.js +4 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/input.js +55 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/journal.js +396 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/models.js +35 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/native-calls.js +123 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/native-window.js +12 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/observations.js +237 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/preparation.js +117 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/recovery-history.js +30 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/recovery-record.js +32 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/recovery.js +256 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/reports.js +105 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/runtime-events.js +246 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/runtime-settings.js +95 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/target-actions.js +355 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/target-local.js +210 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/target-scratch.js +207 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/terminal-checkpoints.js +286 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/terminal-store.js +136 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/trace-inputs.js +104 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/upgrade.js +25 -0
- package/node_modules/@agent-stack/bot-host-journal/dist/waits.js +213 -0
- package/node_modules/@agent-stack/bot-host-journal/package.json +10 -0
- package/node_modules/@agent-stack/bridge-client/dist/bot-transport.js +339 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/agents.js +22 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/assistant.js +26 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/auth.js +9 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/client.js +160 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/inventory.js +55 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/native-events.js +52 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/owner-route.js +21 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/reports.js +41 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bots/runtime.js +190 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/bridge-client.js +37 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/core.js +123 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/deployments.js +57 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/integrations.js +45 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/knowledge.js +33 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/management.js +112 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/platform-events.js +59 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/platform.js +82 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/public-runtime.js +94 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/run-work-acknowledgement.js +54 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/run-work-errors.js +34 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/runtime.js +46 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/tenant/authorization.js +7 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/tenant/management.js +59 -0
- package/node_modules/@agent-stack/bridge-client/dist/client/workspace.js +109 -0
- package/node_modules/@agent-stack/bridge-client/dist/index.js +9 -0
- package/node_modules/@agent-stack/bridge-client/package.json +11 -0
- package/node_modules/@agent-stack/contracts/dist/api-credentials.js +103 -0
- package/node_modules/@agent-stack/contracts/dist/bots/assistant-path.js +24 -0
- package/node_modules/@agent-stack/contracts/dist/bots/assistant.js +2 -0
- package/node_modules/@agent-stack/contracts/dist/bots/capabilities.js +66 -0
- package/node_modules/@agent-stack/contracts/dist/bots/capability-migration.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/capability-version.js +48 -0
- package/node_modules/@agent-stack/contracts/dist/bots/codex-policy.js +22 -0
- package/node_modules/@agent-stack/contracts/dist/bots/command-evidence.js +101 -0
- package/node_modules/@agent-stack/contracts/dist/bots/command-inventory.js +74 -0
- package/node_modules/@agent-stack/contracts/dist/bots/command-receipt.js +78 -0
- package/node_modules/@agent-stack/contracts/dist/bots/communication-native.js +33 -0
- package/node_modules/@agent-stack/contracts/dist/bots/communication-stream.js +13 -0
- package/node_modules/@agent-stack/contracts/dist/bots/communication.js +154 -0
- package/node_modules/@agent-stack/contracts/dist/bots/component-status.js +38 -0
- package/node_modules/@agent-stack/contracts/dist/bots/components.js +10 -0
- package/node_modules/@agent-stack/contracts/dist/bots/computer-validation.js +320 -0
- package/node_modules/@agent-stack/contracts/dist/bots/computer.js +10 -0
- package/node_modules/@agent-stack/contracts/dist/bots/conversations.js +31 -0
- package/node_modules/@agent-stack/contracts/dist/bots/corrections.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/delegation-renewal.js +17 -0
- package/node_modules/@agent-stack/contracts/dist/bots/delegation.js +35 -0
- package/node_modules/@agent-stack/contracts/dist/bots/delivery-history.js +115 -0
- package/node_modules/@agent-stack/contracts/dist/bots/delivery-read.js +121 -0
- package/node_modules/@agent-stack/contracts/dist/bots/elicitation.js +83 -0
- package/node_modules/@agent-stack/contracts/dist/bots/entries.js +65 -0
- package/node_modules/@agent-stack/contracts/dist/bots/event-exchanges.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/goal-window.js +84 -0
- package/node_modules/@agent-stack/contracts/dist/bots/host-actions.js +191 -0
- package/node_modules/@agent-stack/contracts/dist/bots/identities.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/index.js +72 -0
- package/node_modules/@agent-stack/contracts/dist/bots/installation.js +9 -0
- package/node_modules/@agent-stack/contracts/dist/bots/interaction-validation.js +227 -0
- package/node_modules/@agent-stack/contracts/dist/bots/interactions.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/lifecycle.js +13 -0
- package/node_modules/@agent-stack/contracts/dist/bots/local-execution.js +72 -0
- package/node_modules/@agent-stack/contracts/dist/bots/mcp-capabilities.js +53 -0
- package/node_modules/@agent-stack/contracts/dist/bots/mission.js +3 -0
- package/node_modules/@agent-stack/contracts/dist/bots/model-routing.js +43 -0
- package/node_modules/@agent-stack/contracts/dist/bots/native-events-validation.js +229 -0
- package/node_modules/@agent-stack/contracts/dist/bots/native-events.js +4 -0
- package/node_modules/@agent-stack/contracts/dist/bots/native-fact.js +32 -0
- package/node_modules/@agent-stack/contracts/dist/bots/native-host.js +10 -0
- package/node_modules/@agent-stack/contracts/dist/bots/observation.js +42 -0
- package/node_modules/@agent-stack/contracts/dist/bots/owner-progress.js +85 -0
- package/node_modules/@agent-stack/contracts/dist/bots/owner-transition.js +169 -0
- package/node_modules/@agent-stack/contracts/dist/bots/parking.js +75 -0
- package/node_modules/@agent-stack/contracts/dist/bots/preferences.js +39 -0
- package/node_modules/@agent-stack/contracts/dist/bots/preparations.js +2 -0
- package/node_modules/@agent-stack/contracts/dist/bots/project-oauth.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/quarantine-installation.js +117 -0
- package/node_modules/@agent-stack/contracts/dist/bots/quarantine.js +186 -0
- package/node_modules/@agent-stack/contracts/dist/bots/read-recovery.js +10 -0
- package/node_modules/@agent-stack/contracts/dist/bots/receptions.js +7 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery-admission.js +163 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery-errors.js +51 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery-history.js +90 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery-source.js +164 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery-validation.js +160 -0
- package/node_modules/@agent-stack/contracts/dist/bots/recovery.js +13 -0
- package/node_modules/@agent-stack/contracts/dist/bots/relay.js +21 -0
- package/node_modules/@agent-stack/contracts/dist/bots/report-status.js +99 -0
- package/node_modules/@agent-stack/contracts/dist/bots/reports.js +8 -0
- package/node_modules/@agent-stack/contracts/dist/bots/restart-source.js +151 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime-command.js +59 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime-input.js +80 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime-provider.js +12 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime-settings.js +63 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime-validation.js +35 -0
- package/node_modules/@agent-stack/contracts/dist/bots/runtime.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/same-native.js +44 -0
- package/node_modules/@agent-stack/contracts/dist/bots/service-restart.js +80 -0
- package/node_modules/@agent-stack/contracts/dist/bots/status.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/sync.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/bots/targets.js +95 -0
- package/node_modules/@agent-stack/contracts/dist/bots/validation.js +82 -0
- package/node_modules/@agent-stack/contracts/dist/bots/versions.js +6 -0
- package/node_modules/@agent-stack/contracts/dist/bots/wake-hints.js +20 -0
- package/node_modules/@agent-stack/contracts/dist/bots/work-brief.js +120 -0
- package/node_modules/@agent-stack/contracts/dist/bots/work-control.js +47 -0
- package/node_modules/@agent-stack/contracts/dist/bots/work-events.js +38 -0
- package/node_modules/@agent-stack/contracts/dist/browser-chat-attachment.js +66 -0
- package/node_modules/@agent-stack/contracts/dist/business-outcomes.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/chat-attachment.js +70 -0
- package/node_modules/@agent-stack/contracts/dist/chat-stream.js +105 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/agent-ui.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/base.js +6 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/deployments.js +6 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/index.js +8 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/integrations.js +13 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/knowledge.js +69 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/live.js +56 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/runtime.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/contracts/workspace.js +9 -0
- package/node_modules/@agent-stack/contracts/dist/delivery-targets.js +139 -0
- package/node_modules/@agent-stack/contracts/dist/desktop-mcp.js +105 -0
- package/node_modules/@agent-stack/contracts/dist/employee-association.js +31 -0
- package/node_modules/@agent-stack/contracts/dist/event-links.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/execution-oauth-callback.js +61 -0
- package/node_modules/@agent-stack/contracts/dist/host-page-context.js +156 -0
- package/node_modules/@agent-stack/contracts/dist/index.js +115 -0
- package/node_modules/@agent-stack/contracts/dist/installation-lifecycle.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/installation-mcp.js +5 -0
- package/node_modules/@agent-stack/contracts/dist/installations.js +7 -0
- package/node_modules/@agent-stack/contracts/dist/integration-context.js +22 -0
- package/node_modules/@agent-stack/contracts/dist/integration-oauth.js +23 -0
- package/node_modules/@agent-stack/contracts/dist/integration-runtime.js +107 -0
- package/node_modules/@agent-stack/contracts/dist/interactive-run-wake.js +78 -0
- package/node_modules/@agent-stack/contracts/dist/interactive-work-acknowledgement.js +74 -0
- package/node_modules/@agent-stack/contracts/dist/interactive-work-events.js +131 -0
- package/node_modules/@agent-stack/contracts/dist/interactive-work-sources.js +142 -0
- package/node_modules/@agent-stack/contracts/dist/knowledge-attachment.js +50 -0
- package/node_modules/@agent-stack/contracts/dist/knowledge-catalog.js +94 -0
- package/node_modules/@agent-stack/contracts/dist/knowledge-organization.js +87 -0
- package/node_modules/@agent-stack/contracts/dist/live-audio.js +46 -0
- package/node_modules/@agent-stack/contracts/dist/live-business.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/live-human.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/live-transport.js +2 -0
- package/node_modules/@agent-stack/contracts/dist/mcp-directory.js +7 -0
- package/node_modules/@agent-stack/contracts/dist/mcp-refresh.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/mcp-scopes.js +24 -0
- package/node_modules/@agent-stack/contracts/dist/native-studio-installation.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/oauth-authorization.js +19 -0
- package/node_modules/@agent-stack/contracts/dist/platform-events.js +182 -0
- package/node_modules/@agent-stack/contracts/dist/reply-presentation.js +59 -0
- package/node_modules/@agent-stack/contracts/dist/reply.js +129 -0
- package/node_modules/@agent-stack/contracts/dist/request-body.js +38 -0
- package/node_modules/@agent-stack/contracts/dist/schedules.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/task-work-events.js +107 -0
- package/node_modules/@agent-stack/contracts/dist/tasks.js +200 -0
- package/node_modules/@agent-stack/contracts/dist/templates.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/access-schemas.js +149 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/access-views.js +17 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/access.js +132 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/actions.js +173 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/attachments.js +68 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/authorization.js +160 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/capabilities.js +98 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/connections.js +31 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/conversation-work-events.js +72 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/conversation-work-schemas.js +136 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/conversations.js +31 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/deliveries.js +120 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/delivery-views.js +38 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/deployment-catalog.js +50 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/descriptor.js +50 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/events.js +39 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/feedback.js +161 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/guidance.js +284 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/host-enrollment.js +51 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/identity.js +31 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/installation-schemas.js +350 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/installation-views.js +69 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/installations.js +217 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/integration-configuration.js +96 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/integration-oauth.js +85 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/integrations.js +75 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/json.js +96 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-management-input.js +211 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-management-results.js +145 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-management-schemas.js +139 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-management.js +32 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-organization.js +96 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-program-input.js +111 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-program-results.js +234 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/knowledge-programs.js +15 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/live.js +63 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/marketplace-schemas.js +110 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/marketplaces.js +51 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/mcp-directory.js +98 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/native-operations.js +113 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/operations.js +36 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/outcome-schemas.js +121 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/outcomes.js +87 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/queries.js +24 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/resource-views.js +463 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/resources.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/schedule-schemas.js +122 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/schedule-views.js +22 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/schedules.js +109 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/schemas.js +117 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/settings.js +34 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/sse.js +58 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/task-schemas.js +89 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/task-views.js +34 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/tasks.js +41 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/tests.js +1 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/transport.js +2 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/usage.js +61 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/views.js +52 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/widgets.js +215 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/work-changes.js +71 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/work-materials.js +102 -0
- package/node_modules/@agent-stack/contracts/dist/tenant/workspace-resources.js +87 -0
- package/node_modules/@agent-stack/contracts/dist/widget-authorization.js +55 -0
- package/node_modules/@agent-stack/contracts/dist/widget-avatar.js +24 -0
- package/node_modules/@agent-stack/contracts/dist/widget-context.js +57 -0
- package/node_modules/@agent-stack/contracts/dist/widget-conversation.js +13 -0
- package/node_modules/@agent-stack/contracts/dist/widget-host-auth.js +142 -0
- package/node_modules/@agent-stack/contracts/dist/widget-origin.js +16 -0
- package/node_modules/@agent-stack/contracts/dist/widget-turn.js +84 -0
- package/node_modules/@agent-stack/contracts/package.json +8 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/authority.js +64 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/bootstrap.js +81 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/codex-record.js +37 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/codex-target.js +56 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/conversation.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/index.js +7 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/process-identity.js +18 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/quarantine-material.js +9 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/recovery-inspection.js +103 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/bot/service.js +3 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/index.js +7 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/json.js +169 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/observation.js +40 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/runtime.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/trace.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/types.js +32 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/wire.js +167 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/execution/wire.schema.json +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/index.js +31 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/interactive-run-wake.js +190 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/legacy.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/mcp.js +53 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/native-studio-connection.js +46 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/native-studio-execution.js +100 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/native-studio-registration.js +193 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/oauth-context.js +38 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/personal-mcp.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/signing.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/source-reply.js +153 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/storage.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/target-environment.js +45 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/tenant-management.js +57 -0
- package/node_modules/@agent-stack/runtime-contracts/dist/tool-trace.js +1 -0
- package/node_modules/@agent-stack/runtime-contracts/package.json +13 -0
- package/node_modules/@agentims/adapter/dist/authority/binding.js +40 -0
- package/node_modules/@agentims/adapter/dist/delivery/coordinator.js +202 -0
- package/node_modules/@agentims/adapter/dist/delivery/decision.js +51 -0
- package/node_modules/@agentims/adapter/dist/delivery/record.js +24 -0
- package/node_modules/@agentims/adapter/dist/delivery/types.js +1 -0
- package/node_modules/@agentims/adapter/dist/errors.js +40 -0
- package/node_modules/@agentims/adapter/dist/index.js +5 -0
- package/node_modules/@agentims/adapter/dist/lifecycle/budget.js +30 -0
- package/node_modules/@agentims/adapter/dist/receipts/send.js +24 -0
- package/node_modules/@agentims/adapter/dist/source/event-source.js +153 -0
- package/node_modules/@agentims/adapter/dist/source/types.js +1 -0
- package/node_modules/@agentims/adapter/dist/status/adapter-status.js +46 -0
- package/node_modules/@agentims/adapter/package.json +10 -0
- package/node_modules/@agentims/runtime/dist/accounts/backup.js +39 -0
- package/node_modules/@agentims/runtime/dist/accounts/communication.js +14 -0
- package/node_modules/@agentims/runtime/dist/accounts/context.js +36 -0
- package/node_modules/@agentims/runtime/dist/accounts/credential-lifecycle.js +57 -0
- package/node_modules/@agentims/runtime/dist/accounts/errors.js +13 -0
- package/node_modules/@agentims/runtime/dist/accounts/login.js +32 -0
- package/node_modules/@agentims/runtime/dist/accounts/password.js +18 -0
- package/node_modules/@agentims/runtime/dist/accounts/register.js +30 -0
- package/node_modules/@agentims/runtime/dist/accounts/selection.js +93 -0
- package/node_modules/@agentims/runtime/dist/accounts/types.js +1 -0
- package/node_modules/@agentims/runtime/dist/authentication/intent.js +15 -0
- package/node_modules/@agentims/runtime/dist/authentication/journals.js +39 -0
- package/node_modules/@agentims/runtime/dist/authentication/methods.js +42 -0
- package/node_modules/@agentims/runtime/dist/authentication/selection.js +20 -0
- package/node_modules/@agentims/runtime/dist/authentication/status.js +42 -0
- package/node_modules/@agentims/runtime/dist/cli/account-commands.js +72 -0
- package/node_modules/@agentims/runtime/dist/cli/arguments.js +120 -0
- package/node_modules/@agentims/runtime/dist/cli/authentication.js +22 -0
- package/node_modules/@agentims/runtime/dist/cli/command-names.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/account-authorization.js +12 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/cache-inspection.js +8 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/cache.js +14 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/catalog.js +40 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/contacts.js +5 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/conversations.js +15 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/definition.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/deliveries-native.js +6 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/deliveries.js +10 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/devices-native.js +7 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/discovery.js +4 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/drafts.js +6 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption-dehydration.js +13 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption-native.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption-recovery.js +11 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption-reset.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption-secrets.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/encryption.js +12 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/identity.js +10 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/location.js +7 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/matrix-capabilities.js +38 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/matrix-identity.js +12 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/matrix-rooms.js +23 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/media.js +12 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/messages-native.js +8 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/messages.js +10 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/native-inspection.js +24 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/native-preferences.js +11 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/native-requests.js +6 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/oauth.js +15 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/outbox.js +10 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/pairing.js +8 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/profiles.js +6 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/qr-authorization.js +6 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/reliability.js +8 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/room-management.js +17 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/rtc.js +14 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/search.js +11 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/sync-qr.js +9 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/timeline-native.js +10 -0
- package/node_modules/@agentims/runtime/dist/cli/commands/verification-native.js +7 -0
- package/node_modules/@agentims/runtime/dist/cli/errors.js +83 -0
- package/node_modules/@agentims/runtime/dist/cli/help.js +74 -0
- package/node_modules/@agentims/runtime/dist/cli/history-commands.js +13 -0
- package/node_modules/@agentims/runtime/dist/cli/input.js +82 -0
- package/node_modules/@agentims/runtime/dist/cli/main.js +19 -0
- package/node_modules/@agentims/runtime/dist/cli/output.js +71 -0
- package/node_modules/@agentims/runtime/dist/cli/password-input.js +36 -0
- package/node_modules/@agentims/runtime/dist/cli/run.js +90 -0
- package/node_modules/@agentims/runtime/dist/cli/update-commands.js +76 -0
- package/node_modules/@agentims/runtime/dist/configuration/account-credential.js +30 -0
- package/node_modules/@agentims/runtime/dist/configuration/connection-descriptor.js +18 -0
- package/node_modules/@agentims/runtime/dist/configuration/device-binding.js +41 -0
- package/node_modules/@agentims/runtime/dist/configuration/environment.js +43 -0
- package/node_modules/@agentims/runtime/dist/configuration/executable.js +49 -0
- package/node_modules/@agentims/runtime/dist/configuration/http.js +4 -0
- package/node_modules/@agentims/runtime/dist/configuration/native-settings.js +13 -0
- package/node_modules/@agentims/runtime/dist/configuration/node-version.js +8 -0
- package/node_modules/@agentims/runtime/dist/configuration/private-state.js +115 -0
- package/node_modules/@agentims/runtime/dist/configuration/service-origin.js +48 -0
- package/node_modules/@agentims/runtime/dist/configuration/windows-command.js +14 -0
- package/node_modules/@agentims/runtime/dist/configuration/windows-security.js +13 -0
- package/node_modules/@agentims/runtime/dist/history/backup.js +45 -0
- package/node_modules/@agentims/runtime/dist/history/online.js +48 -0
- package/node_modules/@agentims/runtime/dist/history/recovery-file.js +19 -0
- package/node_modules/@agentims/runtime/dist/history/restore.js +19 -0
- package/node_modules/@agentims/runtime/dist/index.js +31 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/communication.js +66 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/embedded.js +24 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/foreground-connection.js +61 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/foreground.js +47 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/identity.js +46 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/process-priority.js +22 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/process.js +60 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/shutdown-lease.js +90 -0
- package/node_modules/@agentims/runtime/dist/lifecycle/start.js +69 -0
- package/node_modules/@agentims/runtime/dist/managed/connection.js +29 -0
- package/node_modules/@agentims/runtime/dist/managed/control.js +134 -0
- package/node_modules/@agentims/runtime/dist/managed/directory.js +19 -0
- package/node_modules/@agentims/runtime/dist/managed/errors.js +9 -0
- package/node_modules/@agentims/runtime/dist/managed/lease.js +32 -0
- package/node_modules/@agentims/runtime/dist/managed/shutdown.js +63 -0
- package/node_modules/@agentims/runtime/dist/managed/state.js +82 -0
- package/node_modules/@agentims/runtime/dist/storage/archive.js +89 -0
- package/node_modules/@agentims/runtime/dist/supervision/command.js +13 -0
- package/node_modules/@agentims/runtime/dist/supervision/launchd.js +64 -0
- package/node_modules/@agentims/runtime/dist/supervision/select.js +13 -0
- package/node_modules/@agentims/runtime/dist/supervision/service.js +4 -0
- package/node_modules/@agentims/runtime/dist/supervision/systemd.js +34 -0
- package/node_modules/@agentims/runtime/dist/supervision/windows.js +20 -0
- package/node_modules/@agentims/runtime/dist/updates/activation.js +65 -0
- package/node_modules/@agentims/runtime/dist/updates/admission.js +15 -0
- package/node_modules/@agentims/runtime/dist/updates/archive.js +45 -0
- package/node_modules/@agentims/runtime/dist/updates/binding-preflight.js +25 -0
- package/node_modules/@agentims/runtime/dist/updates/continuity.js +45 -0
- package/node_modules/@agentims/runtime/dist/updates/device-archive.js +43 -0
- package/node_modules/@agentims/runtime/dist/updates/discovery.js +91 -0
- package/node_modules/@agentims/runtime/dist/updates/download.js +66 -0
- package/node_modules/@agentims/runtime/dist/updates/embedded.js +143 -0
- package/node_modules/@agentims/runtime/dist/updates/host-continuation.js +43 -0
- package/node_modules/@agentims/runtime/dist/updates/inspection-config.js +18 -0
- package/node_modules/@agentims/runtime/dist/updates/installation-integrity.js +35 -0
- package/node_modules/@agentims/runtime/dist/updates/installation.js +134 -0
- package/node_modules/@agentims/runtime/dist/updates/ledger.js +75 -0
- package/node_modules/@agentims/runtime/dist/updates/locking.js +17 -0
- package/node_modules/@agentims/runtime/dist/updates/managed.js +271 -0
- package/node_modules/@agentims/runtime/dist/updates/manifest.js +97 -0
- package/node_modules/@agentims/runtime/dist/updates/offline.js +56 -0
- package/node_modules/@agentims/runtime/dist/updates/owner.js +14 -0
- package/node_modules/@agentims/runtime/dist/updates/pending.js +20 -0
- package/node_modules/@agentims/runtime/dist/updates/policy.js +73 -0
- package/node_modules/@agentims/runtime/dist/updates/records.js +33 -0
- package/node_modules/@agentims/runtime/dist/updates/restart.js +80 -0
- package/node_modules/@agentims/runtime/dist/updates/shutdown-owner.js +74 -0
- package/node_modules/@agentims/runtime/dist/updates/shutdown-proof.js +35 -0
- package/node_modules/@agentims/runtime/dist/updates/types.js +16 -0
- package/node_modules/@agentims/runtime/dist/updates/version.js +40 -0
- package/node_modules/@agentims/runtime/dist/updates/watch.js +87 -0
- package/node_modules/@agentims/runtime/package.json +11 -0
- package/node_modules/@agentims/sdk/dist/api/client.js +15 -0
- package/node_modules/@agentims/sdk/dist/api/embedded-options.js +1 -0
- package/node_modules/@agentims/sdk/dist/api/embedded.js +28 -0
- package/node_modules/@agentims/sdk/dist/api/errors.js +43 -0
- package/node_modules/@agentims/sdk/dist/api/facade.js +92 -0
- package/node_modules/@agentims/sdk/dist/api/json-value.js +1 -0
- package/node_modules/@agentims/sdk/dist/api/options.js +1 -0
- package/node_modules/@agentims/sdk/dist/api/request-data.js +43 -0
- package/node_modules/@agentims/sdk/dist/api/sdk-info.js +9 -0
- package/node_modules/@agentims/sdk/dist/features/account/client.js +57 -0
- package/node_modules/@agentims/sdk/dist/features/account/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/account/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/cache/client.js +40 -0
- package/node_modules/@agentims/sdk/dist/features/cache/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/cache/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/configuration/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/configuration/schema.js +8 -0
- package/node_modules/@agentims/sdk/dist/features/configuration/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/contacts/client.js +12 -0
- package/node_modules/@agentims/sdk/dist/features/contacts/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/contacts/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/conversations/client.js +54 -0
- package/node_modules/@agentims/sdk/dist/features/conversations/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/conversations/matrix.js +61 -0
- package/node_modules/@agentims/sdk/dist/features/conversations/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/deliveries/client.js +41 -0
- package/node_modules/@agentims/sdk/dist/features/deliveries/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/deliveries/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/devices/client.js +36 -0
- package/node_modules/@agentims/sdk/dist/features/devices/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/devices/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/directory/client.js +36 -0
- package/node_modules/@agentims/sdk/dist/features/directory/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/directory/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/discovery/client.js +9 -0
- package/node_modules/@agentims/sdk/dist/features/discovery/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/discovery/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/drafts/client.js +16 -0
- package/node_modules/@agentims/sdk/dist/features/drafts/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/drafts/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/encryption/client.js +105 -0
- package/node_modules/@agentims/sdk/dist/features/encryption/dehydration.js +36 -0
- package/node_modules/@agentims/sdk/dist/features/encryption/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/encryption/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/events/client.js +45 -0
- package/node_modules/@agentims/sdk/dist/features/events/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/events/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/identity/client.js +77 -0
- package/node_modules/@agentims/sdk/dist/features/identity/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/identity/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/location/client.js +18 -0
- package/node_modules/@agentims/sdk/dist/features/location/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/location/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/media/client.js +34 -0
- package/node_modules/@agentims/sdk/dist/features/media/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/media/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/messages/client.js +43 -0
- package/node_modules/@agentims/sdk/dist/features/messages/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/messages/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/notifications/client.js +42 -0
- package/node_modules/@agentims/sdk/dist/features/notifications/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/notifications/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/oauth/client.js +52 -0
- package/node_modules/@agentims/sdk/dist/features/oauth/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/oauth/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/operations/client.js +16 -0
- package/node_modules/@agentims/sdk/dist/features/operations/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/operations/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/outbox/client.js +25 -0
- package/node_modules/@agentims/sdk/dist/features/outbox/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/outbox/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/pairing/client.js +48 -0
- package/node_modules/@agentims/sdk/dist/features/pairing/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/pairing/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/presence/client.js +15 -0
- package/node_modules/@agentims/sdk/dist/features/presence/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/presence/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/profiles/client.js +15 -0
- package/node_modules/@agentims/sdk/dist/features/profiles/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/profiles/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/reliability/client.js +32 -0
- package/node_modules/@agentims/sdk/dist/features/reliability/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/reliability/observe.js +48 -0
- package/node_modules/@agentims/sdk/dist/features/reliability/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/rooms/client.js +76 -0
- package/node_modules/@agentims/sdk/dist/features/rooms/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/rooms/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/rtc/client.js +39 -0
- package/node_modules/@agentims/sdk/dist/features/rtc/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/rtc/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/search/client.js +31 -0
- package/node_modules/@agentims/sdk/dist/features/search/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/search/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/sync/client.js +16 -0
- package/node_modules/@agentims/sdk/dist/features/sync/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/sync/types.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/timeline/client.js +27 -0
- package/node_modules/@agentims/sdk/dist/features/timeline/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/timeline/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/features/verification/client.js +33 -0
- package/node_modules/@agentims/sdk/dist/features/verification/index.js +1 -0
- package/node_modules/@agentims/sdk/dist/features/verification/types.js +3 -0
- package/node_modules/@agentims/sdk/dist/index.js +7 -0
- package/node_modules/@agentims/sdk/dist/internal/native/binding.js +85 -0
- package/node_modules/@agentims/sdk/dist/internal/native/platform-resource.js +15 -0
- package/node_modules/@agentims/sdk/dist/internal/native/secrets-export.js +27 -0
- package/node_modules/@agentims/sdk/dist/internal/native/transport.js +92 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/codec.js +69 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/input.js +38 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/native-settings.js +48 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/operations.json +1 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/registry.js +72 -0
- package/node_modules/@agentims/sdk/dist/internal/protocol/schema.js +133 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/client.js +102 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/error-diagnostics.js +50 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/request.js +59 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/response.js +94 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/retry-after.js +21 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/stream-diagnostics.js +19 -0
- package/node_modules/@agentims/sdk/dist/internal/transport/types.js +1 -0
- package/node_modules/@agentims/sdk/package.json +8 -0
- package/package.json +31 -4
- package/release.json +746 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { createServer } from 'node:http';
|
|
2
|
+
import { botChoice, botId, botInteger, botObject, } from '@agent-stack/contracts';
|
|
3
|
+
import { matchesHostSecret } from './status.js';
|
|
4
|
+
export function createHostServer(coordinator, token, offline, reportStatus, conversationStatus, agentim, communicationStatus, execution) {
|
|
5
|
+
const send = (res, status, body) => {
|
|
6
|
+
res.writeHead(status, { 'content-type': 'application/json', 'cache-control': 'no-store' });
|
|
7
|
+
res.end(JSON.stringify(body));
|
|
8
|
+
};
|
|
9
|
+
const handle = async (req, res) => {
|
|
10
|
+
if (req.method === 'GET' && ['/health', '/ready'].includes(req.url ?? '')) {
|
|
11
|
+
const ready = [
|
|
12
|
+
'CONNECTED',
|
|
13
|
+
'WAITING',
|
|
14
|
+
'PENDING_NATIVE',
|
|
15
|
+
'PENDING_ADOPTION',
|
|
16
|
+
'PENDING_INPUT',
|
|
17
|
+
].includes(coordinator.status);
|
|
18
|
+
return send(res, req.url === '/health' || ready ? 200 : 503, {
|
|
19
|
+
status: coordinator.status,
|
|
20
|
+
// 保留部署探针的控制语义;公开监听摘要不携带房间、过滤器或旧批次引用。
|
|
21
|
+
controlReady: ready,
|
|
22
|
+
listening: {
|
|
23
|
+
state: coordinator.listeningStatus.state,
|
|
24
|
+
observedAtMs: coordinator.listeningStatus.observedAtMs,
|
|
25
|
+
},
|
|
26
|
+
reportStatus: reportStatus?.() ?? null,
|
|
27
|
+
// 公开健康状态仅提供通信可用性,原事件回证走认证入口。
|
|
28
|
+
...(communicationStatus ? { communicationStatus: communicationStatus() } : {}),
|
|
29
|
+
...(conversationStatus ? { interactionStatus: conversationStatus() } : {}),
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const agentimRequest = req.method === 'POST' && req.url === '/agentim';
|
|
33
|
+
const settingsRequest = req.method === 'POST' && req.url === '/runtime';
|
|
34
|
+
const offlineRequest = req.method === 'POST' && req.url === '/runtime/offline';
|
|
35
|
+
// 沿本Host私有诊断身份读原轨迹,不接受其它execution/tenant选择器。
|
|
36
|
+
const traceRead = req.method === 'GET' && req.url?.startsWith('/trace?');
|
|
37
|
+
const statusRead = req.method === 'GET' && req.url === '/status';
|
|
38
|
+
const doctorRead = (req.method === 'GET' &&
|
|
39
|
+
['/recovery', '/listening', '/recovery/native'].includes(req.url ?? '')) ||
|
|
40
|
+
(req.method === 'POST' && req.url === '/doctor/recheck');
|
|
41
|
+
const value = req.headers[offlineRequest ? 'x-bot-runtime-token' : 'x-bot-host-control-token'];
|
|
42
|
+
const expected = offlineRequest ? offline?.token : token;
|
|
43
|
+
// 原Runtime令牌与本Bot执行凭据共同限定诊断范围,不能借共享Runtime访问其它Host。
|
|
44
|
+
const doctorRuntime = (doctorRead || statusRead || traceRead || settingsRequest || agentimRequest) &&
|
|
45
|
+
matchesHostSecret(req.headers['x-bot-runtime-token'], offline?.token) &&
|
|
46
|
+
matchesHostSecret(req.headers['x-agentxgo-api-credential'], offline?.credential);
|
|
47
|
+
if (!matchesHostSecret(value, expected) && !doctorRuntime) {
|
|
48
|
+
req.resume();
|
|
49
|
+
return send(res, 401, { error: 'BOT_HOST_AUTH_REQUIRED' });
|
|
50
|
+
}
|
|
51
|
+
if (statusRead && execution) {
|
|
52
|
+
req.resume();
|
|
53
|
+
return send(res, 200, execution.status());
|
|
54
|
+
}
|
|
55
|
+
if (req.method === 'POST' && req.url === '/doctor/recheck') {
|
|
56
|
+
req.resume();
|
|
57
|
+
// 交给原执行循环,忙碌期间也保留提示,且不会启动第二个 tick。
|
|
58
|
+
if (!execution)
|
|
59
|
+
return send(res, 503, { error: 'BOT_HOST_RECHECK_UNAVAILABLE' });
|
|
60
|
+
execution.recheck();
|
|
61
|
+
return send(res, 202, { accepted: true, operation: 'recheck', status: coordinator.status });
|
|
62
|
+
}
|
|
63
|
+
if (req.method === 'GET' && req.url === '/recovery') {
|
|
64
|
+
req.resume();
|
|
65
|
+
return send(res, 200, coordinator.recoveryStatus);
|
|
66
|
+
}
|
|
67
|
+
if (req.method === 'GET' && req.url === '/listening') {
|
|
68
|
+
req.resume();
|
|
69
|
+
return send(res, 200, coordinator.listeningStatus);
|
|
70
|
+
}
|
|
71
|
+
if (req.method === 'GET' && req.url === '/recovery/native') {
|
|
72
|
+
req.resume();
|
|
73
|
+
return send(res, 200, await coordinator.inspectNativeRecovery());
|
|
74
|
+
}
|
|
75
|
+
if (traceRead) {
|
|
76
|
+
req.resume();
|
|
77
|
+
const params = new URL(req.url, 'http://localhost').searchParams;
|
|
78
|
+
const query = {};
|
|
79
|
+
for (const key of params.keys())
|
|
80
|
+
if (!['afterSequence', 'afterDeliveryId', 'eventId', 'callId', 'requestId'].includes(key) ||
|
|
81
|
+
params.getAll(key).length !== 1)
|
|
82
|
+
throw new Error('BOT_TRACE_QUERY_INVALID');
|
|
83
|
+
if (params.has('afterSequence'))
|
|
84
|
+
query.afterSequence = botInteger(Number(params.get('afterSequence')));
|
|
85
|
+
for (const key of ['eventId', 'callId', 'requestId', 'afterDeliveryId'])
|
|
86
|
+
if (params.has(key))
|
|
87
|
+
query[key] = botId(params.get(key));
|
|
88
|
+
// 只取本机已有控制/同步事实,不查询 Native 或推动一次恢复。
|
|
89
|
+
const { stopRequested, admissionHeld, records } = coordinator.recoveryStatus;
|
|
90
|
+
return send(res, 200, {
|
|
91
|
+
...coordinator.trace(query),
|
|
92
|
+
host: { status: coordinator.status, stopRequested, admissionHeld, records },
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (req.method === 'GET' && req.url?.startsWith('/recovery/activation?')) {
|
|
96
|
+
req.resume();
|
|
97
|
+
const url = new URL(req.url, 'http://localhost');
|
|
98
|
+
if ([...url.searchParams.keys()].some((k) => !['requestId', 'sourceExecutionId'].includes(k)) ||
|
|
99
|
+
url.searchParams.getAll('requestId').length !== 1 ||
|
|
100
|
+
url.searchParams.getAll('sourceExecutionId').length > 1)
|
|
101
|
+
throw new Error('BOT_OWNER_PROGRESS_INPUT_INVALID');
|
|
102
|
+
return send(res, 200, await coordinator.inspectActivation(botId(url.searchParams.get('requestId')), url.searchParams.has('sourceExecutionId')
|
|
103
|
+
? botId(url.searchParams.get('sourceExecutionId'))
|
|
104
|
+
: undefined));
|
|
105
|
+
}
|
|
106
|
+
if (!offlineRequest &&
|
|
107
|
+
!agentimRequest &&
|
|
108
|
+
!settingsRequest &&
|
|
109
|
+
(req.method !== 'POST' || req.url !== '/commands')) {
|
|
110
|
+
req.resume();
|
|
111
|
+
return send(res, 404, { error: 'NOT_FOUND' });
|
|
112
|
+
}
|
|
113
|
+
const chunks = [];
|
|
114
|
+
let size = 0;
|
|
115
|
+
for await (const chunk of req) {
|
|
116
|
+
const b = Buffer.from(chunk);
|
|
117
|
+
size += b.length;
|
|
118
|
+
if (!agentimRequest && size > 32768)
|
|
119
|
+
return send(res, 413, { error: 'BODY_TOO_LARGE' });
|
|
120
|
+
chunks.push(b);
|
|
121
|
+
}
|
|
122
|
+
const parsed = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(Buffer.concat(chunks)));
|
|
123
|
+
if (offlineRequest)
|
|
124
|
+
return send(res, 200, offline.admit(parsed));
|
|
125
|
+
if (agentimRequest) {
|
|
126
|
+
// 客户端停止只取消这一原SDK请求;不停止收件来源,也不将断连当作未执行证明。
|
|
127
|
+
const stop = new AbortController();
|
|
128
|
+
const cancel = () => {
|
|
129
|
+
if (!res.writableEnded)
|
|
130
|
+
stop.abort();
|
|
131
|
+
};
|
|
132
|
+
res.once('close', cancel);
|
|
133
|
+
if (res.destroyed)
|
|
134
|
+
stop.abort();
|
|
135
|
+
try {
|
|
136
|
+
return send(res, 200, agentim
|
|
137
|
+
? await agentim(parsed, stop.signal)
|
|
138
|
+
: { state: 'UNAVAILABLE', code: 'AGENTIM_NOT_CONFIGURED' });
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
res.off('close', cancel);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (settingsRequest)
|
|
145
|
+
return send(res, 200, await coordinator.runtimeSettings.handle(parsed));
|
|
146
|
+
const v = botObject(parsed, ['operation', 'requestId', 'deliveryId', 'expectedTurnId']);
|
|
147
|
+
if (v.operation === 'activate-admission') {
|
|
148
|
+
if (v.deliveryId !== undefined || v.expectedTurnId !== undefined)
|
|
149
|
+
throw new Error('BOT_QUARANTINE_INPUT_INVALID');
|
|
150
|
+
return send(res, 200, await coordinator.activateNativeRecovery(botId(v.requestId)));
|
|
151
|
+
}
|
|
152
|
+
if (v.operation === 'quarantine' ||
|
|
153
|
+
v.operation === 'install-context' ||
|
|
154
|
+
v.operation === 'verify-admission') {
|
|
155
|
+
if (v.deliveryId !== undefined || v.expectedTurnId !== undefined)
|
|
156
|
+
throw new Error('BOT_QUARANTINE_INPUT_INVALID');
|
|
157
|
+
return send(res, 200, await coordinator.quarantineNativeRecovery(botId(v.requestId), v.operation === 'verify-admission' ? 'admit' : v.operation === 'install-context'));
|
|
158
|
+
}
|
|
159
|
+
if (v.operation === 'fence') {
|
|
160
|
+
botId(v.requestId);
|
|
161
|
+
if (v.deliveryId !== undefined || v.expectedTurnId !== undefined)
|
|
162
|
+
throw new Error('BOT_FENCE_INPUT_INVALID');
|
|
163
|
+
return send(res, 200, await coordinator.fence());
|
|
164
|
+
}
|
|
165
|
+
const operation = botChoice(v.operation, ['read', 'history', 'stop', 'steer']);
|
|
166
|
+
const result = await coordinator.control(operation, botId(v.requestId), v.deliveryId === undefined ? undefined : botId(v.deliveryId), v.expectedTurnId === undefined ? undefined : botId(v.expectedTurnId));
|
|
167
|
+
return send(res, 200, result);
|
|
168
|
+
};
|
|
169
|
+
const server = createServer((req, res) => {
|
|
170
|
+
void handle(req, res).catch(() => send(res, 409, { error: 'BOT_HOST_COMMAND_HELD' }));
|
|
171
|
+
});
|
|
172
|
+
server.requestTimeout = 15000;
|
|
173
|
+
server.headersTimeout = 10000;
|
|
174
|
+
server.keepAliveTimeout = 1000;
|
|
175
|
+
server.maxHeadersCount = 32;
|
|
176
|
+
server.maxConnections = 16;
|
|
177
|
+
return server;
|
|
178
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { botRuntimeRequest, canonicalBotJson, } from '@agent-stack/contracts';
|
|
3
|
+
const hash = (value) => createHash('sha256').update(canonicalBotJson(value)).digest('hex');
|
|
4
|
+
const codeOf = (error) => error instanceof Error && /^[A-Z][A-Z0-9_]+$/.test(error.message)
|
|
5
|
+
? error.message
|
|
6
|
+
: 'BOT_RUNTIME_UNAVAILABLE';
|
|
7
|
+
const matches = (native, desired) => native?.selected?.selectionRevision === desired.selectionRevision &&
|
|
8
|
+
Object.entries(desired.settings).every(([key, value]) => native.selected.settings[key] !== undefined &&
|
|
9
|
+
canonicalBotJson(native.selected.settings[key]) ===
|
|
10
|
+
canonicalBotJson(value));
|
|
11
|
+
/** 现有 Host 私有管理面只保存意图和转交 Native,不依赖业务 held/adoption 或中央模型。 */
|
|
12
|
+
export class HostRuntimeSettings {
|
|
13
|
+
config;
|
|
14
|
+
journal;
|
|
15
|
+
native;
|
|
16
|
+
snapshot;
|
|
17
|
+
stopping;
|
|
18
|
+
applying = Promise.resolve(null);
|
|
19
|
+
synchronizing = false;
|
|
20
|
+
closed = false;
|
|
21
|
+
reconciling;
|
|
22
|
+
reads = new Set();
|
|
23
|
+
applications = new Map();
|
|
24
|
+
observed = null;
|
|
25
|
+
bindingKey;
|
|
26
|
+
constructor(config, journal, native, snapshot, stopping) {
|
|
27
|
+
this.config = config;
|
|
28
|
+
this.journal = journal;
|
|
29
|
+
this.native = native;
|
|
30
|
+
this.snapshot = snapshot;
|
|
31
|
+
this.stopping = stopping;
|
|
32
|
+
this.bindingKey = hash([config.project, config.hostId]);
|
|
33
|
+
}
|
|
34
|
+
identity() {
|
|
35
|
+
const s = this.snapshot();
|
|
36
|
+
if (s?.botId) {
|
|
37
|
+
if (this.config.botId && this.config.botId !== s.botId)
|
|
38
|
+
throw new Error('BOT_RUNTIME_IDENTITY_MISMATCH');
|
|
39
|
+
this.journal.runtimeSettings.bind(this.bindingKey, this.config.executionId, s.botId);
|
|
40
|
+
}
|
|
41
|
+
return (this.config.botId ??
|
|
42
|
+
s?.botId ??
|
|
43
|
+
this.journal.runtimeSettings.identity(this.bindingKey, this.config.executionId));
|
|
44
|
+
}
|
|
45
|
+
key(role) {
|
|
46
|
+
const bot = this.identity();
|
|
47
|
+
return bot ? hash([this.config.project, bot, role]) : null;
|
|
48
|
+
}
|
|
49
|
+
context() {
|
|
50
|
+
return {
|
|
51
|
+
schemaVersion: 1,
|
|
52
|
+
executionId: this.config.executionId,
|
|
53
|
+
hostId: this.config.hostId,
|
|
54
|
+
missionRevision: this.snapshot()?.mission.revision ?? 1,
|
|
55
|
+
project: this.config.project,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async read(operation) {
|
|
59
|
+
if (this.closed)
|
|
60
|
+
throw new Error('BOT_RUNTIME_MANAGEMENT_CLOSED');
|
|
61
|
+
if (!this.native.runtimeSettings)
|
|
62
|
+
throw new Error('BOT_RUNTIME_MANAGEMENT_UNAVAILABLE');
|
|
63
|
+
const work = this.native.runtimeSettings(this.context(), { operation });
|
|
64
|
+
this.reads.add(work);
|
|
65
|
+
try {
|
|
66
|
+
const observed = await work;
|
|
67
|
+
this.observed = observed;
|
|
68
|
+
return observed;
|
|
69
|
+
}
|
|
70
|
+
finally {
|
|
71
|
+
this.reads.delete(work);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
apply(key, desired, resume = false) {
|
|
75
|
+
const original = hash([key, desired.requestId]);
|
|
76
|
+
const pending = this.applications.get(original);
|
|
77
|
+
// HTTP 重投与后台补交共用原命令,不能重复应用或把同一次选择提升成新修订。
|
|
78
|
+
if (pending)
|
|
79
|
+
return pending;
|
|
80
|
+
const work = this.applying
|
|
81
|
+
.catch(() => null)
|
|
82
|
+
.then(async () => {
|
|
83
|
+
if (this.closed)
|
|
84
|
+
return null;
|
|
85
|
+
if (this.journal.runtimeSettings.read(key)?.desired.selectionRevision !==
|
|
86
|
+
desired.selectionRevision)
|
|
87
|
+
return null;
|
|
88
|
+
if (!this.native.runtimeSettings)
|
|
89
|
+
throw new Error('BOT_RUNTIME_MANAGEMENT_UNAVAILABLE');
|
|
90
|
+
const previous = await this.read('read').catch(() => null);
|
|
91
|
+
if (previous?.selected &&
|
|
92
|
+
previous.selected.selectionRevision >= desired.selectionRevision &&
|
|
93
|
+
!matches(previous, desired)) {
|
|
94
|
+
const rebased = this.journal.runtimeSettings.rebase(key, desired.requestId, previous.selected.selectionRevision);
|
|
95
|
+
if (!rebased)
|
|
96
|
+
return null;
|
|
97
|
+
Object.assign(desired, rebased.desired);
|
|
98
|
+
}
|
|
99
|
+
// 设置保存可以在停止时进行;只有明确继续且无真正停止/失权时才转交原生接续。
|
|
100
|
+
const s = this.snapshot();
|
|
101
|
+
// 中央暂不可读不是停止许可;原 Native 仍核对自己的实际写者/Goal,已知停止则保留。
|
|
102
|
+
const mayContinue = resume && !this.stopping() && !s?.binding.fencedRef && (!s || s.mission.state === 'OPEN');
|
|
103
|
+
if (matches(previous, desired) && !mayContinue)
|
|
104
|
+
return previous;
|
|
105
|
+
return this.native.runtimeSettings(this.context(), {
|
|
106
|
+
operation: 'apply',
|
|
107
|
+
desired,
|
|
108
|
+
...(mayContinue ? { continue: true } : {}),
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
this.applying = work;
|
|
112
|
+
this.applications.set(original, work);
|
|
113
|
+
void work.finally(() => this.applications.delete(original)).catch(() => undefined);
|
|
114
|
+
return work;
|
|
115
|
+
}
|
|
116
|
+
async handle(raw, waitNative = true) {
|
|
117
|
+
if (this.closed)
|
|
118
|
+
throw new Error('BOT_RUNTIME_MANAGEMENT_CLOSED');
|
|
119
|
+
const request = botRuntimeRequest(raw), key = this.key(request.role);
|
|
120
|
+
if (request.role !== 'background')
|
|
121
|
+
return {
|
|
122
|
+
schemaVersion: 1,
|
|
123
|
+
requestId: request.requestId,
|
|
124
|
+
state: 'UNAVAILABLE',
|
|
125
|
+
code: 'BOT_RUNTIME_ROLE_NOT_CONFIGURED',
|
|
126
|
+
role: request.role,
|
|
127
|
+
};
|
|
128
|
+
const saved = key ? this.journal.runtimeSettings.read(key) : null;
|
|
129
|
+
if (request.operation === 'read' || request.operation === 'list') {
|
|
130
|
+
if (!waitNative) {
|
|
131
|
+
void this.read(request.operation).catch(() => undefined);
|
|
132
|
+
return {
|
|
133
|
+
schemaVersion: 1,
|
|
134
|
+
requestId: request.requestId,
|
|
135
|
+
role: request.role,
|
|
136
|
+
state: 'READ',
|
|
137
|
+
saved,
|
|
138
|
+
native: this.observed,
|
|
139
|
+
configuredRuntime: this.config.runtimeProvider ?? 'codex',
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
return {
|
|
144
|
+
schemaVersion: 1,
|
|
145
|
+
requestId: request.requestId,
|
|
146
|
+
role: request.role,
|
|
147
|
+
state: 'READ',
|
|
148
|
+
saved,
|
|
149
|
+
native: await this.read(request.operation),
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
return {
|
|
154
|
+
schemaVersion: 1,
|
|
155
|
+
requestId: request.requestId,
|
|
156
|
+
role: request.role,
|
|
157
|
+
state: 'UNAVAILABLE',
|
|
158
|
+
saved,
|
|
159
|
+
native: null,
|
|
160
|
+
code: codeOf(error),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (!key)
|
|
165
|
+
throw new Error('BOT_RUNTIME_IDENTITY_NOT_OBSERVED');
|
|
166
|
+
const previous = this.journal.runtimeSettings.command(key, request);
|
|
167
|
+
// 重复旧命令只回读原结果,不能把新选择重新切回旧模型。
|
|
168
|
+
if (previous?.result !== null && previous?.result !== undefined)
|
|
169
|
+
return previous.result;
|
|
170
|
+
const fallback = { runtime: this.config.runtimeProvider ?? 'codex' };
|
|
171
|
+
const settings = request.operation === 'default'
|
|
172
|
+
? (saved?.default ?? fallback)
|
|
173
|
+
: { ...(saved?.desired.settings ?? fallback), ...request.target };
|
|
174
|
+
const command = previous ?? this.journal.runtimeSettings.save(key, request, settings);
|
|
175
|
+
if (!waitNative) {
|
|
176
|
+
const result = {
|
|
177
|
+
schemaVersion: 1,
|
|
178
|
+
requestId: request.requestId,
|
|
179
|
+
role: request.role,
|
|
180
|
+
state: 'SAVED',
|
|
181
|
+
saved: command.record,
|
|
182
|
+
native: null,
|
|
183
|
+
};
|
|
184
|
+
this.journal.runtimeSettings.result(key, request.requestId, result);
|
|
185
|
+
void this.apply(key, command.record.desired, request.continue === true)
|
|
186
|
+
.then((native) => {
|
|
187
|
+
if (native)
|
|
188
|
+
this.journal.runtimeSettings.result(key, request.requestId, {
|
|
189
|
+
...result,
|
|
190
|
+
state: 'NATIVE_ACCEPTED',
|
|
191
|
+
native,
|
|
192
|
+
});
|
|
193
|
+
})
|
|
194
|
+
.catch(() => undefined);
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
let result;
|
|
198
|
+
try {
|
|
199
|
+
const native = await this.apply(key, command.record.desired, request.continue === true);
|
|
200
|
+
const persisted = this.journal.runtimeSettings.command(key, request)?.record ?? command.record;
|
|
201
|
+
result = {
|
|
202
|
+
schemaVersion: 1,
|
|
203
|
+
requestId: request.requestId,
|
|
204
|
+
role: request.role,
|
|
205
|
+
state: native ? 'NATIVE_ACCEPTED' : 'SUPERSEDED',
|
|
206
|
+
saved: persisted,
|
|
207
|
+
native,
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
result = {
|
|
212
|
+
schemaVersion: 1,
|
|
213
|
+
requestId: request.requestId,
|
|
214
|
+
role: request.role,
|
|
215
|
+
state: 'PENDING',
|
|
216
|
+
saved: this.journal.runtimeSettings.command(key, request)?.record ?? command.record,
|
|
217
|
+
native: null,
|
|
218
|
+
code: codeOf(error),
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
this.journal.runtimeSettings.result(key, request.requestId, result);
|
|
222
|
+
return result;
|
|
223
|
+
}
|
|
224
|
+
/** 普通 tick 只发起原配置的幂等补交;失败不能改变业务 Host 状态。 */
|
|
225
|
+
reconcile() {
|
|
226
|
+
if (this.closed)
|
|
227
|
+
return;
|
|
228
|
+
const key = this.key('background'), saved = key && this.journal.runtimeSettings.read(key);
|
|
229
|
+
if (!key || !saved || this.synchronizing)
|
|
230
|
+
return;
|
|
231
|
+
this.synchronizing = true;
|
|
232
|
+
this.reconciling = (async () => {
|
|
233
|
+
const current = await this.read('read').catch(() => null);
|
|
234
|
+
const resume = saved.request?.continue === true &&
|
|
235
|
+
this.journal.runtimeSettings.command(key, saved.request)?.result?.state !== 'NATIVE_ACCEPTED';
|
|
236
|
+
const native = matches(current, saved.desired) && !resume
|
|
237
|
+
? current
|
|
238
|
+
: await this.apply(key, saved.desired, resume);
|
|
239
|
+
if (native)
|
|
240
|
+
this.journal.runtimeSettings.result(key, saved.desired.requestId, {
|
|
241
|
+
schemaVersion: 1,
|
|
242
|
+
requestId: saved.desired.requestId,
|
|
243
|
+
role: 'background',
|
|
244
|
+
state: 'NATIVE_ACCEPTED',
|
|
245
|
+
saved,
|
|
246
|
+
native,
|
|
247
|
+
});
|
|
248
|
+
})()
|
|
249
|
+
.catch(() => undefined)
|
|
250
|
+
.finally(() => {
|
|
251
|
+
this.synchronizing = false;
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/** 先排空本组件的旁路读写再关闭 journal,不遗留后台 Promise 访问已关闭存储。 */
|
|
255
|
+
async close() {
|
|
256
|
+
this.closed = true;
|
|
257
|
+
await Promise.allSettled([
|
|
258
|
+
this.applying,
|
|
259
|
+
...(this.reconciling ? [this.reconciling] : []),
|
|
260
|
+
...this.reads,
|
|
261
|
+
]);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
import { BotServiceTransport } from '@agent-stack/bridge-client';
|
|
3
|
+
import { botInteger, botObject, botText, parseBotComponentStatus, } from '@agent-stack/contracts';
|
|
4
|
+
import { doctorTargets } from '../doctor/config.js';
|
|
5
|
+
/** 一次性读取已有 listener;空项目、旧版本或未装配的 Runtime 仍返回各自观测。 */
|
|
6
|
+
export async function statusCommand(args) {
|
|
7
|
+
const { values } = parseArgs({
|
|
8
|
+
args,
|
|
9
|
+
options: {
|
|
10
|
+
config: { type: 'string' },
|
|
11
|
+
runtime: { type: 'boolean' },
|
|
12
|
+
json: { type: 'boolean' },
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
const targets = doctorTargets(botText(values.config ?? process.env.BOT_HOST_CONFIG));
|
|
16
|
+
const endpoints = values.runtime
|
|
17
|
+
? [['runtime', targets.runtime]]
|
|
18
|
+
: [
|
|
19
|
+
['host.project', targets.project],
|
|
20
|
+
['host.execution', targets.host],
|
|
21
|
+
];
|
|
22
|
+
const reads = await Promise.all(endpoints
|
|
23
|
+
.filter(([, endpoint]) => values.runtime || endpoint !== undefined)
|
|
24
|
+
.map(([name, endpoint]) => observe(name, endpoint, values.runtime === true)));
|
|
25
|
+
if (!reads.length)
|
|
26
|
+
throw new Error('BOT_COMPONENT_ENDPOINT_UNCONFIGURED');
|
|
27
|
+
const capabilityVersions = reads.find((row) => row.capabilityVersions)?.capabilityVersions;
|
|
28
|
+
const observationErrors = reads.flatMap((row) => row.observationError ? [row.observationError] : []);
|
|
29
|
+
process.stdout.write(JSON.stringify({
|
|
30
|
+
schemaVersion: 1,
|
|
31
|
+
components: reads.flatMap((row) => row.components),
|
|
32
|
+
...(observationErrors.length ? { observationErrors } : {}),
|
|
33
|
+
...(capabilityVersions ? { capabilityVersions } : {}),
|
|
34
|
+
}) + '\n');
|
|
35
|
+
}
|
|
36
|
+
async function observe(name, endpoint, runtime) {
|
|
37
|
+
try {
|
|
38
|
+
if (!endpoint)
|
|
39
|
+
throw new Error('BOT_COMPONENT_ENDPOINT_UNCONFIGURED');
|
|
40
|
+
const raw = botObject(await new BotServiceTransport(endpoint.url, 2000, endpoint.headers).get(runtime ? '/bot-runtime/v1/status' : '/status'));
|
|
41
|
+
if (raw.schemaVersion !== 1 || !Array.isArray(raw.components) || raw.components.length > 16)
|
|
42
|
+
throw new Error('BOT_COMPONENT_STATUS_INVALID');
|
|
43
|
+
const versions = runtime && raw.capabilityVersions
|
|
44
|
+
? {
|
|
45
|
+
'runtime.commands': botInteger(botObject(raw.capabilityVersions)['runtime.commands'], 1),
|
|
46
|
+
}
|
|
47
|
+
: undefined;
|
|
48
|
+
return {
|
|
49
|
+
schemaVersion: 1,
|
|
50
|
+
components: raw.components.map(parseBotComponentStatus),
|
|
51
|
+
...(versions ? { capabilityVersions: versions } : {}),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
const code = error instanceof Error &&
|
|
56
|
+
/^BOT_(?:SERVICE_HTTP_\d{3}|SERVICE_NETWORK_UNAVAILABLE|COMPONENT_ENDPOINT_UNCONFIGURED|COMPONENT_STATUS_INVALID)$/.test(error.message)
|
|
57
|
+
? error.message
|
|
58
|
+
: 'BOT_COMPONENT_STATUS_UNAVAILABLE';
|
|
59
|
+
const now = Date.now();
|
|
60
|
+
return {
|
|
61
|
+
schemaVersion: 1,
|
|
62
|
+
// 查询发生的故障留在观测侧,不能成为远端组件的最近一次业务失败。
|
|
63
|
+
observationError: { component: name, reasonCode: code, atMs: now },
|
|
64
|
+
components: [
|
|
65
|
+
{
|
|
66
|
+
component: name,
|
|
67
|
+
state: 'UNOBSERVED',
|
|
68
|
+
alive: null,
|
|
69
|
+
observedAtMs: now,
|
|
70
|
+
lastSuccess: null,
|
|
71
|
+
lastFailure: null,
|
|
72
|
+
queue: null,
|
|
73
|
+
nextRetryAtMs: null,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { timingSafeEqual } from 'node:crypto';
|
|
2
|
+
/** 保留最近的实际循环回证;诊断查询只读取内存和原账本的计数。 */
|
|
3
|
+
export class HostComponentStatus {
|
|
4
|
+
component;
|
|
5
|
+
lastSuccess = null;
|
|
6
|
+
lastFailure = null;
|
|
7
|
+
constructor(component) {
|
|
8
|
+
this.component = component;
|
|
9
|
+
}
|
|
10
|
+
succeeded(reasonCode, atMs = Date.now()) {
|
|
11
|
+
if (!this.lastSuccess || atMs > this.lastSuccess.atMs)
|
|
12
|
+
this.lastSuccess = { reasonCode, atMs };
|
|
13
|
+
}
|
|
14
|
+
failed(reasonCode, atMs = Date.now()) {
|
|
15
|
+
if (!this.lastFailure || atMs >= this.lastFailure.atMs)
|
|
16
|
+
this.lastFailure = { reasonCode, atMs };
|
|
17
|
+
}
|
|
18
|
+
describe(state, nextRetryAtMs, queue = null) {
|
|
19
|
+
return {
|
|
20
|
+
component: this.component,
|
|
21
|
+
state,
|
|
22
|
+
alive: true,
|
|
23
|
+
observedAtMs: Date.now(),
|
|
24
|
+
lastSuccess: this.lastSuccess,
|
|
25
|
+
lastFailure: this.lastFailure,
|
|
26
|
+
queue,
|
|
27
|
+
nextRetryAtMs,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** 两种 Host 都使用原私有控制凭据,避免在公开探针披露详细记录。 */
|
|
32
|
+
export function matchesHostSecret(value, expected) {
|
|
33
|
+
if (typeof value !== 'string' || !expected)
|
|
34
|
+
return false;
|
|
35
|
+
return (Buffer.byteLength(value) === Buffer.byteLength(expected) &&
|
|
36
|
+
timingSafeEqual(Buffer.from(value), Buffer.from(expected)));
|
|
37
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { hostStartupFailureCode } from '../deployment/failure.js';
|
|
2
|
+
/** A notification schedules a normal authenticated reconciliation; it never authorizes execution. */
|
|
3
|
+
export class HostWakeHints {
|
|
4
|
+
config;
|
|
5
|
+
bridge;
|
|
6
|
+
cursor = null;
|
|
7
|
+
stopped = false;
|
|
8
|
+
requested = false;
|
|
9
|
+
reading;
|
|
10
|
+
timer;
|
|
11
|
+
resume;
|
|
12
|
+
// 只有退避 timer 已经安排时才公布重试时间;端口的长轮询没有确定返回时刻。
|
|
13
|
+
nextRetryAtMs = null;
|
|
14
|
+
lastFailure = null;
|
|
15
|
+
constructor(config, bridge) {
|
|
16
|
+
this.config = config;
|
|
17
|
+
this.bridge = bridge;
|
|
18
|
+
}
|
|
19
|
+
stop() {
|
|
20
|
+
this.stopped = true;
|
|
21
|
+
this.reading?.abort();
|
|
22
|
+
this.resume?.();
|
|
23
|
+
}
|
|
24
|
+
/** 忙时只保留一个提示,空闲时打断已有长轮询或退避等待。 */
|
|
25
|
+
requestRecheck = () => {
|
|
26
|
+
if (this.stopped || this.requested)
|
|
27
|
+
return;
|
|
28
|
+
this.requested = true;
|
|
29
|
+
this.reading?.abort();
|
|
30
|
+
this.resume?.();
|
|
31
|
+
};
|
|
32
|
+
async wait(active) {
|
|
33
|
+
if (this.stopped)
|
|
34
|
+
return;
|
|
35
|
+
const ms = Math.min(8000, active ? 1000 : this.config.pollIntervalMs);
|
|
36
|
+
try {
|
|
37
|
+
if (this.requested)
|
|
38
|
+
return;
|
|
39
|
+
const reading = (this.reading = new AbortController());
|
|
40
|
+
const token = await this.bridge.waitForWake(this.config.project, this.config.executionId, this.config.bridgeCredential, this.cursor, ms, reading.signal);
|
|
41
|
+
if (!reading.signal.aborted)
|
|
42
|
+
this.cursor = token;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (this.stopped || this.requested)
|
|
46
|
+
return;
|
|
47
|
+
this.cursor = null;
|
|
48
|
+
this.lastFailure = { reasonCode: hostStartupFailureCode(error), atMs: Date.now() };
|
|
49
|
+
if (!this.stopped)
|
|
50
|
+
await new Promise((resolve) => {
|
|
51
|
+
this.resume = () => {
|
|
52
|
+
if (this.timer)
|
|
53
|
+
clearTimeout(this.timer);
|
|
54
|
+
this.timer = undefined;
|
|
55
|
+
this.nextRetryAtMs = null;
|
|
56
|
+
this.resume = undefined;
|
|
57
|
+
resolve();
|
|
58
|
+
};
|
|
59
|
+
this.timer = setTimeout(() => this.resume?.(), ms);
|
|
60
|
+
this.nextRetryAtMs = Date.now() + ms;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
this.reading = undefined;
|
|
65
|
+
this.requested = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|