@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
|
@@ -1,70 +1,102 @@
|
|
|
1
1
|
import { invokeStructuredModelStep, StructuredModelInvalidOutputError, } from "../../model/invoke-structured-step.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { createModelStepCompactionController } from "../../context/model-step-compaction.js";
|
|
2
|
+
import { traceDebug } from "../../observability/debug-logger.js";
|
|
3
|
+
import { parseExecutionAgentAuditObjective, } from "./contracts.js";
|
|
5
4
|
import { buildAuditorDecisionInput } from "./input.js";
|
|
6
5
|
import { parseAuditorDecisionOutput } from "./parser.js";
|
|
6
|
+
import { projectAuditorAssignment } from "./projection.js";
|
|
7
|
+
import { projectAuditorInputState } from "./audit-input-state.js";
|
|
8
|
+
import { projectAuditorWorkEvidence, fingerprintAuditorBundle, } from "./evidence-inventory.js";
|
|
9
|
+
import { bindAuditorEvidence, AuditorEvidenceAdmissionError, } from "./evidence-binding.js";
|
|
10
|
+
import { parseAuditorEvidenceSelection } from "./evidence-selection.js";
|
|
11
|
+
import { projectAuditorEvidenceRepresentation } from "./evidence-representation.js";
|
|
12
|
+
import { failedAuditorAdvisory, settleAuditorAdvisory, } from "./advisory-receipt.js";
|
|
13
|
+
import { AuditorAdvisoryCapacityError } from "./advisory-result-budget.js";
|
|
7
14
|
export const EXECUTION_AGENT_AUDITOR_EXECUTOR = Object.freeze({
|
|
8
15
|
roleId: "reviewer",
|
|
9
16
|
async execute({ context, call, ledger, continuation }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
const head = ledger.current();
|
|
18
|
+
let assignment = projectAuditorAssignment(context, head, call);
|
|
19
|
+
if (continuation)
|
|
20
|
+
return failedAuditorAdvisory(assignment, "auditor_continuation_unsupported");
|
|
21
|
+
const objective = parseExecutionAgentAuditObjective(call.objective);
|
|
22
|
+
const source = projectAuditorWorkEvidence(head, assignment.callerCallId);
|
|
23
|
+
const state = projectAuditorInputState(head, assignment.callerCallId, objective.requestSteeringVersion, objective.criterionIds, source);
|
|
24
|
+
if (!state.available)
|
|
25
|
+
return failedAuditorAdvisory(assignment, state.reason);
|
|
13
26
|
try {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return Object.freeze({
|
|
29
|
-
kind: "terminal",
|
|
30
|
-
outcome: "completed",
|
|
31
|
-
summary,
|
|
27
|
+
const selectedIds = assignment.pendingEvidenceIds ??
|
|
28
|
+
(await invokeAuditorPhase(context, buildAuditorDecisionInput(context, assignment, "selection"), (text) => parseAuditorEvidenceSelection(text, assignment))).selectedEvidenceIds;
|
|
29
|
+
assignment = bindAuditorEvidence(assignment, source, selectedIds);
|
|
30
|
+
const decision = await invokeAuditorPhase(context, buildAuditorDecisionInput(context, assignment, "review"), (text) => parseAuditorDecisionOutput(text, assignment));
|
|
31
|
+
traceDebug("runtime.auditor", "review.completed", {
|
|
32
|
+
requestId: context.requestId,
|
|
33
|
+
callId: call.callId,
|
|
34
|
+
phase: "review",
|
|
35
|
+
workFingerprint: assignment.workFingerprint,
|
|
36
|
+
bundleFingerprint: fingerprintAuditorBundle(assignment.workFingerprint, selectedIds),
|
|
37
|
+
verdict: decision.verdict,
|
|
38
|
+
requestedEvidenceIds: decision.requestedEvidenceIds,
|
|
39
|
+
requestedEvidenceCount: decision.requestedEvidenceIds.length,
|
|
32
40
|
});
|
|
41
|
+
return settleAuditorAdvisory(assignment, decision);
|
|
33
42
|
}
|
|
34
43
|
catch (error) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
const reason = auditorFailureReason(error);
|
|
45
|
+
if (!reason)
|
|
46
|
+
throw error;
|
|
47
|
+
traceDebug("runtime.auditor", "evidence.rejected", {
|
|
48
|
+
requestId: context.requestId,
|
|
49
|
+
callId: call.callId,
|
|
50
|
+
phase: assignment.selectedEvidenceIds.length > 0 ? "review" : "selection",
|
|
51
|
+
workFingerprint: assignment.workFingerprint,
|
|
52
|
+
selectedEvidenceCount: assignment.selectedEvidenceIds.length,
|
|
53
|
+
reason,
|
|
54
|
+
});
|
|
55
|
+
return failedAuditorAdvisory(assignment, reason);
|
|
39
56
|
}
|
|
40
57
|
},
|
|
41
58
|
});
|
|
42
|
-
async function
|
|
59
|
+
async function invokeAuditorPhase(request, input, parse) {
|
|
60
|
+
traceDebug("runtime.auditor", "phase.started", {
|
|
61
|
+
requestId: request.requestId,
|
|
62
|
+
callId: input.assignment.auditId,
|
|
63
|
+
phase: input.phase,
|
|
64
|
+
workFingerprint: input.assignment.workFingerprint,
|
|
65
|
+
inventoryCount: input.assignment.inventory.length,
|
|
66
|
+
selectedEvidenceIds: input.assignment.selectedEvidenceIds,
|
|
67
|
+
selectedEvidenceCount: input.assignment.evidence.length,
|
|
68
|
+
selectedEvidenceChars: input.assignment.evidence.reduce((total, entry) => total +
|
|
69
|
+
JSON.stringify(projectAuditorEvidenceRepresentation(entry)).length, 0),
|
|
70
|
+
canonicalEvidenceChars: input.assignment.evidence.reduce((total, entry) => total + JSON.stringify(entry).length, 0),
|
|
71
|
+
});
|
|
43
72
|
return invokeStructuredModelStep({
|
|
44
73
|
request,
|
|
45
74
|
modelStep: input.modelStep,
|
|
46
75
|
format: input.format,
|
|
47
76
|
messages: input.context.messages,
|
|
48
|
-
contextCompaction: createModelStepCompactionController(request, {
|
|
49
|
-
call: options.call,
|
|
50
|
-
sourceRevision: options.sourceRevision,
|
|
51
|
-
allowedConsumers: Object.freeze([AUDITOR_DECISION_MODEL_STEP]),
|
|
52
|
-
}),
|
|
53
77
|
timeoutReason: "auditor_decision_timeout",
|
|
54
78
|
invalidOutputReason: "invalid_auditor_decision",
|
|
55
|
-
parse
|
|
79
|
+
parse,
|
|
56
80
|
});
|
|
57
81
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
function auditorFailureReason(error) {
|
|
83
|
+
if (error instanceof StructuredModelInvalidOutputError)
|
|
84
|
+
return "invalid_auditor_decision";
|
|
85
|
+
if (error instanceof AuditorEvidenceAdmissionError)
|
|
86
|
+
return error.message;
|
|
87
|
+
if (error instanceof AuditorAdvisoryCapacityError)
|
|
88
|
+
return error.message;
|
|
89
|
+
if (!(error instanceof Error))
|
|
90
|
+
return undefined;
|
|
91
|
+
if (error.message === "request_context_required_content_exceeds_budget")
|
|
92
|
+
return "auditor_exact_context_exceeds_budget";
|
|
93
|
+
if (error.message === "request_context_pinned_content_exceeds_budget")
|
|
94
|
+
return "auditor_exact_context_exceeds_budget";
|
|
95
|
+
if (error.message === "request_context_compaction_required")
|
|
96
|
+
return "auditor_exact_context_requires_compaction";
|
|
97
|
+
if (error.message === "request_context_final_envelope_exceeds_window")
|
|
98
|
+
return "auditor_exact_context_exceeds_budget";
|
|
99
|
+
if (error.message === "model_context_window_exceeded")
|
|
100
|
+
return "auditor_exact_context_exceeds_budget";
|
|
101
|
+
return undefined;
|
|
70
102
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MemoryRecallDecision } from "../memory-recall-decision.js";
|
|
2
|
+
import type { ExecutionWorkPlanOptions, ExecutionWorkPlanReport } from "./work-plan-contract.js";
|
|
2
3
|
import type { RoleCapabilitySelectionProjection, RoleCapabilitySelectionReconsiderationCause } from "../../orchestration/role-calls/index.js";
|
|
3
4
|
import { type CapabilityControls, type CapabilityDescriptor } from "../../orchestration/capability-adapters/index.js";
|
|
4
5
|
export declare const EXECUTION_AGENT_DECISION_MODEL_STEP: "execution.decision";
|
|
@@ -11,6 +12,7 @@ export declare const EXECUTION_AGENT_ACKNOWLEDGEMENT_MAX_LENGTH = 220;
|
|
|
11
12
|
export declare const EXECUTION_AGENT_TITLE_MAX_LENGTH = 80;
|
|
12
13
|
export declare const EXECUTION_AGENT_AUDIT_CRITERION_ID_MAX_LENGTH = 128;
|
|
13
14
|
export declare const EXECUTION_AGENT_AUDIT_CRITERION_COUNT_MAX = 32;
|
|
15
|
+
export declare const EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX = 64;
|
|
14
16
|
export declare const EXECUTION_AGENT_CAPABILITY_SCOPE_GROUP_COUNT_MAX = 64;
|
|
15
17
|
export type ExecutionAgentDecisionAction = (typeof EXECUTION_AGENT_DECISION_ACTIONS)[number];
|
|
16
18
|
export type ExecutionAgentDecisionPresentation = Readonly<{
|
|
@@ -59,7 +61,10 @@ export type ExecutionAgentInvokeAuditorDecision = Readonly<ExecutionAgentDecisio
|
|
|
59
61
|
action: "invoke_auditor";
|
|
60
62
|
criterionIds: readonly string[];
|
|
61
63
|
}>;
|
|
62
|
-
|
|
64
|
+
type ExecutionAgentAction = MemoryRecallDecision | ExecutionAgentOpenCapabilityScopeDecision | ExecutionAgentExtendCapabilityScopeDecision | ExecutionAgentRespondDecision | ExecutionAgentBlockedDecision | ExecutionAgentInvokeCapabilityDecision | ExecutionAgentInvokeCapabilitiesDecision | ExecutionAgentInvokePlannerDecision | ExecutionAgentInvokeAuditorDecision;
|
|
65
|
+
export type ExecutionAgentDecision = ExecutionAgentAction & Readonly<{
|
|
66
|
+
workPlan?: ExecutionWorkPlanReport;
|
|
67
|
+
}>;
|
|
63
68
|
/** Runtime-only transition emitted when controls refinement exhausts validation. */
|
|
64
69
|
export type ExecutionAgentReconsiderCapabilitySelectionDecision = Readonly<{
|
|
65
70
|
action: "reconsider_capability_selection";
|
|
@@ -88,6 +93,7 @@ export type ExecutionAgentDecisionParseResult = Readonly<{
|
|
|
88
93
|
issues: readonly ExecutionAgentDecisionValidationIssue[];
|
|
89
94
|
}>;
|
|
90
95
|
export type ExecutionAgentDecisionContractOptions = Readonly<{
|
|
96
|
+
workPlan?: ExecutionWorkPlanOptions;
|
|
91
97
|
capabilities?: readonly CapabilityDescriptor[];
|
|
92
98
|
capabilityCatalogGroupIds?: readonly string[];
|
|
93
99
|
activeCapabilityCatalogGroupIds?: readonly string[] | null;
|
|
@@ -101,3 +107,4 @@ export type ExecutionAgentDecisionContractOptions = Readonly<{
|
|
|
101
107
|
availableAuditCriterionIds?: readonly string[];
|
|
102
108
|
includeWorkingDirectory?: boolean;
|
|
103
109
|
}>;
|
|
110
|
+
export {};
|
|
@@ -19,4 +19,6 @@ export const EXECUTION_AGENT_ACKNOWLEDGEMENT_MAX_LENGTH = 220;
|
|
|
19
19
|
export const EXECUTION_AGENT_TITLE_MAX_LENGTH = 80;
|
|
20
20
|
export const EXECUTION_AGENT_AUDIT_CRITERION_ID_MAX_LENGTH = 128;
|
|
21
21
|
export const EXECUTION_AGENT_AUDIT_CRITERION_COUNT_MAX = 32;
|
|
22
|
+
// Batch execution stays independently bounded as the available catalog grows.
|
|
23
|
+
export const EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX = 64;
|
|
22
24
|
export const EXECUTION_AGENT_CAPABILITY_SCOPE_GROUP_COUNT_MAX = CAPABILITY_CATALOG_GROUP_COUNT_MAX;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { readStructuredDecisionEnvelope } from "../../model/structured-decision-envelope.js";
|
|
2
|
+
import { parseDecisionWithWorkPlan } from "./work-plan-decision-parsing.js";
|
|
2
3
|
import { isMemoryRecallDecisionRecord, parseMemoryRecallDecision, } from "../memory-recall-decision.js";
|
|
3
4
|
import { EXECUTION_AGENT_ACKNOWLEDGEMENT_MAX_LENGTH, EXECUTION_AGENT_TITLE_MAX_LENGTH, EXECUTION_AGENT_AUDIT_CRITERION_COUNT_MAX, EXECUTION_AGENT_AUDIT_CRITERION_ID_MAX_LENGTH, EXECUTION_AGENT_DECISION_ACTIONS, EXECUTION_AGENT_RESPONSE_MAX_LENGTH, } from "./contracts.js";
|
|
4
5
|
import { prepareExecutionAgentDecisionContract } from "./format.js";
|
|
5
6
|
import { parseCapabilityCatalogGroupIds, parseCapabilityBatch, parseCapabilityInvocation, parseWorkingDirectory, } from "./capability-decision-parsing.js";
|
|
6
7
|
import { parsePresentation, presentationKeys, exactPresentationKeys, validateObjective, parseBoundedTextArray, validateBoundedText, readAction, exactKeys, rejectEnvelope, issue, asRecord, deepFreeze, } from "./decision-validation.js";
|
|
7
8
|
export function parseExecutionAgentDecisionOutput(text, options = {}) {
|
|
9
|
+
return parseDecisionWithWorkPlan(text, options, parseExecutionAgentActionOutput);
|
|
10
|
+
}
|
|
11
|
+
function parseExecutionAgentActionOutput(text, options) {
|
|
8
12
|
const contract = prepareExecutionAgentDecisionContract(options);
|
|
9
13
|
let decoded;
|
|
10
14
|
try {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createMemoryRecallDecisionSchema } from "../memory-recall-decision.js";
|
|
2
|
+
import { withExecutionWorkPlanVariants } from "./work-plan-contract.js";
|
|
2
3
|
import { isToolCatalogGroupId } from "../../../capabilities/tool-types.js";
|
|
3
4
|
import { createStructuredDecisionEnvelopeSchema } from "../../model/structured-decision-envelope.js";
|
|
4
5
|
import { CAPABILITY_COUNT_MAX, CAPABILITY_INTENT_MAX_LENGTH, EXECUTION_WORKING_DIRECTORY_MAX_LENGTH, EXECUTION_WORKING_DIRECTORY_PATTERN, canOfferCapabilityBatchSelection, normalizeCapabilityDescriptor, normalizeCapabilityControlsSchema, partitionCapabilityControlsSchema, } from "../../orchestration/capability-adapters/index.js";
|
|
5
|
-
import { EXECUTION_AGENT_ACKNOWLEDGEMENT_MAX_LENGTH, EXECUTION_AGENT_AUDIT_CRITERION_COUNT_MAX, EXECUTION_AGENT_AUDIT_CRITERION_ID_MAX_LENGTH, EXECUTION_AGENT_CAPABILITY_SCOPE_GROUP_COUNT_MAX, EXECUTION_AGENT_OBJECTIVE_MAX_LENGTH, EXECUTION_AGENT_RESPONSE_MAX_LENGTH, EXECUTION_AGENT_TITLE_MAX_LENGTH, } from "./contracts.js";
|
|
6
|
+
import { EXECUTION_AGENT_ACKNOWLEDGEMENT_MAX_LENGTH, EXECUTION_AGENT_AUDIT_CRITERION_COUNT_MAX, EXECUTION_AGENT_AUDIT_CRITERION_ID_MAX_LENGTH, EXECUTION_AGENT_CAPABILITY_SCOPE_GROUP_COUNT_MAX, EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX, EXECUTION_AGENT_OBJECTIVE_MAX_LENGTH, EXECUTION_AGENT_RESPONSE_MAX_LENGTH, EXECUTION_AGENT_TITLE_MAX_LENGTH, } from "./contracts.js";
|
|
6
7
|
import { executionOperationObjectiveSchema, requiresExecutionOperationObjective, } from "./capability-invocation-contract.js";
|
|
7
8
|
export function createExecutionAgentDecisionFormat(options = {}) {
|
|
8
9
|
const contract = prepareExecutionAgentDecisionContract(options);
|
|
@@ -115,7 +116,7 @@ export function createExecutionAgentDecisionFormat(options = {}) {
|
|
|
115
116
|
]
|
|
116
117
|
: []),
|
|
117
118
|
];
|
|
118
|
-
const schema = createStructuredDecisionEnvelopeSchema(variants);
|
|
119
|
+
const schema = createStructuredDecisionEnvelopeSchema(withExecutionWorkPlanVariants(variants, options.workPlan));
|
|
119
120
|
return {
|
|
120
121
|
type: "json_schema",
|
|
121
122
|
name: "execution_agent_decision",
|
|
@@ -181,7 +182,7 @@ export function prepareExecutionAgentDecisionContract(options) {
|
|
|
181
182
|
uniqueIds.size !== suppliedCapabilities.length ||
|
|
182
183
|
!Number.isInteger(maxBatchCapabilityExecutions) ||
|
|
183
184
|
maxBatchCapabilityExecutions < 0 ||
|
|
184
|
-
maxBatchCapabilityExecutions >
|
|
185
|
+
maxBatchCapabilityExecutions > EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX) {
|
|
185
186
|
throw new Error("execution_agent_capabilities_invalid");
|
|
186
187
|
}
|
|
187
188
|
const capabilities = Object.freeze(suppliedCapabilities.map((capability) => {
|
|
@@ -6,12 +6,13 @@ import { buildRequestTemporalContextMessage } from "../../context/request-tempor
|
|
|
6
6
|
import { projectScheduledExecutionContext } from "../../context/scheduled-execution-context.js";
|
|
7
7
|
import { buildImmediateOperationSupervisionEvidenceMessage } from "../../context/operation-supervision-evidence.js";
|
|
8
8
|
import { resolveModelContextBudget } from "../../model/model-context-budget.js";
|
|
9
|
-
import {
|
|
9
|
+
import { projectCapabilityCatalogGroups, projectCapabilityScope, } from "../../orchestration/capability-adapters/index.js";
|
|
10
10
|
import { resolveRequestWorkerCapabilities, } from "../../request/execution-scope.js";
|
|
11
11
|
import { appendRequestSteeringContext } from "../../request/request-steering-context.js";
|
|
12
|
-
import { EXECUTION_AGENT_ROOT_AUDIT_CRITERION_ID } from "../auditor-decision/index.js";
|
|
13
|
-
import { EXECUTION_AGENT_DECISION_MODEL_STEP, } from "./contracts.js";
|
|
12
|
+
import { EXECUTION_AGENT_ROOT_AUDIT_CRITERION_ID, projectAuditorInputState, } from "../auditor-decision/index.js";
|
|
13
|
+
import { EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX, EXECUTION_AGENT_DECISION_MODEL_STEP, } from "./contracts.js";
|
|
14
14
|
import { createExecutionAgentDecisionFormat } from "./format.js";
|
|
15
|
+
import { projectExecutionWorkPlanOptions } from "./work-plan-sources.js";
|
|
15
16
|
import { buildExecutionAgentInstructions } from "./prompt.js";
|
|
16
17
|
import { buildExecutionCapabilityCatalogMessage, buildExecutionCapabilityGroupCatalogMessage, buildExecutionContinuationMessages, buildExecutionDecisionStateMessage, } from "./state-context.js";
|
|
17
18
|
export function buildExecutionAgentInput(request, options) {
|
|
@@ -40,19 +41,16 @@ export function buildExecutionAgentInput(request, options) {
|
|
|
40
41
|
: hasInactiveGroup
|
|
41
42
|
? "extend"
|
|
42
43
|
: null;
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
options.head.state.results.some((result) => {
|
|
46
|
-
const producer = options.head.state.calls.find((candidate) => candidate.callId === result.producerCallId);
|
|
47
|
-
return producer?.parentCallId === options.call.callId;
|
|
48
|
-
});
|
|
49
|
-
const availableAuditCriterionIds = options.allowAuditor && hasCurrentEvidence
|
|
44
|
+
const auditInput = projectAuditorInputState(options.head, options.call.callId, options.steeringSnapshot.version);
|
|
45
|
+
const availableAuditCriterionIds = options.allowAuditor && auditInput.available
|
|
50
46
|
? Object.freeze([EXECUTION_AGENT_ROOT_AUDIT_CRITERION_ID])
|
|
51
47
|
: Object.freeze([]);
|
|
52
48
|
const memoryRecallMessage = request.longTermMemory?.enabled
|
|
53
49
|
? options.memoryRecallMessage
|
|
54
50
|
: undefined;
|
|
51
|
+
const workPlan = projectExecutionWorkPlanOptions(options.head, options.call);
|
|
55
52
|
const contract = Object.freeze({
|
|
53
|
+
...(workPlan ? { workPlan } : {}),
|
|
56
54
|
allowMemoryRecall: canOfferMemoryRecall({
|
|
57
55
|
enabled: request.longTermMemory?.enabled === true,
|
|
58
56
|
recallCount: options.head.state.memoryRecalls.length,
|
|
@@ -61,7 +59,7 @@ export function buildExecutionAgentInput(request, options) {
|
|
|
61
59
|
capabilities,
|
|
62
60
|
capabilityCatalogGroupIds: knownGroupIds,
|
|
63
61
|
activeCapabilityCatalogGroupIds,
|
|
64
|
-
maxBatchCapabilityExecutions: Math.min(
|
|
62
|
+
maxBatchCapabilityExecutions: Math.min(EXECUTION_AGENT_CAPABILITY_BATCH_COUNT_MAX, Math.max(0, remainingExecutions)),
|
|
65
63
|
includeAcknowledgement: options.includeAcknowledgement,
|
|
66
64
|
includeTitle: options.includeTitle,
|
|
67
65
|
allowRespond: true,
|
|
@@ -72,6 +70,7 @@ export function buildExecutionAgentInput(request, options) {
|
|
|
72
70
|
});
|
|
73
71
|
const format = createExecutionAgentDecisionFormat(contract);
|
|
74
72
|
const instructions = buildExecutionAgentInstructions({
|
|
73
|
+
allowWorkPlan: workPlan !== undefined,
|
|
75
74
|
allowMemoryRecall: contract.allowMemoryRecall,
|
|
76
75
|
hasMemoryRecallContext: memoryRecallMessage !== undefined,
|
|
77
76
|
hasCapabilities: capabilities.length > 0,
|
|
@@ -3,6 +3,7 @@ export declare function buildExecutionAgentInstructions(params: {
|
|
|
3
3
|
hasCapabilityCatalogGroups: boolean;
|
|
4
4
|
capabilityScopeAction: "open" | "extend" | null;
|
|
5
5
|
allowPlanner: boolean;
|
|
6
|
+
allowWorkPlan?: boolean;
|
|
6
7
|
availableAuditCriterionCount: number;
|
|
7
8
|
allowRespond: boolean;
|
|
8
9
|
allowMemoryRecall?: boolean;
|
|
@@ -23,7 +23,8 @@ export function buildExecutionAgentInstructions(params) {
|
|
|
23
23
|
? "Use respond only when the request can be answered completely and honestly now. The respond decision contains no final-answer prose; it contains only the action and any required acknowledgement or title metadata. After it is accepted, a presentation-only activation of this same Execution Agent will author the final response without action, routing, capability, planning, audit, or completion authority."
|
|
24
24
|
: "Respond is not available because the canonical completion gate is closed. Continue through an offered action or report a truthful blocker.",
|
|
25
25
|
"The user's explicit request is already the authority to perform the offered action within its stated scope. Treat 'can you', 'could you', 'would you', and equivalent phrasing in any language followed by an action as a request to perform that action, not as a request for another confirmation. Do not ask for confirmation merely because an offered capability has an external effect; the runtime enforces any approval that is actually required.",
|
|
26
|
-
"Before changing an existing resource, establish from the active user request and user-established context both the intended target and the permitted scope of change.
|
|
26
|
+
"Before changing an existing resource, establish from the active user request and user-established context both the intended target and the permitted scope of change. A selected project folder or working directory defines the execution location, not permission to repurpose an existing application discovered there. Discovery, accessible source files, related functionality, and similar names do not establish the user's intended mutation target. When an existing target and update scope are explicitly authorized, proceed without duplicate confirmation.",
|
|
27
|
+
"For a requested new application or project without an explicitly selected existing target, choose a separate new destination within the allowed working root and observe that it is unoccupied before writing. Preserve unrelated existing applications. If read-only observation leaves the user's intended target or reuse permission ambiguous, ask one focused question before mutation. An established immutable working directory does not select the application: use explicit paths relative to that base for the authorized destination.",
|
|
27
28
|
"Use blocked for a truthful user-facing blocker when no offered action can establish the missing outcome, or when material ambiguity about the intended target or permitted scope of any change to an existing resource requires user clarification. If an offered read-only observation can resolve the ambiguity, perform it before asking. If the ambiguity remains, stop before mutation and put one focused clarification question in blocked.response. Availability of a mutation capability does not resolve missing user intent. Runtime or provider failures are not blocked decisions.",
|
|
28
29
|
params.hasCapabilities
|
|
29
30
|
? `When external observation or an authorized effect is required, select one offered capability and provide a short client-facing status in intent, at most ${CAPABILITY_INTENT_MAX_LENGTH} characters. Intent is presentation metadata only: do not put sources, controls, payload details, or execution instructions in it. When the invocation schema requires operationObjective, state the complete bounded operation for that invocation alone. operationObjective is internal execution input constrained by the active user request and selected capability; it must not add unrelated outcomes, describe the whole workflow, or broaden the request. Observation capabilities may be batched only when independent; never batch mutations. The runtime determines exact duplicate operations only after every invocation is fully materialized. A capability receipt proves only its exact reported outcome.`
|
|
@@ -36,11 +37,17 @@ export function buildExecutionAgentInstructions(params) {
|
|
|
36
37
|
"Immediately before choosing respond, verify that no requested external effect remains without a successful visible capability result or a completed subordinate result that explicitly establishes it. Never use respond to ask permission for a reversible file creation or update that the user explicitly requested.",
|
|
37
38
|
"Never claim that a file was read, compared, created, changed, or verified unless the exact visible capability results establish that claim.",
|
|
38
39
|
params.allowPlanner
|
|
39
|
-
? "
|
|
40
|
+
? "Prefer the advisory Planner before substantial development that requires coordinated implementation and verification, dependency ordering, or integration. A single integrated deliverable and genuinely sequential steps are eligible; do not manufacture parallel work or extra deliverables. Skip planning overhead for a direct question or a simple isolated change. Every planned external outcome must be achievable through the offered capability catalog. Planner cannot execute; you own execution decisions and may use or refine its advice."
|
|
40
41
|
: "Planner is not available in this decision.",
|
|
42
|
+
...(params.allowWorkPlan
|
|
43
|
+
? [
|
|
44
|
+
"When you follow a returned Planner proposal, explicitly adopt its offered sourceResultRef using workPlan metadata alongside an existing decision, then keep its item statuses current. Use mode adopt to select a proposal and mode progress to update the currently adopted proposal; itemUpdates name exact offered itemIds and pending, in_progress, done, or blocked. The runtime_execution_state_v1 workPlan projection records available proposal identities and your current model-reported progress. It is passive state, not new user intent or proof of completion.",
|
|
45
|
+
"Plan reporting adds no separate action or model turn. Mark an item in_progress when starting work; report done only when already established outcomes satisfy that item's actual acceptance criteria, never in anticipation of the paired operation succeeding. Syntax checks, file existence, and written test instructions do not establish functional, interaction, or persistence tests. Keep unperformed verification pending or report its concrete blocker; disclose it when handing over. Planner/Auditor results, an attempted tool call, and choosing respond do not complete plan items automatically. A plan report cannot authorize an effect or establish tool evidence.",
|
|
46
|
+
]
|
|
47
|
+
: []),
|
|
41
48
|
params.availableAuditCriterionCount > 0
|
|
42
|
-
? "
|
|
43
|
-
: "No
|
|
49
|
+
? "For substantial development, prefer one independent completion audit after implementation and the available planned validation are ready for delivery. Do not audit after every intermediate edit or newly settled result merely because an audit is offered. An earlier targeted audit is appropriate when the user requests it or its findings can materially change the next implementation decision. Invoke only offered criterionIds. The Auditor chooses original evidence from the complete canonical work inventory; the runtime binds its choices without choosing relevance. A needs_evidence receipt requests another existing evidence bundle: invoke the offered criteria again to supply that Auditor-selected bundle, without repeating external actions merely to reread it. For gaps, address the concrete findings or obtain genuinely missing observations before another audit. Unchanged finished audits are not offered again. Auditor cannot remediate or answer; you retain the next-action decision."
|
|
50
|
+
: "No audit is offered for this work snapshot. The passive auditAvailability reason explains work-evidence eligibility but cannot grant a role absent from the decision schema. Do not repeat a finished audit or treat its absence as proof of completion.",
|
|
44
51
|
"Do not invent a hidden child, fallback route, capability result, audit result, or plan completion.",
|
|
45
52
|
params.includeAcknowledgement
|
|
46
53
|
? "Also return one concise acknowledgement in the user's language. It describes the understood outcome without claiming work already occurred."
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { projectImmediateRoleOperationSupervisionNotices } from "../../orchestration/role-calls/index.js";
|
|
2
2
|
import { projectImmediateCapabilityReconsideration } from "./reconsideration-context.js";
|
|
3
|
+
import { projectAuditorInputState } from "../auditor-decision/audit-input-state.js";
|
|
4
|
+
import { projectExecutionWorkPlanContext } from "./work-plan-sources.js";
|
|
3
5
|
export const EXECUTION_STATE_MESSAGE_KIND = "runtime_execution_state_v1";
|
|
4
6
|
export const EXECUTION_CAPABILITY_CATALOG_MESSAGE_KIND = "runtime_execution_capability_catalog_v1";
|
|
5
7
|
export const EXECUTION_CAPABILITY_GROUP_CATALOG_MESSAGE_KIND = "runtime_execution_capability_group_catalog_v1";
|
|
@@ -43,8 +45,16 @@ function buildExecutionStateMessageForConsumer(head, call, projection, steeringV
|
|
|
43
45
|
stateRevision: head.revision,
|
|
44
46
|
callId: call.callId,
|
|
45
47
|
activationCount: call.activationCount,
|
|
48
|
+
...(steeringVersion !== undefined
|
|
49
|
+
? { workPlan: projectExecutionWorkPlanContext(head, call) }
|
|
50
|
+
: {}),
|
|
46
51
|
workingDirectory: call.workingDirectory ?? null,
|
|
47
52
|
activeCapabilityScope: call.workerCapabilityScope ?? null,
|
|
53
|
+
...(steeringVersion !== undefined
|
|
54
|
+
? {
|
|
55
|
+
auditAvailability: projectAuditorInputState(head, call.callId, steeringVersion),
|
|
56
|
+
}
|
|
57
|
+
: {}),
|
|
48
58
|
settledCapabilityExecutionCount: head.state.capabilityExecutions.filter((execution) => execution.callId === call.callId && execution.status === "settled").length,
|
|
49
59
|
completedSubordinateResults: head.state.results
|
|
50
60
|
.filter((result) => {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ModelWorkPlanItemUpdate } from "../../orchestration/role-calls/work-plan-contracts.js";
|
|
2
|
+
export type ExecutionWorkPlanReport = Readonly<{
|
|
3
|
+
mode: "adopt" | "progress";
|
|
4
|
+
sourceResultRef: string;
|
|
5
|
+
itemUpdates: readonly ModelWorkPlanItemUpdate[];
|
|
6
|
+
}>;
|
|
7
|
+
export type ExecutionWorkPlanSource = Readonly<{
|
|
8
|
+
sourceResultRef: string;
|
|
9
|
+
itemIds: readonly string[];
|
|
10
|
+
}>;
|
|
11
|
+
export type ExecutionWorkPlanOptions = Readonly<{
|
|
12
|
+
sources: readonly ExecutionWorkPlanSource[];
|
|
13
|
+
current?: ExecutionWorkPlanSource;
|
|
14
|
+
}>;
|
|
15
|
+
/** Parse only offered canonical identities. The model cannot author a new definition here. */
|
|
16
|
+
export declare function parseExecutionWorkPlanReport(value: unknown, options?: ExecutionWorkPlanOptions): ExecutionWorkPlanReport | undefined;
|
|
17
|
+
/** Optional metadata uses explicit schema variants; existing variants stay byte-for-byte available. */
|
|
18
|
+
export declare function withExecutionWorkPlanVariants(variants: readonly Record<string, unknown>[], options?: ExecutionWorkPlanOptions): readonly Record<string, unknown>[];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { exactKeys, isRecord } from "../../validation/strict-record.js";
|
|
2
|
+
import { MODEL_WORK_PLAN_ITEM_LIMIT, MODEL_WORK_PLAN_STATUSES, } from "../../orchestration/role-calls/work-plan-contracts.js";
|
|
3
|
+
import { parseModelWorkPlanItemUpdates } from "../../orchestration/role-calls/work-plan-validation.js";
|
|
4
|
+
/** Parse only offered canonical identities. The model cannot author a new definition here. */
|
|
5
|
+
export function parseExecutionWorkPlanReport(value, options) {
|
|
6
|
+
if (!options || !isRecord(value))
|
|
7
|
+
return undefined;
|
|
8
|
+
if (!exactKeys(value, ["mode", "sourceResultRef"], ["itemUpdates"]))
|
|
9
|
+
return undefined;
|
|
10
|
+
if (value.mode !== "adopt" && value.mode !== "progress")
|
|
11
|
+
return undefined;
|
|
12
|
+
const source = resolveOfferedWorkPlanSource(value.mode, value.sourceResultRef, options);
|
|
13
|
+
if (!source)
|
|
14
|
+
return undefined;
|
|
15
|
+
const itemUpdates = parseModelWorkPlanItemUpdates(value.itemUpdates ?? []);
|
|
16
|
+
if (!itemUpdates || (value.mode === "progress" && itemUpdates.length === 0))
|
|
17
|
+
return undefined;
|
|
18
|
+
if (itemUpdates.some((item) => !source.itemIds.includes(item.itemId)))
|
|
19
|
+
return undefined;
|
|
20
|
+
return {
|
|
21
|
+
mode: value.mode,
|
|
22
|
+
sourceResultRef: source.sourceResultRef,
|
|
23
|
+
itemUpdates,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function resolveOfferedWorkPlanSource(mode, sourceResultRef, options) {
|
|
27
|
+
if (mode === "adopt")
|
|
28
|
+
return options.sources.find((candidate) => candidate.sourceResultRef === sourceResultRef);
|
|
29
|
+
if (options.current?.sourceResultRef !== sourceResultRef)
|
|
30
|
+
return undefined;
|
|
31
|
+
return options.current;
|
|
32
|
+
}
|
|
33
|
+
/** Optional metadata uses explicit schema variants; existing variants stay byte-for-byte available. */
|
|
34
|
+
export function withExecutionWorkPlanVariants(variants, options) {
|
|
35
|
+
const reports = createReportSchemas(options);
|
|
36
|
+
if (reports.length === 0)
|
|
37
|
+
return variants;
|
|
38
|
+
return variants.flatMap((variant) => [
|
|
39
|
+
variant,
|
|
40
|
+
{
|
|
41
|
+
...variant,
|
|
42
|
+
properties: {
|
|
43
|
+
...variant.properties,
|
|
44
|
+
workPlan: { anyOf: reports },
|
|
45
|
+
},
|
|
46
|
+
required: [...variant.required, "workPlan"],
|
|
47
|
+
},
|
|
48
|
+
]);
|
|
49
|
+
}
|
|
50
|
+
function createReportSchemas(options) {
|
|
51
|
+
if (!options)
|
|
52
|
+
return [];
|
|
53
|
+
const schemas = options.sources.map((source) => reportSchema("adopt", source));
|
|
54
|
+
if (options.current)
|
|
55
|
+
schemas.push(reportSchema("progress", options.current));
|
|
56
|
+
return schemas;
|
|
57
|
+
}
|
|
58
|
+
function reportSchema(mode, source) {
|
|
59
|
+
const itemIds = [...new Set(source.itemIds)];
|
|
60
|
+
return {
|
|
61
|
+
type: "object",
|
|
62
|
+
additionalProperties: false,
|
|
63
|
+
properties: {
|
|
64
|
+
mode: { type: "string", enum: [mode] },
|
|
65
|
+
sourceResultRef: {
|
|
66
|
+
type: "string",
|
|
67
|
+
enum: [source.sourceResultRef],
|
|
68
|
+
},
|
|
69
|
+
itemUpdates: {
|
|
70
|
+
type: "array",
|
|
71
|
+
minItems: mode === "progress" ? 1 : 0,
|
|
72
|
+
maxItems: MODEL_WORK_PLAN_ITEM_LIMIT,
|
|
73
|
+
items: {
|
|
74
|
+
type: "object",
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
properties: {
|
|
77
|
+
itemId: { type: "string", enum: itemIds },
|
|
78
|
+
status: { type: "string", enum: [...MODEL_WORK_PLAN_STATUSES] },
|
|
79
|
+
},
|
|
80
|
+
required: ["itemId", "status"],
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
required: ["mode", "sourceResultRef", "itemUpdates"],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { ExecutionAgentDecisionContractOptions, ExecutionAgentDecisionParseResult } from "./contracts.js";
|
|
2
|
+
export declare function parseDecisionWithWorkPlan(text: string, options: ExecutionAgentDecisionContractOptions, parseAction: (text: string, options: ExecutionAgentDecisionContractOptions) => ExecutionAgentDecisionParseResult): ExecutionAgentDecisionParseResult;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { readStructuredDecisionEnvelope } from "../../model/structured-decision-envelope.js";
|
|
2
|
+
import { parseExecutionWorkPlanReport } from "./work-plan-contract.js";
|
|
3
|
+
export function parseDecisionWithWorkPlan(text, options, parseAction) {
|
|
4
|
+
let value;
|
|
5
|
+
try {
|
|
6
|
+
value = JSON.parse(text.trim());
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return parseAction(text, options);
|
|
10
|
+
}
|
|
11
|
+
const record = readStructuredDecisionEnvelope(value);
|
|
12
|
+
if (!record || !Object.hasOwn(record, "workPlan"))
|
|
13
|
+
return parseAction(text, options);
|
|
14
|
+
const workPlan = parseExecutionWorkPlanReport(record.workPlan, options.workPlan);
|
|
15
|
+
if (!workPlan)
|
|
16
|
+
return {
|
|
17
|
+
ok: false,
|
|
18
|
+
stage: "domain_parser",
|
|
19
|
+
issues: [
|
|
20
|
+
{
|
|
21
|
+
code: "execution_agent_work_plan_invalid",
|
|
22
|
+
path: "decision.workPlan",
|
|
23
|
+
message: "workPlan must adopt an offered Planner result or update known items of the currently adopted plan.",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
const { workPlan: _report, ...action } = record;
|
|
28
|
+
const parsed = parseAction(JSON.stringify({ decision: action }), options);
|
|
29
|
+
if (!parsed.ok)
|
|
30
|
+
return parsed;
|
|
31
|
+
return {
|
|
32
|
+
ok: true,
|
|
33
|
+
decision: Object.freeze({
|
|
34
|
+
...parsed.decision,
|
|
35
|
+
workPlan: Object.freeze(workPlan),
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RoleCallFrame, RoleCallLedgerHead } from "../../orchestration/role-calls/index.js";
|
|
2
|
+
import type { ModelWorkPlanDefinition } from "../../orchestration/role-calls/work-plan-contracts.js";
|
|
3
|
+
import type { ExecutionWorkPlanOptions } from "./work-plan-contract.js";
|
|
4
|
+
export declare function resolveExecutionWorkPlanDefinition(head: RoleCallLedgerHead, call: RoleCallFrame, sourceResultRef: string): ModelWorkPlanDefinition | undefined;
|
|
5
|
+
export declare function projectExecutionWorkPlanOptions(head: RoleCallLedgerHead, call: RoleCallFrame): ExecutionWorkPlanOptions | undefined;
|
|
6
|
+
export declare function projectExecutionWorkPlanContext(head: RoleCallLedgerHead, call: RoleCallFrame): Record<string, unknown> | undefined;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { resolveModelWorkPlanSourceDefinition } from "../../orchestration/role-calls/work-plan-source.js";
|
|
2
|
+
export function resolveExecutionWorkPlanDefinition(head, call, sourceResultRef) {
|
|
3
|
+
return resolveModelWorkPlanSourceDefinition(head.state, call, sourceResultRef, head.policy);
|
|
4
|
+
}
|
|
5
|
+
export function projectExecutionWorkPlanOptions(head, call) {
|
|
6
|
+
if (head.policy.authority.modelWorkPlanAuthority !== "root")
|
|
7
|
+
return undefined;
|
|
8
|
+
const sources = head.state.results.flatMap((result) => {
|
|
9
|
+
const definition = resolveExecutionWorkPlanDefinition(head, call, result.resultRef);
|
|
10
|
+
return definition
|
|
11
|
+
? [
|
|
12
|
+
{
|
|
13
|
+
sourceResultRef: result.resultRef,
|
|
14
|
+
itemIds: definition.items.map((item) => item.itemId),
|
|
15
|
+
},
|
|
16
|
+
]
|
|
17
|
+
: [];
|
|
18
|
+
});
|
|
19
|
+
const plan = call.adoptedWorkPlan;
|
|
20
|
+
if (sources.length === 0 && !plan)
|
|
21
|
+
return undefined;
|
|
22
|
+
return {
|
|
23
|
+
sources,
|
|
24
|
+
...(plan
|
|
25
|
+
? {
|
|
26
|
+
current: {
|
|
27
|
+
sourceResultRef: plan.sourceResultRef,
|
|
28
|
+
itemIds: plan.definition.items.map((item) => item.itemId),
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
: {}),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function projectExecutionWorkPlanContext(head, call) {
|
|
35
|
+
const options = projectExecutionWorkPlanOptions(head, call);
|
|
36
|
+
if (!options)
|
|
37
|
+
return undefined;
|
|
38
|
+
const plan = call.adoptedWorkPlan;
|
|
39
|
+
return {
|
|
40
|
+
authority: "model_reported_progress_not_completion_evidence",
|
|
41
|
+
availableProposals: options.sources,
|
|
42
|
+
...(plan
|
|
43
|
+
? {
|
|
44
|
+
adopted: {
|
|
45
|
+
sourceResultRef: plan.sourceResultRef,
|
|
46
|
+
items: plan.itemStates.map((item) => ({
|
|
47
|
+
itemId: item.itemId,
|
|
48
|
+
status: item.status,
|
|
49
|
+
})),
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
: {}),
|
|
53
|
+
};
|
|
54
|
+
}
|