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,66 @@
|
|
|
1
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
2
|
+
import { open, rename, unlink } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { directory, assertPrivateDirectory } from "../configuration/private-state.js";
|
|
5
|
+
import { clientRequestHeaders } from "../configuration/http.js";
|
|
6
|
+
import { safeURL } from "./manifest.js";
|
|
7
|
+
import { fileDigest } from "./archive.js";
|
|
8
|
+
import { UpdateError } from "./types.js";
|
|
9
|
+
export async function downloadArtifact(item, policy) {
|
|
10
|
+
const origin = safeURL(item.url).origin;
|
|
11
|
+
if (![safeURL(policy.manifestUrl).origin, "https://registry.npmjs.org"].includes(origin)) {
|
|
12
|
+
throw new UpdateError("UPDATE_ARTIFACT_ORIGIN", "Client artifact origin is outside the configured update sources");
|
|
13
|
+
}
|
|
14
|
+
const location = join(policy.root, "downloads");
|
|
15
|
+
await directory(location);
|
|
16
|
+
await assertPrivateDirectory(location);
|
|
17
|
+
const destination = join(location, `${item.sha256}.tgz`);
|
|
18
|
+
try {
|
|
19
|
+
const existing = await fileDigest(destination);
|
|
20
|
+
if (existing.bytes === item.bytes && existing.sha256 === item.sha256)
|
|
21
|
+
return destination;
|
|
22
|
+
throw new UpdateError("UPDATE_CACHE_CORRUPT", "Existing client download is corrupt; it was preserved for diagnosis");
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (error.code !== "ENOENT")
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
const temporary = `${destination}.${randomBytes(8).toString("hex")}.part`;
|
|
29
|
+
const handle = await open(temporary, "wx", 0o600);
|
|
30
|
+
let complete = false;
|
|
31
|
+
try {
|
|
32
|
+
const response = await fetch(item.url, { headers: clientRequestHeaders, redirect: "error", credentials: "omit", signal: AbortSignal.timeout(300000) });
|
|
33
|
+
if (!response.ok || !response.body)
|
|
34
|
+
throw new UpdateError("UPDATE_DOWNLOAD_FAILED", "Client artifact download failed");
|
|
35
|
+
const reader = response.body.getReader(), hash = createHash("sha256");
|
|
36
|
+
let size = 0;
|
|
37
|
+
try {
|
|
38
|
+
while (true) {
|
|
39
|
+
const part = await reader.read();
|
|
40
|
+
if (part.done)
|
|
41
|
+
break;
|
|
42
|
+
size += part.value.byteLength;
|
|
43
|
+
if (size > item.bytes) {
|
|
44
|
+
await reader.cancel();
|
|
45
|
+
throw new UpdateError("UPDATE_DOWNLOAD_SIZE", "Client artifact exceeds the signed size");
|
|
46
|
+
}
|
|
47
|
+
hash.update(part.value);
|
|
48
|
+
await handle.writeFile(part.value);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
reader.releaseLock();
|
|
53
|
+
}
|
|
54
|
+
if (size !== item.bytes || hash.digest("hex") !== item.sha256)
|
|
55
|
+
throw new UpdateError("UPDATE_DOWNLOAD_DIGEST", "Client artifact differs from the signed release");
|
|
56
|
+
await handle.sync();
|
|
57
|
+
complete = true;
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
await handle.close();
|
|
61
|
+
if (!complete)
|
|
62
|
+
await unlink(temporary).catch(() => { });
|
|
63
|
+
}
|
|
64
|
+
await rename(temporary, destination);
|
|
65
|
+
return destination;
|
|
66
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { quiesceForUpdate } from "./admission.js";
|
|
3
|
+
import { expectCleanShutdown, verifyCleanShutdown } from "./shutdown-proof.js";
|
|
4
|
+
import { realpath } from "node:fs/promises";
|
|
5
|
+
import { AgentIMClient } from "@agentims/sdk";
|
|
6
|
+
import { waitForCommunication } from "../managed/connection.js";
|
|
7
|
+
import { privateText } from "../configuration/private-state.js";
|
|
8
|
+
import { readUpdatePolicy, updateDocument } from "./policy.js";
|
|
9
|
+
import { readUpdateRecord, writeUpdateRecord, plannedRelease } from "./ledger.js";
|
|
10
|
+
import { stageInstallation, validateInstallation } from "./installation.js";
|
|
11
|
+
import { assertContinuity, captureContinuity, loadContinuity, saveContinuity, assertDatabaseContinuity } from "./continuity.js";
|
|
12
|
+
import { updateLease } from "./locking.js";
|
|
13
|
+
import { ensureDeviceArchive } from "./device-archive.js";
|
|
14
|
+
import { inspectDevice } from "./offline.js";
|
|
15
|
+
import { withInspectionConfig } from "./inspection-config.js";
|
|
16
|
+
import { assertResumedPackage, clientRestartTicket } from "./restart.js";
|
|
17
|
+
import { activeClient } from "./activation.js";
|
|
18
|
+
import { compareVersion } from "./discovery.js";
|
|
19
|
+
import { quiesceHost, resumeHost } from "./host-continuation.js";
|
|
20
|
+
import { UpdateError } from "./types.js";
|
|
21
|
+
/** Close the native owner, seal its stopped state, then hand off to a new host process. */
|
|
22
|
+
export async function prepareEmbeddedClientUpdate(options) {
|
|
23
|
+
const policy = await readUpdatePolicy(options.root), unlock = await updateLease(policy.root);
|
|
24
|
+
let record = await readUpdateRecord(policy.root, options.updateId);
|
|
25
|
+
const transition = async (phase) => {
|
|
26
|
+
record = { ...record, phase, updatedAtMs: Date.now(), errorCode: null };
|
|
27
|
+
await writeUpdateRecord(policy, record);
|
|
28
|
+
};
|
|
29
|
+
try {
|
|
30
|
+
if (record.owner !== "embedded")
|
|
31
|
+
throw new UpdateError("UPDATE_OWNER_MODE", "Original plan belongs to a managed communication owner");
|
|
32
|
+
if (["restart_required", "resuming", "applied"].includes(record.phase))
|
|
33
|
+
return record;
|
|
34
|
+
if (policy.hostMode !== "coordinated")
|
|
35
|
+
throw new UpdateError("UPDATE_EMBEDDED_HOST_REQUIRED", "Embedded updates require coordinated host policy");
|
|
36
|
+
if (options.client && (options.client.ownerKind !== "embedded" || options.client.storeDirectory !== await realpath(join(record.stateDir, "device")))) {
|
|
37
|
+
throw new UpdateError("UPDATE_DEVICE_BINDING", "The supplied embedded owner must belong to the original plan's device directory");
|
|
38
|
+
}
|
|
39
|
+
if (["planned", "staged", "deferred", "quiescing"].includes(record.phase) && !options.client) {
|
|
40
|
+
throw new UpdateError("UPDATE_EMBEDDED_OWNER_REQUIRED", "The original embedded owner must supply its live client before shutdown");
|
|
41
|
+
}
|
|
42
|
+
const active = await activeClient(policy.root);
|
|
43
|
+
if (active && compareVersion(record.toVersion, active.runtimeVersion) < 0)
|
|
44
|
+
throw new UpdateError("UPDATE_VERSION_REWIND", "Original plan is older than the activated client");
|
|
45
|
+
const release = await plannedRelease(policy, record), installed = await stageInstallation(release, record.manifestDigest, policy);
|
|
46
|
+
const platform = release.platforms.find(item => item.platform === `${process.platform}-${process.arch}`);
|
|
47
|
+
if (!platform?.executionValidated)
|
|
48
|
+
throw new UpdateError("UPDATE_PLATFORM_UNVALIDATED", "Embedded update requires executed acceptance for this platform");
|
|
49
|
+
if (!await quiesceHost(policy, record.updateId, options.host)) {
|
|
50
|
+
await transition("deferred");
|
|
51
|
+
return record;
|
|
52
|
+
}
|
|
53
|
+
if (["planned", "staged", "deferred", "quiescing"].includes(record.phase)) {
|
|
54
|
+
if (!options.client)
|
|
55
|
+
throw new UpdateError("UPDATE_EMBEDDED_OWNER_REQUIRED", "The original embedded owner must supply its live client before shutdown");
|
|
56
|
+
const info = await options.client.reliability.runtimeInfo();
|
|
57
|
+
if (!platform.compatibleSourceDigest.includes(info.source_digest) && info.source_digest !== platform.sourceDigest
|
|
58
|
+
|| info.storage_compatibility !== platform.storageCompatibility || info.matrix_revision !== release.matrixRevision || info.binding_abi !== release.bindingAbi) {
|
|
59
|
+
await resumeHost(policy, record.updateId, options.host);
|
|
60
|
+
throw new UpdateError("UPDATE_EMBEDDED_MIGRATION_REQUIRED", "Stop the host and perform an explicitly approved offline migration before changing embedded storage compatibility");
|
|
61
|
+
}
|
|
62
|
+
await transition("quiescing");
|
|
63
|
+
const pending = await quiesceForUpdate(options.client, info.owner_generation);
|
|
64
|
+
if (pending) {
|
|
65
|
+
await transition("deferred");
|
|
66
|
+
await resumeHost(policy, record.updateId, options.host);
|
|
67
|
+
return record;
|
|
68
|
+
}
|
|
69
|
+
const baseline = await captureContinuity(options.client);
|
|
70
|
+
if (BigInt(baseline.state.active_leases) !== 0n) {
|
|
71
|
+
await options.client.reliability.quiesce({ owner_generation: info.owner_generation, quiesced: false });
|
|
72
|
+
await resumeHost(policy, record.updateId, options.host);
|
|
73
|
+
await transition("deferred");
|
|
74
|
+
throw new UpdateError("UPDATE_ACTIVE_DELIVERY_LEASES", "Persist and release business delivery leases before changing the embedded owner");
|
|
75
|
+
}
|
|
76
|
+
await saveContinuity(policy, record.updateId, baseline);
|
|
77
|
+
await expectCleanShutdown(policy.root, record.updateId, info);
|
|
78
|
+
await transition("stopping");
|
|
79
|
+
await options.client.close();
|
|
80
|
+
await transition("stopped");
|
|
81
|
+
}
|
|
82
|
+
if (record.phase === "stopping") {
|
|
83
|
+
// A dead host releases its OS lease; inspection below refuses a second live owner.
|
|
84
|
+
await options.client?.close();
|
|
85
|
+
await transition("stopped");
|
|
86
|
+
}
|
|
87
|
+
if (["stopped", "archiving"].includes(record.phase)) {
|
|
88
|
+
await verifyCleanShutdown(policy.root, record.updateId, record.stateDir);
|
|
89
|
+
const current = await withInspectionConfig(record.stateDir, config => inspectDevice(installed.executable, config, installed.slot));
|
|
90
|
+
assertDatabaseContinuity((await loadContinuity(policy, record.updateId)).state, current.state);
|
|
91
|
+
await transition("archiving");
|
|
92
|
+
await ensureDeviceArchive(policy, record.updateId, record.stateDir, installed.executable);
|
|
93
|
+
await transition("validated");
|
|
94
|
+
}
|
|
95
|
+
if (record.phase === "validated") {
|
|
96
|
+
await updateDocument(policy.root, "active.json", { version: 1, updateId: record.updateId, digest: record.manifestDigest, runtimeVersion: record.toVersion });
|
|
97
|
+
await transition("restart_required");
|
|
98
|
+
await options.host.restartRequired?.(await clientRestartTicket(policy.root, record.updateId));
|
|
99
|
+
}
|
|
100
|
+
return record;
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
await writeUpdateRecord(policy, { ...record, updatedAtMs: Date.now(), errorCode: error instanceof UpdateError ? error.code : "UPDATE_INTERRUPTED" });
|
|
104
|
+
throw error;
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
await unlock();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** Call in the new host, before any business handler, using the ticket's exact runtimeModule. */
|
|
111
|
+
export async function resumeEmbeddedClientUpdate(options) {
|
|
112
|
+
const policy = await readUpdatePolicy(options.root), unlock = await updateLease(policy.root);
|
|
113
|
+
let client;
|
|
114
|
+
try {
|
|
115
|
+
let record = await readUpdateRecord(policy.root, options.updateId);
|
|
116
|
+
if (record.owner !== "embedded" || !["restart_required", "resuming", "applied"].includes(record.phase))
|
|
117
|
+
throw new UpdateError("UPDATE_NOT_READY", "Embedded update has not reached host restart");
|
|
118
|
+
const release = await plannedRelease(policy, record);
|
|
119
|
+
await assertResumedPackage(release);
|
|
120
|
+
await validateInstallation(release, join(policy.root, "releases", record.manifestDigest));
|
|
121
|
+
const pin = JSON.parse(await privateText(join(record.stateDir, "homeserver.json")));
|
|
122
|
+
client = await AgentIMClient.openEmbedded({ homeserver: pin.homeserver, storeDir: join(record.stateDir, "device"), storePassphrase: await privateText(join(record.stateDir, "store-passphrase")) });
|
|
123
|
+
await waitForCommunication(client);
|
|
124
|
+
const current = await captureContinuity(client), baseline = await loadContinuity(policy, record.updateId);
|
|
125
|
+
const platform = release.platforms.find(item => item.platform === `${process.platform}-${process.arch}`);
|
|
126
|
+
if (current.runtime.source_digest !== platform?.sourceDigest)
|
|
127
|
+
throw new UpdateError("UPDATE_RUNNING_BUILD_MISMATCH", "Loaded native SDK differs from the selected release");
|
|
128
|
+
assertContinuity(record.phase === "restart_required" ? baseline : { ...baseline, state: { ...baseline.state, processed_digest: current.state.processed_digest, intents_digest: current.state.intents_digest } }, current);
|
|
129
|
+
record = { ...record, phase: "resuming", updatedAtMs: Date.now() };
|
|
130
|
+
await writeUpdateRecord(policy, record);
|
|
131
|
+
await resumeHost(policy, record.updateId, options.host);
|
|
132
|
+
record = { ...record, phase: "applied", errorCode: null, updatedAtMs: Date.now() };
|
|
133
|
+
await writeUpdateRecord(policy, record);
|
|
134
|
+
return { client, record };
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
await client?.close();
|
|
138
|
+
throw error;
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
await unlock();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { createOnce, privateText } from "../configuration/private-state.js";
|
|
3
|
+
import { UpdateError } from "./types.js";
|
|
4
|
+
export function validateHostContinuation(value) {
|
|
5
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
6
|
+
throw new UpdateError("UPDATE_HOST_RECEIPT_INVALID", "Host continuation receipt is invalid");
|
|
7
|
+
const v = value;
|
|
8
|
+
if (Object.keys(v).sort().join() !== ["version", "bindingId", "sinkCheckpoint", "operationStoreDigest", "unknownOperationIds"].sort().join()
|
|
9
|
+
|| v.version !== 1 || typeof v.bindingId !== "string" || !/^[A-Za-z0-9._:-]{1,128}$/.test(v.bindingId)
|
|
10
|
+
|| v.sinkCheckpoint !== null && (typeof v.sinkCheckpoint !== "string" || v.sinkCheckpoint.length < 1 || v.sinkCheckpoint.length > 8192)
|
|
11
|
+
|| typeof v.operationStoreDigest !== "string" || !/^[a-f0-9]{64}$/.test(v.operationStoreDigest)
|
|
12
|
+
|| !Array.isArray(v.unknownOperationIds) || v.unknownOperationIds.length > 1000
|
|
13
|
+
|| !v.unknownOperationIds.every(id => typeof id === "string" && /^[A-Za-z0-9._:-]{1,256}$/.test(id))
|
|
14
|
+
|| new Set(v.unknownOperationIds).size !== v.unknownOperationIds.length)
|
|
15
|
+
throw new UpdateError("UPDATE_HOST_RECEIPT_INVALID", "Host continuation receipt is invalid");
|
|
16
|
+
return { version: 1, bindingId: v.bindingId, sinkCheckpoint: v.sinkCheckpoint, operationStoreDigest: v.operationStoreDigest, unknownOperationIds: [...v.unknownOperationIds].sort() };
|
|
17
|
+
}
|
|
18
|
+
export async function readHostContinuation(policy, id) {
|
|
19
|
+
return validateHostContinuation(JSON.parse(await privateText(join(policy.root, `${id}.host.json`), 393216)));
|
|
20
|
+
}
|
|
21
|
+
/** The host attests its own business store; this library never invents an ACK or business result. */
|
|
22
|
+
export async function quiesceHost(policy, id, host) {
|
|
23
|
+
const result = await host.quiesce(id);
|
|
24
|
+
if (result.safe === false)
|
|
25
|
+
return false;
|
|
26
|
+
if (result.safe !== true)
|
|
27
|
+
throw new UpdateError("UPDATE_HOST_RECEIPT_INVALID", "Host did not attest a durable continuation boundary");
|
|
28
|
+
const receipt = validateHostContinuation(result.continuation), encoded = JSON.stringify(receipt);
|
|
29
|
+
try {
|
|
30
|
+
await createOnce(join(policy.root, `${id}.host.json`), encoded);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (error.code !== "EEXIST")
|
|
34
|
+
throw error;
|
|
35
|
+
if (JSON.stringify(await readHostContinuation(policy, id)) !== encoded)
|
|
36
|
+
throw new UpdateError("UPDATE_HOST_RECEIPT_CHANGED", "Frozen host checkpoint or operation records changed during update");
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
export async function resumeHost(policy, id, host) {
|
|
41
|
+
if (host)
|
|
42
|
+
await host.resume(id, await readHostContinuation(policy, id));
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { randomBytes } from "node:crypto";
|
|
3
|
+
import { unlink } from "node:fs/promises";
|
|
4
|
+
import { createOnce, privateText } from "../configuration/private-state.js";
|
|
5
|
+
/** Offline maintenance receives private state only; the returned path is never a public receipt. */
|
|
6
|
+
export async function withInspectionConfig(stateDir, work) {
|
|
7
|
+
const pin = JSON.parse(await privateText(join(stateDir, "homeserver.json")));
|
|
8
|
+
const passphrase = await privateText(join(stateDir, "store-passphrase"));
|
|
9
|
+
const file = join(stateDir, `update-inspect-${randomBytes(12).toString("hex")}.json`);
|
|
10
|
+
await createOnce(file, JSON.stringify({ homeserver: pin.homeserver, store_dir: join(stateDir, "device"), store_passphrase: passphrase,
|
|
11
|
+
api_token: randomBytes(32).toString("hex"), listen: "127.0.0.1:1" }));
|
|
12
|
+
try {
|
|
13
|
+
return await work(file);
|
|
14
|
+
}
|
|
15
|
+
finally {
|
|
16
|
+
await unlink(file);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { lstat, readdir, readlink } from "node:fs/promises";
|
|
3
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { fileDigest } from "./archive.js";
|
|
5
|
+
import { UpdateError } from "./types.js";
|
|
6
|
+
/** Seal extracted package files after an isolated, script-free installation. */
|
|
7
|
+
export async function installationDigest(slot) {
|
|
8
|
+
const hash = createHash("sha256");
|
|
9
|
+
let files = 0;
|
|
10
|
+
async function walk(path) {
|
|
11
|
+
const info = await lstat(path), name = relative(slot, path).split(sep).join("/");
|
|
12
|
+
if (++files > 100000)
|
|
13
|
+
throw new UpdateError("UPDATE_INSTALLATION_BUDGET", "Client installation exceeds its file budget");
|
|
14
|
+
if (info.isSymbolicLink()) {
|
|
15
|
+
const target = await readlink(path), destination = resolve(path, "..", target);
|
|
16
|
+
if (!destination.startsWith(resolve(slot) + sep))
|
|
17
|
+
throw new UpdateError("UPDATE_INSTALLATION_LINK", "Client installation contains an external link");
|
|
18
|
+
hash.update(JSON.stringify([name, "link", target]) + "\n");
|
|
19
|
+
}
|
|
20
|
+
else if (info.isDirectory()) {
|
|
21
|
+
for (const child of (await readdir(path)).sort())
|
|
22
|
+
await walk(join(path, child));
|
|
23
|
+
}
|
|
24
|
+
else if (info.isFile()) {
|
|
25
|
+
const digest = await fileDigest(path);
|
|
26
|
+
hash.update(JSON.stringify([name, digest.bytes, digest.sha256]) + "\n");
|
|
27
|
+
}
|
|
28
|
+
else
|
|
29
|
+
throw new UpdateError("UPDATE_INSTALLATION_FILE", "Client installation contains an unsupported file");
|
|
30
|
+
}
|
|
31
|
+
await walk(join(slot, "node_modules"));
|
|
32
|
+
await walk(join(slot, "package.json"));
|
|
33
|
+
await walk(join(slot, "package-lock.json"));
|
|
34
|
+
return hash.digest("hex");
|
|
35
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { access, readFile, stat } from "node:fs/promises";
|
|
3
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
4
|
+
import { directory, assertPrivateDirectory, replacePrivate, privateText } from "../configuration/private-state.js";
|
|
5
|
+
import { lowerOwnedPriority } from "../lifecycle/process-priority.js";
|
|
6
|
+
import { bundledExecutable } from "../configuration/executable.js";
|
|
7
|
+
import { validateBindings } from "./binding-preflight.js";
|
|
8
|
+
import { installationDigest } from "./installation-integrity.js";
|
|
9
|
+
import { fileDigest } from "./archive.js";
|
|
10
|
+
import { downloadArtifact } from "./download.js";
|
|
11
|
+
import { packageVersion, platformPackages } from "./manifest.js";
|
|
12
|
+
import { compareVersion } from "./version.js";
|
|
13
|
+
import { UpdateError } from "./types.js";
|
|
14
|
+
export async function runUpdateProcess(command, args, cwd, budgetMs = 300000) {
|
|
15
|
+
if (!isAbsolute(command))
|
|
16
|
+
throw new UpdateError("UPDATE_EXECUTABLE_INVALID", "Update executable must be absolute");
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const child = spawn(command, [...args], { cwd, windowsHide: true, stdio: "pipe", env: {
|
|
19
|
+
PATH: dirname(process.execPath), NODE_OPTIONS: "--max-old-space-size=512", TOKIO_WORKER_THREADS: "1", RAYON_NUM_THREADS: "1",
|
|
20
|
+
...(process.platform === "win32" && process.env.SystemRoot ? { SystemRoot: process.env.SystemRoot } : {}),
|
|
21
|
+
} });
|
|
22
|
+
child.stdin.end();
|
|
23
|
+
lowerOwnedPriority(child);
|
|
24
|
+
let text = "", overflow = false, timedOut = false;
|
|
25
|
+
child.stderr.resume();
|
|
26
|
+
let killTimer;
|
|
27
|
+
const terminate = () => { child.kill("SIGTERM"); killTimer ??= setTimeout(() => child.kill("SIGKILL"), 5000); };
|
|
28
|
+
const timer = setTimeout(() => { timedOut = true; terminate(); }, budgetMs);
|
|
29
|
+
child.stdout.on("data", (part) => {
|
|
30
|
+
if (Buffer.byteLength(text) + part.byteLength > 65536) {
|
|
31
|
+
overflow = true;
|
|
32
|
+
terminate();
|
|
33
|
+
}
|
|
34
|
+
else
|
|
35
|
+
text += part.toString("utf8");
|
|
36
|
+
});
|
|
37
|
+
child.once("error", () => { clearTimeout(timer); clearTimeout(killTimer); reject(new UpdateError("UPDATE_PROCESS_FAILED", "Client installation process could not start")); });
|
|
38
|
+
child.once("close", code => {
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
clearTimeout(killTimer);
|
|
41
|
+
if (timedOut)
|
|
42
|
+
reject(new UpdateError("UPDATE_PROCESS_TIMEOUT", "Client installation or preflight exceeded its time budget; retry the original update"));
|
|
43
|
+
else if (code !== 0 || overflow)
|
|
44
|
+
reject(new UpdateError("UPDATE_PROCESS_FAILED", `Client installation or preflight failed (exit ${code ?? "signal"}); current state was preserved`));
|
|
45
|
+
else
|
|
46
|
+
resolve(text);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
async function npmCLI() {
|
|
51
|
+
for (const candidate of [join(dirname(process.execPath), "../lib/node_modules/npm/bin/npm-cli.js"), join(dirname(process.execPath), "node_modules/npm/bin/npm-cli.js")]) {
|
|
52
|
+
try {
|
|
53
|
+
await access(candidate);
|
|
54
|
+
return candidate;
|
|
55
|
+
}
|
|
56
|
+
catch { /* Try the other standard Node distribution layout. */ }
|
|
57
|
+
}
|
|
58
|
+
throw new UpdateError("UPDATE_NPM_UNAVAILABLE", "The current Node installation must include npm");
|
|
59
|
+
}
|
|
60
|
+
function assertNode(release) {
|
|
61
|
+
if (process.versions.node.split(".")[0] !== release.node.split(".")[0] || compareVersion(process.versions.node, release.node) < 0) {
|
|
62
|
+
throw new UpdateError("UPDATE_NODE_INCOMPATIBLE", "Select the release's supported Node version before continuing the original update");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export async function validateInstallation(release, slot) {
|
|
66
|
+
assertNode(release);
|
|
67
|
+
await assertPrivateDirectory(slot);
|
|
68
|
+
const runtime = join(slot, "node_modules/@agentims/runtime");
|
|
69
|
+
for (const item of platformPackages(release)) {
|
|
70
|
+
const metadata = JSON.parse(await readFile(join(slot, "node_modules", item.name, "package.json"), "utf8"));
|
|
71
|
+
if (!metadata || typeof metadata !== "object" || !("name" in metadata) || metadata.name !== item.name
|
|
72
|
+
|| !("version" in metadata) || metadata.version !== item.version)
|
|
73
|
+
throw new UpdateError("UPDATE_PACKAGE_MISMATCH", "Installed client package differs from the signed release");
|
|
74
|
+
}
|
|
75
|
+
for (const name of release.version === 1 ? ["@agentims/sdk", "@agentims/adapter"] : []) {
|
|
76
|
+
const bundled = JSON.parse(await readFile(join(runtime, "node_modules", name, "package.json"), "utf8"));
|
|
77
|
+
if (bundled.name !== name || bundled.version !== packageVersion(release, name))
|
|
78
|
+
throw new UpdateError("UPDATE_BUNDLE_MISMATCH", "Bundled SDK or adapter differs from the signed combination");
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
const receipt = JSON.parse(await privateText(join(slot, "verified.json")));
|
|
82
|
+
if (receipt.filesDigest !== await installationDigest(slot))
|
|
83
|
+
throw new UpdateError("UPDATE_INSTALLATION_CHANGED", "Verified client installation files have changed");
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (error.code !== "ENOENT")
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
const executable = bundledExecutable(process.platform, process.arch, undefined, runtime);
|
|
90
|
+
const platform = release.platforms.find(value => value.platform === `${process.platform}-${process.arch}`);
|
|
91
|
+
if (!platform || (await fileDigest(executable)).sha256 !== platform.coreSha256)
|
|
92
|
+
throw new UpdateError("UPDATE_CORE_MISMATCH", "Installed communication core differs from the signed release");
|
|
93
|
+
const facts = JSON.parse(await runUpdateProcess(executable, ["--client-info"], slot, 30000));
|
|
94
|
+
if (!facts || typeof facts !== "object" || !("source_digest" in facts) || facts.source_digest !== platform.sourceDigest
|
|
95
|
+
|| !("storage_compatibility" in facts) || facts.storage_compatibility !== platform.storageCompatibility
|
|
96
|
+
|| !("application_schema" in facts) || facts.application_schema !== platform.applicationSchema
|
|
97
|
+
|| !("local_api_versions" in facts) || !Array.isArray(facts.local_api_versions) || !facts.local_api_versions.includes(3)
|
|
98
|
+
|| !("binding_abi" in facts) || facts.binding_abi !== release.bindingAbi
|
|
99
|
+
|| !("matrix_revision" in facts) || facts.matrix_revision !== release.matrixRevision)
|
|
100
|
+
throw new UpdateError("UPDATE_BUILD_MISMATCH", "Communication core compatibility facts differ from the signed release");
|
|
101
|
+
await validateBindings(release, slot, runUpdateProcess);
|
|
102
|
+
const cli = join(runtime, "dist/cli/main.js");
|
|
103
|
+
if (!(await stat(cli)).isFile())
|
|
104
|
+
throw new UpdateError("UPDATE_CLI_MISSING", "Installed client has no CLI entry");
|
|
105
|
+
return { slot, executable, cli };
|
|
106
|
+
}
|
|
107
|
+
export async function stageInstallation(release, manifestDigest, policy) {
|
|
108
|
+
assertNode(release);
|
|
109
|
+
const slot = join(policy.root, "releases", manifestDigest);
|
|
110
|
+
await directory(slot);
|
|
111
|
+
const marker = join(slot, "verified.json");
|
|
112
|
+
try {
|
|
113
|
+
const value = JSON.parse(await privateText(marker));
|
|
114
|
+
if (!value || typeof value !== "object" || !("digest" in value) || value.digest !== manifestDigest)
|
|
115
|
+
throw new UpdateError("UPDATE_SLOT_CONFLICT", "Existing client release slot differs");
|
|
116
|
+
return validateInstallation(release, slot);
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error.code !== "ENOENT")
|
|
120
|
+
throw error;
|
|
121
|
+
}
|
|
122
|
+
const paths = [];
|
|
123
|
+
for (const item of platformPackages(release))
|
|
124
|
+
paths.push(await downloadArtifact(item, policy));
|
|
125
|
+
await replacePrivate(join(slot, "package.json"), JSON.stringify({ name: "agentim-customer-client-installation", version: packageVersion(release, "@agentims/runtime"), private: true }));
|
|
126
|
+
const emptyConfig = join(policy.root, "npm-empty.config");
|
|
127
|
+
await replacePrivate(emptyConfig, "");
|
|
128
|
+
const globalConfig = join(policy.root, "npm-global-empty.config");
|
|
129
|
+
await replacePrivate(globalConfig, "");
|
|
130
|
+
await runUpdateProcess(process.execPath, [await npmCLI(), "install", "--offline", "--ignore-scripts", "--no-audit", "--no-fund", "--save-exact", "--userconfig", emptyConfig, "--globalconfig", globalConfig, "--registry", "https://registry.npmjs.org", "--cache", join(policy.root, "npm-cache"), ...paths], slot);
|
|
131
|
+
const installed = await validateInstallation(release, slot);
|
|
132
|
+
await replacePrivate(marker, JSON.stringify({ digest: manifestDigest, releaseId: release.releaseId, filesDigest: await installationDigest(slot) }));
|
|
133
|
+
return installed;
|
|
134
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { realpath } from "node:fs/promises";
|
|
4
|
+
import { assertPrivateDirectory, privateText, directory } from "../configuration/private-state.js";
|
|
5
|
+
import { updateLease } from "./locking.js";
|
|
6
|
+
import { discoverRelease, runtimePackageInfo, assessRelease, compareVersion } from "./discovery.js";
|
|
7
|
+
import { readUpdatePolicy, updateDocument } from "./policy.js";
|
|
8
|
+
import { verifyRelease, packageVersion } from "./manifest.js";
|
|
9
|
+
import { readUpdateRecord, writeUpdateRecord } from "./records.js";
|
|
10
|
+
import { pendingClientUpdate } from "./pending.js";
|
|
11
|
+
import { activeClient } from "./activation.js";
|
|
12
|
+
import { readBundle } from "../managed/state.js";
|
|
13
|
+
import { UpdateError } from "./types.js";
|
|
14
|
+
export { assertUpdateId, readUpdateRecord, writeUpdateRecord } from "./records.js";
|
|
15
|
+
export async function plannedRelease(policy, record) {
|
|
16
|
+
const envelope = JSON.parse(await privateText(join(policy.root, `${record.updateId}.manifest.json`), 196608));
|
|
17
|
+
const inProgress = !["planned", "staged", "deferred"].includes(record.phase);
|
|
18
|
+
const verified = verifyRelease(envelope, policy, Date.now(), inProgress ? record.createdAtMs : undefined);
|
|
19
|
+
if (verified.digest !== record.manifestDigest || verified.release.releaseId !== record.releaseId
|
|
20
|
+
|| packageVersion(verified.release, "@agentims/runtime") !== record.toVersion)
|
|
21
|
+
throw new UpdateError("UPDATE_PLAN_CHANGED", "Client update plan and signed release differ");
|
|
22
|
+
return verified.release;
|
|
23
|
+
}
|
|
24
|
+
export async function planClientUpdate(options) {
|
|
25
|
+
const policy = await readUpdatePolicy(options.root);
|
|
26
|
+
await assertPrivateDirectory(options.stateDir);
|
|
27
|
+
const stateDir = await realpath(options.stateDir);
|
|
28
|
+
const inFlight = await pendingClientUpdate(policy.root, stateDir, true);
|
|
29
|
+
if (inFlight) {
|
|
30
|
+
if (inFlight.owner !== (options.owner ?? "managed"))
|
|
31
|
+
throw new UpdateError("UPDATE_OWNER_MODE", "Continue the original in-flight update with its existing communication owner");
|
|
32
|
+
return inFlight;
|
|
33
|
+
}
|
|
34
|
+
const { release, digest } = await discoverRelease(policy);
|
|
35
|
+
const active = await activeClient(policy.root);
|
|
36
|
+
const loaded = (await runtimePackageInfo()).version;
|
|
37
|
+
const current = active && compareVersion(active.runtimeVersion, loaded) > 0 ? active.runtimeVersion : loaded;
|
|
38
|
+
const assessment = assessRelease(release, current);
|
|
39
|
+
let needsCore = compareVersion(assessment.targetVersion, loaded) > 0 && assessment.state === "current" && compareVersion(assessment.targetVersion, current) === 0;
|
|
40
|
+
if ((options.owner ?? "managed") === "managed" && assessment.state === "current" && compareVersion(assessment.targetVersion, current) === 0) {
|
|
41
|
+
const bundle = await readBundle(options.stateDir);
|
|
42
|
+
needsCore ||= release.platforms.some(item => item.platform === `${process.platform}-${process.arch}` && item.executionValidated && item.coreSha256 !== bundle.binaryHash);
|
|
43
|
+
}
|
|
44
|
+
if (options.client && options.owner === "embedded" && assessment.state === "current" && compareVersion(assessment.targetVersion, current) === 0) {
|
|
45
|
+
if (options.client.ownerKind !== "embedded" || options.client.storeDirectory !== await realpath(join(stateDir, "device")))
|
|
46
|
+
throw new UpdateError("UPDATE_DEVICE_BINDING", "The embedded owner must belong to this original device");
|
|
47
|
+
const runtime = await options.client.reliability.runtimeInfo();
|
|
48
|
+
needsCore ||= release.platforms.some(item => item.platform === `${process.platform}-${process.arch}` && item.executionValidated && item.sourceDigest !== runtime.source_digest);
|
|
49
|
+
}
|
|
50
|
+
if (assessment.state !== "available" && !needsCore)
|
|
51
|
+
throw new UpdateError("UPDATE_NOT_APPLICABLE", assessment.reason ?? "The current client does not need this release");
|
|
52
|
+
const updateId = createHash("sha256").update(digest + "\0" + stateDir + "\0" + (options.owner ?? "managed")).digest("hex");
|
|
53
|
+
const unlock = await updateLease(policy.root);
|
|
54
|
+
try {
|
|
55
|
+
try {
|
|
56
|
+
return await readUpdateRecord(policy.root, updateId);
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (error.code !== "ENOENT")
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
await directory(join(policy.root, "backups"));
|
|
63
|
+
const envelope = JSON.parse(await privateText(join(policy.root, "manifest.json"), 196608));
|
|
64
|
+
if (verifyRelease(envelope, policy).digest !== digest)
|
|
65
|
+
throw new UpdateError("UPDATE_PLAN_CHANGED", "Client update discovery changed during planning");
|
|
66
|
+
await updateDocument(policy.root, `${updateId}.manifest.json`, envelope);
|
|
67
|
+
const record = { version: 1, updateId, releaseId: release.releaseId, manifestDigest: digest, stateDir,
|
|
68
|
+
owner: options.owner ?? "managed", phase: "planned", createdAtMs: Date.now(), updatedAtMs: Date.now(), fromVersion: loaded, toVersion: packageVersion(release, "@agentims/runtime"), errorCode: null };
|
|
69
|
+
await writeUpdateRecord(policy, record);
|
|
70
|
+
return record;
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
await unlock();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
import { bundledExecutable } from "../configuration/executable.js";
|
|
3
|
+
import { controlLease } from "../managed/lease.js";
|
|
4
|
+
import { UpdateError } from "./types.js";
|
|
5
|
+
/** Honor the runtime's existing explicit trusted-core override; never takes an executable from a manifest. */
|
|
6
|
+
export function updateControllerExecutable() {
|
|
7
|
+
const configured = process.env.AGENTIM_DAEMON_BIN;
|
|
8
|
+
if (configured) {
|
|
9
|
+
if (!isAbsolute(configured))
|
|
10
|
+
throw new UpdateError("UPDATE_EXECUTABLE_INVALID", "Trusted communication core override must be absolute");
|
|
11
|
+
return configured;
|
|
12
|
+
}
|
|
13
|
+
return bundledExecutable();
|
|
14
|
+
}
|
|
15
|
+
export async function updateLease(root) {
|
|
16
|
+
return controlLease(updateControllerExecutable(), root);
|
|
17
|
+
}
|