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,82 @@
|
|
|
1
|
+
import { createReadStream } from "node:fs";
|
|
2
|
+
import { open } from "node:fs/promises";
|
|
3
|
+
import { localRequestSchema, parseAgentIMJSON, validateLocalRequest } from "@agentims/sdk";
|
|
4
|
+
import { CliError } from "./errors.js";
|
|
5
|
+
function inputBudget(operationId) {
|
|
6
|
+
if (!operationId)
|
|
7
|
+
return 8 * 1024 * 1024 + 4096;
|
|
8
|
+
const schema = localRequestSchema(operationId);
|
|
9
|
+
const properties = schema.properties;
|
|
10
|
+
const body = record(properties) ? properties.body : undefined;
|
|
11
|
+
const declared = record(body) ? body["x-max-body-bytes"] : undefined;
|
|
12
|
+
return Math.min(typeof declared === "number" ? declared : 8 * 1024 * 1024, 24 * 1024 * 1024) + 4096;
|
|
13
|
+
}
|
|
14
|
+
export async function readJSON(source, operationId) {
|
|
15
|
+
if (source === undefined)
|
|
16
|
+
return {};
|
|
17
|
+
if (source === "-" && process.stdin.isTTY)
|
|
18
|
+
throw new CliError("CLI_INPUT", "--input - requires noninteractive JSON on stdin");
|
|
19
|
+
const stream = source === "-" ? process.stdin : createReadStream(source);
|
|
20
|
+
const chunks = [];
|
|
21
|
+
let bytes = 0;
|
|
22
|
+
const maximumInput = inputBudget(operationId);
|
|
23
|
+
try {
|
|
24
|
+
for await (const chunk of stream) {
|
|
25
|
+
const data = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
26
|
+
bytes += data.length;
|
|
27
|
+
if (bytes > maximumInput)
|
|
28
|
+
throw new CliError("CLI_INPUT_TOO_LARGE", "JSON input exceeds the local API byte budget");
|
|
29
|
+
chunks.push(data);
|
|
30
|
+
}
|
|
31
|
+
return parseAgentIMJSON(new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks)));
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
if (error instanceof CliError)
|
|
35
|
+
throw error;
|
|
36
|
+
throw new CliError("CLI_INPUT", "Cannot read valid UTF-8 JSON input; no operation was submitted");
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
if (source !== "-")
|
|
40
|
+
stream.destroy();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function record(value) {
|
|
44
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
45
|
+
}
|
|
46
|
+
async function attachment(filename, maximum) {
|
|
47
|
+
let handle;
|
|
48
|
+
try {
|
|
49
|
+
handle = await open(filename, "r");
|
|
50
|
+
const stat = await handle.stat();
|
|
51
|
+
if (!stat.isFile() || stat.size > maximum)
|
|
52
|
+
throw new CliError("CLI_FILE_TOO_LARGE", "Attachment must be a regular file within this operation's upload byte budget");
|
|
53
|
+
const data = await handle.readFile();
|
|
54
|
+
if (data.length > maximum)
|
|
55
|
+
throw new CliError("CLI_FILE_TOO_LARGE", "Attachment changed beyond the upload byte budget");
|
|
56
|
+
return data.toString("base64");
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
if (error instanceof CliError)
|
|
60
|
+
throw error;
|
|
61
|
+
throw new CliError("CLI_FILE_UNAVAILABLE", "Cannot read the explicitly selected attachment");
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
await handle?.close();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export async function prepareInput(command, args, value) {
|
|
68
|
+
if (!record(value))
|
|
69
|
+
throw new CliError("CLI_INPUT", "Input must be a JSON object containing path/query/body");
|
|
70
|
+
const input = { ...value };
|
|
71
|
+
if (command.emptyBody && !Object.hasOwn(input, "body"))
|
|
72
|
+
input.body = {};
|
|
73
|
+
if (args.file) {
|
|
74
|
+
if (!record(input.body) || Object.hasOwn(input.body, "data_base64"))
|
|
75
|
+
throw new CliError("CLI_INPUT", "--file requires a body and cannot replace an existing data_base64 field");
|
|
76
|
+
input.body = { ...input.body, data_base64: await attachment(args.file, command.maxFileBytes ?? 6 * 1024 * 1024 - 4096) };
|
|
77
|
+
}
|
|
78
|
+
if (command.stableRequestId && (!record(input.body) || typeof input.body.request_id !== "string" || !input.body.request_id)) {
|
|
79
|
+
throw new CliError("CLI_INPUT", "Writes require an explicit stable body.request_id");
|
|
80
|
+
}
|
|
81
|
+
return validateLocalRequest(command.operation, input);
|
|
82
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { stringifyAgentIMJSON } from "@agentims/sdk";
|
|
4
|
+
import { failure } from "./errors.js";
|
|
5
|
+
import { run } from "./run.js";
|
|
6
|
+
import { delegateActiveCLI } from "../updates/activation.js";
|
|
7
|
+
const argv = process.argv.slice(2);
|
|
8
|
+
const offlineHelp = argv.length === 0 || argv[0] === "help" || argv.includes("--help");
|
|
9
|
+
const rootFlag = argv[0] === "update" ? argv.indexOf("--update-root") : -1;
|
|
10
|
+
const selectedRoot = rootFlag >= 0 && argv[rootFlag + 1] && !argv[rootFlag + 1].startsWith("--") ? resolve(argv[rootFlag + 1]) : undefined;
|
|
11
|
+
(offlineHelp ? Promise.resolve(false) : delegateActiveCLI(argv, selectedRoot)).then(async (delegated) => delegated ? undefined : run(argv)).then(result => {
|
|
12
|
+
if (result === undefined)
|
|
13
|
+
return;
|
|
14
|
+
process.stdout.write(stringifyAgentIMJSON(result) + "\n");
|
|
15
|
+
}).catch((error) => {
|
|
16
|
+
const result = failure(error);
|
|
17
|
+
process.stderr.write(stringifyAgentIMJSON(result.output) + "\n");
|
|
18
|
+
process.exitCode = result.exitCode;
|
|
19
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { access, link, lstat, mkdtemp, open, readFile, rm } from "node:fs/promises";
|
|
3
|
+
import { constants } from "node:fs";
|
|
4
|
+
import { dirname, join, resolve } from "node:path";
|
|
5
|
+
import { CliError } from "./errors.js";
|
|
6
|
+
import { windowsPrivatePath } from "../configuration/windows-security.js";
|
|
7
|
+
/** Refuse an existing output before submitting a request that can issue a private grant. */
|
|
8
|
+
export async function checkOutputAvailable(filename) {
|
|
9
|
+
let available = false;
|
|
10
|
+
try {
|
|
11
|
+
await lstat(filename);
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
if (error.code === "ENOENT")
|
|
15
|
+
available = true;
|
|
16
|
+
else
|
|
17
|
+
throw new CliError("CLI_OUTPUT_UNAVAILABLE", "Cannot inspect the requested private output path", 1);
|
|
18
|
+
}
|
|
19
|
+
if (!available)
|
|
20
|
+
throw new CliError("CLI_OUTPUT_EXISTS", "Output already exists; no operation was submitted", 1);
|
|
21
|
+
try {
|
|
22
|
+
const parent = dirname(resolve(filename));
|
|
23
|
+
const metadata = await lstat(parent);
|
|
24
|
+
if (!metadata.isDirectory() || metadata.isSymbolicLink())
|
|
25
|
+
throw new Error("Invalid output parent");
|
|
26
|
+
await access(parent, constants.W_OK);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
throw new CliError("CLI_OUTPUT_UNAVAILABLE", "Private output requires an existing writable directory; no operation was submitted", 1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export async function saveAttachment(filename, data, verify = false) {
|
|
33
|
+
if (!(data instanceof Uint8Array))
|
|
34
|
+
throw new CliError("INVALID_RESPONSE", "Communication returned invalid attachment bytes", 1);
|
|
35
|
+
let temporary;
|
|
36
|
+
try {
|
|
37
|
+
temporary = await mkdtemp(join(dirname(resolve(filename)), ".agentim-download-"));
|
|
38
|
+
if (process.platform === "win32")
|
|
39
|
+
await windowsPrivatePath(temporary, "secure-directory");
|
|
40
|
+
const complete = join(temporary, "attachment");
|
|
41
|
+
const file = await open(complete, "wx", 0o600);
|
|
42
|
+
try {
|
|
43
|
+
await file.writeFile(data);
|
|
44
|
+
await file.sync();
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
await file.close();
|
|
48
|
+
}
|
|
49
|
+
if (verify && !Buffer.from(data).equals(await readFile(complete)))
|
|
50
|
+
throw new Error("Private output verification failed");
|
|
51
|
+
await link(complete, filename);
|
|
52
|
+
if (process.platform !== "win32") {
|
|
53
|
+
const parent = await open(dirname(resolve(filename)), "r");
|
|
54
|
+
try {
|
|
55
|
+
await parent.sync();
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
await parent.close();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const exists = error && typeof error === "object" && "code" in error && error.code === "EEXIST";
|
|
64
|
+
throw new CliError(exists ? "CLI_OUTPUT_EXISTS" : "CLI_OUTPUT_UNAVAILABLE", exists ? "Output already exists; it was not overwritten" : "Cannot create the requested private output file", 1);
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
if (temporary)
|
|
68
|
+
await rm(temporary, { recursive: true, force: true });
|
|
69
|
+
}
|
|
70
|
+
return { saved: true, bytes: data.byteLength, sha256: createHash("sha256").update(data).digest("hex") };
|
|
71
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { privateText } from "../configuration/private-state.js";
|
|
2
|
+
import { CliError } from "./errors.js";
|
|
3
|
+
/** Bounded secret input; remove only one terminal newline, never password whitespace. */
|
|
4
|
+
export async function readPassword(file, stdin = false, input = process.stdin) {
|
|
5
|
+
if (!file && !stdin)
|
|
6
|
+
return undefined;
|
|
7
|
+
let value;
|
|
8
|
+
if (file) {
|
|
9
|
+
try {
|
|
10
|
+
value = await privateText(file, 16386);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
throw new CliError("PASSWORD_FILE_INVALID", "Use a private password file owned by the current user");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
if (input.isTTY)
|
|
18
|
+
throw new CliError("PASSWORD_INPUT_REQUIRED", "Pipe a password from your secret store to --password-stdin, or use --password-file");
|
|
19
|
+
const chunks = [];
|
|
20
|
+
let size = 0;
|
|
21
|
+
for await (const chunk of input) {
|
|
22
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
23
|
+
size += buffer.length;
|
|
24
|
+
if (size > 16386)
|
|
25
|
+
throw new CliError("PASSWORD_INPUT_INVALID", "Password input exceeds its size limit");
|
|
26
|
+
chunks.push(buffer);
|
|
27
|
+
}
|
|
28
|
+
value = Buffer.concat(chunks).toString("utf8");
|
|
29
|
+
for (const chunk of chunks)
|
|
30
|
+
chunk.fill(0);
|
|
31
|
+
}
|
|
32
|
+
value = value.replace(/\r?\n$/, "");
|
|
33
|
+
if (!value || [...value].length > 4096 || value.includes("\n") || value.includes("\r") || value.includes("\0"))
|
|
34
|
+
throw new CliError("PASSWORD_INPUT_INVALID", "Supply one nonempty password line, up to 4096 characters");
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { accountCommand, accountOptions } from "./account-commands.js";
|
|
2
|
+
import { historyCommand } from "./history-commands.js";
|
|
3
|
+
import { updateCommand } from "./update-commands.js";
|
|
4
|
+
import { exportAgentSecretsBundle, archiveAgentDeviceState, branchAgentStream, migrateAgentDeviceState } from "../storage/archive.js";
|
|
5
|
+
import { selectAccount } from "../accounts/selection.js";
|
|
6
|
+
import { accountEnvironment } from "../accounts/context.js";
|
|
7
|
+
import { stringifyAgentIMJSON } from "@agentims/sdk";
|
|
8
|
+
import { foregroundAgentFromEnv } from "../lifecycle/foreground.js";
|
|
9
|
+
import { attachCommunicationFromEnv, attachAuthorizationFromEnv, communicationStatusFromEnv, stopCommunicationFromEnv } from "../lifecycle/communication.js";
|
|
10
|
+
import { connectAgentFromEnv } from "../managed/control.js";
|
|
11
|
+
import { parseArguments } from "./arguments.js";
|
|
12
|
+
import { commands } from "./commands/catalog.js";
|
|
13
|
+
import { CliError } from "./errors.js";
|
|
14
|
+
import { help } from "./help.js";
|
|
15
|
+
import { prepareInput, readJSON } from "./input.js";
|
|
16
|
+
import { checkOutputAvailable, saveAttachment } from "./output.js";
|
|
17
|
+
import { authenticationCommand } from "./authentication.js";
|
|
18
|
+
import { assertAuthenticationIntent } from "../authentication/intent.js";
|
|
19
|
+
const lifecycle = { attach: attachCommunicationFromEnv, authorization: attachAuthorizationFromEnv, connect: connectAgentFromEnv, status: communicationStatusFromEnv, stop: stopCommunicationFromEnv };
|
|
20
|
+
export async function run(argv, env = process.env, control = lifecycle) {
|
|
21
|
+
if (["version", "--version", "update"].includes(argv[0] ?? "") && !argv.includes("--help"))
|
|
22
|
+
return updateCommand(argv);
|
|
23
|
+
const args = parseArguments(argv);
|
|
24
|
+
if (args.help)
|
|
25
|
+
return help(args);
|
|
26
|
+
if (["auth methods", "auth status", "auth start"].includes(args.command))
|
|
27
|
+
return authenticationCommand(args.command, accountOptions(args, env), args.foreground);
|
|
28
|
+
if (["storage archive", "storage branch", "storage migrate", "encryption bundle-export"].includes(args.command)) {
|
|
29
|
+
const state = args.stateDir ?? env.AGENTIM_STATE_DIR;
|
|
30
|
+
if (!state)
|
|
31
|
+
throw new CliError("CONFIGURATION_REQUIRED", "Offline archive requires --state-dir or AGENTIM_STATE_DIR");
|
|
32
|
+
if (args.command === "encryption bundle-export")
|
|
33
|
+
return exportAgentSecretsBundle(state, args.output, { ...(env.AGENTIM_DAEMON_BIN ? { daemonPath: env.AGENTIM_DAEMON_BIN } : {}) });
|
|
34
|
+
if (args.command === "storage migrate")
|
|
35
|
+
return migrateAgentDeviceState(state, args.output, {
|
|
36
|
+
...(env.AGENTIM_DAEMON_BIN ? { daemonPath: env.AGENTIM_DAEMON_BIN } : {})
|
|
37
|
+
});
|
|
38
|
+
if (args.command === "storage branch")
|
|
39
|
+
return branchAgentStream(state, args.output, {
|
|
40
|
+
...(env.AGENTIM_DAEMON_BIN ? { daemonPath: env.AGENTIM_DAEMON_BIN } : {})
|
|
41
|
+
});
|
|
42
|
+
return archiveAgentDeviceState(state, args.output, { compact: args.compact,
|
|
43
|
+
...(env.AGENTIM_DAEMON_BIN ? { daemonPath: env.AGENTIM_DAEMON_BIN } : {}) });
|
|
44
|
+
}
|
|
45
|
+
env = { ...env, ...(args.nativeSettingsFile ? { AGENTIM_NATIVE_SETTINGS_FILE: args.nativeSettingsFile } : {}), ...(args.credentialFile ? { AGENTIM_CREDENTIAL_FILE: args.credentialFile } : {}), ...(args.authorizationFile ? { AGENTIM_AUTHORIZATION_FILE: args.authorizationFile } : {}) };
|
|
46
|
+
if (["register", "login", "credentials ensure", "credentials replace"].includes(args.command))
|
|
47
|
+
return accountCommand(args, env);
|
|
48
|
+
if (["encryption backup", "encryption restore", "encryption online-enable", "encryption online-recover"].includes(args.command))
|
|
49
|
+
return historyCommand(args, env);
|
|
50
|
+
const purpose = ["connect", "run"].includes(args.command) ? "admission" : "operation";
|
|
51
|
+
if (args.account)
|
|
52
|
+
env = { ...env, ...(await selectAccount(accountOptions(args, env), false, purpose)).env };
|
|
53
|
+
else
|
|
54
|
+
env = { ...env, ...(args.home ? { AGENTIM_HOMESERVER_URL: args.home } : {}), ...(args.site ? { AGENTIM_SITE_URL: args.site } : {}), ...(args.stateDir ? { AGENTIM_STATE_DIR: args.stateDir } : {}) };
|
|
55
|
+
env = await accountEnvironment(env, purpose);
|
|
56
|
+
const command = commands.find(value => value.name === args.command);
|
|
57
|
+
const input = command ? await prepareInput(command, args, await readJSON(args.input, command.operation)) : undefined;
|
|
58
|
+
if (!env.AGENTIM_SITE_URL && !env.AGENTIM_HOMESERVER_URL && !env.AGENTIM_STATE_DIR) {
|
|
59
|
+
throw new CliError("CONFIGURATION_REQUIRED", "Set AGENTIM_SITE_URL or an existing private AGENTIM_STATE_DIR");
|
|
60
|
+
}
|
|
61
|
+
if (args.command === "run")
|
|
62
|
+
return foregroundAgentFromEnv(env);
|
|
63
|
+
if (args.command === "stop") {
|
|
64
|
+
await control.stop(env);
|
|
65
|
+
return { stopped: true, statePreserved: true };
|
|
66
|
+
}
|
|
67
|
+
if (args.command === "connect") {
|
|
68
|
+
const device = await control.connect(env);
|
|
69
|
+
await device.close();
|
|
70
|
+
}
|
|
71
|
+
if (["status", "connect"].includes(args.command))
|
|
72
|
+
return control.status(env);
|
|
73
|
+
if (!command || !input)
|
|
74
|
+
throw new CliError("CLI_USAGE", "Run agentim help");
|
|
75
|
+
if (command.authentication)
|
|
76
|
+
assertAuthenticationIntent(command.operation, input, env);
|
|
77
|
+
if (command.privateJsonOutput || command.fileOutput)
|
|
78
|
+
await checkOutputAvailable(args.output);
|
|
79
|
+
const attach = command.authentication ? control.authorization ?? control.attach : control.attach;
|
|
80
|
+
const device = await attach(env);
|
|
81
|
+
try {
|
|
82
|
+
const result = await command.invoke(device.client, input, { timeoutMs: args.timeoutMs });
|
|
83
|
+
if (command.privateJsonOutput)
|
|
84
|
+
return saveAttachment(args.output, new TextEncoder().encode(stringifyAgentIMJSON(result) + "\n"), true);
|
|
85
|
+
return command.fileOutput ? await saveAttachment(args.output, result) : result;
|
|
86
|
+
}
|
|
87
|
+
finally {
|
|
88
|
+
await device.close();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { runtimePackageInfo, checkClientUpdate } from "../updates/discovery.js";
|
|
2
|
+
import { configureClientUpdates, clientUpdateRoot } from "../updates/policy.js";
|
|
3
|
+
import { planClientUpdate, readUpdateRecord } from "../updates/ledger.js";
|
|
4
|
+
import { applyClientUpdate } from "../updates/managed.js";
|
|
5
|
+
import { delegateActiveCLI } from "../updates/activation.js";
|
|
6
|
+
import { watchClientUpdates } from "../updates/watch.js";
|
|
7
|
+
import { privateText } from "../configuration/private-state.js";
|
|
8
|
+
import { stringifyAgentIMJSON } from "@agentims/sdk";
|
|
9
|
+
import { CliError } from "./errors.js";
|
|
10
|
+
import { resolve } from "node:path";
|
|
11
|
+
export async function updateCommand(argv) {
|
|
12
|
+
const [command, ...tail] = argv;
|
|
13
|
+
if (command === "version" || command === "--version") {
|
|
14
|
+
if (tail.some(value => value !== "--json") || tail.length > 1)
|
|
15
|
+
throw new CliError("CLI_USAGE", "Use agentim version [--json]");
|
|
16
|
+
return runtimePackageInfo();
|
|
17
|
+
}
|
|
18
|
+
const action = tail[0];
|
|
19
|
+
if (command !== "update" || !["configure", "check", "plan", "apply", "status", "watch"].includes(action ?? ""))
|
|
20
|
+
throw new CliError("CLI_USAGE", "Use agentim help update");
|
|
21
|
+
const flags = new Map();
|
|
22
|
+
for (let i = 1; i < tail.length; i++) {
|
|
23
|
+
const key = tail[i];
|
|
24
|
+
if (key === "--json") {
|
|
25
|
+
if (flags.has(key))
|
|
26
|
+
throw new CliError("CLI_USAGE", "Duplicate update flag");
|
|
27
|
+
flags.set(key, "true");
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (!["--update-root", "--state-dir", "--update-id", "--input"].includes(key) || flags.has(key) || !tail[i + 1] || tail[i + 1].startsWith("--"))
|
|
31
|
+
throw new CliError("CLI_USAGE", "Invalid update arguments");
|
|
32
|
+
flags.set(key, tail[++i]);
|
|
33
|
+
}
|
|
34
|
+
const allowed = ["--json", "--update-root", ...(action === "configure" ? ["--input"] : []), ...(["plan", "watch"].includes(action) ? ["--state-dir"] : []), ...(["apply", "status"].includes(action) ? ["--update-id"] : [])];
|
|
35
|
+
if ([...flags.keys()].some(key => !allowed.includes(key)))
|
|
36
|
+
throw new CliError("CLI_USAGE", "Flag is not valid for this update action");
|
|
37
|
+
const root = flags.has("--update-root") ? resolve(flags.get("--update-root")) : clientUpdateRoot();
|
|
38
|
+
if (action === "configure") {
|
|
39
|
+
if (!flags.has("--input"))
|
|
40
|
+
throw new CliError("CLI_USAGE", "Use update configure --input <private policy.json>");
|
|
41
|
+
const policy = JSON.parse(await privateText(resolve(flags.get("--input")), 65536));
|
|
42
|
+
const { validatePolicy } = await import("../updates/policy.js");
|
|
43
|
+
await configureClientUpdates(validatePolicy(policy, root));
|
|
44
|
+
return { configured: true, audience: "customer" };
|
|
45
|
+
}
|
|
46
|
+
if (action === "check")
|
|
47
|
+
return checkClientUpdate(root);
|
|
48
|
+
if (action === "plan") {
|
|
49
|
+
if (!flags.has("--state-dir"))
|
|
50
|
+
throw new CliError("CLI_USAGE", "A private --state-dir is required for an update plan");
|
|
51
|
+
return planClientUpdate({ root, stateDir: resolve(flags.get("--state-dir")) });
|
|
52
|
+
}
|
|
53
|
+
if (action === "apply" || action === "status") {
|
|
54
|
+
const updateId = flags.get("--update-id");
|
|
55
|
+
if (!updateId)
|
|
56
|
+
throw new CliError("CLI_USAGE", "Use the original --update-id from update plan");
|
|
57
|
+
return action === "apply" ? applyClientUpdate({ root, updateId }) : readUpdateRecord(root, updateId);
|
|
58
|
+
}
|
|
59
|
+
const controller = new AbortController();
|
|
60
|
+
const stop = () => controller.abort();
|
|
61
|
+
process.on("SIGINT", stop);
|
|
62
|
+
process.on("SIGTERM", stop);
|
|
63
|
+
try {
|
|
64
|
+
const watcher = await watchClientUpdates({ root, ...(flags.has("--state-dir") ? { stateDir: resolve(flags.get("--state-dir")) } : {}), signal: controller.signal,
|
|
65
|
+
onUpdate: notice => { process.stdout.write(stringifyAgentIMJSON(notice) + "\n"); } });
|
|
66
|
+
await watcher.done;
|
|
67
|
+
await watcher.close();
|
|
68
|
+
if (!controller.signal.aborted && await delegateActiveCLI(argv, root, controller.signal))
|
|
69
|
+
return undefined;
|
|
70
|
+
return { watching: false, communicationPreserved: true };
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
process.off("SIGINT", stop);
|
|
74
|
+
process.off("SIGTERM", stop);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { validateLocalRequest } from "@agentims/sdk";
|
|
2
|
+
import { privateText } from "./private-state.js";
|
|
3
|
+
import { origin } from "./service-origin.js";
|
|
4
|
+
function object(value) { return value !== null && typeof value === "object" && !Array.isArray(value); }
|
|
5
|
+
async function document(path) {
|
|
6
|
+
try {
|
|
7
|
+
const value = JSON.parse(await privateText(path));
|
|
8
|
+
if (!object(value) || value.version !== 1 || typeof value.homeserver !== "string" || typeof value.user_id !== "string")
|
|
9
|
+
throw new Error();
|
|
10
|
+
origin(value.homeserver);
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
throw new Error("Account credential file is invalid or not private; no login was submitted");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export async function accountCredential(path) {
|
|
18
|
+
const value = await document(path);
|
|
19
|
+
if (value.kind !== "agentim-account-credential" || Object.keys(value).sort().join() !== "credential_id,credential_secret,homeserver,kind,user_id,version")
|
|
20
|
+
throw new Error("Expected a portable account credential, not a chat recovery key or registration proof");
|
|
21
|
+
validateLocalRequest("recoverAccountIdentity", { body: { credential_id: value.credential_id, credential_secret: value.credential_secret, expected_user_id: value.user_id } });
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
export async function deviceAuthorization(path) {
|
|
25
|
+
const value = await document(path);
|
|
26
|
+
if (value.kind !== "agentim-device-authorization" || Object.keys(value).sort().join() !== "expires_at_ms,homeserver,kind,login_token,user_id,version" || !Number.isSafeInteger(value.expires_at_ms) || Number(value.expires_at_ms) <= 0)
|
|
27
|
+
throw new Error("Expected a short-lived device authorization file");
|
|
28
|
+
validateLocalRequest("loginAuthorizedDevice", { body: { login_token: value.login_token, expected_user_id: value.user_id } });
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { privateText } from "./private-state.js";
|
|
2
|
+
import { origin } from "./service-origin.js";
|
|
3
|
+
import { ManagedError } from "../managed/errors.js";
|
|
4
|
+
export async function readConnection(path) {
|
|
5
|
+
const contents = await privateText(path);
|
|
6
|
+
try {
|
|
7
|
+
const value = JSON.parse(contents);
|
|
8
|
+
if (!value || typeof value !== "object" || Object.keys(value).sort().join() !== "api_token,base_url,homeserver,version"
|
|
9
|
+
|| !("version" in value) || value.version !== 1 || !("base_url" in value) || typeof value.base_url !== "string"
|
|
10
|
+
|| !("api_token" in value) || typeof value.api_token !== "string" || !/^[A-Za-z0-9_-]{43}$/.test(value.api_token)
|
|
11
|
+
|| !("homeserver" in value) || typeof value.homeserver !== "string" || origin(value.homeserver) !== value.homeserver)
|
|
12
|
+
throw new Error();
|
|
13
|
+
return { version: 1, base_url: value.base_url, api_token: value.api_token, homeserver: value.homeserver };
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
throw new ManagedError("INVALID_MANAGED_STATE", "Private communication descriptor is malformed; state was preserved");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { privateText } from "./private-state.js";
|
|
3
|
+
import { origin } from "./service-origin.js";
|
|
4
|
+
import { ManagedError } from "../managed/errors.js";
|
|
5
|
+
export function assertDeviceBinding(env, user, homeserver) {
|
|
6
|
+
if ((env.AGENTIM_HOMESERVER_URL && origin(env.AGENTIM_HOMESERVER_URL) !== homeserver)
|
|
7
|
+
|| (env.AGENTIM_EXPECTED_USER_ID && user && env.AGENTIM_EXPECTED_USER_ID !== user)
|
|
8
|
+
|| (env.AGENTIM_AGENT_ID && user && user.slice(1).split(":", 1)[0] !== env.AGENTIM_AGENT_ID)) {
|
|
9
|
+
throw new ManagedError("STATE_CONFLICT", "Device belongs to another identity or service; its state was preserved");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Stop may inspect retained native metadata when a crashed process cannot answer status. */
|
|
13
|
+
export async function assertSavedDeviceBinding(env, state) {
|
|
14
|
+
if (!env.AGENTIM_AGENT_ID && !env.AGENTIM_HOMESERVER_URL)
|
|
15
|
+
return;
|
|
16
|
+
let text;
|
|
17
|
+
try {
|
|
18
|
+
text = await privateText(join(state, "device/session.json"));
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (error.code === "ENOENT")
|
|
22
|
+
return;
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const document = JSON.parse(text);
|
|
27
|
+
const session = typeof document.session === "string" ? JSON.parse(document.session) : document.session;
|
|
28
|
+
if (!session || typeof session !== "object" || typeof document.homeserver !== "string")
|
|
29
|
+
throw new Error();
|
|
30
|
+
const data = session;
|
|
31
|
+
const user = data.user_id ?? data.meta?.user_id;
|
|
32
|
+
if (typeof user !== "string")
|
|
33
|
+
throw new Error();
|
|
34
|
+
assertDeviceBinding(env, user, document.homeserver);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
if (error instanceof ManagedError)
|
|
38
|
+
throw error;
|
|
39
|
+
throw new ManagedError("INVALID_MANAGED_STATE", "Saved native identity metadata is malformed; state was preserved");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { origin, serviceOrigin } from "./service-origin.js";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { access } from "node:fs/promises";
|
|
4
|
+
import { constants } from "node:fs";
|
|
5
|
+
import { accountCredential, deviceAuthorization } from "./account-credential.js";
|
|
6
|
+
import { bundledExecutable } from "./executable.js";
|
|
7
|
+
import { assertRuntimeNode } from "./node-version.js";
|
|
8
|
+
import { readNativeSettings } from "./native-settings.js";
|
|
9
|
+
export { origin } from "./service-origin.js";
|
|
10
|
+
/** Read configuration only when the Agent explicitly starts its communication device. */
|
|
11
|
+
export async function deviceConfiguration(env) {
|
|
12
|
+
assertRuntimeNode();
|
|
13
|
+
if (!env.AGENTIM_STATE_DIR)
|
|
14
|
+
throw new Error("Set AGENTIM_STATE_DIR to a persistent private directory");
|
|
15
|
+
const startup = env.AGENTIM_STARTUP_TIMEOUT_MS;
|
|
16
|
+
if (startup !== undefined && (!/^\d+$/.test(startup) || !Number.isSafeInteger(Number(startup)) || Number(startup) < 1000 || Number(startup) > 300000))
|
|
17
|
+
throw new Error("Startup timeout must be 1000..300000 milliseconds");
|
|
18
|
+
const modes = [env.AGENTIM_CREDENTIAL_FILE, env.AGENTIM_AUTHORIZATION_FILE, env.AGENTIM_ADMISSION_FILE].filter(Boolean);
|
|
19
|
+
if (modes.length > 1)
|
|
20
|
+
throw new Error("Choose one account credential, short-lived authorization, or admission mode");
|
|
21
|
+
const credential = env.AGENTIM_CREDENTIAL_FILE ? await accountCredential(env.AGENTIM_CREDENTIAL_FILE) : undefined;
|
|
22
|
+
const authorization = env.AGENTIM_AUTHORIZATION_FILE ? await deviceAuthorization(env.AGENTIM_AUTHORIZATION_FILE) : undefined;
|
|
23
|
+
const existing = credential ?? authorization;
|
|
24
|
+
const homeserver = await serviceOrigin(env.AGENTIM_HOMESERVER_URL ?? (!env.AGENTIM_SITE_URL ? existing?.homeserver : undefined), env.AGENTIM_SITE_URL);
|
|
25
|
+
if (existing && origin(existing.homeserver) !== origin(homeserver))
|
|
26
|
+
throw new Error("Credential belongs to a different homeserver; no login was submitted");
|
|
27
|
+
return { homeserver: origin(homeserver), state: resolve(env.AGENTIM_STATE_DIR), agentId: env.AGENTIM_AGENT_ID,
|
|
28
|
+
...(env.AGENTIM_NATIVE_SETTINGS_FILE ? { native: await readNativeSettings(env.AGENTIM_NATIVE_SETTINGS_FILE) } : {}),
|
|
29
|
+
admissionFile: env.AGENTIM_ADMISSION_FILE,
|
|
30
|
+
...(startup !== undefined ? { startupTimeoutMs: Number(startup) } : {}),
|
|
31
|
+
...(env.AGENTIM_FOREGROUND_CONNECTION === "1" ? { publishForeground: true } : {}),
|
|
32
|
+
...(env.AGENTIM_VERIFY_ACCOUNT_CREDENTIAL === "1" ? { verifyCredential: true } : {}),
|
|
33
|
+
...(env.AGENTIM_CREDENTIAL_BACKUP ? { credentialBackup: resolve(env.AGENTIM_CREDENTIAL_BACKUP) } : {}),
|
|
34
|
+
...(env.AGENTIM_CREDENTIAL_FILE ? { credentialFile: resolve(env.AGENTIM_CREDENTIAL_FILE) } : {}),
|
|
35
|
+
...(env.AGENTIM_AUTHORIZATION_FILE ? { authorizationFile: resolve(env.AGENTIM_AUTHORIZATION_FILE) } : {}) };
|
|
36
|
+
}
|
|
37
|
+
/** Process mode alone requires and validates an executable. */
|
|
38
|
+
export async function configuration(env) {
|
|
39
|
+
const config = await deviceConfiguration(env);
|
|
40
|
+
const executable = env.AGENTIM_DAEMON_BIN ? resolve(env.AGENTIM_DAEMON_BIN) : bundledExecutable();
|
|
41
|
+
await access(executable, constants.X_OK);
|
|
42
|
+
return { ...config, executable };
|
|
43
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { dirname, resolve } from "node:path";
|
|
5
|
+
function runtimeGlibc() {
|
|
6
|
+
const report = process.report.getReport();
|
|
7
|
+
if (!("header" in report) || !report.header || typeof report.header !== "object")
|
|
8
|
+
return undefined;
|
|
9
|
+
const header = report.header;
|
|
10
|
+
return "glibcVersionRuntime" in header && typeof header.glibcVersionRuntime === "string"
|
|
11
|
+
? header.glibcVersionRuntime : undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Reject unshipped platforms and incompatible Linux ABIs before creating device state. */
|
|
14
|
+
export function bundledExecutable(platform = process.platform, architecture = process.arch, glibc = platform === "linux" ? runtimeGlibc() : undefined, runtimeRoot = fileURLToPath(new URL("../../", import.meta.url))) {
|
|
15
|
+
if (!["x64", "arm64"].includes(architecture) || !["darwin", "linux", "win32"].includes(platform) || (platform === "win32" && architecture !== "x64")) {
|
|
16
|
+
throw new Error("This package supports macOS x64/ARM64, Linux x64/ARM64 GNU and Windows x64; provide a trusted AGENTIM_DAEMON_BIN for other platforms");
|
|
17
|
+
}
|
|
18
|
+
if (platform === "linux") {
|
|
19
|
+
const [major, minor] = (glibc ?? "").split(".").map(Number);
|
|
20
|
+
if (!major || major < 2 || (major === 2 && (!minor || minor < 36))) {
|
|
21
|
+
throw new Error("The Linux core requires GNU glibc 2.36 or newer; Alpine/musl is not supported");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
let resources;
|
|
25
|
+
try {
|
|
26
|
+
resources = createRequire(resolve(runtimeRoot, "package.json")).resolve("@agentims/runtime-assets");
|
|
27
|
+
const asset = JSON.parse(readFileSync(resources, "utf8"));
|
|
28
|
+
const own = JSON.parse(readFileSync(resolve(runtimeRoot, "package.json"), "utf8"));
|
|
29
|
+
if (!asset || typeof asset !== "object" || !("name" in asset) || asset.name !== "@agentims/runtime-assets"
|
|
30
|
+
|| !("version" in asset) || !own || typeof own !== "object" || !("version" in own) || asset.version !== own.version) {
|
|
31
|
+
throw new Error("Native runtime resource version differs");
|
|
32
|
+
}
|
|
33
|
+
if ("optionalDependencies" in asset) {
|
|
34
|
+
const name = `@agentims/native-core-${platform}-${architecture}`, dependencies = asset.optionalDependencies;
|
|
35
|
+
if (!dependencies || typeof dependencies !== "object" || !(name in dependencies))
|
|
36
|
+
throw new Error("Platform resource dependency is missing");
|
|
37
|
+
const load = createRequire(resources), filename = load.resolve(name);
|
|
38
|
+
const native = JSON.parse(readFileSync(filename, "utf8"));
|
|
39
|
+
if (!native || typeof native !== "object" || !("name" in native) || native.name !== name
|
|
40
|
+
|| !("version" in native) || native.version !== dependencies[name])
|
|
41
|
+
throw new Error("Platform resource version differs");
|
|
42
|
+
return load.resolve(name + "/core");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
throw new Error("Native runtime resources are missing or incompatible; reinstall @agentims/runtime with its dependencies");
|
|
47
|
+
}
|
|
48
|
+
return resolve(dirname(resources), `bin/${platform}-${architecture}/agentim-daemon${platform === "win32" ? ".exe" : ""}`);
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { isDeepStrictEqual } from "node:util";
|
|
3
|
+
import { parseAgentIMJSON, validateNativeClientSettings } from "@agentims/sdk";
|
|
4
|
+
import { privateText } from "./private-state.js";
|
|
5
|
+
/** Explicit current-user policy file. No environment or file is read at import time. */
|
|
6
|
+
export async function readNativeSettings(filename) {
|
|
7
|
+
const value = parseAgentIMJSON(await privateText(resolve(filename), 131072));
|
|
8
|
+
return validateNativeClientSettings(value);
|
|
9
|
+
}
|
|
10
|
+
/** Compare supplied overrides without exposing their proxy credentials in diagnostics. */
|
|
11
|
+
export function sameNativeSettings(left, right) {
|
|
12
|
+
return isDeepStrictEqual(JSON.parse(JSON.stringify(left ?? {})), JSON.parse(JSON.stringify(right ?? {})));
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Security baseline for explicit runtime operations; importing/help remains side-effect free. */
|
|
2
|
+
export function assertRuntimeNode(version = process.versions.node) {
|
|
3
|
+
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(version);
|
|
4
|
+
const [major, minor, patch] = match ? match.slice(1).map(Number) : [];
|
|
5
|
+
if (major !== 24 || minor === undefined || patch === undefined || minor < 22 || (minor === 22 && patch < 2)) {
|
|
6
|
+
throw new Error("AgentIM runtime requires Node 24.22.2 or newer in the 24.x line; update Node and keep the existing account/device state");
|
|
7
|
+
}
|
|
8
|
+
}
|