@abot-ai/runtime 1.3.1 → 1.4.0
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/dist/plugins/system/source/application-catalog.d.ts +14 -0
- package/dist/plugins/system/source/application-catalog.js +185 -0
- package/dist/plugins/system/source/application-launch.d.ts +10 -0
- package/dist/plugins/system/source/application-launch.js +80 -0
- package/dist/plugins/system/source/application-observation.d.ts +25 -0
- package/dist/plugins/system/source/application-observation.js +53 -0
- package/dist/plugins/system/source/commands.d.ts +7 -0
- package/dist/plugins/system/source/commands.js +71 -0
- package/dist/plugins/system/source/companion/autostart.d.ts +16 -0
- package/dist/plugins/system/source/companion/autostart.js +146 -0
- package/dist/plugins/system/source/companion/broker-location.d.ts +11 -0
- package/dist/plugins/system/source/companion/broker-location.js +76 -0
- package/dist/plugins/system/source/companion/broker-server.d.ts +4 -0
- package/dist/plugins/system/source/companion/broker-server.js +147 -0
- package/dist/plugins/system/source/companion/connection.d.ts +25 -0
- package/dist/plugins/system/source/companion/connection.js +182 -0
- package/dist/plugins/system/source/companion/liveness.d.ts +3 -0
- package/dist/plugins/system/source/companion/liveness.js +20 -0
- package/dist/plugins/system/source/companion/native-address.d.ts +12 -0
- package/dist/plugins/system/source/companion/native-address.js +41 -0
- package/dist/plugins/system/source/companion/native-identity.d.ts +2 -0
- package/dist/plugins/system/source/companion/native-identity.js +23 -0
- package/dist/plugins/system/source/companion/native-messages.d.ts +9 -0
- package/dist/plugins/system/source/companion/native-messages.js +77 -0
- package/dist/plugins/system/source/companion/native-session.d.ts +19 -0
- package/dist/plugins/system/source/companion/native-session.js +205 -0
- package/dist/plugins/system/source/companion/native-state.d.ts +22 -0
- package/dist/plugins/system/source/companion/native-state.js +126 -0
- package/dist/plugins/system/source/companion/native-supervisor.d.ts +10 -0
- package/dist/plugins/system/source/companion/native-supervisor.js +93 -0
- package/dist/plugins/system/source/companion/pairing-store.d.ts +22 -0
- package/dist/plugins/system/source/companion/pairing-store.js +102 -0
- package/dist/plugins/system/source/companion/private-store.d.ts +4 -0
- package/dist/plugins/system/source/companion/private-store.js +59 -0
- package/dist/plugins/system/source/companion/process-owner-identity.d.ts +22 -0
- package/dist/plugins/system/source/companion/process-owner-identity.js +144 -0
- package/dist/plugins/system/source/companion/protocol.d.ts +57 -0
- package/dist/plugins/system/source/companion/protocol.js +66 -0
- package/dist/plugins/system/source/contracts.d.ts +38 -0
- package/dist/plugins/system/source/contracts.js +7 -0
- package/dist/plugins/system/source/elevation.d.ts +8 -0
- package/dist/plugins/system/source/elevation.js +57 -0
- package/dist/plugins/system/source/handlers.d.ts +3 -0
- package/dist/plugins/system/source/handlers.js +90 -0
- package/dist/plugins/system/source/host-evidence.d.ts +4 -0
- package/dist/plugins/system/source/host-evidence.js +52 -0
- package/dist/plugins/system/source/host-observation.d.ts +25 -0
- package/dist/plugins/system/source/host-observation.js +59 -0
- package/dist/plugins/system/source/process-result.d.ts +4 -0
- package/dist/plugins/system/source/process-result.js +86 -0
- package/dist/plugins/system/source/process-runner.d.ts +3 -0
- package/dist/plugins/system/source/process-runner.js +103 -0
- package/dist/plugins/system/source/target-observation.d.ts +18 -0
- package/dist/plugins/system/source/target-observation.js +29 -0
- package/dist/plugins/system/source/targets.d.ts +8 -0
- package/dist/plugins/system/source/targets.js +101 -0
- package/dist/scripts/add-runtime-model.js +10 -53
- package/dist/scripts/runtime-model-addition.d.ts +13 -0
- package/dist/scripts/runtime-model-addition.js +53 -0
- package/dist/scripts/runtime-setup-files.d.ts +3 -1
- package/dist/scripts/runtime-setup-files.js +18 -1
- package/dist/src/capabilities/file-output-presentation.d.ts +43 -0
- package/dist/src/capabilities/file-output-presentation.js +133 -0
- package/dist/src/capabilities/tool-definition-validator/definition-parser.js +2 -0
- package/dist/src/capabilities/tool-definition-validator/event-input-text-options.d.ts +5 -0
- package/dist/src/capabilities/tool-definition-validator/event-input-text-options.js +37 -0
- package/dist/src/capabilities/tool-definition-validator/event-presentation.js +3 -0
- package/dist/src/capabilities/tool-definition-validator/module-registry.js +12 -0
- package/dist/src/capabilities/tool-event-input-text.d.ts +9 -0
- package/dist/src/capabilities/tool-event-input-text.js +64 -0
- package/dist/src/capabilities/tool-event-metadata.js +10 -0
- package/dist/src/capabilities/tool-executor.d.ts +1 -0
- package/dist/src/capabilities/tool-executor.js +1 -0
- package/dist/src/capabilities/tool-permission-mode.d.ts +7 -0
- package/dist/src/capabilities/tool-permission-mode.js +27 -0
- package/dist/src/capabilities/tool-types.d.ts +18 -2
- package/dist/src/cli/abot.js +18 -15
- package/dist/src/cli/host-companion-bundle.mjs +5201 -0
- package/dist/src/cli/host-companion-entry.d.ts +8 -0
- package/dist/src/cli/host-companion-entry.js +70 -0
- package/dist/src/cli/host-companion-startup.d.ts +4 -0
- package/dist/src/cli/host-companion-startup.js +35 -0
- package/dist/src/cli/host-companion.d.ts +5 -0
- package/dist/src/cli/host-companion.js +203 -0
- package/dist/src/model-gateway/server/configuration.js +4 -1
- package/dist/src/model-gateway/server/contracts.d.ts +2 -0
- package/dist/src/plugin-contract/entrypoint.d.ts +4 -2
- package/dist/src/plugin-contract/manifest.d.ts +1 -0
- package/dist/src/runtime/adapters/config-file-transaction.d.ts +46 -0
- package/dist/src/runtime/adapters/config-file-transaction.js +158 -0
- package/dist/src/runtime/adapters/configured-skill-provider.js +3 -3
- package/dist/src/runtime/adapters/in-memory-session-store.js +11 -1
- package/dist/src/runtime/adapters/long-term-memory/file-lock/acquisition.js +7 -3
- package/dist/src/runtime/adapters/long-term-memory/file-lock/contracts.d.ts +4 -1
- package/dist/src/runtime/adapters/long-term-memory/file-lock/install.d.ts +1 -1
- package/dist/src/runtime/adapters/long-term-memory/file-lock/install.js +5 -1
- package/dist/src/runtime/adapters/long-term-memory/file-lock/owner-identity.d.ts +3 -0
- package/dist/src/runtime/adapters/long-term-memory/file-lock/owner-identity.js +15 -0
- package/dist/src/runtime/adapters/long-term-memory/file-lock/owner-record.js +2 -0
- package/dist/src/runtime/adapters/long-term-memory/onboarding-config-repository.js +17 -43
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/catalog/registrations.js +6 -2
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/approval.js +10 -1
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/execution-binding.d.ts +11 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/execution-binding.js +37 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/file-output-presentation.d.ts +7 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/file-output-presentation.js +105 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/run.js +29 -3
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/shared/action-fingerprint.d.ts +1 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/shared/action-fingerprint.js +1 -0
- package/dist/src/runtime/capabilities/configured-tool-registry.js +9 -1
- package/dist/src/runtime/capabilities/file-output-root-identity.d.ts +5 -0
- package/dist/src/runtime/capabilities/file-output-root-identity.js +146 -0
- package/dist/src/runtime/capabilities/file-output-root-marker-creation.d.ts +5 -0
- package/dist/src/runtime/capabilities/file-output-root-marker-creation.js +63 -0
- package/dist/src/runtime/capabilities/request-bound-tool-registry.d.ts +1 -0
- package/dist/src/runtime/capabilities/request-bound-tool-registry.js +6 -1
- package/dist/src/runtime/capabilities/request-module-preparation.d.ts +3 -0
- package/dist/src/runtime/capabilities/request-module-preparation.js +102 -0
- package/dist/src/runtime/capabilities/request-permission-catalog.d.ts +10 -0
- package/dist/src/runtime/capabilities/request-permission-catalog.js +50 -0
- package/dist/src/runtime/capabilities/request-permission-tool-registry.d.ts +4 -0
- package/dist/src/runtime/capabilities/request-permission-tool-registry.js +61 -0
- package/dist/src/runtime/capabilities/request-runtime-tool-registry.d.ts +3 -0
- package/dist/src/runtime/capabilities/request-runtime-tool-registry.js +5 -2
- package/dist/src/runtime/capabilities/request-working-directory.d.ts +3 -0
- package/dist/src/runtime/capabilities/request-working-directory.js +12 -0
- package/dist/src/runtime/composition.d.ts +2 -0
- package/dist/src/runtime/config/runner/loader.d.ts +4 -0
- package/dist/src/runtime/config/runner/loader.js +23 -3
- package/dist/src/runtime/context/capability-brief-budget.d.ts +18 -0
- package/dist/src/runtime/context/capability-brief-budget.js +38 -0
- package/dist/src/runtime/context/capability-brief-readmission.d.ts +21 -0
- package/dist/src/runtime/context/capability-brief-readmission.js +47 -0
- package/dist/src/runtime/context/capability-brief.d.ts +9 -2
- package/dist/src/runtime/context/capability-brief.js +21 -39
- package/dist/src/runtime/context/capability-descriptions.d.ts +3 -0
- package/dist/src/runtime/context/capability-descriptions.js +23 -0
- package/dist/src/runtime/default-environment-adapters.js +3 -4
- package/dist/src/runtime/local-application.d.ts +18 -0
- package/dist/src/runtime/local-application.js +12 -0
- package/dist/src/runtime/local-host/app-service-dispatch.d.ts +1 -0
- package/dist/src/runtime/local-host/app-service-dispatch.js +9 -0
- package/dist/src/runtime/local-host/client-services.d.ts +16 -0
- package/dist/src/runtime/local-host/client-services.js +3 -2
- package/dist/src/runtime/local-host/contracts.d.ts +4 -0
- package/dist/src/runtime/local-host/startup-connection.js +22 -7
- package/dist/src/runtime/local-host/transport.js +14 -2
- package/dist/src/runtime/orchestration/role-calls/candidate-validation.js +5 -2
- package/dist/src/runtime/orchestration/role-calls/command-decoder.js +3 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/work-plan-transition.d.ts +3 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/work-plan-transition.js +46 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch.js +3 -0
- package/dist/src/runtime/orchestration/role-calls/contracts.d.ts +8 -4
- package/dist/src/runtime/orchestration/role-calls/transactions.js +2 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-contracts.d.ts +48 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-contracts.js +9 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-source.d.ts +7 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-source.js +85 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-transactions.d.ts +3 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-transactions.js +17 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-validation.d.ts +10 -0
- package/dist/src/runtime/orchestration/role-calls/work-plan-validation.js +149 -0
- package/dist/src/runtime/orchestration/worker-capabilities/contracts.d.ts +1 -1
- package/dist/src/runtime/orchestration/worker-capabilities/contracts.js +1 -1
- package/dist/src/runtime/plugins/compiled-catalog.d.ts +2 -1
- package/dist/src/runtime/plugins/configured-manifests.d.ts +3 -0
- package/dist/src/runtime/plugins/configured-manifests.js +37 -0
- package/dist/src/runtime/plugins/entrypoint-validation.d.ts +6 -0
- package/dist/src/runtime/plugins/entrypoint-validation.js +74 -0
- package/dist/src/runtime/plugins/loader.js +11 -123
- package/dist/src/runtime/plugins/manifest-discovery.d.ts +4 -1
- package/dist/src/runtime/plugins/manifest-discovery.js +8 -1
- package/dist/src/runtime/plugins/manifest-projection.js +3 -0
- package/dist/src/runtime/plugins/manifest-validator.js +7 -1
- package/dist/src/runtime/plugins/runtime-capability-plugins.d.ts +4 -0
- package/dist/src/runtime/plugins/runtime-capability-plugins.js +7 -0
- package/dist/src/runtime/plugins/selection.d.ts +14 -0
- package/dist/src/runtime/plugins/selection.js +38 -0
- package/dist/src/runtime/ports.d.ts +8 -2
- package/dist/src/runtime/projects/contracts.d.ts +40 -0
- package/dist/src/runtime/projects/contracts.js +10 -0
- package/dist/src/runtime/projects/folders.d.ts +7 -0
- package/dist/src/runtime/projects/folders.js +110 -0
- package/dist/src/runtime/projects/repository.d.ts +10 -0
- package/dist/src/runtime/projects/repository.js +54 -0
- package/dist/src/runtime/projects/service.d.ts +3 -0
- package/dist/src/runtime/projects/service.js +34 -0
- package/dist/src/runtime/projects/session-paths.d.ts +5 -0
- package/dist/src/runtime/projects/session-paths.js +13 -0
- package/dist/src/runtime/request/execution-agent-plan-update.d.ts +4 -0
- package/dist/src/runtime/request/execution-agent-plan-update.js +13 -0
- package/dist/src/runtime/request/execution-agent-root-execution.js +9 -1
- package/dist/src/runtime/request/handler.js +9 -2
- package/dist/src/runtime/request/input.d.ts +2 -1
- package/dist/src/runtime/request/input.js +1 -6
- package/dist/src/runtime/request/role-call-planner-events.js +4 -0
- package/dist/src/runtime/request/role-executor-composition.js +9 -1
- package/dist/src/runtime/request/root-contract.d.ts +6 -1
- package/dist/src/runtime/request/root-execution-kernel.js +17 -0
- package/dist/src/runtime/request/root-plan-event-projection.d.ts +3 -0
- package/dist/src/runtime/request/root-plan-event-projection.js +32 -0
- package/dist/src/runtime/request/root-plan-update.d.ts +15 -0
- package/dist/src/runtime/request/root-plan-update.js +20 -0
- package/dist/src/runtime/request/worker-capability-composition.d.ts +1 -0
- package/dist/src/runtime/request/worker-capability-composition.js +2 -0
- package/dist/src/runtime/runtime-environment.d.ts +1 -0
- package/dist/src/runtime/runtime-environment.js +2 -0
- package/dist/src/runtime/steps/auditor-decision/advisory-receipt.d.ts +32 -0
- package/dist/src/runtime/steps/auditor-decision/advisory-receipt.js +106 -0
- package/dist/src/runtime/steps/auditor-decision/advisory-result-budget.d.ts +5 -0
- package/dist/src/runtime/steps/auditor-decision/advisory-result-budget.js +40 -0
- package/dist/src/runtime/steps/auditor-decision/audit-input-state.d.ts +12 -0
- package/dist/src/runtime/steps/auditor-decision/audit-input-state.js +101 -0
- package/dist/src/runtime/steps/auditor-decision/contracts.d.ts +31 -16
- package/dist/src/runtime/steps/auditor-decision/contracts.js +3 -3
- package/dist/src/runtime/steps/auditor-decision/evidence-binding.d.ts +5 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-binding.js +43 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-coverage.d.ts +2 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-coverage.js +71 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-inventory.d.ts +13 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-inventory.js +89 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-representation.d.ts +10 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-representation.js +56 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-selection.d.ts +9 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-selection.js +71 -0
- package/dist/src/runtime/steps/auditor-decision/format.js +44 -2
- package/dist/src/runtime/steps/auditor-decision/index.d.ts +3 -0
- package/dist/src/runtime/steps/auditor-decision/index.js +3 -0
- package/dist/src/runtime/steps/auditor-decision/input.d.ts +2 -2
- package/dist/src/runtime/steps/auditor-decision/input.js +64 -20
- package/dist/src/runtime/steps/auditor-decision/parser.js +38 -23
- package/dist/src/runtime/steps/auditor-decision/projection.js +49 -99
- package/dist/src/runtime/steps/auditor-decision/prompt.d.ts +1 -1
- package/dist/src/runtime/steps/auditor-decision/prompt.js +9 -4
- package/dist/src/runtime/steps/auditor-decision/run.js +79 -47
- package/dist/src/runtime/steps/execution-agent/contracts.d.ts +8 -1
- package/dist/src/runtime/steps/execution-agent/contracts.js +2 -0
- package/dist/src/runtime/steps/execution-agent/decision-parsing.js +4 -0
- package/dist/src/runtime/steps/execution-agent/format.js +4 -3
- package/dist/src/runtime/steps/execution-agent/input.js +10 -11
- package/dist/src/runtime/steps/execution-agent/prompt.d.ts +1 -0
- package/dist/src/runtime/steps/execution-agent/prompt.js +11 -4
- package/dist/src/runtime/steps/execution-agent/state-context.js +10 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-contract.d.ts +18 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-contract.js +86 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-decision-parsing.d.ts +2 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-decision-parsing.js +38 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-sources.d.ts +6 -0
- package/dist/src/runtime/steps/execution-agent/work-plan-sources.js +54 -0
- package/dist/src/runtime/steps/planner-decision/capability-brief.d.ts +40 -0
- package/dist/src/runtime/steps/planner-decision/capability-brief.js +47 -0
- package/dist/src/runtime/steps/planner-decision/input.d.ts +4 -2
- package/dist/src/runtime/steps/planner-decision/input.js +23 -13
- package/dist/src/runtime/steps/planner-decision/prompt.js +2 -2
- package/dist/src/runtime/steps/planner-decision/run.js +11 -7
- package/dist/src/runtime/steps/planner-graph/parser.js +0 -11
- package/dist/src/runtime/steps/planner-graph/prompt.js +2 -1
- package/dist/src/runtime/steps/supervisor-decision/capability-brief-readmission.d.ts +10 -0
- package/dist/src/runtime/steps/supervisor-decision/capability-brief-readmission.js +39 -0
- package/dist/src/runtime/steps/supervisor-decision/run.js +2 -1
- package/dist/src/runtime/steps/worker-decision/parser/accepted-decision.d.ts +3 -1
- package/dist/src/runtime/steps/worker-decision/parser/accepted-decision.js +20 -1
- package/dist/src/runtime/steps/worker-decision/parser/capability-batch-validation.d.ts +1 -1
- package/dist/src/runtime/steps/worker-decision/parser/capability-batch-validation.js +6 -6
- package/dist/src/runtime/steps/worker-decision/parser/capability-invocation-validation.js +2 -1
- package/dist/src/sessions/project-binding.d.ts +12 -0
- package/dist/src/sessions/project-binding.js +49 -0
- package/dist/src/sessions/record/projection.d.ts +6 -1
- package/dist/src/sessions/record/projection.js +1 -0
- package/dist/src/sessions/session-service.d.ts +2 -1
- package/dist/src/sessions/session-service.js +11 -1
- package/dist/src/sessions/types.d.ts +7 -0
- package/dist/src/web-ui/app/ARCHITECTURE.md +121 -1
- package/dist/src/web-ui/app/app-bootstrap.js +3 -0
- package/dist/src/web-ui/app/app-dom.js +3 -0
- package/dist/src/web-ui/app/app-state.js +38 -0
- package/dist/src/web-ui/app/app.js +76 -67
- package/dist/src/web-ui/app/components/config-workspace/config-model.js +23 -3
- package/dist/src/web-ui/app/components/config-workspace/dashboard-rendering.js +2 -0
- package/dist/src/web-ui/app/components/config-workspace/field-rendering.js +2 -0
- package/dist/src/web-ui/app/components/config-workspace/model-rendering.js +6 -0
- package/dist/src/web-ui/app/components/config-workspace/model-setup-entry.js +27 -0
- package/dist/src/web-ui/app/components/config-workspace/raw-config-repair.js +28 -0
- package/dist/src/web-ui/app/components/config-workspace/workspace-events.js +5 -0
- package/dist/src/web-ui/app/components/config-workspace/workspace-mutations.js +23 -3
- package/dist/src/web-ui/app/components/config-workspace/workspace-persistence.js +26 -8
- package/dist/src/web-ui/app/components/config-workspace/workspace-view.js +56 -0
- package/dist/src/web-ui/app/components/config-workspace.js +11 -0
- package/dist/src/web-ui/app/components/conversation-activity.d.ts +6 -0
- package/dist/src/web-ui/app/components/conversation-activity.js +10 -2
- package/dist/src/web-ui/app/components/conversation-file-action.js +33 -0
- package/dist/src/web-ui/app/components/conversation-file-focus.d.ts +12 -0
- package/dist/src/web-ui/app/components/conversation-file-focus.js +149 -0
- package/dist/src/web-ui/app/components/conversation-file-preview.d.ts +23 -0
- package/dist/src/web-ui/app/components/conversation-file-preview.js +247 -0
- package/dist/src/web-ui/app/components/conversation-role-cards.d.ts +6 -0
- package/dist/src/web-ui/app/components/conversation-role-cards.js +10 -2
- package/dist/src/web-ui/app/components/conversation-tool-evidence.d.ts +9 -0
- package/dist/src/web-ui/app/components/conversation-tool-evidence.js +129 -0
- package/dist/src/web-ui/app/components/conversation-tools.d.ts +6 -0
- package/dist/src/web-ui/app/components/conversation-tools.js +25 -105
- package/dist/src/web-ui/app/components/conversation-view.js +10 -1
- package/dist/src/web-ui/app/components/dashboard/workspace.js +19 -7
- package/dist/src/web-ui/app/components/model-setup/rendering.js +99 -0
- package/dist/src/web-ui/app/components/model-setup/save-flow.js +111 -0
- package/dist/src/web-ui/app/components/model-setup/save-outcome.js +16 -0
- package/dist/src/web-ui/app/components/model-setup/validation.js +125 -0
- package/dist/src/web-ui/app/components/model-setup/wizard.d.ts +44 -0
- package/dist/src/web-ui/app/components/model-setup/wizard.js +370 -0
- package/dist/src/web-ui/app/components/plugins/manager.js +200 -0
- package/dist/src/web-ui/app/components/plugins/rendering.js +124 -0
- package/dist/src/web-ui/app/components/plugins/view-state.js +123 -0
- package/dist/src/web-ui/app/components/project-creation.js +119 -0
- package/dist/src/web-ui/app/components/project-session-groups.js +95 -0
- package/dist/src/web-ui/app/components/runtime-config-activation.js +83 -0
- package/dist/src/web-ui/app/components/runtime-setup/bridge-guide.d.ts +9 -0
- package/dist/src/web-ui/app/components/runtime-setup/bridge-guide.js +198 -0
- package/dist/src/web-ui/app/components/runtime-setup/bridge-rendering.js +107 -0
- package/dist/src/web-ui/app/components/runtime-setup/commands.js +54 -0
- package/dist/src/web-ui/app/components/runtime-setup/configuration-recovery.js +25 -0
- package/dist/src/web-ui/app/components/runtime-setup/connection-form.js +154 -0
- package/dist/src/web-ui/app/components/runtime-setup/connection-state.js +71 -0
- package/dist/src/web-ui/app/components/runtime-setup/context-window.js +18 -0
- package/dist/src/web-ui/app/components/runtime-setup/embedding-credential-status.d.ts +15 -0
- package/dist/src/web-ui/app/components/runtime-setup/embedding-credential-status.js +87 -0
- package/dist/src/web-ui/app/components/runtime-setup/embedding-provider-receipt.js +30 -0
- package/dist/src/web-ui/app/components/runtime-setup/embedding-rendering.js +57 -0
- package/dist/src/web-ui/app/components/runtime-setup/embedding.js +284 -0
- package/dist/src/web-ui/app/components/runtime-setup/optional-steps.js +117 -0
- package/dist/src/web-ui/app/components/runtime-setup/plugins.js +173 -0
- package/dist/src/web-ui/app/components/runtime-setup/rendering.js +141 -0
- package/dist/src/web-ui/app/components/runtime-setup/validation.js +69 -0
- package/dist/src/web-ui/app/components/runtime-setup/view-state.js +58 -0
- package/dist/src/web-ui/app/components/runtime-setup/wizard-shell.js +27 -0
- package/dist/src/web-ui/app/components/runtime-setup-guide.d.ts +66 -5
- package/dist/src/web-ui/app/components/runtime-setup-guide.js +415 -461
- package/dist/src/web-ui/app/components/system-host/download.js +38 -0
- package/dist/src/web-ui/app/components/system-host/manager.js +249 -0
- package/dist/src/web-ui/app/components/system-host/rendering.js +88 -0
- package/dist/src/web-ui/app/components/system-host/setup-notice.js +87 -0
- package/dist/src/web-ui/app/components/system-host/visibility.js +35 -0
- package/dist/src/web-ui/app/components/tool-approval-card.d.ts +4 -0
- package/dist/src/web-ui/app/components/tool-approval-card.js +15 -0
- package/dist/src/web-ui/app/configuration-environment-refresh.js +118 -0
- package/dist/src/web-ui/app/configuration-feature.js +125 -4
- package/dist/src/web-ui/app/controllers/app-event-bindings.js +2 -0
- package/dist/src/web-ui/app/controllers/composer-workspace-controller.d.ts +1 -0
- package/dist/src/web-ui/app/controllers/composer-workspace-controller.js +4 -3
- package/dist/src/web-ui/app/controllers/conversation-file-preview-controller.d.ts +24 -0
- package/dist/src/web-ui/app/controllers/conversation-file-preview-controller.js +158 -0
- package/dist/src/web-ui/app/controllers/conversation-file-preview-feature.d.ts +19 -0
- package/dist/src/web-ui/app/controllers/conversation-file-preview-feature.js +63 -0
- package/dist/src/web-ui/app/controllers/conversation-session-controller.d.ts +1 -0
- package/dist/src/web-ui/app/controllers/conversation-session-controller.js +2 -0
- package/dist/src/web-ui/app/controllers/conversation-view-feature.js +28 -0
- package/dist/src/web-ui/app/controllers/dashboard-controller.js +17 -0
- package/dist/src/web-ui/app/controllers/projects-controller.d.ts +45 -0
- package/dist/src/web-ui/app/controllers/projects-controller.js +278 -0
- package/dist/src/web-ui/app/controllers/realtime-event-controller.js +3 -0
- package/dist/src/web-ui/app/controllers/runtime-onboarding-controller.js +13 -6
- package/dist/src/web-ui/app/controllers/runtime-selection-controller.d.ts +7 -1
- package/dist/src/web-ui/app/controllers/runtime-selection-controller.js +11 -95
- package/dist/src/web-ui/app/controllers/session-controller.js +64 -57
- package/dist/src/web-ui/app/controllers/tool-permission-mode-controller.d.ts +20 -0
- package/dist/src/web-ui/app/controllers/tool-permission-mode-controller.js +116 -0
- package/dist/src/web-ui/app/dashboard-feature.js +32 -10
- package/dist/src/web-ui/app/index.html +44 -7
- package/dist/src/web-ui/app/lib/conversation-file-preview.d.ts +12 -0
- package/dist/src/web-ui/app/lib/conversation-file-reference.d.ts +30 -0
- package/dist/src/web-ui/app/lib/conversation-file-reference.js +66 -0
- package/dist/src/web-ui/app/lib/tool-activity-event.d.ts +2 -0
- package/dist/src/web-ui/app/lib/tool-activity-event.js +18 -6
- package/dist/src/web-ui/app/lib/tool-activity-model.d.ts +2 -0
- package/dist/src/web-ui/app/lib/tool-activity-model.js +4 -2
- package/dist/src/web-ui/app/lib/tool-permission-mode.d.ts +16 -0
- package/dist/src/web-ui/app/lib/tool-permission-mode.js +60 -0
- package/dist/src/web-ui/app/lib/tool-process-activity-fields.js +102 -0
- package/dist/src/web-ui/app/projects-feature.js +134 -0
- package/dist/src/web-ui/app/runtime-onboarding-feature.d.ts +34 -0
- package/dist/src/web-ui/app/runtime-onboarding-feature.js +92 -0
- package/dist/src/web-ui/app/runtime-setup-page-lifecycle.d.ts +5 -0
- package/dist/src/web-ui/app/runtime-setup-page-lifecycle.js +13 -0
- package/dist/src/web-ui/app/services/client-preferences.d.ts +24 -0
- package/dist/src/web-ui/app/services/client-preferences.js +32 -19
- package/dist/src/web-ui/app/services/runtime-web-client/configuration.js +46 -0
- package/dist/src/web-ui/app/services/runtime-web-client/conversation-files.d.ts +28 -0
- package/dist/src/web-ui/app/services/runtime-web-client/conversation-files.js +75 -0
- package/dist/src/web-ui/app/services/runtime-web-client/projects.d.ts +19 -0
- package/dist/src/web-ui/app/services/runtime-web-client/projects.js +34 -0
- package/dist/src/web-ui/app/services/runtime-web-client/system-host.js +27 -0
- package/dist/src/web-ui/app/services/runtime-web-client.d.ts +52 -0
- package/dist/src/web-ui/app/services/runtime-web-client.js +35 -4
- package/dist/src/web-ui/app/styles/13-projects.css +272 -0
- package/dist/src/web-ui/app/styles/18-dashboard.css +0 -5
- package/dist/src/web-ui/app/styles/19-runtime-setup.css +411 -0
- package/dist/src/web-ui/app/styles/20-chat-composer.css +0 -384
- package/dist/src/web-ui/app/styles/29-conversation-file-preview.css +254 -0
- package/dist/src/web-ui/app/styles/37-runtime-activation.css +26 -0
- package/dist/src/web-ui/app/styles/38-schedule-workspace.css +1 -10
- package/dist/src/web-ui/app/styles/41-plugin-management.css +351 -0
- package/dist/src/web-ui/app/styles/42-runtime-setup-plugins.css +179 -0
- package/dist/src/web-ui/app/styles/43-model-setup.css +73 -0
- package/dist/src/web-ui/app/styles/44-model-provider-cards.css +63 -0
- package/dist/src/web-ui/app/styles/45-bridge-setup.css +44 -0
- package/dist/src/web-ui/app/styles/46-system-host.css +132 -0
- package/dist/src/web-ui/app/styles.css +10 -0
- package/dist/src/web-ui/config-dashboard-backend.d.ts +5 -0
- package/dist/src/web-ui/config-dashboard-backend.js +94 -114
- package/dist/src/web-ui/config-dashboard-model-identity.d.ts +7 -0
- package/dist/src/web-ui/config-dashboard-model-identity.js +45 -0
- package/dist/src/web-ui/config-dashboard-save-transaction.d.ts +5 -0
- package/dist/src/web-ui/config-dashboard-save-transaction.js +21 -0
- package/dist/src/web-ui/environment-config.d.ts +17 -0
- package/dist/src/web-ui/environment-config.js +60 -0
- package/dist/src/web-ui/forwarded-loopback-policy.d.ts +2 -0
- package/dist/src/web-ui/forwarded-loopback-policy.js +14 -0
- package/dist/src/web-ui/local-runtime/api-router.d.ts +7 -0
- package/dist/src/web-ui/local-runtime/api-router.js +136 -12
- package/dist/src/web-ui/local-runtime/config-mutation-request.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/config-mutation-request.js +55 -0
- package/dist/src/web-ui/local-runtime/configuration-activation-environments.d.ts +22 -0
- package/dist/src/web-ui/local-runtime/configuration-activation-environments.js +106 -0
- package/dist/src/web-ui/local-runtime/configuration-activation-source.d.ts +7 -0
- package/dist/src/web-ui/local-runtime/configuration-activation-source.js +36 -0
- package/dist/src/web-ui/local-runtime/configuration-activation.d.ts +20 -0
- package/dist/src/web-ui/local-runtime/configuration-activation.js +107 -0
- package/dist/src/web-ui/local-runtime/contracts.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/conversation-file-access.d.ts +30 -0
- package/dist/src/web-ui/local-runtime/conversation-file-access.js +131 -0
- package/dist/src/web-ui/local-runtime/conversation-file-content.d.ts +21 -0
- package/dist/src/web-ui/local-runtime/conversation-file-content.js +75 -0
- package/dist/src/web-ui/local-runtime/conversation-file-format.d.ts +12 -0
- package/dist/src/web-ui/local-runtime/conversation-file-format.js +87 -0
- package/dist/src/web-ui/local-runtime/conversation-file-native-open.d.ts +10 -0
- package/dist/src/web-ui/local-runtime/conversation-file-native-open.js +94 -0
- package/dist/src/web-ui/local-runtime/conversation-file-native-request.d.ts +4 -0
- package/dist/src/web-ui/local-runtime/conversation-file-native-request.js +72 -0
- package/dist/src/web-ui/local-runtime/conversation-file-routes.d.ts +11 -0
- package/dist/src/web-ui/local-runtime/conversation-file-routes.js +105 -0
- package/dist/src/web-ui/local-runtime/conversation-file-target.d.ts +14 -0
- package/dist/src/web-ui/local-runtime/conversation-file-target.js +158 -0
- package/dist/src/web-ui/local-runtime/environment-registry.d.ts +14 -0
- package/dist/src/web-ui/local-runtime/environment-registry.js +121 -6
- package/dist/src/web-ui/local-runtime/memory-onboarding-routes.d.ts +2 -1
- package/dist/src/web-ui/local-runtime/memory-onboarding-routes.js +15 -10
- package/dist/src/web-ui/local-runtime/model-setup-catalog.d.ts +17 -0
- package/dist/src/web-ui/local-runtime/model-setup-catalog.js +45 -0
- package/dist/src/web-ui/local-runtime/model-setup-identity.d.ts +16 -0
- package/dist/src/web-ui/local-runtime/model-setup-identity.js +20 -0
- package/dist/src/web-ui/local-runtime/model-setup-input.d.ts +24 -0
- package/dist/src/web-ui/local-runtime/model-setup-input.js +107 -0
- package/dist/src/web-ui/local-runtime/model-setup-provider.d.ts +17 -0
- package/dist/src/web-ui/local-runtime/model-setup-provider.js +68 -0
- package/dist/src/web-ui/local-runtime/model-setup-retry.d.ts +14 -0
- package/dist/src/web-ui/local-runtime/model-setup-retry.js +47 -0
- package/dist/src/web-ui/local-runtime/model-setup-routes.d.ts +12 -0
- package/dist/src/web-ui/local-runtime/model-setup-routes.js +50 -0
- package/dist/src/web-ui/local-runtime/model-setup-service.d.ts +30 -0
- package/dist/src/web-ui/local-runtime/model-setup-service.js +93 -0
- package/dist/src/web-ui/local-runtime/model-setup-validation.d.ts +5 -0
- package/dist/src/web-ui/local-runtime/model-setup-validation.js +33 -0
- package/dist/src/web-ui/local-runtime/plugin-management-routes.d.ts +14 -0
- package/dist/src/web-ui/local-runtime/plugin-management-routes.js +50 -0
- package/dist/src/web-ui/local-runtime/project-routes.d.ts +17 -0
- package/dist/src/web-ui/local-runtime/project-routes.js +93 -0
- package/dist/src/web-ui/local-runtime/provider-credential-identity.d.ts +3 -0
- package/dist/src/web-ui/local-runtime/provider-credential-identity.js +18 -0
- package/dist/src/web-ui/local-runtime/request-execution.d.ts +1 -0
- package/dist/src/web-ui/local-runtime/request-execution.js +8 -0
- package/dist/src/web-ui/local-runtime/runtime-availability.js +36 -7
- package/dist/src/web-ui/local-runtime/runtime-setup-completion.d.ts +13 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-completion.js +28 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-connection-edit.d.ts +13 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-connection-edit.js +110 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-credential-completion.d.ts +4 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-credential-completion.js +21 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-credentials.d.ts +14 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-credentials.js +148 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-draft-recovery.d.ts +7 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-draft-recovery.js +18 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-draft.d.ts +21 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-draft.js +105 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-embedding-invalidation.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-embedding-invalidation.js +40 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-environment-assignment.d.ts +1 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-environment-assignment.js +27 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-input.d.ts +19 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-input.js +82 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-model-file.d.ts +7 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-model-file.js +35 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider-ownership-recovery.d.ts +4 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider-ownership-recovery.js +23 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider-retention.d.ts +11 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider-retention.js +31 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider.d.ts +11 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-provider.js +60 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-receipt-file.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-receipt-file.js +77 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-routes.d.ts +35 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-routes.js +56 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-scaffold.d.ts +17 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-scaffold.js +229 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-service.d.ts +65 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-service.js +195 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-validation.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/runtime-setup-validation.js +35 -0
- package/dist/src/web-ui/local-runtime/saved-model-catalog.d.ts +3 -0
- package/dist/src/web-ui/local-runtime/saved-model-catalog.js +20 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-input.d.ts +8 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-input.js +71 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-provider.d.ts +13 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-provider.js +114 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-routes.d.ts +12 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-routes.js +53 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-service.d.ts +32 -0
- package/dist/src/web-ui/local-runtime/setup-embedding-service.js +59 -0
- package/dist/src/web-ui/local-runtime-backend.d.ts +1 -0
- package/dist/src/web-ui/local-runtime-backend.js +3 -0
- package/dist/src/web-ui/plugin-capability-selection.d.ts +14 -0
- package/dist/src/web-ui/plugin-capability-selection.js +48 -0
- package/dist/src/web-ui/plugin-management-catalog.d.ts +26 -0
- package/dist/src/web-ui/plugin-management-catalog.js +56 -0
- package/dist/src/web-ui/plugin-management-selection.d.ts +16 -0
- package/dist/src/web-ui/plugin-management-selection.js +71 -0
- package/dist/src/web-ui/plugin-management-service.d.ts +29 -0
- package/dist/src/web-ui/plugin-management-service.js +150 -0
- package/dist/src/web-ui/request-authority.d.ts +8 -0
- package/dist/src/web-ui/request-authority.js +129 -0
- package/dist/src/web-ui/runtime-setup-gateway-address.d.ts +3 -0
- package/dist/src/web-ui/runtime-setup-gateway-address.js +26 -0
- package/dist/src/web-ui/runtime-setup-gateway.d.ts +29 -0
- package/dist/src/web-ui/runtime-setup-gateway.js +177 -0
- package/dist/src/web-ui/runtime-setup-shutdown.d.ts +2 -0
- package/dist/src/web-ui/runtime-setup-shutdown.js +20 -0
- package/dist/src/web-ui/server.d.ts +7 -14
- package/dist/src/web-ui/server.js +53 -63
- package/dist/src/web-ui/session-read-state/service.d.ts +12 -2
- package/dist/src/web-ui/system-host-service.d.ts +19 -0
- package/dist/src/web-ui/system-host-service.js +159 -0
- package/dist/src/web-ui/system-host-setup/companion-bundle.d.ts +2 -0
- package/dist/src/web-ui/system-host-setup/companion-bundle.js +12 -0
- package/dist/src/web-ui/system-host-setup/companion-macos.d.ts +2 -0
- package/dist/src/web-ui/system-host-setup/companion-macos.js +74 -0
- package/dist/src/web-ui/system-host-setup/companion-windows.d.ts +2 -0
- package/dist/src/web-ui/system-host-setup/companion-windows.js +105 -0
- package/dist/src/web-ui/system-host-setup/installer-contract.d.ts +18 -0
- package/dist/src/web-ui/system-host-setup/installer-contract.js +51 -0
- package/dist/src/web-ui/system-host-setup/installers.d.ts +6 -0
- package/dist/src/web-ui/system-host-setup/installers.js +30 -0
- package/dist/src/web-ui/system-host-setup/native-authorization.d.ts +3 -0
- package/dist/src/web-ui/system-host-setup/native-authorization.js +11 -0
- package/dist/src/web-ui/system-host-setup/node-distribution.d.ts +19 -0
- package/dist/src/web-ui/system-host-setup/node-distribution.js +9 -0
- package/dist/src/web-ui/system-host-setup/readiness.d.ts +18 -0
- package/dist/src/web-ui/system-host-setup/readiness.js +70 -0
- package/dist/src/web-ui/system-host-setup/routes.d.ts +20 -0
- package/dist/src/web-ui/system-host-setup/routes.js +121 -0
- package/dist/src/web-ui/system-host-setup/windows-script-wrapper.d.ts +2 -0
- package/dist/src/web-ui/system-host-setup/windows-script-wrapper.js +17 -0
- package/dist/src/web-ui/system-host-setup/wsl-interop-config.d.ts +3 -0
- package/dist/src/web-ui/system-host-setup/wsl-interop-config.js +67 -0
- package/dist/src/web-ui/system-host-setup/wsl-interop-windows.d.ts +1 -0
- package/dist/src/web-ui/system-host-setup/wsl-interop-windows.js +49 -0
- package/dist/src/web-ui/system-host-upgrade-authority.d.ts +5 -0
- package/dist/src/web-ui/system-host-upgrade-authority.js +13 -0
- package/docs/architecture.md +6 -1
- package/docs/installation.md +53 -17
- package/docs/known-limitations.md +14 -0
- package/docs/plugins.md +124 -19
- package/docs/projects-and-full-plus.md +218 -0
- package/docs/runtime-invariant-coverage.md +6 -3
- package/docs/runtime-prompt-policy-contracts.md +37 -5
- package/docs/runtime-public-contracts.md +17 -0
- package/package.json +5 -2
- package/plugins/exec/plugin.json +30 -9
- package/plugins/exec/skills/exec_process_skill/SKILL.md +1 -0
- package/plugins/exec/skills/exec_skill/SKILL.md +9 -10
- package/plugins/exec/source/handlers.ts +4 -38
- package/plugins/exec/source/paths.ts +53 -49
- package/plugins/exec/source/types.ts +6 -4
- package/plugins/exec/source/validation.ts +33 -198
- package/plugins/exec/src/index.cjs +62 -204
- package/plugins/filesystem/plugin.json +1 -1
- package/plugins/filesystem/skills/dev_view_skill/SKILL.md +7 -0
- package/plugins/filesystem/source/atomic-write.ts +6 -3
- package/plugins/filesystem/source/dev-view.ts +2 -1
- package/plugins/filesystem/source/directory-authority-write.ts +4 -0
- package/plugins/filesystem/source/edit-file.ts +3 -0
- package/plugins/filesystem/source/file-output-presentation.ts +42 -0
- package/plugins/filesystem/source/mutation-parent.ts +18 -9
- package/plugins/filesystem/source/view-locator.ts +141 -0
- package/plugins/filesystem/source/view-window.ts +12 -25
- package/plugins/filesystem/source/write-file.ts +8 -0
- package/plugins/filesystem/src/index.cjs +162 -35
- package/plugins/system/plugin.json +374 -0
- package/plugins/system/skills/system_actions/SKILL.md +31 -0
- package/plugins/system/source/application-catalog.ts +237 -0
- package/plugins/system/source/application-launch.ts +113 -0
- package/plugins/system/source/application-observation.ts +78 -0
- package/plugins/system/source/commands.ts +106 -0
- package/plugins/system/source/companion/autostart.ts +185 -0
- package/plugins/system/source/companion/broker-client.ts +183 -0
- package/plugins/system/source/companion/broker-location.ts +89 -0
- package/plugins/system/source/companion/broker-server.ts +169 -0
- package/plugins/system/source/companion/connection.ts +211 -0
- package/plugins/system/source/companion/liveness.ts +23 -0
- package/plugins/system/source/companion/native-address.ts +55 -0
- package/plugins/system/source/companion/native-identity.ts +26 -0
- package/plugins/system/source/companion/native-messages.ts +100 -0
- package/plugins/system/source/companion/native-session.ts +268 -0
- package/plugins/system/source/companion/native-state.ts +135 -0
- package/plugins/system/source/companion/native-supervisor.ts +98 -0
- package/plugins/system/source/companion/pairing-store.ts +110 -0
- package/plugins/system/source/companion/private-store.ts +58 -0
- package/plugins/system/source/companion/process-owner-identity.ts +190 -0
- package/plugins/system/source/companion/protocol.ts +108 -0
- package/plugins/system/source/contracts.ts +44 -0
- package/plugins/system/source/elevation.ts +88 -0
- package/plugins/system/source/handlers.ts +120 -0
- package/plugins/system/source/host-dispatch.ts +106 -0
- package/plugins/system/source/host-evidence.ts +72 -0
- package/plugins/system/source/host-observation.ts +66 -0
- package/plugins/system/source/index.ts +8 -0
- package/plugins/system/source/process-result.ts +111 -0
- package/plugins/system/source/process-runner.ts +104 -0
- package/plugins/system/source/request-system-modules.ts +117 -0
- package/plugins/system/source/request-target-snapshot.ts +163 -0
- package/plugins/system/source/target-observation.ts +43 -0
- package/plugins/system/source/targets.ts +147 -0
- package/plugins/system/src/index.cjs +1730 -0
- package/src/runtime/README.md +36 -8
- package/src/runtime/local-host/README.md +7 -0
- package/dist/src/runtime/steps/planner-decision/capability-catalog-context.d.ts +0 -14
- package/dist/src/runtime/steps/planner-decision/capability-catalog-context.js +0 -87
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ChatMessage } from "../../../model-gateway/types.js";
|
|
2
|
+
import { resolveModelContextAdmission } from "../../model/model-context-budget.js";
|
|
3
|
+
import type { ModelStepContextCompactionController } from "../../model/model-step-port.js";
|
|
4
|
+
import type { WorkerCapabilityCatalogGroup } from "../../orchestration/worker-capabilities/index.js";
|
|
5
|
+
import type { RequestWorkerCapabilityProviderSource } from "../../request/execution-scope.js";
|
|
6
|
+
import type { buildPlannerDecisionInput } from "./input.js";
|
|
7
|
+
type BriefRequest = Omit<Parameters<typeof resolveModelContextAdmission>[0], "modelStep"> & RequestWorkerCapabilityProviderSource;
|
|
8
|
+
/** Planner delegation uses the same request-registry facts as Supervisor. */
|
|
9
|
+
export declare function buildPlannerCapabilityBriefOptions(request: BriefRequest, groups: readonly WorkerCapabilityCatalogGroup[]): Readonly<{
|
|
10
|
+
entries: readonly Readonly<{
|
|
11
|
+
toolName: string;
|
|
12
|
+
operationId: string;
|
|
13
|
+
summary: string;
|
|
14
|
+
catalogGroups: readonly import("../../../capabilities/tool-types.js").ToolCatalogGroup[];
|
|
15
|
+
effect: import("../../../capabilities/tool-types.js").ToolExecutionEffect;
|
|
16
|
+
}>[] | undefined;
|
|
17
|
+
groups: readonly Readonly<{
|
|
18
|
+
groupId: import("../../../capabilities/tool-types.js").ToolCatalogGroup;
|
|
19
|
+
memberCount: number;
|
|
20
|
+
effects: readonly import("../../orchestration/worker-capabilities/contracts.js").WorkerCapabilityEffect[];
|
|
21
|
+
}>[];
|
|
22
|
+
budget: Readonly<{
|
|
23
|
+
contextWindowTokens: number;
|
|
24
|
+
outputReserveTokens: number;
|
|
25
|
+
safetyReserveTokens: number;
|
|
26
|
+
attachmentReserveTokens: number;
|
|
27
|
+
configuredInstructionReserveTokens?: number;
|
|
28
|
+
formatTokenAccounting?: import("../../../model-gateway/types.js").ModelFormatTokenAccountingConfig;
|
|
29
|
+
tokenEstimation?: import("../../../model-gateway/types.js").ModelTokenEstimationConfig;
|
|
30
|
+
}>;
|
|
31
|
+
additionalBudgetMessages: readonly ChatMessage[];
|
|
32
|
+
}>;
|
|
33
|
+
/** Reuses optional-brief admission without inheriting root steering authority. */
|
|
34
|
+
export declare function createPlannerCapabilityBriefReadmissionController(request: BriefRequest & {
|
|
35
|
+
requestId: string;
|
|
36
|
+
}, options: Readonly<{
|
|
37
|
+
input: Pick<ReturnType<typeof buildPlannerDecisionInput>, "format" | "availableWorkerCapabilityCatalog">;
|
|
38
|
+
controller: ModelStepContextCompactionController;
|
|
39
|
+
}>): ModelStepContextCompactionController;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createCapabilityBriefReadmissionController } from "../../context/capability-brief-readmission.js";
|
|
2
|
+
import { resolveModelContextAdmission } from "../../model/model-context-budget.js";
|
|
3
|
+
import { traceDebug } from "../../observability/debug-logger.js";
|
|
4
|
+
import { resolveRequestCapabilityBriefEntries } from "../../request/capability-brief.js";
|
|
5
|
+
import { PLANNER_DECISION_MODEL_STEP } from "./contracts.js";
|
|
6
|
+
/** Planner delegation uses the same request-registry facts as Supervisor. */
|
|
7
|
+
export function buildPlannerCapabilityBriefOptions(request, groups) {
|
|
8
|
+
const admission = resolveModelContextAdmission({
|
|
9
|
+
runnerConfig: request.runnerConfig,
|
|
10
|
+
agentMode: request.agentMode,
|
|
11
|
+
modelStep: PLANNER_DECISION_MODEL_STEP,
|
|
12
|
+
modelPreference: request.modelPreference,
|
|
13
|
+
modelPolicy: request.modelPolicy,
|
|
14
|
+
});
|
|
15
|
+
const instructions = (admission.invocation.instructions ?? [])
|
|
16
|
+
.map((instruction) => instruction.trim())
|
|
17
|
+
.filter((instruction) => instruction.length > 0);
|
|
18
|
+
const additionalBudgetMessages = instructions.length > 0
|
|
19
|
+
? [{ role: "system", content: instructions.join("\n") }]
|
|
20
|
+
: [];
|
|
21
|
+
return Object.freeze({
|
|
22
|
+
entries: resolveRequestCapabilityBriefEntries(request.workerCapabilities, groups),
|
|
23
|
+
groups,
|
|
24
|
+
budget: admission.budget,
|
|
25
|
+
// Root steering is deliberately not inherited by this bounded child.
|
|
26
|
+
additionalBudgetMessages,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Reuses optional-brief admission without inheriting root steering authority. */
|
|
30
|
+
export function createPlannerCapabilityBriefReadmissionController(request, options) {
|
|
31
|
+
return createCapabilityBriefReadmissionController({
|
|
32
|
+
controller: options.controller,
|
|
33
|
+
resolveOptions: () => ({
|
|
34
|
+
...buildPlannerCapabilityBriefOptions(request, options.input.availableWorkerCapabilityCatalog),
|
|
35
|
+
format: options.input.format,
|
|
36
|
+
}),
|
|
37
|
+
onReadmitted: (brief) => {
|
|
38
|
+
traceDebug("runtime.planner", "capability_brief.readmitted", {
|
|
39
|
+
requestId: request.requestId,
|
|
40
|
+
level: brief.level,
|
|
41
|
+
estimatedTokens: brief.estimatedTokens,
|
|
42
|
+
budgetTokens: brief.budgetTokens,
|
|
43
|
+
reason: brief.reason,
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ModelGatewayJsonSchemaFormat } from "../../../model-gateway/types.js";
|
|
2
|
+
import { type CapabilityBriefProjection } from "../../context/capability-brief.js";
|
|
2
3
|
import type { RequestContextProjection } from "../../context/request-context-contracts.js";
|
|
3
4
|
import { type RequestToolResultsView } from "../../context/request-tool-results.js";
|
|
4
5
|
import { type RoleCallFrame, type RoleCallChildReturnCommit, type RoleCallDependencyResult, type RoleCallLedger, type RoleCallLedgerHead, type RoleChildReturnContext } from "../../orchestration/role-calls/index.js";
|
|
5
6
|
import type { RuntimeDelegateRoleId } from "../../orchestration/roles.js";
|
|
7
|
+
import { type WorkerCapabilityCatalogGroup } from "../../orchestration/worker-capabilities/index.js";
|
|
6
8
|
import { type RequestWorkerCapabilityProviderSource } from "../../request/execution-scope.js";
|
|
7
9
|
import type { RequestExecutionSeed } from "../../request/contracts.js";
|
|
8
10
|
import { PLANNER_DECISION_MODEL_STEP, type PlannerChildRoleId, type PlannerDecisionDiagnosticContext, type PlannerDecisionPlanContext, type PlannerDecisionSelectionKind } from "./contracts.js";
|
|
9
|
-
import { type PlannerWorkerCapabilityCatalogGroup } from "./capability-catalog-context.js";
|
|
10
11
|
export type PlannerDecisionInputRequest = Pick<RequestExecutionSeed, "requestId" | "prompt" | "runnerConfig" | "agentMode" | "modelPreference" | "modelPolicy"> & Partial<Pick<RequestExecutionSeed, "onEvent" | "temporalContext">> & RequestWorkerCapabilityProviderSource;
|
|
11
12
|
export type PlannerDecisionProgressSource = Readonly<{
|
|
12
13
|
kind: "role_child";
|
|
@@ -29,7 +30,8 @@ export declare function buildPlannerDecisionInput(request: PlannerDecisionInputR
|
|
|
29
30
|
allowedActions: readonly PlannerDecisionSelectionKind[];
|
|
30
31
|
availableChildRoleIds: readonly PlannerChildRoleId[];
|
|
31
32
|
dependencyResults: readonly RoleCallDependencyResult[];
|
|
32
|
-
availableWorkerCapabilityCatalog: readonly
|
|
33
|
+
availableWorkerCapabilityCatalog: readonly WorkerCapabilityCatalogGroup[];
|
|
34
|
+
capabilityBrief: CapabilityBriefProjection;
|
|
33
35
|
inheritedWorkingDirectory?: string;
|
|
34
36
|
planContext?: PlannerDecisionPlanContext;
|
|
35
37
|
childResume?: RoleChildReturnContext;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { projectCapabilityBrief, } from "../../context/capability-brief.js";
|
|
1
2
|
import { resolveConfiguredStepInstructionMetadata } from "../../config/runner/step-instructions.js";
|
|
2
3
|
import { projectRequestContext } from "../../context/request-context.js";
|
|
3
4
|
import { buildRequestTemporalContextMessage } from "../../context/request-temporal-context.js";
|
|
@@ -5,11 +6,12 @@ import { buildRequestSourceMessage, projectRequestSource, } from "../../context/
|
|
|
5
6
|
import { buildRequestToolResultsMessage, } from "../../context/request-tool-results.js";
|
|
6
7
|
import { resolveModelContextBudget } from "../../model/model-context-budget.js";
|
|
7
8
|
import { projectRoleCallDependencyResults, projectRoleChildReturnContext, } from "../../orchestration/role-calls/index.js";
|
|
9
|
+
import { projectWorkerCapabilityCatalogGroups, } from "../../orchestration/worker-capabilities/index.js";
|
|
8
10
|
import { resolveRequestWorkerCapabilityCatalog, } from "../../request/execution-scope.js";
|
|
9
11
|
import { PLANNER_DECISION_ACTIONS, PLANNER_DECISION_MODEL_STEP, projectPlannerDecisionCallIdentity, } from "./contracts.js";
|
|
10
12
|
import { tracePlannerChildResultsProjected, tracePlannerContextProjected, } from "./diagnostics.js";
|
|
11
13
|
import { createPlannerDecisionFormat, normalizeAvailableChildRoleIds, } from "./format.js";
|
|
12
|
-
import {
|
|
14
|
+
import { buildPlannerCapabilityBriefOptions } from "./capability-brief.js";
|
|
13
15
|
import { normalizePlannerDecisionPlanContext, plannerPlanAllowsInvocation, } from "./plan.js";
|
|
14
16
|
import { buildPlannerDecisionInstructions } from "./prompt.js";
|
|
15
17
|
import { buildPlannerChildContinuationPart } from "./resume.js";
|
|
@@ -24,7 +26,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
24
26
|
};
|
|
25
27
|
const configuredChildRoleIds = normalizeAvailableChildRoleIds(options.availableChildRoleIds);
|
|
26
28
|
const availableWorkerCapabilityCatalog = configuredChildRoleIds.includes("worker")
|
|
27
|
-
?
|
|
29
|
+
? projectWorkerCapabilityCatalogGroups(resolveRequestWorkerCapabilityCatalog(request).getDescriptors())
|
|
28
30
|
: Object.freeze([]);
|
|
29
31
|
const availableChildRoleIds = configuredChildRoleIds;
|
|
30
32
|
const inheritedWorkingDirectory = options.call.workingDirectory;
|
|
@@ -75,7 +77,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
75
77
|
callId: callIdentity.callId,
|
|
76
78
|
});
|
|
77
79
|
const toolResultsProjection = projectPlannerToolResults(options.toolResults);
|
|
78
|
-
const referenceMessages =
|
|
80
|
+
const referenceMessages = [
|
|
79
81
|
...(request.temporalContext
|
|
80
82
|
? [buildRequestTemporalContextMessage(request.temporalContext)]
|
|
81
83
|
: []),
|
|
@@ -83,13 +85,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
83
85
|
...(toolResultsProjection.view.results.length > 0
|
|
84
86
|
? [buildRequestToolResultsMessage(toolResultsProjection.view)]
|
|
85
87
|
: []),
|
|
86
|
-
]
|
|
87
|
-
const referenceParts = buildPlannerReferenceParts({
|
|
88
|
-
callId: callIdentity.callId,
|
|
89
|
-
invocationAttempt: callIdentity.invocationAttempt,
|
|
90
|
-
exactMessages: referenceMessages,
|
|
91
|
-
catalogGroups: availableWorkerCapabilityCatalog,
|
|
92
|
-
});
|
|
88
|
+
];
|
|
93
89
|
const budget = resolveModelContextBudget({
|
|
94
90
|
runnerConfig: request.runnerConfig,
|
|
95
91
|
agentMode: request.agentMode,
|
|
@@ -112,7 +108,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
112
108
|
workerCapabilityCatalogAvailable: availableWorkerCapabilityCatalog.length > 0,
|
|
113
109
|
...(planContext ? { planContext } : {}),
|
|
114
110
|
});
|
|
115
|
-
const
|
|
111
|
+
const contextInput = {
|
|
116
112
|
instructions,
|
|
117
113
|
format,
|
|
118
114
|
historyMessages: [],
|
|
@@ -131,7 +127,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
131
127
|
...(planContext ? { planContext } : {}),
|
|
132
128
|
completedChildResultCount: childResume?.completedChildren.length ?? 0,
|
|
133
129
|
}),
|
|
134
|
-
|
|
130
|
+
referenceMessages,
|
|
135
131
|
...(childContinuationPart
|
|
136
132
|
? { continuationParts: [childContinuationPart] }
|
|
137
133
|
: {}),
|
|
@@ -139,6 +135,19 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
139
135
|
diagnostic,
|
|
140
136
|
...(request.onEvent ? { onEvent: request.onEvent } : {}),
|
|
141
137
|
deferCompactionFailure: true,
|
|
138
|
+
};
|
|
139
|
+
const briefOptions = buildPlannerCapabilityBriefOptions(request, availableWorkerCapabilityCatalog);
|
|
140
|
+
const capabilityBrief = projectCapabilityBrief({
|
|
141
|
+
groups: availableWorkerCapabilityCatalog,
|
|
142
|
+
context: contextInput,
|
|
143
|
+
entries: briefOptions.entries,
|
|
144
|
+
additionalBudgetMessages: briefOptions.additionalBudgetMessages,
|
|
145
|
+
});
|
|
146
|
+
if (capabilityBrief.message)
|
|
147
|
+
referenceMessages.push(capabilityBrief.message);
|
|
148
|
+
const context = projectRequestContext({
|
|
149
|
+
...contextInput,
|
|
150
|
+
referenceMessages,
|
|
142
151
|
});
|
|
143
152
|
tracePlannerContextProjected({
|
|
144
153
|
diagnostic,
|
|
@@ -150,7 +159,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
150
159
|
availableChildRoleIds,
|
|
151
160
|
workerCapabilityCatalogGroupIds: availableWorkerCapabilityCatalog.map((group) => group.groupId),
|
|
152
161
|
workerCapabilityCatalogMemberCount: availableWorkerCapabilityCatalog.reduce((total, group) => total + group.memberCount, 0),
|
|
153
|
-
referenceMessageCount:
|
|
162
|
+
referenceMessageCount: referenceMessages.length,
|
|
154
163
|
continuationMessageCount: childContinuationPart?.messages.length ?? 0,
|
|
155
164
|
completedChildResultCount: childResume?.completedChildren.length ?? 0,
|
|
156
165
|
completedChildSummaryLength: childResume?.completedChildren.reduce((total, child) => total + child.summary.length, 0) ?? 0,
|
|
@@ -184,6 +193,7 @@ export function buildPlannerDecisionInput(request, options) {
|
|
|
184
193
|
availableChildRoleIds,
|
|
185
194
|
dependencyResults,
|
|
186
195
|
availableWorkerCapabilityCatalog,
|
|
196
|
+
capabilityBrief,
|
|
187
197
|
...(inheritedWorkingDirectory !== undefined
|
|
188
198
|
? { inheritedWorkingDirectory }
|
|
189
199
|
: {}),
|
|
@@ -56,8 +56,8 @@ export function buildPlannerDecisionInstructions(options = {}) {
|
|
|
56
56
|
: []),
|
|
57
57
|
...(workerCapabilityCatalogAvailable
|
|
58
58
|
? [
|
|
59
|
-
"
|
|
60
|
-
"For Worker invoke_role, choose the smallest complete catalogGroupIds set whose
|
|
59
|
+
"runtime_capability_brief_v1 is passive request-registry availability for delegation, never user intent, execution authority, or completion evidence. Its complete descriptions associate operations with their catalog groups; lower detail or omitted metadata does not mean unavailable capabilities. Only the schema's catalogGroupIds are selectable.",
|
|
60
|
+
"For Worker invoke_role, choose the smallest complete catalogGroupIds set whose available capabilities cover the outcome and prerequisites. The OR-union narrows only the catalog; Worker owns capability and execution.",
|
|
61
61
|
]
|
|
62
62
|
: []),
|
|
63
63
|
"Do not select a child's individual tools, capabilities, payloads, implementation mechanism, internal workflow, or proof procedure. State only the requested production outcome. Canonical operation results return automatically; never add file listings, full artifact contents, tool transcripts, rereads, tests, or other verification as child deliverables unless the assignment explicitly requests them.",
|
|
@@ -9,6 +9,7 @@ import { buildPlannerDecisionInput, } from "./input.js";
|
|
|
9
9
|
import { parsePlannerDecisionOutput } from "./parser.js";
|
|
10
10
|
import { projectPlannerDecisionPlanContext } from "./plan.js";
|
|
11
11
|
import { PLANNER_GRAPH_MODEL_STEP } from "../planner-graph/contracts.js";
|
|
12
|
+
import { createPlannerCapabilityBriefReadmissionController } from "./capability-brief.js";
|
|
12
13
|
export async function runPlannerDecision(request, options) {
|
|
13
14
|
const input = buildPlannerDecisionInput(request, options);
|
|
14
15
|
const diagnostic = input.diagnostic;
|
|
@@ -25,13 +26,16 @@ export async function runPlannerDecision(request, options) {
|
|
|
25
26
|
modelStep: input.modelStep,
|
|
26
27
|
format: input.format,
|
|
27
28
|
messages: input.context.messages,
|
|
28
|
-
contextCompaction:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
contextCompaction: createPlannerCapabilityBriefReadmissionController(request, {
|
|
30
|
+
input,
|
|
31
|
+
controller: createModelStepCompactionController(request, {
|
|
32
|
+
call: options.call,
|
|
33
|
+
sourceRevision: options.toolResults.sourceRevision,
|
|
34
|
+
allowedConsumers: Object.freeze([
|
|
35
|
+
PLANNER_DECISION_MODEL_STEP,
|
|
36
|
+
PLANNER_GRAPH_MODEL_STEP,
|
|
37
|
+
]),
|
|
38
|
+
}),
|
|
35
39
|
}),
|
|
36
40
|
timeoutReason: "planner_decision_timeout",
|
|
37
41
|
invalidOutputReason: "invalid_planner_decision",
|
|
@@ -145,28 +145,17 @@ function validateTopology(nodes, issues) {
|
|
|
145
145
|
return;
|
|
146
146
|
const remaining = new Set(ids);
|
|
147
147
|
const completed = new Set();
|
|
148
|
-
let hasParallelFrontier = false;
|
|
149
148
|
while (remaining.size > 0) {
|
|
150
149
|
const frontier = nodes.filter(({ localId, dependsOn }) => remaining.has(localId) && dependsOn.every((id) => completed.has(id)));
|
|
151
150
|
if (frontier.length === 0) {
|
|
152
151
|
issues.push(issue("cyclic_plan_graph", "decision.nodes", "The proposed graph must be acyclic."));
|
|
153
152
|
return;
|
|
154
153
|
}
|
|
155
|
-
if (frontier.length >= 2)
|
|
156
|
-
hasParallelFrontier = true;
|
|
157
154
|
for (const node of frontier) {
|
|
158
155
|
remaining.delete(node.localId);
|
|
159
156
|
completed.add(node.localId);
|
|
160
157
|
}
|
|
161
158
|
}
|
|
162
|
-
const dependedOn = new Set(nodes.flatMap(({ dependsOn }) => dependsOn));
|
|
163
|
-
const terminalCount = nodes.filter(({ localId }) => !dependedOn.has(localId)).length;
|
|
164
|
-
if (terminalCount < 2) {
|
|
165
|
-
issues.push(issue("insufficient_terminal_deliverables", "decision.nodes", "The graph must contain at least two independently accepted terminal deliverables."));
|
|
166
|
-
}
|
|
167
|
-
if (!hasParallelFrontier) {
|
|
168
|
-
issues.push(issue("no_parallel_frontier", "decision.nodes", "The graph must expose at least one frontier with two ready nodes."));
|
|
169
|
-
}
|
|
170
159
|
}
|
|
171
160
|
function exactKeys(value, expected, path, issues) {
|
|
172
161
|
const expectedSet = new Set(expected);
|
|
@@ -3,7 +3,8 @@ export function buildPlannerGraphInstructions() {
|
|
|
3
3
|
"You are a bounded advisory Planner for one already accepted execution objective.",
|
|
4
4
|
"Return exactly one JSON decision matching the supplied schema and nothing else.",
|
|
5
5
|
"Propose a dependency graph only. You cannot execute capabilities, invoke roles, answer the user, review work, or claim that work occurred.",
|
|
6
|
-
|
|
6
|
+
"Propose a plan when the accepted objective benefits from multiple substantial implementation or verification steps, dependency ordering, or integration. A single integrated deliverable and sequential work are valid; do not invent parallelism or extra terminal deliverables.",
|
|
7
|
+
'For a direct question or simple isolated change that needs no meaningful decomposition, return the strict {"action":"decline","reason":"..."} variant. Decline is an advisory outcome, not an error.',
|
|
7
8
|
"Use dependsOn only for actual data, ordering, or integration dependencies.",
|
|
8
9
|
"Every node must describe an outcome the Execution Agent can establish and contain explicit acceptance criteria. Mark a criterion mechanical only when runtime evidence can decide it; otherwise mark it semantic.",
|
|
9
10
|
"The proposal is passive advice. The Execution Agent decides what to do next, and no work is complete merely because a graph was proposed.",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModelStepContextCompactionController } from "../../model/model-step-port.js";
|
|
2
|
+
import type { RequestExecutionScope } from "../../request/execution-scope.js";
|
|
3
|
+
import type { buildSupervisorDecisionInput } from "./input.js";
|
|
4
|
+
type BriefRoutingInput = Pick<ReturnType<typeof buildSupervisorDecisionInput>, "format" | "allowedRoleIds" | "availableWorkerCapabilityCatalog">;
|
|
5
|
+
/** Optional routing metadata yields capacity to actual repair and steering. */
|
|
6
|
+
export declare function createSupervisorCapabilityBriefReadmissionController(request: RequestExecutionScope, options: Readonly<{
|
|
7
|
+
input: BriefRoutingInput;
|
|
8
|
+
controller: ModelStepContextCompactionController;
|
|
9
|
+
}>): ModelStepContextCompactionController;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createCapabilityBriefReadmissionController } from "../../context/capability-brief-readmission.js";
|
|
2
|
+
import { resolveModelContextAdmission } from "../../model/model-context-budget.js";
|
|
3
|
+
import { traceDebug } from "../../observability/debug-logger.js";
|
|
4
|
+
import { buildSupervisorCapabilityBriefOptions } from "./capability-brief.js";
|
|
5
|
+
import { SUPERVISOR_DECISION_MODEL_STEP } from "./contracts.js";
|
|
6
|
+
/** Optional routing metadata yields capacity to actual repair and steering. */
|
|
7
|
+
export function createSupervisorCapabilityBriefReadmissionController(request, options) {
|
|
8
|
+
const { input, controller } = options;
|
|
9
|
+
return createCapabilityBriefReadmissionController({
|
|
10
|
+
controller,
|
|
11
|
+
resolveOptions() {
|
|
12
|
+
const admission = resolveModelContextAdmission({
|
|
13
|
+
runnerConfig: request.runnerConfig,
|
|
14
|
+
agentMode: request.agentMode,
|
|
15
|
+
modelStep: SUPERVISOR_DECISION_MODEL_STEP,
|
|
16
|
+
modelPreference: request.modelPreference,
|
|
17
|
+
modelPolicy: request.modelPolicy,
|
|
18
|
+
requestFormat: input.format,
|
|
19
|
+
});
|
|
20
|
+
const briefOptions = buildSupervisorCapabilityBriefOptions(request, input);
|
|
21
|
+
return {
|
|
22
|
+
entries: briefOptions.capabilityBriefEntries,
|
|
23
|
+
groups: input.availableWorkerCapabilityCatalog,
|
|
24
|
+
budget: admission.budget,
|
|
25
|
+
format: input.format,
|
|
26
|
+
additionalBudgetMessages: briefOptions.capabilityBriefBudgetMessages,
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
onReadmitted(replacement) {
|
|
30
|
+
traceDebug("runtime.supervisor", "capability_brief.readmitted", {
|
|
31
|
+
requestId: request.requestId,
|
|
32
|
+
level: replacement.level,
|
|
33
|
+
estimatedTokens: replacement.estimatedTokens,
|
|
34
|
+
budgetTokens: replacement.budgetTokens,
|
|
35
|
+
reason: replacement.reason,
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -8,6 +8,7 @@ import { SUPERVISOR_DECISION_MODEL_STEP, } from "./contracts.js";
|
|
|
8
8
|
import { traceSupervisorDecisionPhaseSuperseded, traceSupervisorModelCompleted, traceSupervisorModelFailed, traceSupervisorModelStarted, traceSupervisorWorkingDirectoryModelStarted, } from "./diagnostics.js";
|
|
9
9
|
import { buildSupervisorDecisionInput } from "./input.js";
|
|
10
10
|
import { buildSupervisorCapabilityBriefOptions } from "./capability-brief.js";
|
|
11
|
+
import { createSupervisorCapabilityBriefReadmissionController } from "./capability-brief-readmission.js";
|
|
11
12
|
import { parseSupervisorDecisionOutput } from "./parser.js";
|
|
12
13
|
import { buildSupervisorWorkingDirectoryInput, mergeSupervisorWorkingDirectory, parseSupervisorWorkingDirectoryOutput, } from "./working-directory.js";
|
|
13
14
|
import { SUPERVISOR_RESPONSE_MODEL_STEP } from "../supervisor-response/contracts.js";
|
|
@@ -81,7 +82,7 @@ export async function runSupervisorDecision(request, options) {
|
|
|
81
82
|
boundSteeringVersion,
|
|
82
83
|
input,
|
|
83
84
|
diagnostic: routingDiagnostic,
|
|
84
|
-
contextCompaction,
|
|
85
|
+
contextCompaction: createSupervisorCapabilityBriefReadmissionController(request, { input, controller: contextCompaction }),
|
|
85
86
|
});
|
|
86
87
|
if (routing.decision.action === "invoke_role" &&
|
|
87
88
|
routing.decision.roleId === "reviewer") {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WorkerControlDecision } from "../contracts.js";
|
|
2
2
|
import type { ActionValidation, DecisionValidationContext, WorkerDecisionAction } from "./validation-contract.js";
|
|
3
|
+
/** Bounds generated client-facing text without changing execution inputs. */
|
|
4
|
+
export declare function normalizeWorkerCapabilityIntent(value: unknown): string | undefined;
|
|
3
5
|
export declare function buildAcceptedWorkerDecision(action: WorkerDecisionAction, record: Record<string, unknown>, context: DecisionValidationContext, validation: ActionValidation): WorkerControlDecision;
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
import { WORKER_CAPABILITY_INTENT_MAX_LENGTH, } from "../contracts.js";
|
|
2
|
+
/** Bounds generated client-facing text without changing execution inputs. */
|
|
3
|
+
export function normalizeWorkerCapabilityIntent(value) {
|
|
4
|
+
if (typeof value !== "string")
|
|
5
|
+
return undefined;
|
|
6
|
+
const trimmed = value.trim();
|
|
7
|
+
const bounded = trimmed.slice(0, WORKER_CAPABILITY_INTENT_MAX_LENGTH);
|
|
8
|
+
if (hasSplitIntentSurrogatePair(trimmed, bounded.length)) {
|
|
9
|
+
return bounded.slice(0, -1).trimEnd();
|
|
10
|
+
}
|
|
11
|
+
return bounded.trimEnd();
|
|
12
|
+
}
|
|
13
|
+
function hasSplitIntentSurrogatePair(value, boundary) {
|
|
14
|
+
const before = value.charCodeAt(boundary - 1);
|
|
15
|
+
if (before < 0xd800 || before > 0xdbff)
|
|
16
|
+
return false;
|
|
17
|
+
const after = value.charCodeAt(boundary);
|
|
18
|
+
return after >= 0xdc00 && after <= 0xdfff;
|
|
19
|
+
}
|
|
1
20
|
export function buildAcceptedWorkerDecision(action, record, context, validation) {
|
|
2
21
|
switch (action) {
|
|
3
22
|
case "return_result":
|
|
@@ -17,7 +36,7 @@ function buildAcceptedSingleCapabilityDecision(record, context, validation) {
|
|
|
17
36
|
const capabilityId = context.pendingCapabilitySelection?.capabilityId ??
|
|
18
37
|
record.capabilityId;
|
|
19
38
|
const intent = context.pendingCapabilitySelection?.intent ??
|
|
20
|
-
record.intent
|
|
39
|
+
normalizeWorkerCapabilityIntent(record.intent);
|
|
21
40
|
const authoringObjective = context.pendingCapabilitySelection?.authoringObjective ??
|
|
22
41
|
validation.acceptedAuthoringObjective;
|
|
23
42
|
const acceptedInvocation = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WorkerDecisionValidationIssue } from "../contracts.js";
|
|
2
2
|
import type { ActionValidation, DecisionValidationContext } from "./validation-contract.js";
|
|
3
3
|
export declare function validateCapabilityBatchDecision(record: Record<string, unknown>, context: DecisionValidationContext, issues: WorkerDecisionValidationIssue[]): ActionValidation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WORKER_CAPABILITY_INTENT_MAX_LENGTH, } from "../contracts.js";
|
|
2
1
|
import { workerCapabilityBatchExecutionSlotId } from "../format.js";
|
|
2
|
+
import { normalizeWorkerCapabilityIntent } from "./accepted-decision.js";
|
|
3
3
|
import { parseCapabilityInvocation } from "./capability-invocation-validation.js";
|
|
4
4
|
import { readWorkerDecisionRecord, validateExactWorkerDecisionKeys, } from "./decision-shape-validation.js";
|
|
5
5
|
import { createWorkerDecisionIssue } from "./validation-contract.js";
|
|
@@ -89,16 +89,16 @@ function canAcceptObservationBatchInvocation(context, invocationRecord, invocati
|
|
|
89
89
|
function hasValidGeneratedCapabilityIdentity(invocation) {
|
|
90
90
|
if (typeof invocation.capabilityId !== "string")
|
|
91
91
|
return false;
|
|
92
|
-
|
|
92
|
+
const intent = normalizeWorkerCapabilityIntent(invocation.intent);
|
|
93
|
+
if (intent === undefined)
|
|
93
94
|
return false;
|
|
94
|
-
|
|
95
|
-
return false;
|
|
96
|
-
return invocation.intent.length <= WORKER_CAPABILITY_INTENT_MAX_LENGTH;
|
|
95
|
+
return intent.length > 0;
|
|
97
96
|
}
|
|
98
97
|
function projectAcceptedCapabilityInvocation(context, invocationRecord, invocation, pendingInvocation) {
|
|
99
98
|
const capabilityId = pendingInvocation?.capabilityId ??
|
|
100
99
|
invocationRecord.capabilityId;
|
|
101
|
-
const intent = pendingInvocation?.intent ??
|
|
100
|
+
const intent = pendingInvocation?.intent ??
|
|
101
|
+
normalizeWorkerCapabilityIntent(invocationRecord.intent);
|
|
102
102
|
const authoringObjective = pendingInvocation?.authoringObjective ?? invocation.authoringObjective;
|
|
103
103
|
if (context.decisionPhase === "capability_execution") {
|
|
104
104
|
return Object.freeze({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WORKER_CAPABILITY_AUTHORING_OBJECTIVE_MAX_LENGTH, WORKER_CAPABILITY_INTENT_MAX_LENGTH, } from "../contracts.js";
|
|
2
|
+
import { normalizeWorkerCapabilityIntent } from "./accepted-decision.js";
|
|
2
3
|
import { partitionSelectedCapabilityControls, validateCapabilityExecutionControls, validateCapabilitySelectionControls, } from "./capability-controls-validation.js";
|
|
3
4
|
import { validateBoundedWorkerDecisionText, validateExactWorkerDecisionKeys, } from "./decision-shape-validation.js";
|
|
4
5
|
import { createWorkerDecisionIssue, hasObservationOnlyCapabilityMismatch, } from "./validation-contract.js";
|
|
@@ -31,7 +32,7 @@ function hasMissingPendingCapabilityRefinement(context) {
|
|
|
31
32
|
export function parseCapabilityInvocation(params, issues) {
|
|
32
33
|
const selectedCapability = resolveCapabilityInvocationDescriptor(params, issues);
|
|
33
34
|
if (params.decisionPhase === "capability_selection") {
|
|
34
|
-
validateBoundedWorkerDecisionText(params.record.intent, WORKER_CAPABILITY_INTENT_MAX_LENGTH, "worker_capability_intent_invalid", `${params.path}.intent`, issues);
|
|
35
|
+
validateBoundedWorkerDecisionText(normalizeWorkerCapabilityIntent(params.record.intent), WORKER_CAPABILITY_INTENT_MAX_LENGTH, "worker_capability_intent_invalid", `${params.path}.intent`, issues);
|
|
35
36
|
}
|
|
36
37
|
const controlsPartition = partitionSelectedCapabilityControls(selectedCapability, `${params.path}.capabilityId`, issues);
|
|
37
38
|
validateExactWorkerDecisionKeys(params.record, expectedCapabilityInvocationKeys(params, controlsPartition?.selectionControlIds.length ?? 0, selectedCapability), issues, params.path);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SessionRecord } from "./types.js";
|
|
2
|
+
/** Immutable workspace identity captured when a project conversation is created. */
|
|
3
|
+
export type SessionProject = Readonly<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
directory: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type SessionCreationOptions = Readonly<{
|
|
9
|
+
project?: SessionProject;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function copySessionProject(project: SessionProject): SessionProject;
|
|
12
|
+
export declare function assertSessionProjectUnchanged(session: SessionRecord, requested?: SessionProject): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
function isSessionProjectRecord(value) {
|
|
3
|
+
if (!value)
|
|
4
|
+
return false;
|
|
5
|
+
if (Array.isArray(value))
|
|
6
|
+
return false;
|
|
7
|
+
return typeof value === "object";
|
|
8
|
+
}
|
|
9
|
+
function hasProjectIdentityText(value) {
|
|
10
|
+
if (typeof value !== "string")
|
|
11
|
+
return false;
|
|
12
|
+
return value.trim().length > 0;
|
|
13
|
+
}
|
|
14
|
+
function hasAbsoluteProjectDirectory(value) {
|
|
15
|
+
if (typeof value !== "string")
|
|
16
|
+
return false;
|
|
17
|
+
return isAbsolute(value);
|
|
18
|
+
}
|
|
19
|
+
export function copySessionProject(project) {
|
|
20
|
+
if (!isSessionProjectRecord(project))
|
|
21
|
+
throw new TypeError("session_project_invalid");
|
|
22
|
+
if (!hasProjectIdentityText(project.id))
|
|
23
|
+
throw new TypeError("session_project_id_required");
|
|
24
|
+
if (!hasProjectIdentityText(project.name))
|
|
25
|
+
throw new TypeError("session_project_name_required");
|
|
26
|
+
if (!hasAbsoluteProjectDirectory(project.directory))
|
|
27
|
+
throw new TypeError("session_project_directory_absolute_required");
|
|
28
|
+
if (project.directory.includes("\0"))
|
|
29
|
+
throw new TypeError("session_project_directory_invalid");
|
|
30
|
+
return Object.freeze({
|
|
31
|
+
id: project.id,
|
|
32
|
+
name: project.name,
|
|
33
|
+
directory: project.directory,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function matchesSavedProjectBinding(saved, requested) {
|
|
37
|
+
if (!saved)
|
|
38
|
+
return false;
|
|
39
|
+
if (saved.id !== requested.id)
|
|
40
|
+
return false;
|
|
41
|
+
return saved.directory === requested.directory;
|
|
42
|
+
}
|
|
43
|
+
export function assertSessionProjectUnchanged(session, requested) {
|
|
44
|
+
if (!requested)
|
|
45
|
+
return;
|
|
46
|
+
const project = copySessionProject(requested);
|
|
47
|
+
if (!matchesSavedProjectBinding(session.project, project))
|
|
48
|
+
throw new Error("session_project_binding_immutable");
|
|
49
|
+
}
|
|
@@ -14,7 +14,6 @@ export declare function toSnapshotMessage(sessionId: string, message: SessionRec
|
|
|
14
14
|
export declare function toSnapshotRequest(request: SessionRequestRecord): SessionSnapshotRequest;
|
|
15
15
|
export declare function normalizeSessionTitle(title: string): string;
|
|
16
16
|
export declare function toSessionListItem(session: SessionRecord): {
|
|
17
|
-
id: string;
|
|
18
17
|
title: string;
|
|
19
18
|
createdAt: number;
|
|
20
19
|
updatedAt: number;
|
|
@@ -22,4 +21,10 @@ export declare function toSessionListItem(session: SessionRecord): {
|
|
|
22
21
|
lastMessageAt: number | null;
|
|
23
22
|
latestMessageId: string | number | null;
|
|
24
23
|
latestAssistantMessageId: string | number | null;
|
|
24
|
+
project?: Readonly<{
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
directory: string;
|
|
28
|
+
}> | undefined;
|
|
29
|
+
id: string;
|
|
25
30
|
};
|
|
@@ -200,6 +200,7 @@ export function toSessionListItem(session) {
|
|
|
200
200
|
.find((message) => message.role === "assistant");
|
|
201
201
|
return {
|
|
202
202
|
id: session.id,
|
|
203
|
+
...(session.project ? { project: session.project } : {}),
|
|
203
204
|
title: session.title,
|
|
204
205
|
createdAt: toEpochMs(session.createdAt),
|
|
205
206
|
updatedAt: toEpochMs(session.updatedAt),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SessionCreationOptions } from "./project-binding.js";
|
|
1
2
|
import type { SessionContextEntryKind, SessionArtifactPathInput, SessionMessageGrounding, SessionMessage, SessionMessageDeleteResult, SessionMessageObservationMeta, SessionMessageRole, SessionMessageSource, SessionMessageTaskType, SessionMessagesClearResult, SessionDeleteResult, SessionListResult, SessionRequestReplay, SessionRecord, SessionSnapshot, SessionThinkingTraceEntry } from "./types.js";
|
|
2
3
|
import type { SessionMemoryCheckpointCommit, SessionMemoryCheckpointCommitResult } from "./memory/contracts.js";
|
|
3
4
|
import type { AgentMode } from "../shared/types.js";
|
|
@@ -12,7 +13,7 @@ export declare class SessionService {
|
|
|
12
13
|
private readonly createMessageId;
|
|
13
14
|
private readonly sessionMutationQueues;
|
|
14
15
|
constructor(options?: SessionServiceOptions);
|
|
15
|
-
getOrCreateSession(sessionId: string): Promise<SessionRecord>;
|
|
16
|
+
getOrCreateSession(sessionId: string, options?: SessionCreationOptions): Promise<SessionRecord>;
|
|
16
17
|
getAllSessions(): Promise<SessionRecord[]>;
|
|
17
18
|
listSessions(params?: {
|
|
18
19
|
limit?: number;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { assertSessionProjectUnchanged, copySessionProject, } from "./project-binding.js";
|
|
1
3
|
import { getDefaultSessionsDir } from "../runtime/config/layout.js";
|
|
2
4
|
import { assertValidSessionArtifactPathInputs, upsertSessionArtifactPaths, } from "./artifact-paths.js";
|
|
3
5
|
import { clientVisibleMessages, compactRequestEvents, filterMessagesAfter, getRequestFinalState, getSessionRequest, isSameMessageId, normalizeAfterSeq, normalizeCursor, normalizeLimit, normalizeSessionTitle, toClientReplayEvent, toEpochMs, toSessionListItem, toSnapshotMessage, toSnapshotRequest, } from "./record/projection.js";
|
|
@@ -18,16 +20,20 @@ export class SessionService {
|
|
|
18
20
|
this.now = options.now || (() => new Date());
|
|
19
21
|
this.createMessageId = options.createMessageId || defaultCreateMessageId;
|
|
20
22
|
}
|
|
21
|
-
async getOrCreateSession(sessionId) {
|
|
23
|
+
async getOrCreateSession(sessionId, options = {}) {
|
|
22
24
|
assertValidSessionId(sessionId);
|
|
23
25
|
await ensureSessionsDir(this.sessionsDir);
|
|
24
26
|
const existing = await loadSessionFile(this.sessionsDir, sessionId);
|
|
25
27
|
if (existing) {
|
|
28
|
+
assertSessionProjectUnchanged(existing, options.project);
|
|
26
29
|
return existing;
|
|
27
30
|
}
|
|
28
31
|
const timestamp = toIso(this.now);
|
|
29
32
|
const session = {
|
|
30
33
|
id: sessionId,
|
|
34
|
+
...(options.project
|
|
35
|
+
? { project: copySessionProject(options.project) }
|
|
36
|
+
: {}),
|
|
31
37
|
title: sessionId,
|
|
32
38
|
createdAt: timestamp,
|
|
33
39
|
updatedAt: timestamp,
|
|
@@ -65,6 +71,7 @@ export class SessionService {
|
|
|
65
71
|
}
|
|
66
72
|
return {
|
|
67
73
|
sessionId,
|
|
74
|
+
...(session.project ? { project: session.project } : {}),
|
|
68
75
|
title: session.title,
|
|
69
76
|
messages: filterMessagesAfter(clientVisibleMessages(session.messages), options.afterMessageId).map((message) => toSnapshotMessage(sessionId, message, session.requests ?? [])),
|
|
70
77
|
requests: options.includeRequests === false
|
|
@@ -85,6 +92,7 @@ export class SessionService {
|
|
|
85
92
|
return {
|
|
86
93
|
requestId,
|
|
87
94
|
sessionId: request.sessionId,
|
|
95
|
+
...(request.generation ? { generation: request.generation } : {}),
|
|
88
96
|
events: request.events
|
|
89
97
|
.filter((event) => event.seqNo > normalizedAfterSeq)
|
|
90
98
|
.map(toClientReplayEvent),
|
|
@@ -287,6 +295,8 @@ export class SessionService {
|
|
|
287
295
|
const request = {
|
|
288
296
|
requestId,
|
|
289
297
|
sessionId,
|
|
298
|
+
// Only an explicit new stream establishes a request lifetime.
|
|
299
|
+
generation: randomUUID(),
|
|
290
300
|
status: "streaming",
|
|
291
301
|
createdAt: timestamp,
|
|
292
302
|
updatedAt: timestamp,
|