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,46 @@
|
|
|
1
|
+
/** NL-03A 端点格式;Provider 的实际格式须在接线时单独协商。 */
|
|
2
|
+
export const LIVE_PCM_SAMPLE_RATE = 24000;
|
|
3
|
+
export const LIVE_PCM_MAX_FRAME_BYTES = 4800;
|
|
4
|
+
export const LIVE_PCM_MAX_BUFFER_BYTES = 48000;
|
|
5
|
+
export const LIVE_PCM_MAX_RECORDS = 256;
|
|
6
|
+
export function validLiveAudioBinding(value) {
|
|
7
|
+
if (!value || typeof value !== 'object')
|
|
8
|
+
return false;
|
|
9
|
+
const c = value.cursor;
|
|
10
|
+
return (c?.schemaVersion === 1 &&
|
|
11
|
+
typeof c.liveSessionRef === 'string' &&
|
|
12
|
+
c.liveSessionRef.length > 0 &&
|
|
13
|
+
c.liveSessionRef.length <= 256 &&
|
|
14
|
+
c.liveSessionRef.trim() === c.liveSessionRef &&
|
|
15
|
+
!/[\u0000-\u001f\u007f]/.test(c.liveSessionRef) &&
|
|
16
|
+
Number.isSafeInteger(c.contextRevision) &&
|
|
17
|
+
c.contextRevision > 0 &&
|
|
18
|
+
Number.isSafeInteger(c.generation) &&
|
|
19
|
+
c.generation > 0 &&
|
|
20
|
+
typeof value.endpointRef === 'string' &&
|
|
21
|
+
value.endpointRef.length > 0 &&
|
|
22
|
+
value.endpointRef.length <= 256 &&
|
|
23
|
+
value.endpointRef.trim() === value.endpointRef &&
|
|
24
|
+
!/[\u0000-\u001f\u007f]/.test(value.endpointRef) &&
|
|
25
|
+
typeof value.endpointEpoch === 'string' &&
|
|
26
|
+
/^[A-Za-z0-9_-]{8,128}$/.test(value.endpointEpoch));
|
|
27
|
+
}
|
|
28
|
+
export function sameLiveAudioBinding(a, b) {
|
|
29
|
+
return (a.endpointEpoch === b.endpointEpoch &&
|
|
30
|
+
a.endpointRef === b.endpointRef &&
|
|
31
|
+
a.cursor.liveSessionRef === b.cursor.liveSessionRef &&
|
|
32
|
+
a.cursor.contextRevision === b.cursor.contextRevision &&
|
|
33
|
+
a.cursor.generation === b.cursor.generation);
|
|
34
|
+
}
|
|
35
|
+
export function validLivePcmFrame(frame) {
|
|
36
|
+
return (validLiveAudioBinding(frame) &&
|
|
37
|
+
typeof frame.outputRef === 'string' &&
|
|
38
|
+
/^[A-Za-z0-9_-]{1,128}$/.test(frame.outputRef) &&
|
|
39
|
+
Number.isSafeInteger(frame.sequence) &&
|
|
40
|
+
frame.sequence >= 0 &&
|
|
41
|
+
frame.sequence < Number.MAX_SAFE_INTEGER &&
|
|
42
|
+
frame.pcm instanceof Uint8Array &&
|
|
43
|
+
frame.pcm.byteLength > 0 &&
|
|
44
|
+
frame.pcm.byteLength <= LIVE_PCM_MAX_FRAME_BYTES &&
|
|
45
|
+
frame.pcm.byteLength % 2 === 0);
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const MCP_REFRESH_MAX_AGE_MS = 30 * 24 * 60 * 60 * 1000;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AGENTSIM_MCP_SCOPES, HOST_INTEGRATION_MCP_SCOPES } from './contracts/integrations.js';
|
|
2
|
+
import { TASK_SCOPES } from './tasks.js';
|
|
3
|
+
import { INSTALLATION_MCP_SCOPES } from './installation-mcp.js';
|
|
4
|
+
import { DESKTOP_MCP_SCOPES } from './desktop-mcp.js';
|
|
5
|
+
import { BOT_ENTRY_MCP_SCOPES } from './bots/entries.js';
|
|
6
|
+
import { BOT_CAPABILITY_SCOPES } from './bots/capabilities.js';
|
|
7
|
+
import { BOT_COMMUNICATION_SCOPES } from './bots/communication.js';
|
|
8
|
+
import { BOT_RELAY_SCOPES } from './bots/relay.js';
|
|
9
|
+
import { BOT_DELEGATION_POLICY_SCOPES } from './bots/delegation.js';
|
|
10
|
+
import { BOT_LIFECYCLE_SCOPES } from './bots/lifecycle.js';
|
|
11
|
+
/** Enterprise MCP 资源公告、换码和刷新持久化共用同一目录;不赋予客户端未同意的权限。 */
|
|
12
|
+
export const EXTERNAL_MCP_SCOPES = [
|
|
13
|
+
...AGENTSIM_MCP_SCOPES,
|
|
14
|
+
...HOST_INTEGRATION_MCP_SCOPES,
|
|
15
|
+
...TASK_SCOPES,
|
|
16
|
+
...INSTALLATION_MCP_SCOPES,
|
|
17
|
+
...DESKTOP_MCP_SCOPES,
|
|
18
|
+
...BOT_ENTRY_MCP_SCOPES,
|
|
19
|
+
...BOT_CAPABILITY_SCOPES,
|
|
20
|
+
...BOT_COMMUNICATION_SCOPES,
|
|
21
|
+
...BOT_RELAY_SCOPES,
|
|
22
|
+
...BOT_DELEGATION_POLICY_SCOPES,
|
|
23
|
+
...BOT_LIFECYCLE_SCOPES,
|
|
24
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// 仅验证服务端返回的浏览器导航地址;Provider 注册与授权权限仍由原生系统决定。
|
|
2
|
+
export function isProviderAuthorizationUrl(value) {
|
|
3
|
+
if (typeof value !== 'string' ||
|
|
4
|
+
value.length > 8192 ||
|
|
5
|
+
!value.startsWith('https://') ||
|
|
6
|
+
/[\u0000-\u0020\u007f\\]/.test(value))
|
|
7
|
+
return false;
|
|
8
|
+
try {
|
|
9
|
+
const target = new URL(value);
|
|
10
|
+
return (target.protocol === 'https:' &&
|
|
11
|
+
Boolean(target.hostname) &&
|
|
12
|
+
!target.username &&
|
|
13
|
+
!target.password &&
|
|
14
|
+
!target.hash);
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
export const PLATFORM_WORK_EVENT_TYPE = 'io.agentstack.work.changed.v1';
|
|
2
|
+
export const PLATFORM_WORK_SCHEMA = 'urn:agent-stack:schemas:work-fact:v1';
|
|
3
|
+
export const PLATFORM_EVENT_CONSUMER_REF = 'agent-stack:platform-events:v1';
|
|
4
|
+
export const PLATFORM_WORK_KINDS = [
|
|
5
|
+
'RUN_STATE_CHANGED',
|
|
6
|
+
'TASK_RUN_STATE_CHANGED',
|
|
7
|
+
'RUN_ARTIFACTS_REGISTERED',
|
|
8
|
+
'RUN_REPORT_RECORDED',
|
|
9
|
+
'BOT_REPORT_RECORDED',
|
|
10
|
+
];
|
|
11
|
+
export const PLATFORM_WORK_REFERENCES = {
|
|
12
|
+
RUN_STATE_CHANGED: { resourcePrefix: 'urn:agent-stack:run:', parentPrefix: null },
|
|
13
|
+
TASK_RUN_STATE_CHANGED: {
|
|
14
|
+
resourcePrefix: 'urn:agent-stack:task-run:',
|
|
15
|
+
parentPrefix: 'urn:agent-stack:run:',
|
|
16
|
+
},
|
|
17
|
+
RUN_ARTIFACTS_REGISTERED: {
|
|
18
|
+
resourcePrefix: 'urn:agent-stack:run-handoff:',
|
|
19
|
+
parentPrefix: 'urn:agent-stack:run:',
|
|
20
|
+
},
|
|
21
|
+
RUN_REPORT_RECORDED: {
|
|
22
|
+
resourcePrefix: 'urn:agent-stack:run-handoff:',
|
|
23
|
+
parentPrefix: 'urn:agent-stack:run:',
|
|
24
|
+
},
|
|
25
|
+
BOT_REPORT_RECORDED: {
|
|
26
|
+
resourcePrefix: 'urn:agent-stack:bot-report:',
|
|
27
|
+
parentPrefix: 'urn:agent-stack:mission:',
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
export class PlatformEventContractError extends Error {
|
|
31
|
+
code;
|
|
32
|
+
status = 400;
|
|
33
|
+
constructor(code) {
|
|
34
|
+
super(code);
|
|
35
|
+
this.code = code;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const fail = () => {
|
|
39
|
+
throw new PlatformEventContractError('PLATFORM_EVENT_INPUT_INVALID');
|
|
40
|
+
};
|
|
41
|
+
function object(raw, keys) {
|
|
42
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
43
|
+
return fail();
|
|
44
|
+
if (Object.keys(raw).some((k) => !keys.includes(k)))
|
|
45
|
+
return fail();
|
|
46
|
+
return raw;
|
|
47
|
+
}
|
|
48
|
+
function text(raw, max = 256) {
|
|
49
|
+
if (typeof raw !== 'string' ||
|
|
50
|
+
!raw.length ||
|
|
51
|
+
raw.length > max ||
|
|
52
|
+
/[\u0000-\u001f\u007f]/u.test(raw))
|
|
53
|
+
return fail();
|
|
54
|
+
return raw;
|
|
55
|
+
}
|
|
56
|
+
export function platformSequence(raw) {
|
|
57
|
+
const value = text(raw, 19);
|
|
58
|
+
if (!/^(0|[1-9][0-9]*)$/.test(value) || BigInt(value) > 9223372036854775807n)
|
|
59
|
+
return fail();
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
function strings(raw) {
|
|
63
|
+
if (!Array.isArray(raw) || !raw.length || raw.length > 64)
|
|
64
|
+
return fail();
|
|
65
|
+
const values = raw.map((v) => text(v));
|
|
66
|
+
if (new Set(values).size !== values.length)
|
|
67
|
+
return fail();
|
|
68
|
+
return values.sort();
|
|
69
|
+
}
|
|
70
|
+
export function parsePlatformWorkFact(raw) {
|
|
71
|
+
const v = object(raw, [
|
|
72
|
+
'schemaVersion',
|
|
73
|
+
'kind',
|
|
74
|
+
'scope',
|
|
75
|
+
'resourceRef',
|
|
76
|
+
'parentRef',
|
|
77
|
+
'revision',
|
|
78
|
+
'status',
|
|
79
|
+
'phase',
|
|
80
|
+
'cancelRequested',
|
|
81
|
+
'artifactCount',
|
|
82
|
+
]);
|
|
83
|
+
if (v.schemaVersion !== 1 || !PLATFORM_WORK_KINDS.includes(v.kind))
|
|
84
|
+
return fail();
|
|
85
|
+
const s = object(v.scope, ['tenantId', 'workspaceId', 'projectId']);
|
|
86
|
+
const value = {
|
|
87
|
+
schemaVersion: 1,
|
|
88
|
+
kind: v.kind,
|
|
89
|
+
scope: {
|
|
90
|
+
tenantId: text(s.tenantId),
|
|
91
|
+
workspaceId: text(s.workspaceId),
|
|
92
|
+
projectId: text(s.projectId),
|
|
93
|
+
},
|
|
94
|
+
resourceRef: text(v.resourceRef, 512),
|
|
95
|
+
parentRef: v.parentRef === null ? null : text(v.parentRef, 512),
|
|
96
|
+
revision: platformSequence(v.revision),
|
|
97
|
+
};
|
|
98
|
+
const refs = PLATFORM_WORK_REFERENCES[value.kind];
|
|
99
|
+
if (value.revision === '0' ||
|
|
100
|
+
!value.resourceRef.startsWith(refs.resourcePrefix) ||
|
|
101
|
+
value.resourceRef.length === refs.resourcePrefix.length)
|
|
102
|
+
return fail();
|
|
103
|
+
if (refs.parentPrefix === null
|
|
104
|
+
? value.parentRef !== null
|
|
105
|
+
: !value.parentRef?.startsWith(refs.parentPrefix) ||
|
|
106
|
+
value.parentRef.length === refs.parentPrefix.length)
|
|
107
|
+
return fail();
|
|
108
|
+
const state = value.kind === 'RUN_STATE_CHANGED' || value.kind === 'TASK_RUN_STATE_CHANGED';
|
|
109
|
+
if (state) {
|
|
110
|
+
value.status = text(v.status, 64);
|
|
111
|
+
if (v.artifactCount !== undefined)
|
|
112
|
+
return fail();
|
|
113
|
+
if (value.kind === 'TASK_RUN_STATE_CHANGED') {
|
|
114
|
+
value.phase = text(v.phase, 64);
|
|
115
|
+
if (typeof v.cancelRequested !== 'boolean')
|
|
116
|
+
return fail();
|
|
117
|
+
value.cancelRequested = v.cancelRequested;
|
|
118
|
+
}
|
|
119
|
+
else if (v.phase !== undefined || v.cancelRequested !== undefined)
|
|
120
|
+
return fail();
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (v.status !== undefined ||
|
|
124
|
+
v.phase !== undefined ||
|
|
125
|
+
v.cancelRequested !== undefined ||
|
|
126
|
+
!Number.isSafeInteger(v.artifactCount) ||
|
|
127
|
+
Number(v.artifactCount) < 0)
|
|
128
|
+
return fail();
|
|
129
|
+
value.artifactCount = Number(v.artifactCount);
|
|
130
|
+
}
|
|
131
|
+
return value;
|
|
132
|
+
}
|
|
133
|
+
/** 纯合同只校验 AS 封套;既有 Bridge 叶子传入 SDK 原 parser,不把 SDK 运行实现带入所有 Host。 */
|
|
134
|
+
export function parsePlatformExchangeInput(raw, parseRegistration) {
|
|
135
|
+
const v = object(raw, ['direction', 'registration', 'projectIds', 'factKinds', 'afterSequence']);
|
|
136
|
+
if (v.direction !== 'INBOUND' && v.direction !== 'OUTBOUND')
|
|
137
|
+
return fail();
|
|
138
|
+
if (v.direction === 'INBOUND' && v.afterSequence !== null)
|
|
139
|
+
return fail();
|
|
140
|
+
let registration;
|
|
141
|
+
try {
|
|
142
|
+
registration = parseRegistration(v.registration);
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
return fail();
|
|
146
|
+
}
|
|
147
|
+
const nativeTypes = {
|
|
148
|
+
'native-knowledge': 'io.nativeknowledge.tenant-material.changed.v1',
|
|
149
|
+
'native-marketing': 'io.nativemarketing.knowledge-reference.adopted.v1',
|
|
150
|
+
};
|
|
151
|
+
const native = v.direction === 'INBOUND' &&
|
|
152
|
+
nativeTypes[registration.source.serviceRef] === registration.grant.eventType;
|
|
153
|
+
if (!native &&
|
|
154
|
+
(registration.grant.eventType !== PLATFORM_WORK_EVENT_TYPE ||
|
|
155
|
+
registration.source.serviceRef !== 'agent-stack'))
|
|
156
|
+
return fail();
|
|
157
|
+
if (native && (!Array.isArray(v.factKinds) || v.factKinds.length !== 0))
|
|
158
|
+
return fail();
|
|
159
|
+
const kinds = native ? [] : strings(v.factKinds);
|
|
160
|
+
if (kinds.some((k) => !PLATFORM_WORK_KINDS.includes(k)))
|
|
161
|
+
return fail();
|
|
162
|
+
return {
|
|
163
|
+
direction: v.direction,
|
|
164
|
+
registration,
|
|
165
|
+
projectIds: strings(v.projectIds),
|
|
166
|
+
factKinds: kinds,
|
|
167
|
+
afterSequence: v.afterSequence === null ? null : platformSequence(v.afterSequence),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export function parsePlatformRetryInput(raw) {
|
|
171
|
+
const v = object(raw, ['requestId', 'deliveryId', 'expectedGeneration']);
|
|
172
|
+
if (!Number.isSafeInteger(v.expectedGeneration) || Number(v.expectedGeneration) < 0)
|
|
173
|
+
return fail();
|
|
174
|
+
const deliveryId = text(v.deliveryId);
|
|
175
|
+
if (!/^[a-f0-9]{64}$/.test(deliveryId))
|
|
176
|
+
return fail();
|
|
177
|
+
return {
|
|
178
|
+
requestId: text(v.requestId),
|
|
179
|
+
deliveryId,
|
|
180
|
+
expectedGeneration: Number(v.expectedGeneration),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** 同一核验事实的有限用户说明;函数保持自包含,供受限 iframe 与正式 UI 共同使用。 */
|
|
2
|
+
export function sourceReplyPresentation(view, locale = 'en') {
|
|
3
|
+
const zh = locale === 'zh' || locale.startsWith('zh-');
|
|
4
|
+
const checkLabel = zh ? '再次查看' : 'Check again';
|
|
5
|
+
if (view?.delivery === 'DELIVERED')
|
|
6
|
+
return {
|
|
7
|
+
message: zh ? '引用值已核验。' : 'Source values verified.',
|
|
8
|
+
checkLabel,
|
|
9
|
+
canRecheck: false,
|
|
10
|
+
};
|
|
11
|
+
const messages = {
|
|
12
|
+
NOT_FINALIZED: [
|
|
13
|
+
'回复尚未完成核验,请再次查看。',
|
|
14
|
+
'Reply verification is unfinished. Check again.',
|
|
15
|
+
],
|
|
16
|
+
NATIVE_NOT_COMPLETED: [
|
|
17
|
+
'执行结果尚未确认,请再次查看。',
|
|
18
|
+
'Execution is not confirmed. Check again.',
|
|
19
|
+
],
|
|
20
|
+
SOURCE_CONFLICT: [
|
|
21
|
+
'来源引用存在冲突,本次回复未交付。',
|
|
22
|
+
'Conflicting source references prevented delivery.',
|
|
23
|
+
],
|
|
24
|
+
SOURCE_UNSUPPORTED: [
|
|
25
|
+
'来源尚不支持核验,请联系管理员。',
|
|
26
|
+
'This source cannot be verified yet. Contact your administrator.',
|
|
27
|
+
],
|
|
28
|
+
SOURCE_BYTES_INVALID: [
|
|
29
|
+
'来源内容无法核验,本次回复未交付。',
|
|
30
|
+
'Source content could not be verified. The reply was withheld.',
|
|
31
|
+
],
|
|
32
|
+
SOURCE_PERMISSION_REQUIRED: [
|
|
33
|
+
'读取或公开使用资料的授权不足,请检查授权后再次查看。',
|
|
34
|
+
'Source reading or public use requires authorization. Check again after access is restored.',
|
|
35
|
+
],
|
|
36
|
+
QUOTE_UNAVAILABLE: [
|
|
37
|
+
'引用暂时无法读取,请再次查看。',
|
|
38
|
+
'The source quote is unavailable. Check again.',
|
|
39
|
+
],
|
|
40
|
+
CAPACITY_REACHED: [
|
|
41
|
+
'回复核验存储已达容量上限,请联系管理员。',
|
|
42
|
+
'Reply verification storage reached its capacity. Contact your administrator.',
|
|
43
|
+
],
|
|
44
|
+
UNASSESSED: [
|
|
45
|
+
'这条回复尚未核验,请再次查看。',
|
|
46
|
+
'This reply has not been verified. Check again.',
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
const message = view?.reason
|
|
50
|
+
? messages[view.reason][zh ? 0 : 1]
|
|
51
|
+
: view?.delivery === 'PENDING'
|
|
52
|
+
? zh
|
|
53
|
+
? '正在核验回复,请再次查看。'
|
|
54
|
+
: 'Reply verification is pending. Check again.'
|
|
55
|
+
: zh
|
|
56
|
+
? '暂时无法读取回复核验状态,请再次查看。'
|
|
57
|
+
: 'Reply verification status is unavailable. Check again.';
|
|
58
|
+
return { message, checkLabel, canRecheck: true };
|
|
59
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/** 来源引用只证明选取字节;不替代事实、当前性、公开许可或原会话授权。 */
|
|
2
|
+
export const SOURCE_REPLY_LIMITS = Object.freeze({
|
|
3
|
+
documents: 8,
|
|
4
|
+
documentBytes: 32768,
|
|
5
|
+
quoteBytes: 4096,
|
|
6
|
+
quotes: 16,
|
|
7
|
+
parts: 32,
|
|
8
|
+
narrativeBytes: 16384,
|
|
9
|
+
wireBytes: 65536,
|
|
10
|
+
// 兼容旧 SDK v1 的宿主消息预算,不允许仅在 iframe 显示却无法回调的长答案。
|
|
11
|
+
textCodeUnits: 32768,
|
|
12
|
+
});
|
|
13
|
+
/** 失败文字由平台固定,不能回退到尚未核实的 Native 原文。 */
|
|
14
|
+
export const SOURCE_REPLY_UNVERIFIED_TEXT = 'This reply could not be verified. Please check its status.';
|
|
15
|
+
/** 所有客户端校验相同交付投影;不一致的片段/文字不能触发 Native 原文降级。 */
|
|
16
|
+
export function parseSourceReplyView(raw) {
|
|
17
|
+
const invalid = () => {
|
|
18
|
+
throw new Error('SOURCE_REPLY_VIEW_INVALID');
|
|
19
|
+
};
|
|
20
|
+
const record = (value, keys) => {
|
|
21
|
+
if (!value ||
|
|
22
|
+
typeof value !== 'object' ||
|
|
23
|
+
Array.isArray(value) ||
|
|
24
|
+
Object.getPrototypeOf(value) !== Object.prototype ||
|
|
25
|
+
Object.keys(value).sort().join(',') !== keys.sort().join(','))
|
|
26
|
+
return invalid();
|
|
27
|
+
const fields = Object.getOwnPropertyDescriptors(value);
|
|
28
|
+
if (Reflect.ownKeys(value).length !== keys.length ||
|
|
29
|
+
Object.values(fields).some((field) => !('value' in field) || !field.enumerable))
|
|
30
|
+
return invalid();
|
|
31
|
+
return value;
|
|
32
|
+
};
|
|
33
|
+
const row = record(raw, ['version', 'replyRef', 'status', 'delivery', 'reason', 'text', 'parts']);
|
|
34
|
+
if (row.version !== 1 ||
|
|
35
|
+
typeof row.replyRef !== 'string' ||
|
|
36
|
+
!/^srpl_[0-9a-f-]{36}$/.test(row.replyRef) ||
|
|
37
|
+
typeof row.status !== 'string' ||
|
|
38
|
+
!['PREPARING', 'QUOTED', 'NEEDS_REVIEW', 'SOURCE_UNAVAILABLE'].includes(row.status) ||
|
|
39
|
+
typeof row.delivery !== 'string' ||
|
|
40
|
+
!['PENDING', 'DELIVERED', 'WITHHELD'].includes(row.delivery) ||
|
|
41
|
+
(row.reason !== null &&
|
|
42
|
+
(typeof row.reason !== 'string' ||
|
|
43
|
+
![
|
|
44
|
+
'NOT_FINALIZED',
|
|
45
|
+
'NATIVE_NOT_COMPLETED',
|
|
46
|
+
'SOURCE_CONFLICT',
|
|
47
|
+
'SOURCE_UNSUPPORTED',
|
|
48
|
+
'SOURCE_BYTES_INVALID',
|
|
49
|
+
'SOURCE_PERMISSION_REQUIRED',
|
|
50
|
+
'QUOTE_UNAVAILABLE',
|
|
51
|
+
'CAPACITY_REACHED',
|
|
52
|
+
'UNASSESSED',
|
|
53
|
+
].includes(row.reason))) ||
|
|
54
|
+
!Array.isArray(row.parts) ||
|
|
55
|
+
row.parts.length > SOURCE_REPLY_LIMITS.parts)
|
|
56
|
+
return invalid();
|
|
57
|
+
let bytes = 0;
|
|
58
|
+
const text = (value, max) => {
|
|
59
|
+
if (typeof value !== 'string' ||
|
|
60
|
+
/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/u.test(value))
|
|
61
|
+
return invalid();
|
|
62
|
+
const length = new TextEncoder().encode(value).length;
|
|
63
|
+
bytes += length;
|
|
64
|
+
if (length > max)
|
|
65
|
+
return invalid();
|
|
66
|
+
return value;
|
|
67
|
+
};
|
|
68
|
+
const parts = row.parts.map((raw) => {
|
|
69
|
+
const kind = Object.getOwnPropertyDescriptor(raw ?? {}, 'kind')?.value;
|
|
70
|
+
const part = record(raw, kind === 'text'
|
|
71
|
+
? ['kind', 'text']
|
|
72
|
+
: ['kind', 'quoteRef', 'sourceRef', 'sourceSha256', 'text']);
|
|
73
|
+
if (kind === 'text')
|
|
74
|
+
return { kind, text: text(part.text, SOURCE_REPLY_LIMITS.narrativeBytes) };
|
|
75
|
+
if (kind !== 'quote' ||
|
|
76
|
+
typeof part.quoteRef !== 'string' ||
|
|
77
|
+
!/^srq_[0-9a-f-]{36}$/.test(part.quoteRef) ||
|
|
78
|
+
typeof part.sourceRef !== 'string' ||
|
|
79
|
+
!part.sourceRef ||
|
|
80
|
+
part.sourceRef.length > 128 ||
|
|
81
|
+
typeof part.sourceSha256 !== 'string' ||
|
|
82
|
+
!/^sha256:[a-f0-9]{64}$/.test(part.sourceSha256))
|
|
83
|
+
return invalid();
|
|
84
|
+
return {
|
|
85
|
+
kind,
|
|
86
|
+
quoteRef: part.quoteRef,
|
|
87
|
+
sourceRef: part.sourceRef,
|
|
88
|
+
sourceSha256: part.sourceSha256,
|
|
89
|
+
text: text(part.text, SOURCE_REPLY_LIMITS.quoteBytes),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
if (row.delivery === 'DELIVERED') {
|
|
93
|
+
if (row.status !== 'QUOTED' ||
|
|
94
|
+
row.reason !== null ||
|
|
95
|
+
!parts.length ||
|
|
96
|
+
typeof row.text !== 'string' ||
|
|
97
|
+
row.text.length > SOURCE_REPLY_LIMITS.textCodeUnits ||
|
|
98
|
+
parts.map((part) => part.text).join('') !== row.text ||
|
|
99
|
+
new TextEncoder().encode(JSON.stringify(row.text)).length > SOURCE_REPLY_LIMITS.wireBytes)
|
|
100
|
+
return invalid();
|
|
101
|
+
}
|
|
102
|
+
else if (row.text !== null || parts.length || row.status === 'QUOTED')
|
|
103
|
+
return invalid();
|
|
104
|
+
if (bytes > SOURCE_REPLY_LIMITS.wireBytes)
|
|
105
|
+
return invalid();
|
|
106
|
+
return {
|
|
107
|
+
version: 1,
|
|
108
|
+
replyRef: row.replyRef,
|
|
109
|
+
status: row.status,
|
|
110
|
+
delivery: row.delivery,
|
|
111
|
+
reason: row.reason,
|
|
112
|
+
text: row.text,
|
|
113
|
+
parts,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/** 严格校验实例配对,缺字段或未知 Reader 不能降级成 off。 */
|
|
117
|
+
export function parseSourceReplyCapabilities(raw) {
|
|
118
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
119
|
+
throw new Error('SOURCE_REPLY_CAPABILITY_INVALID');
|
|
120
|
+
const fields = Object.getOwnPropertyDescriptors(raw);
|
|
121
|
+
if (Reflect.ownKeys(raw).length !== 3 ||
|
|
122
|
+
Object.keys(fields).sort().join(',') !== 'mode,readerVersion,version' ||
|
|
123
|
+
Object.values(fields).some((field) => !('value' in field) || !field.enumerable) ||
|
|
124
|
+
fields.version?.value !== 1 ||
|
|
125
|
+
fields.readerVersion?.value !== 1 ||
|
|
126
|
+
!['off', 'required'].includes(fields.mode?.value))
|
|
127
|
+
throw new Error('SOURCE_REPLY_CAPABILITY_INVALID');
|
|
128
|
+
return { version: 1, mode: fields.mode.value, readerVersion: 1 };
|
|
129
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Read a Fetch body without consuming or retaining data beyond its byte budget. */
|
|
2
|
+
export async function readBoundedRequestBytes(request, maximumBytes) {
|
|
3
|
+
if (!Number.isSafeInteger(maximumBytes) || maximumBytes < 1)
|
|
4
|
+
throw new RangeError('maximumBytes must be a positive safe integer');
|
|
5
|
+
if (!request.body)
|
|
6
|
+
return new Uint8Array(0);
|
|
7
|
+
const reader = request.body.getReader();
|
|
8
|
+
let size = 0;
|
|
9
|
+
let bytes = new Uint8Array(0);
|
|
10
|
+
try {
|
|
11
|
+
while (true) {
|
|
12
|
+
const chunk = await reader.read();
|
|
13
|
+
if (chunk.done)
|
|
14
|
+
break;
|
|
15
|
+
size += chunk.value.byteLength;
|
|
16
|
+
if (size > maximumBytes)
|
|
17
|
+
throw new Error('BODY_TOO_LARGE');
|
|
18
|
+
if (size > bytes.length) {
|
|
19
|
+
const next = new Uint8Array(Math.min(maximumBytes, Math.max(size, bytes.length * 2, 8192)));
|
|
20
|
+
next.set(bytes);
|
|
21
|
+
bytes = next;
|
|
22
|
+
}
|
|
23
|
+
bytes.set(chunk.value, size - chunk.value.byteLength);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
// Cancellation must not let an uncooperative source delay the bounded response.
|
|
28
|
+
void reader.cancel().catch(() => undefined);
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
reader.releaseLock();
|
|
33
|
+
}
|
|
34
|
+
return size === bytes.length ? bytes : bytes.slice(0, size);
|
|
35
|
+
}
|
|
36
|
+
export async function readBoundedRequestText(request, maximumBytes) {
|
|
37
|
+
return new TextDecoder().decode(await readBoundedRequestBytes(request, maximumBytes));
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { TaskValidationError } from './tasks.js';
|
|
2
|
+
import { PLATFORM_WORK_KINDS, PLATFORM_WORK_REFERENCES, platformSequence, } from './platform-events.js';
|
|
3
|
+
export const TASK_WORK_KINDS = PLATFORM_WORK_KINDS.filter((kind) => kind !== 'BOT_REPORT_RECORDED');
|
|
4
|
+
function invalid() {
|
|
5
|
+
throw new TaskValidationError('INVALID_TASK_INPUT', 'Invalid Task work-event input');
|
|
6
|
+
}
|
|
7
|
+
function id(raw) {
|
|
8
|
+
if (typeof raw !== 'string' || !/^[A-Za-z0-9_-]{1,128}$/.test(raw))
|
|
9
|
+
invalid();
|
|
10
|
+
return raw;
|
|
11
|
+
}
|
|
12
|
+
export function parseTaskWorkEventInput(raw) {
|
|
13
|
+
if (!raw || typeof raw !== 'object' || Array.isArray(raw))
|
|
14
|
+
invalid();
|
|
15
|
+
const v = raw, op = v.operation;
|
|
16
|
+
const fields = {
|
|
17
|
+
discover: ['operation'],
|
|
18
|
+
subscribe: [
|
|
19
|
+
'operation',
|
|
20
|
+
'subscriptionId',
|
|
21
|
+
'requestId',
|
|
22
|
+
'expectedGeneration',
|
|
23
|
+
'factKinds',
|
|
24
|
+
'resourcePrefixes',
|
|
25
|
+
'afterFactSequence',
|
|
26
|
+
],
|
|
27
|
+
read: ['operation', 'subscriptionId', 'batchId'],
|
|
28
|
+
acknowledge: [
|
|
29
|
+
'operation',
|
|
30
|
+
'subscriptionId',
|
|
31
|
+
'requestId',
|
|
32
|
+
'expectedGeneration',
|
|
33
|
+
'batchId',
|
|
34
|
+
'fingerprint',
|
|
35
|
+
],
|
|
36
|
+
cancel: ['operation', 'subscriptionId', 'requestId', 'expectedGeneration'],
|
|
37
|
+
};
|
|
38
|
+
if (typeof op !== 'string' ||
|
|
39
|
+
!Object.hasOwn(fields, op) ||
|
|
40
|
+
Object.keys(v).some((key) => !fields[op].includes(key)))
|
|
41
|
+
invalid();
|
|
42
|
+
if (op === 'discover')
|
|
43
|
+
return { operation: 'discover' };
|
|
44
|
+
const subscriptionId = id(v.subscriptionId);
|
|
45
|
+
if (op === 'read')
|
|
46
|
+
return {
|
|
47
|
+
operation: 'read',
|
|
48
|
+
subscriptionId,
|
|
49
|
+
...(v.batchId === undefined ? {} : { batchId: id(v.batchId) }),
|
|
50
|
+
};
|
|
51
|
+
const requestId = id(v.requestId), expectedGeneration = Number(v.expectedGeneration);
|
|
52
|
+
if (typeof v.expectedGeneration !== 'number' ||
|
|
53
|
+
!Number.isSafeInteger(expectedGeneration) ||
|
|
54
|
+
expectedGeneration < 0 ||
|
|
55
|
+
expectedGeneration >= Number.MAX_SAFE_INTEGER)
|
|
56
|
+
invalid();
|
|
57
|
+
if (op === 'cancel')
|
|
58
|
+
return { operation: 'cancel', subscriptionId, requestId, expectedGeneration };
|
|
59
|
+
if (op === 'acknowledge') {
|
|
60
|
+
if (typeof v.fingerprint !== 'string' || !/^[a-f0-9]{64}$/.test(v.fingerprint))
|
|
61
|
+
invalid();
|
|
62
|
+
return {
|
|
63
|
+
operation: 'acknowledge',
|
|
64
|
+
subscriptionId,
|
|
65
|
+
requestId,
|
|
66
|
+
expectedGeneration,
|
|
67
|
+
batchId: id(v.batchId),
|
|
68
|
+
fingerprint: v.fingerprint,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (!Array.isArray(v.factKinds) ||
|
|
72
|
+
!v.factKinds.length ||
|
|
73
|
+
v.factKinds.some((kind) => !TASK_WORK_KINDS.includes(kind)) ||
|
|
74
|
+
new Set(v.factKinds).size !== v.factKinds.length ||
|
|
75
|
+
!Array.isArray(v.resourcePrefixes) ||
|
|
76
|
+
!v.resourcePrefixes.length ||
|
|
77
|
+
v.resourcePrefixes.length > 32 ||
|
|
78
|
+
new Set(v.resourcePrefixes).size !== v.resourcePrefixes.length)
|
|
79
|
+
invalid();
|
|
80
|
+
const factKinds = v.factKinds, resourcePrefixes = v.resourcePrefixes;
|
|
81
|
+
for (const prefix of resourcePrefixes) {
|
|
82
|
+
if (typeof prefix !== 'string' ||
|
|
83
|
+
prefix.length > 512 ||
|
|
84
|
+
/[\u0000-\u001f\u007f]/u.test(prefix) ||
|
|
85
|
+
!factKinds.some((kind) => prefix.startsWith(PLATFORM_WORK_REFERENCES[kind].resourcePrefix)))
|
|
86
|
+
invalid();
|
|
87
|
+
}
|
|
88
|
+
let after;
|
|
89
|
+
try {
|
|
90
|
+
after =
|
|
91
|
+
v.afterFactSequence === undefined || v.afterFactSequence === null
|
|
92
|
+
? v.afterFactSequence
|
|
93
|
+
: platformSequence(v.afterFactSequence);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
invalid();
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
operation: 'subscribe',
|
|
100
|
+
subscriptionId,
|
|
101
|
+
requestId,
|
|
102
|
+
expectedGeneration,
|
|
103
|
+
factKinds: [...factKinds].sort(),
|
|
104
|
+
resourcePrefixes: resourcePrefixes.slice().sort(),
|
|
105
|
+
...(after === undefined ? {} : { afterFactSequence: after }),
|
|
106
|
+
};
|
|
107
|
+
}
|