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,115 @@
|
|
|
1
|
+
import { lstat, mkdir, open, readFile, link, unlink, rename } from "node:fs/promises";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { randomBytes } from "node:crypto";
|
|
4
|
+
import { windowsPrivatePath } from "./windows-security.js";
|
|
5
|
+
export async function directory(path) {
|
|
6
|
+
if (process.platform === "win32") {
|
|
7
|
+
await windowsPrivatePath(path, "directory");
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const parent = dirname(path);
|
|
11
|
+
if (parent !== path) {
|
|
12
|
+
try {
|
|
13
|
+
const metadata = await lstat(parent);
|
|
14
|
+
if (!metadata.isDirectory() || metadata.isSymbolicLink())
|
|
15
|
+
throw new Error("Invalid AgentIM state parent");
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
if (error.code !== "ENOENT")
|
|
19
|
+
throw error;
|
|
20
|
+
await directory(parent);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
await mkdir(path, { mode: 0o700 }).catch((error) => { if (error.code !== "EEXIST")
|
|
24
|
+
throw error; });
|
|
25
|
+
const metadata = await lstat(path);
|
|
26
|
+
if (!metadata.isDirectory() || metadata.isSymbolicLink() || (metadata.mode & 0o077) !== 0)
|
|
27
|
+
throw new Error("AgentIM state directory must be private (0700)");
|
|
28
|
+
}
|
|
29
|
+
export async function privateText(path, maxBytes = 16384) {
|
|
30
|
+
const metadata = await lstat(path);
|
|
31
|
+
if (!metadata.isFile() || metadata.isSymbolicLink() || metadata.size > maxBytes)
|
|
32
|
+
throw new Error("AgentIM credential file must be private and bounded");
|
|
33
|
+
if (process.platform === "win32")
|
|
34
|
+
await windowsPrivatePath(path);
|
|
35
|
+
else if ((metadata.mode & 0o077) !== 0 || metadata.uid !== process.getuid?.())
|
|
36
|
+
throw new Error("AgentIM credential file must be private and owned by this user");
|
|
37
|
+
return readFile(path, "utf8");
|
|
38
|
+
}
|
|
39
|
+
export async function createOnce(path, contents) {
|
|
40
|
+
if (process.platform === "win32")
|
|
41
|
+
await windowsPrivatePath(dirname(path));
|
|
42
|
+
const staging = `${path}.${randomBytes(12).toString("hex")}.staging`;
|
|
43
|
+
const handle = await open(staging, "wx", 0o600);
|
|
44
|
+
try {
|
|
45
|
+
try {
|
|
46
|
+
await handle.writeFile(contents);
|
|
47
|
+
await handle.sync();
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
await handle.close();
|
|
51
|
+
}
|
|
52
|
+
await link(staging, path);
|
|
53
|
+
await syncParent(path);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
await unlink(staging).catch(() => { });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async function syncParent(path) {
|
|
60
|
+
if (process.platform === "win32")
|
|
61
|
+
return; // Windows does not support directory fsync.
|
|
62
|
+
const parent = await open(dirname(path), "r");
|
|
63
|
+
try {
|
|
64
|
+
await parent.sync();
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
await parent.close();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export async function replacePrivate(path, value) {
|
|
71
|
+
const temporary = `${path}.${randomBytes(12).toString("hex")}.tmp`;
|
|
72
|
+
await createOnce(temporary, value);
|
|
73
|
+
try {
|
|
74
|
+
await rename(temporary, path);
|
|
75
|
+
await syncParent(path);
|
|
76
|
+
}
|
|
77
|
+
finally {
|
|
78
|
+
await unlink(temporary).catch(() => { });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export async function assertPrivateDirectory(path) {
|
|
82
|
+
const metadata = await lstat(path);
|
|
83
|
+
if (!metadata.isDirectory() || metadata.isSymbolicLink())
|
|
84
|
+
throw new Error("AgentIM state must be a private directory owned by this user");
|
|
85
|
+
if (process.platform === "win32")
|
|
86
|
+
await windowsPrivatePath(path);
|
|
87
|
+
else if ((metadata.mode & 0o077) !== 0 || metadata.uid !== process.getuid?.())
|
|
88
|
+
throw new Error("AgentIM state must be a private directory owned by this user");
|
|
89
|
+
}
|
|
90
|
+
export async function stateSecrets(state, homeserver) {
|
|
91
|
+
await directory(state);
|
|
92
|
+
const pin = join(state, "homeserver.json");
|
|
93
|
+
try {
|
|
94
|
+
await createOnce(pin, JSON.stringify({ homeserver }));
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
if (error.code !== "EEXIST")
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
const pinned = JSON.parse(await privateText(pin));
|
|
101
|
+
if (!pinned || typeof pinned !== "object" || !("homeserver" in pinned) || pinned.homeserver !== homeserver)
|
|
102
|
+
throw new Error("AgentIM state belongs to another homeserver");
|
|
103
|
+
const path = join(state, "store-passphrase");
|
|
104
|
+
try {
|
|
105
|
+
await createOnce(path, randomBytes(32).toString("base64url"));
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (error.code !== "EEXIST")
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
const passphrase = await privateText(path);
|
|
112
|
+
if (passphrase.length < 32)
|
|
113
|
+
throw new Error("Invalid AgentIM store passphrase");
|
|
114
|
+
return passphrase;
|
|
115
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { assertRuntimeNode } from "./node-version.js";
|
|
2
|
+
import { clientRequestHeaders } from "./http.js";
|
|
3
|
+
export function origin(value) {
|
|
4
|
+
const url = new URL(value);
|
|
5
|
+
if (url.username || url.password || url.search || url.hash || url.pathname !== "/" ||
|
|
6
|
+
(url.protocol !== "https:" && !(url.protocol === "http:" && ["127.0.0.1", "localhost", "[::1]"].includes(url.hostname)))) {
|
|
7
|
+
throw new Error("AgentIM service URL must be an HTTPS origin, or loopback HTTP");
|
|
8
|
+
}
|
|
9
|
+
return url.origin;
|
|
10
|
+
}
|
|
11
|
+
/** Resolve a pinned service without starting a device or requiring a browser profile. */
|
|
12
|
+
export async function serviceOrigin(homeserver, siteUrl) {
|
|
13
|
+
assertRuntimeNode();
|
|
14
|
+
if (homeserver)
|
|
15
|
+
return origin(homeserver);
|
|
16
|
+
if (!siteUrl)
|
|
17
|
+
throw new Error("Set a homeserver or site URL");
|
|
18
|
+
const site = origin(siteUrl);
|
|
19
|
+
const response = await fetch(`${site}/agentim/manifest.json`, { headers: clientRequestHeaders, redirect: "error", credentials: "omit", cache: "no-store", signal: AbortSignal.timeout(10000) });
|
|
20
|
+
if (!response.ok || Number(response.headers.get("content-length") ?? 0) > 8192)
|
|
21
|
+
throw new Error("AgentIM site discovery failed");
|
|
22
|
+
const reader = response.body?.getReader();
|
|
23
|
+
if (!reader)
|
|
24
|
+
throw new Error("AgentIM site manifest is missing");
|
|
25
|
+
let text = "", bytes = 0;
|
|
26
|
+
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
27
|
+
try {
|
|
28
|
+
while (true) {
|
|
29
|
+
const part = await reader.read();
|
|
30
|
+
if (part.done)
|
|
31
|
+
break;
|
|
32
|
+
bytes += part.value.byteLength;
|
|
33
|
+
if (bytes > 8192) {
|
|
34
|
+
await reader.cancel();
|
|
35
|
+
throw new Error("AgentIM manifest exceeds its budget");
|
|
36
|
+
}
|
|
37
|
+
text += decoder.decode(part.value, { stream: true });
|
|
38
|
+
}
|
|
39
|
+
text += decoder.decode();
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
reader.releaseLock();
|
|
43
|
+
}
|
|
44
|
+
const manifest = JSON.parse(text);
|
|
45
|
+
if (!manifest || typeof manifest !== "object" || !("homeserver_url" in manifest) || typeof manifest.homeserver_url !== "string")
|
|
46
|
+
throw new Error("Invalid AgentIM manifest");
|
|
47
|
+
return origin(manifest.homeserver_url);
|
|
48
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
/** Invoke a bundled fixed script, without a shell, profile or caller secrets. */
|
|
4
|
+
export async function windowsCommand(source, input, timeoutMs = 30000) {
|
|
5
|
+
if (!Number.isSafeInteger(timeoutMs) || timeoutMs < 1000 || timeoutMs > 960000)
|
|
6
|
+
throw new Error("Invalid native Windows operation budget");
|
|
7
|
+
const root = process.env.SystemRoot;
|
|
8
|
+
if (!root)
|
|
9
|
+
throw new Error("Windows SystemRoot is required for native operations");
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
const child = execFile(join(root, "System32/WindowsPowerShell/v1.0/powershell.exe"), ["-NoLogo", "-NoProfile", "-NonInteractive", "-EncodedCommand", Buffer.from(source, "utf16le").toString("base64")], { timeout: timeoutMs, maxBuffer: 128 * 1024, windowsHide: true, env: { SystemRoot: root } }, (error, stdout) => error ? reject(new Error("Native Windows operation failed; existing state was preserved")) : resolve(stdout));
|
|
12
|
+
child.stdin?.end(JSON.stringify(input));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { windowsCommand } from "./windows-command.js";
|
|
3
|
+
/** Use the core's canonical Windows ACL policy; only JSON data goes through stdin. */
|
|
4
|
+
export async function windowsPrivatePath(path, operation = "check") {
|
|
5
|
+
const source = await readFile(new URL("./windows-acl.ps1", import.meta.url), "utf8");
|
|
6
|
+
try {
|
|
7
|
+
if (await windowsCommand(source, { path, operation }) !== "private")
|
|
8
|
+
throw new Error();
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
throw new Error("AgentIM requires a local private path owned and accessible only by the current Windows user; reparse points are refused");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { randomBytes, createHash } from "node:crypto";
|
|
2
|
+
import { lstat } from "node:fs/promises";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { attachAgentAccount } from "../accounts/communication.js";
|
|
5
|
+
import { createOnce, directory, privateText } from "../configuration/private-state.js";
|
|
6
|
+
async function vacant(path) {
|
|
7
|
+
try {
|
|
8
|
+
await lstat(path);
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (error.code === "ENOENT")
|
|
12
|
+
return;
|
|
13
|
+
throw error;
|
|
14
|
+
}
|
|
15
|
+
throw new Error("Chat backup output already exists; it was preserved");
|
|
16
|
+
}
|
|
17
|
+
/** Save native Matrix encrypted keys and an independent private recovery key; never print either. */
|
|
18
|
+
export async function backupAgentChatKeys(options, paths) {
|
|
19
|
+
const backupFile = resolve(paths.backupFile), recoveryKeyFile = resolve(paths.recoveryKeyFile);
|
|
20
|
+
if (backupFile === recoveryKeyFile)
|
|
21
|
+
throw new Error("Chat backup and recovery key require separate private files");
|
|
22
|
+
await vacant(backupFile);
|
|
23
|
+
await vacant(recoveryKeyFile);
|
|
24
|
+
await directory(dirname(backupFile));
|
|
25
|
+
await directory(dirname(recoveryKeyFile));
|
|
26
|
+
const connection = await attachAgentAccount(options);
|
|
27
|
+
try {
|
|
28
|
+
const secret = randomBytes(32).toString("base64url");
|
|
29
|
+
const backup = await connection.client.encryption.exportKeys({ recovery_secret: secret });
|
|
30
|
+
if (backup.homeserver !== connection.account.homeserver)
|
|
31
|
+
throw new Error("Chat backup service binding differs");
|
|
32
|
+
const recovery = { version: 1, kind: "agentim-chat-recovery-key", homeserver: backup.homeserver,
|
|
33
|
+
user_id: backup.user_id, recovery_secret: secret };
|
|
34
|
+
const recoveryBytes = JSON.stringify(recovery) + "\n";
|
|
35
|
+
await createOnce(recoveryKeyFile, recoveryBytes);
|
|
36
|
+
await createOnce(backupFile, backup.encrypted_keys);
|
|
37
|
+
if (await privateText(recoveryKeyFile) !== recoveryBytes || await privateText(backupFile, 3 * 1024 * 1024) !== backup.encrypted_keys)
|
|
38
|
+
throw new Error("Chat backup readback failed; preserve both private files");
|
|
39
|
+
return { backupFile, recoveryKeyFile, saved: true, userId: backup.user_id, homeserver: backup.homeserver,
|
|
40
|
+
sha256: createHash("sha256").update(backup.encrypted_keys).digest("hex") };
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
await connection.close();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { dirname, resolve } from "node:path";
|
|
2
|
+
import { attachAgentAccount } from "../accounts/communication.js";
|
|
3
|
+
import { directory, privateText } from "../configuration/private-state.js";
|
|
4
|
+
async function recoveryMaterial(path) {
|
|
5
|
+
let value;
|
|
6
|
+
try {
|
|
7
|
+
value = JSON.parse(await privateText(resolve(path), 4096));
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
throw new Error("Native recovery file must be private, bounded and valid JSON");
|
|
11
|
+
}
|
|
12
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
13
|
+
throw new Error("Invalid native recovery file");
|
|
14
|
+
const data = value;
|
|
15
|
+
const fields = ["version", "kind", "homeserver", "user_id", "passphrase", "recovery_key"];
|
|
16
|
+
if (Object.keys(data).some(key => !fields.includes(key)) || data.version !== 1 || data.kind !== "agentim-matrix-recovery"
|
|
17
|
+
|| typeof data.homeserver !== "string" || typeof data.user_id !== "string"
|
|
18
|
+
|| typeof data.passphrase !== "string" || data.passphrase.length < 32 || data.passphrase.length > 1024
|
|
19
|
+
|| (data.recovery_key !== null && typeof data.recovery_key !== "string"))
|
|
20
|
+
throw new Error("Invalid native recovery file");
|
|
21
|
+
return { homeserver: data.homeserver, user_id: data.user_id, passphrase: data.passphrase, recovery_key: data.recovery_key };
|
|
22
|
+
}
|
|
23
|
+
/** Enable native continuous backup; the core persists its independent recovery material first. */
|
|
24
|
+
export async function enableAgentOnlineBackup(options, recoveryKeyFile) {
|
|
25
|
+
const file = resolve(recoveryKeyFile);
|
|
26
|
+
await directory(dirname(file));
|
|
27
|
+
const connection = await attachAgentAccount(options);
|
|
28
|
+
try {
|
|
29
|
+
return await connection.client.encryption.enableBackup({ recovery_key_file: file });
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
await connection.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Import native Secret Storage authority into the matching existing account; never register. */
|
|
36
|
+
export async function recoverAgentOnlineBackup(options, recoveryKeyFile) {
|
|
37
|
+
const material = await recoveryMaterial(recoveryKeyFile);
|
|
38
|
+
const connection = await attachAgentAccount(options);
|
|
39
|
+
try {
|
|
40
|
+
const identity = await connection.client.identity.status();
|
|
41
|
+
if (identity.homeserver !== material.homeserver || identity.user_id !== material.user_id)
|
|
42
|
+
throw new Error("Native recovery file belongs to another account or service");
|
|
43
|
+
return await connection.client.encryption.recoverBackup({ recovery_key: material.recovery_key ?? material.passphrase });
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
await connection.close();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { privateText } from "../configuration/private-state.js";
|
|
2
|
+
import { origin } from "../configuration/service-origin.js";
|
|
3
|
+
/** Chat-key authority is distinct from account login credentials and registration proofs. */
|
|
4
|
+
export async function chatRecoveryKey(path) {
|
|
5
|
+
try {
|
|
6
|
+
const value = JSON.parse(await privateText(path));
|
|
7
|
+
if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).sort().join() !== "homeserver,kind,recovery_secret,user_id,version")
|
|
8
|
+
throw new Error();
|
|
9
|
+
const record = value;
|
|
10
|
+
if (record.version !== 1 || record.kind !== "agentim-chat-recovery-key" || typeof record.homeserver !== "string"
|
|
11
|
+
|| origin(record.homeserver) !== record.homeserver || typeof record.user_id !== "string" || !record.user_id.startsWith("@")
|
|
12
|
+
|| typeof record.recovery_secret !== "string" || !record.recovery_secret.length || [...record.recovery_secret].length > 1024)
|
|
13
|
+
throw new Error();
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
throw new Error("Expected a private chat recovery key file; account credentials cannot restore chat keys");
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { attachAgentAccount } from "../accounts/communication.js";
|
|
2
|
+
import { privateText } from "../configuration/private-state.js";
|
|
3
|
+
import { chatRecoveryKey } from "./recovery-file.js";
|
|
4
|
+
/** Import only into the matching logged-in account; native Matrix validates/decrypts the archive. */
|
|
5
|
+
export async function restoreAgentChatKeys(options, paths) {
|
|
6
|
+
const key = await chatRecoveryKey(paths.recoveryKeyFile);
|
|
7
|
+
const connection = await attachAgentAccount({ ...options,
|
|
8
|
+
...(!options.homeserverUrl && !options.siteUrl ? { homeserverUrl: key.homeserver } : {}),
|
|
9
|
+
...(!options.agentId ? { agentId: key.user_id.slice(1).split(":", 1)[0] } : {}) });
|
|
10
|
+
try {
|
|
11
|
+
if (connection.account.homeserver !== key.homeserver)
|
|
12
|
+
throw new Error("Chat recovery key belongs to another service");
|
|
13
|
+
return await connection.client.encryption.importKeys({ homeserver: key.homeserver, expected_user_id: key.user_id,
|
|
14
|
+
encrypted_keys: await privateText(paths.backupFile, 3 * 1024 * 1024), recovery_secret: key.recovery_secret });
|
|
15
|
+
}
|
|
16
|
+
finally {
|
|
17
|
+
await connection.close();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { startEmbeddedAgentFromEnv } from "./lifecycle/embedded.js";
|
|
2
|
+
export { startAgentFromEnv } from "./lifecycle/start.js";
|
|
3
|
+
export { connectAgentFromEnv, attachAgentFromEnv, managedAgentStatusFromEnv, stopManagedAgentFromEnv } from "./managed/control.js";
|
|
4
|
+
export { ManagedError } from "./managed/errors.js";
|
|
5
|
+
export { validateNativeClientSettings, nativeClientSettingsSchema } from "@agentims/sdk";
|
|
6
|
+
export { registerAgentAccount } from "./accounts/register.js";
|
|
7
|
+
export { loginAgentAccount } from "./accounts/login.js";
|
|
8
|
+
export { discoverAgentLoginMethods } from "./authentication/methods.js";
|
|
9
|
+
export { agentAuthenticationStatus } from "./authentication/status.js";
|
|
10
|
+
export { startAgentAuthorizationFromEnv, attachAgentAuthorizationFromEnv } from "./managed/control.js";
|
|
11
|
+
export { startAuthorizationOwnerFromEnv } from "./lifecycle/start.js";
|
|
12
|
+
export { attachAuthorizationFromEnv } from "./lifecycle/communication.js";
|
|
13
|
+
export { attachAgentAccount, agentAccountStatus, stopAgentAccount } from "./accounts/communication.js";
|
|
14
|
+
export { replaceAgentCredential, ensureAgentCredential } from "./accounts/credential-lifecycle.js";
|
|
15
|
+
export { backupAgentChatKeys } from "./history/backup.js";
|
|
16
|
+
export { restoreAgentChatKeys } from "./history/restore.js";
|
|
17
|
+
export { AccountAccessError } from "./accounts/errors.js";
|
|
18
|
+
export { AgentIMClient, EmbeddedAgentIMClient, parseAgentIMJSON, stringifyAgentIMJSON, validateLocalRequest, localRequestSchema, AgentIMError, ApiError, ValidationError, ProtocolError, TransportError, RequestCancelledError, RequestTimeoutError, ClientClosedError, AuthenticationError, OperationError, ResponseTooLargeError, } from "@agentims/sdk";
|
|
19
|
+
export { enableAgentOnlineBackup, recoverAgentOnlineBackup } from "./history/online.js";
|
|
20
|
+
export { archiveAgentDeviceState, branchAgentStream, migrateAgentDeviceState } from "./storage/archive.js";
|
|
21
|
+
export { AdapterError, EventSource, startEventSource, DeliveryCoordinator, createDeliveryCoordinator, readCommunicationReceipt, readAdapterStatus, } from "@agentims/adapter";
|
|
22
|
+
export { runtimePackageInfo, checkClientUpdate } from "./updates/discovery.js";
|
|
23
|
+
export { configureClientUpdates, readUpdatePolicy } from "./updates/policy.js";
|
|
24
|
+
export { planClientUpdate, readUpdateRecord } from "./updates/ledger.js";
|
|
25
|
+
export { applyClientUpdate } from "./updates/managed.js";
|
|
26
|
+
export { watchClientUpdates } from "./updates/watch.js";
|
|
27
|
+
export { UpdateError } from "./updates/types.js";
|
|
28
|
+
export { clientRestartTicket, resumeClientUpdate } from "./updates/restart.js";
|
|
29
|
+
export { prepareEmbeddedClientUpdate, resumeEmbeddedClientUpdate } from "./updates/embedded.js";
|
|
30
|
+
export { sdkInfo } from "@agentims/sdk";
|
|
31
|
+
export { exportAgentSecretsBundle } from "./storage/archive.js";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { lstat } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { foregroundConnection } from "./foreground-connection.js";
|
|
4
|
+
import { attachAgentFromEnv, attachAgentAuthorizationFromEnv, managedAgentStatusFromEnv, stopManagedAgentFromEnv } from "../managed/control.js";
|
|
5
|
+
import { managedDirectory } from "../managed/directory.js";
|
|
6
|
+
import { ManagedError } from "../managed/errors.js";
|
|
7
|
+
async function hasManagedState(env) {
|
|
8
|
+
try {
|
|
9
|
+
await lstat(join(managedDirectory(env), "managed/core.json"));
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
if (error.code === "ENOENT")
|
|
14
|
+
return false;
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** CLI commands attach to the active owner; neither path registers or starts a device. */
|
|
19
|
+
export async function attachCommunicationFromEnv(env) {
|
|
20
|
+
const owned = await foregroundConnection(env);
|
|
21
|
+
if (owned.authenticationRequired)
|
|
22
|
+
throw new ManagedError("IDENTITY_NOT_READY", "Continue the original authentication on this owner before business operations");
|
|
23
|
+
if (owned.client)
|
|
24
|
+
return { mode: "owned", client: owned.client, close: () => owned.client.close() };
|
|
25
|
+
if (!await hasManagedState(env))
|
|
26
|
+
throw new ManagedError("COMMUNICATION_STOPPED", "Communication is stopped; use login or login --foreground");
|
|
27
|
+
return attachAgentFromEnv(env);
|
|
28
|
+
}
|
|
29
|
+
/** Explicitly attach the auth surface of the same owner; never start a new device implicitly. */
|
|
30
|
+
export async function attachAuthorizationFromEnv(env) {
|
|
31
|
+
const owned = await foregroundConnection(env, true);
|
|
32
|
+
if (owned.client)
|
|
33
|
+
return { mode: "owned", client: owned.client, close: () => owned.client.close() };
|
|
34
|
+
if (!await hasManagedState(env))
|
|
35
|
+
throw new ManagedError("COMMUNICATION_STOPPED", "Start the original authentication owner with auth start");
|
|
36
|
+
return attachAgentAuthorizationFromEnv(env);
|
|
37
|
+
}
|
|
38
|
+
export async function communicationStatusFromEnv(env) {
|
|
39
|
+
const owned = await foregroundConnection(env, true);
|
|
40
|
+
if (owned.client) {
|
|
41
|
+
try {
|
|
42
|
+
const status = await owned.client.identity.status();
|
|
43
|
+
return { mode: "owned", supervisor: "parent", registered: false, online: status.sync_state === "syncing", syncState: status.sync_state, cryptoReady: status.crypto_ready, userId: status.user_id, deviceId: status.device_id, businessHandler: "not_reported" };
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
await owned.client.close();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (await hasManagedState(env))
|
|
50
|
+
return managedAgentStatusFromEnv(env);
|
|
51
|
+
return { mode: owned.descriptor ? "owned" : "none", supervisor: owned.descriptor ? "parent" : null, online: false, registered: false, syncState: "stopped", userId: null, deviceId: null, cryptoReady: false, businessHandler: "not_reported" };
|
|
52
|
+
}
|
|
53
|
+
export async function stopCommunicationFromEnv(env) {
|
|
54
|
+
const owned = await foregroundConnection(env, true);
|
|
55
|
+
if (owned.client) {
|
|
56
|
+
try {
|
|
57
|
+
await owned.client.identity.shutdownDaemon();
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
await owned.client.close();
|
|
61
|
+
}
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (await hasManagedState(env))
|
|
65
|
+
await stopManagedAgentFromEnv(env);
|
|
66
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { AgentIMClient } from "@agentims/sdk";
|
|
3
|
+
import { deviceConfiguration } from "../configuration/environment.js";
|
|
4
|
+
import { stateSecrets } from "../configuration/private-state.js";
|
|
5
|
+
import { initializeIdentity } from "./identity.js";
|
|
6
|
+
/** Explicit in-process owner using the same private account/device storage as process mode. */
|
|
7
|
+
export async function startEmbeddedAgentFromEnv(env = process.env, passwordLogin) {
|
|
8
|
+
const config = await deviceConfiguration(env);
|
|
9
|
+
await AgentIMClient.checkEmbeddedSupport();
|
|
10
|
+
const passphrase = await stateSecrets(config.state, config.homeserver);
|
|
11
|
+
const client = await AgentIMClient.openEmbedded({
|
|
12
|
+
homeserver: config.homeserver, storeDir: join(config.state, "device"), storePassphrase: passphrase,
|
|
13
|
+
...(config.native ? { native: config.native } : {}),
|
|
14
|
+
...(config.credentialBackup ? { accountCredentialBackup: config.credentialBackup } : {}),
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
await initializeIdentity(client, config, passwordLogin);
|
|
18
|
+
return Object.freeze({ client, close: () => client.close() });
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
await client.close();
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { unlink } from "node:fs/promises";
|
|
3
|
+
import { AgentIMClient } from "@agentims/sdk";
|
|
4
|
+
import { directory, replacePrivate } from "../configuration/private-state.js";
|
|
5
|
+
import { readConnection } from "../configuration/connection-descriptor.js";
|
|
6
|
+
import { managedDirectory } from "../managed/directory.js";
|
|
7
|
+
import { ManagedError } from "../managed/errors.js";
|
|
8
|
+
import { assertDeviceBinding } from "../configuration/device-binding.js";
|
|
9
|
+
export const foregroundConnectionPath = (state) => join(state, "foreground/connection.json");
|
|
10
|
+
export async function publishForegroundConnection(state, connection) {
|
|
11
|
+
await directory(join(state, "foreground"));
|
|
12
|
+
await replacePrivate(foregroundConnectionPath(state), JSON.stringify(connection));
|
|
13
|
+
}
|
|
14
|
+
export async function removeForegroundConnection(state, token) {
|
|
15
|
+
const path = foregroundConnectionPath(state);
|
|
16
|
+
try {
|
|
17
|
+
if ((await readConnection(path)).api_token === token)
|
|
18
|
+
await unlink(path);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code !== "ENOENT")
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Probe an explicit owned communication process without starting it or consulting systemd. */
|
|
26
|
+
export async function foregroundConnection(env, authorization = false) {
|
|
27
|
+
let descriptor;
|
|
28
|
+
try {
|
|
29
|
+
descriptor = await readConnection(foregroundConnectionPath(managedDirectory(env)));
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error.code === "ENOENT")
|
|
33
|
+
return {};
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
const client = new AgentIMClient({ baseUrl: descriptor.base_url, apiToken: descriptor.api_token });
|
|
37
|
+
let status;
|
|
38
|
+
try {
|
|
39
|
+
status = await client.identity.status({ timeoutMs: 1500 });
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
await client.close();
|
|
43
|
+
return { descriptor };
|
|
44
|
+
}
|
|
45
|
+
if (status.homeserver !== descriptor.homeserver) {
|
|
46
|
+
await client.close();
|
|
47
|
+
throw new ManagedError("STATE_CONFLICT", "Owned communication belongs to another identity or service");
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
assertDeviceBinding(env, status.user_id, status.homeserver);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
await client.close();
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
if (!authorization && !status.user_id) {
|
|
57
|
+
await client.close();
|
|
58
|
+
return { descriptor, authenticationRequired: true };
|
|
59
|
+
}
|
|
60
|
+
return { descriptor, client };
|
|
61
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { stringifyAgentIMJSON } from "@agentims/sdk";
|
|
2
|
+
import { waitForCommunication } from "../managed/connection.js";
|
|
3
|
+
import { startAgentFromEnv, startAuthorizationOwnerFromEnv } from "./start.js";
|
|
4
|
+
/** Explicit foreground owner for containers and clouds without a user service manager. */
|
|
5
|
+
export async function foregroundAgentFromEnv(env, account, passwordLogin) {
|
|
6
|
+
return foregroundOwner(env, account, passwordLogin, false);
|
|
7
|
+
}
|
|
8
|
+
/** Keep an explicitly started OAuth/QR/UIAA owner alive across independent short CLI calls. */
|
|
9
|
+
export async function foregroundAuthorizationFromEnv(env) {
|
|
10
|
+
return foregroundOwner(env, undefined, undefined, true);
|
|
11
|
+
}
|
|
12
|
+
async function foregroundOwner(env, account, passwordLogin, authorization) {
|
|
13
|
+
const configuration = { ...env, AGENTIM_FOREGROUND_CONNECTION: "1" };
|
|
14
|
+
const device = authorization ? await startAuthorizationOwnerFromEnv(configuration) : await startAgentFromEnv(configuration, passwordLogin);
|
|
15
|
+
if (account)
|
|
16
|
+
await waitForCommunication(device.client);
|
|
17
|
+
process.stdout.write(stringifyAgentIMJSON({ event: "ready", authenticationOwner: authorization, status: await device.client.identity.status(), ...(account ? { account } : {}) }) + "\n");
|
|
18
|
+
while (true) {
|
|
19
|
+
let stop;
|
|
20
|
+
const ended = new Promise(resolve => {
|
|
21
|
+
stop = () => resolve();
|
|
22
|
+
process.once("SIGINT", stop);
|
|
23
|
+
process.once("SIGTERM", stop);
|
|
24
|
+
});
|
|
25
|
+
let exit;
|
|
26
|
+
try {
|
|
27
|
+
exit = await Promise.race([ended, device.stopped ?? ended]);
|
|
28
|
+
}
|
|
29
|
+
finally {
|
|
30
|
+
process.off("SIGINT", stop);
|
|
31
|
+
process.off("SIGTERM", stop);
|
|
32
|
+
}
|
|
33
|
+
if (exit) {
|
|
34
|
+
await device.close();
|
|
35
|
+
if (exit.code !== 0 || exit.signal)
|
|
36
|
+
throw new Error("Owned communication exited unexpectedly; its private state was preserved");
|
|
37
|
+
return { event: "stopped", statePreserved: true };
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
await device.close();
|
|
41
|
+
return { event: "stopped", statePreserved: true };
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
process.stdout.write(stringifyAgentIMJSON({ event: "stop_refused", nextAction: "finish_or_cancel_original_authorization_or_observation", statePreserved: true }) + "\n");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AgentIMClient } from "@agentims/sdk";
|
|
2
|
+
import { accountCredential, deviceAuthorization } from "../configuration/account-credential.js";
|
|
3
|
+
import { privateText } from "../configuration/private-state.js";
|
|
4
|
+
/** All communication owners delegate proof/crypto recovery to the native core. */
|
|
5
|
+
export async function initializeIdentity(client, config, passwordLogin) {
|
|
6
|
+
const status = await client.identity.status();
|
|
7
|
+
if (passwordLogin) {
|
|
8
|
+
if (config.credentialFile || config.authorizationFile || config.admissionFile)
|
|
9
|
+
throw new Error("Choose password or credential/authorization login");
|
|
10
|
+
await client.identity.loginPassword(passwordLogin);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (config.credentialFile || config.authorizationFile) {
|
|
14
|
+
const credential = config.credentialFile ? await accountCredential(config.credentialFile) : undefined;
|
|
15
|
+
const authorization = config.authorizationFile ? await deviceAuthorization(config.authorizationFile) : undefined;
|
|
16
|
+
const user = credential?.user_id ?? authorization.user_id;
|
|
17
|
+
if (status.user_id && status.user_id !== user)
|
|
18
|
+
throw new Error("Saved device belongs to another identity; its state was preserved");
|
|
19
|
+
if (config.agentId && user.slice(1).split(":", 1)[0] !== config.agentId)
|
|
20
|
+
throw new Error("Agent ID differs from the supplied credential");
|
|
21
|
+
if (credential)
|
|
22
|
+
await client.identity.recoverAccount({ credential_id: credential.credential_id, credential_secret: credential.credential_secret, expected_user_id: user, ...(config.verifyCredential ? { verify_credential: true } : {}) });
|
|
23
|
+
else if (!status.user_id) {
|
|
24
|
+
if (authorization.expires_at_ms <= Date.now())
|
|
25
|
+
throw new Error("Device authorization expired; request a new authorization file or use the account credential");
|
|
26
|
+
await client.identity.loginAuthorized({ login_token: authorization.login_token, expected_user_id: user });
|
|
27
|
+
}
|
|
28
|
+
await client.identity.ensureCredential();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!status.user_id) {
|
|
32
|
+
if (!config.agentId)
|
|
33
|
+
throw new Error("First start requires AGENTIM_AGENT_ID");
|
|
34
|
+
if (config.admissionFile)
|
|
35
|
+
await client.identity.register({ localpart: config.agentId, enrollment_token: (await privateText(config.admissionFile)).trim() });
|
|
36
|
+
else
|
|
37
|
+
await client.identity.registerPublic({ localpart: config.agentId });
|
|
38
|
+
}
|
|
39
|
+
else if (config.agentId && status.user_id.slice(1).split(":", 1)[0] !== config.agentId) {
|
|
40
|
+
throw new Error("Persisted Agent identity differs from AGENTIM_AGENT_ID");
|
|
41
|
+
}
|
|
42
|
+
else if (!config.admissionFile) {
|
|
43
|
+
await client.identity.registerPublic({ localpart: status.user_id.slice(1).split(":", 1)[0] });
|
|
44
|
+
}
|
|
45
|
+
await client.identity.ensureCredential();
|
|
46
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getPriority, setPriority } from "node:os";
|
|
2
|
+
/** Preserve a worker's stricter scheduling when launching any owned helper. */
|
|
3
|
+
export function lowerOwnedPriority(child) {
|
|
4
|
+
if (!child.pid)
|
|
5
|
+
return;
|
|
6
|
+
try {
|
|
7
|
+
// Some macOS/Node combinations report nice=20 although setPriority accepts
|
|
8
|
+
// only -20..19. Already stricter scheduling needs no mutation.
|
|
9
|
+
if (getPriority(child.pid) < 10)
|
|
10
|
+
setPriority(child.pid, 10);
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
const details = error;
|
|
14
|
+
if ((details.info?.code ?? details.code) === "ESRCH")
|
|
15
|
+
return;
|
|
16
|
+
child.stdout.resume();
|
|
17
|
+
child.stderr.resume();
|
|
18
|
+
child.stdin.end();
|
|
19
|
+
child.kill("SIGTERM");
|
|
20
|
+
throw new Error("Could not preserve communication process scheduling", { cause: error });
|
|
21
|
+
}
|
|
22
|
+
}
|