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,80 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { bundleClient, waitForApi, waitForCommunication } from "../managed/connection.js";
|
|
3
|
+
import { readBundle } from "../managed/state.js";
|
|
4
|
+
import { privateText, replacePrivate } from "../configuration/private-state.js";
|
|
5
|
+
import { readUpdatePolicy } from "./policy.js";
|
|
6
|
+
import { plannedRelease, readUpdateRecord, writeUpdateRecord } from "./ledger.js";
|
|
7
|
+
import { validateInstallation } from "./installation.js";
|
|
8
|
+
import { runtimePackageInfo } from "./discovery.js";
|
|
9
|
+
import { packageVersion } from "./manifest.js";
|
|
10
|
+
import { assertContinuity, captureContinuity, loadContinuity } from "./continuity.js";
|
|
11
|
+
import { updateLease, updateControllerExecutable } from "./locking.js";
|
|
12
|
+
import { controlLease } from "../managed/lease.js";
|
|
13
|
+
import { resumeHost } from "./host-continuation.js";
|
|
14
|
+
import { UpdateError } from "./types.js";
|
|
15
|
+
export async function clientRestartTicket(root, updateId) {
|
|
16
|
+
const policy = await readUpdatePolicy(root), record = await readUpdateRecord(root, updateId);
|
|
17
|
+
const release = await plannedRelease(policy, record);
|
|
18
|
+
const installed = await validateInstallation(release, join(root, "releases", record.manifestDigest));
|
|
19
|
+
return { nextAction: "restart_host", updateId, stateDir: record.stateDir, updateRoot: root,
|
|
20
|
+
runtimeModule: join(installed.slot, "node_modules/@agentims/runtime/dist/index.js"),
|
|
21
|
+
sdkModule: join(installed.slot, "node_modules/@agentims/sdk/dist/index.js"), cli: installed.cli };
|
|
22
|
+
}
|
|
23
|
+
/** Only the new host can acknowledge loading the exact SDK/runtime combination. */
|
|
24
|
+
export async function assertResumedPackage(release) {
|
|
25
|
+
const running = await runtimePackageInfo();
|
|
26
|
+
if (running.version !== packageVersion(release, "@agentims/runtime") || running.sdk.version !== packageVersion(release, "@agentims/sdk")) {
|
|
27
|
+
throw new UpdateError("UPDATE_HOST_RESTART_REQUIRED", "Restart the host with the exact runtimeModule from its original client restart ticket");
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export async function managedAdmission(configFile, paused) {
|
|
31
|
+
const config = JSON.parse(await privateText(configFile));
|
|
32
|
+
if (!config || typeof config !== "object" || Array.isArray(config))
|
|
33
|
+
throw new UpdateError("UPDATE_CONFIG_INVALID", "Managed configuration is invalid");
|
|
34
|
+
await replacePrivate(configFile, JSON.stringify({ ...config, start_quiesced: paused }));
|
|
35
|
+
}
|
|
36
|
+
/** Resume is idempotent and uses the original update ID; no crypto archive is restored. */
|
|
37
|
+
export async function resumeClientUpdate(options) {
|
|
38
|
+
const policy = await readUpdatePolicy(options.root), unlock = await updateLease(policy.root);
|
|
39
|
+
let client;
|
|
40
|
+
let releaseDevice;
|
|
41
|
+
try {
|
|
42
|
+
let record = await readUpdateRecord(policy.root, options.updateId);
|
|
43
|
+
if (record.owner !== "managed")
|
|
44
|
+
throw new UpdateError("UPDATE_OWNER_MODE", "Use resumeEmbeddedClientUpdate for an embedded owner");
|
|
45
|
+
if (record.phase === "applied")
|
|
46
|
+
return record;
|
|
47
|
+
if (!["restart_required", "resuming"].includes(record.phase))
|
|
48
|
+
throw new UpdateError("UPDATE_NOT_READY", "Original update has not reached host restart");
|
|
49
|
+
const release = await plannedRelease(policy, record);
|
|
50
|
+
await assertResumedPackage(release);
|
|
51
|
+
await validateInstallation(release, join(policy.root, "releases", record.manifestDigest));
|
|
52
|
+
const bundle = await readBundle(record.stateDir);
|
|
53
|
+
releaseDevice = await controlLease(updateControllerExecutable(), bundle.spec.directory);
|
|
54
|
+
client = bundleClient(bundle);
|
|
55
|
+
await waitForApi(client);
|
|
56
|
+
await waitForCommunication(client);
|
|
57
|
+
const current = await captureContinuity(client);
|
|
58
|
+
const platform = release.platforms.find(item => item.platform === `${process.platform}-${process.arch}`);
|
|
59
|
+
if (current.runtime.source_digest !== platform?.sourceDigest)
|
|
60
|
+
throw new UpdateError("UPDATE_RUNNING_BUILD_MISMATCH", "Communication owner differs from the selected release");
|
|
61
|
+
let baseline = await loadContinuity(policy, record.updateId);
|
|
62
|
+
if (record.phase === "resuming") {
|
|
63
|
+
baseline = { ...baseline, state: { ...baseline.state, processed_digest: current.state.processed_digest, intents_digest: current.state.intents_digest } };
|
|
64
|
+
}
|
|
65
|
+
assertContinuity(baseline, current);
|
|
66
|
+
record = { ...record, phase: "resuming", updatedAtMs: Date.now() };
|
|
67
|
+
await writeUpdateRecord(policy, record);
|
|
68
|
+
await client.reliability.quiesce({ owner_generation: current.runtime.owner_generation, quiesced: false });
|
|
69
|
+
await managedAdmission(bundle.spec.configFile, false);
|
|
70
|
+
await resumeHost(policy, record.updateId, options.host);
|
|
71
|
+
record = { ...record, phase: "applied", errorCode: null, updatedAtMs: Date.now() };
|
|
72
|
+
await writeUpdateRecord(policy, record);
|
|
73
|
+
return record;
|
|
74
|
+
}
|
|
75
|
+
finally {
|
|
76
|
+
await client?.close();
|
|
77
|
+
await releaseDevice?.();
|
|
78
|
+
await unlock();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { TransportError } from "@agentims/sdk";
|
|
3
|
+
import { bundleClient } from "../managed/connection.js";
|
|
4
|
+
import { ManagedError } from "../managed/errors.js";
|
|
5
|
+
import { shutdownLease } from "../lifecycle/shutdown-lease.js";
|
|
6
|
+
import { expectCleanShutdown, readShutdownExpectation, verifyCleanShutdown } from "./shutdown-proof.js";
|
|
7
|
+
import { assertContinuity, captureContinuity, loadContinuity } from "./continuity.js";
|
|
8
|
+
import { quiesceForUpdate } from "./admission.js";
|
|
9
|
+
import { UpdateError } from "./types.js";
|
|
10
|
+
/** Never let a supervisor force-kill a current rotating-credential owner before its durable close. */
|
|
11
|
+
export async function stopUpdateOwner(root, updateId, stateDir, bundle, candidate, manager) {
|
|
12
|
+
let expectation = await readShutdownExpectation(root, updateId);
|
|
13
|
+
let lease;
|
|
14
|
+
try {
|
|
15
|
+
if (expectation.required) {
|
|
16
|
+
const client = bundleClient(bundle);
|
|
17
|
+
try {
|
|
18
|
+
expectation = await resumedOwner(root, updateId, client, expectation);
|
|
19
|
+
lease = await shutdownLease(candidate, join(stateDir, "device"), {
|
|
20
|
+
ownerGeneration: expectation.ownerGeneration, sourceDigest: expectation.sourceDigest,
|
|
21
|
+
});
|
|
22
|
+
lease.assertReserved();
|
|
23
|
+
try {
|
|
24
|
+
await client.identity.shutdownDaemon({ timeoutMs: 5000 });
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
// An original owner may already be closing after an earlier interrupted
|
|
28
|
+
// controller. Only its kernel lease and exact receipt can prove completion.
|
|
29
|
+
if (!(error instanceof TransportError))
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
await lease.closed;
|
|
33
|
+
}
|
|
34
|
+
finally {
|
|
35
|
+
await client.close();
|
|
36
|
+
}
|
|
37
|
+
lease.assertHeld();
|
|
38
|
+
await verifyCleanShutdown(root, updateId, stateDir);
|
|
39
|
+
}
|
|
40
|
+
// Legacy handling retains its exact binary allowlist and verified offline
|
|
41
|
+
// migration checks; it never manufactures a missing native receipt.
|
|
42
|
+
await manager.stop(bundle.spec);
|
|
43
|
+
lease?.assertHeld();
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
if (error instanceof ManagedError)
|
|
47
|
+
throw new UpdateError(`UPDATE_${error.code}`, error.message);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
finally {
|
|
51
|
+
await lease?.release();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function resumedOwner(root, id, client, expected) {
|
|
55
|
+
let info;
|
|
56
|
+
try {
|
|
57
|
+
info = await client.reliability.runtimeInfo({ timeoutMs: 2000 });
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (error instanceof TransportError)
|
|
61
|
+
return expected;
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
if (info.source_digest !== expected.sourceDigest)
|
|
65
|
+
throw new UpdateError("UPDATE_OWNER_CHANGED", "Communication source changed during the original shutdown");
|
|
66
|
+
if (info.owner_generation === expected.ownerGeneration)
|
|
67
|
+
return expected;
|
|
68
|
+
const pending = await quiesceForUpdate(client, info.owner_generation);
|
|
69
|
+
if (pending)
|
|
70
|
+
throw new UpdateError(`UPDATE_${pending.toUpperCase()}`, "Restarted owner still has original native work; preserve its continuation");
|
|
71
|
+
assertContinuity(await loadContinuity({ root }, id), await captureContinuity(client));
|
|
72
|
+
await expectCleanShutdown(root, id, info);
|
|
73
|
+
return readShutdownExpectation(root, id);
|
|
74
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { privateText } from "../configuration/private-state.js";
|
|
3
|
+
import { updateDocument } from "./policy.js";
|
|
4
|
+
import { UpdateError } from "./types.js";
|
|
5
|
+
export async function readShutdownExpectation(root, updateId) {
|
|
6
|
+
const expectation = JSON.parse(await privateText(join(root, `${updateId}.shutdown.json`)));
|
|
7
|
+
if (expectation.version !== 1 || typeof expectation.required !== "boolean"
|
|
8
|
+
|| expectation.required && (typeof expectation.ownerGeneration !== "string" || !/^[A-Za-z0-9._:-]{1,128}$/.test(expectation.ownerGeneration)
|
|
9
|
+
|| typeof expectation.sourceDigest !== "string" || !/^[a-f0-9]{64}$/.test(expectation.sourceDigest))) {
|
|
10
|
+
throw new UpdateError("UPDATE_SHUTDOWN_UNVERIFIED", "Original shutdown expectation is invalid");
|
|
11
|
+
}
|
|
12
|
+
return expectation;
|
|
13
|
+
}
|
|
14
|
+
export async function expectCleanShutdown(root, updateId, runtime) {
|
|
15
|
+
const expectation = { version: 1,
|
|
16
|
+
required: runtime?.capabilities.some(item => item.id === "runtime.clean_shutdown" && item.status === "supported") ?? false,
|
|
17
|
+
ownerGeneration: runtime?.owner_generation ?? null, sourceDigest: runtime?.source_digest ?? null };
|
|
18
|
+
await updateDocument(root, `${updateId}.shutdown.json`, expectation);
|
|
19
|
+
}
|
|
20
|
+
/** A kernel lease alone cannot prove a killed owner's last rotating credentials were saved. */
|
|
21
|
+
export async function verifyCleanShutdown(root, updateId, stateDir) {
|
|
22
|
+
const expectation = await readShutdownExpectation(root, updateId);
|
|
23
|
+
if (!expectation.required)
|
|
24
|
+
return; // Only an explicitly approved legacy binary can reach this path.
|
|
25
|
+
let proof;
|
|
26
|
+
try {
|
|
27
|
+
proof = JSON.parse(await privateText(join(stateDir, "device", "shutdown-proof.json")));
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
throw new UpdateError("UPDATE_SHUTDOWN_UNVERIFIED", "Original native owner has no clean shutdown receipt; preserve its state and inspect its credentials");
|
|
31
|
+
}
|
|
32
|
+
if (proof.version !== 1 || proof.closed !== true || proof.owner_generation !== expectation.ownerGeneration || proof.source_digest !== expectation.sourceDigest) {
|
|
33
|
+
throw new UpdateError("UPDATE_SHUTDOWN_UNVERIFIED", "Shutdown receipt does not match the original native owner and build");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class UpdateError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
nextAction;
|
|
4
|
+
constructor(code, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.name = "UpdateError";
|
|
8
|
+
this.nextAction = code.includes("NODE") ? "use_supported_node"
|
|
9
|
+
: code.startsWith("UPDATE_POLICY") ? "configure_client_updates"
|
|
10
|
+
: code === "UPDATE_HOST_RESTART_REQUIRED" ? "restart_host"
|
|
11
|
+
: code.includes("HOST") ? "coordinate_host"
|
|
12
|
+
: code.includes("MIGRATION") || code.includes("COMPATIBILITY") || code.includes("REWIND") ? "review_compatibility"
|
|
13
|
+
: code.includes("SIGNATURE") || code.includes("UNTRUSTED") || code.includes("MANIFEST") ? "verify_update_source"
|
|
14
|
+
: "inspect_original_update";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function parse(value) {
|
|
2
|
+
if (typeof value !== "string" || value.length > 96)
|
|
3
|
+
return;
|
|
4
|
+
const match = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(value);
|
|
5
|
+
if (!match)
|
|
6
|
+
return;
|
|
7
|
+
const core = match.slice(1, 4).map(Number), prerelease = match[4]?.split(".") ?? [];
|
|
8
|
+
if (!core.every(Number.isSafeInteger) || prerelease.some(part => /^\d+$/.test(part) && part.length > 1 && part.startsWith("0")))
|
|
9
|
+
return;
|
|
10
|
+
return { core, prerelease };
|
|
11
|
+
}
|
|
12
|
+
export function isClientVersion(value) { return parse(value) !== undefined; }
|
|
13
|
+
export function isStableVersion(value) { const result = parse(value); return result !== undefined && !result.prerelease.length; }
|
|
14
|
+
/** SemVer precedence for immutable exact versions; build aliases are not release identities. */
|
|
15
|
+
export function compareVersion(left, right) {
|
|
16
|
+
const a = parse(left), b = parse(right);
|
|
17
|
+
if (!a || !b)
|
|
18
|
+
throw new Error("Invalid exact client version");
|
|
19
|
+
for (let i = 0; i < 3; i++) {
|
|
20
|
+
const difference = a.core[i] - b.core[i];
|
|
21
|
+
if (difference)
|
|
22
|
+
return Math.sign(difference);
|
|
23
|
+
}
|
|
24
|
+
if (!a.prerelease.length || !b.prerelease.length)
|
|
25
|
+
return Math.sign(b.prerelease.length - a.prerelease.length);
|
|
26
|
+
for (let i = 0; i < Math.max(a.prerelease.length, b.prerelease.length); i++) {
|
|
27
|
+
const x = a.prerelease[i], y = b.prerelease[i];
|
|
28
|
+
if (x === undefined || y === undefined)
|
|
29
|
+
return x === y ? 0 : x === undefined ? -1 : 1;
|
|
30
|
+
if (x === y)
|
|
31
|
+
continue;
|
|
32
|
+
const numericX = /^\d+$/.test(x), numericY = /^\d+$/.test(y);
|
|
33
|
+
if (numericX && numericY)
|
|
34
|
+
return BigInt(x) < BigInt(y) ? -1 : 1;
|
|
35
|
+
if (numericX !== numericY)
|
|
36
|
+
return numericX ? -1 : 1;
|
|
37
|
+
return x < y ? -1 : 1;
|
|
38
|
+
}
|
|
39
|
+
return 0;
|
|
40
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
2
|
+
import { readUpdatePolicy } from "./policy.js";
|
|
3
|
+
import { checkClientUpdate } from "./discovery.js";
|
|
4
|
+
import { pendingClientUpdate } from "./pending.js";
|
|
5
|
+
import { planClientUpdate } from "./ledger.js";
|
|
6
|
+
import { applyOwnedClientUpdate } from "./owner.js";
|
|
7
|
+
import { UpdateError } from "./types.js";
|
|
8
|
+
/** Explicit runtime owner. Closing only stops update observation; communication stays online. */
|
|
9
|
+
export async function watchClientUpdates(options) {
|
|
10
|
+
let policy = await readUpdatePolicy(options.root);
|
|
11
|
+
const controller = new AbortController();
|
|
12
|
+
const signal = options.signal ? AbortSignal.any([options.signal, controller.signal]) : controller.signal;
|
|
13
|
+
const notices = new Map();
|
|
14
|
+
const notify = async (notice) => {
|
|
15
|
+
const current = JSON.stringify({ ...notice, ...(notice.record ? { record: { ...notice.record, updatedAtMs: 0 } } : {}) });
|
|
16
|
+
const key = notice.record?.updateId ?? notice.check?.releaseId ?? "error";
|
|
17
|
+
if (current !== notices.get(key)) {
|
|
18
|
+
notices.set(key, current);
|
|
19
|
+
if (notices.size > 128)
|
|
20
|
+
notices.delete(notices.keys().next().value);
|
|
21
|
+
await options.onUpdate(notice);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const work = (async () => {
|
|
25
|
+
if (policy.automatic === "off")
|
|
26
|
+
return;
|
|
27
|
+
while (!signal.aborted) {
|
|
28
|
+
try {
|
|
29
|
+
policy = await readUpdatePolicy(options.root);
|
|
30
|
+
if (policy.automatic === "off")
|
|
31
|
+
break;
|
|
32
|
+
const pending = policy.automatic === "compatible" && options.stateDir ? await pendingClientUpdate(policy.root, options.stateDir, true) : undefined;
|
|
33
|
+
if (pending) {
|
|
34
|
+
const result = await applyOwnedClientUpdate(pending, policy.root, options);
|
|
35
|
+
await notify({ kind: "client_update", status: result.phase === "applied" ? "applied" : result.phase === "failed" ? "failed" : ["restart_required", "resuming"].includes(result.phase) ? "restart_required" : "deferred", record: result });
|
|
36
|
+
if (["applied", "restart_required", "resuming"].includes(result.phase))
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const check = await checkClientUpdate(policy.root);
|
|
41
|
+
if (signal.aborted)
|
|
42
|
+
break;
|
|
43
|
+
await notify({ kind: "client_update", status: check.state, check });
|
|
44
|
+
if (policy.automatic === "compatible" && options.stateDir && (check.state === "available" || check.state === "current" && check.targetVersion === check.currentVersion)) {
|
|
45
|
+
let record;
|
|
46
|
+
try {
|
|
47
|
+
record = await planClientUpdate({ root: policy.root, stateDir: options.stateDir, ...(options.owner ? { owner: options.owner } : {}), ...(options.client ? { client: options.client } : {}) });
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (!(error instanceof UpdateError) || error.code !== "UPDATE_NOT_APPLICABLE")
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
if (!record) {
|
|
54
|
+
try {
|
|
55
|
+
await delay(policy.intervalMs, undefined, { signal });
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (check.state === "current")
|
|
63
|
+
await notify({ kind: "client_update", status: "available", record });
|
|
64
|
+
if (signal.aborted)
|
|
65
|
+
break;
|
|
66
|
+
const result = await applyOwnedClientUpdate(record, policy.root, options);
|
|
67
|
+
await notify({ kind: "client_update", status: result.phase === "applied" ? "applied" : result.phase === "failed" ? "failed" : ["restart_required", "resuming"].includes(result.phase) ? "restart_required" : "deferred", record: result });
|
|
68
|
+
if (["applied", "restart_required", "resuming"].includes(result.phase))
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
if (signal.aborted)
|
|
75
|
+
break;
|
|
76
|
+
await notify({ kind: "client_update", status: "failed", errorCode: error instanceof UpdateError ? error.code : "UPDATE_CHECK_FAILED", nextAction: error instanceof UpdateError ? error.nextAction : "inspect_original_update" });
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
await delay(policy.intervalMs, undefined, { signal });
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
})();
|
|
86
|
+
return { done: work, async close() { controller.abort(); await work; } };
|
|
87
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClientFacade } from "./facade.js";
|
|
2
|
+
import { Transport } from "../internal/transport/client.js";
|
|
3
|
+
import { EmbeddedAgentIMClient } from "./embedded.js";
|
|
4
|
+
/** Connection to an existing daemon; close detaches without stopping it. */
|
|
5
|
+
export class AgentIMClient extends ClientFacade {
|
|
6
|
+
constructor(options) { super(new Transport(options)); }
|
|
7
|
+
/** Check native platform/ABI before creating private device state. */
|
|
8
|
+
static checkEmbeddedSupport(nativeLibraryPath) {
|
|
9
|
+
return EmbeddedAgentIMClient.checkSupport(nativeLibraryPath);
|
|
10
|
+
}
|
|
11
|
+
/** Open an owned Rust communication device inside this Node.js process. */
|
|
12
|
+
static openEmbedded(options) {
|
|
13
|
+
return EmbeddedAgentIMClient.open(options);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ClientFacade } from "./facade.js";
|
|
2
|
+
import { checkBinding } from "../internal/native/binding.js";
|
|
3
|
+
import { NativeTransport } from "../internal/native/transport.js";
|
|
4
|
+
import { realpathSync } from "node:fs";
|
|
5
|
+
/** Owns a Rust communication device in this process; close stops it and retains state. */
|
|
6
|
+
export class EmbeddedAgentIMClient extends ClientFacade {
|
|
7
|
+
deviceDirectory;
|
|
8
|
+
constructor(transport, deviceDirectory) {
|
|
9
|
+
super(transport);
|
|
10
|
+
this.deviceDirectory = deviceDirectory;
|
|
11
|
+
}
|
|
12
|
+
get ownerKind() { return "embedded"; }
|
|
13
|
+
get storeDirectory() { return this.deviceDirectory; }
|
|
14
|
+
static async exportSecretsBundle(options, outputFile) {
|
|
15
|
+
return (await import("../internal/native/secrets-export.js")).exportNativeSecrets(options, outputFile);
|
|
16
|
+
}
|
|
17
|
+
static async checkSupport(nativeLibraryPath) { checkBinding(nativeLibraryPath); }
|
|
18
|
+
static async open(options) {
|
|
19
|
+
const transport = await NativeTransport.open(options);
|
|
20
|
+
try {
|
|
21
|
+
return new EmbeddedAgentIMClient(transport, realpathSync(options.storeDir));
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
await transport.close();
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** All SDK failures use a stable category without retaining bearer credentials. */
|
|
2
|
+
export class AgentIMError extends Error {
|
|
3
|
+
name = "AgentIMError";
|
|
4
|
+
}
|
|
5
|
+
export class ValidationError extends AgentIMError {
|
|
6
|
+
name = "ValidationError";
|
|
7
|
+
}
|
|
8
|
+
export class ProtocolError extends AgentIMError {
|
|
9
|
+
name = "ProtocolError";
|
|
10
|
+
}
|
|
11
|
+
export class TransportError extends AgentIMError {
|
|
12
|
+
name = "TransportError";
|
|
13
|
+
}
|
|
14
|
+
export class RequestCancelledError extends AgentIMError {
|
|
15
|
+
name = "RequestCancelledError";
|
|
16
|
+
}
|
|
17
|
+
export class RequestTimeoutError extends TransportError {
|
|
18
|
+
name = "RequestTimeoutError";
|
|
19
|
+
}
|
|
20
|
+
export class ClientClosedError extends AgentIMError {
|
|
21
|
+
name = "ClientClosedError";
|
|
22
|
+
}
|
|
23
|
+
export class ApiError extends AgentIMError {
|
|
24
|
+
status;
|
|
25
|
+
code;
|
|
26
|
+
diagnostics;
|
|
27
|
+
name = "ApiError";
|
|
28
|
+
constructor(status, code, message, diagnostics = {}) {
|
|
29
|
+
super(message);
|
|
30
|
+
this.status = status;
|
|
31
|
+
this.code = code;
|
|
32
|
+
this.diagnostics = diagnostics;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export class AuthenticationError extends ApiError {
|
|
36
|
+
name = "AuthenticationError";
|
|
37
|
+
}
|
|
38
|
+
export class OperationError extends ApiError {
|
|
39
|
+
name = "OperationError";
|
|
40
|
+
}
|
|
41
|
+
export class ResponseTooLargeError extends ProtocolError {
|
|
42
|
+
name = "ResponseTooLargeError";
|
|
43
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { LocationClient } from "../features/location/client.js";
|
|
2
|
+
import { RtcClient } from "../features/rtc/client.js";
|
|
3
|
+
import { SearchClient } from "../features/search/client.js";
|
|
4
|
+
import { CacheClient } from "../features/cache/client.js";
|
|
5
|
+
import { MediaClient } from "../features/media/client.js";
|
|
6
|
+
import { OperationsClient } from "../features/operations/client.js";
|
|
7
|
+
import { SyncClient } from "../features/sync/client.js";
|
|
8
|
+
import { OAuthClient } from "../features/oauth/client.js";
|
|
9
|
+
import { VerificationClient } from "../features/verification/client.js";
|
|
10
|
+
import { NotificationsClient } from "../features/notifications/client.js";
|
|
11
|
+
import { EventsClient } from "../features/events/client.js";
|
|
12
|
+
import { AccountClient } from "../features/account/client.js";
|
|
13
|
+
import { PresenceClient } from "../features/presence/client.js";
|
|
14
|
+
import { DirectoryClient } from "../features/directory/client.js";
|
|
15
|
+
import { DevicesClient } from "../features/devices/client.js";
|
|
16
|
+
import { TimelineClient } from "../features/timeline/client.js";
|
|
17
|
+
import { IdentityClient } from "../features/identity/client.js";
|
|
18
|
+
import { ProfilesClient } from "../features/profiles/client.js";
|
|
19
|
+
import { DiscoveryClient } from "../features/discovery/client.js";
|
|
20
|
+
import { ContactsClient } from "../features/contacts/client.js";
|
|
21
|
+
import { ConversationsClient } from "../features/conversations/client.js";
|
|
22
|
+
import { MessagesClient } from "../features/messages/client.js";
|
|
23
|
+
import { DeliveriesClient } from "../features/deliveries/client.js";
|
|
24
|
+
import { OutboxClient } from "../features/outbox/client.js";
|
|
25
|
+
import { ReliabilityClient } from "../features/reliability/client.js";
|
|
26
|
+
import { PairingClient } from "../features/pairing/client.js";
|
|
27
|
+
import { EncryptionClient } from "../features/encryption/client.js";
|
|
28
|
+
/** One set of capability interfaces for either native or managed communication. */
|
|
29
|
+
export class ClientFacade {
|
|
30
|
+
rtc;
|
|
31
|
+
location;
|
|
32
|
+
cache;
|
|
33
|
+
search;
|
|
34
|
+
media;
|
|
35
|
+
operations;
|
|
36
|
+
sync;
|
|
37
|
+
oauth;
|
|
38
|
+
notifications;
|
|
39
|
+
events;
|
|
40
|
+
account;
|
|
41
|
+
presence;
|
|
42
|
+
directory;
|
|
43
|
+
timeline;
|
|
44
|
+
devices;
|
|
45
|
+
verification;
|
|
46
|
+
identity;
|
|
47
|
+
profiles;
|
|
48
|
+
discovery;
|
|
49
|
+
contacts;
|
|
50
|
+
conversations;
|
|
51
|
+
messages;
|
|
52
|
+
deliveries;
|
|
53
|
+
outbox;
|
|
54
|
+
reliability;
|
|
55
|
+
pairing;
|
|
56
|
+
encryption;
|
|
57
|
+
#transport;
|
|
58
|
+
constructor(transport) {
|
|
59
|
+
this.#transport = transport;
|
|
60
|
+
this.rtc = new RtcClient(transport);
|
|
61
|
+
this.location = new LocationClient(transport);
|
|
62
|
+
this.cache = new CacheClient(transport);
|
|
63
|
+
this.search = new SearchClient(transport);
|
|
64
|
+
this.media = new MediaClient(transport);
|
|
65
|
+
this.operations = new OperationsClient(transport);
|
|
66
|
+
this.sync = new SyncClient(transport);
|
|
67
|
+
this.oauth = new OAuthClient(transport);
|
|
68
|
+
this.notifications = new NotificationsClient(transport);
|
|
69
|
+
this.events = new EventsClient(transport);
|
|
70
|
+
this.account = new AccountClient(transport);
|
|
71
|
+
this.presence = new PresenceClient(transport);
|
|
72
|
+
this.directory = new DirectoryClient(transport);
|
|
73
|
+
this.timeline = new TimelineClient(this.#transport);
|
|
74
|
+
this.devices = new DevicesClient(this.#transport);
|
|
75
|
+
this.verification = new VerificationClient(this.#transport);
|
|
76
|
+
this.identity = new IdentityClient(this.#transport);
|
|
77
|
+
this.profiles = new ProfilesClient(this.#transport);
|
|
78
|
+
this.discovery = new DiscoveryClient(this.#transport);
|
|
79
|
+
this.contacts = new ContactsClient(this.#transport);
|
|
80
|
+
this.conversations = new ConversationsClient(this.#transport);
|
|
81
|
+
this.messages = new MessagesClient(this.#transport);
|
|
82
|
+
this.deliveries = new DeliveriesClient(this.#transport);
|
|
83
|
+
this.outbox = new OutboxClient(this.#transport);
|
|
84
|
+
this.reliability = new ReliabilityClient(this.#transport);
|
|
85
|
+
this.pairing = new PairingClient(this.#transport);
|
|
86
|
+
this.encryption = new EncryptionClient(this.#transport);
|
|
87
|
+
}
|
|
88
|
+
/** Release this facade according to its transport ownership. Never logs out. */
|
|
89
|
+
close() {
|
|
90
|
+
return this.#transport.close();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ValidationError } from "./errors.js";
|
|
2
|
+
import { snapshotInput } from "../internal/protocol/input.js";
|
|
3
|
+
import { operationFor } from "../internal/protocol/registry.js";
|
|
4
|
+
import { isRecord } from "../internal/protocol/schema.js";
|
|
5
|
+
import { requestBody, requestURL } from "../internal/transport/request.js";
|
|
6
|
+
/** Validate canonical local-operation input without opening a connection or reading state. */
|
|
7
|
+
export function validateLocalRequest(operationId, input) {
|
|
8
|
+
const value = snapshotInput(input);
|
|
9
|
+
if (!isRecord(value) || Object.keys(value).some(key => !["path", "query", "body"].includes(key))) {
|
|
10
|
+
throw new ValidationError("Request envelope accepts only path, query and body");
|
|
11
|
+
}
|
|
12
|
+
for (const key of ["path", "query", "body"]) {
|
|
13
|
+
if (Object.hasOwn(value, key) && !isRecord(value[key]))
|
|
14
|
+
throw new ValidationError("Request fields must be objects");
|
|
15
|
+
}
|
|
16
|
+
const operation = operationFor(operationId);
|
|
17
|
+
requestURL("http://127.0.0.1", operation, value);
|
|
18
|
+
requestBody(operation, value.body);
|
|
19
|
+
// The same canonical path/query/body validators used by all typed SDK methods ran above.
|
|
20
|
+
return value;
|
|
21
|
+
}
|
|
22
|
+
/** Return a copy of the canonical envelope schema; callers cannot mutate the SDK registry. */
|
|
23
|
+
export function localRequestSchema(operationId) {
|
|
24
|
+
const operation = operationFor(operationId);
|
|
25
|
+
const properties = {};
|
|
26
|
+
const required = [];
|
|
27
|
+
for (const location of ["path", "query"]) {
|
|
28
|
+
const parameters = operation.parameters.filter(parameter => parameter.in === location);
|
|
29
|
+
if (!parameters.length)
|
|
30
|
+
continue;
|
|
31
|
+
const fields = Object.fromEntries(parameters.map(parameter => [parameter.name, parameter.schema]));
|
|
32
|
+
const mandatory = parameters.filter(parameter => parameter.required).map(parameter => parameter.name);
|
|
33
|
+
properties[location] = { type: "object", additionalProperties: false, properties: fields, required: mandatory };
|
|
34
|
+
if (mandatory.length)
|
|
35
|
+
required.push(location);
|
|
36
|
+
}
|
|
37
|
+
if (operation.request !== null) {
|
|
38
|
+
properties.body = operation.request;
|
|
39
|
+
required.push("body");
|
|
40
|
+
}
|
|
41
|
+
return structuredClone({ $schema: "https://json-schema.org/draft/2020-12/schema",
|
|
42
|
+
type: "object", additionalProperties: false, properties, required });
|
|
43
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
/** Explicit offline metadata; does not load native code or read device state. */
|
|
3
|
+
export function sdkInfo() {
|
|
4
|
+
const value = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
5
|
+
if (!value || typeof value !== "object" || !("version" in value) || typeof value.version !== "string") {
|
|
6
|
+
throw new Error("SDK package metadata is invalid");
|
|
7
|
+
}
|
|
8
|
+
return Object.freeze({ package: "@agentims/sdk", version: value.version, bindingAbi: 1, localApiVersions: [1, 2, 3] });
|
|
9
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export class AccountClient {
|
|
2
|
+
transport;
|
|
3
|
+
constructor(transport) {
|
|
4
|
+
this.transport = transport;
|
|
5
|
+
}
|
|
6
|
+
profile(userId, options = {}) {
|
|
7
|
+
return this.transport.call("readMatrixProfile", { ...options, path: { user_id: userId } });
|
|
8
|
+
}
|
|
9
|
+
updateProfile(body, options = {}) {
|
|
10
|
+
return this.transport.call("updateMatrixProfile", { ...options, body });
|
|
11
|
+
}
|
|
12
|
+
data(eventType, options = {}) {
|
|
13
|
+
return this.transport.call("readMatrixAccountData", { ...options, query: { event_type: eventType } });
|
|
14
|
+
}
|
|
15
|
+
writeData(body, options = {}) {
|
|
16
|
+
return this.transport.call("writeMatrixAccountData", { ...options, body });
|
|
17
|
+
}
|
|
18
|
+
profileField(body, options = {}) {
|
|
19
|
+
return this.transport.call("readMatrixProfileField", { ...options, body });
|
|
20
|
+
}
|
|
21
|
+
writeProfileField(body, options = {}) {
|
|
22
|
+
return this.transport.call("writeMatrixProfileField", { ...options, body });
|
|
23
|
+
}
|
|
24
|
+
preferences(body, options = {}) {
|
|
25
|
+
return this.transport.call("readMatrixAccountPreferences", { ...options, body });
|
|
26
|
+
}
|
|
27
|
+
writePreference(body, options = {}) {
|
|
28
|
+
return this.transport.call("writeMatrixAccountPreference", { ...options, body });
|
|
29
|
+
}
|
|
30
|
+
openId(body, options = {}) {
|
|
31
|
+
return this.transport.call("requestMatrixOpenId", { ...options, body });
|
|
32
|
+
}
|
|
33
|
+
changePassword(body, options = {}) {
|
|
34
|
+
return this.transport.call("changeMatrixPassword", { ...options, body });
|
|
35
|
+
}
|
|
36
|
+
deactivate(body, options = {}) {
|
|
37
|
+
return this.transport.call("deactivateMatrixAccount", { ...options, body });
|
|
38
|
+
}
|
|
39
|
+
thirdPartyIds(options = {}) {
|
|
40
|
+
return this.transport.call("readMatrixThirdPartyIds", options);
|
|
41
|
+
}
|
|
42
|
+
validateEmail(body, options = {}) {
|
|
43
|
+
return this.transport.call("requestMatrixEmailValidation", { ...options, body });
|
|
44
|
+
}
|
|
45
|
+
validatePhone(body, options = {}) {
|
|
46
|
+
return this.transport.call("requestMatrixPhoneValidation", { ...options, body });
|
|
47
|
+
}
|
|
48
|
+
addThirdPartyId(body, options = {}) {
|
|
49
|
+
return this.transport.call("addMatrixThirdPartyId", { ...options, body });
|
|
50
|
+
}
|
|
51
|
+
deleteThirdPartyId(body, options = {}) {
|
|
52
|
+
return this.transport.call("deleteMatrixThirdPartyId", { ...options, body });
|
|
53
|
+
}
|
|
54
|
+
cachedData(body, options = {}) {
|
|
55
|
+
return this.transport.call("readMatrixCachedGlobalData", { ...options, body });
|
|
56
|
+
}
|
|
57
|
+
}
|