@abot-ai/runtime 1.3.0 → 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/init-runtime.js +4 -13
- package/dist/scripts/runtime-model-addition.d.ts +13 -0
- package/dist/scripts/runtime-model-addition.js +53 -0
- package/dist/scripts/runtime-setup-directories.d.ts +2 -0
- package/dist/scripts/runtime-setup-directories.js +38 -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/shared/directory-authority/bootstrap.d.ts +1 -0
- package/dist/src/shared/directory-authority/bootstrap.js +118 -0
- package/dist/src/shared/directory-authority/command.d.ts +8 -0
- package/dist/src/shared/directory-authority/command.js +27 -0
- package/dist/src/shared/directory-authority/errors.d.ts +5 -0
- package/dist/src/shared/directory-authority/errors.js +10 -0
- package/dist/src/shared/directory-authority/index.d.ts +3 -0
- package/dist/src/shared/directory-authority/index.js +3 -0
- package/dist/src/shared/directory-authority/protocol.d.ts +11 -0
- package/dist/src/shared/directory-authority/protocol.js +62 -0
- package/dist/src/shared/directory-authority/task.d.ts +7 -0
- package/dist/src/shared/directory-authority/task.js +97 -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 +137 -26
- 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/process-manager.ts +1 -20
- package/plugins/exec/source/shell-platform.ts +29 -0
- package/plugins/exec/source/types.ts +6 -4
- package/plugins/exec/source/validation.ts +33 -198
- package/plugins/exec/src/index.cjs +87 -222
- 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 +15 -3
- package/plugins/filesystem/source/bounded-io.ts +5 -99
- package/plugins/filesystem/source/dev-view.ts +2 -1
- package/plugins/filesystem/source/directory-authority-write.ts +68 -0
- package/plugins/filesystem/source/directory-sample-task.ts +23 -0
- package/plugins/filesystem/source/directory-sample.ts +132 -0
- package/plugins/filesystem/source/directory-write-task.ts +160 -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 +29 -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 +855 -153
- package/plugins/local-search/source/index.ts +2 -0
- package/plugins/local-search/source/paths.ts +30 -7
- package/plugins/local-search/source/ripgrep-process.ts +69 -0
- package/plugins/local-search/source/ripgrep.ts +19 -23
- package/plugins/local-search/src/index.cjs +295 -32
- 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,34 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { copySessionProject } from "../../sessions/project-binding.js";
|
|
4
|
+
import { FileProjectRepository } from "./repository.js";
|
|
5
|
+
import { browseProjectFolders, projectDisplayName, resolveProjectDirectory, } from "./folders.js";
|
|
6
|
+
import { ProjectOperationError, } from "./contracts.js";
|
|
7
|
+
export function createRuntimeProjectService(config, sessions) {
|
|
8
|
+
const repository = new FileProjectRepository(join(config.paths.runtimeDir, "projects", "registry.json"));
|
|
9
|
+
const get = async (id) => (await repository.list()).find((project) => project.id === id) ?? null;
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
list: () => repository.list(),
|
|
12
|
+
get,
|
|
13
|
+
async create(input) {
|
|
14
|
+
const directory = await resolveProjectDirectory(input.directory);
|
|
15
|
+
return repository.create({
|
|
16
|
+
id: randomUUID(),
|
|
17
|
+
name: projectDisplayName(input.name, directory),
|
|
18
|
+
directory,
|
|
19
|
+
createdAt: new Date().toISOString(),
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
browseFolders: (input) => browseProjectFolders(config.paths.agentWorkDir, input),
|
|
23
|
+
async createSession(projectId) {
|
|
24
|
+
const record = await get(projectId);
|
|
25
|
+
if (!record)
|
|
26
|
+
throw new ProjectOperationError("project_not_found", "This project no longer exists.", 404);
|
|
27
|
+
await resolveProjectDirectory(record.directory);
|
|
28
|
+
const project = copySessionProject(record);
|
|
29
|
+
const sessionId = randomUUID();
|
|
30
|
+
await sessions.getOrCreateSession(sessionId, { project });
|
|
31
|
+
return { sessionId, project };
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SessionRecord } from "../../sessions/types.js";
|
|
2
|
+
import type { RuntimePaths } from "../ports.js";
|
|
3
|
+
/** Derive only the request-local work root; all configured namespaces stay distinct. */
|
|
4
|
+
export declare function resolveSessionWorkingDirectory(session: SessionRecord): string | undefined;
|
|
5
|
+
export declare function projectSessionRuntimePaths(paths: RuntimePaths, session: SessionRecord): RuntimePaths;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { copySessionProject } from "../../sessions/project-binding.js";
|
|
2
|
+
/** Derive only the request-local work root; all configured namespaces stay distinct. */
|
|
3
|
+
export function resolveSessionWorkingDirectory(session) {
|
|
4
|
+
if (!session.project)
|
|
5
|
+
return undefined;
|
|
6
|
+
return copySessionProject(session.project).directory;
|
|
7
|
+
}
|
|
8
|
+
export function projectSessionRuntimePaths(paths, session) {
|
|
9
|
+
const agentWorkDir = resolveSessionWorkingDirectory(session);
|
|
10
|
+
if (!agentWorkDir)
|
|
11
|
+
return paths;
|
|
12
|
+
return Object.freeze({ ...paths, agentWorkDir });
|
|
13
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RoleCallFrame, RoleCallLedgerHead } from "../orchestration/role-calls/index.js";
|
|
2
|
+
import type { ModelWorkPlanUpdate } from "../orchestration/role-calls/work-plan-contracts.js";
|
|
3
|
+
import { type ExecutionWorkPlanReport } from "../steps/execution-agent/work-plan-contract.js";
|
|
4
|
+
export declare function bindExecutionAgentPlanUpdate(head: RoleCallLedgerHead, call: RoleCallFrame, report: ExecutionWorkPlanReport): ModelWorkPlanUpdate;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { parseExecutionWorkPlanReport, } from "../steps/execution-agent/work-plan-contract.js";
|
|
2
|
+
import { projectExecutionWorkPlanOptions, resolveExecutionWorkPlanDefinition, } from "../steps/execution-agent/work-plan-sources.js";
|
|
3
|
+
export function bindExecutionAgentPlanUpdate(head, call, report) {
|
|
4
|
+
const validated = parseExecutionWorkPlanReport(report, projectExecutionWorkPlanOptions(head, call));
|
|
5
|
+
if (!validated)
|
|
6
|
+
throw new Error("execution_agent_work_plan_report_invalid");
|
|
7
|
+
if (validated.mode === "progress")
|
|
8
|
+
return { ...validated, mode: "progress" };
|
|
9
|
+
const definition = resolveExecutionWorkPlanDefinition(head, call, validated.sourceResultRef);
|
|
10
|
+
if (!definition)
|
|
11
|
+
throw new Error("execution_agent_work_plan_source_invalid");
|
|
12
|
+
return { ...validated, mode: "adopt", definition };
|
|
13
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { projectSupervisorCallIdentity, projectSupervisorResumeContext, } from "../steps/supervisor-decision/index.js";
|
|
2
2
|
import { EXECUTION_AGENT_DECISION_MODEL_STEP, EXECUTION_AGENT_RESPONSE_MODEL_STEP, runExecutionAgentDecision, runExecutionAgentAuthoredResponse, } from "../steps/execution-agent/index.js";
|
|
3
3
|
import { encodeExecutionAgentAuditObjective } from "../steps/auditor-decision/index.js";
|
|
4
|
+
import { bindExecutionAgentPlanUpdate } from "./execution-agent-plan-update.js";
|
|
4
5
|
import { projectRequestSteeringSnapshot, resolveRequestSteeringInbox, } from "./request-steering.js";
|
|
5
6
|
export const EXECUTION_AGENT_ROOT_CONTRACT = Object.freeze({
|
|
6
7
|
contractId: "execution_agent",
|
|
@@ -24,7 +25,14 @@ export const EXECUTION_AGENT_ROOT_CONTRACT = Object.freeze({
|
|
|
24
25
|
: {}),
|
|
25
26
|
});
|
|
26
27
|
return Object.freeze({
|
|
27
|
-
decision:
|
|
28
|
+
decision: {
|
|
29
|
+
...projectKernelDecision(outcome.decision, outcome.steeringVersion),
|
|
30
|
+
...("workPlan" in outcome.decision && outcome.decision.workPlan
|
|
31
|
+
? {
|
|
32
|
+
workPlan: bindExecutionAgentPlanUpdate(options.head, options.callFrame, outcome.decision.workPlan),
|
|
33
|
+
}
|
|
34
|
+
: {}),
|
|
35
|
+
},
|
|
28
36
|
steeringVersion: outcome.steeringVersion,
|
|
29
37
|
});
|
|
30
38
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveSessionWorkingDirectory } from "../projects/session-paths.js";
|
|
1
2
|
import { traceDebug } from "../observability/debug-logger.js";
|
|
2
3
|
import { RequestLifecycle } from "../orchestration/lifecycle/request-lifecycle.js";
|
|
3
4
|
import { createRequestContextCompactionStore } from "../context/semantic-compaction/index.js";
|
|
@@ -80,6 +81,7 @@ class RequestHandlingSession {
|
|
|
80
81
|
sessionStore,
|
|
81
82
|
attachmentStore,
|
|
82
83
|
});
|
|
84
|
+
const requestWorkingDirectory = resolveSessionWorkingDirectory(openedSession.session);
|
|
83
85
|
const historyMessages = snapshotRequestHistory(openedSession.session);
|
|
84
86
|
const sessionMemory = createRequestSessionMemory({
|
|
85
87
|
sessionId,
|
|
@@ -157,18 +159,23 @@ class RequestHandlingSession {
|
|
|
157
159
|
onEvent: (name, extra) => this.events.event(name, extra),
|
|
158
160
|
...(sessionArtifactPaths.length > 0 ? { sessionArtifactPaths } : {}),
|
|
159
161
|
};
|
|
162
|
+
const toolRegistry = this.options.toolRegistry?.prepareRequest
|
|
163
|
+
? await this.options.toolRegistry.prepareRequest()
|
|
164
|
+
: this.options.toolRegistry;
|
|
165
|
+
this.lifecycle.signal.throwIfAborted();
|
|
160
166
|
const runnerRequest = createRequestExecutionScope({
|
|
161
167
|
seed: runnerRequestSeed,
|
|
162
168
|
executionPolicy,
|
|
163
169
|
createWorkerCapabilities: (request) => createRequestWorkerCapabilityProvider({
|
|
164
170
|
request,
|
|
171
|
+
requestWorkingDirectory,
|
|
165
172
|
executionPolicyAuthority: executionPolicy.authority,
|
|
166
173
|
requestAttachments: initializedRequest.toolAttachments,
|
|
167
174
|
...(this.options.runtimeConfig
|
|
168
175
|
? { runtimeConfig: this.options.runtimeConfig }
|
|
169
176
|
: {}),
|
|
170
|
-
...(
|
|
171
|
-
? { toolRegistryOverride:
|
|
177
|
+
...(toolRegistry
|
|
178
|
+
? { toolRegistryOverride: toolRegistry }
|
|
172
179
|
: {}),
|
|
173
180
|
}),
|
|
174
181
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ToolPermissionMode } from "../../capabilities/tool-permission-mode.js";
|
|
1
2
|
import type { RunRequestMessage } from "./contracts.js";
|
|
2
3
|
export declare function parseRequestInput(msg: RunRequestMessage): {
|
|
3
4
|
requestId: string;
|
|
@@ -6,5 +7,5 @@ export declare function parseRequestInput(msg: RunRequestMessage): {
|
|
|
6
7
|
rawAttachments: unknown;
|
|
7
8
|
rawAgentMode: unknown;
|
|
8
9
|
rawModelPreference: unknown;
|
|
9
|
-
toolPermissionMode:
|
|
10
|
+
toolPermissionMode: ToolPermissionMode;
|
|
10
11
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { resolveToolPermissionMode, } from "../../capabilities/tool-permission-mode.js";
|
|
1
2
|
export function parseRequestInput(msg) {
|
|
2
3
|
return {
|
|
3
4
|
requestId: msg.requestId,
|
|
@@ -13,9 +14,3 @@ export function parseRequestInput(msg) {
|
|
|
13
14
|
toolPermissionMode: resolveToolPermissionMode(msg.toolPermissionMode),
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
function resolveToolPermissionMode(value) {
|
|
17
|
-
const normalized = typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
18
|
-
return normalized === "full_access" || normalized === "full"
|
|
19
|
-
? "full_access"
|
|
20
|
-
: "ask";
|
|
21
|
-
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { projectRequestPlanCommit, } from "./plan-event-projection.js";
|
|
2
2
|
import { consumeUnexpectedThenable } from "../orchestration/synchronous-boundary.js";
|
|
3
3
|
import { createRequestPlanEventPresentation } from "./planner-plan-events.js";
|
|
4
|
+
import { projectRootWorkPlanCommit } from "./root-plan-event-projection.js";
|
|
4
5
|
import { traceRequestPlannerEventsEmitted, traceRequestPlannerEventsFailed, traceRequestPlannerEventsProjected, } from "./role-call-planner-event-diagnostics.js";
|
|
5
6
|
const REQUEST_PLANNER_EVENT_EMISSION_FAILURE_MESSAGE = "One or more canonical Planner plan events could not be emitted.";
|
|
6
7
|
const ROLE_CALL_PLAN_EVENT_PRESENTATION = createRequestPlanEventPresentation({
|
|
@@ -11,6 +12,9 @@ const ROLE_CALL_PLAN_EVENT_PRESENTATION = createRequestPlanEventPresentation({
|
|
|
11
12
|
* canonical plan. It never proposes work or changes role-call state.
|
|
12
13
|
*/
|
|
13
14
|
export function projectRequestPlannerRoleCallCommit(commit) {
|
|
15
|
+
if (commit.effect.type === "model_work_plan_updated") {
|
|
16
|
+
return projectRootWorkPlanCommit(commit, ROLE_CALL_PLAN_EVENT_PRESENTATION);
|
|
17
|
+
}
|
|
14
18
|
if (commit.effect.type !== "child_opened" &&
|
|
15
19
|
commit.effect.type !== "child_returned") {
|
|
16
20
|
return Object.freeze([]);
|
|
@@ -49,11 +49,12 @@ const SUPERVISOR_WORKER_V1_POLICY_DEFINITION = Object.freeze({
|
|
|
49
49
|
});
|
|
50
50
|
const EXECUTION_AGENT_V1_POLICY_DEFINITION = Object.freeze({
|
|
51
51
|
id: "execution-agent-v1",
|
|
52
|
-
version:
|
|
52
|
+
version: 2,
|
|
53
53
|
rootContract: EXECUTION_AGENT_ROOT_CONTRACT,
|
|
54
54
|
roleExecutors: EXECUTION_AGENT_ROLE_EXECUTORS,
|
|
55
55
|
capabilityAuthorities: Object.freeze(["root"]),
|
|
56
56
|
terminalTextMode: "exact",
|
|
57
|
+
modelWorkPlanAuthority: "root",
|
|
57
58
|
});
|
|
58
59
|
export const SUPERVISOR_WORKER_V1_EXECUTION_POLICY = compileSupervisorWorkerV1Policy();
|
|
59
60
|
export const EXECUTION_AGENT_V1_EXECUTION_POLICY = compileExecutionPolicy(EXECUTION_AGENT_V1_POLICY_DEFINITION);
|
|
@@ -83,6 +84,9 @@ function compileExecutionPolicy(definition) {
|
|
|
83
84
|
rootContractId: definition.rootContract.contractId,
|
|
84
85
|
availableSubordinateContractIds: definition.roleExecutors.roleIds,
|
|
85
86
|
capabilityAuthorities: definition.capabilityAuthorities,
|
|
87
|
+
...(definition.modelWorkPlanAuthority
|
|
88
|
+
? { modelWorkPlanAuthority: definition.modelWorkPlanAuthority }
|
|
89
|
+
: {}),
|
|
86
90
|
...(definition.terminalTextMode !== undefined
|
|
87
91
|
? { terminalTextMode: definition.terminalTextMode }
|
|
88
92
|
: {}),
|
|
@@ -99,6 +103,9 @@ function compileExecutionPolicy(definition) {
|
|
|
99
103
|
...definition.roleExecutors.roleIds,
|
|
100
104
|
]),
|
|
101
105
|
capabilityAuthorities: Object.freeze([...definition.capabilityAuthorities]),
|
|
106
|
+
...(definition.modelWorkPlanAuthority
|
|
107
|
+
? { modelWorkPlanAuthority: definition.modelWorkPlanAuthority }
|
|
108
|
+
: {}),
|
|
102
109
|
...(definition.terminalTextMode !== undefined
|
|
103
110
|
? { terminalTextMode: definition.terminalTextMode }
|
|
104
111
|
: {}),
|
|
@@ -114,6 +121,7 @@ function sameAuthority(left, right) {
|
|
|
114
121
|
left.version === right.version &&
|
|
115
122
|
left.definitionHash === right.definitionHash &&
|
|
116
123
|
left.rootContractId === right.rootContractId &&
|
|
124
|
+
left.modelWorkPlanAuthority === right.modelWorkPlanAuthority &&
|
|
117
125
|
sameOrderedValues(left.availableSubordinateContractIds, right.availableSubordinateContractIds) &&
|
|
118
126
|
sameOrderedValues(left.capabilityAuthorities, right.capabilityAuthorities) &&
|
|
119
127
|
(left.terminalTextMode ?? "normalized") ===
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ModelStep } from "../../shared/model-steps.js";
|
|
2
|
+
import type { ModelWorkPlanUpdate } from "../orchestration/role-calls/work-plan-contracts.js";
|
|
2
3
|
import type { ChatMessage } from "../../model-gateway/types.js";
|
|
3
4
|
import type { MemoryRecallDecision } from "../steps/memory-recall-decision.js";
|
|
4
5
|
import type { RequestToolResultsView } from "../context/request-tool-results.js";
|
|
@@ -15,7 +16,7 @@ export type RootContractCallIdentity = Readonly<{
|
|
|
15
16
|
depth: number;
|
|
16
17
|
invocationAttempt: number;
|
|
17
18
|
}>;
|
|
18
|
-
|
|
19
|
+
type RootContractAction = MemoryRecallDecision | Readonly<{
|
|
19
20
|
action: "respond";
|
|
20
21
|
responseRecommendation?: string;
|
|
21
22
|
acknowledgement?: string;
|
|
@@ -64,6 +65,9 @@ export type RootContractDecision = MemoryRecallDecision | Readonly<{
|
|
|
64
65
|
acknowledgement?: undefined;
|
|
65
66
|
title?: undefined;
|
|
66
67
|
}>;
|
|
68
|
+
export type RootContractDecision = RootContractAction & Readonly<{
|
|
69
|
+
workPlan?: ModelWorkPlanUpdate;
|
|
70
|
+
}>;
|
|
67
71
|
export type RootContractDecisionOutcome = Readonly<{
|
|
68
72
|
decision: RootContractDecision;
|
|
69
73
|
steeringVersion: number;
|
|
@@ -104,3 +108,4 @@ export type CompiledExecutionPolicy<TRequest> = Readonly<{
|
|
|
104
108
|
rootContract: RootContractAdapter<TRequest>;
|
|
105
109
|
roleExecutors: RoleExecutorRegistry<TRequest, RequestRoleExecutionHandoff>;
|
|
106
110
|
}>;
|
|
111
|
+
export {};
|
|
@@ -9,6 +9,7 @@ import { projectRequestSteeringSnapshot, resolveRequestSteeringInbox, } from "./
|
|
|
9
9
|
import { traceSupervisorRootAcknowledgementPublished, traceSupervisorRootActivationFailed, traceSupervisorRootActivationStarted, traceSupervisorRootInvocationSuperseded, traceSupervisorRootResponseSuperseded, } from "./supervisor-root-execution-diagnostics.js";
|
|
10
10
|
import { bindSupervisorObservationHandoff, projectSupervisorFinalObservation, } from "./root-observation-handoff.js";
|
|
11
11
|
import { performRootMemoryRecall } from "./root-memory-recall.js";
|
|
12
|
+
import { applyRootModelWorkPlan } from "./root-plan-update.js";
|
|
12
13
|
import { projectRootMemoryRecallMessage } from "../long-term-memory/recall-context.js";
|
|
13
14
|
import { createPlainRootAuthoredResponse } from "../orchestration/final-response/authoring-contract.js";
|
|
14
15
|
const CONTINUE_ROOT_EXECUTION = Object.freeze({
|
|
@@ -176,6 +177,22 @@ class RootExecutionSession {
|
|
|
176
177
|
}
|
|
177
178
|
async executeDecision(activation, attempt) {
|
|
178
179
|
const { decision } = activation;
|
|
180
|
+
if (decision.workPlan) {
|
|
181
|
+
attempt.failureStage = "apply_root_transition";
|
|
182
|
+
const updated = await applyRootModelWorkPlan({
|
|
183
|
+
request: this.request,
|
|
184
|
+
ledger: this.ledger,
|
|
185
|
+
head: activation.head,
|
|
186
|
+
call: activation.call,
|
|
187
|
+
steeringVersion: activation.decisionSteeringVersion,
|
|
188
|
+
update: decision.workPlan,
|
|
189
|
+
});
|
|
190
|
+
if (!updated)
|
|
191
|
+
return CONTINUE_ROOT_EXECUTION;
|
|
192
|
+
activation = { ...activation, ...updated };
|
|
193
|
+
attempt.head = updated.head;
|
|
194
|
+
attempt.call = updated.call;
|
|
195
|
+
}
|
|
179
196
|
if (decision.action === "recall_memory") {
|
|
180
197
|
attempt.failureStage = "recall_memory";
|
|
181
198
|
await performRootMemoryRecall({
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { RoleCallLedgerCommit } from "../orchestration/role-calls/index.js";
|
|
2
|
+
import { type RequestPlanClientEvent, type RequestPlanEventPresentation } from "./plan-event-projection.js";
|
|
3
|
+
export declare function projectRootWorkPlanCommit(commit: RoleCallLedgerCommit, presentation: RequestPlanEventPresentation<RequestPlanClientEvent>): readonly RequestPlanClientEvent[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { projectRequestPlanCommit, } from "./plan-event-projection.js";
|
|
2
|
+
export function projectRootWorkPlanCommit(commit, presentation) {
|
|
3
|
+
if (commit.effect.type !== "model_work_plan_updated")
|
|
4
|
+
return [];
|
|
5
|
+
return projectRequestPlanCommit({
|
|
6
|
+
previousState: projectRootPlanState(commit.previousHead.state),
|
|
7
|
+
state: projectRootPlanState(commit.head.state),
|
|
8
|
+
presentation,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function projectRootPlanState(state) {
|
|
12
|
+
const plan = state.calls.find((call) => call.callId === state.rootCallId)?.adoptedWorkPlan;
|
|
13
|
+
if (!plan)
|
|
14
|
+
return {};
|
|
15
|
+
// Namespace only presentation IDs; canonical graph node identifiers retain their exact bounds.
|
|
16
|
+
const itemId = (localId) => `${plan.sourceResultRef}:${localId}`;
|
|
17
|
+
return {
|
|
18
|
+
plan: {
|
|
19
|
+
definition: {
|
|
20
|
+
summary: plan.definition.summary,
|
|
21
|
+
items: plan.definition.items.map((item) => ({
|
|
22
|
+
itemId: itemId(item.itemId),
|
|
23
|
+
title: item.title,
|
|
24
|
+
})),
|
|
25
|
+
},
|
|
26
|
+
itemStates: plan.itemStates.map((item) => ({
|
|
27
|
+
itemId: itemId(item.itemId),
|
|
28
|
+
status: item.status,
|
|
29
|
+
})),
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type RoleCallFrame, type RoleCallLedger, type RoleCallLedgerHead } from "../orchestration/role-calls/index.js";
|
|
2
|
+
import type { ModelWorkPlanUpdate } from "../orchestration/role-calls/work-plan-contracts.js";
|
|
3
|
+
import type { RequestExecutionScope } from "./execution-scope.js";
|
|
4
|
+
/** Commit the model's declaration, not the eventual outcome of its paired action. */
|
|
5
|
+
export declare function applyRootModelWorkPlan(params: {
|
|
6
|
+
request: RequestExecutionScope;
|
|
7
|
+
ledger: RoleCallLedger;
|
|
8
|
+
head: RoleCallLedgerHead;
|
|
9
|
+
call: RoleCallFrame;
|
|
10
|
+
steeringVersion: number;
|
|
11
|
+
update: ModelWorkPlanUpdate;
|
|
12
|
+
}): Promise<Readonly<{
|
|
13
|
+
head: RoleCallLedgerHead;
|
|
14
|
+
call: RoleCallFrame;
|
|
15
|
+
}> | undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolveRoleCallTransactions, } from "../orchestration/role-calls/index.js";
|
|
2
|
+
import { resolveRequestSteeringInbox } from "./request-steering.js";
|
|
3
|
+
/** Commit the model's declaration, not the eventual outcome of its paired action. */
|
|
4
|
+
export async function applyRootModelWorkPlan(params) {
|
|
5
|
+
params.request.abortSignal.throwIfAborted();
|
|
6
|
+
const steering = resolveRequestSteeringInbox(params.request.requestSteering);
|
|
7
|
+
if (!steering.isCurrent(params.steeringVersion))
|
|
8
|
+
return undefined;
|
|
9
|
+
const result = await resolveRoleCallTransactions(params.ledger).updateModelWorkPlan({
|
|
10
|
+
expectedHead: params.head,
|
|
11
|
+
callId: params.call.callId,
|
|
12
|
+
invocationAttempt: params.call.activationCount,
|
|
13
|
+
update: params.update,
|
|
14
|
+
});
|
|
15
|
+
if (!result.ok)
|
|
16
|
+
throw new Error(`role_call_ledger_rejected:${result.issueCode}`);
|
|
17
|
+
const head = result.commit.head;
|
|
18
|
+
const call = head.state.calls.find((candidate) => candidate.callId === params.call.callId);
|
|
19
|
+
return { head, call };
|
|
20
|
+
}
|
|
@@ -6,6 +6,7 @@ import type { ExecutionPolicyAuthoritySnapshot } from "../orchestration/role-cal
|
|
|
6
6
|
import type { RequestCapabilityCompositionView, RequestCapabilityExecutionView } from "./execution-scope.js";
|
|
7
7
|
type RequestWorkerCapabilityProviderParams<TRequest> = Readonly<{
|
|
8
8
|
request: TRequest;
|
|
9
|
+
requestWorkingDirectory?: string;
|
|
9
10
|
executionPolicyAuthority?: ExecutionPolicyAuthoritySnapshot;
|
|
10
11
|
requestAttachments?: readonly ToolRequestAttachment[];
|
|
11
12
|
runtimeConfig?: RuntimeConfig;
|
|
@@ -14,6 +14,8 @@ export function createRequestWorkerCapabilityProvider(params) {
|
|
|
14
14
|
function getRequestToolRegistry() {
|
|
15
15
|
requestToolRegistry ??= createRequestRuntimeToolRegistry({
|
|
16
16
|
request: params.request,
|
|
17
|
+
requestWorkingDirectory: params.requestWorkingDirectory,
|
|
18
|
+
toolPermissionMode: params.request.toolPermissionMode,
|
|
17
19
|
...(params.requestAttachments
|
|
18
20
|
? { requestAttachments: params.requestAttachments }
|
|
19
21
|
: {}),
|
|
@@ -5,6 +5,7 @@ export declare function createRuntimeEnvironment(config: RuntimeConfig, override
|
|
|
5
5
|
services: Readonly<{
|
|
6
6
|
config: RuntimeConfig;
|
|
7
7
|
sessions: import("./ports.js").SessionStore;
|
|
8
|
+
projects?: import("./projects/contracts.js").RuntimeProjectService;
|
|
8
9
|
attachments: import("./index.js").RuntimeAttachmentStore;
|
|
9
10
|
tools: import("./ports.js").ToolRegistry;
|
|
10
11
|
models: import("./ports.js").ModelGatewayClient;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRuntimeProjectService } from "./projects/service.js";
|
|
1
2
|
import { createDefaultAttachmentStore, createDefaultEventSinkFactory, createDefaultModelGatewayClient, createDefaultLongTermMemoryService, createDefaultSessionStore, createDefaultToolRegistry, } from "./default-environment-adapters.js";
|
|
2
3
|
import { createBoundRuntimeRequestHandler } from "./request/bound-runtime-handler.js";
|
|
3
4
|
import { createModelSessionMemoryCompactor } from "./context/session-memory/index.js";
|
|
@@ -35,6 +36,7 @@ export function createRuntimeEnvironment(config, overrides = {}) {
|
|
|
35
36
|
const services = Object.freeze({
|
|
36
37
|
config,
|
|
37
38
|
sessions: sessionLifecycle.store,
|
|
39
|
+
projects: createRuntimeProjectService(config, sessionLifecycle.store),
|
|
38
40
|
attachments,
|
|
39
41
|
tools,
|
|
40
42
|
models,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AuditorAssignment, AuditorDecision } from "./contracts.js";
|
|
2
|
+
export declare const AUDITOR_ADVISORY_KIND = "runtime_execution_agent_auditor_advisory_v1";
|
|
3
|
+
declare const EVIDENCE_BINDING_KIND = "runtime_auditor_evidence_binding_v1";
|
|
4
|
+
export type AuditorAdvisoryReceipt = Readonly<{
|
|
5
|
+
auditId: string;
|
|
6
|
+
verdict: "pass" | "gaps" | "needs_evidence" | "failed";
|
|
7
|
+
requestedEvidenceIds: readonly string[];
|
|
8
|
+
evidenceBinding: Readonly<{
|
|
9
|
+
kind: typeof EVIDENCE_BINDING_KIND;
|
|
10
|
+
workFingerprint: string;
|
|
11
|
+
selectedEvidenceIds: readonly string[];
|
|
12
|
+
bundleFingerprint: string | null;
|
|
13
|
+
}>;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function settleAuditorAdvisory(assignment: AuditorAssignment, decision: AuditorDecision): Readonly<{
|
|
16
|
+
kind: "terminal";
|
|
17
|
+
outcome: "failed";
|
|
18
|
+
summary: string;
|
|
19
|
+
}> | Readonly<{
|
|
20
|
+
kind: "terminal";
|
|
21
|
+
outcome: "completed";
|
|
22
|
+
summary: string;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function serializeAuditorAdvisory(assignment: AuditorAssignment, decision: AuditorDecision): string;
|
|
25
|
+
export declare function isAuditorAdvisorySummaryAdmissible(summary: string): boolean;
|
|
26
|
+
export declare function failedAuditorAdvisory(assignment: AuditorAssignment, reason: string): Readonly<{
|
|
27
|
+
kind: "terminal";
|
|
28
|
+
outcome: "failed";
|
|
29
|
+
summary: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function readAuditorAdvisoryReceipt(summary: string): AuditorAdvisoryReceipt | undefined;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ROLE_CALL_RESULT_MAX_LENGTH } from "../../orchestration/role-calls/index.js";
|
|
2
|
+
import { fingerprintAuditorBundle } from "./evidence-inventory.js";
|
|
3
|
+
export const AUDITOR_ADVISORY_KIND = "runtime_execution_agent_auditor_advisory_v1";
|
|
4
|
+
const EVIDENCE_BINDING_KIND = "runtime_auditor_evidence_binding_v1";
|
|
5
|
+
export function settleAuditorAdvisory(assignment, decision) {
|
|
6
|
+
const summary = serializeAuditorAdvisory(assignment, decision);
|
|
7
|
+
if (!isAuditorAdvisorySummaryAdmissible(summary)) {
|
|
8
|
+
return failedAuditorAdvisory(assignment, "auditor_result_not_admissible");
|
|
9
|
+
}
|
|
10
|
+
return Object.freeze({
|
|
11
|
+
kind: "terminal",
|
|
12
|
+
outcome: "completed",
|
|
13
|
+
summary,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function serializeAuditorAdvisory(assignment, decision) {
|
|
17
|
+
return JSON.stringify({
|
|
18
|
+
kind: AUDITOR_ADVISORY_KIND,
|
|
19
|
+
authority: "model_advisory",
|
|
20
|
+
presenceEffect: "passive_result_not_execution_or_completion",
|
|
21
|
+
...decision,
|
|
22
|
+
evidenceBinding: binding(assignment),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export function isAuditorAdvisorySummaryAdmissible(summary) {
|
|
26
|
+
return summary.length <= ROLE_CALL_RESULT_MAX_LENGTH;
|
|
27
|
+
}
|
|
28
|
+
export function failedAuditorAdvisory(assignment, reason) {
|
|
29
|
+
return Object.freeze({
|
|
30
|
+
kind: "terminal",
|
|
31
|
+
outcome: "failed",
|
|
32
|
+
summary: JSON.stringify({
|
|
33
|
+
kind: AUDITOR_ADVISORY_KIND,
|
|
34
|
+
authority: "runtime_validation",
|
|
35
|
+
presenceEffect: "passive_result_not_execution_or_completion",
|
|
36
|
+
auditId: assignment.auditId,
|
|
37
|
+
verdict: "failed",
|
|
38
|
+
requestedEvidenceIds: [],
|
|
39
|
+
reason,
|
|
40
|
+
evidenceBinding: binding(assignment),
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export function readAuditorAdvisoryReceipt(summary) {
|
|
45
|
+
let value;
|
|
46
|
+
try {
|
|
47
|
+
value = JSON.parse(summary);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
if (!isRecord(value) || value.kind !== AUDITOR_ADVISORY_KIND)
|
|
53
|
+
return undefined;
|
|
54
|
+
if (typeof value.auditId !== "string")
|
|
55
|
+
return undefined;
|
|
56
|
+
if (!isAuditorVerdict(value.verdict))
|
|
57
|
+
return undefined;
|
|
58
|
+
if (!hasAdvisoryAuthority(value.authority, value.verdict))
|
|
59
|
+
return undefined;
|
|
60
|
+
if (!isStringArray(value.requestedEvidenceIds))
|
|
61
|
+
return undefined;
|
|
62
|
+
const source = value.evidenceBinding;
|
|
63
|
+
if (!isRecord(source) || source.kind !== EVIDENCE_BINDING_KIND)
|
|
64
|
+
return undefined;
|
|
65
|
+
if (typeof source.workFingerprint !== "string")
|
|
66
|
+
return undefined;
|
|
67
|
+
if (!isStringArray(source.selectedEvidenceIds))
|
|
68
|
+
return undefined;
|
|
69
|
+
const expectedBundle = source.selectedEvidenceIds.length > 0
|
|
70
|
+
? fingerprintAuditorBundle(source.workFingerprint, source.selectedEvidenceIds)
|
|
71
|
+
: null;
|
|
72
|
+
if (source.bundleFingerprint !== expectedBundle)
|
|
73
|
+
return undefined;
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
function binding(assignment) {
|
|
77
|
+
return Object.freeze({
|
|
78
|
+
kind: EVIDENCE_BINDING_KIND,
|
|
79
|
+
workFingerprint: assignment.workFingerprint,
|
|
80
|
+
selectedEvidenceIds: assignment.selectedEvidenceIds,
|
|
81
|
+
bundleFingerprint: assignment.selectedEvidenceIds.length > 0
|
|
82
|
+
? fingerprintAuditorBundle(assignment.workFingerprint, assignment.selectedEvidenceIds)
|
|
83
|
+
: null,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function isAuditorVerdict(value) {
|
|
87
|
+
return (value === "pass" ||
|
|
88
|
+
value === "gaps" ||
|
|
89
|
+
value === "needs_evidence" ||
|
|
90
|
+
value === "failed");
|
|
91
|
+
}
|
|
92
|
+
function hasAdvisoryAuthority(authority, verdict) {
|
|
93
|
+
if (verdict === "failed")
|
|
94
|
+
return authority === "runtime_validation";
|
|
95
|
+
return authority === "model_advisory";
|
|
96
|
+
}
|
|
97
|
+
function isStringArray(value) {
|
|
98
|
+
if (!Array.isArray(value))
|
|
99
|
+
return false;
|
|
100
|
+
if (!value.every((item) => typeof item === "string"))
|
|
101
|
+
return false;
|
|
102
|
+
return new Set(value).size === value.length;
|
|
103
|
+
}
|
|
104
|
+
function isRecord(value) {
|
|
105
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
106
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ROLE_CALL_RESULT_MAX_LENGTH } from "../../orchestration/role-calls/index.js";
|
|
2
|
+
import { serializeAuditorAdvisory } from "./advisory-receipt.js";
|
|
3
|
+
import { AUDITOR_DECISION_TEXT_MAX_LENGTH, } from "./contracts.js";
|
|
4
|
+
// JSON uses at most six UTF-16 units per Unicode code point, including escapes.
|
|
5
|
+
const JSON_STRING_MAX_ESCAPE_CHARS_PER_CODE_POINT = 6;
|
|
6
|
+
export class AuditorAdvisoryCapacityError extends Error {
|
|
7
|
+
constructor() {
|
|
8
|
+
super("auditor_result_metadata_exceeds_budget");
|
|
9
|
+
this.name = "AuditorAdvisoryCapacityError";
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function getAuditorAdvisoryDescriptionMaxLength(assignment) {
|
|
13
|
+
const ids = assignment.inventory.map(({ executionId }) => executionId);
|
|
14
|
+
// All IDs in one partition is at least as large as any valid split. Reserving
|
|
15
|
+
// every ID in the requested bundle preserves every offered evidence choice.
|
|
16
|
+
const reservedEnvelope = serializeAuditorAdvisory(assignment, {
|
|
17
|
+
auditId: assignment.auditId,
|
|
18
|
+
verdict: "needs_evidence",
|
|
19
|
+
criterionIds: assignment.criterionIds,
|
|
20
|
+
gaps: assignment.criterionIds.map((criterionId) => ({
|
|
21
|
+
criterionId,
|
|
22
|
+
description: "",
|
|
23
|
+
})),
|
|
24
|
+
neededEvidenceIds: ids,
|
|
25
|
+
notNeededEvidenceIds: [],
|
|
26
|
+
requestedEvidenceIds: ids,
|
|
27
|
+
});
|
|
28
|
+
const remainingChars = ROLE_CALL_RESULT_MAX_LENGTH - reservedEnvelope.length;
|
|
29
|
+
const escapedCharsPerDescriptionUnit = JSON_STRING_MAX_ESCAPE_CHARS_PER_CODE_POINT *
|
|
30
|
+
assignment.criterionIds.length;
|
|
31
|
+
const maxLength = Math.min(AUDITOR_DECISION_TEXT_MAX_LENGTH, Math.floor(remainingChars / escapedCharsPerDescriptionUnit));
|
|
32
|
+
if (!hasAuditorDescriptionCapacity(maxLength))
|
|
33
|
+
throw new AuditorAdvisoryCapacityError();
|
|
34
|
+
return maxLength;
|
|
35
|
+
}
|
|
36
|
+
function hasAuditorDescriptionCapacity(maxLength) {
|
|
37
|
+
if (!Number.isSafeInteger(maxLength))
|
|
38
|
+
return false;
|
|
39
|
+
return maxLength >= 1;
|
|
40
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RoleCallLedgerHead } from "../../orchestration/role-calls/index.js";
|
|
2
|
+
import { type AuditorCapabilityEvidence } from "./contracts.js";
|
|
3
|
+
export type AuditorInputState = Readonly<{
|
|
4
|
+
available: boolean;
|
|
5
|
+
reason: string;
|
|
6
|
+
workFingerprint: string;
|
|
7
|
+
pendingEvidenceIds: readonly string[] | null;
|
|
8
|
+
reviewedBundleFingerprints: readonly string[];
|
|
9
|
+
reviewedEvidenceBundles: readonly (readonly string[])[];
|
|
10
|
+
reviewedBundleCount: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function projectAuditorInputState(head: RoleCallLedgerHead, callerCallId: string, steeringVersion: number, criterionIds?: readonly string[], suppliedEvidence?: readonly AuditorCapabilityEvidence[]): AuditorInputState;
|