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,356 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { botHostActionIdentity, botCodexFullBinding, botObject, matchesBotCodexApprovalPolicy, canonicalBotJson, botTargetLocalCaller, } from '@agent-stack/contracts';
|
|
3
|
+
import { BotRuntimeBridgeClient, BotServiceTransport } from '@agent-stack/bridge-client';
|
|
4
|
+
import { codexTargetPermission } from './wire.js';
|
|
5
|
+
import { CodexWindowReceipts } from './window-receipts.js';
|
|
6
|
+
import { NativeComputerGate } from '../../computer/native.js';
|
|
7
|
+
import { LocalTargetReporter } from '../local.js';
|
|
8
|
+
const maxFrame = 8 * 1024 * 1024;
|
|
9
|
+
/** 目标独立核对并续租 Full。授权丢失时关闭原 cgroup,Runtime 无法把断线当成停止。 */
|
|
10
|
+
export class CodexTargetAuthority {
|
|
11
|
+
config;
|
|
12
|
+
process;
|
|
13
|
+
stop;
|
|
14
|
+
frame;
|
|
15
|
+
assertOnlyProcess;
|
|
16
|
+
armLease;
|
|
17
|
+
claim;
|
|
18
|
+
deadline;
|
|
19
|
+
renew;
|
|
20
|
+
bridge;
|
|
21
|
+
receipts;
|
|
22
|
+
computer;
|
|
23
|
+
outputParts = [];
|
|
24
|
+
outputLength = 0;
|
|
25
|
+
local;
|
|
26
|
+
reporter;
|
|
27
|
+
reportTimer;
|
|
28
|
+
constructor(config, process, stop, frame, assertOnlyProcess, journal, armLease) {
|
|
29
|
+
this.config = config;
|
|
30
|
+
this.process = process;
|
|
31
|
+
this.stop = stop;
|
|
32
|
+
this.frame = frame;
|
|
33
|
+
this.assertOnlyProcess = assertOnlyProcess;
|
|
34
|
+
this.armLease = armLease;
|
|
35
|
+
this.computer = new NativeComputerGate(config);
|
|
36
|
+
this.bridge = new BotRuntimeBridgeClient(new BotServiceTransport(config.bridge.url, 3000), config.bridge.runtimeToken);
|
|
37
|
+
this.receipts = new CodexWindowReceipts(config.cgroupRoot, journal, (id, request) => this.call(id, request));
|
|
38
|
+
if (config.localAuthority) {
|
|
39
|
+
if (!journal.local)
|
|
40
|
+
throw new Error('BOT_TARGET_LOCAL_NOT_CONFIGURED');
|
|
41
|
+
journal.local.configure(config.localAuthority);
|
|
42
|
+
this.local = journal.local;
|
|
43
|
+
this.reporter = new LocalTargetReporter({ local: journal.local }, (id, request) => this.call(id, request));
|
|
44
|
+
void this.reporter.flush();
|
|
45
|
+
this.reportTimer = setInterval(() => {
|
|
46
|
+
void this.reporter?.flush();
|
|
47
|
+
}, 1000);
|
|
48
|
+
this.reportTimer.unref();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
call(id, request) {
|
|
52
|
+
return this.bridge.hostExecution(this.config.bridge.project, id, this.config.bridge.credential, request, 2500);
|
|
53
|
+
}
|
|
54
|
+
clear() {
|
|
55
|
+
clearTimeout(this.deadline);
|
|
56
|
+
clearTimeout(this.renew);
|
|
57
|
+
}
|
|
58
|
+
async lease(claim, renew) {
|
|
59
|
+
const started = performance.now();
|
|
60
|
+
if (claim.expiresAt !== undefined && started >= claim.expiresAt)
|
|
61
|
+
throw new Error('BOT_CODEX_FULL_AUTHORITY_LOST');
|
|
62
|
+
const local = this.local;
|
|
63
|
+
if (local && claim.caller)
|
|
64
|
+
local.authorize(claim.caller);
|
|
65
|
+
const value = local
|
|
66
|
+
? {
|
|
67
|
+
actionId: claim.identity.actionId,
|
|
68
|
+
remainingMs: Math.min(3000, Math.floor((claim.localDeadline ?? started) - started)),
|
|
69
|
+
}
|
|
70
|
+
: await this.call(claim.identity.executionId, {
|
|
71
|
+
operation: 'codex-lease',
|
|
72
|
+
identity: claim.identity,
|
|
73
|
+
workspaceRef: this.config.workspaceRef,
|
|
74
|
+
renew,
|
|
75
|
+
process: claim.process,
|
|
76
|
+
startedAtMs: claim.at,
|
|
77
|
+
...(claim.turn ? { nativeTurnRef: claim.turn } : {}),
|
|
78
|
+
});
|
|
79
|
+
if (this.claim !== claim)
|
|
80
|
+
return;
|
|
81
|
+
const now = performance.now(), remaining = value.remainingMs - (now - started);
|
|
82
|
+
if (value.actionId !== claim.identity.actionId ||
|
|
83
|
+
!Number.isSafeInteger(value.remainingMs) ||
|
|
84
|
+
value.remainingMs > 3000 ||
|
|
85
|
+
remaining < 1 ||
|
|
86
|
+
(claim.expiresAt !== undefined && now >= claim.expiresAt))
|
|
87
|
+
throw new Error('BOT_CODEX_FULL_AUTHORITY_LOST');
|
|
88
|
+
if (claim.watcher)
|
|
89
|
+
await claim.watcher.renew(remaining);
|
|
90
|
+
else {
|
|
91
|
+
claim.watcher = await this.armLease(remaining);
|
|
92
|
+
void claim.watcher.done.then((code) => {
|
|
93
|
+
if (code !== 0 && this.claim === claim)
|
|
94
|
+
this.lost();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (this.claim !== claim) {
|
|
98
|
+
claim.watcher.close();
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
claim.expiresAt = started + value.remainingMs;
|
|
102
|
+
this.clear();
|
|
103
|
+
this.deadline = setTimeout(() => this.lost(), Math.max(0, claim.expiresAt - performance.now()));
|
|
104
|
+
this.renew = setTimeout(() => {
|
|
105
|
+
void this.lease(claim, true).catch(() => {
|
|
106
|
+
if (this.claim === claim)
|
|
107
|
+
this.lost();
|
|
108
|
+
});
|
|
109
|
+
}, Math.min(1000, remaining / 2));
|
|
110
|
+
}
|
|
111
|
+
lost() {
|
|
112
|
+
this.clear();
|
|
113
|
+
this.stop.abort(new Error('BOT_CODEX_FULL_AUTHORITY_LOST'));
|
|
114
|
+
}
|
|
115
|
+
/** 新进程必须先对账,运行进程只有确认原 scope 已空后才可提交撤销。 */
|
|
116
|
+
async closed() {
|
|
117
|
+
this.clear();
|
|
118
|
+
const finished = this.claim?.finishing === true;
|
|
119
|
+
const actionId = this.claim?.identity.actionId;
|
|
120
|
+
this.claim?.watcher?.close();
|
|
121
|
+
this.claim = undefined;
|
|
122
|
+
await this.receipts.settle(!finished);
|
|
123
|
+
if (finished && actionId)
|
|
124
|
+
await this.frame({ kind: 'codex-target-full-closed', actionId });
|
|
125
|
+
}
|
|
126
|
+
dispose() {
|
|
127
|
+
this.clear();
|
|
128
|
+
this.claim?.watcher?.close();
|
|
129
|
+
clearInterval(this.reportTimer);
|
|
130
|
+
}
|
|
131
|
+
/** SQLite 关闭前排空既有有界提交,停止后的监督器不保留后台定时器。 */
|
|
132
|
+
async drainReports() {
|
|
133
|
+
clearInterval(this.reportTimer);
|
|
134
|
+
await this.reporter?.close();
|
|
135
|
+
}
|
|
136
|
+
/** 监督端从真正的 Native 通知验证原轮结束和只读回切,客户端回执不能替代它。 */
|
|
137
|
+
observe(bytes) {
|
|
138
|
+
const lines = [];
|
|
139
|
+
for (let offset = 0; offset < bytes.length;) {
|
|
140
|
+
const newline = bytes.indexOf(10, offset);
|
|
141
|
+
const piece = bytes.subarray(offset, newline < 0 ? bytes.length : newline);
|
|
142
|
+
if ((this.outputLength += piece.length) > maxFrame)
|
|
143
|
+
throw new Error('BOT_CODEX_TARGET_FRAME_LIMIT');
|
|
144
|
+
if (piece.length)
|
|
145
|
+
this.outputParts.push(piece);
|
|
146
|
+
if (newline < 0)
|
|
147
|
+
break;
|
|
148
|
+
const line = Buffer.concat(this.outputParts, this.outputLength).toString('utf8');
|
|
149
|
+
lines.push(line + '\n');
|
|
150
|
+
this.outputParts = [];
|
|
151
|
+
this.outputLength = 0;
|
|
152
|
+
offset = newline + 1;
|
|
153
|
+
const claim = this.claim;
|
|
154
|
+
if (!claim)
|
|
155
|
+
continue;
|
|
156
|
+
const event = botObject(JSON.parse(line));
|
|
157
|
+
if (claim.requestId !== undefined && event.id === claim.requestId && event.result) {
|
|
158
|
+
const id = botObject(botObject(event.result).turn).id;
|
|
159
|
+
if (typeof id !== 'string' || (claim.turn && claim.turn !== id))
|
|
160
|
+
this.lost();
|
|
161
|
+
else
|
|
162
|
+
claim.turn = id;
|
|
163
|
+
}
|
|
164
|
+
if (event.id !== undefined ||
|
|
165
|
+
![
|
|
166
|
+
'thread/goal/updated',
|
|
167
|
+
'turn/started',
|
|
168
|
+
'turn/completed',
|
|
169
|
+
'thread/settings/updated',
|
|
170
|
+
].includes(String(event.method)))
|
|
171
|
+
continue;
|
|
172
|
+
const params = botObject(event.params);
|
|
173
|
+
if (params.threadId !== claim.identity.nativeSessionRef)
|
|
174
|
+
continue;
|
|
175
|
+
if (event.method === 'thread/goal/updated' && botObject(params.goal).status === 'active')
|
|
176
|
+
this.lost();
|
|
177
|
+
if (event.method === 'thread/settings/updated' && !claim.sent && claim.fullRequested) {
|
|
178
|
+
const settings = botObject(params.threadSettings);
|
|
179
|
+
claim.full =
|
|
180
|
+
matchesBotCodexApprovalPolicy(settings.approvalPolicy) &&
|
|
181
|
+
botObject(settings.sandboxPolicy).type === 'dangerFullAccess';
|
|
182
|
+
}
|
|
183
|
+
if (!claim.sent)
|
|
184
|
+
continue;
|
|
185
|
+
if (event.method === 'turn/started') {
|
|
186
|
+
const id = botObject(params.turn).id;
|
|
187
|
+
if (typeof id !== 'string' || (claim.turn && claim.turn !== id))
|
|
188
|
+
this.lost();
|
|
189
|
+
else
|
|
190
|
+
claim.turn = id;
|
|
191
|
+
}
|
|
192
|
+
else if (event.method === 'turn/completed' &&
|
|
193
|
+
claim.turn &&
|
|
194
|
+
botObject(params.turn).id === claim.turn) {
|
|
195
|
+
claim.completed = true;
|
|
196
|
+
}
|
|
197
|
+
else if (event.method === 'thread/settings/updated' &&
|
|
198
|
+
claim.completed &&
|
|
199
|
+
claim.readOnlyRequested) {
|
|
200
|
+
const settings = botObject(params.threadSettings);
|
|
201
|
+
const policy = botObject(settings.sandboxPolicy);
|
|
202
|
+
claim.readOnly =
|
|
203
|
+
matchesBotCodexApprovalPolicy(settings.approvalPolicy) &&
|
|
204
|
+
policy.type === 'readOnly' &&
|
|
205
|
+
policy.networkAccess === false;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return lines.join('');
|
|
209
|
+
}
|
|
210
|
+
async forward(line) {
|
|
211
|
+
const raw = botObject(JSON.parse(line));
|
|
212
|
+
if (raw.kind === 'codex-target-full') {
|
|
213
|
+
botObject(raw, ['kind', 'identity', 'caller']);
|
|
214
|
+
const identity = botHostActionIdentity(raw.identity), process = this.process();
|
|
215
|
+
if (this.claim ||
|
|
216
|
+
!process ||
|
|
217
|
+
identity.targetId !== this.config.targetId ||
|
|
218
|
+
identity.parametersDigest !==
|
|
219
|
+
createHash('sha256')
|
|
220
|
+
.update(canonicalBotJson(botCodexFullBinding(process, this.config.workspaceRef, identity.nativeSessionRef, identity.nativeCallRef)))
|
|
221
|
+
.digest('hex'))
|
|
222
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
223
|
+
const claim = { identity, process, at: Date.now(), sent: false };
|
|
224
|
+
if (this.local) {
|
|
225
|
+
const caller = botTargetLocalCaller(raw.caller);
|
|
226
|
+
const profile = this.local.describe(caller).profile;
|
|
227
|
+
const reserved = this.local.reserve(caller, identity, {
|
|
228
|
+
capability: 'CODEX_FULL',
|
|
229
|
+
workspaceRef: this.config.workspaceRef,
|
|
230
|
+
timeoutMs: profile.maxTimeoutMs,
|
|
231
|
+
});
|
|
232
|
+
if (reserved.state !== 'RESERVED')
|
|
233
|
+
throw new Error('BOT_TARGET_LOCAL_ACTION_ALREADY_DISPATCHED');
|
|
234
|
+
claim.identity = reserved.identity;
|
|
235
|
+
claim.at = reserved.createdAtMs;
|
|
236
|
+
claim.caller = caller;
|
|
237
|
+
claim.localDeadline =
|
|
238
|
+
performance.now() + Math.min(this.config.lifetimeMs, profile.maxTimeoutMs);
|
|
239
|
+
}
|
|
240
|
+
this.receipts.begin(claim);
|
|
241
|
+
if (this.local)
|
|
242
|
+
this.local.record({
|
|
243
|
+
identity: claim.identity,
|
|
244
|
+
state: 'RUNNING',
|
|
245
|
+
runnerId: process.startRef,
|
|
246
|
+
process,
|
|
247
|
+
cancelRequested: false,
|
|
248
|
+
createdAtMs: claim.at,
|
|
249
|
+
updatedAtMs: claim.at,
|
|
250
|
+
outcome: null,
|
|
251
|
+
});
|
|
252
|
+
this.claim = claim;
|
|
253
|
+
try {
|
|
254
|
+
await this.lease(claim, false);
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
this.lost();
|
|
258
|
+
throw error;
|
|
259
|
+
}
|
|
260
|
+
await this.frame({ kind: 'codex-target-full-ready', actionId: identity.actionId });
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
if (raw.kind === 'codex-target-full-finished') {
|
|
264
|
+
botObject(raw, ['kind', 'actionId']);
|
|
265
|
+
const claim = this.claim;
|
|
266
|
+
if (!claim?.readOnly || raw.actionId !== claim.identity.actionId)
|
|
267
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
268
|
+
if (this.config.nativeCatalog) {
|
|
269
|
+
// V2 子通信待办没有公开空读面,完整执行域退出后才结算授信窗口。
|
|
270
|
+
claim.finishing = true;
|
|
271
|
+
this.stop.abort(new Error('BOT_CODEX_FULL_WINDOW_FINISHED'));
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
// 原生档位变化不会收回已经派生的宿主进程权限。
|
|
275
|
+
try {
|
|
276
|
+
await this.assertOnlyProcess(claim.process);
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
this.lost();
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
282
|
+
this.stop.signal.throwIfAborted();
|
|
283
|
+
if (!claim.watcher)
|
|
284
|
+
throw new Error('BOT_CODEX_FULL_AUTHORITY_LOST');
|
|
285
|
+
await claim.watcher.release();
|
|
286
|
+
this.clear();
|
|
287
|
+
this.claim = undefined;
|
|
288
|
+
await this.receipts.settle(false);
|
|
289
|
+
await this.frame({ kind: 'codex-target-full-closed', actionId: claim.identity.actionId });
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
const { params, full } = codexTargetPermission(raw);
|
|
293
|
+
await this.computer.request(raw);
|
|
294
|
+
const claim = this.claim;
|
|
295
|
+
if (claim && (claim.expiresAt === undefined || performance.now() >= claim.expiresAt)) {
|
|
296
|
+
this.lost();
|
|
297
|
+
throw new Error('BOT_CODEX_FULL_AUTHORITY_LOST');
|
|
298
|
+
}
|
|
299
|
+
if ((claim && raw.method === 'thread/goal/set' && params.status === 'active') ||
|
|
300
|
+
(full &&
|
|
301
|
+
(!claim ||
|
|
302
|
+
params.threadId !== claim.identity.nativeSessionRef ||
|
|
303
|
+
(raw.method !== 'thread/settings/update' && raw.method !== 'turn/start'))))
|
|
304
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
305
|
+
if (claim &&
|
|
306
|
+
raw.method === 'thread/settings/update' &&
|
|
307
|
+
(full || params.threadId === claim.identity.nativeSessionRef)) {
|
|
308
|
+
// 每个权限写只允许一次,回证到达前不能叠加第二次写入污染已观察状态。
|
|
309
|
+
if (params.threadId !== claim.identity.nativeSessionRef ||
|
|
310
|
+
!params.sandboxPolicy ||
|
|
311
|
+
(full ? claim.fullRequested || claim.sent : !claim.completed || claim.readOnlyRequested))
|
|
312
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
313
|
+
if (full)
|
|
314
|
+
claim.fullRequested = true;
|
|
315
|
+
else
|
|
316
|
+
claim.readOnlyRequested = true;
|
|
317
|
+
}
|
|
318
|
+
if (claim && raw.method === 'turn/start') {
|
|
319
|
+
if (!full ||
|
|
320
|
+
!claim.full ||
|
|
321
|
+
claim.sent ||
|
|
322
|
+
params.clientUserMessageId !== claim.identity.nativeCallRef)
|
|
323
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
324
|
+
if (typeof raw.id !== 'number' && typeof raw.id !== 'string')
|
|
325
|
+
throw new Error('BOT_CODEX_FULL_TARGET_MISMATCH');
|
|
326
|
+
claim.requestId = raw.id;
|
|
327
|
+
claim.sent = true;
|
|
328
|
+
}
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
/** 私有控制帧不进入 Native;有界 JSONL 保持业务 RPC 和回答的原序。 */
|
|
332
|
+
async *input(input) {
|
|
333
|
+
let pieces = [], length = 0;
|
|
334
|
+
for await (const bytes of input) {
|
|
335
|
+
for (let offset = 0; offset < bytes.length;) {
|
|
336
|
+
const newline = bytes.indexOf(10, offset);
|
|
337
|
+
const piece = bytes.subarray(offset, newline < 0 ? bytes.length : newline);
|
|
338
|
+
if ((length += piece.length) > maxFrame)
|
|
339
|
+
throw new Error('BOT_CODEX_TARGET_FRAME_LIMIT');
|
|
340
|
+
if (piece.length)
|
|
341
|
+
pieces.push(piece);
|
|
342
|
+
if (newline < 0)
|
|
343
|
+
break;
|
|
344
|
+
const line = Buffer.concat(pieces, length).toString('utf8');
|
|
345
|
+
pieces = [];
|
|
346
|
+
length = 0;
|
|
347
|
+
offset = newline + 1;
|
|
348
|
+
this.stop.signal.throwIfAborted();
|
|
349
|
+
if (await this.forward(line))
|
|
350
|
+
yield line + '\n';
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
if (length)
|
|
354
|
+
throw new Error('BOT_CODEX_TARGET_FRAME_INCOMPLETE');
|
|
355
|
+
}
|
|
356
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { botObject, canonicalBotJson } from '@agent-stack/contracts';
|
|
3
|
+
import { deploymentSystem, trustedAncestors, } from '../../deployment/system.js';
|
|
4
|
+
/** 目标启动使用操作员登记的同一目录,握手只携带摘要,不下发 Provider 配置。 */
|
|
5
|
+
export function readCodexTargetCatalog(path, system = deploymentSystem) {
|
|
6
|
+
const before = system.metadata(path);
|
|
7
|
+
if (!before.file ||
|
|
8
|
+
before.symlink ||
|
|
9
|
+
before.uid !== system.uid ||
|
|
10
|
+
(before.mode & 0o022) !== 0 ||
|
|
11
|
+
before.size > 65536 ||
|
|
12
|
+
system.realpath(path) !== path)
|
|
13
|
+
throw new Error('BOT_CODEX_TARGET_CATALOG_UNTRUSTED');
|
|
14
|
+
trustedAncestors(path, system, system.uid);
|
|
15
|
+
const value = botObject(JSON.parse(system.read(path)), ['models']);
|
|
16
|
+
const after = system.metadata(path);
|
|
17
|
+
if (!Array.isArray(value.models) ||
|
|
18
|
+
!value.models.length ||
|
|
19
|
+
before.size !== after.size ||
|
|
20
|
+
before.mode !== after.mode ||
|
|
21
|
+
before.uid !== after.uid)
|
|
22
|
+
throw new Error('BOT_CODEX_TARGET_CATALOG_CHANGED');
|
|
23
|
+
return createHash('sha256').update(canonicalBotJson(value)).digest('hex');
|
|
24
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
2
|
+
import { botId, botInteger, botObject, botText, botTexts } from '@agent-stack/contracts';
|
|
3
|
+
import { readTargetConfig, targetConfig } from '../config.js';
|
|
4
|
+
const absolute = (value) => {
|
|
5
|
+
const path = botText(value);
|
|
6
|
+
if (!isAbsolute(path) || resolve(path) !== path || /[\x00-\x1f\x7f]/.test(path))
|
|
7
|
+
throw new Error('BOT_CODEX_TARGET_PATH_INVALID');
|
|
8
|
+
return path;
|
|
9
|
+
};
|
|
10
|
+
/** 目标操作员预置真实二进制、工作区、原生状态和 Provider 环境。 */
|
|
11
|
+
export function codexTargetConfig(path) {
|
|
12
|
+
const raw = readTargetConfig(path);
|
|
13
|
+
const target = targetConfig(path, raw);
|
|
14
|
+
const v = botObject(raw.codex, [
|
|
15
|
+
'binary',
|
|
16
|
+
'scopeRoot',
|
|
17
|
+
'workspaceRef',
|
|
18
|
+
'cgroupRoot',
|
|
19
|
+
'lifetimeMs',
|
|
20
|
+
'args',
|
|
21
|
+
'providerEnv',
|
|
22
|
+
'nativeCatalog',
|
|
23
|
+
]);
|
|
24
|
+
const workspaceRef = botId(v.workspaceRef);
|
|
25
|
+
const scopeRoot = absolute(v.scopeRoot);
|
|
26
|
+
const workspaceRoot = join(scopeRoot, 'workspace');
|
|
27
|
+
const codexHome = join(scopeRoot, 'codex-home');
|
|
28
|
+
const cgroupRoot = absolute(v.cgroupRoot);
|
|
29
|
+
const lifetimeMs = botInteger(v.lifetimeMs, 1000);
|
|
30
|
+
const args = botTexts(v.args ?? [], 64);
|
|
31
|
+
const env = {
|
|
32
|
+
// 专用任务 app-server 与普通目标动作接同一个真实桌面会话。
|
|
33
|
+
...target.sessionEnvironment,
|
|
34
|
+
HOME: target.home,
|
|
35
|
+
CODEX_HOME: codexHome,
|
|
36
|
+
PATH: target.path,
|
|
37
|
+
};
|
|
38
|
+
// 只从目标端部署声明装入业务 Provider 密钥,控制面的环境与凭据不下发。
|
|
39
|
+
for (const [key, value] of Object.entries(botObject(v.providerEnv ?? {}))) {
|
|
40
|
+
if (!/^[A-Z][A-Z0-9_]{0,90}_(?:API_KEY|API_TOKEN)$/.test(key) ||
|
|
41
|
+
/^(?:BRIDGE_|RUNTIME_|AGENTXGO_|BOT_|LD_)/.test(key) ||
|
|
42
|
+
typeof value !== 'string' ||
|
|
43
|
+
!value ||
|
|
44
|
+
value.length > 8192 ||
|
|
45
|
+
value.includes('\0'))
|
|
46
|
+
throw new Error('BOT_CODEX_TARGET_PROVIDER_ENV_INVALID');
|
|
47
|
+
env[key] = value;
|
|
48
|
+
}
|
|
49
|
+
if (target.workspaces.get(workspaceRef) !== workspaceRoot ||
|
|
50
|
+
cgroupRoot === target.cgroupRoot ||
|
|
51
|
+
cgroupRoot.startsWith(target.cgroupRoot + '/') ||
|
|
52
|
+
target.cgroupRoot.startsWith(cgroupRoot + '/') ||
|
|
53
|
+
lifetimeMs > target.maxRuntimeMs ||
|
|
54
|
+
args.some((arg) => /[\x00-\x1f\x7f]/.test(arg)))
|
|
55
|
+
throw new Error('BOT_CODEX_TARGET_DEPLOYMENT_MISMATCH');
|
|
56
|
+
return {
|
|
57
|
+
targetId: target.targetId,
|
|
58
|
+
// 只有显式登记桌面监督端的目标参与机器输入权互斥。
|
|
59
|
+
computerEnabled: raw.computer !== undefined,
|
|
60
|
+
workspaceRef,
|
|
61
|
+
scopeRoot,
|
|
62
|
+
codexHome,
|
|
63
|
+
workspaceRoot,
|
|
64
|
+
cgroupRoot,
|
|
65
|
+
lockPath: join(dirname(target.lockPath), 'target-codex.lock'),
|
|
66
|
+
windowJournalPath: join(dirname(target.lockPath), 'target-codex.sqlite'),
|
|
67
|
+
role: { uid: target.uid, gid: target.gid },
|
|
68
|
+
binary: absolute(v.binary),
|
|
69
|
+
nativeCatalog: v.nativeCatalog === undefined ? undefined : absolute(v.nativeCatalog),
|
|
70
|
+
limits: target.limits,
|
|
71
|
+
bridge: target.bridge,
|
|
72
|
+
...(target.localAuthority ? { localAuthority: target.localAuthority } : {}),
|
|
73
|
+
lifetimeMs,
|
|
74
|
+
env,
|
|
75
|
+
args,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { lstat, realpath } from 'node:fs/promises';
|
|
2
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
3
|
+
const filesystem = { stat: (path) => lstat(path, { bigint: true }), realpath };
|
|
4
|
+
function taskIdentity(role) {
|
|
5
|
+
if (!Number.isSafeInteger(role.uid) ||
|
|
6
|
+
role.uid <= 0 ||
|
|
7
|
+
!Number.isSafeInteger(role.gid) ||
|
|
8
|
+
role.gid <= 0)
|
|
9
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_ROLE_INVALID');
|
|
10
|
+
return { uid: BigInt(role.uid), gid: BigInt(role.gid) };
|
|
11
|
+
}
|
|
12
|
+
const canonicalSyntax = (path) => isAbsolute(path) && !path.includes('\0') && resolve(path) === path;
|
|
13
|
+
async function readDirectory(system, path) {
|
|
14
|
+
const info = await system.stat(path).catch(() => {
|
|
15
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_UNAVAILABLE');
|
|
16
|
+
});
|
|
17
|
+
if (!info.isDirectory())
|
|
18
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_NOT_DIRECTORY');
|
|
19
|
+
return info;
|
|
20
|
+
}
|
|
21
|
+
async function assertCanonical(system, path) {
|
|
22
|
+
const canonical = await system.realpath(path).catch(() => {
|
|
23
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_UNAVAILABLE');
|
|
24
|
+
});
|
|
25
|
+
if (canonical !== path)
|
|
26
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_PATH_INVALID');
|
|
27
|
+
}
|
|
28
|
+
async function assertTraversable(system, path, { uid, gid }) {
|
|
29
|
+
let parent = path;
|
|
30
|
+
for (;;) {
|
|
31
|
+
const info = await readDirectory(system, parent);
|
|
32
|
+
// setpriv 清除补充组。POSIX 只采用命中的权限类,不能从其他类补齐执行位。
|
|
33
|
+
const execute = BigInt(info.uid) === uid ? 0o100 : BigInt(info.gid) === gid ? 0o010 : 0o001;
|
|
34
|
+
if ((Number(info.mode) & execute) === 0)
|
|
35
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_PARENT_NOT_TRAVERSABLE');
|
|
36
|
+
const next = dirname(parent);
|
|
37
|
+
if (next === parent)
|
|
38
|
+
return;
|
|
39
|
+
parent = next;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** 专用角色的目录由部署方预置,控制 Runtime 只核对归属、边界及可达性。 */
|
|
43
|
+
export async function assertCodexTaskDirectories(paths, role, system = filesystem) {
|
|
44
|
+
const { scopeRoot, codexHome, workspaceRoot } = paths;
|
|
45
|
+
const dirs = [scopeRoot, codexHome, workspaceRoot];
|
|
46
|
+
const identity = taskIdentity(role);
|
|
47
|
+
if (!dirs.every(canonicalSyntax) ||
|
|
48
|
+
dirname(scopeRoot) === scopeRoot ||
|
|
49
|
+
codexHome !== join(scopeRoot, 'codex-home') ||
|
|
50
|
+
workspaceRoot !== join(scopeRoot, 'workspace'))
|
|
51
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_PATH_INVALID');
|
|
52
|
+
const inodes = new Set();
|
|
53
|
+
for (const path of dirs) {
|
|
54
|
+
await assertCanonical(system, path);
|
|
55
|
+
const info = await readDirectory(system, path);
|
|
56
|
+
if (BigInt(info.uid) !== identity.uid || BigInt(info.gid) !== identity.gid)
|
|
57
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_OWNER_MISMATCH');
|
|
58
|
+
if ((Number(info.mode) & 0o7777) !== 0o700)
|
|
59
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_MODE_INVALID');
|
|
60
|
+
// 相同设备和 inode 的不同路径可能是绑定挂载别名,也不能共用角色目录。
|
|
61
|
+
const inode = `${info.dev}:${info.ino}`;
|
|
62
|
+
if (inodes.has(inode))
|
|
63
|
+
throw new Error('BOT_CODEX_TASK_DIRECTORY_PATH_INVALID');
|
|
64
|
+
inodes.add(inode);
|
|
65
|
+
}
|
|
66
|
+
await assertTraversable(system, dirname(scopeRoot), identity);
|
|
67
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { runLockedTargetWorker } from '../main.js';
|
|
2
|
+
import { codexTargetConfig } from './config.js';
|
|
3
|
+
/** 配置解析错误可能包含私有 JSON 片段,连接器只接收稳定错误码。 */
|
|
4
|
+
export function codexTargetFailure(error) {
|
|
5
|
+
const code = error instanceof Error && /^BOT_[A-Z_]{1,90}$/.test(error.message)
|
|
6
|
+
? error.message
|
|
7
|
+
: 'BOT_CODEX_TARGET_STOPPED';
|
|
8
|
+
process.stderr.write(code + '\n');
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
}
|
|
11
|
+
/** 只接受目标机操作员的固定配置,私有连接没有路径或命令选择参数。 */
|
|
12
|
+
export async function runCodexTarget(path) {
|
|
13
|
+
if (process.platform !== 'linux')
|
|
14
|
+
throw new Error('BOT_TARGET_PLATFORM_UNSUPPORTED');
|
|
15
|
+
const { lockPath } = codexTargetConfig(path);
|
|
16
|
+
await runLockedTargetWorker(lockPath, new URL('./worker.js', import.meta.url), path);
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { botId, botObject, botText } from '@agent-stack/contracts';
|
|
2
|
+
import { codexTargetConfig } from './config.js';
|
|
3
|
+
import { streamCodexTargetRecord } from './record.js';
|
|
4
|
+
/** 一次私有读只返回固定目标的原生 rollout,不提供任意文件或执行入口。 */
|
|
5
|
+
export async function readCodexTargetState(configPath) {
|
|
6
|
+
const config = codexTargetConfig(configPath);
|
|
7
|
+
const chunks = [];
|
|
8
|
+
let length = 0;
|
|
9
|
+
const timer = setTimeout(() => process.stdin.destroy(new Error('BOT_CODEX_TARGET_RECORD_TIMEOUT')), 3000);
|
|
10
|
+
try {
|
|
11
|
+
for await (const chunk of process.stdin) {
|
|
12
|
+
length += chunk.length;
|
|
13
|
+
if (length > 8192)
|
|
14
|
+
throw new Error('BOT_CODEX_TARGET_RECORD_REQUEST_LIMIT');
|
|
15
|
+
chunks.push(chunk);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
finally {
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
}
|
|
21
|
+
const args = botObject(JSON.parse(Buffer.concat(chunks).toString('utf8')), [
|
|
22
|
+
'targetId',
|
|
23
|
+
'workspaceRef',
|
|
24
|
+
'path',
|
|
25
|
+
'mode',
|
|
26
|
+
]);
|
|
27
|
+
if (botId(args.targetId) !== config.targetId ||
|
|
28
|
+
botId(args.workspaceRef) !== config.workspaceRef ||
|
|
29
|
+
!['header', 'stream'].includes(String(args.mode)))
|
|
30
|
+
throw new Error('BOT_CODEX_TARGET_RECORD_SCOPE');
|
|
31
|
+
const path = botText(args.path);
|
|
32
|
+
const write = (value) => new Promise((resolve, reject) => process.stdout.write(JSON.stringify(value) + '\n', (error) => error ? reject(error) : resolve()));
|
|
33
|
+
for await (const frame of streamCodexTargetRecord(config.codexHome, path, config.role.uid, { targetId: config.targetId, workspaceRef: config.workspaceRef }, args.mode === 'header'))
|
|
34
|
+
await write(frame);
|
|
35
|
+
}
|