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,112 @@
|
|
|
1
|
+
import { lstatSync, openSync, readSync, closeSync, constants, opendirSync, realpathSync, statfsSync, } from 'node:fs';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { dirname, isAbsolute } from 'node:path';
|
|
4
|
+
export const deploymentSystem = {
|
|
5
|
+
platform: process.platform,
|
|
6
|
+
uid: process.getuid?.() ?? -1,
|
|
7
|
+
pid: process.pid,
|
|
8
|
+
cgroupV2: () => Number(statfsSync('/sys/fs/cgroup').type) === 0x63677270,
|
|
9
|
+
metadata(path) {
|
|
10
|
+
const s = lstatSync(path);
|
|
11
|
+
return {
|
|
12
|
+
uid: s.uid,
|
|
13
|
+
mode: s.mode,
|
|
14
|
+
size: s.size,
|
|
15
|
+
directory: s.isDirectory(),
|
|
16
|
+
file: s.isFile(),
|
|
17
|
+
symlink: s.isSymbolicLink(),
|
|
18
|
+
};
|
|
19
|
+
},
|
|
20
|
+
realpath: realpathSync,
|
|
21
|
+
read(path) {
|
|
22
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW);
|
|
23
|
+
try {
|
|
24
|
+
const buffer = Buffer.alloc(65537);
|
|
25
|
+
let size = 0;
|
|
26
|
+
while (size < buffer.length) {
|
|
27
|
+
const n = readSync(fd, buffer, size, buffer.length - size, null);
|
|
28
|
+
if (!n)
|
|
29
|
+
break;
|
|
30
|
+
size += n;
|
|
31
|
+
}
|
|
32
|
+
if (size > 65536)
|
|
33
|
+
throw new Error('BOT_DEPLOYMENT_READ_LIMIT');
|
|
34
|
+
return buffer.subarray(0, size).toString('utf8');
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
closeSync(fd);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
hashFile(path) {
|
|
41
|
+
const fd = openSync(path, constants.O_RDONLY | constants.O_NOFOLLOW), hash = createHash('sha256'), buffer = Buffer.alloc(65536);
|
|
42
|
+
let total = 0;
|
|
43
|
+
try {
|
|
44
|
+
for (let n = readSync(fd, buffer, 0, buffer.length, null); n; n = readSync(fd, buffer, 0, buffer.length, null)) {
|
|
45
|
+
if ((total += n) > 4 * 1024 * 1024)
|
|
46
|
+
throw new Error('BOT_DEPLOYMENT_READ_LIMIT');
|
|
47
|
+
hash.update(buffer.subarray(0, n));
|
|
48
|
+
}
|
|
49
|
+
return hash.digest('hex');
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
closeSync(fd);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
entries(path) {
|
|
56
|
+
const directory = opendirSync(path), entries = [];
|
|
57
|
+
try {
|
|
58
|
+
for (let entry = directory.readSync(); entry; entry = directory.readSync()) {
|
|
59
|
+
if (entries.length >= 8192)
|
|
60
|
+
throw new Error('BOT_DEPLOYMENT_PROCESS_SCAN_LIMIT');
|
|
61
|
+
entries.push(entry.name);
|
|
62
|
+
}
|
|
63
|
+
return entries;
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
directory.closeSync();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
export function privateDirectory(path, system, owner = system.uid) {
|
|
71
|
+
const s = system.metadata(path);
|
|
72
|
+
if (!s.directory ||
|
|
73
|
+
s.symlink ||
|
|
74
|
+
s.uid !== owner ||
|
|
75
|
+
(s.mode & 0o077) !== 0 ||
|
|
76
|
+
(s.mode & 0o700) !== 0o700 ||
|
|
77
|
+
system.realpath(path) !== path)
|
|
78
|
+
throw new Error('BOT_DEPLOYMENT_PRIVATE_ROOT_REQUIRED');
|
|
79
|
+
trustedAncestors(path, system, owner);
|
|
80
|
+
}
|
|
81
|
+
/** 私有部署和目标资源沿同一父目录权限核对,避免路径被执行身份替换。 */
|
|
82
|
+
export function trustedAncestors(path, system, owner) {
|
|
83
|
+
if (!isAbsolute(path))
|
|
84
|
+
throw new Error('BOT_DEPLOYMENT_ANCESTOR_INVALID');
|
|
85
|
+
let depth = 0;
|
|
86
|
+
for (let parent = dirname(path);; parent = dirname(parent)) {
|
|
87
|
+
const s = system.metadata(parent);
|
|
88
|
+
// Root-owned sticky directories protect entries owned by the already checked owner.
|
|
89
|
+
const stickyRoot = s.uid === 0 && (s.mode & 0o1000) !== 0;
|
|
90
|
+
if (++depth > 64 ||
|
|
91
|
+
!s.directory ||
|
|
92
|
+
s.symlink ||
|
|
93
|
+
(s.uid !== 0 && s.uid !== owner) ||
|
|
94
|
+
((s.mode & 0o022) !== 0 && !stickyRoot) ||
|
|
95
|
+
system.realpath(parent) !== parent)
|
|
96
|
+
throw new Error('BOT_DEPLOYMENT_UNTRUSTED_ANCESTOR');
|
|
97
|
+
if (parent === '/')
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export function privateDeploymentFile(path, system = deploymentSystem) {
|
|
102
|
+
const s = system.metadata(path);
|
|
103
|
+
if (!s.file ||
|
|
104
|
+
s.symlink ||
|
|
105
|
+
s.size > 65536 ||
|
|
106
|
+
s.uid !== system.uid ||
|
|
107
|
+
(s.mode & 0o077) !== 0 ||
|
|
108
|
+
system.realpath(path) !== path)
|
|
109
|
+
throw new Error('BOT_DEPLOYMENT_PRIVATE_MANIFEST_REQUIRED');
|
|
110
|
+
trustedAncestors(path, system, system.uid);
|
|
111
|
+
return JSON.parse(system.read(path));
|
|
112
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
const windowsLauncher = () => join(dirname(process.execPath), '..', 'AgentXGo Host.exe');
|
|
4
|
+
/** Windows 安装入口核对专用服务账户和 NTFS ACL;Node 的 POSIX mode 不表示 Windows 访问权限。 */
|
|
5
|
+
export function windowsHostState(action, path, value) {
|
|
6
|
+
try {
|
|
7
|
+
return execFileSync(windowsLauncher(), ['private', action, path], {
|
|
8
|
+
input: value === undefined ? '' : JSON.stringify(value) + '\n',
|
|
9
|
+
encoding: 'utf8',
|
|
10
|
+
windowsHide: true,
|
|
11
|
+
stdio: ['pipe', 'pipe', 'ignore'],
|
|
12
|
+
maxBuffer: 65536,
|
|
13
|
+
timeout: 5000,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
// 原子首次写入需要区分文件不存在;其他错误只交付固定错误码。
|
|
18
|
+
if (error && typeof error === 'object' && 'status' in error && error.status === 2)
|
|
19
|
+
throw Object.assign(new Error('BOT_WINDOWS_STATE_NOT_FOUND'), { code: 'ENOENT' });
|
|
20
|
+
throw new Error('BOT_WINDOWS_PRIVATE_STATE_REQUIRED');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** 组件命令只传原配置引用,实际授权、SCM 指向和进程状态由安装过的启动器核对。 */
|
|
24
|
+
export function windowsHostComponent(action, path) {
|
|
25
|
+
return execFileSync(windowsLauncher(), ['component', action, path], {
|
|
26
|
+
encoding: 'utf8',
|
|
27
|
+
windowsHide: true,
|
|
28
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
29
|
+
maxBuffer: 4096,
|
|
30
|
+
timeout: 48000,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { lstatSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { isAbsolute } from 'node:path';
|
|
3
|
+
import { botRuntimeProvider } from '@agent-stack/contracts';
|
|
4
|
+
import { botRuntimeBootstrap, botRuntimeBootstrapIdentity } from '@agent-stack/runtime-contracts';
|
|
5
|
+
import { runtimeEndpoint } from '../adapters/runtime-http/endpoint.js';
|
|
6
|
+
import { windowsHostState } from '../deployment/windows-state.js';
|
|
7
|
+
const object = (v) => {
|
|
8
|
+
if (!v || typeof v !== 'object' || Array.isArray(v))
|
|
9
|
+
throw new Error('BOT_DOCTOR_CONFIG');
|
|
10
|
+
return v;
|
|
11
|
+
};
|
|
12
|
+
const text = (v) => {
|
|
13
|
+
if (typeof v !== 'string' || !v || v.length > 4096 || /[\r\n]/.test(v))
|
|
14
|
+
throw new Error('BOT_DOCTOR_CONFIG');
|
|
15
|
+
return v;
|
|
16
|
+
};
|
|
17
|
+
const endpoint = (v) => {
|
|
18
|
+
const url = new URL(text(v));
|
|
19
|
+
if (!['http:', 'https:'].includes(url.protocol) ||
|
|
20
|
+
url.username ||
|
|
21
|
+
url.password ||
|
|
22
|
+
url.search ||
|
|
23
|
+
url.hash)
|
|
24
|
+
throw new Error('BOT_DOCTOR_CONFIG');
|
|
25
|
+
return url.toString();
|
|
26
|
+
};
|
|
27
|
+
const local = (v) => {
|
|
28
|
+
if (!Number.isInteger(v) || Number(v) < 1024 || Number(v) > 65535)
|
|
29
|
+
throw new Error('BOT_DOCTOR_CONFIG');
|
|
30
|
+
return `http://127.0.0.1:${String(v)}/`;
|
|
31
|
+
};
|
|
32
|
+
/** Windows 沿安装器校验 ACL,POSIX 身份交付还需核对原运行用户。 */
|
|
33
|
+
function privateConfig(path, owner) {
|
|
34
|
+
if (!isAbsolute(path))
|
|
35
|
+
throw new Error('BOT_DOCTOR_PRIVATE_CONFIG_REQUIRED');
|
|
36
|
+
if (process.platform === 'win32')
|
|
37
|
+
return windowsHostState('read', path);
|
|
38
|
+
const file = lstatSync(path);
|
|
39
|
+
if (!file.isFile() ||
|
|
40
|
+
file.isSymbolicLink() ||
|
|
41
|
+
file.size > 65536 ||
|
|
42
|
+
(file.mode & 0o077) !== 0 ||
|
|
43
|
+
(owner !== undefined && file.uid !== owner))
|
|
44
|
+
throw new Error('BOT_DOCTOR_PRIVATE_CONFIG_REQUIRED');
|
|
45
|
+
return readFileSync(path, 'utf8');
|
|
46
|
+
}
|
|
47
|
+
/** 读取当前 Runtime 的原身份交付,旧 DSH 配置保留原默认类型。 */
|
|
48
|
+
function bootstrappedRuntime(config) {
|
|
49
|
+
try {
|
|
50
|
+
const bootstrap = botRuntimeBootstrap(JSON.parse(privateConfig(text(config.bootstrapFile), process.getuid?.())));
|
|
51
|
+
const provider = botRuntimeProvider(config.runtimeProvider ?? 'dsh');
|
|
52
|
+
const identity = botRuntimeBootstrapIdentity(config, bootstrap, provider);
|
|
53
|
+
if (!identity)
|
|
54
|
+
throw new Error('BOT_DOCTOR_BOOTSTRAP_BINDING_MISMATCH');
|
|
55
|
+
return {
|
|
56
|
+
...config,
|
|
57
|
+
...identity,
|
|
58
|
+
offlineJournalUrl: config.offlineJournalUrl === undefined
|
|
59
|
+
? bootstrap.hostRuntimeUrl
|
|
60
|
+
: config.offlineJournalUrl,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
65
|
+
return undefined;
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/** 就绪报告只需要已配置的 Host 地址,不依赖工作进程和私有控制凭据。 */
|
|
70
|
+
function readinessTarget(config) {
|
|
71
|
+
let url;
|
|
72
|
+
const project = config.mode === 'project';
|
|
73
|
+
if (project || config.runtimeUrl !== undefined) {
|
|
74
|
+
if (config.port !== undefined)
|
|
75
|
+
url = local(config.port);
|
|
76
|
+
}
|
|
77
|
+
else if (config.offlineJournalUrl !== undefined) {
|
|
78
|
+
url = new URL(endpoint(config.offlineJournalUrl)).origin;
|
|
79
|
+
}
|
|
80
|
+
return url
|
|
81
|
+
? { readiness: { url, headers: {}, readinessMode: project ? 'project' : 'execution' } }
|
|
82
|
+
: {};
|
|
83
|
+
}
|
|
84
|
+
/** 仅复用本 Bot 的配置。主管就绪与任务诊断分开,公开探针无需凭据。 */
|
|
85
|
+
export function doctorTargets(path, readiness = 'skip', depth = 0) {
|
|
86
|
+
if (depth > 1)
|
|
87
|
+
throw new Error('BOT_DOCTOR_PRIVATE_CONFIG_REQUIRED');
|
|
88
|
+
const config = object(JSON.parse(privateConfig(path)));
|
|
89
|
+
if (config.role === 'background' && typeof config.configFile === 'string')
|
|
90
|
+
return doctorTargets(config.configFile, readiness, depth + 1);
|
|
91
|
+
const publicReadiness = readiness === 'skip' ? {} : readinessTarget(config);
|
|
92
|
+
if (readiness === 'only' && publicReadiness.readiness)
|
|
93
|
+
return publicReadiness;
|
|
94
|
+
const v = config.mode !== 'project' &&
|
|
95
|
+
config.runtimeUrl === undefined &&
|
|
96
|
+
config.bootstrapFile !== undefined
|
|
97
|
+
? bootstrappedRuntime(config)
|
|
98
|
+
: config;
|
|
99
|
+
if (!v)
|
|
100
|
+
return publicReadiness;
|
|
101
|
+
const observe = readiness === 'skip' || v === config ? publicReadiness : readinessTarget(v);
|
|
102
|
+
if (readiness === 'only')
|
|
103
|
+
return observe;
|
|
104
|
+
if (v.mode === 'project') {
|
|
105
|
+
return {
|
|
106
|
+
...observe,
|
|
107
|
+
host: {
|
|
108
|
+
url: local(v.childPort),
|
|
109
|
+
headers: { 'x-bot-host-control-token': text(v.controlToken) },
|
|
110
|
+
},
|
|
111
|
+
// 旧 doctor 配置可以只记录执行端口,主管观测按实际装配可选。
|
|
112
|
+
...(Number.isInteger(v.port) && Number(v.port) >= 1024 && Number(v.port) <= 65535
|
|
113
|
+
? {
|
|
114
|
+
project: {
|
|
115
|
+
url: local(v.port),
|
|
116
|
+
headers: { 'x-bot-host-control-token': text(v.controlToken) },
|
|
117
|
+
},
|
|
118
|
+
}
|
|
119
|
+
: {}),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (v.runtimeUrl !== undefined) {
|
|
123
|
+
const url = local(v.port);
|
|
124
|
+
// 诊断沿正式客户端的外接端点限制,不把执行凭据送到设备之外。
|
|
125
|
+
const target = runtimeEndpoint(endpoint(v.runtimeUrl), botRuntimeProvider(v.runtimeProvider ?? 'codex'));
|
|
126
|
+
return {
|
|
127
|
+
...observe,
|
|
128
|
+
host: { url, headers: { 'x-bot-host-control-token': text(v.controlToken) } },
|
|
129
|
+
runtime: {
|
|
130
|
+
url: target,
|
|
131
|
+
headers: {
|
|
132
|
+
'x-agentsim-service-token': text(v.runtimeToken),
|
|
133
|
+
'x-agentxgo-api-credential': text(v.bridgeCredential),
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const token = text(v.hostToken), credential = text(v.hostCredential);
|
|
139
|
+
const hostUrl = v.offlineJournalUrl === undefined ? undefined : new URL(endpoint(v.offlineJournalUrl)).origin;
|
|
140
|
+
return {
|
|
141
|
+
...observe,
|
|
142
|
+
runtime: {
|
|
143
|
+
url: local(v.port),
|
|
144
|
+
headers: { 'x-agentsim-service-token': token, 'x-agentxgo-api-credential': credential },
|
|
145
|
+
},
|
|
146
|
+
...(hostUrl === undefined
|
|
147
|
+
? {}
|
|
148
|
+
: {
|
|
149
|
+
host: {
|
|
150
|
+
url: hostUrl,
|
|
151
|
+
headers: { 'x-bot-runtime-token': token, 'x-agentxgo-api-credential': credential },
|
|
152
|
+
},
|
|
153
|
+
}),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { doctorProcessFacts } from './process.js';
|
|
2
|
+
const keys = new Set([
|
|
3
|
+
'schemaVersion',
|
|
4
|
+
'nativeVersion',
|
|
5
|
+
'status',
|
|
6
|
+
'state',
|
|
7
|
+
'reason',
|
|
8
|
+
'code',
|
|
9
|
+
'ref',
|
|
10
|
+
'limit',
|
|
11
|
+
'used',
|
|
12
|
+
'unit',
|
|
13
|
+
'provider',
|
|
14
|
+
'admissionHeld',
|
|
15
|
+
'stopRequested',
|
|
16
|
+
'controlReady',
|
|
17
|
+
// 项目主管端口独立于任务子进程,报告接待和准备的实际状态。
|
|
18
|
+
'deploymentStatus',
|
|
19
|
+
'receptionStatus',
|
|
20
|
+
'preparationStatus',
|
|
21
|
+
'observedAtMs',
|
|
22
|
+
'nextAttemptAtMs',
|
|
23
|
+
'retryAfterMs',
|
|
24
|
+
'attempts',
|
|
25
|
+
'phase',
|
|
26
|
+
'listening',
|
|
27
|
+
'automaticPreparation',
|
|
28
|
+
'automaticRecovery',
|
|
29
|
+
'serviceRecovery',
|
|
30
|
+
'sourceReplay',
|
|
31
|
+
'required',
|
|
32
|
+
'complete',
|
|
33
|
+
'lastFailure',
|
|
34
|
+
'firstFailure',
|
|
35
|
+
'component',
|
|
36
|
+
'authorityObservedAtMs',
|
|
37
|
+
'nextAction',
|
|
38
|
+
'recovery',
|
|
39
|
+
'stage',
|
|
40
|
+
'currentController',
|
|
41
|
+
'effectsClear',
|
|
42
|
+
'commandCount',
|
|
43
|
+
'executionId',
|
|
44
|
+
'hostId',
|
|
45
|
+
'runtimeInstanceId',
|
|
46
|
+
'requestId',
|
|
47
|
+
'recoveryId',
|
|
48
|
+
'nativeSessionRef',
|
|
49
|
+
'ownerEpoch',
|
|
50
|
+
'missionRevision',
|
|
51
|
+
'goal',
|
|
52
|
+
'latestTurn',
|
|
53
|
+
'sessionState',
|
|
54
|
+
'effectsVerified',
|
|
55
|
+
'resumeAllowed',
|
|
56
|
+
'pendingNativeInstallation',
|
|
57
|
+
'connections',
|
|
58
|
+
'id',
|
|
59
|
+
'toolCount',
|
|
60
|
+
'freshness',
|
|
61
|
+
'pendingNative',
|
|
62
|
+
// 只呈现 Runtime 连接的轻量统计,原参数和结果正文仍留在业务路径。
|
|
63
|
+
'dispatchedToolCalls',
|
|
64
|
+
'medianResultJsonBytes',
|
|
65
|
+
'unavailable',
|
|
66
|
+
'accepted',
|
|
67
|
+
'operation',
|
|
68
|
+
// 原事件的安全定位保留,正文/参数/令牌仍不进入CLI聚合。
|
|
69
|
+
'scope',
|
|
70
|
+
// 本地输入/补传阶段只呈现计数和定位,不增加执行副作用。
|
|
71
|
+
'waiting',
|
|
72
|
+
'continuationId',
|
|
73
|
+
'mode',
|
|
74
|
+
'requestedDeadlineMs',
|
|
75
|
+
'inputTrace',
|
|
76
|
+
'items',
|
|
77
|
+
'nativeRef',
|
|
78
|
+
'retired',
|
|
79
|
+
'afterDeliveryId',
|
|
80
|
+
'nextDeliveryId',
|
|
81
|
+
'pendingSync',
|
|
82
|
+
'observations',
|
|
83
|
+
'reports',
|
|
84
|
+
'host',
|
|
85
|
+
'records',
|
|
86
|
+
'pending',
|
|
87
|
+
'events',
|
|
88
|
+
'references',
|
|
89
|
+
'sequence',
|
|
90
|
+
'eventId',
|
|
91
|
+
'streamId',
|
|
92
|
+
'kind',
|
|
93
|
+
'afterSequence',
|
|
94
|
+
'nextSequence',
|
|
95
|
+
'firstSequence',
|
|
96
|
+
'lastSequence',
|
|
97
|
+
'callId',
|
|
98
|
+
'tool',
|
|
99
|
+
'nativeTool',
|
|
100
|
+
'method',
|
|
101
|
+
'inputId',
|
|
102
|
+
'deliveryId',
|
|
103
|
+
'actionId',
|
|
104
|
+
'resultRef',
|
|
105
|
+
'resultDigest',
|
|
106
|
+
'inputDigest',
|
|
107
|
+
'nativeChildSessionRef',
|
|
108
|
+
'nativeChildCallRef',
|
|
109
|
+
'nativeCallRef', // 保留原生子调用定位,正文仍由Native按需读取。
|
|
110
|
+
]);
|
|
111
|
+
/** 只读取两种 Host 的公开就绪合同;原任务和工具连接事实仍归各自的认证接口。 */
|
|
112
|
+
function readinessFacts(value, ready, mode) {
|
|
113
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
114
|
+
return undefined;
|
|
115
|
+
const v = value;
|
|
116
|
+
// 项目主管和实际任务进程各有状态,不能拿其中一个的 /ready 兼作另一个。
|
|
117
|
+
if (mode && (v.mode === 'project') !== (mode === 'project'))
|
|
118
|
+
return undefined;
|
|
119
|
+
if (v.mode === 'project') {
|
|
120
|
+
const { mode, deploymentStatus, receptionStatus, preparationStatus } = v;
|
|
121
|
+
if (typeof deploymentStatus === 'string' &&
|
|
122
|
+
typeof receptionStatus === 'string' &&
|
|
123
|
+
typeof preparationStatus === 'string')
|
|
124
|
+
return facts({ mode, deploymentStatus, receptionStatus, preparationStatus });
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
const { status, controlReady, listening } = v;
|
|
128
|
+
return typeof status === 'string' && controlReady === ready
|
|
129
|
+
? facts({ status, controlReady, listening })
|
|
130
|
+
: undefined;
|
|
131
|
+
}
|
|
132
|
+
/** 正向字段投影只返回运行事实;错误正文、上下文、工具schema和凭据不进入诊断输出。 */
|
|
133
|
+
function facts(v, depth = 0) {
|
|
134
|
+
if (depth > 5)
|
|
135
|
+
return undefined;
|
|
136
|
+
if (v === null || typeof v === 'boolean' || (typeof v === 'number' && Number.isFinite(v)))
|
|
137
|
+
return v;
|
|
138
|
+
if (typeof v === 'string')
|
|
139
|
+
return /^[A-Za-z0-9_.:@/-]{1,128}$/.test(v) ? v : undefined;
|
|
140
|
+
if (Array.isArray(v))
|
|
141
|
+
return v.slice(0, 64).map((x) => facts(x, depth + 1));
|
|
142
|
+
if (!v || typeof v !== 'object')
|
|
143
|
+
return undefined;
|
|
144
|
+
return Object.fromEntries(Object.entries(v).flatMap(([k, x]) => {
|
|
145
|
+
const value = keys.has(k) ? facts(x, depth + 1) : undefined;
|
|
146
|
+
return value === undefined ? [] : [[k, value]];
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
/** 有界单次探测;不重发业务调用,禁止重定向携带私有鉴权到其它地址。 */
|
|
150
|
+
export async function doctorProbe(target, path, method = 'GET', fetcher = fetch) {
|
|
151
|
+
if (!target)
|
|
152
|
+
return { state: 'NOT_CONFIGURED' };
|
|
153
|
+
const abort = new AbortController();
|
|
154
|
+
const timer = setTimeout(() => abort.abort(), 10_000);
|
|
155
|
+
timer.unref();
|
|
156
|
+
let reader;
|
|
157
|
+
try {
|
|
158
|
+
const response = await fetcher(new URL(path, target.url), {
|
|
159
|
+
method,
|
|
160
|
+
headers: {
|
|
161
|
+
...target.headers,
|
|
162
|
+
...(method === 'POST' ? { 'content-type': 'application/json' } : {}),
|
|
163
|
+
},
|
|
164
|
+
...(method === 'POST' ? { body: '{}' } : {}),
|
|
165
|
+
redirect: 'error',
|
|
166
|
+
signal: abort.signal,
|
|
167
|
+
});
|
|
168
|
+
const readiness = path === '/ready';
|
|
169
|
+
const successful = readiness ? response.status === 200 : response.ok;
|
|
170
|
+
// 主管返回 503 时仍有权威等待状态,不能把它等同于掉线。
|
|
171
|
+
if (!successful && !(readiness && response.status === 503)) {
|
|
172
|
+
await response.body?.cancel().catch(() => { });
|
|
173
|
+
return {
|
|
174
|
+
state: response.status === 404 ? 'UNSUPPORTED' : 'UNAVAILABLE',
|
|
175
|
+
code: `HTTP_${response.status}`,
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
reader = response.body?.getReader();
|
|
179
|
+
const chunks = [];
|
|
180
|
+
let size = 0;
|
|
181
|
+
while (reader) {
|
|
182
|
+
const chunk = await reader.read();
|
|
183
|
+
if (chunk.done)
|
|
184
|
+
break;
|
|
185
|
+
size += chunk.value.byteLength;
|
|
186
|
+
if (size > 131072)
|
|
187
|
+
return { state: 'UNAVAILABLE', code: 'RESPONSE_LIMIT' };
|
|
188
|
+
chunks.push(chunk.value);
|
|
189
|
+
}
|
|
190
|
+
const value = JSON.parse(Buffer.concat(chunks).toString('utf8'));
|
|
191
|
+
if (readiness) {
|
|
192
|
+
const status = readinessFacts(value, successful, target.readinessMode);
|
|
193
|
+
return status === undefined
|
|
194
|
+
? { state: 'UNAVAILABLE', code: 'RESPONSE_INVALID' }
|
|
195
|
+
: { state: 'OBSERVED', ready: successful, facts: status };
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
state: 'OBSERVED',
|
|
199
|
+
facts: path === '/bot-runtime/v1/process' ? doctorProcessFacts(value) : facts(value),
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
return {
|
|
204
|
+
state: 'UNAVAILABLE',
|
|
205
|
+
code: abort.signal.aborted ? 'TIMEOUT' : 'REQUEST_FAILED',
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
finally {
|
|
209
|
+
clearTimeout(timer);
|
|
210
|
+
await reader?.cancel().catch(() => { });
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** 进程诊断只接受既有私有端口的固定数值,禁止将任意文本或对象带入 CLI。 */
|
|
2
|
+
export function doctorProcessFacts(value) {
|
|
3
|
+
const object = (v) => {
|
|
4
|
+
if (!v || typeof v !== 'object' || Array.isArray(v))
|
|
5
|
+
throw new Error('BOT_DOCTOR_PROCESS_INVALID');
|
|
6
|
+
return v;
|
|
7
|
+
};
|
|
8
|
+
const number = (v, minimum = 0) => {
|
|
9
|
+
if (typeof v !== 'number' || !Number.isSafeInteger(v) || v < minimum)
|
|
10
|
+
throw new Error('BOT_DOCTOR_PROCESS_INVALID');
|
|
11
|
+
return v;
|
|
12
|
+
};
|
|
13
|
+
const root = object(value);
|
|
14
|
+
if (root.schemaVersion !== 1)
|
|
15
|
+
throw new Error('BOT_DOCTOR_PROCESS_INVALID');
|
|
16
|
+
const memory = object(root.memory);
|
|
17
|
+
return {
|
|
18
|
+
schemaVersion: 1,
|
|
19
|
+
observedAtMs: number(root.observedAtMs),
|
|
20
|
+
pid: number(root.pid, 1),
|
|
21
|
+
uptimeMs: number(root.uptimeMs),
|
|
22
|
+
memory: {
|
|
23
|
+
rssBytes: number(memory.rssBytes),
|
|
24
|
+
heapUsedBytes: number(memory.heapUsedBytes),
|
|
25
|
+
heapTotalBytes: number(memory.heapTotalBytes),
|
|
26
|
+
heapLimitBytes: number(memory.heapLimitBytes),
|
|
27
|
+
externalBytes: number(memory.externalBytes),
|
|
28
|
+
arrayBuffersBytes: number(memory.arrayBuffersBytes),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { doctorTargets } from './config.js';
|
|
2
|
+
import { doctorProbe } from './probe.js';
|
|
3
|
+
import { botId, botInteger } from '@agent-stack/contracts';
|
|
4
|
+
// 部分诊断沿原入口直读;未选部分不访问网络,也不冒充已观察。
|
|
5
|
+
const defaultSections = ['health', 'recovery', 'native', 'connections'];
|
|
6
|
+
// 进程数值只在明确请求时采集;普通 doctor 不增加请求或默认输出。
|
|
7
|
+
const sections = [...defaultSections, 'process', 'readiness'];
|
|
8
|
+
/** doctor是可选操作入口;恢复只推动原协调器复查,不清账、不重建Goal、不越过UNKNOWN。 */
|
|
9
|
+
export async function runBotDoctor(options, fetcher = fetch) {
|
|
10
|
+
const selected = new Set(options.sections ?? (options.trace ? [] : defaultSections));
|
|
11
|
+
// 单独读取就绪时不解析控制或 Runtime 凭据,不影响既有诊断的配置合同。
|
|
12
|
+
const includeDiagnostics = selected.size > 1 || options.recover || options.refreshConnections || options.trace;
|
|
13
|
+
const targets = doctorTargets(options.config, selected.has('readiness') ? (includeDiagnostics ? 'include' : 'only') : 'skip');
|
|
14
|
+
const read = (section, target, path) => selected.has(section)
|
|
15
|
+
? doctorProbe(target, path, 'GET', fetcher)
|
|
16
|
+
: Promise.resolve({ state: 'NOT_REQUESTED' });
|
|
17
|
+
const [health, recovery, native, connections, resources, readiness] = await Promise.all([
|
|
18
|
+
read('health', targets.host, '/health'),
|
|
19
|
+
read('recovery', targets.host, '/recovery'),
|
|
20
|
+
read('native', targets.host, '/recovery/native'),
|
|
21
|
+
read('connections', targets.runtime, '/bot-runtime/v1/connections'),
|
|
22
|
+
read('process', targets.runtime, '/bot-runtime/v1/process'),
|
|
23
|
+
read('readiness', targets.readiness, '/ready'),
|
|
24
|
+
]);
|
|
25
|
+
const refresh = options.refreshConnections
|
|
26
|
+
? await doctorProbe(targets.runtime, '/bot-runtime/v1/connections/refresh', 'POST', fetcher)
|
|
27
|
+
: undefined;
|
|
28
|
+
const recheck = options.recover
|
|
29
|
+
? await doctorProbe(targets.host, '/doctor/recheck', 'POST', fetcher)
|
|
30
|
+
: undefined;
|
|
31
|
+
// 原定位直接查询,不为可选轨迹再取总目录或激活Native。
|
|
32
|
+
const query = new URLSearchParams({ afterSequence: '0' });
|
|
33
|
+
for (const [key, value] of Object.entries(options.trace ?? {}))
|
|
34
|
+
query.set(key, String(value));
|
|
35
|
+
const trace = options.trace
|
|
36
|
+
? await doctorProbe(targets.host, '/trace?' + query.toString(), 'GET', fetcher)
|
|
37
|
+
: undefined;
|
|
38
|
+
return {
|
|
39
|
+
schemaVersion: 1,
|
|
40
|
+
health,
|
|
41
|
+
recovery,
|
|
42
|
+
native,
|
|
43
|
+
connections,
|
|
44
|
+
...(selected.has('process') ? { process: resources } : {}),
|
|
45
|
+
...(selected.has('readiness') ? { readiness } : {}),
|
|
46
|
+
...(refresh ? { refresh } : {}),
|
|
47
|
+
...(recheck ? { recheck } : {}),
|
|
48
|
+
...(trace ? { trace } : {}),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** CLI只输出白名单事实和固定错误码;私有路径、异常栈及配置正文均不打印。 */
|
|
52
|
+
export async function doctorCommand(args) {
|
|
53
|
+
let config = process.env.BOT_HOST_CONFIG ?? process.env.DSH_HEADLESS_CONFIG;
|
|
54
|
+
let recover = false, refreshConnections = false;
|
|
55
|
+
const requested = [];
|
|
56
|
+
let trace;
|
|
57
|
+
for (let i = 0; i < args.length; i++) {
|
|
58
|
+
if (args[i] === '--config' && args[i + 1])
|
|
59
|
+
config = args[++i];
|
|
60
|
+
else if (args[i] === '--recover')
|
|
61
|
+
recover = true;
|
|
62
|
+
else if (args[i] === '--refresh-connections')
|
|
63
|
+
refreshConnections = true;
|
|
64
|
+
else if (args[i] === '--section' && sections.includes(args[i + 1]))
|
|
65
|
+
requested.push(args[++i]);
|
|
66
|
+
else if (args[i] === '--trace-after' && args[i + 1])
|
|
67
|
+
(trace ??= {}).afterSequence = botInteger(Number(args[++i]));
|
|
68
|
+
else if (args[i] === '--trace-after-delivery' && args[i + 1])
|
|
69
|
+
(trace ??= {}).afterDeliveryId = botId(args[++i]);
|
|
70
|
+
else if (['--trace-event', '--trace-call', '--trace-request'].includes(args[i]) &&
|
|
71
|
+
args[i + 1]) {
|
|
72
|
+
const key = args[i] === '--trace-event'
|
|
73
|
+
? 'eventId'
|
|
74
|
+
: args[i] === '--trace-call'
|
|
75
|
+
? 'callId'
|
|
76
|
+
: 'requestId';
|
|
77
|
+
(trace ??= {})[key] = botId(args[++i]);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
throw new Error('BOT_DOCTOR_ARGUMENTS');
|
|
81
|
+
}
|
|
82
|
+
if (!config)
|
|
83
|
+
throw new Error('BOT_DOCTOR_CONFIG_REQUIRED');
|
|
84
|
+
const result = await runBotDoctor({
|
|
85
|
+
config,
|
|
86
|
+
recover,
|
|
87
|
+
refreshConnections,
|
|
88
|
+
...(requested.length ? { sections: requested } : {}),
|
|
89
|
+
...(trace ? { trace } : {}),
|
|
90
|
+
});
|
|
91
|
+
process.stdout.write(JSON.stringify(result) + '\n');
|
|
92
|
+
const probes = [
|
|
93
|
+
result.health,
|
|
94
|
+
result.recovery,
|
|
95
|
+
result.native,
|
|
96
|
+
result.connections,
|
|
97
|
+
result.process,
|
|
98
|
+
result.readiness,
|
|
99
|
+
result.refresh,
|
|
100
|
+
result.recheck,
|
|
101
|
+
result.trace,
|
|
102
|
+
];
|
|
103
|
+
if (probes.some((p) => p?.state === 'UNAVAILABLE'))
|
|
104
|
+
process.exitCode = 1;
|
|
105
|
+
}
|