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,68 @@
|
|
|
1
|
+
import { parseChatAttachments, CHAT_ATTACHMENT_MAX_COUNT, } from '../chat-attachment.js';
|
|
2
|
+
import { tenantInvalid, tenantRecord } from './json.js';
|
|
3
|
+
/** 仅附件会话入口使用此封套预算;不放宽其它管理命令的 128 KiB 限制。 */
|
|
4
|
+
export const TENANT_CONVERSATION_MAX_BODY_BYTES = 786432;
|
|
5
|
+
/** 在摘要前复制自有数据字段;附件是用户数据,不能携带 URL、文件路径或授权事实。 */
|
|
6
|
+
export function tenantConversationAttachments(raw) {
|
|
7
|
+
if (raw === undefined)
|
|
8
|
+
return Object.freeze([]);
|
|
9
|
+
if (!Array.isArray(raw) ||
|
|
10
|
+
Object.getPrototypeOf(raw) !== Array.prototype ||
|
|
11
|
+
raw.length > CHAT_ATTACHMENT_MAX_COUNT)
|
|
12
|
+
return tenantInvalid();
|
|
13
|
+
const fields = Object.getOwnPropertyDescriptors(raw);
|
|
14
|
+
if (Reflect.ownKeys(raw).some((key) => typeof key !== 'string' || (key !== 'length' && !/^[0-3]$/.test(key))) ||
|
|
15
|
+
Object.values(fields).some((field) => !('value' in field)))
|
|
16
|
+
return tenantInvalid();
|
|
17
|
+
const copies = [];
|
|
18
|
+
for (let i = 0; i < raw.length; i++) {
|
|
19
|
+
const field = fields[String(i)];
|
|
20
|
+
if (!field || !field.enumerable)
|
|
21
|
+
return tenantInvalid();
|
|
22
|
+
const row = tenantRecord(field.value, ['name', 'mediaType', 'dataBase64']);
|
|
23
|
+
if (typeof row.dataBase64 !== 'string' || row.dataBase64.length > 524288)
|
|
24
|
+
return tenantInvalid();
|
|
25
|
+
copies.push({
|
|
26
|
+
name: row.name,
|
|
27
|
+
mediaType: row.mediaType,
|
|
28
|
+
dataBase64: row.dataBase64,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const parsed = parseChatAttachments(copies);
|
|
32
|
+
if (!parsed)
|
|
33
|
+
return tenantInvalid();
|
|
34
|
+
for (const item of parsed) {
|
|
35
|
+
const binary = atob(item.dataBase64);
|
|
36
|
+
if (btoa(binary) !== item.dataBase64)
|
|
37
|
+
return tenantInvalid();
|
|
38
|
+
const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
39
|
+
if (item.mediaType.startsWith('text/') || item.mediaType === 'application/json') {
|
|
40
|
+
try {
|
|
41
|
+
new TextDecoder('utf-8', { fatal: true }).decode(bytes);
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
return tenantInvalid();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (!imageSignature(item.mediaType, bytes))
|
|
48
|
+
return tenantInvalid();
|
|
49
|
+
Object.freeze(item);
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze(parsed);
|
|
52
|
+
}
|
|
53
|
+
/** 保留旧纯文本摘要;有附件时连同名称、类型、顺序和准确字节一起绑定原意图。 */
|
|
54
|
+
export function tenantConversationInputText(text, attachments) {
|
|
55
|
+
return attachments.length ? JSON.stringify({ text, attachments }) : text;
|
|
56
|
+
}
|
|
57
|
+
/** 与既有 Runtime 支持的三种图片签名一致;不解码或执行文件内容。 */
|
|
58
|
+
function imageSignature(type, bytes) {
|
|
59
|
+
if (type === 'image/png')
|
|
60
|
+
return (bytes.length >= 8 &&
|
|
61
|
+
[137, 80, 78, 71, 13, 10, 26, 10].every((value, index) => bytes[index] === value));
|
|
62
|
+
if (type === 'image/jpeg')
|
|
63
|
+
return bytes.length >= 3 && bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255;
|
|
64
|
+
return (type === 'image/webp' &&
|
|
65
|
+
bytes.length >= 12 &&
|
|
66
|
+
String.fromCharCode(...bytes.slice(0, 4)) === 'RIFF' &&
|
|
67
|
+
String.fromCharCode(...bytes.slice(8, 12)) === 'WEBP');
|
|
68
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { isBusinessKey } from '../contracts/base.js';
|
|
2
|
+
import { boundedTenantJson, tenantChoice, tenantInvalid, tenantRecord, tenantRevision, } from './json.js';
|
|
3
|
+
/** 新Tenant管理权限独立命名,旧agents.read/Task/安装授权不被重新解释。 */
|
|
4
|
+
export const TENANT_HOST_ENROLL_SCOPE = 'tenant.hosts.enroll';
|
|
5
|
+
export const TENANT_SCOPES = [
|
|
6
|
+
'tenant.outcomes.read',
|
|
7
|
+
'tenant.outcomes.manage',
|
|
8
|
+
'tenant.usage.read',
|
|
9
|
+
'tenant.settings.read',
|
|
10
|
+
'tenant.settings.manage',
|
|
11
|
+
'tenant.marketplaces.read',
|
|
12
|
+
'tenant.access.read',
|
|
13
|
+
'tenant.access.invitations.read',
|
|
14
|
+
'tenant.access.workspace-members.read',
|
|
15
|
+
'tenant.credentials.read',
|
|
16
|
+
'tenant.schedules.read',
|
|
17
|
+
'tenant.schedules.manage',
|
|
18
|
+
'tenant.schedules.activate',
|
|
19
|
+
'tenant.capabilities.read',
|
|
20
|
+
'tenant.operations.read',
|
|
21
|
+
'tenant.authorizations.request',
|
|
22
|
+
'tenant.installations.read',
|
|
23
|
+
'tenant.installations.manage',
|
|
24
|
+
'tenant.installations.activate',
|
|
25
|
+
'tenant.installations.execute',
|
|
26
|
+
'tenant.live.read',
|
|
27
|
+
'tenant.tasks.agents.read',
|
|
28
|
+
'tenant.tasks.models.read',
|
|
29
|
+
'tenant.tasks.runs.read',
|
|
30
|
+
'tenant.tasks.runs.execute',
|
|
31
|
+
'tenant.tasks.runs.cancel',
|
|
32
|
+
'tenant.workspaces.read',
|
|
33
|
+
'tenant.workspaces.manage',
|
|
34
|
+
'tenant.projects.read',
|
|
35
|
+
'tenant.projects.manage',
|
|
36
|
+
'tenant.agents.read',
|
|
37
|
+
'tenant.agents.manage',
|
|
38
|
+
'tenant.versions.read',
|
|
39
|
+
'tenant.versions.publish',
|
|
40
|
+
'tenant.versions.test',
|
|
41
|
+
'tenant.knowledge.read',
|
|
42
|
+
'tenant.knowledge.manage',
|
|
43
|
+
'tenant.integrations.read',
|
|
44
|
+
'tenant.integrations.manage',
|
|
45
|
+
'tenant.deployments.read',
|
|
46
|
+
'tenant.deployments.manage',
|
|
47
|
+
'tenant.deployments.activate',
|
|
48
|
+
'tenant.access.manage',
|
|
49
|
+
'tenant.credentials.manage',
|
|
50
|
+
TENANT_HOST_ENROLL_SCOPE,
|
|
51
|
+
'tenant.credentials.reveal',
|
|
52
|
+
'tenant.resources.delete',
|
|
53
|
+
'tenant.export.bulk',
|
|
54
|
+
];
|
|
55
|
+
/** 首阶段统一敏感 scope,入口不得各自扩大默认常规授权。 */
|
|
56
|
+
export const TENANT_ELEVATED_SCOPES = Object.freeze([
|
|
57
|
+
'tenant.schedules.activate',
|
|
58
|
+
'tenant.installations.activate',
|
|
59
|
+
'tenant.deployments.activate',
|
|
60
|
+
'tenant.access.manage',
|
|
61
|
+
'tenant.credentials.manage',
|
|
62
|
+
'tenant.credentials.reveal',
|
|
63
|
+
'tenant.resources.delete',
|
|
64
|
+
'tenant.export.bulk',
|
|
65
|
+
]);
|
|
66
|
+
/** Agent 装机属于显式授权,兼容入口省略 scope 时保持原权限集合。 */
|
|
67
|
+
export const TENANT_DEFAULT_SCOPES = Object.freeze(TENANT_SCOPES.filter((scope) => scope !== TENANT_HOST_ENROLL_SCOPE && !TENANT_ELEVATED_SCOPES.includes(scope)));
|
|
68
|
+
export const TENANT_RESOURCE_KINDS = [
|
|
69
|
+
'tenant',
|
|
70
|
+
'workspace',
|
|
71
|
+
'project',
|
|
72
|
+
'agent',
|
|
73
|
+
'agent-version',
|
|
74
|
+
'deployment',
|
|
75
|
+
];
|
|
76
|
+
/** 审阅入口只含非 bearer 引用,禁止把任意 URL 或查询参数作为批准目的地。 */
|
|
77
|
+
export function tenantAuthorizationPath(ref) {
|
|
78
|
+
if (!/^telev_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(ref))
|
|
79
|
+
return tenantInvalid();
|
|
80
|
+
return `/authorizations/${ref.toLowerCase()}`;
|
|
81
|
+
}
|
|
82
|
+
/** 资源选择器只表达业务定位,不能携带Principal、Runtime或隐式全Tenant通配符。 */
|
|
83
|
+
export function parseTenantResourceSelector(raw) {
|
|
84
|
+
const value = boundedTenantJson(raw);
|
|
85
|
+
if (!value || typeof value !== 'object' || Array.isArray(value))
|
|
86
|
+
return tenantInvalid();
|
|
87
|
+
const kind = tenantChoice(value.kind, TENANT_RESOURCE_KINDS);
|
|
88
|
+
const fields = [
|
|
89
|
+
'kind',
|
|
90
|
+
'tenantKey',
|
|
91
|
+
...(kind === 'tenant' ? [] : ['workspaceKey']),
|
|
92
|
+
...(['tenant', 'workspace'].includes(kind) ? [] : ['projectKey']),
|
|
93
|
+
...(['agent', 'agent-version'].includes(kind) ? ['agentKey'] : []),
|
|
94
|
+
...(kind === 'agent-version' ? ['version'] : []),
|
|
95
|
+
...(kind === 'deployment' ? ['deploymentKey'] : []),
|
|
96
|
+
];
|
|
97
|
+
const row = tenantRecord(value, fields);
|
|
98
|
+
for (const key of fields.filter((key) => key !== 'kind' && key !== 'version'))
|
|
99
|
+
if (!isBusinessKey(row[key]))
|
|
100
|
+
return tenantInvalid();
|
|
101
|
+
if (kind === 'agent-version')
|
|
102
|
+
tenantRevision(row.version, 1);
|
|
103
|
+
return Object.freeze({ ...row });
|
|
104
|
+
}
|
|
105
|
+
/** 对外scope解析也先经过有界JSON复制,不能执行数组上的访问器。 */
|
|
106
|
+
export function parseTenantScopes(raw, allowEmpty = false) {
|
|
107
|
+
const value = boundedTenantJson(raw);
|
|
108
|
+
if (!Array.isArray(value) ||
|
|
109
|
+
value.length > TENANT_SCOPES.length ||
|
|
110
|
+
(!allowEmpty && !value.length))
|
|
111
|
+
return tenantInvalid();
|
|
112
|
+
const scopes = value.map((item) => tenantChoice(item, TENANT_SCOPES));
|
|
113
|
+
if (new Set(scopes).size !== scopes.length)
|
|
114
|
+
return tenantInvalid();
|
|
115
|
+
return Object.freeze(scopes.sort());
|
|
116
|
+
}
|
|
117
|
+
/** resource和scopes始终保存在同一子句,不能在不同资源之间拼出更大的权限。 */
|
|
118
|
+
export function parseTenantGrantClauses(raw) {
|
|
119
|
+
const value = boundedTenantJson(raw);
|
|
120
|
+
if (!Array.isArray(value) || !value.length || value.length > 128)
|
|
121
|
+
return tenantInvalid();
|
|
122
|
+
const clauses = value.map((item) => {
|
|
123
|
+
const row = tenantRecord(item, ['resource', 'scopes']);
|
|
124
|
+
return Object.freeze({
|
|
125
|
+
resource: parseTenantResourceSelector(row.resource),
|
|
126
|
+
scopes: parseTenantScopes(row.scopes),
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
// 一个管理grant属于一个Tenant,多Workspace仍逐子句保存,不能夹带另一个Tenant。
|
|
130
|
+
if (new Set(clauses.map((clause) => clause.resource.tenantKey)).size !== 1)
|
|
131
|
+
return tenantInvalid();
|
|
132
|
+
return Object.freeze(clauses);
|
|
133
|
+
}
|
|
134
|
+
/** 只比较已授范围是否包含目标;实际成员、Owner、grant代次和过期仍由服务端复核。 */
|
|
135
|
+
export function tenantGrantAllows(raw, scope, rawTarget) {
|
|
136
|
+
const clauses = parseTenantGrantClauses(raw), target = parseTenantResourceSelector(rawTarget);
|
|
137
|
+
tenantChoice(scope, TENANT_SCOPES);
|
|
138
|
+
return clauses.some(({ resource, scopes }) => {
|
|
139
|
+
if (!scopes.includes(scope) || resource.tenantKey !== target.tenantKey)
|
|
140
|
+
return false;
|
|
141
|
+
// Tenant 管理是新增显式权限域,不能从 Workspace 推导,也不隐式覆盖子资源。
|
|
142
|
+
if (resource.kind === 'tenant' || target.kind === 'tenant')
|
|
143
|
+
return resource.kind === 'tenant' && target.kind === 'tenant';
|
|
144
|
+
if (resource.workspaceKey !== target.workspaceKey)
|
|
145
|
+
return false;
|
|
146
|
+
if (resource.kind === 'workspace')
|
|
147
|
+
return true;
|
|
148
|
+
if (target.kind === 'workspace' || resource.projectKey !== target.projectKey)
|
|
149
|
+
return false;
|
|
150
|
+
if (resource.kind === 'project')
|
|
151
|
+
return true;
|
|
152
|
+
if (resource.kind === 'deployment')
|
|
153
|
+
return target.kind === 'deployment' && resource.deploymentKey === target.deploymentKey;
|
|
154
|
+
if ((target.kind !== 'agent' && target.kind !== 'agent-version') ||
|
|
155
|
+
resource.agentKey !== target.agentKey)
|
|
156
|
+
return false;
|
|
157
|
+
return (resource.kind === 'agent' ||
|
|
158
|
+
(target.kind === 'agent-version' && resource.version === target.version));
|
|
159
|
+
});
|
|
160
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { TENANT_ACTIONS, parseTenantAction } from './actions.js';
|
|
2
|
+
import { parseTenantScopes, TENANT_RESOURCE_KINDS, } from './authorization.js';
|
|
3
|
+
import { boundedTenantJson, tenantChoice, tenantInvalid, tenantObject, tenantRecord, } from './json.js';
|
|
4
|
+
function schema(raw) {
|
|
5
|
+
const value = tenantObject(raw);
|
|
6
|
+
const scan = (node) => {
|
|
7
|
+
if (Array.isArray(node)) {
|
|
8
|
+
for (const child of node)
|
|
9
|
+
scan(child);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (!node || typeof node !== 'object')
|
|
13
|
+
return;
|
|
14
|
+
for (const [key, child] of Object.entries(node)) {
|
|
15
|
+
if (key === '$ref' &&
|
|
16
|
+
(typeof child !== 'string' || !/^#\/(\$defs|definitions)\/[A-Za-z0-9_-]+$/.test(child)))
|
|
17
|
+
return tenantInvalid();
|
|
18
|
+
scan(child);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
scan(value);
|
|
22
|
+
if (value.type !== 'object' || value.additionalProperties !== false)
|
|
23
|
+
return tenantInvalid();
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
export function parseTenantCapability(raw) {
|
|
27
|
+
const row = tenantRecord(boundedTenantJson(raw), [
|
|
28
|
+
'version',
|
|
29
|
+
'action',
|
|
30
|
+
'inputSchema',
|
|
31
|
+
'outputSchema',
|
|
32
|
+
'requiredScopes',
|
|
33
|
+
'resourceKinds',
|
|
34
|
+
'effect',
|
|
35
|
+
'elevationScopes',
|
|
36
|
+
'preview',
|
|
37
|
+
'cancel',
|
|
38
|
+
'availability',
|
|
39
|
+
], ['reasonCode', 'description']);
|
|
40
|
+
if (row.version !== 1 ||
|
|
41
|
+
typeof row.preview !== 'boolean' ||
|
|
42
|
+
typeof row.cancel !== 'boolean' ||
|
|
43
|
+
!Array.isArray(row.resourceKinds) ||
|
|
44
|
+
!row.resourceKinds.length ||
|
|
45
|
+
row.resourceKinds.length > TENANT_RESOURCE_KINDS.length)
|
|
46
|
+
return tenantInvalid();
|
|
47
|
+
const resourceKinds = row.resourceKinds.map((value) => tenantChoice(value, TENANT_RESOURCE_KINDS));
|
|
48
|
+
if (new Set(resourceKinds).size !== resourceKinds.length)
|
|
49
|
+
return tenantInvalid();
|
|
50
|
+
const availability = tenantChoice(row.availability, [
|
|
51
|
+
'AVAILABLE',
|
|
52
|
+
'AUTHORIZATION_REQUIRED',
|
|
53
|
+
'ELEVATION_REQUIRED',
|
|
54
|
+
'UNAVAILABLE',
|
|
55
|
+
]);
|
|
56
|
+
if (row.description !== undefined &&
|
|
57
|
+
(typeof row.description !== 'string' || !row.description.trim() || row.description.length > 512))
|
|
58
|
+
return tenantInvalid();
|
|
59
|
+
if ((availability !== 'AVAILABLE' && row.reasonCode === undefined) ||
|
|
60
|
+
(row.reasonCode !== undefined &&
|
|
61
|
+
(typeof row.reasonCode !== 'string' || !/^[A-Z][A-Z0-9_]{0,79}$/.test(row.reasonCode))))
|
|
62
|
+
return tenantInvalid();
|
|
63
|
+
return Object.freeze({
|
|
64
|
+
version: 1,
|
|
65
|
+
...(row.description === undefined ? {} : { description: row.description }),
|
|
66
|
+
action: parseTenantAction(row.action),
|
|
67
|
+
inputSchema: schema(row.inputSchema),
|
|
68
|
+
outputSchema: schema(row.outputSchema),
|
|
69
|
+
requiredScopes: parseTenantScopes(row.requiredScopes),
|
|
70
|
+
resourceKinds: Object.freeze(resourceKinds),
|
|
71
|
+
effect: tenantChoice(row.effect, ['read', 'local-write', 'external-effect']),
|
|
72
|
+
elevationScopes: parseTenantScopes(row.elevationScopes, true),
|
|
73
|
+
preview: row.preview,
|
|
74
|
+
cancel: row.cancel,
|
|
75
|
+
availability,
|
|
76
|
+
...(row.reasonCode === undefined ? {} : { reasonCode: row.reasonCode }),
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
export function parseTenantCapabilityList(raw) {
|
|
80
|
+
const row = tenantRecord(raw, ['data']), rows = row.data;
|
|
81
|
+
if (!Array.isArray(rows) ||
|
|
82
|
+
Object.getPrototypeOf(rows) !== Array.prototype ||
|
|
83
|
+
rows.length > TENANT_ACTIONS.length)
|
|
84
|
+
return tenantInvalid();
|
|
85
|
+
// 列表按条预算,仍拒绝访问器、稀疏数组和额外字段,不能执行调用者提供的 getter/map。
|
|
86
|
+
const fields = Object.getOwnPropertyDescriptors(rows);
|
|
87
|
+
if (Reflect.ownKeys(rows).length !== rows.length + 1)
|
|
88
|
+
return tenantInvalid();
|
|
89
|
+
const data = Array.from({ length: rows.length }, (_, index) => {
|
|
90
|
+
const field = fields[index];
|
|
91
|
+
if (!field || !field.enumerable || !('value' in field))
|
|
92
|
+
return tenantInvalid();
|
|
93
|
+
return parseTenantCapability(field.value);
|
|
94
|
+
});
|
|
95
|
+
if (new Set(data.map((value) => value.action)).size !== data.length)
|
|
96
|
+
return tenantInvalid();
|
|
97
|
+
return Object.freeze({ data: Object.freeze(data) });
|
|
98
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const text = { type: 'string' };
|
|
2
|
+
/** 所有入口公布同一机器合同,避免模型猜测正文、分页或安装状态字段。 */
|
|
3
|
+
const knowledgeProperties = {
|
|
4
|
+
canonicalUri: { ...text, maxLength: 2048 },
|
|
5
|
+
title: text,
|
|
6
|
+
contentType: { enum: ['text/markdown', 'application/json'] },
|
|
7
|
+
version: { type: 'integer', minimum: 1 },
|
|
8
|
+
sha256: { type: 'string', pattern: '^[0-9a-f]{64}$' },
|
|
9
|
+
lifecycle: { enum: ['active', 'retired'] },
|
|
10
|
+
};
|
|
11
|
+
export const TENANT_KNOWLEDGE_SUMMARY_SCHEMA = {
|
|
12
|
+
type: 'object',
|
|
13
|
+
additionalProperties: false,
|
|
14
|
+
required: [...Object.keys(knowledgeProperties), 'snippet'],
|
|
15
|
+
properties: { ...knowledgeProperties, snippet: text },
|
|
16
|
+
};
|
|
17
|
+
export const TENANT_KNOWLEDGE_ITEM_SCHEMA = {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
required: [...Object.keys(knowledgeProperties), 'content'],
|
|
21
|
+
properties: { ...knowledgeProperties, content: text },
|
|
22
|
+
};
|
|
23
|
+
export const TENANT_KNOWLEDGE_PAGE_SCHEMA = {
|
|
24
|
+
type: 'object',
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
required: ['items', 'nextCursor'],
|
|
27
|
+
properties: {
|
|
28
|
+
items: { type: 'array', maxItems: 100, items: TENANT_KNOWLEDGE_SUMMARY_SCHEMA },
|
|
29
|
+
nextCursor: { type: ['string', 'null'], maxLength: 4096 },
|
|
30
|
+
},
|
|
31
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { parseTaskWorkEventInput, } from '../task-work-events.js';
|
|
2
|
+
import { boundedTenantJson, tenantInvalid, tenantRecord, tenantText } from './json.js';
|
|
3
|
+
const id = (v) => tenantText(v, /^[A-Za-z0-9_-]{1,128}$/);
|
|
4
|
+
const context = (v) => v === undefined
|
|
5
|
+
? {}
|
|
6
|
+
: {
|
|
7
|
+
conversationRef: tenantText(v, /^tmconv_[a-f0-9-]{36}$/),
|
|
8
|
+
};
|
|
9
|
+
export function parseTenantConversationWorkQuery(raw) {
|
|
10
|
+
const v = tenantRecord(boundedTenantJson(raw), ['operation'], ['conversationRef', 'subscriptionId', 'batchId', 'afterSubscriptionId']);
|
|
11
|
+
const c = context(v.conversationRef);
|
|
12
|
+
if (v.operation === 'discover') {
|
|
13
|
+
tenantRecord(v, ['operation'], ['conversationRef']);
|
|
14
|
+
return { operation: 'discover', ...c };
|
|
15
|
+
}
|
|
16
|
+
if (v.operation === 'list') {
|
|
17
|
+
tenantRecord(v, ['operation'], ['conversationRef', 'afterSubscriptionId']);
|
|
18
|
+
return {
|
|
19
|
+
operation: 'list',
|
|
20
|
+
...c,
|
|
21
|
+
...(v.afterSubscriptionId === undefined
|
|
22
|
+
? {}
|
|
23
|
+
: { afterSubscriptionId: id(v.afterSubscriptionId) }),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (v.operation !== 'read')
|
|
27
|
+
return tenantInvalid();
|
|
28
|
+
tenantRecord(v, ['operation', 'subscriptionId'], ['conversationRef', 'batchId']);
|
|
29
|
+
return {
|
|
30
|
+
operation: 'read',
|
|
31
|
+
...c,
|
|
32
|
+
subscriptionId: id(v.subscriptionId),
|
|
33
|
+
...(v.batchId === undefined ? {} : { batchId: id(v.batchId) }),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Reuse the existing work-filter/CAS contract, never a Task identity or Task lifecycle. */
|
|
37
|
+
export function parseTenantConversationWorkMutation(raw, requestId) {
|
|
38
|
+
const v = tenantRecord(boundedTenantJson(raw), ['operation', 'subscriptionId', 'expectedGeneration'], [
|
|
39
|
+
'conversationRef',
|
|
40
|
+
'factKinds',
|
|
41
|
+
'resourcePrefixes',
|
|
42
|
+
'afterFactSequence',
|
|
43
|
+
'batchId',
|
|
44
|
+
'fingerprint',
|
|
45
|
+
]);
|
|
46
|
+
const { conversationRef, ...args } = v;
|
|
47
|
+
let p;
|
|
48
|
+
try {
|
|
49
|
+
p = parseTaskWorkEventInput({ ...args, requestId });
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return tenantInvalid();
|
|
53
|
+
}
|
|
54
|
+
if (p.operation === 'read' || p.operation === 'discover')
|
|
55
|
+
return tenantInvalid();
|
|
56
|
+
const common = {
|
|
57
|
+
...context(conversationRef),
|
|
58
|
+
subscriptionId: p.subscriptionId,
|
|
59
|
+
expectedGeneration: p.expectedGeneration,
|
|
60
|
+
};
|
|
61
|
+
if (p.operation === 'subscribe')
|
|
62
|
+
return {
|
|
63
|
+
operation: p.operation,
|
|
64
|
+
...common,
|
|
65
|
+
factKinds: p.factKinds,
|
|
66
|
+
resourcePrefixes: p.resourcePrefixes,
|
|
67
|
+
...(p.afterFactSequence === undefined ? {} : { afterFactSequence: p.afterFactSequence }),
|
|
68
|
+
};
|
|
69
|
+
if (p.operation === 'cancel')
|
|
70
|
+
return { operation: p.operation, ...common };
|
|
71
|
+
return { operation: p.operation, ...common, batchId: p.batchId, fingerprint: p.fingerprint };
|
|
72
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { TASK_WORK_KINDS } from '../task-work-events.js';
|
|
2
|
+
import { TENANT_RESOURCE_SCHEMA } from './schemas.js';
|
|
3
|
+
const object = (properties, required = Object.keys(properties)) => ({ type: 'object', additionalProperties: false, properties, required });
|
|
4
|
+
const id = { type: 'string', pattern: '^[A-Za-z0-9_-]{1,128}$' }, text = { type: 'string', minLength: 1, maxLength: 512 }, generation = { type: 'integer', minimum: 0, maximum: Number.MAX_SAFE_INTEGER - 1 }, sequence = { type: 'string', pattern: '^(0|[1-9][0-9]{0,18})$' }, digest = { type: 'string', pattern: '^[a-f0-9]{64}$' }, c = {
|
|
5
|
+
conversationRef: {
|
|
6
|
+
type: 'string',
|
|
7
|
+
pattern: '^tmconv_[a-f0-9-]{36}$',
|
|
8
|
+
description: 'API: your actual conversation. Native: omit to use the private bound conversation; another conversation is rejected.',
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
const fields = {
|
|
12
|
+
subscriptionId: {
|
|
13
|
+
...id,
|
|
14
|
+
description: 'Choose a stable listener ID; reuse it after recovery, not the source or Integration ID.',
|
|
15
|
+
},
|
|
16
|
+
expectedGeneration: {
|
|
17
|
+
...generation,
|
|
18
|
+
description: '0 for first subscribe; otherwise current saved generation. A pending batch prevents a filter change.',
|
|
19
|
+
},
|
|
20
|
+
factKinds: {
|
|
21
|
+
type: 'array',
|
|
22
|
+
minItems: 1,
|
|
23
|
+
maxItems: 4,
|
|
24
|
+
uniqueItems: true,
|
|
25
|
+
items: { enum: [...TASK_WORK_KINDS] },
|
|
26
|
+
},
|
|
27
|
+
resourcePrefixes: { type: 'array', minItems: 1, maxItems: 32, uniqueItems: true, items: text },
|
|
28
|
+
afterFactSequence: {
|
|
29
|
+
...sequence,
|
|
30
|
+
type: ['string', 'null'],
|
|
31
|
+
description: 'First subscribe: omit/null for commit snapshot or explicit int64 string for history. Changes preserve the immutable original start.',
|
|
32
|
+
},
|
|
33
|
+
batchId: id,
|
|
34
|
+
fingerprint: digest,
|
|
35
|
+
};
|
|
36
|
+
export const TENANT_CONVERSATION_WORK_QUERY_SCHEMA = {
|
|
37
|
+
...object({
|
|
38
|
+
...c,
|
|
39
|
+
operation: { enum: ['discover', 'list', 'read'] },
|
|
40
|
+
subscriptionId: id,
|
|
41
|
+
batchId: id,
|
|
42
|
+
afterSubscriptionId: id,
|
|
43
|
+
}, ['operation']),
|
|
44
|
+
oneOf: [
|
|
45
|
+
object({ ...c, operation: { const: 'discover' } }, ['operation']),
|
|
46
|
+
object({ ...c, operation: { const: 'list' }, afterSubscriptionId: id }, ['operation']),
|
|
47
|
+
object({ ...c, operation: { const: 'read' }, subscriptionId: id, batchId: id }, [
|
|
48
|
+
'operation',
|
|
49
|
+
'subscriptionId',
|
|
50
|
+
]),
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
export const TENANT_CONVERSATION_WORK_MUTATION_SCHEMA = {
|
|
54
|
+
...object({ ...c, operation: { enum: ['subscribe', 'acknowledge', 'cancel'] }, ...fields }, [
|
|
55
|
+
'operation',
|
|
56
|
+
'subscriptionId',
|
|
57
|
+
'expectedGeneration',
|
|
58
|
+
]),
|
|
59
|
+
oneOf: [
|
|
60
|
+
object({
|
|
61
|
+
...c,
|
|
62
|
+
operation: { const: 'subscribe' },
|
|
63
|
+
subscriptionId: id,
|
|
64
|
+
expectedGeneration: generation,
|
|
65
|
+
factKinds: fields.factKinds,
|
|
66
|
+
resourcePrefixes: fields.resourcePrefixes,
|
|
67
|
+
afterFactSequence: fields.afterFactSequence,
|
|
68
|
+
}, ['operation', 'subscriptionId', 'expectedGeneration', 'factKinds', 'resourcePrefixes']),
|
|
69
|
+
object({
|
|
70
|
+
...c,
|
|
71
|
+
operation: { const: 'acknowledge' },
|
|
72
|
+
subscriptionId: id,
|
|
73
|
+
expectedGeneration: generation,
|
|
74
|
+
batchId: id,
|
|
75
|
+
fingerprint: digest,
|
|
76
|
+
}, ['operation', 'subscriptionId', 'expectedGeneration', 'batchId', 'fingerprint']),
|
|
77
|
+
object({ ...c, operation: { const: 'cancel' }, subscriptionId: id, expectedGeneration: generation }, ['operation', 'subscriptionId', 'expectedGeneration']),
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
const fact = object({
|
|
81
|
+
schemaVersion: { const: 1 },
|
|
82
|
+
kind: { enum: [...TASK_WORK_KINDS] },
|
|
83
|
+
scope: object({ tenantId: text, workspaceId: text, projectId: text }),
|
|
84
|
+
resourceRef: text,
|
|
85
|
+
parentRef: { type: ['string', 'null'], maxLength: 512 },
|
|
86
|
+
revision: sequence,
|
|
87
|
+
status: text,
|
|
88
|
+
phase: text,
|
|
89
|
+
cancelRequested: { type: 'boolean' },
|
|
90
|
+
artifactCount: { type: 'integer', minimum: 0 },
|
|
91
|
+
}, ['schemaVersion', 'kind', 'scope', 'resourceRef', 'parentRef', 'revision']);
|
|
92
|
+
const subscription = object({
|
|
93
|
+
subscriptionId: id,
|
|
94
|
+
generation: { type: 'integer', minimum: 1 },
|
|
95
|
+
state: { enum: ['ACTIVE', 'CANCELLED', 'CLOSED'] },
|
|
96
|
+
target: TENANT_RESOURCE_SCHEMA,
|
|
97
|
+
factKinds: fields.factKinds,
|
|
98
|
+
resourcePrefixes: fields.resourcePrefixes,
|
|
99
|
+
start: object({
|
|
100
|
+
mode: { enum: ['CURRENT_SNAPSHOT', 'AFTER_SEQUENCE'] },
|
|
101
|
+
afterFactSequence: sequence,
|
|
102
|
+
}),
|
|
103
|
+
pendingBatchId: { type: ['string', 'null'], maxLength: 128 },
|
|
104
|
+
});
|
|
105
|
+
const batch = object({
|
|
106
|
+
batchId: id,
|
|
107
|
+
subscriptionId: id,
|
|
108
|
+
generation: { type: 'integer', minimum: 1 },
|
|
109
|
+
fingerprint: digest,
|
|
110
|
+
facts: { type: 'array', minItems: 1, maxItems: 16, items: fact },
|
|
111
|
+
resourceHints: {
|
|
112
|
+
type: 'array',
|
|
113
|
+
maxItems: 16,
|
|
114
|
+
items: object({ resourceRef: text, taskRunKey: text }),
|
|
115
|
+
},
|
|
116
|
+
acknowledged: { type: 'boolean' },
|
|
117
|
+
});
|
|
118
|
+
export const TENANT_CONVERSATION_WORK_REPLY_SCHEMA = object({
|
|
119
|
+
conversationRef: c.conversationRef,
|
|
120
|
+
target: TENANT_RESOURCE_SCHEMA,
|
|
121
|
+
source: object({
|
|
122
|
+
sourceId: { const: 'agent-stack' },
|
|
123
|
+
lifetime: { const: 'TENANT_CONVERSATION' },
|
|
124
|
+
closed: { type: 'boolean' },
|
|
125
|
+
factKinds: fields.factKinds,
|
|
126
|
+
resourcePrefixes: fields.resourcePrefixes,
|
|
127
|
+
metadataOnly: { const: true },
|
|
128
|
+
delivery: { const: 'PULL' },
|
|
129
|
+
automaticWake: { const: 'UNSUPPORTED' },
|
|
130
|
+
nativeWait: { const: 'UNSUPPORTED' },
|
|
131
|
+
}),
|
|
132
|
+
subscription,
|
|
133
|
+
batch: { anyOf: [batch, { type: 'null' }] },
|
|
134
|
+
subscriptions: { type: 'array', maxItems: 8, items: subscription },
|
|
135
|
+
nextAfterSubscriptionId: id,
|
|
136
|
+
}, ['conversationRef', 'target']);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** 不读取 getter,不接受额外或隐藏字段,管理用途与版本测试保持独立合同。 */
|
|
2
|
+
export function parseTenantManagementDelegationBinding(raw) {
|
|
3
|
+
const invalid = () => {
|
|
4
|
+
throw new TypeError('TENANT_MANAGEMENT_DELEGATION_INVALID');
|
|
5
|
+
};
|
|
6
|
+
if (!raw ||
|
|
7
|
+
typeof raw !== 'object' ||
|
|
8
|
+
Array.isArray(raw) ||
|
|
9
|
+
(Object.getPrototypeOf(raw) !== Object.prototype && Object.getPrototypeOf(raw) !== null))
|
|
10
|
+
return invalid();
|
|
11
|
+
const fields = Object.getOwnPropertyDescriptors(raw), delegationRef = fields.delegationRef?.value, conversationRef = fields.conversationRef?.value;
|
|
12
|
+
if (Reflect.ownKeys(raw).length !== 3 ||
|
|
13
|
+
Object.values(fields).some((field) => !('value' in field) || !field.enumerable) ||
|
|
14
|
+
fields.schemaVersion?.value !== 1 ||
|
|
15
|
+
typeof delegationRef !== 'string' ||
|
|
16
|
+
!/^tmdeleg_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(delegationRef) ||
|
|
17
|
+
typeof conversationRef !== 'string' ||
|
|
18
|
+
!/^tmconv_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(conversationRef))
|
|
19
|
+
return invalid();
|
|
20
|
+
return Object.freeze({ schemaVersion: 1, delegationRef, conversationRef });
|
|
21
|
+
}
|
|
22
|
+
/** 模型回答使用相同的 JSON 字节预算;截断明确呈现,不能从文字推断业务成功。 */
|
|
23
|
+
export function tenantConversationAnswer(messages) {
|
|
24
|
+
const original = messages.join('\n');
|
|
25
|
+
let answer = original;
|
|
26
|
+
while (new TextEncoder().encode(JSON.stringify(answer)).byteLength > 65536)
|
|
27
|
+
answer = answer.slice(0, Math.floor(answer.length / 2));
|
|
28
|
+
if (/[\uD800-\uDBFF]$/.test(answer))
|
|
29
|
+
answer = answer.slice(0, -1);
|
|
30
|
+
return { answer, answerTruncated: answer.length < original.length };
|
|
31
|
+
}
|