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,109 @@
|
|
|
1
|
+
import { boundedTenantJson, tenantInvalid, tenantRecord } from './json.js';
|
|
2
|
+
export const TENANT_SCHEDULE_READ_ACTIONS = [
|
|
3
|
+
'tenant.schedules.list',
|
|
4
|
+
'tenant.schedules.get',
|
|
5
|
+
'tenant.schedules.catalog.get',
|
|
6
|
+
'tenant.schedules.preview',
|
|
7
|
+
'tenant.schedules.occurrences.list',
|
|
8
|
+
'tenant.schedules.occurrences.run.get',
|
|
9
|
+
];
|
|
10
|
+
export const TENANT_SCHEDULE_WRITE_ACTIONS = [
|
|
11
|
+
'tenant.schedules.save',
|
|
12
|
+
'tenant.schedules.enable',
|
|
13
|
+
'tenant.schedules.pause',
|
|
14
|
+
'tenant.schedules.occurrences.reconcile',
|
|
15
|
+
];
|
|
16
|
+
const ref = (v) => typeof v === 'string' && /^[A-Za-z0-9_-]{1,160}$/.test(v);
|
|
17
|
+
export function parseTenantScheduleDefinition(raw) {
|
|
18
|
+
const v = tenantRecord(boundedTenantJson(raw), [
|
|
19
|
+
'displayName',
|
|
20
|
+
'installationId',
|
|
21
|
+
'installationRevisionId',
|
|
22
|
+
'credentialId',
|
|
23
|
+
'input',
|
|
24
|
+
'timeZone',
|
|
25
|
+
'rule',
|
|
26
|
+
'overlapPolicy',
|
|
27
|
+
'missedPolicy',
|
|
28
|
+
]);
|
|
29
|
+
if (typeof v.displayName !== 'string' ||
|
|
30
|
+
!v.displayName.trim() ||
|
|
31
|
+
v.displayName.length > 128 ||
|
|
32
|
+
!ref(v.installationId) ||
|
|
33
|
+
!ref(v.installationRevisionId) ||
|
|
34
|
+
!ref(v.credentialId) ||
|
|
35
|
+
typeof v.timeZone !== 'string' ||
|
|
36
|
+
!v.timeZone ||
|
|
37
|
+
v.timeZone.length > 80 ||
|
|
38
|
+
v.overlapPolicy !== 'skip' ||
|
|
39
|
+
v.missedPolicy !== 'skip')
|
|
40
|
+
return tenantInvalid();
|
|
41
|
+
try {
|
|
42
|
+
new Intl.DateTimeFormat('en-CA', { timeZone: v.timeZone });
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return tenantInvalid();
|
|
46
|
+
}
|
|
47
|
+
if (!v.input || typeof v.input !== 'object' || Array.isArray(v.input))
|
|
48
|
+
return tenantInvalid();
|
|
49
|
+
tenantRecord(v.input, [], Object.keys(v.input));
|
|
50
|
+
const kind = v.rule?.kind;
|
|
51
|
+
const rule = tenantRecord(v.rule, kind === 'once'
|
|
52
|
+
? ['kind', 'at']
|
|
53
|
+
: kind === 'hourly'
|
|
54
|
+
? ['kind', 'anchorAt', 'everyHours']
|
|
55
|
+
: ['kind', 'time']);
|
|
56
|
+
if (kind === 'once' || kind === 'hourly') {
|
|
57
|
+
const at = kind === 'once' ? rule.at : rule.anchorAt;
|
|
58
|
+
if (typeof at !== 'string' ||
|
|
59
|
+
!/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{3})?Z$/.test(at) ||
|
|
60
|
+
!Number.isFinite(Date.parse(at)) ||
|
|
61
|
+
new Date(at).toISOString() !== (at.includes('.') ? at : at.replace('Z', '.000Z')))
|
|
62
|
+
return tenantInvalid();
|
|
63
|
+
if (kind === 'hourly' &&
|
|
64
|
+
(!Number.isSafeInteger(rule.everyHours) ||
|
|
65
|
+
Number(rule.everyHours) < 1 ||
|
|
66
|
+
Number(rule.everyHours) > 168))
|
|
67
|
+
return tenantInvalid();
|
|
68
|
+
}
|
|
69
|
+
else if (kind !== 'daily' ||
|
|
70
|
+
typeof rule.time !== 'string' ||
|
|
71
|
+
!/^([01]\d|2[0-3]):[0-5]\d$/.test(rule.time))
|
|
72
|
+
return tenantInvalid();
|
|
73
|
+
return v;
|
|
74
|
+
}
|
|
75
|
+
export function parseTenantScheduleInput(action, raw) {
|
|
76
|
+
const read = TENANT_SCHEDULE_READ_ACTIONS.some((a) => a === action);
|
|
77
|
+
const fields = action.endsWith('.save')
|
|
78
|
+
? ['definition']
|
|
79
|
+
: action.endsWith('.preview')
|
|
80
|
+
? ['definition']
|
|
81
|
+
: action.endsWith('.get') && !action.endsWith('.catalog.get') && !action.endsWith('.run.get')
|
|
82
|
+
? []
|
|
83
|
+
: action === 'tenant.schedules.list' || action.endsWith('.catalog.get')
|
|
84
|
+
? []
|
|
85
|
+
: action.includes('.occurrences.') && !action.endsWith('.list')
|
|
86
|
+
? ['scheduleId', 'occurrenceId']
|
|
87
|
+
: ['scheduleId'];
|
|
88
|
+
const v = tenantRecord(boundedTenantJson(raw), fields, action.endsWith('.save')
|
|
89
|
+
? ['scheduleId']
|
|
90
|
+
: action === 'tenant.schedules.get'
|
|
91
|
+
? ['scheduleId', 'requestId']
|
|
92
|
+
: []);
|
|
93
|
+
if (v.scheduleId !== undefined && !ref(v.scheduleId))
|
|
94
|
+
return tenantInvalid();
|
|
95
|
+
if (v.occurrenceId !== undefined && !ref(v.occurrenceId))
|
|
96
|
+
return tenantInvalid();
|
|
97
|
+
if (action === 'tenant.schedules.get') {
|
|
98
|
+
if (Object.keys(v).length !== 1 ||
|
|
99
|
+
(!ref(v.scheduleId) &&
|
|
100
|
+
!(typeof v.requestId === 'string' &&
|
|
101
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v.requestId))))
|
|
102
|
+
return tenantInvalid();
|
|
103
|
+
}
|
|
104
|
+
if (v.definition !== undefined)
|
|
105
|
+
parseTenantScheduleDefinition(v.definition);
|
|
106
|
+
if (!read && !TENANT_SCHEDULE_WRITE_ACTIONS.some((a) => a === action))
|
|
107
|
+
return tenantInvalid();
|
|
108
|
+
return v;
|
|
109
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { TENANT_OPERATION_STATES } from './operations.js';
|
|
2
|
+
import { TENANT_ACTIONS, TENANT_READ_ACTIONS } from './actions.js';
|
|
3
|
+
import { TENANT_RESOURCE_KINDS } from './authorization.js';
|
|
4
|
+
import { BUSINESS_KEY_PATTERN_SOURCE } from '../contracts/base.js';
|
|
5
|
+
const text = { type: 'string', minLength: 1, maxLength: 256 };
|
|
6
|
+
const key = {
|
|
7
|
+
type: 'string',
|
|
8
|
+
pattern: `^${BUSINESS_KEY_PATTERN_SOURCE}$`,
|
|
9
|
+
minLength: 1,
|
|
10
|
+
maxLength: 64,
|
|
11
|
+
};
|
|
12
|
+
/** 正式 locator 的共享 schema;资源层仍按 kind 校验必需层级和实际可见性。 */
|
|
13
|
+
export const TENANT_RESOURCE_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
additionalProperties: false,
|
|
16
|
+
required: ['kind', 'tenantKey'],
|
|
17
|
+
properties: {
|
|
18
|
+
kind: { enum: [...TENANT_RESOURCE_KINDS] },
|
|
19
|
+
tenantKey: key,
|
|
20
|
+
workspaceKey: key,
|
|
21
|
+
projectKey: key,
|
|
22
|
+
agentKey: key,
|
|
23
|
+
version: { type: 'integer', minimum: 1 },
|
|
24
|
+
deploymentKey: key,
|
|
25
|
+
},
|
|
26
|
+
oneOf: TENANT_RESOURCE_KINDS.map((kind) => {
|
|
27
|
+
const fields = {
|
|
28
|
+
kind: { const: kind },
|
|
29
|
+
tenantKey: key,
|
|
30
|
+
...(kind === 'tenant' ? {} : { workspaceKey: key }),
|
|
31
|
+
...(['tenant', 'workspace'].includes(kind) ? {} : { projectKey: key }),
|
|
32
|
+
...(['agent', 'agent-version'].includes(kind) ? { agentKey: key } : {}),
|
|
33
|
+
...(kind === 'agent-version' ? { version: { type: 'integer', minimum: 1 } } : {}),
|
|
34
|
+
...(kind === 'deployment' ? { deploymentKey: key } : {}),
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
type: 'object',
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
required: Object.keys(fields),
|
|
40
|
+
properties: fields,
|
|
41
|
+
};
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
/** 所有命令返回同一回执,完成、未知效果和下一步由真实账本字段描述。 */
|
|
45
|
+
export const TENANT_OPERATION_SCHEMA = {
|
|
46
|
+
type: 'object',
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
required: [
|
|
49
|
+
'operationRef',
|
|
50
|
+
'requestId',
|
|
51
|
+
'action',
|
|
52
|
+
'target',
|
|
53
|
+
'state',
|
|
54
|
+
'phase',
|
|
55
|
+
'revision',
|
|
56
|
+
'observedAt',
|
|
57
|
+
'resultRefs',
|
|
58
|
+
'effects',
|
|
59
|
+
'nextActions',
|
|
60
|
+
],
|
|
61
|
+
properties: {
|
|
62
|
+
operationRef: text,
|
|
63
|
+
requestId: { type: 'string', format: 'uuid' },
|
|
64
|
+
action: { enum: [...TENANT_ACTIONS] },
|
|
65
|
+
target: TENANT_RESOURCE_SCHEMA,
|
|
66
|
+
state: { enum: [...TENANT_OPERATION_STATES] },
|
|
67
|
+
phase: text,
|
|
68
|
+
revision: { type: 'integer', minimum: 1 },
|
|
69
|
+
observedAt: { type: 'string', format: 'date-time' },
|
|
70
|
+
resultRefs: { type: 'array', maxItems: 100, items: TENANT_RESOURCE_SCHEMA },
|
|
71
|
+
effects: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
additionalProperties: false,
|
|
74
|
+
required: ['state'],
|
|
75
|
+
properties: {
|
|
76
|
+
state: { enum: ['none', 'committed', 'dispatched', 'unknown'] },
|
|
77
|
+
summary: { type: 'string', maxLength: 512 },
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
nextActions: { type: 'array', items: { enum: [...TENANT_ACTIONS] } },
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
/** 查询 envelope 的 data 是有限业务 JSON;领域工具可替换为更精确的公开 DTO schema。 */
|
|
84
|
+
export const TENANT_QUERY_RESULT_SCHEMA = {
|
|
85
|
+
type: 'object',
|
|
86
|
+
additionalProperties: false,
|
|
87
|
+
required: ['schemaVersion', 'action', 'data', 'observedAt', 'resourceRevisions'],
|
|
88
|
+
properties: {
|
|
89
|
+
schemaVersion: { const: 1 },
|
|
90
|
+
action: { enum: [...TENANT_READ_ACTIONS] },
|
|
91
|
+
data: { $ref: '#/$defs/json' },
|
|
92
|
+
observedAt: { type: 'string', format: 'date-time' },
|
|
93
|
+
nextCursor: { type: 'string', maxLength: 2048 },
|
|
94
|
+
resourceRevisions: {
|
|
95
|
+
type: 'array',
|
|
96
|
+
maxItems: 101,
|
|
97
|
+
items: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
additionalProperties: false,
|
|
100
|
+
required: ['resource', 'revision'],
|
|
101
|
+
properties: { resource: TENANT_RESOURCE_SCHEMA, revision: { type: 'integer', minimum: 1 } },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
$defs: {
|
|
106
|
+
json: {
|
|
107
|
+
anyOf: [
|
|
108
|
+
{ type: 'null' },
|
|
109
|
+
{ type: 'boolean' },
|
|
110
|
+
{ type: 'number' },
|
|
111
|
+
{ type: 'string' },
|
|
112
|
+
{ type: 'array', items: { $ref: '#/$defs/json' } },
|
|
113
|
+
{ type: 'object', additionalProperties: { $ref: '#/$defs/json' } },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BUSINESS_KEY_PATTERN_SOURCE } from '../contracts/base.js';
|
|
2
|
+
import { boundedTenantJson, tenantInvalid, tenantRecord } from './json.js';
|
|
3
|
+
export function parseTenantSettingsInput(write, raw) {
|
|
4
|
+
const row = tenantRecord(boundedTenantJson(raw), write ? ['displayName'] : []);
|
|
5
|
+
if (write &&
|
|
6
|
+
(typeof row.displayName !== 'string' || !row.displayName.trim() || row.displayName.length > 120))
|
|
7
|
+
return tenantInvalid();
|
|
8
|
+
return row;
|
|
9
|
+
}
|
|
10
|
+
export const TENANT_SETTINGS_INPUT_SCHEMA = {
|
|
11
|
+
type: 'object',
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
properties: { displayName: { type: 'string', minLength: 1, maxLength: 120 } },
|
|
14
|
+
required: ['displayName'],
|
|
15
|
+
};
|
|
16
|
+
export const TENANT_SETTINGS_SCHEMA = {
|
|
17
|
+
type: 'object',
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
required: ['resource', 'revision', 'tenantKey', 'displayName'],
|
|
20
|
+
properties: {
|
|
21
|
+
resource: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
required: ['kind', 'tenantKey'],
|
|
25
|
+
properties: {
|
|
26
|
+
kind: { const: 'tenant' },
|
|
27
|
+
tenantKey: { type: 'string', pattern: `^${BUSINESS_KEY_PATTERN_SOURCE}$` },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
revision: { type: 'integer', minimum: 1 },
|
|
31
|
+
tenantKey: { type: 'string', pattern: `^${BUSINESS_KEY_PATTERN_SOURCE}$` },
|
|
32
|
+
displayName: { type: ['string', 'null'], maxLength: 120 },
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Shared bounded SSE framing. Domain readers own reference, cursor and payload checks. */
|
|
2
|
+
export async function* readTenantSseFrames(response, signal, maximum = 16384) {
|
|
3
|
+
if (!response.ok ||
|
|
4
|
+
!response.body ||
|
|
5
|
+
!response.headers.get('content-type')?.toLowerCase().startsWith('text/event-stream')) {
|
|
6
|
+
await response.body?.cancel();
|
|
7
|
+
throw new Error('TENANT_EVENT_INVALID');
|
|
8
|
+
}
|
|
9
|
+
const reader = response.body.getReader(), decoder = new TextDecoder('utf-8', { fatal: true });
|
|
10
|
+
const abort = () => {
|
|
11
|
+
void reader.cancel().catch(() => undefined);
|
|
12
|
+
};
|
|
13
|
+
signal?.addEventListener('abort', abort, { once: true });
|
|
14
|
+
if (signal?.aborted)
|
|
15
|
+
abort();
|
|
16
|
+
let buffer = '';
|
|
17
|
+
try {
|
|
18
|
+
while (true) {
|
|
19
|
+
const part = await reader.read();
|
|
20
|
+
if (part.done)
|
|
21
|
+
break;
|
|
22
|
+
if (part.value.byteLength > 2097152)
|
|
23
|
+
throw Error('TENANT_EVENT_INVALID');
|
|
24
|
+
buffer = (buffer + decoder.decode(part.value, { stream: true })).replace(/\r\n/g, '\n');
|
|
25
|
+
let separator;
|
|
26
|
+
while ((separator = buffer.indexOf('\n\n')) >= 0) {
|
|
27
|
+
const text = buffer.slice(0, separator);
|
|
28
|
+
buffer = buffer.slice(separator + 2);
|
|
29
|
+
if (text.length > maximum)
|
|
30
|
+
throw Error('TENANT_EVENT_INVALID');
|
|
31
|
+
const lines = text.split('\n'), kind = lines
|
|
32
|
+
.find((l) => l.startsWith('event:'))
|
|
33
|
+
?.slice(6)
|
|
34
|
+
.trim(), id = lines
|
|
35
|
+
.find((l) => l.startsWith('id:'))
|
|
36
|
+
?.slice(3)
|
|
37
|
+
.trim(), data = lines
|
|
38
|
+
.filter((l) => l.startsWith('data:'))
|
|
39
|
+
.map((l) => l.slice(5).trimStart())
|
|
40
|
+
.join('\n');
|
|
41
|
+
if (kind !== undefined ||
|
|
42
|
+
id !== undefined ||
|
|
43
|
+
lines.some((line) => line.startsWith('data:')))
|
|
44
|
+
yield { kind, id, data };
|
|
45
|
+
}
|
|
46
|
+
if (buffer.length > maximum)
|
|
47
|
+
throw Error('TENANT_EVENT_INVALID');
|
|
48
|
+
}
|
|
49
|
+
signal?.throwIfAborted();
|
|
50
|
+
if (buffer.trim() || decoder.decode())
|
|
51
|
+
throw Error('TENANT_STREAM_CLOSED');
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
signal?.removeEventListener('abort', abort);
|
|
55
|
+
await reader.cancel().catch(() => undefined);
|
|
56
|
+
reader.releaseLock();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { TENANT_RESOURCE_SCHEMA } from './schemas.js';
|
|
2
|
+
export const TENANT_TASK_RUN_KEY_SCHEMA = { type: 'string', pattern: '^[A-Za-z0-9_-]{1,160}$' };
|
|
3
|
+
const requestId = {
|
|
4
|
+
type: 'string',
|
|
5
|
+
pattern: '^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-8][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$',
|
|
6
|
+
};
|
|
7
|
+
const operationRef = { type: 'string', pattern: '^top_[a-f0-9-]{36}$' };
|
|
8
|
+
const object = (properties, required = Object.keys(properties)) => ({ type: 'object', additionalProperties: false, required, properties });
|
|
9
|
+
export const TENANT_TASK_LOOKUP_SCHEMA = {
|
|
10
|
+
...object({ runKey: TENANT_TASK_RUN_KEY_SCHEMA, requestId, operationRef }, []),
|
|
11
|
+
oneOf: [
|
|
12
|
+
object({ runKey: TENANT_TASK_RUN_KEY_SCHEMA }),
|
|
13
|
+
object({ requestId }),
|
|
14
|
+
object({ operationRef }),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
export const TENANT_TASK_EXECUTE_PROPERTIES = {
|
|
18
|
+
modelOptionKey: { type: 'string', pattern: '^[a-z0-9][a-z0-9_-]{0,63}$' },
|
|
19
|
+
input: { type: 'object', additionalProperties: true },
|
|
20
|
+
};
|
|
21
|
+
const status = { enum: ['accepted', 'running', 'succeeded', 'failed', 'cancelled', 'unknown'] };
|
|
22
|
+
const nullableText = { type: ['string', 'null'] };
|
|
23
|
+
const summaryProperties = {
|
|
24
|
+
resource: TENANT_RESOURCE_SCHEMA,
|
|
25
|
+
displayName: { type: 'string' },
|
|
26
|
+
isDefault: { type: 'boolean' },
|
|
27
|
+
defaultModelOptionKey: nullableText,
|
|
28
|
+
outputMode: { enum: ['text', 'json'] },
|
|
29
|
+
policyRevision: { type: 'integer', minimum: 1 },
|
|
30
|
+
};
|
|
31
|
+
export const TENANT_TASK_AGENT_SUMMARY_SCHEMA = object(summaryProperties);
|
|
32
|
+
export const TENANT_TASK_AGENT_VIEW_SCHEMA = object({
|
|
33
|
+
...summaryProperties,
|
|
34
|
+
contract: { type: 'object', additionalProperties: true },
|
|
35
|
+
});
|
|
36
|
+
export const TENANT_TASK_MODEL_CATALOG_SCHEMA = object({
|
|
37
|
+
resource: TENANT_RESOURCE_SCHEMA,
|
|
38
|
+
models: {
|
|
39
|
+
type: 'array',
|
|
40
|
+
maxItems: 100,
|
|
41
|
+
items: object({
|
|
42
|
+
modelOptionKey: { type: 'string' },
|
|
43
|
+
displayName: { type: 'string' },
|
|
44
|
+
provider: { type: 'string' },
|
|
45
|
+
model: { type: 'string' },
|
|
46
|
+
structuredOutput: { type: 'boolean' },
|
|
47
|
+
available: { type: 'boolean' },
|
|
48
|
+
unavailableReason: nullableText,
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const runProperties = {
|
|
53
|
+
resource: TENANT_RESOURCE_SCHEMA,
|
|
54
|
+
runKey: TENANT_TASK_RUN_KEY_SCHEMA,
|
|
55
|
+
requestId,
|
|
56
|
+
status,
|
|
57
|
+
resolved: object({
|
|
58
|
+
agentKey: { type: 'string' },
|
|
59
|
+
agentVersion: { type: 'integer', minimum: 1 },
|
|
60
|
+
modelOptionKey: { type: 'string' },
|
|
61
|
+
provider: { type: 'string' },
|
|
62
|
+
model: { type: 'string' },
|
|
63
|
+
reasoningEffort: nullableText,
|
|
64
|
+
}),
|
|
65
|
+
error: {
|
|
66
|
+
anyOf: [{ type: 'null' }, object({ code: { type: 'string' }, message: { type: 'string' } })],
|
|
67
|
+
},
|
|
68
|
+
rerunOf: nullableText,
|
|
69
|
+
cancelRequested: { type: 'boolean' },
|
|
70
|
+
createdAt: { type: 'string' },
|
|
71
|
+
updatedAt: { type: 'string' },
|
|
72
|
+
timing: object({
|
|
73
|
+
acceptedAt: { type: 'string' },
|
|
74
|
+
deadlineAt: { type: 'string' },
|
|
75
|
+
limitSource: { const: 'TASK_POLICY' },
|
|
76
|
+
}),
|
|
77
|
+
};
|
|
78
|
+
const runRequired = Object.keys(runProperties).filter((key) => key !== 'timing');
|
|
79
|
+
export const TENANT_TASK_RUN_SUMMARY_SCHEMA = object(runProperties, runRequired);
|
|
80
|
+
export const TENANT_TASK_RUN_VIEW_SCHEMA = object({ ...runProperties, input: { type: 'object', additionalProperties: true }, output: {} }, [...runRequired, 'input', 'output']);
|
|
81
|
+
export const TENANT_TASK_EVENT_SCHEMA = object({
|
|
82
|
+
runKey: TENANT_TASK_RUN_KEY_SCHEMA,
|
|
83
|
+
sequence: { type: 'string', pattern: '^[1-9][0-9]{0,19}$' },
|
|
84
|
+
kind: { enum: ['SNAPSHOT', 'TRANSITION'] },
|
|
85
|
+
status,
|
|
86
|
+
phase: { type: 'string' },
|
|
87
|
+
cancelRequested: { type: 'boolean' },
|
|
88
|
+
observedAt: { type: 'string' },
|
|
89
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { tenantRecord } from './json.js';
|
|
2
|
+
import { TENANT_TASK_READ_ACTIONS, parseTenantTaskLookup, } from './tasks.js';
|
|
3
|
+
import { TENANT_TASK_LOOKUP_SCHEMA } from './task-schemas.js';
|
|
4
|
+
export function taskViewInput(action, input) {
|
|
5
|
+
if (['tenant.tasks.runs.get', 'tenant.tasks.runs.events', 'tenant.tasks.runs.recover'].includes(action))
|
|
6
|
+
return { ...parseTenantTaskLookup(input) };
|
|
7
|
+
tenantRecord(input, []);
|
|
8
|
+
return input;
|
|
9
|
+
}
|
|
10
|
+
export const TENANT_TASK_VIEW_SCHEMAS = TENANT_TASK_READ_ACTIONS.map((action) => ({
|
|
11
|
+
type: 'object',
|
|
12
|
+
additionalProperties: false,
|
|
13
|
+
required: ['action', 'input'],
|
|
14
|
+
properties: {
|
|
15
|
+
action: { const: action },
|
|
16
|
+
input: [
|
|
17
|
+
'tenant.tasks.runs.get',
|
|
18
|
+
'tenant.tasks.runs.events',
|
|
19
|
+
'tenant.tasks.runs.recover',
|
|
20
|
+
].includes(action)
|
|
21
|
+
? TENANT_TASK_LOOKUP_SCHEMA
|
|
22
|
+
: { type: 'object', additionalProperties: false, properties: {} },
|
|
23
|
+
...([
|
|
24
|
+
'tenant.tasks.agents.list',
|
|
25
|
+
'tenant.tasks.runs.list',
|
|
26
|
+
'tenant.tasks.runs.events',
|
|
27
|
+
].includes(action)
|
|
28
|
+
? {
|
|
29
|
+
limit: { type: 'integer', minimum: 1, maximum: 100 },
|
|
30
|
+
cursor: { type: 'string', pattern: '^[A-Za-z0-9_-]{1,2048}$' },
|
|
31
|
+
}
|
|
32
|
+
: {}),
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { boundedTenantJson, tenantRecord, tenantInvalid } from './json.js';
|
|
2
|
+
export const TENANT_TASK_READ_ACTIONS = [
|
|
3
|
+
'tenant.tasks.agents.list',
|
|
4
|
+
'tenant.tasks.agents.get',
|
|
5
|
+
'tenant.tasks.models.list',
|
|
6
|
+
'tenant.tasks.runs.list',
|
|
7
|
+
'tenant.tasks.runs.get',
|
|
8
|
+
'tenant.tasks.runs.events',
|
|
9
|
+
'tenant.tasks.runs.recover',
|
|
10
|
+
];
|
|
11
|
+
export function isTenantTaskRunKey(value) {
|
|
12
|
+
return typeof value === 'string' && /^[A-Za-z0-9_-]{1,160}$/.test(value);
|
|
13
|
+
}
|
|
14
|
+
export function parseTenantTaskLookup(raw) {
|
|
15
|
+
const row = tenantRecord(boundedTenantJson(raw), [], ['runKey', 'requestId', 'operationRef']);
|
|
16
|
+
if (Object.keys(row).length !== 1 ||
|
|
17
|
+
(row.runKey !== undefined
|
|
18
|
+
? !isTenantTaskRunKey(row.runKey)
|
|
19
|
+
: row.requestId !== undefined
|
|
20
|
+
? typeof row.requestId !== 'string' ||
|
|
21
|
+
!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-8][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/.test(row.requestId)
|
|
22
|
+
: typeof row.operationRef !== 'string' || !/^top_[a-f0-9-]{36}$/.test(row.operationRef)))
|
|
23
|
+
return tenantInvalid();
|
|
24
|
+
return row;
|
|
25
|
+
}
|
|
26
|
+
export function parseTenantTaskInput(action, raw) {
|
|
27
|
+
const keys = action === 'tenant.tasks.runs.cancel'
|
|
28
|
+
? ['runKey']
|
|
29
|
+
: [...(action === 'tenant.tasks.runs.rerun' ? ['runKey'] : []), 'modelOptionKey', 'input'];
|
|
30
|
+
const row = tenantRecord(boundedTenantJson(raw), keys);
|
|
31
|
+
if (row.runKey !== undefined && !isTenantTaskRunKey(row.runKey))
|
|
32
|
+
return tenantInvalid();
|
|
33
|
+
if (action !== 'tenant.tasks.runs.cancel' &&
|
|
34
|
+
(typeof row.modelOptionKey !== 'string' ||
|
|
35
|
+
!/^[a-z0-9][a-z0-9_-]{0,63}$/.test(row.modelOptionKey) ||
|
|
36
|
+
!row.input ||
|
|
37
|
+
typeof row.input !== 'object' ||
|
|
38
|
+
Array.isArray(row.input)))
|
|
39
|
+
return tenantInvalid();
|
|
40
|
+
return row;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { boundedTenantJson, tenantInvalid, tenantRecord } from './json.js';
|
|
2
|
+
export function parseTenantUsageInput(raw) {
|
|
3
|
+
const row = tenantRecord(boundedTenantJson(raw), ['since']);
|
|
4
|
+
if (typeof row.since !== 'string' ||
|
|
5
|
+
row.since.length > 64 ||
|
|
6
|
+
!/^\d{4}-\d{2}-\d{2}T/.test(row.since) ||
|
|
7
|
+
!Number.isFinite(Date.parse(row.since)))
|
|
8
|
+
return tenantInvalid();
|
|
9
|
+
return row;
|
|
10
|
+
}
|
|
11
|
+
const object = (properties) => ({
|
|
12
|
+
type: 'object',
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
properties,
|
|
15
|
+
required: Object.keys(properties),
|
|
16
|
+
});
|
|
17
|
+
const counts = (keys) => Object.fromEntries(keys.map((key) => [key, { type: 'integer', minimum: 0 }]));
|
|
18
|
+
const managed = counts(['total', 'completed', 'failed', 'active']);
|
|
19
|
+
const group = {
|
|
20
|
+
type: 'array',
|
|
21
|
+
maxItems: 20000,
|
|
22
|
+
items: object({
|
|
23
|
+
key: { type: 'string', minLength: 1, maxLength: 64 },
|
|
24
|
+
label: { type: ['string', 'null'], maxLength: 120 },
|
|
25
|
+
...managed,
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
export const TENANT_USAGE_INPUT_SCHEMA = object({
|
|
29
|
+
since: { type: 'string', format: 'date-time', maxLength: 64 },
|
|
30
|
+
});
|
|
31
|
+
export const TENANT_USAGE_SCHEMA = object({
|
|
32
|
+
since: { type: 'string', format: 'date-time' },
|
|
33
|
+
observedAt: { type: 'string', format: 'date-time' },
|
|
34
|
+
source: { const: 'AS persisted activity' },
|
|
35
|
+
level: { enum: ['workspace', 'project'] },
|
|
36
|
+
billingAvailable: { const: false },
|
|
37
|
+
consumptionAvailable: { const: false },
|
|
38
|
+
managedExecutions: object(managed),
|
|
39
|
+
byProject: group,
|
|
40
|
+
byAgent: group,
|
|
41
|
+
byDeployment: group,
|
|
42
|
+
operations: {
|
|
43
|
+
anyOf: [
|
|
44
|
+
{ type: 'null' },
|
|
45
|
+
object({
|
|
46
|
+
taskExecutions: object(counts(['total', 'succeeded', 'failed', 'active', 'cancelled', 'unknown'])),
|
|
47
|
+
schedules: object(counts([
|
|
48
|
+
'total',
|
|
49
|
+
'enabled',
|
|
50
|
+
'blocked',
|
|
51
|
+
'triggered',
|
|
52
|
+
'succeeded',
|
|
53
|
+
'failed',
|
|
54
|
+
'active',
|
|
55
|
+
'skipped',
|
|
56
|
+
'unknown',
|
|
57
|
+
])),
|
|
58
|
+
}),
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TENANT_COMMAND_ACTIONS } from './actions.js';
|
|
2
|
+
import { parseTenantResourceSelector } from './authorization.js';
|
|
3
|
+
import { boundedTenantJson, tenantChoice, tenantInvalid, tenantObject, tenantRecord, tenantRevision, tenantText, } from './json.js';
|
|
4
|
+
/** 任务界面只描述受信组件和正式业务动作;viewRef不是授权或可执行HTML。 */
|
|
5
|
+
export const TENANT_VIEW_KINDS = [
|
|
6
|
+
'resource-list',
|
|
7
|
+
'resource-detail',
|
|
8
|
+
'change-preview',
|
|
9
|
+
'input-request',
|
|
10
|
+
'authorization-request',
|
|
11
|
+
'operation-status',
|
|
12
|
+
'test-report',
|
|
13
|
+
];
|
|
14
|
+
/** 保留早期公开名称,所有入口只使用同一受限读取来源解析器。 */
|
|
15
|
+
export { TENANT_RESOURCE_VIEW_ACTIONS as TENANT_VIEW_QUERY_ACTIONS, TENANT_RESOURCE_VIEW_QUERY_SCHEMA as TENANT_VIEW_QUERY_SCHEMA, parseTenantResourceViewQuery as parseTenantViewQuery, } from './resource-views.js';
|
|
16
|
+
export function parseTenantTaskView(raw) {
|
|
17
|
+
const row = tenantRecord(boundedTenantJson(raw), ['schemaVersion', 'viewRef', 'kind', 'resourceRefs', 'data', 'actions'], ['operationRef', 'expectedRevision']);
|
|
18
|
+
if (row.schemaVersion !== 1 ||
|
|
19
|
+
!Array.isArray(row.resourceRefs) ||
|
|
20
|
+
row.resourceRefs.length > 100 ||
|
|
21
|
+
!Array.isArray(row.actions) ||
|
|
22
|
+
row.actions.length > 32)
|
|
23
|
+
return tenantInvalid();
|
|
24
|
+
const resourceRefs = row.resourceRefs.map(parseTenantResourceSelector);
|
|
25
|
+
const actions = row.actions.map((raw) => {
|
|
26
|
+
const action = tenantRecord(raw, ['action', 'target', 'input']);
|
|
27
|
+
return Object.freeze({
|
|
28
|
+
action: tenantChoice(action.action, TENANT_COMMAND_ACTIONS),
|
|
29
|
+
target: parseTenantResourceSelector(action.target),
|
|
30
|
+
input: tenantObject(action.input),
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
return Object.freeze({
|
|
34
|
+
schemaVersion: 1,
|
|
35
|
+
viewRef: tenantText(row.viewRef),
|
|
36
|
+
kind: tenantChoice(row.kind, TENANT_VIEW_KINDS),
|
|
37
|
+
resourceRefs: Object.freeze(resourceRefs),
|
|
38
|
+
data: tenantObject(row.data),
|
|
39
|
+
actions: Object.freeze(actions),
|
|
40
|
+
...(row.operationRef === undefined ? {} : { operationRef: tenantText(row.operationRef) }),
|
|
41
|
+
...(row.expectedRevision === undefined
|
|
42
|
+
? {}
|
|
43
|
+
: {
|
|
44
|
+
expectedRevision: tenantRevision(row.expectedRevision, actions.length === 1 &&
|
|
45
|
+
((actions[0].action === 'tenant.schedules.save' &&
|
|
46
|
+
actions[0].input.scheduleId === undefined) ||
|
|
47
|
+
actions[0].action === 'tenant.outcomes.configure')
|
|
48
|
+
? 0
|
|
49
|
+
: 1),
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
}
|