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,190 @@
|
|
|
1
|
+
import { executionCanonicalJson } from './execution/json.js';
|
|
2
|
+
export function parseRuntimeRunWorkTransport(raw) {
|
|
3
|
+
const r = record(raw, 16384);
|
|
4
|
+
keys(r, ['operation', 'token', 'endpoint']);
|
|
5
|
+
if (r.operation !== 'transport' ||
|
|
6
|
+
typeof r.token !== 'string' ||
|
|
7
|
+
r.token.length > 8192 ||
|
|
8
|
+
!r.token.startsWith('agxrw_') ||
|
|
9
|
+
typeof r.endpoint !== 'string' ||
|
|
10
|
+
r.endpoint.length > 2048)
|
|
11
|
+
throw Error('INVALID_RUN_WORK_TRANSPORT');
|
|
12
|
+
return { operation: 'transport', token: r.token, endpoint: r.endpoint };
|
|
13
|
+
}
|
|
14
|
+
export function parseRuntimeRunWorkTransportPermit(raw) {
|
|
15
|
+
const r = record(raw);
|
|
16
|
+
keys(r, [
|
|
17
|
+
'operation',
|
|
18
|
+
'decision',
|
|
19
|
+
'runKey',
|
|
20
|
+
'ownerDigest',
|
|
21
|
+
'contextHash',
|
|
22
|
+
'endpoint',
|
|
23
|
+
'toolName',
|
|
24
|
+
]);
|
|
25
|
+
if (r.operation !== 'transport' ||
|
|
26
|
+
r.decision !== 'ALLOW' ||
|
|
27
|
+
r.toolName !== 'run.work_events' ||
|
|
28
|
+
typeof r.endpoint !== 'string' ||
|
|
29
|
+
r.endpoint.length > 2048)
|
|
30
|
+
throw Error('INVALID_RUN_WORK_TRANSPORT');
|
|
31
|
+
return {
|
|
32
|
+
operation: 'transport',
|
|
33
|
+
decision: 'ALLOW',
|
|
34
|
+
runKey: id(r.runKey),
|
|
35
|
+
ownerDigest: digest(r.ownerDigest),
|
|
36
|
+
contextHash: digest(r.contextHash),
|
|
37
|
+
endpoint: r.endpoint,
|
|
38
|
+
toolName: 'run.work_events',
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function parseRuntimeEventBinding(raw) {
|
|
42
|
+
const r = record(raw);
|
|
43
|
+
return {
|
|
44
|
+
runKey: id(r.runKey),
|
|
45
|
+
ownerDigest: digest(r.ownerDigest),
|
|
46
|
+
contextHash: digest(r.contextHash),
|
|
47
|
+
epoch: id(r.epoch),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function parseRuntimeEventTicketRequest(raw) {
|
|
51
|
+
const r = record(raw);
|
|
52
|
+
keys(r, ['operation', 'runKey', 'ownerDigest', 'contextHash', 'epoch', 'waitId'], ['expiresAt']);
|
|
53
|
+
if (typeof r.operation !== 'string' || !['prepare', 'status', 'cancel'].includes(r.operation))
|
|
54
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
55
|
+
if (r.operation === 'prepare' &&
|
|
56
|
+
(typeof r.expiresAt !== 'string' || !Number.isFinite(Date.parse(r.expiresAt))))
|
|
57
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
58
|
+
if (r.operation !== 'prepare' && r.expiresAt !== undefined)
|
|
59
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
60
|
+
return {
|
|
61
|
+
...parseRuntimeEventBinding(r),
|
|
62
|
+
operation: r.operation,
|
|
63
|
+
waitId: id(r.waitId),
|
|
64
|
+
...(r.expiresAt === undefined ? {} : { expiresAt: r.expiresAt }),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function parseRuntimeEventWakeInput(raw) {
|
|
68
|
+
const r = record(raw);
|
|
69
|
+
keys(r, [
|
|
70
|
+
'runKey',
|
|
71
|
+
'ownerDigest',
|
|
72
|
+
'contextHash',
|
|
73
|
+
'epoch',
|
|
74
|
+
'waitId',
|
|
75
|
+
'ticketId',
|
|
76
|
+
'wakeId',
|
|
77
|
+
'authorityDigest',
|
|
78
|
+
]);
|
|
79
|
+
return {
|
|
80
|
+
...parseRuntimeEventBinding(r),
|
|
81
|
+
waitId: id(r.waitId),
|
|
82
|
+
ticketId: id(r.ticketId),
|
|
83
|
+
wakeId: id(r.wakeId),
|
|
84
|
+
authorityDigest: digest(r.authorityDigest),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export function parseRuntimeEventGuard(raw) {
|
|
88
|
+
const r = record(raw);
|
|
89
|
+
keys(r, ['operation', 'runKey', 'ownerDigest', 'contextHash', 'epoch', 'waitId', 'nativeSessionRef'], ['ticketId', 'wakeId', 'authorityDigest']);
|
|
90
|
+
if (typeof r.operation !== 'string' || !['prepare', 'dispatch'].includes(r.operation))
|
|
91
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
92
|
+
const base = {
|
|
93
|
+
...parseRuntimeEventBinding(r),
|
|
94
|
+
operation: r.operation,
|
|
95
|
+
waitId: id(r.waitId),
|
|
96
|
+
nativeSessionRef: id(r.nativeSessionRef),
|
|
97
|
+
};
|
|
98
|
+
if (r.operation === 'prepare') {
|
|
99
|
+
if (r.ticketId !== undefined || r.wakeId !== undefined || r.authorityDigest !== undefined)
|
|
100
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
101
|
+
return base;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
...base,
|
|
105
|
+
ticketId: id(r.ticketId),
|
|
106
|
+
wakeId: id(r.wakeId),
|
|
107
|
+
authorityDigest: digest(r.authorityDigest),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
export function parseRuntimeEventReceipt(raw) {
|
|
111
|
+
const r = record(raw);
|
|
112
|
+
keys(r, [
|
|
113
|
+
'runKey',
|
|
114
|
+
'ownerDigest',
|
|
115
|
+
'contextHash',
|
|
116
|
+
'epoch',
|
|
117
|
+
'waitId',
|
|
118
|
+
'ticketId',
|
|
119
|
+
'nativeSessionRef',
|
|
120
|
+
'originTurnRef',
|
|
121
|
+
'expiresAt',
|
|
122
|
+
'state',
|
|
123
|
+
'wakeId',
|
|
124
|
+
'authorityDigest',
|
|
125
|
+
'nativeRunRef',
|
|
126
|
+
'nativeStatus',
|
|
127
|
+
'reasonCode',
|
|
128
|
+
]);
|
|
129
|
+
if (![
|
|
130
|
+
'WAITING',
|
|
131
|
+
'READY',
|
|
132
|
+
'CLAIMED',
|
|
133
|
+
'UNKNOWN',
|
|
134
|
+
'ACCEPTED',
|
|
135
|
+
'NOT_STARTED',
|
|
136
|
+
'CANCELLED',
|
|
137
|
+
'EXPIRED',
|
|
138
|
+
'STALE',
|
|
139
|
+
].includes(String(r.state)) ||
|
|
140
|
+
typeof r.expiresAt !== 'string' ||
|
|
141
|
+
!Number.isFinite(Date.parse(r.expiresAt)))
|
|
142
|
+
throw Error('INVALID_EVENT_TICKET_RECEIPT');
|
|
143
|
+
if (r.nativeStatus !== null &&
|
|
144
|
+
(typeof r.nativeStatus !== 'string' ||
|
|
145
|
+
!['inProgress', 'completed', 'failed', 'interrupted'].includes(r.nativeStatus)))
|
|
146
|
+
throw Error('INVALID_EVENT_TICKET_RECEIPT');
|
|
147
|
+
if (r.state === 'ACCEPTED' &&
|
|
148
|
+
(!r.wakeId || !r.authorityDigest || !r.nativeRunRef || !r.nativeStatus))
|
|
149
|
+
throw Error('INVALID_EVENT_TICKET_RECEIPT');
|
|
150
|
+
if (['NOT_STARTED', 'CANCELLED', 'EXPIRED'].includes(String(r.state)) &&
|
|
151
|
+
(r.nativeRunRef !== null || r.nativeStatus !== null))
|
|
152
|
+
throw Error('INVALID_EVENT_TICKET_RECEIPT');
|
|
153
|
+
return {
|
|
154
|
+
...parseRuntimeEventBinding(r),
|
|
155
|
+
waitId: id(r.waitId),
|
|
156
|
+
ticketId: id(r.ticketId),
|
|
157
|
+
nativeSessionRef: id(r.nativeSessionRef),
|
|
158
|
+
originTurnRef: id(r.originTurnRef),
|
|
159
|
+
expiresAt: r.expiresAt,
|
|
160
|
+
state: r.state,
|
|
161
|
+
wakeId: r.wakeId === null ? null : id(r.wakeId),
|
|
162
|
+
authorityDigest: r.authorityDigest === null ? null : digest(r.authorityDigest),
|
|
163
|
+
nativeRunRef: r.nativeRunRef === null ? null : id(r.nativeRunRef),
|
|
164
|
+
nativeStatus: r.nativeStatus,
|
|
165
|
+
reasonCode: r.reasonCode === null ? null : id(r.reasonCode),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function record(raw, maxLength = 8192) {
|
|
169
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
170
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
171
|
+
executionCanonicalJson(raw, { maxLength, maxDepth: 3, maxNodes: 64 });
|
|
172
|
+
if (Object.getOwnPropertyNames(raw).length !== Object.keys(raw).length)
|
|
173
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
174
|
+
return raw;
|
|
175
|
+
}
|
|
176
|
+
function keys(r, required, optional = []) {
|
|
177
|
+
if (Object.keys(r).some((k) => ![...required, ...optional].includes(k)) ||
|
|
178
|
+
required.some((k) => !Object.hasOwn(r, k)))
|
|
179
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
180
|
+
}
|
|
181
|
+
function id(raw) {
|
|
182
|
+
if (typeof raw !== 'string' || !/^[A-Za-z0-9_-]{1,128}$/.test(raw))
|
|
183
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
184
|
+
return raw;
|
|
185
|
+
}
|
|
186
|
+
function digest(raw) {
|
|
187
|
+
if (typeof raw !== 'string' || !/^[a-f0-9]{64}$/.test(raw))
|
|
188
|
+
throw Error('INVALID_EVENT_TICKET_INPUT');
|
|
189
|
+
return raw;
|
|
190
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** AgentXGo 私有扩展键;官方协议保留元信息仍由官方 SDK 负责。 */
|
|
2
|
+
export const MCP_TOOL_PROJECTION_KEY = 'com.agentxgo/tool-projection';
|
|
3
|
+
export const MCP_EXTERNAL_CONTEXT_KEY = 'com.agentxgo/external-context';
|
|
4
|
+
const identifier = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/;
|
|
5
|
+
const fields = ['schemaVersion', 'provider', 'schema', 'contextRef', 'version', 'expiresAt'];
|
|
6
|
+
/** 校验精确 JSON 形状及可信域后复制冻结,避免调用方修改已验收快照。 */
|
|
7
|
+
export function parseExternalContextReference(value, expected, nowMs) {
|
|
8
|
+
const invalid = () => {
|
|
9
|
+
throw new Error('MCP_CONTEXT_INVALID');
|
|
10
|
+
};
|
|
11
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
12
|
+
return invalid();
|
|
13
|
+
const prototype = Object.getPrototypeOf(value);
|
|
14
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
15
|
+
return invalid();
|
|
16
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
17
|
+
if (Reflect.ownKeys(value).length !== fields.length ||
|
|
18
|
+
fields.some((key) => !descriptors[key] || !('value' in descriptors[key]) || !descriptors[key].enumerable))
|
|
19
|
+
return invalid();
|
|
20
|
+
const record = value;
|
|
21
|
+
const { schemaVersion, provider, schema, contextRef, version, expiresAt } = record;
|
|
22
|
+
if (schemaVersion !== 1 ||
|
|
23
|
+
typeof provider !== 'string' ||
|
|
24
|
+
!identifier.test(provider) ||
|
|
25
|
+
provider !== expected.provider ||
|
|
26
|
+
typeof schema !== 'string' ||
|
|
27
|
+
!identifier.test(schema) ||
|
|
28
|
+
schema !== expected.schema ||
|
|
29
|
+
typeof contextRef !== 'string' ||
|
|
30
|
+
!/^[a-zA-Z0-9_-]{16,200}$/.test(contextRef) ||
|
|
31
|
+
typeof version !== 'number' ||
|
|
32
|
+
!Number.isSafeInteger(version) ||
|
|
33
|
+
version < 1 ||
|
|
34
|
+
typeof expiresAt !== 'string' ||
|
|
35
|
+
!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/.test(expiresAt) ||
|
|
36
|
+
!Number.isFinite(nowMs))
|
|
37
|
+
return invalid();
|
|
38
|
+
const expiry = Date.parse(expiresAt);
|
|
39
|
+
const normalized = expiresAt.includes('.') ? expiresAt : expiresAt.replace('Z', '.000Z');
|
|
40
|
+
if (!Number.isFinite(expiry) || expiry <= nowMs || new Date(expiry).toISOString() !== normalized)
|
|
41
|
+
return invalid();
|
|
42
|
+
const snapshot = {
|
|
43
|
+
schemaVersion,
|
|
44
|
+
provider,
|
|
45
|
+
schema,
|
|
46
|
+
contextRef,
|
|
47
|
+
version,
|
|
48
|
+
expiresAt,
|
|
49
|
+
};
|
|
50
|
+
if (new TextEncoder().encode(JSON.stringify(snapshot)).byteLength > 2048)
|
|
51
|
+
return invalid();
|
|
52
|
+
return Object.freeze(snapshot);
|
|
53
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AuthorityInputError } from './authority.js';
|
|
2
|
+
import { nativeStudioUuid } from './native-studio-execution.js';
|
|
3
|
+
export function parseNativeStudioConnectionInfo(raw) {
|
|
4
|
+
const bad = () => {
|
|
5
|
+
throw new AuthorityInputError();
|
|
6
|
+
};
|
|
7
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
8
|
+
bad();
|
|
9
|
+
const v = raw;
|
|
10
|
+
if (Object.keys(v).sort().join(',') !==
|
|
11
|
+
'capabilityDigest,projectId,protocol,resource,runtimeKey,tenantId,transport' ||
|
|
12
|
+
v.protocol !== 'NATIVESTUDIO_RUNTIME_TOOLS_V1' ||
|
|
13
|
+
v.transport !== 'ORIGINAL_CODEX_HTTP_MCP_V1' ||
|
|
14
|
+
typeof v.resource !== 'string' ||
|
|
15
|
+
v.resource.length > 2048 ||
|
|
16
|
+
typeof v.runtimeKey !== 'string' ||
|
|
17
|
+
!/^[A-Za-z0-9_-]{1,160}$/.test(v.runtimeKey) ||
|
|
18
|
+
typeof v.capabilityDigest !== 'string' ||
|
|
19
|
+
!/^[a-f0-9]{64}$/.test(v.capabilityDigest))
|
|
20
|
+
bad();
|
|
21
|
+
const tenantId = nativeStudioUuid(v.tenantId), projectId = nativeStudioUuid(v.projectId);
|
|
22
|
+
let resource;
|
|
23
|
+
try {
|
|
24
|
+
resource = new URL(v.resource);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return bad();
|
|
28
|
+
}
|
|
29
|
+
if (resource.protocol !== 'https:' ||
|
|
30
|
+
resource.username ||
|
|
31
|
+
resource.password ||
|
|
32
|
+
resource.search ||
|
|
33
|
+
resource.hash ||
|
|
34
|
+
resource.pathname !== `/mcp/native/v1/projects/${projectId}` ||
|
|
35
|
+
resource.href !== v.resource)
|
|
36
|
+
bad();
|
|
37
|
+
return {
|
|
38
|
+
protocol: 'NATIVESTUDIO_RUNTIME_TOOLS_V1',
|
|
39
|
+
transport: 'ORIGINAL_CODEX_HTTP_MCP_V1',
|
|
40
|
+
resource: resource.href,
|
|
41
|
+
tenantId,
|
|
42
|
+
projectId,
|
|
43
|
+
runtimeKey: v.runtimeKey,
|
|
44
|
+
capabilityDigest: v.capabilityDigest,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AuthorityInputError } from './authority.js';
|
|
2
|
+
function bad() {
|
|
3
|
+
throw new AuthorityInputError();
|
|
4
|
+
}
|
|
5
|
+
export function nativeStudioUuid(raw) {
|
|
6
|
+
if (typeof raw !== 'string' ||
|
|
7
|
+
!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(raw))
|
|
8
|
+
bad();
|
|
9
|
+
return raw;
|
|
10
|
+
}
|
|
11
|
+
/** 与Native domain字符序编码一致;有限JSON允许小数/负数业务值,拒绝非JSON和过大材料。 */
|
|
12
|
+
export function nativeStudioCanonicalJson(raw, depth = 0) {
|
|
13
|
+
if (depth > 24)
|
|
14
|
+
bad();
|
|
15
|
+
let result;
|
|
16
|
+
if (raw === null || typeof raw === 'boolean' || typeof raw === 'string')
|
|
17
|
+
result = JSON.stringify(raw);
|
|
18
|
+
else if (typeof raw === 'number' && Number.isFinite(raw))
|
|
19
|
+
result = JSON.stringify(raw);
|
|
20
|
+
else if (Array.isArray(raw)) {
|
|
21
|
+
if (raw.length > 1024 ||
|
|
22
|
+
Object.keys(raw).length !== raw.length ||
|
|
23
|
+
Object.getOwnPropertySymbols(raw).length)
|
|
24
|
+
bad();
|
|
25
|
+
const values = [];
|
|
26
|
+
for (let i = 0; i < raw.length; i++) {
|
|
27
|
+
const d = Object.getOwnPropertyDescriptor(raw, i);
|
|
28
|
+
if (!d || !('value' in d))
|
|
29
|
+
bad();
|
|
30
|
+
values.push(nativeStudioCanonicalJson(d.value, depth + 1));
|
|
31
|
+
}
|
|
32
|
+
result = '[' + values.join(',') + ']';
|
|
33
|
+
}
|
|
34
|
+
else if (raw && typeof raw === 'object' && Object.getPrototypeOf(raw) === Object.prototype) {
|
|
35
|
+
const keys = Object.keys(raw).sort();
|
|
36
|
+
if (keys.length > 1024 || Object.getOwnPropertySymbols(raw).length)
|
|
37
|
+
bad();
|
|
38
|
+
result =
|
|
39
|
+
'{' +
|
|
40
|
+
keys
|
|
41
|
+
.map((key) => {
|
|
42
|
+
const d = Object.getOwnPropertyDescriptor(raw, key);
|
|
43
|
+
if (!d || !('value' in d))
|
|
44
|
+
bad();
|
|
45
|
+
return JSON.stringify(key) + ':' + nativeStudioCanonicalJson(d.value, depth + 1);
|
|
46
|
+
})
|
|
47
|
+
.join(',') +
|
|
48
|
+
'}';
|
|
49
|
+
}
|
|
50
|
+
else
|
|
51
|
+
bad();
|
|
52
|
+
if (new TextEncoder().encode(result).byteLength > 65536)
|
|
53
|
+
bad();
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/** Runtime服务端的独立精确合同;未验证Native permit前没有工具权限。 */
|
|
57
|
+
export function parseNativeStudioExecutionAuthority(raw) {
|
|
58
|
+
const fields = [
|
|
59
|
+
'protocol',
|
|
60
|
+
'installationId',
|
|
61
|
+
'installationRevisionId',
|
|
62
|
+
'authorityRef',
|
|
63
|
+
'tenantId',
|
|
64
|
+
'projectId',
|
|
65
|
+
'productionId',
|
|
66
|
+
'executionId',
|
|
67
|
+
'hostRequestId',
|
|
68
|
+
'inputFingerprint',
|
|
69
|
+
'capabilityDigest',
|
|
70
|
+
'executionClass',
|
|
71
|
+
'expiresAt',
|
|
72
|
+
];
|
|
73
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
74
|
+
bad();
|
|
75
|
+
const v = raw;
|
|
76
|
+
if (Object.keys(v).length !== fields.length || fields.some((key) => !Object.hasOwn(v, key)))
|
|
77
|
+
bad();
|
|
78
|
+
for (const key of [
|
|
79
|
+
'authorityRef',
|
|
80
|
+
'tenantId',
|
|
81
|
+
'projectId',
|
|
82
|
+
'productionId',
|
|
83
|
+
'executionId',
|
|
84
|
+
'hostRequestId',
|
|
85
|
+
])
|
|
86
|
+
nativeStudioUuid(v[key]);
|
|
87
|
+
for (const key of ['installationId', 'installationRevisionId'])
|
|
88
|
+
if (typeof v[key] !== 'string' || !/^[A-Za-z0-9_-]{1,160}$/.test(v[key]))
|
|
89
|
+
bad();
|
|
90
|
+
for (const key of ['inputFingerprint', 'capabilityDigest'])
|
|
91
|
+
if (typeof v[key] !== 'string' || !/^[a-f0-9]{64}$/.test(v[key]))
|
|
92
|
+
bad();
|
|
93
|
+
if (v.protocol !== 'NATIVESTUDIO_RUNTIME_EXECUTION_V1' ||
|
|
94
|
+
!['LIVE', 'TEST_ONLY'].includes(v.executionClass) ||
|
|
95
|
+
typeof v.expiresAt !== 'string' ||
|
|
96
|
+
!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,3})?(?:Z|[+-]\d\d:\d\d)$/.test(v.expiresAt) ||
|
|
97
|
+
!Number.isFinite(Date.parse(v.expiresAt)))
|
|
98
|
+
bad();
|
|
99
|
+
return structuredClone(v);
|
|
100
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { AuthorityInputError } from './authority.js';
|
|
2
|
+
function bad() {
|
|
3
|
+
throw new AuthorityInputError();
|
|
4
|
+
}
|
|
5
|
+
function exact(raw, fields) {
|
|
6
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
7
|
+
bad();
|
|
8
|
+
const value = raw;
|
|
9
|
+
if (Object.keys(value).length !== fields.length || fields.some((f) => !Object.hasOwn(value, f)))
|
|
10
|
+
bad();
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
function uuid(raw) {
|
|
14
|
+
if (typeof raw !== 'string' ||
|
|
15
|
+
!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(raw))
|
|
16
|
+
bad();
|
|
17
|
+
return raw;
|
|
18
|
+
}
|
|
19
|
+
function key(raw) {
|
|
20
|
+
if (typeof raw !== 'string' || !/^[A-Za-z0-9_-]{1,160}$/.test(raw))
|
|
21
|
+
bad();
|
|
22
|
+
return raw;
|
|
23
|
+
}
|
|
24
|
+
function revision(raw) {
|
|
25
|
+
if (!Number.isSafeInteger(raw) || Number(raw) < 1)
|
|
26
|
+
bad();
|
|
27
|
+
return raw;
|
|
28
|
+
}
|
|
29
|
+
function time(raw) {
|
|
30
|
+
if (typeof raw !== 'string' ||
|
|
31
|
+
!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,3})?(?:Z|[+-]\d\d:\d\d)$/.test(raw) ||
|
|
32
|
+
!Number.isFinite(Date.parse(raw)))
|
|
33
|
+
bad();
|
|
34
|
+
return raw;
|
|
35
|
+
}
|
|
36
|
+
function publicKey(raw) {
|
|
37
|
+
const v = exact(raw, ['kty', 'crv', 'x', 'y']);
|
|
38
|
+
if (v.kty !== 'EC' ||
|
|
39
|
+
v.crv !== 'P-256' ||
|
|
40
|
+
typeof v.x !== 'string' ||
|
|
41
|
+
typeof v.y !== 'string' ||
|
|
42
|
+
!/^[A-Za-z0-9_-]{43}$/.test(v.x) ||
|
|
43
|
+
!/^[A-Za-z0-9_-]{43}$/.test(v.y))
|
|
44
|
+
bad();
|
|
45
|
+
return { kty: 'EC', crv: 'P-256', x: v.x, y: v.y };
|
|
46
|
+
}
|
|
47
|
+
/** Runtime与Bridge共享安全公开投影,不包含任何密钥、bearer或可变执行参数。 */
|
|
48
|
+
export function parseNativeStudioPublicRegistration(raw) {
|
|
49
|
+
const root = exact(raw, ['revision', 'descriptor', 'grant', 'state', 'remoteObservedAt']), d = exact(root.descriptor, [
|
|
50
|
+
'protocol',
|
|
51
|
+
'resource',
|
|
52
|
+
'tenantId',
|
|
53
|
+
'projectId',
|
|
54
|
+
'runtimeKey',
|
|
55
|
+
'capabilityDigest',
|
|
56
|
+
'installationId',
|
|
57
|
+
'installationRevisionId',
|
|
58
|
+
'publicKey',
|
|
59
|
+
]);
|
|
60
|
+
if (d.protocol !== 'NATIVESTUDIO_RUNTIME_REGISTRATION_V1' ||
|
|
61
|
+
typeof d.resource !== 'string' ||
|
|
62
|
+
d.resource.length > 2048 ||
|
|
63
|
+
typeof d.capabilityDigest !== 'string' ||
|
|
64
|
+
!/^[a-f0-9]{64}$/.test(d.capabilityDigest))
|
|
65
|
+
bad();
|
|
66
|
+
const tenantId = uuid(d.tenantId), projectId = uuid(d.projectId);
|
|
67
|
+
let resource;
|
|
68
|
+
try {
|
|
69
|
+
resource = new URL(d.resource);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
bad();
|
|
73
|
+
}
|
|
74
|
+
if (resource.protocol !== 'https:' ||
|
|
75
|
+
resource.username ||
|
|
76
|
+
resource.password ||
|
|
77
|
+
resource.hash ||
|
|
78
|
+
resource.search ||
|
|
79
|
+
resource.pathname !== `/mcp/native/v1/projects/${projectId}` ||
|
|
80
|
+
resource.href !== d.resource)
|
|
81
|
+
bad();
|
|
82
|
+
const descriptor = {
|
|
83
|
+
protocol: d.protocol,
|
|
84
|
+
resource: d.resource,
|
|
85
|
+
tenantId,
|
|
86
|
+
projectId,
|
|
87
|
+
runtimeKey: key(d.runtimeKey),
|
|
88
|
+
capabilityDigest: d.capabilityDigest,
|
|
89
|
+
installationId: key(d.installationId),
|
|
90
|
+
installationRevisionId: key(d.installationRevisionId),
|
|
91
|
+
publicKey: publicKey(d.publicKey),
|
|
92
|
+
};
|
|
93
|
+
let grant = null;
|
|
94
|
+
if (root.grant !== null) {
|
|
95
|
+
const g = exact(root.grant, [
|
|
96
|
+
'protocol',
|
|
97
|
+
'tenantId',
|
|
98
|
+
'projectId',
|
|
99
|
+
'grantId',
|
|
100
|
+
'bindingId',
|
|
101
|
+
'bindingRevision',
|
|
102
|
+
'configurationVersion',
|
|
103
|
+
'selection',
|
|
104
|
+
'runtimeKey',
|
|
105
|
+
'installationId',
|
|
106
|
+
'installationRevisionId',
|
|
107
|
+
'publicKey',
|
|
108
|
+
'resource',
|
|
109
|
+
'revision',
|
|
110
|
+
'enabled',
|
|
111
|
+
'createdByPrincipalId',
|
|
112
|
+
'runtimePrincipalId',
|
|
113
|
+
'createdAt',
|
|
114
|
+
'expiresAt',
|
|
115
|
+
'challengeId',
|
|
116
|
+
'challengeExpiresAt',
|
|
117
|
+
'verifiedAt',
|
|
118
|
+
'revokedAt',
|
|
119
|
+
]);
|
|
120
|
+
for (const field of [
|
|
121
|
+
'tenantId',
|
|
122
|
+
'projectId',
|
|
123
|
+
'grantId',
|
|
124
|
+
'bindingId',
|
|
125
|
+
'createdByPrincipalId',
|
|
126
|
+
'runtimePrincipalId',
|
|
127
|
+
'challengeId',
|
|
128
|
+
])
|
|
129
|
+
uuid(g[field]);
|
|
130
|
+
for (const field of ['revision', 'bindingRevision', 'configurationVersion'])
|
|
131
|
+
revision(g[field]);
|
|
132
|
+
for (const field of ['createdAt', 'expiresAt', 'challengeExpiresAt'])
|
|
133
|
+
time(g[field]);
|
|
134
|
+
if (g.verifiedAt !== null)
|
|
135
|
+
time(g.verifiedAt);
|
|
136
|
+
if (g.revokedAt !== null)
|
|
137
|
+
time(g.revokedAt);
|
|
138
|
+
const selection = exact(g.selection, [
|
|
139
|
+
'hostKey',
|
|
140
|
+
'tenantKey',
|
|
141
|
+
'workspaceKey',
|
|
142
|
+
'projectKey',
|
|
143
|
+
'agentKey',
|
|
144
|
+
'agentVersion',
|
|
145
|
+
'modelOptionKey',
|
|
146
|
+
]);
|
|
147
|
+
for (const field of [
|
|
148
|
+
'hostKey',
|
|
149
|
+
'tenantKey',
|
|
150
|
+
'workspaceKey',
|
|
151
|
+
'projectKey',
|
|
152
|
+
'agentKey',
|
|
153
|
+
'modelOptionKey',
|
|
154
|
+
])
|
|
155
|
+
if (typeof selection[field] !== 'string' ||
|
|
156
|
+
!/^[a-z0-9][a-z0-9_-]{0,63}$/.test(selection[field]))
|
|
157
|
+
bad();
|
|
158
|
+
revision(selection.agentVersion);
|
|
159
|
+
const jwk = publicKey(g.publicKey);
|
|
160
|
+
if (g.protocol !== descriptor.protocol ||
|
|
161
|
+
g.resource !== descriptor.resource ||
|
|
162
|
+
g.tenantId !== tenantId ||
|
|
163
|
+
g.projectId !== projectId ||
|
|
164
|
+
g.runtimeKey !== descriptor.runtimeKey ||
|
|
165
|
+
g.installationId !== descriptor.installationId ||
|
|
166
|
+
g.installationRevisionId !== descriptor.installationRevisionId ||
|
|
167
|
+
jwk.x !== descriptor.publicKey.x ||
|
|
168
|
+
jwk.y !== descriptor.publicKey.y ||
|
|
169
|
+
typeof g.enabled !== 'boolean' ||
|
|
170
|
+
g.enabled !== (g.revokedAt === null))
|
|
171
|
+
bad();
|
|
172
|
+
grant = structuredClone(g);
|
|
173
|
+
}
|
|
174
|
+
if (![
|
|
175
|
+
'AWAITING_NATIVE_APPROVAL',
|
|
176
|
+
'AWAITING_KEY_PROOF',
|
|
177
|
+
'VERIFIED_KEY',
|
|
178
|
+
'REVOKED_OR_EXPIRED',
|
|
179
|
+
].includes(root.state))
|
|
180
|
+
bad();
|
|
181
|
+
const remoteObservedAt = root.remoteObservedAt === null ? null : time(root.remoteObservedAt);
|
|
182
|
+
if ((root.state === 'AWAITING_NATIVE_APPROVAL') !== (grant === null) ||
|
|
183
|
+
(root.state === 'VERIFIED_KEY' &&
|
|
184
|
+
(!remoteObservedAt || !grant?.verifiedAt || grant.enabled !== true)))
|
|
185
|
+
bad();
|
|
186
|
+
return {
|
|
187
|
+
revision: revision(root.revision),
|
|
188
|
+
descriptor,
|
|
189
|
+
grant,
|
|
190
|
+
state: root.state,
|
|
191
|
+
remoteObservedAt,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** 内部路由也必须验证精确字段,避免保留 OAuth 参数被注入。 */
|
|
2
|
+
export function parseRuntimeOauthContext(value) {
|
|
3
|
+
if (value === undefined)
|
|
4
|
+
return undefined;
|
|
5
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
6
|
+
throw new Error('OAUTH_CONTEXT_INVALID');
|
|
7
|
+
const v = value;
|
|
8
|
+
if (v.provider !== 'knowledge' ||
|
|
9
|
+
typeof v.externalTenantId !== 'string' ||
|
|
10
|
+
!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(v.externalTenantId))
|
|
11
|
+
throw new Error('OAUTH_CONTEXT_INVALID');
|
|
12
|
+
if (v.version === 2) {
|
|
13
|
+
if (Object.keys(v).sort().join(',') !== 'externalTenantId,provider,tenantRef,version' ||
|
|
14
|
+
typeof v.tenantRef !== 'string' ||
|
|
15
|
+
!/^knowledge-tenant:\/\/tenant\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(v.tenantRef))
|
|
16
|
+
throw new Error('OAUTH_CONTEXT_INVALID');
|
|
17
|
+
return Object.freeze({
|
|
18
|
+
provider: 'knowledge',
|
|
19
|
+
version: 2,
|
|
20
|
+
tenantRef: v.tenantRef,
|
|
21
|
+
externalTenantId: v.externalTenantId,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
if (Object.keys(v).sort().join(',') !== 'externalTenantId,projectRef,provider,version' ||
|
|
25
|
+
v.provider !== 'knowledge' ||
|
|
26
|
+
v.version !== 1 ||
|
|
27
|
+
typeof v.projectRef !== 'string' ||
|
|
28
|
+
!/^knowledge-project:\/\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}\/tenant\/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(v.projectRef) ||
|
|
29
|
+
typeof v.externalTenantId !== 'string' ||
|
|
30
|
+
!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(v.externalTenantId))
|
|
31
|
+
throw new Error('OAUTH_CONTEXT_INVALID');
|
|
32
|
+
return Object.freeze({
|
|
33
|
+
provider: 'knowledge',
|
|
34
|
+
version: 1,
|
|
35
|
+
projectRef: v.projectRef,
|
|
36
|
+
externalTenantId: v.externalTenantId,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|