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,39 @@
|
|
|
1
|
+
import { readdir } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { privateText, assertPrivateDirectory } from "../configuration/private-state.js";
|
|
4
|
+
const phases = ["prepared", "starting", "exchanging", "unknown", "awaiting_authorization", "grant_received", "committed", "restart_required", "registered", "rejected", "identity_conflict", "revoking", "revocation_unknown", "cancelled", "completed", "expired", "interrupted", "display_qr", "show_check_code", "enter_check_code", "waiting_for_authorization", "waiting_for_token", "syncing_secrets"];
|
|
5
|
+
function object(value) { return !!value && typeof value === "object" && !Array.isArray(value); }
|
|
6
|
+
/** Safe metadata only; never expose challenge URLs, QR secrets, tokens, proofs or authorization input. */
|
|
7
|
+
export async function authorizationJournals(state, home) {
|
|
8
|
+
const device = join(state, "device");
|
|
9
|
+
const result = [];
|
|
10
|
+
async function scan(directory, kind, selected) {
|
|
11
|
+
let names;
|
|
12
|
+
try {
|
|
13
|
+
await assertPrivateDirectory(directory);
|
|
14
|
+
names = await readdir(directory);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (error.code === "ENOENT")
|
|
18
|
+
return;
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
for (const name of names.filter(selected).sort()) {
|
|
22
|
+
if (result.length >= 3000)
|
|
23
|
+
throw new Error("Authentication history exceeds its inspection budget; preserve the original state");
|
|
24
|
+
const value = JSON.parse(await privateText(join(directory, name), 131072));
|
|
25
|
+
if (!object(value) || value.homeserver !== home)
|
|
26
|
+
throw new Error("Original authentication journal binding differs");
|
|
27
|
+
const data = kind === "qr" ? value.status : value;
|
|
28
|
+
const id = kind === "qr" || kind === "oauth" ? object(value.options) ? value.options.flow_id : undefined : value.request_id;
|
|
29
|
+
const phase = object(data) ? data.phase : undefined;
|
|
30
|
+
if (typeof id !== "string" || !/^[A-Za-z0-9._:-]{1,128}$/.test(id) || typeof phase !== "string" || !phases.includes(phase))
|
|
31
|
+
throw new Error("Invalid private authentication journal");
|
|
32
|
+
result.push({ kind, id, recordedPhase: phase, observation: "private_journal" });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
await scan(device, "matrix", name => /^matrix-auth-[a-f0-9]{64}\.json$/.test(name));
|
|
36
|
+
await scan(device, "qr", name => /^qr-[a-f0-9]{64}\.json$/.test(name));
|
|
37
|
+
await scan(join(device, "oauth-flows"), "oauth", name => /^[a-f0-9]{64}\.json$/.test(name));
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { serviceOrigin } from "../configuration/service-origin.js";
|
|
2
|
+
import { AccountAccessError } from "../accounts/errors.js";
|
|
3
|
+
/** Read-only pinned discovery; no daemon, registration or browser required. */
|
|
4
|
+
export async function discoverAgentLoginMethods(options) {
|
|
5
|
+
const homeserver = await serviceOrigin(options.homeserverUrl, options.siteUrl);
|
|
6
|
+
try {
|
|
7
|
+
const response = await fetch(`${homeserver}/_matrix/client/v3/login`, { redirect: "error", credentials: "omit", signal: AbortSignal.timeout(10000), headers: { accept: "application/json" } });
|
|
8
|
+
if (!response.ok || response.headers.get("content-type")?.split(";")[0] !== "application/json")
|
|
9
|
+
throw new Error();
|
|
10
|
+
const reader = response.body?.getReader();
|
|
11
|
+
if (!reader)
|
|
12
|
+
throw new Error();
|
|
13
|
+
const chunks = [];
|
|
14
|
+
let size = 0;
|
|
15
|
+
try {
|
|
16
|
+
while (true) {
|
|
17
|
+
const { done, value } = await reader.read();
|
|
18
|
+
if (done)
|
|
19
|
+
break;
|
|
20
|
+
size += value.length;
|
|
21
|
+
if (size > 32768)
|
|
22
|
+
throw new Error();
|
|
23
|
+
chunks.push(value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
finally {
|
|
27
|
+
await reader.cancel();
|
|
28
|
+
reader.releaseLock();
|
|
29
|
+
}
|
|
30
|
+
const value = JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
31
|
+
if (!value || typeof value !== "object" || !("flows" in value) || !Array.isArray(value.flows) || value.flows.length > 100)
|
|
32
|
+
throw new Error();
|
|
33
|
+
const flows = value.flows;
|
|
34
|
+
const allowed = (kind) => flows.some(item => !!item && typeof item === "object" && "type" in item && item.type === kind);
|
|
35
|
+
const matrixLoginTypes = flows.flatMap(item => item && typeof item === "object" && "type" in item && typeof item.type === "string" && item.type.length <= 255 ? [item.type] : []);
|
|
36
|
+
return { homeserver, password: allowed("m.login.password"), credential: allowed("org.agentim.login.credential"), token: allowed("m.login.token"), sso: allowed("m.login.sso"), matrixLoginTypes,
|
|
37
|
+
passwordInput: ["SDK password parameter", "CLI --password-file", "CLI --password-stdin"], nextAction: "choose_login_method" };
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
throw new AccountAccessError("AUTH_DISCOVERY_UNAVAILABLE", "Could not discover authentication methods from the selected service", "check_service_and_retry", 1);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { selectAccount } from "../accounts/selection.js";
|
|
3
|
+
import { serviceOrigin } from "../configuration/service-origin.js";
|
|
4
|
+
import { AccountAccessError } from "../accounts/errors.js";
|
|
5
|
+
/** Explicit account or private pre-authentication store; no implicit identity admission. */
|
|
6
|
+
export async function authorizationSelection(options) {
|
|
7
|
+
if (options.agentId || options.credentialFile) {
|
|
8
|
+
const selected = await selectAccount(options, false, "operation");
|
|
9
|
+
return { env: selected.env, stateDir: selected.account.stateDir, homeserver: selected.account.homeserver, credentialExists: selected.credentialExists };
|
|
10
|
+
}
|
|
11
|
+
if (!options.stateDir)
|
|
12
|
+
throw new AccountAccessError("AUTH_STATE_REQUIRED", "Choose an account or an explicit private --state-dir for authentication", "select_original_authentication_store");
|
|
13
|
+
const home = await serviceOrigin(options.homeserverUrl, options.siteUrl);
|
|
14
|
+
const stateDir = resolve(options.stateDir);
|
|
15
|
+
return { env: { AGENTIM_HOMESERVER_URL: home, AGENTIM_STATE_DIR: stateDir,
|
|
16
|
+
...(options.nativeSettingsFile ? { AGENTIM_NATIVE_SETTINGS_FILE: resolve(options.nativeSettingsFile) } : {}),
|
|
17
|
+
...(options.daemonPath ? { AGENTIM_DAEMON_BIN: options.daemonPath } : {}),
|
|
18
|
+
...(options.startupTimeoutMs === undefined ? {} : { AGENTIM_STARTUP_TIMEOUT_MS: String(options.startupTimeoutMs) }) },
|
|
19
|
+
stateDir, homeserver: home, credentialExists: false };
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { lstat } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { authorizationSelection } from "./selection.js";
|
|
4
|
+
import { authorizationJournals } from "./journals.js";
|
|
5
|
+
import { communicationStatusFromEnv } from "../lifecycle/communication.js";
|
|
6
|
+
import { privateText } from "../configuration/private-state.js";
|
|
7
|
+
/** Whitelisted offline attempt metadata; never read or expose stored access tokens. */
|
|
8
|
+
export async function agentAuthenticationStatus(options) {
|
|
9
|
+
const selected = await authorizationSelection(options);
|
|
10
|
+
const status = await communicationStatusFromEnv(selected.env);
|
|
11
|
+
let savedDevice = false;
|
|
12
|
+
let attempt;
|
|
13
|
+
try {
|
|
14
|
+
savedDevice = (await lstat(join(selected.stateDir, "device/session.json"))).isFile();
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (error.code !== "ENOENT")
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const value = JSON.parse(await privateText(join(selected.stateDir, "device/device-login.json"), 32768));
|
|
22
|
+
if (!value || typeof value !== "object" || !("state" in value) || !("mode" in value) || !("device_id" in value)
|
|
23
|
+
|| !("homeserver" in value) || value.homeserver !== selected.homeserver
|
|
24
|
+
|| typeof value.state !== "string" || !["pending", "unknown", "session_saved", "completed"].includes(value.state)
|
|
25
|
+
|| typeof value.mode !== "string" || !["password", "credential", "token"].includes(value.mode)
|
|
26
|
+
|| typeof value.device_id !== "string" || !/^[A-Za-z0-9_-]{1,255}$/.test(value.device_id))
|
|
27
|
+
throw new Error("Invalid private authentication journal");
|
|
28
|
+
attempt = { state: value.state, method: value.mode, deviceId: value.device_id,
|
|
29
|
+
nextAction: value.state === "completed" ? "login_existing_account" : "preserve_state_and_retry_same_device" };
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error.code !== "ENOENT")
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
const authorizations = await authorizationJournals(selected.stateDir, selected.homeserver);
|
|
36
|
+
const unresolved = authorizations.some(flow => !["committed", "registered", "rejected", "cancelled", "completed", "expired"].includes(flow.recordedPhase));
|
|
37
|
+
return { status, savedDevice, ...(attempt ? { attempt } : {}), authorizations,
|
|
38
|
+
authentication: status.userId || savedDevice ? "saved_device" : "not_signed_in",
|
|
39
|
+
nextAction: unresolved ? "inspect_original_authorization_on_same_owner" : status.online ? "use_existing_communication" : attempt?.state === "unknown" ? "inspect_device_login_status" : savedDevice ? "login_existing_account" : "choose_login_method",
|
|
40
|
+
passwordStored: false, credentialAvailable: selected.credentialExists,
|
|
41
|
+
historyRecovery: "separate_from_login", businessExecution: "requires_explicit_agent_policy" };
|
|
42
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { registerAgentAccount } from "../accounts/register.js";
|
|
2
|
+
import { loginAgentAccount } from "../accounts/login.js";
|
|
3
|
+
import { replaceAgentCredential, ensureAgentCredential } from "../accounts/credential-lifecycle.js";
|
|
4
|
+
import { selectAccount, prepareAccount } from "../accounts/selection.js";
|
|
5
|
+
import { foregroundAgentFromEnv } from "../lifecycle/foreground.js";
|
|
6
|
+
import { CliError } from "./errors.js";
|
|
7
|
+
import { readPassword } from "./password-input.js";
|
|
8
|
+
import { selectPasswordAccount } from "../accounts/password.js";
|
|
9
|
+
export function accountOptions(args, env) {
|
|
10
|
+
const agentId = args.account ?? env.AGENTIM_AGENT_ID;
|
|
11
|
+
const homeserverUrl = args.home ?? (args.site ? undefined : env.AGENTIM_HOMESERVER_URL);
|
|
12
|
+
const siteUrl = args.site ?? (args.home ? undefined : env.AGENTIM_SITE_URL);
|
|
13
|
+
const stateDir = args.stateDir ?? env.AGENTIM_STATE_DIR;
|
|
14
|
+
const credentialFile = args.credentialFile ?? env.AGENTIM_CREDENTIAL_FILE;
|
|
15
|
+
return {
|
|
16
|
+
...(agentId ? { agentId } : {}),
|
|
17
|
+
...(homeserverUrl ? { homeserverUrl } : {}),
|
|
18
|
+
...(siteUrl ? { siteUrl } : {}),
|
|
19
|
+
...(stateDir ? { stateDir } : {}),
|
|
20
|
+
...(credentialFile ? { credentialFile } : {}),
|
|
21
|
+
...(args.nativeSettingsFile ?? env.AGENTIM_NATIVE_SETTINGS_FILE ? { nativeSettingsFile: args.nativeSettingsFile ?? env.AGENTIM_NATIVE_SETTINGS_FILE } : {}),
|
|
22
|
+
...(env.AGENTIM_STARTUP_TIMEOUT_MS === undefined ? {} : { startupTimeoutMs: Number(env.AGENTIM_STARTUP_TIMEOUT_MS) }),
|
|
23
|
+
...(env.AGENTIM_DAEMON_BIN ? { daemonPath: env.AGENTIM_DAEMON_BIN } : {}),
|
|
24
|
+
...(env.AGENTIM_ACCOUNTS_DIR ? { accountsDirectory: env.AGENTIM_ACCOUNTS_DIR } : {}),
|
|
25
|
+
...(env.AGENTIM_DEVICES_DIR ? { devicesDirectory: env.AGENTIM_DEVICES_DIR } : {}),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Account commands are explicit and never infer a new registration after login fails. */
|
|
29
|
+
export async function accountCommand(args, env) {
|
|
30
|
+
const options = accountOptions(args, env);
|
|
31
|
+
const password = await readPassword(args.passwordFile, args.passwordStdin);
|
|
32
|
+
if (password !== undefined) {
|
|
33
|
+
if (options.credentialFile || env.AGENTIM_AUTHORIZATION_FILE || env.AGENTIM_ADMISSION_FILE)
|
|
34
|
+
throw new CliError("AUTH_METHOD_CONFLICT", "Choose password or credential/authorization login");
|
|
35
|
+
if (args.foreground) {
|
|
36
|
+
const selected = await selectPasswordAccount({ ...options, password });
|
|
37
|
+
await prepareAccount(selected.selection);
|
|
38
|
+
return foregroundAgentFromEnv(selected.selection.env, selected.selection.account, selected.authentication);
|
|
39
|
+
}
|
|
40
|
+
const connection = await loginAgentAccount({ ...options, password });
|
|
41
|
+
try {
|
|
42
|
+
return { ...connection.account, mode: connection.mode, authentication: { method: "password", passwordStored: false, nextAction: "use_existing_communication" }, status: await connection.client.identity.status() };
|
|
43
|
+
}
|
|
44
|
+
finally {
|
|
45
|
+
await connection.close();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (args.command === "credentials ensure")
|
|
49
|
+
return ensureAgentCredential(options);
|
|
50
|
+
if (args.command === "credentials replace") {
|
|
51
|
+
if (!options.credentialFile)
|
|
52
|
+
throw new CliError("CREDENTIAL_FILE_REQUIRED", "Replacement requires --credential-file with the new private account file");
|
|
53
|
+
return replaceAgentCredential({ ...options, credentialFile: options.credentialFile });
|
|
54
|
+
}
|
|
55
|
+
if (args.command === "register") {
|
|
56
|
+
if (!options.agentId)
|
|
57
|
+
throw new CliError("ACCOUNT_REQUIRED", "Registration requires --account <Agent ID>");
|
|
58
|
+
return registerAgentAccount({ ...options, agentId: options.agentId });
|
|
59
|
+
}
|
|
60
|
+
if (args.foreground) {
|
|
61
|
+
const selected = await selectAccount(options);
|
|
62
|
+
await prepareAccount(selected);
|
|
63
|
+
return foregroundAgentFromEnv(selected.env, selected.account);
|
|
64
|
+
}
|
|
65
|
+
const connection = await loginAgentAccount(options);
|
|
66
|
+
try {
|
|
67
|
+
return { ...connection.account, mode: connection.mode, status: await connection.client.identity.status() };
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
await connection.close();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { commands } from "./commands/catalog.js";
|
|
2
|
+
import { commandNames } from "./command-names.js";
|
|
3
|
+
import { CliError } from "./errors.js";
|
|
4
|
+
export function parseArguments(argv) {
|
|
5
|
+
const words = [];
|
|
6
|
+
const flags = new Map();
|
|
7
|
+
let help = argv.length === 0;
|
|
8
|
+
const args = [...argv];
|
|
9
|
+
if (args[0] === "help") {
|
|
10
|
+
help = true;
|
|
11
|
+
args.shift();
|
|
12
|
+
}
|
|
13
|
+
while (args.length) {
|
|
14
|
+
const token = args.shift();
|
|
15
|
+
if (!token.startsWith("--")) {
|
|
16
|
+
if (flags.size || token.startsWith("-"))
|
|
17
|
+
throw usage();
|
|
18
|
+
words.push(token);
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (flags.has(token) || !["--help", "--json", "--input", "--file", "--output", "--timeout-ms", "--credential-file", "--authorization-file", "--account", "--home", "--site", "--state-dir", "--foreground", "--recovery-key-file", "--compact", "--password-file", "--password-stdin", "--native-settings-file"].includes(token))
|
|
22
|
+
throw usage();
|
|
23
|
+
if (token === "--help" || token === "--json" || token === "--foreground" || token === "--compact" || token === "--password-stdin") {
|
|
24
|
+
flags.set(token, "true");
|
|
25
|
+
if (token === "--help")
|
|
26
|
+
help = true;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const value = args.shift();
|
|
30
|
+
if (!value || value.startsWith("--"))
|
|
31
|
+
throw usage();
|
|
32
|
+
flags.set(token, value);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const command = words.join(" ");
|
|
36
|
+
const action = commands.find(value => value.name === command);
|
|
37
|
+
if (["storage archive", "storage branch", "storage migrate", "encryption bundle-export"].includes(command)) {
|
|
38
|
+
if ([...flags.keys()].some(key => !["--help", "--json", "--state-dir", "--output", "--compact"].includes(key)))
|
|
39
|
+
throw usage();
|
|
40
|
+
if (!help && !flags.has("--output"))
|
|
41
|
+
throw new CliError("CLI_OUTPUT_REQUIRED", "Offline archive requires --output <new private directory>");
|
|
42
|
+
if (command !== "storage archive" && flags.has("--compact"))
|
|
43
|
+
throw usage();
|
|
44
|
+
return { command, help, timeoutMs: 45000, foreground: false, compact: flags.has("--compact"),
|
|
45
|
+
...(flags.has("--state-dir") ? { stateDir: flags.get("--state-dir") } : {}),
|
|
46
|
+
...(flags.has("--output") ? { output: flags.get("--output") } : {}) };
|
|
47
|
+
}
|
|
48
|
+
if (flags.has("--compact"))
|
|
49
|
+
throw usage();
|
|
50
|
+
const online = ["encryption online-enable", "encryption online-recover"].includes(command);
|
|
51
|
+
const history = online || ["encryption backup", "encryption restore"].includes(command);
|
|
52
|
+
const management = history || ["register", "login", "credentials replace", "credentials ensure", "connect", "run", "status", "stop"].includes(command);
|
|
53
|
+
if (["auth methods", "auth status", "auth start"].includes(command)) {
|
|
54
|
+
if (flags.has("--home") && flags.has("--site"))
|
|
55
|
+
throw usage();
|
|
56
|
+
if ([...flags.keys()].some(key => !["--help", "--json", ...(help ? [] : selectionFlagsForAuth), ...(command === "auth start" && !help ? ["--foreground", "--native-settings-file"] : [])].includes(key)))
|
|
57
|
+
throw usage();
|
|
58
|
+
return { command, help, timeoutMs: 45000, foreground: flags.has("--foreground"), compact: false,
|
|
59
|
+
...(flags.has("--native-settings-file") ? { nativeSettingsFile: flags.get("--native-settings-file") } : {}),
|
|
60
|
+
...(flags.has("--account") ? { account: flags.get("--account") } : {}),
|
|
61
|
+
...(flags.has("--home") ? { home: flags.get("--home") } : {}),
|
|
62
|
+
...(flags.has("--site") ? { site: flags.get("--site") } : {}),
|
|
63
|
+
...(flags.has("--state-dir") ? { stateDir: flags.get("--state-dir") } : {}) };
|
|
64
|
+
}
|
|
65
|
+
const helpGroup = help && commandNames.some(name => name === command || name.startsWith(command + " "));
|
|
66
|
+
if (!action && !management && !(help && command === "") && !helpGroup)
|
|
67
|
+
throw usage();
|
|
68
|
+
const accountCommand = ["register", "login", "credentials replace", "credentials ensure"].includes(command);
|
|
69
|
+
const nativeOwner = ["register", "login", "connect", "run"].includes(command);
|
|
70
|
+
if (flags.has("--native-settings-file") && (!nativeOwner || help))
|
|
71
|
+
throw usage();
|
|
72
|
+
const login = ["register", "login", "credentials replace", "connect", "run"].includes(command);
|
|
73
|
+
const selectionFlags = ["--account", "--home", "--site", "--state-dir"];
|
|
74
|
+
if (flags.has("--foreground") && (command !== "login" || help))
|
|
75
|
+
throw usage();
|
|
76
|
+
if (flags.has("--home") && flags.has("--site"))
|
|
77
|
+
throw usage();
|
|
78
|
+
if (help && selectionFlags.some(key => flags.has(key)))
|
|
79
|
+
throw usage();
|
|
80
|
+
if (accountCommand && flags.has("--authorization-file"))
|
|
81
|
+
throw usage();
|
|
82
|
+
if (flags.has("--credential-file") && flags.has("--authorization-file"))
|
|
83
|
+
throw usage();
|
|
84
|
+
const password = flags.has("--password-file") || flags.has("--password-stdin");
|
|
85
|
+
if (password && (command !== "login" || help || flags.has("--password-file") && flags.has("--password-stdin") || flags.has("--credential-file") || flags.has("--authorization-file")))
|
|
86
|
+
throw usage();
|
|
87
|
+
if ([...flags.keys()].some(key => ["--credential-file", "--authorization-file"].includes(key) && (!login || help)))
|
|
88
|
+
throw usage();
|
|
89
|
+
if ((help || management) && [...flags.keys()].some(key => !["--help", "--json", ...(!help ? selectionFlags : []), ...(nativeOwner && !help ? ["--native-settings-file"] : []), ...(login && !help ? ["--credential-file", "--authorization-file", ...(command === "login" ? ["--foreground", "--password-file", "--password-stdin"] : [])] : []), ...(history && !help ? ["--recovery-key-file", ...(online ? [] : [command === "encryption backup" ? "--output" : "--file"])] : [])].includes(key)))
|
|
90
|
+
throw usage();
|
|
91
|
+
if (flags.has("--recovery-key-file") && !history)
|
|
92
|
+
throw usage();
|
|
93
|
+
if (flags.has("--file") && !action?.fileInput && command !== "encryption restore")
|
|
94
|
+
throw usage();
|
|
95
|
+
if (flags.has("--output") && !(action?.fileOutput || action?.privateJsonOutput) && command !== "encryption backup")
|
|
96
|
+
throw usage();
|
|
97
|
+
if (history && !help && (!flags.has("--recovery-key-file") || (!online && !flags.has(command === "encryption backup" ? "--output" : "--file"))))
|
|
98
|
+
throw new CliError("CHAT_BACKUP_FILES_REQUIRED", "Use separate private --recovery-key-file and --output (backup) or --file (restore)");
|
|
99
|
+
if (!help && (action?.fileOutput || action?.privateJsonOutput) && !flags.has("--output"))
|
|
100
|
+
throw new CliError("CLI_OUTPUT_REQUIRED", "This command requires --output to save its result privately; existing files are never overwritten");
|
|
101
|
+
const timeout = flags.get("--timeout-ms") ?? "45000";
|
|
102
|
+
if (!/^[0-9]+$/.test(timeout) || !Number.isSafeInteger(Number(timeout)) || Number(timeout) < 100 || Number(timeout) > 120000)
|
|
103
|
+
throw usage();
|
|
104
|
+
return { command, help, timeoutMs: Number(timeout), foreground: flags.has("--foreground"), compact: false,
|
|
105
|
+
...(flags.has("--native-settings-file") ? { nativeSettingsFile: flags.get("--native-settings-file") } : {}),
|
|
106
|
+
...(flags.has("--password-file") ? { passwordFile: flags.get("--password-file") } : {}),
|
|
107
|
+
...(flags.has("--password-stdin") ? { passwordStdin: true } : {}),
|
|
108
|
+
...(flags.has("--account") ? { account: flags.get("--account") } : {}),
|
|
109
|
+
...(flags.has("--home") ? { home: flags.get("--home") } : {}),
|
|
110
|
+
...(flags.has("--site") ? { site: flags.get("--site") } : {}),
|
|
111
|
+
...(flags.has("--state-dir") ? { stateDir: flags.get("--state-dir") } : {}),
|
|
112
|
+
...(flags.has("--recovery-key-file") ? { recoveryKeyFile: flags.get("--recovery-key-file") } : {}),
|
|
113
|
+
...(flags.has("--credential-file") ? { credentialFile: flags.get("--credential-file") } : {}),
|
|
114
|
+
...(flags.has("--authorization-file") ? { authorizationFile: flags.get("--authorization-file") } : {}),
|
|
115
|
+
...(flags.has("--input") ? { input: flags.get("--input") } : {}),
|
|
116
|
+
...(flags.has("--file") ? { file: flags.get("--file") } : {}),
|
|
117
|
+
...(flags.has("--output") ? { output: flags.get("--output") } : {}) };
|
|
118
|
+
}
|
|
119
|
+
function usage() { return new CliError("CLI_USAGE", "Invalid command or flags; run agentim help or agentim help <group> <action>"); }
|
|
120
|
+
const selectionFlagsForAuth = ["--account", "--home", "--site", "--state-dir"];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { discoverAgentLoginMethods } from "../authentication/methods.js";
|
|
2
|
+
import { agentAuthenticationStatus } from "../authentication/status.js";
|
|
3
|
+
import { authorizationSelection } from "../authentication/selection.js";
|
|
4
|
+
import { startAgentAuthorizationFromEnv } from "../managed/control.js";
|
|
5
|
+
import { foregroundAuthorizationFromEnv } from "../lifecycle/foreground.js";
|
|
6
|
+
export async function authenticationCommand(command, options, foreground = false) {
|
|
7
|
+
if (command === "auth methods")
|
|
8
|
+
return discoverAgentLoginMethods(options);
|
|
9
|
+
if (command === "auth start") {
|
|
10
|
+
const selected = await authorizationSelection(options);
|
|
11
|
+
if (foreground)
|
|
12
|
+
return foregroundAuthorizationFromEnv(selected.env);
|
|
13
|
+
const owner = await startAgentAuthorizationFromEnv(selected.env);
|
|
14
|
+
try {
|
|
15
|
+
return { authenticationOwner: true, status: await owner.client.identity.status(), nextAction: "continue_original_native_authorization", stateDir: selected.stateDir };
|
|
16
|
+
}
|
|
17
|
+
finally {
|
|
18
|
+
await owner.close();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return agentAuthenticationStatus(options);
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { commands } from "./commands/catalog.js";
|
|
2
|
+
/** Shared names for offline help; availability and authorization remain runtime checks. */
|
|
3
|
+
export const commandNames = [
|
|
4
|
+
"version", "update configure", "update check", "update plan", "update apply", "update status", "update watch",
|
|
5
|
+
"auth methods", "auth status", "auth start", "storage archive", "storage branch", "storage migrate", "encryption bundle-export",
|
|
6
|
+
"register", "login", "credentials replace", "credentials ensure", "encryption backup",
|
|
7
|
+
"encryption restore", "encryption online-enable", "encryption online-recover", "connect", "run", "status", "stop",
|
|
8
|
+
...commands.map(value => value.name),
|
|
9
|
+
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { body, path } from "./definition.js";
|
|
2
|
+
export const accountAuthorization = [
|
|
3
|
+
{ name: "matrix openid", operation: "requestMatrixOpenId", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.openId(body(r), o) },
|
|
4
|
+
{ name: "matrix account-password", operation: "changeMatrixPassword", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.changePassword(body(r), o) },
|
|
5
|
+
{ name: "matrix account-deactivate", operation: "deactivateMatrixAccount", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.deactivate(body(r), o) },
|
|
6
|
+
{ name: "matrix account-third-party-ids", operation: "readMatrixThirdPartyIds", privateJsonOutput: true, invoke: (c, r, o) => c.account.thirdPartyIds(o) },
|
|
7
|
+
{ name: "matrix account-validate-email", operation: "requestMatrixEmailValidation", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.validateEmail(body(r), o) },
|
|
8
|
+
{ name: "matrix account-validate-phone", operation: "requestMatrixPhoneValidation", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.validatePhone(body(r), o) },
|
|
9
|
+
{ name: "matrix account-third-party-add", operation: "addMatrixThirdPartyId", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.account.addThirdPartyId(body(r), o) },
|
|
10
|
+
{ name: "matrix account-third-party-delete", operation: "deleteMatrixThirdPartyId", stableRequestId: true, invoke: (c, r, o) => c.account.deleteThirdPartyId(body(r), o) },
|
|
11
|
+
{ name: "operations cancel-authorization", operation: "cancelNativeAuthorization", invoke: (c, r, o) => c.operations.cancelAuthorization(path(r, "request_id"), o) },
|
|
12
|
+
];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const cacheInspection = [
|
|
3
|
+
{ name: "rooms report", operation: "reportMatrixContent", stableRequestId: true, invoke: (c, r, o) => c.conversations.management.report(body(r), o) },
|
|
4
|
+
{ name: "rooms sticky-events", operation: "readMatrixStickyEvents", invoke: (c, r, o) => c.conversations.management.stickyEvents(body(r), o) },
|
|
5
|
+
{ name: "account cached-data", operation: "readMatrixCachedGlobalData", invoke: (c, r, o) => c.account.cachedData(body(r), o) },
|
|
6
|
+
{ name: "matrix reset-cache", operation: "resetMatrixDiscoveryCache", stableRequestId: true, invoke: (c, r, o) => c.directory.resetCache(body(r), o) },
|
|
7
|
+
{ name: "notifications evaluate", operation: "evaluateMatrixPushActions", invoke: (c, r, o) => c.notifications.evaluate(body(r), o) },
|
|
8
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const cache = [
|
|
3
|
+
{ name: "matrix cache-retry-decryption", operation: "retryMatrixCacheDecryption", stableRequestId: true, invoke: (c, r, o) => c.cache.retryDecryption(body(r), o) },
|
|
4
|
+
{ name: "matrix cache-decryption-report", operation: "readMatrixCacheDecryptionReport", invoke: (c, r, o) => c.cache.decryptionReport(body(r), o) },
|
|
5
|
+
{ name: "matrix cache-page-events", operation: "readMatrixCachePageEvents", invoke: (c, r, o) => c.cache.pageEvents(body(r), o) },
|
|
6
|
+
{ name: "matrix cache-status", operation: "readMatrixCacheStatus", invoke: (c, r, o) => c.cache.status(o) },
|
|
7
|
+
{ name: "matrix cache-open", operation: "openMatrixCacheView", stableRequestId: true, invoke: (c, r, o) => c.cache.open(body(r), o) },
|
|
8
|
+
{ name: "matrix cache-snapshot", operation: "readMatrixCacheSnapshot", invoke: (c, r, o) => c.cache.snapshot(body(r), o) },
|
|
9
|
+
{ name: "matrix cache-paginate", operation: "paginateMatrixCache", stableRequestId: true, invoke: (c, r, o) => c.cache.paginate(body(r), o) },
|
|
10
|
+
{ name: "matrix cache-close", operation: "closeMatrixCacheView", stableRequestId: true, invoke: (c, r, o) => c.cache.close(body(r), o) },
|
|
11
|
+
{ name: "matrix cache-clear", operation: "clearMatrixCache", stableRequestId: true, invoke: (c, r, o) => c.cache.clear(body(r), o) },
|
|
12
|
+
{ name: "matrix cache-lookup", operation: "readMatrixCachedEvent", invoke: (c, r, o) => c.cache.lookup(body(r), o) },
|
|
13
|
+
{ name: "matrix cache-configure", operation: "configureMatrixCache", stableRequestId: true, invoke: (c, r, o) => c.cache.configure(body(r), o) },
|
|
14
|
+
];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cacheInspection } from "./cache-inspection.js";
|
|
2
|
+
import { nativeInspection } from "./native-inspection.js";
|
|
3
|
+
import { location } from "./location.js";
|
|
4
|
+
import { rtc } from "./rtc.js";
|
|
5
|
+
import { roomManagement } from "./room-management.js";
|
|
6
|
+
import { drafts } from "./drafts.js";
|
|
7
|
+
import { search } from "./search.js";
|
|
8
|
+
import { cache } from "./cache.js";
|
|
9
|
+
import { encryptionDehydration } from "./encryption-dehydration.js";
|
|
10
|
+
import { encryptionReset } from "./encryption-reset.js";
|
|
11
|
+
import { encryptionRecovery } from "./encryption-recovery.js";
|
|
12
|
+
import { encryptionSecrets } from "./encryption-secrets.js";
|
|
13
|
+
import { matrixIdentity } from "./matrix-identity.js";
|
|
14
|
+
import { accountAuthorization } from "./account-authorization.js";
|
|
15
|
+
import { nativePreferences } from "./native-preferences.js";
|
|
16
|
+
import { media } from "./media.js";
|
|
17
|
+
import { matrixRooms } from "./matrix-rooms.js";
|
|
18
|
+
import { nativeRequests } from "./native-requests.js";
|
|
19
|
+
import { qrAuthorization } from "./qr-authorization.js";
|
|
20
|
+
import { syncQr } from "./sync-qr.js";
|
|
21
|
+
import { oauth } from "./oauth.js";
|
|
22
|
+
import { matrixCapabilities } from "./matrix-capabilities.js";
|
|
23
|
+
import { timelineNative } from "./timeline-native.js";
|
|
24
|
+
import { devicesNative } from "./devices-native.js";
|
|
25
|
+
import { verificationNative } from "./verification-native.js";
|
|
26
|
+
import { messagesNative } from "./messages-native.js";
|
|
27
|
+
import { encryptionNative } from "./encryption-native.js";
|
|
28
|
+
import { deliveriesNative } from "./deliveries-native.js";
|
|
29
|
+
import { encryption } from "./encryption.js";
|
|
30
|
+
import { contacts } from "./contacts.js";
|
|
31
|
+
import { conversations } from "./conversations.js";
|
|
32
|
+
import { deliveries } from "./deliveries.js";
|
|
33
|
+
import { identity } from "./identity.js";
|
|
34
|
+
import { messages } from "./messages.js";
|
|
35
|
+
import { outbox } from "./outbox.js";
|
|
36
|
+
import { pairing } from "./pairing.js";
|
|
37
|
+
import { reliability } from "./reliability.js";
|
|
38
|
+
import { profiles } from "./profiles.js";
|
|
39
|
+
import { discovery } from "./discovery.js";
|
|
40
|
+
export const commands = [...cacheInspection, ...nativeInspection, ...location, ...rtc, ...roomManagement, ...drafts, ...search, ...cache, ...encryptionDehydration, ...encryptionReset, ...encryptionRecovery, ...encryptionSecrets, ...matrixIdentity, ...accountAuthorization, ...nativePreferences, ...media, ...matrixRooms, ...nativeRequests, ...qrAuthorization, ...syncQr, ...oauth, ...matrixCapabilities, ...timelineNative, ...devicesNative, ...verificationNative, ...messagesNative, ...encryptionNative, ...deliveriesNative, ...identity, ...encryption, ...profiles, ...discovery, ...contacts, ...conversations, ...messages, ...deliveries, ...outbox, ...pairing, ...reliability];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { body, path, query } from "./definition.js";
|
|
2
|
+
export const contacts = [
|
|
3
|
+
{ name: "contacts list", operation: "localListContacts", invoke: (c, r, o) => c.contacts.list(query(r), o) },
|
|
4
|
+
{ name: "contacts action", operation: "localContactAction", invoke: (c, r, o) => c.contacts.action(path(r, "user_id"), body(r), o) },
|
|
5
|
+
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { body, path, query } from "./definition.js";
|
|
2
|
+
export const conversations = [
|
|
3
|
+
{ name: "conversations list", operation: "localListConversations", invoke: (c, r, o) => c.conversations.list(query(r), o) },
|
|
4
|
+
{ name: "conversations get", operation: "localGetConversation", invoke: (c, r, o) => c.conversations.get(path(r, "room_id"), o) },
|
|
5
|
+
{ name: "conversations invitation", operation: "localDecideInvitation", invoke: (c, r, o) => c.conversations.decideInvitation(path(r, "room_id"), body(r), o) },
|
|
6
|
+
{ name: "conversations creation-status", operation: "localConversationCreationStatus", invoke: (c, r, o) => c.conversations.creationStatus(path(r, "request_id"), o) },
|
|
7
|
+
{ name: "conversations create", operation: "createEncryptedConversation", stableRequestId: true, invoke: (c, r, o) => c.conversations.create(body(r), o) },
|
|
8
|
+
{ name: "conversations direct", operation: "localDirectConversation", invoke: (c, r, o) => c.conversations.direct(body(r), o) },
|
|
9
|
+
{ name: "conversations join", operation: "joinConversation", emptyBody: true, invoke: (c, r, o) => c.conversations.join(path(r, "room_id"), o) },
|
|
10
|
+
{ name: "conversations members", operation: "localMembersConversation", invoke: (c, r, o) => c.conversations.members(path(r, "room_id"), o) },
|
|
11
|
+
{ name: "conversations invite", operation: "localInviteConversation", invoke: (c, r, o) => c.conversations.invite(path(r, "room_id"), body(r), o) },
|
|
12
|
+
{ name: "conversations kick", operation: "localKickConversation", invoke: (c, r, o) => c.conversations.kick(path(r, "room_id"), body(r), o) },
|
|
13
|
+
{ name: "conversations power", operation: "localPowerConversation", invoke: (c, r, o) => c.conversations.setPower(path(r, "room_id"), body(r), o) },
|
|
14
|
+
{ name: "conversations leave", operation: "localLeaveConversation", emptyBody: true, invoke: (c, r, o) => c.conversations.leave(path(r, "room_id"), o) },
|
|
15
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Only called after validateLocalRequest has checked the command's canonical operation. */
|
|
2
|
+
export function body(input) { return input.body; }
|
|
3
|
+
export function query(input) { return (input.query ?? {}); }
|
|
4
|
+
export function path(input, name) {
|
|
5
|
+
const value = input.path?.[name];
|
|
6
|
+
if (typeof value !== "string")
|
|
7
|
+
throw new Error("Validated path parameter missing");
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { body, path } from "./definition.js";
|
|
2
|
+
export const deliveriesNative = [
|
|
3
|
+
{ name: "deliveries get", operation: "readDeliveryStatus", invoke: (c, r, o) => c.deliveries.get(path(r, "event_id"), o) },
|
|
4
|
+
{ name: "deliveries boundary", operation: "getDeliveryBoundary", invoke: (c, _r, o) => c.deliveries.boundary(o) },
|
|
5
|
+
{ name: "deliveries set-boundary", operation: "setDeliveryBoundary", invoke: (c, r, o) => c.deliveries.setBoundary(body(r), o) },
|
|
6
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { body, path } from "./definition.js";
|
|
2
|
+
export const deliveries = [
|
|
3
|
+
{ name: "deliveries claim", operation: "claimDeliveries", invoke: (c, r, o) => c.deliveries.claim(body(r), o) },
|
|
4
|
+
{ name: "deliveries ack", operation: "acknowledgeDelivery", invoke: (c, r, o) => c.deliveries.ack(path(r, "event_id"), body(r), o) },
|
|
5
|
+
{ name: "deliveries release", operation: "releaseDelivery", invoke: (c, r, o) => c.deliveries.release(path(r, "event_id"), body(r), o) },
|
|
6
|
+
{ name: "deliveries renew", operation: "renewDelivery", invoke: (c, r, o) => c.deliveries.renew(path(r, "event_id"), body(r), o) },
|
|
7
|
+
{ name: "deliveries reply", operation: "replyToDelivery", invoke: (c, r, o) => c.deliveries.reply(path(r, "event_id"), body(r), o) },
|
|
8
|
+
{ name: "deliveries reply-file", operation: "replyFileToDelivery", fileInput: true,
|
|
9
|
+
invoke: (c, r, o) => c.deliveries.replyFile(path(r, "event_id"), body(r), o) },
|
|
10
|
+
];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { path, body } from "./definition.js";
|
|
2
|
+
export const devicesNative = [
|
|
3
|
+
{ name: "devices list", operation: "listOwnDevices", invoke: (c, _r, o) => c.devices.list(o) },
|
|
4
|
+
{ name: "devices trust", operation: "listUserDeviceTrust", invoke: (c, r, o) => c.devices.trust(path(r, "user_id"), o) },
|
|
5
|
+
{ name: "devices delete", operation: "deleteDevices", invoke: (c, r, o) => c.devices.delete(body(r), o) },
|
|
6
|
+
{ name: "devices rename", operation: "renameDevice", invoke: (c, r, o) => c.devices.rename(path(r, "device_id"), body(r), o) },
|
|
7
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const drafts = [
|
|
3
|
+
{ name: "matrix draft-read", operation: "readMatrixDraft", privateJsonOutput: true, invoke: (c, r, o) => c.conversations.drafts.read(body(r), o) },
|
|
4
|
+
{ name: "matrix draft-save", operation: "saveMatrixDraft", stableRequestId: true, invoke: (c, r, o) => c.conversations.drafts.save(body(r), o) },
|
|
5
|
+
{ name: "matrix draft-clear", operation: "clearMatrixDraft", stableRequestId: true, invoke: (c, r, o) => c.conversations.drafts.clear(body(r), o) },
|
|
6
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const encryptionDehydration = [
|
|
3
|
+
{ name: "encryption dehydration-status", operation: "readMatrixDehydration", invoke: (c, _r, o) => c.encryption.dehydration.status(o) },
|
|
4
|
+
{ name: "encryption dehydration-key-stored", operation: "readMatrixDehydratedKeyPresence", invoke: (c, r, o) => c.encryption.dehydration.keyPresence(body(r), o) },
|
|
5
|
+
{ name: "encryption dehydration-create", operation: "createMatrixDehydratedDevice", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.create(body(r), o) },
|
|
6
|
+
{ name: "encryption dehydration-rehydrate", operation: "rehydrateMatrixDehydratedDevice", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.rehydrate(body(r), o) },
|
|
7
|
+
{ name: "encryption dehydration-delete", operation: "deleteMatrixDehydratedDevice", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.delete(body(r), o) },
|
|
8
|
+
{ name: "encryption dehydration-key-reset", operation: "resetMatrixDehydratedKey", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.dehydration.resetKey(body(r), o) },
|
|
9
|
+
{ name: "encryption dehydration-start", operation: "startMatrixDehydration", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.start(body(r), o) },
|
|
10
|
+
{ name: "encryption dehydration-stop", operation: "stopMatrixDehydration", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.stop(body(r), o) },
|
|
11
|
+
{ name: "encryption dehydration-rotate", operation: "rotateMatrixDehydration", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.rotate(body(r), o) },
|
|
12
|
+
{ name: "encryption dehydration-reconcile", operation: "reconcileMatrixDehydration", stableRequestId: true, invoke: (c, r, o) => c.encryption.dehydration.reconcile(body(r), o) },
|
|
13
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const encryptionNative = [
|
|
3
|
+
{ name: "encryption signing-status", operation: "getCrossSigning", invoke: (c, _r, o) => c.encryption.crossSigning(o) },
|
|
4
|
+
{ name: "encryption signing-bootstrap", operation: "bootstrapCrossSigning", invoke: (c, r, o) => c.encryption.bootstrapSigning(body(r), o) },
|
|
5
|
+
{ name: "encryption backup-status", operation: "getBackupStatus", invoke: (c, _r, o) => c.encryption.backupStatus(o) },
|
|
6
|
+
{ name: "encryption backup-enable", operation: "enableOnlineBackup", invoke: (c, r, o) => c.encryption.enableBackup(body(r), o) },
|
|
7
|
+
{ name: "encryption backup-recover", operation: "recoverOnlineBackup", invoke: (c, r, o) => c.encryption.recoverBackup(body(r), o) },
|
|
8
|
+
{ name: "encryption backup-wait", operation: "waitOnlineBackup", invoke: (c, r, o) => c.encryption.waitBackup(body(r), o) },
|
|
9
|
+
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const encryptionRecovery = [
|
|
3
|
+
{ name: "encryption recovery-reset", operation: "resetMatrixRecoveryKey", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.resetRecoveryKey(body(r), o) },
|
|
4
|
+
{ name: "encryption recovery-recover-reset", operation: "recoverAndResetMatrixRecoveryKey", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.recoverAndResetKey(body(r), o) },
|
|
5
|
+
{ name: "encryption recovery-fix-backup", operation: "recoverAndFixMatrixBackup", stableRequestId: true, invoke: (c, r, o) => c.encryption.recoverAndFixBackup(body(r), o) },
|
|
6
|
+
{ name: "encryption recovery-disable", operation: "disableMatrixRecovery", stableRequestId: true, invoke: (c, r, o) => c.encryption.disableRecovery(body(r), o) },
|
|
7
|
+
{ name: "encryption key-backup-enable", operation: "enableMatrixKeyBackup", stableRequestId: true, invoke: (c, r, o) => c.encryption.enableKeyBackup(body(r), o) },
|
|
8
|
+
{ name: "encryption key-backup-disable", operation: "disableMatrixKeyBackup", stableRequestId: true, invoke: (c, r, o) => c.encryption.disableKeyBackup(body(r), o) },
|
|
9
|
+
{ name: "encryption key-backup-delete", operation: "deleteMatrixKeyBackup", stableRequestId: true, invoke: (c, r, o) => c.encryption.deleteKeyBackup(body(r), o) },
|
|
10
|
+
{ name: "encryption key-backup-download", operation: "downloadMatrixBackupKeys", stableRequestId: true, invoke: (c, r, o) => c.encryption.downloadBackupKeys(body(r), o) },
|
|
11
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { body, path } from "./definition.js";
|
|
2
|
+
export const encryptionReset = [
|
|
3
|
+
{ name: "encryption signing-reset", operation: "startMatrixCrossSigningReset", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.resetCrossSigning(body(r), o) },
|
|
4
|
+
{ name: "encryption identity-reset", operation: "startMatrixIdentityReset", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.resetIdentity(body(r), o) },
|
|
5
|
+
{ name: "encryption reset-status", operation: "readMatrixCryptoReset", invoke: (c, r, o) => c.encryption.cryptoReset(path(r, "request_id"), o) },
|
|
6
|
+
{ name: "encryption reset-challenge", operation: "readMatrixCryptoResetChallenge", privateJsonOutput: true, invoke: (c, r, o) => c.encryption.cryptoResetChallenge(path(r, "request_id"), o) },
|
|
7
|
+
{ name: "encryption reset-authorize", operation: "authorizeMatrixCryptoReset", privateJsonOutput: true, invoke: (c, r, o) => c.encryption.authorizeCryptoReset(path(r, "request_id"), body(r), o) },
|
|
8
|
+
{ name: "encryption reset-cancel", operation: "cancelMatrixCryptoReset", invoke: (c, r, o) => c.encryption.cancelCryptoReset(path(r, "request_id"), body(r), o) },
|
|
9
|
+
];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { body } from "./definition.js";
|
|
2
|
+
export const encryptionSecrets = [
|
|
3
|
+
{ name: "encryption secret-storage", operation: "readMatrixSecretStorage", invoke: (c, _r, o) => c.encryption.secretStorage(o) },
|
|
4
|
+
{ name: "encryption secret-create", operation: "createMatrixSecretStore", stableRequestId: true, privateJsonOutput: true, invoke: (c, r, o) => c.encryption.createSecretStore(body(r), o) },
|
|
5
|
+
{ name: "encryption secret-read", operation: "readMatrixSecret", privateJsonOutput: true, invoke: (c, r, o) => c.encryption.readSecret(body(r), o) },
|
|
6
|
+
{ name: "encryption secret-write", operation: "writeMatrixSecret", stableRequestId: true, invoke: (c, r, o) => c.encryption.writeSecret(body(r), o) },
|
|
7
|
+
{ name: "encryption secret-import", operation: "importMatrixSecretStore", stableRequestId: true, invoke: (c, r, o) => c.encryption.importSecretStore(body(r), o) },
|
|
8
|
+
{ name: "encryption secret-export", operation: "exportMatrixSecretStore", stableRequestId: true, invoke: (c, r, o) => c.encryption.exportSecretStore(body(r), o) },
|
|
9
|
+
];
|