@abot-ai/runtime 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/scripts/init-runtime.js +4 -13
- package/dist/scripts/runtime-setup-directories.d.ts +2 -0
- package/dist/scripts/runtime-setup-directories.js +38 -0
- package/dist/src/bridge/request-steering.d.ts +2 -1
- package/dist/src/bridge/request-steering.js +4 -2
- package/dist/src/bridge/runtime-replay.js +2 -19
- package/dist/src/bridge/start-agent-bridge.js +1 -1
- package/dist/src/capabilities/normal-invocation/validator.js +1 -1
- package/dist/src/capabilities/tool-definition-validator/event-presentation.js +3 -0
- package/dist/src/capabilities/tool-definition-validator/event-result-metadata.d.ts +2 -0
- package/dist/src/capabilities/tool-definition-validator/event-result-metadata.js +74 -0
- package/dist/src/capabilities/tool-event-metadata.js +3 -0
- package/dist/src/capabilities/tool-result-event-projection.d.ts +3 -0
- package/dist/src/capabilities/tool-result-event-projection.js +82 -0
- package/dist/src/capabilities/tool-types.d.ts +5 -0
- package/dist/src/cli/abot.js +2 -11
- package/dist/src/runtime/adapters/in-memory-session-store.js +1 -0
- package/dist/src/runtime/adapters/long-term-memory/file-lock/acquisition.js +11 -2
- package/dist/src/runtime/adapters/long-term-memory/file-lock/contracts.d.ts +2 -0
- package/dist/src/runtime/adapters/long-term-memory/file-lock/synchronous-release.d.ts +2 -0
- package/dist/src/runtime/adapters/long-term-memory/file-lock/synchronous-release.js +40 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/approval.d.ts +3 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/approval.js +9 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/rejection-event.d.ts +13 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/rejection-event.js +25 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/run.js +18 -2
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/executor.js +8 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/payload/lifecycle.js +7 -3
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/shared/contracts.d.ts +17 -2
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/shared/event-metadata.d.ts +9 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/shared/event-metadata.js +8 -0
- package/dist/src/runtime/adapters/registered-tool-worker-capabilities/execution.js +16 -1
- package/dist/src/runtime/adapters/registered-tool-worker-capabilities/payload-observability.js +2 -2
- package/dist/src/runtime/adapters/scheduled-request-outcome.d.ts +11 -0
- package/dist/src/runtime/adapters/scheduled-request-outcome.js +41 -0
- package/dist/src/runtime/adapters/scheduler-runtime.d.ts +19 -0
- package/dist/src/runtime/adapters/scheduler-runtime.js +138 -0
- package/dist/src/runtime/capabilities/scheduling/create-operations.d.ts +55 -0
- package/dist/src/runtime/capabilities/scheduling/create-operations.js +30 -0
- package/dist/src/runtime/capabilities/scheduling/create-time-zone.d.ts +1 -0
- package/dist/src/runtime/capabilities/scheduling/create-time-zone.js +11 -0
- package/dist/src/runtime/capabilities/scheduling/job-list-page.d.ts +25 -0
- package/dist/src/runtime/capabilities/scheduling/job-list-page.js +40 -0
- package/dist/src/runtime/capabilities/scheduling/model-validation.d.ts +2 -0
- package/dist/src/runtime/capabilities/scheduling/model-validation.js +15 -0
- package/dist/src/runtime/capabilities/scheduling/tool-contract.d.ts +2 -0
- package/dist/src/runtime/capabilities/scheduling/tool-contract.js +35 -0
- package/dist/src/runtime/capabilities/scheduling/tool-input-properties.d.ts +43 -0
- package/dist/src/runtime/capabilities/scheduling/tool-input-properties.js +27 -0
- package/dist/src/runtime/capabilities/scheduling/tool-module.d.ts +4 -0
- package/dist/src/runtime/capabilities/scheduling/tool-module.js +158 -0
- package/dist/src/runtime/capabilities/scheduling/update-operations.d.ts +2 -0
- package/dist/src/runtime/capabilities/scheduling/update-operations.js +49 -0
- package/dist/src/runtime/composition.d.ts +23 -3
- package/dist/src/runtime/composition.js +12 -17
- package/dist/src/runtime/config/environment-paths.d.ts +10 -0
- package/dist/src/runtime/config/environment-paths.js +31 -0
- package/dist/src/runtime/config/environment-storage.d.ts +9 -0
- package/dist/src/runtime/config/environment-storage.js +65 -0
- package/dist/src/runtime/config/fields.js +7 -0
- package/dist/src/runtime/config/long-term-memory.js +15 -0
- package/dist/src/runtime/config/schema.js +8 -0
- package/dist/src/runtime/config.js +9 -5
- package/dist/src/runtime/context/scheduled-execution-context.d.ts +10 -0
- package/dist/src/runtime/context/scheduled-execution-context.js +52 -0
- package/dist/src/runtime/default-adapters.d.ts +3 -32
- package/dist/src/runtime/default-adapters.js +3 -270
- package/dist/src/runtime/default-environment-adapters.d.ts +19 -0
- package/dist/src/runtime/default-environment-adapters.js +144 -0
- package/dist/src/runtime/index.d.ts +5 -0
- package/dist/src/runtime/index.js +4 -0
- package/dist/src/runtime/local-application.d.ts +22 -0
- package/dist/src/runtime/local-application.js +81 -0
- package/dist/src/runtime/local-host/app-memory-dispatch.d.ts +11 -0
- package/dist/src/runtime/local-host/app-memory-dispatch.js +103 -0
- package/dist/src/runtime/local-host/app-owner.d.ts +4 -0
- package/dist/src/runtime/local-host/app-owner.js +119 -0
- package/dist/src/runtime/local-host/app-request-control.d.ts +24 -0
- package/dist/src/runtime/local-host/app-request-control.js +135 -0
- package/dist/src/runtime/local-host/app-service-dispatch.d.ts +5 -0
- package/dist/src/runtime/local-host/app-service-dispatch.js +64 -0
- package/dist/src/runtime/local-host/client-identity.d.ts +3 -0
- package/dist/src/runtime/local-host/client-identity.js +17 -0
- package/dist/src/runtime/local-host/client-memory.d.ts +7 -0
- package/dist/src/runtime/local-host/client-memory.js +54 -0
- package/dist/src/runtime/local-host/client-requests.d.ts +19 -0
- package/dist/src/runtime/local-host/client-requests.js +145 -0
- package/dist/src/runtime/local-host/client-services.d.ts +10 -0
- package/dist/src/runtime/local-host/client-services.js +14 -0
- package/dist/src/runtime/local-host/contracts.d.ts +36 -0
- package/dist/src/runtime/local-host/contracts.js +1 -0
- package/dist/src/runtime/local-host/endpoint.d.ts +7 -0
- package/dist/src/runtime/local-host/endpoint.js +79 -0
- package/dist/src/runtime/local-host/owner-activity.d.ts +10 -0
- package/dist/src/runtime/local-host/owner-activity.js +30 -0
- package/dist/src/runtime/local-host/owner-retirement.d.ts +3 -0
- package/dist/src/runtime/local-host/owner-retirement.js +15 -0
- package/dist/src/runtime/local-host/owner-server.d.ts +6 -0
- package/dist/src/runtime/local-host/owner-server.js +88 -0
- package/dist/src/runtime/local-host/private-access.d.ts +2 -0
- package/dist/src/runtime/local-host/private-access.js +16 -0
- package/dist/src/runtime/local-host/private-directory.d.ts +1 -0
- package/dist/src/runtime/local-host/private-directory.js +57 -0
- package/dist/src/runtime/local-host/rpc-peer.d.ts +22 -0
- package/dist/src/runtime/local-host/rpc-peer.js +168 -0
- package/dist/src/runtime/local-host/rpc-protocol.d.ts +21 -0
- package/dist/src/runtime/local-host/rpc-protocol.js +46 -0
- package/dist/src/runtime/local-host/startup-connection.d.ts +5 -0
- package/dist/src/runtime/local-host/startup-connection.js +72 -0
- package/dist/src/runtime/local-host/transport.d.ts +3 -0
- package/dist/src/runtime/local-host/transport.js +88 -0
- package/dist/src/runtime/local-host/windows-private-access.d.ts +1 -0
- package/dist/src/runtime/local-host/windows-private-access.js +51 -0
- package/dist/src/runtime/long-term-memory/onboarding/configuration.js +6 -0
- package/dist/src/runtime/long-term-memory/recall-binding.d.ts +3 -0
- package/dist/src/runtime/long-term-memory/recall-binding.js +27 -0
- package/dist/src/runtime/long-term-memory/recall-context.d.ts +20 -0
- package/dist/src/runtime/long-term-memory/recall-context.js +101 -0
- package/dist/src/runtime/long-term-memory/recall-continuation.d.ts +8 -0
- package/dist/src/runtime/long-term-memory/recall-continuation.js +36 -0
- package/dist/src/runtime/long-term-memory/recall-policy.d.ts +7 -0
- package/dist/src/runtime/long-term-memory/recall-policy.js +14 -0
- package/dist/src/runtime/long-term-memory/recall-result.d.ts +5 -0
- package/dist/src/runtime/long-term-memory/recall-result.js +54 -0
- package/dist/src/runtime/long-term-memory/repository-state.d.ts +2 -1
- package/dist/src/runtime/long-term-memory/repository-state.js +2 -2
- package/dist/src/runtime/model/invoke-raw-step.d.ts +1 -0
- package/dist/src/runtime/model/invoke-raw-step.js +1 -0
- package/dist/src/runtime/model/invoke-step.js +6 -0
- package/dist/src/runtime/model/invoke-structured-step.d.ts +1 -0
- package/dist/src/runtime/model/invoke-structured-step.js +1 -0
- package/dist/src/runtime/model/model-step-port.d.ts +2 -0
- package/dist/src/runtime/model/model-step-steering.d.ts +8 -0
- package/dist/src/runtime/model/model-step-steering.js +19 -0
- package/dist/src/runtime/orchestration/final-response/authoring-contract.js +1 -1
- package/dist/src/runtime/orchestration/final-response/invoke.d.ts +1 -0
- package/dist/src/runtime/orchestration/final-response/invoke.js +1 -0
- package/dist/src/runtime/orchestration/role-calls/activation-budget.js +1 -0
- package/dist/src/runtime/orchestration/role-calls/candidate-validation.js +9 -49
- package/dist/src/runtime/orchestration/role-calls/capability-selection-reconsideration.d.ts +9 -0
- package/dist/src/runtime/orchestration/role-calls/capability-selection-reconsideration.js +17 -8
- package/dist/src/runtime/orchestration/role-calls/capability-selection-supervision-validation.d.ts +2 -0
- package/dist/src/runtime/orchestration/role-calls/capability-selection-supervision-validation.js +62 -0
- package/dist/src/runtime/orchestration/role-calls/command-decoder.js +4 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/memory-recall-transitions.d.ts +4 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/memory-recall-transitions.js +89 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch.js +5 -0
- package/dist/src/runtime/orchestration/role-calls/contracts.d.ts +9 -7
- package/dist/src/runtime/orchestration/role-calls/contracts.js +2 -2
- package/dist/src/runtime/orchestration/role-calls/diagnostics.js +3 -0
- package/dist/src/runtime/orchestration/role-calls/index.d.ts +1 -0
- package/dist/src/runtime/orchestration/role-calls/index.js +1 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-contract.d.ts +51 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-contract.js +4 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-decoder.d.ts +6 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-decoder.js +147 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-diagnostics.d.ts +5 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-diagnostics.js +27 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-state-validation.d.ts +3 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-state-validation.js +121 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-transactions.d.ts +3 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-transactions.js +44 -0
- package/dist/src/runtime/orchestration/role-calls/reducer.js +1 -0
- package/dist/src/runtime/orchestration/role-calls/transaction-effect.d.ts +5 -0
- package/dist/src/runtime/orchestration/role-calls/transaction-effect.js +14 -0
- package/dist/src/runtime/orchestration/role-calls/transactions.js +3 -24
- package/dist/src/runtime/plugins/manifest-validator.js +4 -1
- package/dist/src/runtime/ports.d.ts +4 -0
- package/dist/src/runtime/request/bound-runtime-handler.d.ts +2 -0
- package/dist/src/runtime/request/bound-runtime-handler.js +25 -0
- package/dist/src/runtime/request/contracts.d.ts +6 -0
- package/dist/src/runtime/request/execution-agent-root-execution.js +12 -0
- package/dist/src/runtime/request/execution-facets.js +6 -0
- package/dist/src/runtime/request/execution-scope-surfaces.js +10 -0
- package/dist/src/runtime/request/execution-scope.d.ts +1 -1
- package/dist/src/runtime/request/handler.js +6 -0
- package/dist/src/runtime/request/root-contract.d.ts +7 -1
- package/dist/src/runtime/request/root-execution-kernel.js +33 -37
- package/dist/src/runtime/request/root-memory-recall.d.ts +11 -0
- package/dist/src/runtime/request/root-memory-recall.js +71 -0
- package/dist/src/runtime/request/root-observation-handoff.d.ts +17 -0
- package/dist/src/runtime/request/root-observation-handoff.js +44 -0
- package/dist/src/runtime/request/scheduled-execution.d.ts +9 -0
- package/dist/src/runtime/request/scheduled-execution.js +32 -0
- package/dist/src/runtime/request/session-admission.d.ts +17 -0
- package/dist/src/runtime/request/session-admission.js +88 -0
- package/dist/src/runtime/request/supervisor-root-execution-diagnostics.d.ts +1 -1
- package/dist/src/runtime/request/supervisor-root-execution.js +8 -0
- package/dist/src/runtime/runtime-environment.d.ts +31 -0
- package/dist/src/runtime/runtime-environment.js +102 -0
- package/dist/src/runtime/runtime-host-environment.d.ts +8 -0
- package/dist/src/runtime/runtime-host-environment.js +57 -0
- package/dist/src/runtime/runtime-host-lifecycle.d.ts +4 -0
- package/dist/src/runtime/runtime-host-lifecycle.js +64 -0
- package/dist/src/runtime/runtime-host-scheduler-ownership.d.ts +5 -0
- package/dist/src/runtime/runtime-host-scheduler-ownership.js +67 -0
- package/dist/src/runtime/runtime-host.d.ts +19 -0
- package/dist/src/runtime/runtime-host.js +63 -0
- package/dist/src/runtime/scheduler/calendar-time.d.ts +10 -0
- package/dist/src/runtime/scheduler/calendar-time.js +58 -0
- package/dist/src/runtime/scheduler/contracts.d.ts +143 -0
- package/dist/src/runtime/scheduler/contracts.js +1 -0
- package/dist/src/runtime/scheduler/file-store.d.ts +2 -0
- package/dist/src/runtime/scheduler/file-store.js +76 -0
- package/dist/src/runtime/scheduler/instant-validation.d.ts +4 -0
- package/dist/src/runtime/scheduler/instant-validation.js +69 -0
- package/dist/src/runtime/scheduler/interval-range.d.ts +8 -0
- package/dist/src/runtime/scheduler/interval-range.js +24 -0
- package/dist/src/runtime/scheduler/job-management.d.ts +8 -0
- package/dist/src/runtime/scheduler/job-management.js +212 -0
- package/dist/src/runtime/scheduler/journal-checkpoint.d.ts +9 -0
- package/dist/src/runtime/scheduler/journal-checkpoint.js +45 -0
- package/dist/src/runtime/scheduler/journal-durability.d.ts +8 -0
- package/dist/src/runtime/scheduler/journal-durability.js +59 -0
- package/dist/src/runtime/scheduler/journal-files.d.ts +14 -0
- package/dist/src/runtime/scheduler/journal-files.js +59 -0
- package/dist/src/runtime/scheduler/journal-head.d.ts +21 -0
- package/dist/src/runtime/scheduler/journal-head.js +81 -0
- package/dist/src/runtime/scheduler/journal-index-state.d.ts +31 -0
- package/dist/src/runtime/scheduler/journal-index-state.js +137 -0
- package/dist/src/runtime/scheduler/journal-index.d.ts +22 -0
- package/dist/src/runtime/scheduler/journal-index.js +195 -0
- package/dist/src/runtime/scheduler/journal-store.d.ts +21 -0
- package/dist/src/runtime/scheduler/journal-store.js +184 -0
- package/dist/src/runtime/scheduler/journal-transaction.d.ts +14 -0
- package/dist/src/runtime/scheduler/journal-transaction.js +104 -0
- package/dist/src/runtime/scheduler/next-occurrence.d.ts +3 -0
- package/dist/src/runtime/scheduler/next-occurrence.js +39 -0
- package/dist/src/runtime/scheduler/run-completion.d.ts +12 -0
- package/dist/src/runtime/scheduler/run-completion.js +77 -0
- package/dist/src/runtime/scheduler/run-list-query.d.ts +5 -0
- package/dist/src/runtime/scheduler/run-list-query.js +38 -0
- package/dist/src/runtime/scheduler/run-records.d.ts +6 -0
- package/dist/src/runtime/scheduler/run-records.js +41 -0
- package/dist/src/runtime/scheduler/schedule-update.d.ts +3 -0
- package/dist/src/runtime/scheduler/schedule-update.js +22 -0
- package/dist/src/runtime/scheduler/schedule-validation.d.ts +10 -0
- package/dist/src/runtime/scheduler/schedule-validation.js +132 -0
- package/dist/src/runtime/scheduler/scheduler-engine.d.ts +2 -0
- package/dist/src/runtime/scheduler/scheduler-engine.js +174 -0
- package/dist/src/runtime/scheduler/scheduler-service.d.ts +10 -0
- package/dist/src/runtime/scheduler/scheduler-service.js +115 -0
- package/dist/src/runtime/scheduler/service-context.d.ts +21 -0
- package/dist/src/runtime/scheduler/service-context.js +26 -0
- package/dist/src/runtime/scheduler/session-deletion-state.d.ts +9 -0
- package/dist/src/runtime/scheduler/session-deletion-state.js +30 -0
- package/dist/src/runtime/scheduler/snapshot-validation.d.ts +4 -0
- package/dist/src/runtime/scheduler/snapshot-validation.js +112 -0
- package/dist/src/runtime/scheduler/startup-recovery.d.ts +2 -0
- package/dist/src/runtime/scheduler/startup-recovery.js +38 -0
- package/dist/src/runtime/scheduler/validation-error.d.ts +4 -0
- package/dist/src/runtime/scheduler/validation-error.js +8 -0
- package/dist/src/runtime/scheduler/working-store.d.ts +3 -0
- package/dist/src/runtime/scheduler/working-store.js +8 -0
- package/dist/src/runtime/session/request-session.d.ts +1 -0
- package/dist/src/runtime/session/request-session.js +14 -1
- package/dist/src/runtime/session/session-attachment-deletion.d.ts +8 -0
- package/dist/src/runtime/session/session-attachment-deletion.js +87 -0
- package/dist/src/runtime/session/session-deletion-boundary.d.ts +10 -0
- package/dist/src/runtime/session/session-deletion-boundary.js +39 -0
- package/dist/src/runtime/session/session-deletion-cleanup.d.ts +7 -0
- package/dist/src/runtime/session/session-deletion-cleanup.js +62 -0
- package/dist/src/runtime/session/session-deletion-finalization.d.ts +7 -0
- package/dist/src/runtime/session/session-deletion-finalization.js +34 -0
- package/dist/src/runtime/session/session-deletion-receipts.d.ts +7 -0
- package/dist/src/runtime/session/session-deletion-receipts.js +18 -0
- package/dist/src/runtime/session/session-lifecycle-store.d.ts +21 -0
- package/dist/src/runtime/session/session-lifecycle-store.js +72 -0
- package/dist/src/runtime/session/session-mutation-queue.d.ts +3 -0
- package/dist/src/runtime/session/session-mutation-queue.js +15 -0
- package/dist/src/runtime/steps/execution-agent/capability-decision-parsing.d.ts +16 -0
- package/dist/src/runtime/steps/execution-agent/capability-decision-parsing.js +165 -0
- package/dist/src/runtime/steps/execution-agent/contracts.d.ts +3 -1
- package/dist/src/runtime/steps/execution-agent/decision-parsing.d.ts +2 -0
- package/dist/src/runtime/steps/execution-agent/decision-parsing.js +195 -0
- package/dist/src/runtime/steps/execution-agent/decision-validation.d.ts +30 -0
- package/dist/src/runtime/steps/execution-agent/decision-validation.js +127 -0
- package/dist/src/runtime/steps/execution-agent/format.d.ts +1 -0
- package/dist/src/runtime/steps/execution-agent/format.js +12 -0
- package/dist/src/runtime/steps/execution-agent/input.d.ts +2 -1
- package/dist/src/runtime/steps/execution-agent/input.js +17 -2
- package/dist/src/runtime/steps/execution-agent/parser.d.ts +1 -2
- package/dist/src/runtime/steps/execution-agent/parser.js +1 -472
- package/dist/src/runtime/steps/execution-agent/prompt.d.ts +2 -0
- package/dist/src/runtime/steps/execution-agent/prompt.js +2 -0
- package/dist/src/runtime/steps/execution-agent/reconsideration-context.js +4 -3
- package/dist/src/runtime/steps/execution-agent/response-input.js +5 -4
- package/dist/src/runtime/steps/execution-agent/response-run.d.ts +3 -0
- package/dist/src/runtime/steps/execution-agent/response-run.js +7 -3
- package/dist/src/runtime/steps/execution-agent/run.d.ts +2 -0
- package/dist/src/runtime/steps/execution-agent/run.js +2 -0
- package/dist/src/runtime/steps/execution-agent/state-context.d.ts +2 -1
- package/dist/src/runtime/steps/execution-agent/state-context.js +13 -5
- package/dist/src/runtime/steps/memory-recall-decision.d.ts +30 -0
- package/dist/src/runtime/steps/memory-recall-decision.js +101 -0
- package/dist/src/runtime/steps/memory-recall-prompt.d.ts +1 -0
- package/dist/src/runtime/steps/memory-recall-prompt.js +15 -0
- package/dist/src/runtime/steps/supervisor-decision/contracts.d.ts +4 -2
- package/dist/src/runtime/steps/supervisor-decision/diagnostics.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/diagnostics.js +13 -6
- package/dist/src/runtime/steps/supervisor-decision/format.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/format.js +41 -2
- package/dist/src/runtime/steps/supervisor-decision/input.d.ts +5 -1
- package/dist/src/runtime/steps/supervisor-decision/input.js +25 -5
- package/dist/src/runtime/steps/supervisor-decision/memory-recall-continuation.d.ts +10 -0
- package/dist/src/runtime/steps/supervisor-decision/memory-recall-continuation.js +32 -0
- package/dist/src/runtime/steps/supervisor-decision/parser.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/parser.js +36 -1
- package/dist/src/runtime/steps/supervisor-decision/prompt.d.ts +3 -0
- package/dist/src/runtime/steps/supervisor-decision/prompt.js +16 -8
- package/dist/src/runtime/steps/supervisor-decision/response-recommendation.d.ts +13 -0
- package/dist/src/runtime/steps/supervisor-decision/response-recommendation.js +32 -0
- package/dist/src/runtime/steps/supervisor-decision/resume.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/resume.js +13 -0
- package/dist/src/runtime/steps/supervisor-decision/run.d.ts +3 -0
- package/dist/src/runtime/steps/supervisor-decision/run.js +19 -0
- package/dist/src/runtime/steps/supervisor-decision/working-directory.js +7 -1
- package/dist/src/runtime/steps/supervisor-response/diagnostics.d.ts +1 -0
- package/dist/src/runtime/steps/supervisor-response/diagnostics.js +1 -0
- package/dist/src/runtime/steps/supervisor-response/input.d.ts +2 -1
- package/dist/src/runtime/steps/supervisor-response/input.js +17 -4
- package/dist/src/runtime/steps/supervisor-response/memory-authoring.d.ts +1 -0
- package/dist/src/runtime/steps/supervisor-response/memory-authoring.js +4 -0
- package/dist/src/runtime/steps/supervisor-response/prompt.d.ts +1 -0
- package/dist/src/runtime/steps/supervisor-response/prompt.js +8 -2
- package/dist/src/runtime/steps/supervisor-response/response-recommendation.d.ts +10 -0
- package/dist/src/runtime/steps/supervisor-response/response-recommendation.js +25 -0
- package/dist/src/runtime/steps/supervisor-response/run.d.ts +6 -1
- package/dist/src/runtime/steps/supervisor-response/run.js +26 -7
- package/dist/src/sessions/record/projection.js +1 -0
- package/dist/src/sessions/schedule-metadata.d.ts +8 -0
- package/dist/src/sessions/schedule-metadata.js +1 -0
- package/dist/src/sessions/session-service.d.ts +1 -0
- package/dist/src/sessions/session-service.js +1 -0
- package/dist/src/sessions/types.d.ts +2 -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/shared/http-server-shutdown.d.ts +4 -0
- package/dist/src/shared/http-server-shutdown.js +17 -0
- package/dist/src/shared/public-http/aggregate-gate.d.ts +3 -0
- package/dist/src/shared/public-http/aggregate-gate.js +87 -0
- package/dist/src/shared/public-http/deadline.d.ts +2 -0
- package/dist/src/shared/public-http/deadline.js +29 -0
- package/dist/src/shared/public-http/errors.d.ts +6 -0
- package/dist/src/shared/public-http/errors.js +11 -0
- package/dist/src/shared/public-http/limits.d.ts +8 -0
- package/dist/src/shared/public-http/limits.js +8 -0
- package/dist/src/shared/public-http/network-policy.d.ts +11 -0
- package/dist/src/shared/public-http/network-policy.js +178 -0
- package/dist/src/shared/public-http/public-http.d.ts +24 -0
- package/dist/src/shared/public-http/public-http.js +85 -0
- package/dist/src/shared/public-http/request-hop.d.ts +18 -0
- package/dist/src/shared/public-http/request-hop.js +140 -0
- package/dist/src/web-ui/app/ARCHITECTURE.md +66 -4
- package/dist/src/web-ui/app/app-bootstrap.js +53 -0
- package/dist/src/web-ui/app/app-dom.js +80 -0
- package/dist/src/web-ui/app/app.js +195 -212
- package/dist/src/web-ui/app/components/conversation-activity.d.ts +2 -0
- package/dist/src/web-ui/app/components/conversation-activity.js +34 -7
- package/dist/src/web-ui/app/components/conversation-role-cards.d.ts +1 -0
- package/dist/src/web-ui/app/components/conversation-role-cards.js +61 -5
- package/dist/src/web-ui/app/components/conversation-schedule.js +71 -0
- package/dist/src/web-ui/app/components/conversation-status.js +65 -0
- package/dist/src/web-ui/app/components/conversation-tools.d.ts +13 -0
- package/dist/src/web-ui/app/components/conversation-tools.js +284 -0
- package/dist/src/web-ui/app/components/conversation-view.js +39 -11
- package/dist/src/web-ui/app/components/dashboard/activity.js +61 -0
- package/dist/src/web-ui/app/components/dashboard/icons.js +23 -0
- package/dist/src/web-ui/app/components/dashboard/recent-conversations.js +64 -0
- package/dist/src/web-ui/app/components/dashboard/workspace.js +107 -0
- package/dist/src/web-ui/app/components/message-link-previews.d.ts +16 -0
- package/dist/src/web-ui/app/components/message-link-previews.js +179 -0
- package/dist/src/web-ui/app/components/schedules/details.js +101 -0
- package/dist/src/web-ui/app/components/schedules/form.d.ts +13 -0
- package/dist/src/web-ui/app/components/schedules/form.js +246 -0
- package/dist/src/web-ui/app/components/schedules/workspace-state.js +59 -0
- package/dist/src/web-ui/app/components/schedules/workspace.js +165 -0
- package/dist/src/web-ui/app/components/workspace-shell.js +48 -2
- package/dist/src/web-ui/app/configuration-feature.js +72 -0
- package/dist/src/web-ui/app/controllers/composer-attachments-controller.d.ts +1 -0
- package/dist/src/web-ui/app/controllers/composer-attachments-controller.js +17 -6
- package/dist/src/web-ui/app/controllers/composer-submit-controller.d.ts +2 -0
- package/dist/src/web-ui/app/controllers/composer-submit-controller.js +15 -1
- package/dist/src/web-ui/app/controllers/composer-surface-controller.js +58 -0
- package/dist/src/web-ui/app/controllers/composer-workspace-controller.d.ts +53 -0
- package/dist/src/web-ui/app/controllers/composer-workspace-controller.js +180 -0
- package/dist/src/web-ui/app/controllers/conversation-read-state-controller.d.ts +23 -0
- package/dist/src/web-ui/app/controllers/conversation-read-state-controller.js +82 -0
- package/dist/src/web-ui/app/controllers/conversation-session-controller.d.ts +8 -0
- package/dist/src/web-ui/app/controllers/conversation-session-controller.js +28 -39
- package/dist/src/web-ui/app/controllers/dashboard-controller.js +127 -0
- package/dist/src/web-ui/app/controllers/home-composer-feature.d.ts +40 -0
- package/dist/src/web-ui/app/controllers/home-composer-feature.js +119 -0
- package/dist/src/web-ui/app/controllers/home-conversation-activation.js +37 -0
- package/dist/src/web-ui/app/controllers/realtime-event-controller.d.ts +1 -0
- package/dist/src/web-ui/app/controllers/realtime-event-controller.js +74 -3
- package/dist/src/web-ui/app/controllers/runtime-selection-controller.d.ts +2 -1
- package/dist/src/web-ui/app/controllers/runtime-selection-controller.js +15 -14
- package/dist/src/web-ui/app/controllers/schedule-realtime.js +118 -0
- package/dist/src/web-ui/app/controllers/schedules-controller.js +421 -0
- package/dist/src/web-ui/app/controllers/session-controller.js +30 -3
- package/dist/src/web-ui/app/dashboard-feature.js +44 -0
- package/dist/src/web-ui/app/index.html +53 -1
- package/dist/src/web-ui/app/lib/composer-submission-scope.d.ts +21 -0
- package/dist/src/web-ui/app/lib/composer-submission-scope.js +13 -0
- package/dist/src/web-ui/app/lib/context-window-snapshot-order.d.ts +15 -0
- package/dist/src/web-ui/app/lib/context-window-snapshot-order.js +31 -0
- package/dist/src/web-ui/app/lib/conversation-role-model.d.ts +10 -1
- package/dist/src/web-ui/app/lib/conversation-role-model.js +97 -15
- package/dist/src/web-ui/app/lib/conversation-status-model.d.ts +12 -0
- package/dist/src/web-ui/app/lib/conversation-status-model.js +116 -0
- package/dist/src/web-ui/app/lib/dashboard-job-templates.js +41 -0
- package/dist/src/web-ui/app/lib/dashboard-presentation.js +126 -0
- package/dist/src/web-ui/app/lib/message-markdown.d.ts +5 -0
- package/dist/src/web-ui/app/lib/message-markdown.js +99 -0
- package/dist/src/web-ui/app/lib/message-url-policy.d.ts +1 -0
- package/dist/src/web-ui/app/lib/message-url-policy.js +13 -0
- package/dist/src/web-ui/app/lib/schedule-errors.js +29 -0
- package/dist/src/web-ui/app/lib/schedule-message.js +30 -0
- package/dist/src/web-ui/app/lib/schedule-presentation.js +81 -0
- package/dist/src/web-ui/app/lib/session-read-state.d.ts +22 -0
- package/dist/src/web-ui/app/lib/session-read-state.js +63 -0
- package/dist/src/web-ui/app/lib/text-format.js +2 -143
- package/dist/src/web-ui/app/lib/tool-activity-event.d.ts +26 -0
- package/dist/src/web-ui/app/lib/tool-activity-event.js +228 -0
- package/dist/src/web-ui/app/lib/tool-activity-model.d.ts +41 -0
- package/dist/src/web-ui/app/lib/tool-activity-model.js +255 -0
- package/dist/src/web-ui/app/lib/tool-timeline.d.ts +3 -0
- package/dist/src/web-ui/app/lib/tool-timeline.js +18 -0
- package/dist/src/web-ui/app/schedules-feature.js +87 -0
- package/dist/src/web-ui/app/services/message-link-preview-client.d.ts +14 -0
- package/dist/src/web-ui/app/services/message-link-preview-client.js +96 -0
- package/dist/src/web-ui/app/services/runtime-web-client/schedules.js +51 -0
- package/dist/src/web-ui/app/services/runtime-web-client.d.ts +37 -0
- package/dist/src/web-ui/app/services/runtime-web-client.js +13 -8
- package/dist/src/web-ui/app/styles/00-tokens-base.css +11 -11
- package/dist/src/web-ui/app/styles/18-dashboard.css +384 -0
- package/dist/src/web-ui/app/styles/20-chat-composer.css +1 -130
- package/dist/src/web-ui/app/styles/26-message-content.css +295 -0
- package/dist/src/web-ui/app/styles/27-conversation-tools.css +266 -0
- package/dist/src/web-ui/app/styles/28-conversation-status.css +52 -0
- package/dist/src/web-ui/app/styles/38-schedule-workspace.css +263 -0
- package/dist/src/web-ui/app/styles/38-schedules.css +352 -0
- package/dist/src/web-ui/app/styles/90-responsive.css +14 -0
- package/dist/src/web-ui/app/styles/91-schedules-responsive.css +72 -0
- package/dist/src/web-ui/app/styles/92-dashboard-responsive.css +88 -0
- package/dist/src/web-ui/app/styles.css +8 -0
- package/dist/src/web-ui/app/ui-behavior.d.ts +1 -1
- package/dist/src/web-ui/app/ui-behavior.js +3 -1
- package/dist/src/web-ui/app/vendor/README.md +15 -0
- package/dist/src/web-ui/app/vendor/markdown-it.LICENSE +22 -0
- package/dist/src/web-ui/app/vendor/markdown-it.js +3003 -0
- package/dist/src/web-ui/link-preview/metadata.d.ts +9 -0
- package/dist/src/web-ui/link-preview/metadata.js +97 -0
- package/dist/src/web-ui/link-preview/preview-cache.d.ts +4 -0
- package/dist/src/web-ui/link-preview/preview-cache.js +23 -0
- package/dist/src/web-ui/link-preview/raster-response.d.ts +9 -0
- package/dist/src/web-ui/link-preview/raster-response.js +49 -0
- package/dist/src/web-ui/link-preview/routes.d.ts +3 -0
- package/dist/src/web-ui/link-preview/routes.js +97 -0
- package/dist/src/web-ui/link-preview/service.d.ts +11 -0
- package/dist/src/web-ui/link-preview/service.js +117 -0
- package/dist/src/web-ui/local-runtime/api-router.d.ts +4 -1
- package/dist/src/web-ui/local-runtime/api-router.js +42 -73
- package/dist/src/web-ui/local-runtime/contracts.d.ts +2 -2
- package/dist/src/web-ui/local-runtime/environment-registry.d.ts +12 -1
- package/dist/src/web-ui/local-runtime/environment-registry.js +38 -3
- package/dist/src/web-ui/local-runtime/realtime-controller.js +3 -1
- package/dist/src/web-ui/local-runtime/request-execution.d.ts +5 -1
- package/dist/src/web-ui/local-runtime/request-execution.js +38 -2
- package/dist/src/web-ui/local-runtime/schedule-job-creation.d.ts +7 -0
- package/dist/src/web-ui/local-runtime/schedule-job-creation.js +62 -0
- package/dist/src/web-ui/local-runtime/schedule-management-routes.d.ts +30 -0
- package/dist/src/web-ui/local-runtime/schedule-management-routes.js +134 -0
- package/dist/src/web-ui/local-runtime/schedule-run-page.d.ts +5 -0
- package/dist/src/web-ui/local-runtime/schedule-run-page.js +23 -0
- package/dist/src/web-ui/local-runtime/session-routes.d.ts +17 -0
- package/dist/src/web-ui/local-runtime/session-routes.js +74 -0
- package/dist/src/web-ui/local-runtime-backend.d.ts +2 -0
- package/dist/src/web-ui/local-runtime-backend.js +11 -1
- package/dist/src/web-ui/schedule-creation-contract.d.ts +7 -0
- package/dist/src/web-ui/schedule-creation-contract.js +1 -0
- package/dist/src/web-ui/server-shutdown.d.ts +4 -0
- package/dist/src/web-ui/server-shutdown.js +32 -0
- package/dist/src/web-ui/server.js +13 -10
- package/dist/src/web-ui/session-read-state/availability.d.ts +16 -0
- package/dist/src/web-ui/session-read-state/availability.js +20 -0
- package/dist/src/web-ui/session-read-state/projection.d.ts +17 -0
- package/dist/src/web-ui/session-read-state/projection.js +71 -0
- package/dist/src/web-ui/session-read-state/service.d.ts +86 -0
- package/dist/src/web-ui/session-read-state/service.js +89 -0
- package/dist/src/web-ui/session-read-state/store.d.ts +22 -0
- package/dist/src/web-ui/session-read-state/store.js +110 -0
- package/docs/configuration.md +41 -1
- package/docs/long-term-memory.md +46 -5
- package/docs/plugins.md +15 -9
- package/docs/runtime-invariant-coverage.md +1 -1
- package/docs/runtime-library.md +23 -0
- package/docs/runtime-public-contracts.md +32 -1
- package/package.json +3 -1
- package/plugins/code-outline/plugin.json +15 -0
- package/plugins/document-reader/plugin.json +17 -0
- package/plugins/exec/plugin.json +3 -3
- package/plugins/exec/skills/exec_skill/SKILL.md +1 -1
- package/plugins/exec/source/process-manager.ts +1 -20
- package/plugins/exec/source/shell-platform.ts +29 -0
- package/plugins/exec/src/index.cjs +25 -18
- package/plugins/filesystem/plugin.json +17 -2
- package/plugins/filesystem/source/atomic-write.ts +9 -0
- package/plugins/filesystem/source/bounded-io.ts +5 -99
- package/plugins/filesystem/source/directory-authority-write.ts +64 -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/mutation-parent.ts +11 -0
- package/plugins/filesystem/src/index.cjs +693 -118
- package/plugins/json-inspector/plugin.json +12 -0
- package/plugins/local-search/plugin.json +12 -0
- 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/memory/plugin.json +26 -1
- package/plugins/memory/source/index.ts +10 -6
- package/plugins/memory/src/index.cjs +11 -7
- package/plugins/project-orientation/plugin.json +14 -0
- package/plugins/web/source/aggregate-gate.ts +8 -130
- package/plugins/web/source/deadline.ts +14 -50
- package/plugins/web/source/errors.ts +17 -11
- package/plugins/web/source/limits.ts +3 -6
- package/plugins/web/source/network-policy.ts +28 -226
- package/plugins/web/source/public-http.ts +17 -142
- package/plugins/web/source/request-hop.ts +11 -191
- package/plugins/web/src/index.cjs +119 -59
- package/runtime.config.schema.json +7 -0
- package/src/runtime/README.md +105 -1
- package/src/runtime/local-host/README.md +86 -0
- package/src/runtime/scheduler/README.md +166 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export function findAppDom(documentRoot = document) {
|
|
2
|
+
return {
|
|
3
|
+
app: documentRoot.getElementById("app"),
|
|
4
|
+
homeWorkspaceButton: documentRoot.getElementById("homeWorkspaceButton"),
|
|
5
|
+
homeWorkspacePanel: documentRoot.getElementById("homeWorkspacePanel"),
|
|
6
|
+
homeDashboardRoot: documentRoot.getElementById("homeDashboardRoot"),
|
|
7
|
+
chatWorkspaceButton: documentRoot.getElementById("chatWorkspaceButton"),
|
|
8
|
+
schedulesWorkspaceButton: documentRoot.getElementById(
|
|
9
|
+
"schedulesWorkspaceButton",
|
|
10
|
+
),
|
|
11
|
+
schedulesWorkspacePanel: documentRoot.getElementById(
|
|
12
|
+
"schedulesWorkspacePanel",
|
|
13
|
+
),
|
|
14
|
+
closeSchedulesWorkspaceButton: documentRoot.getElementById(
|
|
15
|
+
"closeSchedulesWorkspaceButton",
|
|
16
|
+
),
|
|
17
|
+
schedulesRoot: documentRoot.getElementById("schedulesRoot"),
|
|
18
|
+
configWorkspaceButton: documentRoot.getElementById("configWorkspaceButton"),
|
|
19
|
+
chatPanel: documentRoot.querySelector(".chat-panel"),
|
|
20
|
+
sessionsPanel: documentRoot.querySelector(".sessions-panel"),
|
|
21
|
+
configWorkspacePanel: documentRoot.getElementById("configWorkspacePanel"),
|
|
22
|
+
closeConfigWorkspaceButton: documentRoot.getElementById(
|
|
23
|
+
"closeConfigWorkspaceButton",
|
|
24
|
+
),
|
|
25
|
+
connectionLabel: documentRoot.getElementById("connectionLabel"),
|
|
26
|
+
environmentSelect: documentRoot.getElementById("environmentSelect"),
|
|
27
|
+
agentPickerButton: documentRoot.getElementById("agentPickerButton"),
|
|
28
|
+
agentPickerMenu: documentRoot.getElementById("agentPickerMenu"),
|
|
29
|
+
newSessionButton: documentRoot.getElementById("newSessionButton"),
|
|
30
|
+
refreshSessionsButton: documentRoot.getElementById("refreshSessionsButton"),
|
|
31
|
+
closeSessionsButton: documentRoot.getElementById("closeSessionsButton"),
|
|
32
|
+
sessionsToggleButton: documentRoot.getElementById("sessionsToggleButton"),
|
|
33
|
+
sessionSearchInput: documentRoot.getElementById("sessionSearchInput"),
|
|
34
|
+
sessionsCount: documentRoot.getElementById("sessionsCount"),
|
|
35
|
+
sessionsList: documentRoot.getElementById("sessionsList"),
|
|
36
|
+
sessionTitle: documentRoot.getElementById("sessionTitle"),
|
|
37
|
+
agentModeButton: documentRoot.getElementById("agentModeButton"),
|
|
38
|
+
agentModeMenu: documentRoot.getElementById("agentModeMenu"),
|
|
39
|
+
permissionModeButton: documentRoot.getElementById("permissionModeButton"),
|
|
40
|
+
permissionModeMenu: documentRoot.getElementById("permissionModeMenu"),
|
|
41
|
+
modelSelect: documentRoot.getElementById("modelSelect"),
|
|
42
|
+
modelSelectButton: documentRoot.getElementById("modelSelectButton"),
|
|
43
|
+
modelSelectValue: documentRoot.getElementById("modelSelectValue"),
|
|
44
|
+
modelSelectMenu: documentRoot.getElementById("modelSelectMenu"),
|
|
45
|
+
messagesList: documentRoot.getElementById("messagesList"),
|
|
46
|
+
runtimeSetupGuide: documentRoot.getElementById("runtimeSetupGuide"),
|
|
47
|
+
messageStatusRegion: documentRoot.getElementById("messageStatusRegion"),
|
|
48
|
+
jumpToLatestButton: documentRoot.getElementById("jumpToLatestButton"),
|
|
49
|
+
composerForm: documentRoot.getElementById("composerForm"),
|
|
50
|
+
attachmentButton: documentRoot.getElementById("attachmentButton"),
|
|
51
|
+
attachmentInput: documentRoot.getElementById("attachmentInput"),
|
|
52
|
+
attachmentPreview: documentRoot.getElementById("attachmentPreview"),
|
|
53
|
+
composerInput: documentRoot.getElementById("composerInput"),
|
|
54
|
+
composerContextWindow: documentRoot.getElementById("composerContextWindow"),
|
|
55
|
+
composerPlan: documentRoot.getElementById("composerPlan"),
|
|
56
|
+
composerSubmitControl: documentRoot.getElementById("composerSubmitControl"),
|
|
57
|
+
sendButton: documentRoot.getElementById("sendButton"),
|
|
58
|
+
sendButtonLabel: documentRoot.getElementById("sendButtonLabel"),
|
|
59
|
+
sendNextMenuButton: documentRoot.getElementById("sendNextMenuButton"),
|
|
60
|
+
sendNextMenu: documentRoot.getElementById("sendNextMenu"),
|
|
61
|
+
sendNextButton: documentRoot.getElementById("sendNextButton"),
|
|
62
|
+
refreshRuntimeButton: documentRoot.getElementById("refreshRuntimeButton"),
|
|
63
|
+
runtimeStatus: documentRoot.getElementById("runtimeStatus"),
|
|
64
|
+
refreshLogsButton: documentRoot.getElementById("refreshLogsButton"),
|
|
65
|
+
runtimeLogs: documentRoot.getElementById("runtimeLogs"),
|
|
66
|
+
refreshHealthButton: documentRoot.getElementById("refreshHealthButton"),
|
|
67
|
+
healthStatus: documentRoot.getElementById("healthStatus"),
|
|
68
|
+
refreshConfigButton: documentRoot.getElementById("refreshConfigButton"),
|
|
69
|
+
configStatus: documentRoot.getElementById("configStatus"),
|
|
70
|
+
configDashboard: documentRoot.getElementById("configDashboard"),
|
|
71
|
+
panelBackdrop: documentRoot.getElementById("panelBackdrop"),
|
|
72
|
+
toastRegion: documentRoot.getElementById("toastRegion"),
|
|
73
|
+
operationsTabButtons: [
|
|
74
|
+
...documentRoot.querySelectorAll(".operations-tab-button"),
|
|
75
|
+
],
|
|
76
|
+
operationsTabPages: [
|
|
77
|
+
...documentRoot.querySelectorAll(".operations-tab-page"),
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { captureComposerSubmissionScope, isCurrentComposerSubmissionScope } from "./lib/composer-submission-scope.js";
|
|
2
|
+
import { createComposerSurfaceController } from "./controllers/composer-surface-controller.js";
|
|
3
|
+
import { bootstrapWebApp } from "./app-bootstrap.js";
|
|
4
|
+
import { createConfigurationFeature } from "./configuration-feature.js";
|
|
5
|
+
import { createDashboardFeature } from "./dashboard-feature.js";
|
|
6
|
+
import { createComposerWorkspaceController } from "./controllers/composer-workspace-controller.js";
|
|
7
|
+
import { createHomeComposerFeature } from "./controllers/home-composer-feature.js";
|
|
8
|
+
import { createHomeConversationActivation } from "./controllers/home-conversation-activation.js";
|
|
9
|
+
import { findAppDom } from "./app-dom.js";
|
|
10
|
+
import { createSchedulesFeature } from "./schedules-feature.js";
|
|
1
11
|
import { createWorkspaceShell } from "./components/workspace-shell.js";
|
|
2
|
-
import { createConfigWorkspace } from "./components/config-workspace.js";
|
|
3
12
|
import { createComposerActions } from "./components/composer-actions.js";
|
|
4
13
|
import { createModelSelector } from "./components/model-selector.js";
|
|
5
14
|
import { createRuntimeSetupGuide } from "./components/runtime-setup-guide.js";
|
|
6
|
-
import { createLongTermMemorySetup } from "./components/long-term-memory-setup.js";
|
|
7
|
-
import { createLongTermMemoryManager } from "./components/long-term-memory/manager.js";
|
|
8
15
|
import { createSessionActionsMenu } from "./components/session-actions-menu.js";
|
|
9
16
|
import { createToolApprovalCard } from "./components/tool-approval-card.js";
|
|
10
17
|
import { textOf } from "./lib/text-format.js";
|
|
@@ -26,7 +33,6 @@ import { createConversationSessionController } from "./controllers/conversation-
|
|
|
26
33
|
import { createChatRequestController } from "./controllers/chat-request-controller.js";
|
|
27
34
|
import { createToolApprovalController } from "./controllers/tool-approval-controller.js";
|
|
28
35
|
import { createComposerSubmitController } from "./controllers/composer-submit-controller.js";
|
|
29
|
-
import { createLongTermMemoryController } from "./controllers/long-term-memory/controller.js";
|
|
30
36
|
|
|
31
37
|
const state = {
|
|
32
38
|
config: null,
|
|
@@ -65,69 +71,7 @@ const state = {
|
|
|
65
71
|
sessionQuery: "",
|
|
66
72
|
};
|
|
67
73
|
|
|
68
|
-
const dom =
|
|
69
|
-
app: document.getElementById("app"),
|
|
70
|
-
chatWorkspaceButton: document.getElementById("chatWorkspaceButton"),
|
|
71
|
-
configWorkspaceButton: document.getElementById("configWorkspaceButton"),
|
|
72
|
-
chatPanel: document.querySelector(".chat-panel"),
|
|
73
|
-
sessionsPanel: document.querySelector(".sessions-panel"),
|
|
74
|
-
configWorkspacePanel: document.getElementById("configWorkspacePanel"),
|
|
75
|
-
closeConfigWorkspaceButton: document.getElementById(
|
|
76
|
-
"closeConfigWorkspaceButton",
|
|
77
|
-
),
|
|
78
|
-
connectionLabel: document.getElementById("connectionLabel"),
|
|
79
|
-
environmentSelect: document.getElementById("environmentSelect"),
|
|
80
|
-
agentPickerButton: document.getElementById("agentPickerButton"),
|
|
81
|
-
agentPickerMenu: document.getElementById("agentPickerMenu"),
|
|
82
|
-
newSessionButton: document.getElementById("newSessionButton"),
|
|
83
|
-
refreshSessionsButton: document.getElementById("refreshSessionsButton"),
|
|
84
|
-
closeSessionsButton: document.getElementById("closeSessionsButton"),
|
|
85
|
-
sessionsToggleButton: document.getElementById("sessionsToggleButton"),
|
|
86
|
-
sessionSearchInput: document.getElementById("sessionSearchInput"),
|
|
87
|
-
sessionsCount: document.getElementById("sessionsCount"),
|
|
88
|
-
sessionsList: document.getElementById("sessionsList"),
|
|
89
|
-
sessionTitle: document.getElementById("sessionTitle"),
|
|
90
|
-
agentModeButton: document.getElementById("agentModeButton"),
|
|
91
|
-
agentModeMenu: document.getElementById("agentModeMenu"),
|
|
92
|
-
permissionModeButton: document.getElementById("permissionModeButton"),
|
|
93
|
-
permissionModeMenu: document.getElementById("permissionModeMenu"),
|
|
94
|
-
modelSelect: document.getElementById("modelSelect"),
|
|
95
|
-
modelSelectButton: document.getElementById("modelSelectButton"),
|
|
96
|
-
modelSelectValue: document.getElementById("modelSelectValue"),
|
|
97
|
-
modelSelectMenu: document.getElementById("modelSelectMenu"),
|
|
98
|
-
messagesList: document.getElementById("messagesList"),
|
|
99
|
-
runtimeSetupGuide: document.getElementById("runtimeSetupGuide"),
|
|
100
|
-
messageStatusRegion: document.getElementById("messageStatusRegion"),
|
|
101
|
-
jumpToLatestButton: document.getElementById("jumpToLatestButton"),
|
|
102
|
-
composerForm: document.getElementById("composerForm"),
|
|
103
|
-
attachmentButton: document.getElementById("attachmentButton"),
|
|
104
|
-
attachmentInput: document.getElementById("attachmentInput"),
|
|
105
|
-
attachmentPreview: document.getElementById("attachmentPreview"),
|
|
106
|
-
composerInput: document.getElementById("composerInput"),
|
|
107
|
-
composerContextWindow: document.getElementById("composerContextWindow"),
|
|
108
|
-
composerPlan: document.getElementById("composerPlan"),
|
|
109
|
-
composerSubmitControl: document.getElementById("composerSubmitControl"),
|
|
110
|
-
sendButton: document.getElementById("sendButton"),
|
|
111
|
-
sendButtonLabel: document.getElementById("sendButtonLabel"),
|
|
112
|
-
sendNextMenuButton: document.getElementById("sendNextMenuButton"),
|
|
113
|
-
sendNextMenu: document.getElementById("sendNextMenu"),
|
|
114
|
-
sendNextButton: document.getElementById("sendNextButton"),
|
|
115
|
-
refreshRuntimeButton: document.getElementById("refreshRuntimeButton"),
|
|
116
|
-
runtimeStatus: document.getElementById("runtimeStatus"),
|
|
117
|
-
refreshLogsButton: document.getElementById("refreshLogsButton"),
|
|
118
|
-
runtimeLogs: document.getElementById("runtimeLogs"),
|
|
119
|
-
refreshHealthButton: document.getElementById("refreshHealthButton"),
|
|
120
|
-
healthStatus: document.getElementById("healthStatus"),
|
|
121
|
-
refreshConfigButton: document.getElementById("refreshConfigButton"),
|
|
122
|
-
configStatus: document.getElementById("configStatus"),
|
|
123
|
-
configDashboard: document.getElementById("configDashboard"),
|
|
124
|
-
panelBackdrop: document.getElementById("panelBackdrop"),
|
|
125
|
-
toastRegion: document.getElementById("toastRegion"),
|
|
126
|
-
operationsTabButtons: [
|
|
127
|
-
...document.querySelectorAll(".operations-tab-button"),
|
|
128
|
-
],
|
|
129
|
-
operationsTabPages: [...document.querySelectorAll(".operations-tab-page")],
|
|
130
|
-
};
|
|
74
|
+
const dom = findAppDom();
|
|
131
75
|
|
|
132
76
|
const preferences = createClientPreferences(localStorage);
|
|
133
77
|
const runtimeClient = createRuntimeWebClient({
|
|
@@ -141,6 +85,10 @@ let composerSubmitController;
|
|
|
141
85
|
let realtimeEvents;
|
|
142
86
|
let conversationView;
|
|
143
87
|
let configWorkspace;
|
|
88
|
+
let schedulesFeature;
|
|
89
|
+
let dashboardFeature;
|
|
90
|
+
let homeComposer;
|
|
91
|
+
let runtimeSelection;
|
|
144
92
|
const operationsController = createOperationsController({
|
|
145
93
|
dom,
|
|
146
94
|
client: runtimeClient,
|
|
@@ -160,7 +108,10 @@ const realtimeTransport = createRealtimeTransport({
|
|
|
160
108
|
);
|
|
161
109
|
setConnectionLabel("Reconnecting", true);
|
|
162
110
|
},
|
|
163
|
-
onError: () =>
|
|
111
|
+
onError: () => {
|
|
112
|
+
state.connected = false;
|
|
113
|
+
setConnectionLabel("Connection issue", true);
|
|
114
|
+
},
|
|
164
115
|
onParseError: (error, preview) => {
|
|
165
116
|
recordControlEvent({
|
|
166
117
|
type: "control",
|
|
@@ -185,7 +136,22 @@ const steerController = createSteerController({
|
|
|
185
136
|
|
|
186
137
|
const shell = createWorkspaceShell({
|
|
187
138
|
dom,
|
|
139
|
+
isWorkspaceAvailable: (destination) =>
|
|
140
|
+
schedulesFeature?.isWorkspaceAvailable(destination) ?? false,
|
|
141
|
+
onWorkspaceChange: (workspace) => {
|
|
142
|
+
runtimeSelection?.rememberModelSelection();
|
|
143
|
+
homeComposer?.setWorkspace(workspace);
|
|
144
|
+
schedulesFeature?.setActive(workspace === "schedules");
|
|
145
|
+
dashboardFeature?.setActive(workspace === "home");
|
|
146
|
+
runtimeSelection?.applyModelSelection();
|
|
147
|
+
runtimeSelection?.renderPermissionMode();
|
|
148
|
+
renderAttachmentComposer();
|
|
149
|
+
updateComposerSendState();
|
|
150
|
+
conversationSession?.markCurrentSessionReadSoon();
|
|
151
|
+
},
|
|
188
152
|
beforeWorkspaceChange: ({ from, to }) => {
|
|
153
|
+
if (from === "schedules" && to !== "schedules")
|
|
154
|
+
return schedulesFeature?.prepareLeave() ?? true;
|
|
189
155
|
if (from !== "config" || to === "config") return true;
|
|
190
156
|
if (!configWorkspace) return true;
|
|
191
157
|
return configWorkspace.prepareDiscardChanges("leave configuration");
|
|
@@ -205,6 +171,7 @@ const runtimeOnboarding = createRuntimeOnboardingController({
|
|
|
205
171
|
onStateChange: () => {
|
|
206
172
|
updateComposerSendState();
|
|
207
173
|
renderAttachmentComposer();
|
|
174
|
+
dashboardFeature?.publish();
|
|
208
175
|
},
|
|
209
176
|
});
|
|
210
177
|
|
|
@@ -212,6 +179,48 @@ const composerActions = createComposerActions({
|
|
|
212
179
|
dom,
|
|
213
180
|
onSendNext: () => dispatchComposerMessage("send_next"),
|
|
214
181
|
});
|
|
182
|
+
schedulesFeature = createSchedulesFeature({
|
|
183
|
+
dom,
|
|
184
|
+
client: runtimeClient,
|
|
185
|
+
shell,
|
|
186
|
+
selectedEnvironmentId,
|
|
187
|
+
getCurrentSessionId: () => state.currentSessionId,
|
|
188
|
+
getAgentModes: () => state.supportedAgentModes,
|
|
189
|
+
openSession: (sessionId) => conversationSession.openSession(sessionId),
|
|
190
|
+
});
|
|
191
|
+
dashboardFeature = createDashboardFeature({
|
|
192
|
+
dom,
|
|
193
|
+
state,
|
|
194
|
+
client: runtimeClient,
|
|
195
|
+
shell,
|
|
196
|
+
schedules: schedulesFeature,
|
|
197
|
+
selectedEnvironmentId,
|
|
198
|
+
loadSessions,
|
|
199
|
+
openSession: (sessionId) => conversationSession.openSession(sessionId),
|
|
200
|
+
isComposerAvailable: runtimeOnboarding.isReady,
|
|
201
|
+
});
|
|
202
|
+
const composerWorkspace = createComposerWorkspaceController({
|
|
203
|
+
state,
|
|
204
|
+
dom,
|
|
205
|
+
homeComposerHost: dashboardFeature.composerHost,
|
|
206
|
+
selectedEnvironmentId,
|
|
207
|
+
homeSetupHost: dashboardFeature.setupHost,
|
|
208
|
+
});
|
|
209
|
+
const {
|
|
210
|
+
renderAttachmentComposer,
|
|
211
|
+
removeUnsupportedPendingImages,
|
|
212
|
+
updateComposerSendState,
|
|
213
|
+
uploadComposerAttachment,
|
|
214
|
+
resizeComposerInput,
|
|
215
|
+
dispatchComposerMessage,
|
|
216
|
+
} = createComposerSurfaceController({
|
|
217
|
+
workspace: composerWorkspace,
|
|
218
|
+
getHomeComposer: () => homeComposer,
|
|
219
|
+
getChatAttachments: () => composerAttachments,
|
|
220
|
+
getChatSubmit: () => composerSubmitController,
|
|
221
|
+
rememberModelSelection: rememberCurrentModelSelection,
|
|
222
|
+
showToast: shell.showToast,
|
|
223
|
+
});
|
|
215
224
|
const sessionComposerQueue = createSessionComposerQueue({
|
|
216
225
|
storage: localStorage,
|
|
217
226
|
});
|
|
@@ -245,11 +254,18 @@ const composerAttachments = createComposerAttachmentsController({
|
|
|
245
254
|
shell,
|
|
246
255
|
client: runtimeClient,
|
|
247
256
|
selectedEnvironmentId,
|
|
248
|
-
selectedModelSupportsImageInput
|
|
257
|
+
selectedModelSupportsImageInput: () =>
|
|
258
|
+
runtimeSelection.selectedModelSupportsImageInput(
|
|
259
|
+
composerWorkspace.isChatVisible()
|
|
260
|
+
? dom.modelSelect.value
|
|
261
|
+
: state.sessionModels[state.currentSessionId] ||
|
|
262
|
+
state.defaultModelProfileId,
|
|
263
|
+
),
|
|
249
264
|
ensureSession: () => conversationSession.ensureSession(),
|
|
250
265
|
onSendStateChange: updateComposerSendState,
|
|
251
266
|
onControlEvent: recordControlEvent,
|
|
252
267
|
isComposerAvailable: runtimeOnboarding.isReady,
|
|
268
|
+
isComposerVisible: composerWorkspace.isChatVisible,
|
|
253
269
|
});
|
|
254
270
|
const toolApprovalController = createToolApprovalController({
|
|
255
271
|
state,
|
|
@@ -268,6 +284,7 @@ conversationView = createConversationView({
|
|
|
268
284
|
},
|
|
269
285
|
getMessages: () => state.messages,
|
|
270
286
|
getActiveRequestId: () => state.activeRequestId,
|
|
287
|
+
isConnected: () => state.connected,
|
|
271
288
|
getActivityForMessage: (message) => ({
|
|
272
289
|
events: state.events,
|
|
273
290
|
taskProgress:
|
|
@@ -280,6 +297,8 @@ conversationView = createConversationView({
|
|
|
280
297
|
copyText: (text) => navigator.clipboard.writeText(text),
|
|
281
298
|
notify: (message, tone) => shell.showToast(message, tone),
|
|
282
299
|
resolveAttachmentUrl: attachmentPreviewUrl,
|
|
300
|
+
onOpenSchedule: (jobId) => schedulesFeature.openJob(jobId),
|
|
301
|
+
canOpenSchedule: runtimeClient.supportsSchedules,
|
|
283
302
|
});
|
|
284
303
|
conversationSession = createConversationSessionController({
|
|
285
304
|
state,
|
|
@@ -290,6 +309,11 @@ conversationSession = createConversationSessionController({
|
|
|
290
309
|
sessionQueue: sessionComposerQueue,
|
|
291
310
|
conversationView,
|
|
292
311
|
selectedEnvironmentId,
|
|
312
|
+
isConversationVisible: () =>
|
|
313
|
+
shell.activeWorkspace() === "chat" &&
|
|
314
|
+
!dom.chatPanel.inert &&
|
|
315
|
+
document.visibilityState === "visible",
|
|
316
|
+
onSessionListState: dashboardFeature.sessionsChanged,
|
|
293
317
|
clearPendingAttachments,
|
|
294
318
|
applyConversationChrome: applyConversationModeChrome,
|
|
295
319
|
applyModelSelection: applyModelSelectionForCurrentSession,
|
|
@@ -333,7 +357,7 @@ chatRequests = createChatRequestController({
|
|
|
333
357
|
});
|
|
334
358
|
composerQueueController = createComposerQueueController({
|
|
335
359
|
state,
|
|
336
|
-
dom,
|
|
360
|
+
dom: composerWorkspace.chatDom,
|
|
337
361
|
queue: sessionComposerQueue,
|
|
338
362
|
selectedEnvironmentId,
|
|
339
363
|
getToolPermissionMode: currentToolPermissionMode,
|
|
@@ -351,7 +375,7 @@ composerQueueController = createComposerQueueController({
|
|
|
351
375
|
});
|
|
352
376
|
composerSubmitController = createComposerSubmitController({
|
|
353
377
|
state,
|
|
354
|
-
dom,
|
|
378
|
+
dom: composerWorkspace.chatDom,
|
|
355
379
|
composerActions,
|
|
356
380
|
attachments: composerAttachments,
|
|
357
381
|
queue: composerQueueController,
|
|
@@ -362,6 +386,7 @@ composerSubmitController = createComposerSubmitController({
|
|
|
362
386
|
setMessageStatus: setMessageActivityStatus,
|
|
363
387
|
getSubmissionBlock: runtimeOnboarding.submissionBlock,
|
|
364
388
|
onSubmissionBlocked: runtimeOnboarding.presentSubmissionBlock,
|
|
389
|
+
isComposerVisible: composerWorkspace.isChatVisible,
|
|
365
390
|
});
|
|
366
391
|
realtimeEvents = createRealtimeEventController({
|
|
367
392
|
state,
|
|
@@ -374,6 +399,7 @@ realtimeEvents = createRealtimeEventController({
|
|
|
374
399
|
addOrMergeMessage: conversationSession.addOrMergeMessage,
|
|
375
400
|
normalizeChatMessage: conversationSession.normalizeMessage,
|
|
376
401
|
renderContextWindow: () => conversationView.renderContextWindow(),
|
|
402
|
+
renderActivityStatus: () => conversationView.renderActivityStatus(),
|
|
377
403
|
renderMessages,
|
|
378
404
|
scheduleMessageRender,
|
|
379
405
|
scheduleThinkingRender,
|
|
@@ -401,7 +427,7 @@ const modelSelector = createModelSelector({
|
|
|
401
427
|
renderPermissionModeControl();
|
|
402
428
|
},
|
|
403
429
|
});
|
|
404
|
-
|
|
430
|
+
runtimeSelection = createRuntimeSelectionController({
|
|
405
431
|
state,
|
|
406
432
|
dom,
|
|
407
433
|
preferences,
|
|
@@ -412,6 +438,55 @@ const runtimeSelection = createRuntimeSelectionController({
|
|
|
412
438
|
onModelCatalogLoading: runtimeOnboarding.beginCatalogLoad,
|
|
413
439
|
onModelCatalogLoaded: runtimeOnboarding.applyCatalog,
|
|
414
440
|
onModelCatalogUnavailable: runtimeOnboarding.catalogUnavailable,
|
|
441
|
+
getComposerSessionId: composerWorkspace.composerSessionId,
|
|
442
|
+
});
|
|
443
|
+
homeComposer = createHomeComposerFeature({
|
|
444
|
+
workspace: composerWorkspace,
|
|
445
|
+
shell,
|
|
446
|
+
client: runtimeClient,
|
|
447
|
+
composerActions,
|
|
448
|
+
selectedEnvironmentId,
|
|
449
|
+
selectedModelSupportsImageInput: () =>
|
|
450
|
+
runtimeSelection.selectedModelSupportsImageInput(
|
|
451
|
+
composerWorkspace.isHome()
|
|
452
|
+
? dom.modelSelect.value
|
|
453
|
+
: state.sessionModels[composerWorkspace.homeState.currentSessionId] ||
|
|
454
|
+
state.defaultModelProfileId,
|
|
455
|
+
),
|
|
456
|
+
isComposerAvailable: runtimeOnboarding.isReady,
|
|
457
|
+
getSubmissionBlock: runtimeOnboarding.submissionBlock,
|
|
458
|
+
onSubmissionBlocked: runtimeOnboarding.presentSubmissionBlock,
|
|
459
|
+
onControlEvent: recordControlEvent,
|
|
460
|
+
onStateChange: updateComposerSendState,
|
|
461
|
+
activateHomeSession: createHomeConversationActivation({
|
|
462
|
+
state,
|
|
463
|
+
shell,
|
|
464
|
+
conversationSession,
|
|
465
|
+
composerQueue: composerQueueController,
|
|
466
|
+
preferences,
|
|
467
|
+
selectedEnvironmentId,
|
|
468
|
+
renderSessions,
|
|
469
|
+
renderMessages,
|
|
470
|
+
applyModelSelection: applyModelSelectionForCurrentSession,
|
|
471
|
+
setCurrentTitle: setCurrentSessionTitle,
|
|
472
|
+
updateComposerSendState,
|
|
473
|
+
}),
|
|
474
|
+
sendMessage: async (text) => {
|
|
475
|
+
const scope = captureComposerSubmissionScope(state, selectedEnvironmentId());
|
|
476
|
+
state.composerSending = true;
|
|
477
|
+
updateComposerSendState();
|
|
478
|
+
try {
|
|
479
|
+
await chatRequests.sendMessage(text);
|
|
480
|
+
} catch (error) {
|
|
481
|
+
if (!isCurrentComposerSubmissionScope(scope, state, selectedEnvironmentId())) return;
|
|
482
|
+
conversationSession.appendRequestError(error);
|
|
483
|
+
} finally {
|
|
484
|
+
if (isCurrentComposerSubmissionScope(scope, state, selectedEnvironmentId())) {
|
|
485
|
+
state.composerSending = false;
|
|
486
|
+
updateComposerSendState();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
},
|
|
415
490
|
});
|
|
416
491
|
const appEventBindings = createAppEventBindings({
|
|
417
492
|
state,
|
|
@@ -435,8 +510,10 @@ const appEventBindings = createAppEventBindings({
|
|
|
435
510
|
renderMessages,
|
|
436
511
|
renderAgentPicker,
|
|
437
512
|
savedEnvironmentId,
|
|
438
|
-
beforeEnvironmentChange: () =>
|
|
439
|
-
|
|
513
|
+
beforeEnvironmentChange: () => {
|
|
514
|
+
if (!schedulesFeature.prepareLeave()) return false;
|
|
515
|
+
return configWorkspace.prepareDiscardChanges("change environment");
|
|
516
|
+
},
|
|
440
517
|
saveEnvironmentId,
|
|
441
518
|
loadModels,
|
|
442
519
|
loadAgentMode,
|
|
@@ -457,61 +534,10 @@ const appEventBindings = createAppEventBindings({
|
|
|
457
534
|
},
|
|
458
535
|
});
|
|
459
536
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
discoverModels: (providerId, environmentId) =>
|
|
465
|
-
runtimeClient.discoverLongTermMemoryModels({
|
|
466
|
-
environmentId,
|
|
467
|
-
providerId,
|
|
468
|
-
}),
|
|
469
|
-
enableMemory: (input, environmentId) =>
|
|
470
|
-
runtimeClient.enableLongTermMemory({
|
|
471
|
-
environmentId,
|
|
472
|
-
...input,
|
|
473
|
-
}),
|
|
474
|
-
disableMemory: (environmentId) =>
|
|
475
|
-
runtimeClient.disableLongTermMemory(environmentId),
|
|
476
|
-
recordControlEvent,
|
|
477
|
-
beginRuntimeMutation: () =>
|
|
478
|
-
configWorkspace?.beginExternalRuntimeMutation() ?? false,
|
|
479
|
-
refreshRuntimeConfig: () =>
|
|
480
|
-
configWorkspace?.refreshAfterExternalRuntimeMutation() ??
|
|
481
|
-
Promise.resolve(false),
|
|
482
|
-
endRuntimeMutation: () => configWorkspace?.endExternalRuntimeMutation(),
|
|
483
|
-
});
|
|
484
|
-
|
|
485
|
-
let longTermMemoryManager;
|
|
486
|
-
const longTermMemoryController = createLongTermMemoryController({
|
|
487
|
-
client: runtimeClient,
|
|
488
|
-
getEnvironmentId: selectedEnvironmentId,
|
|
489
|
-
render: (snapshot) => longTermMemoryManager?.render(snapshot),
|
|
490
|
-
});
|
|
491
|
-
longTermMemoryManager = createLongTermMemoryManager({
|
|
492
|
-
actions: longTermMemoryController,
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
configWorkspace = createConfigWorkspace({
|
|
496
|
-
dom: {
|
|
497
|
-
refreshConfigButton: dom.refreshConfigButton,
|
|
498
|
-
configStatus: dom.configStatus,
|
|
499
|
-
configDashboard: dom.configDashboard,
|
|
500
|
-
},
|
|
501
|
-
loadDashboard: () =>
|
|
502
|
-
runtimeClient.loadConfigDashboard(selectedEnvironmentId()),
|
|
503
|
-
saveFile: ({ kind, id, config }) =>
|
|
504
|
-
runtimeClient.saveConfigFile({
|
|
505
|
-
environmentId: selectedEnvironmentId(),
|
|
506
|
-
kind,
|
|
507
|
-
id,
|
|
508
|
-
config,
|
|
509
|
-
}),
|
|
510
|
-
memorySetup: longTermMemorySetup,
|
|
511
|
-
memoryManagement: {
|
|
512
|
-
load: () => longTermMemoryController.load(),
|
|
513
|
-
mount: (root) => longTermMemoryManager.mount(root),
|
|
514
|
-
},
|
|
537
|
+
configWorkspace = createConfigurationFeature({
|
|
538
|
+
dom,
|
|
539
|
+
runtimeClient,
|
|
540
|
+
selectedEnvironmentId,
|
|
515
541
|
recordControlEvent,
|
|
516
542
|
});
|
|
517
543
|
|
|
@@ -525,22 +551,15 @@ function setConnectionLabel(text, isError = false) {
|
|
|
525
551
|
"connected",
|
|
526
552
|
state.connected && !isError,
|
|
527
553
|
);
|
|
554
|
+
conversationView?.renderActivityStatus();
|
|
528
555
|
}
|
|
529
556
|
|
|
530
557
|
function configuredEnvironmentOptions() {
|
|
531
558
|
return runtimeSelection.configuredEnvironmentOptions();
|
|
532
559
|
}
|
|
533
560
|
|
|
534
|
-
function renderEnvironmentSelectOptions() {
|
|
535
|
-
runtimeSelection.renderEnvironmentOptions();
|
|
536
|
-
}
|
|
537
|
-
|
|
538
561
|
function selectedEnvironmentId() {
|
|
539
|
-
return runtimeSelection
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
function environmentOptions() {
|
|
543
|
-
return runtimeSelection.environmentOptions();
|
|
562
|
+
return runtimeSelection?.selectedEnvironmentId() ?? "";
|
|
544
563
|
}
|
|
545
564
|
|
|
546
565
|
function renderAgentPicker() {
|
|
@@ -551,14 +570,6 @@ function selectedModelPreference() {
|
|
|
551
570
|
return runtimeSelection.selectedModelPreference();
|
|
552
571
|
}
|
|
553
572
|
|
|
554
|
-
function selectedModelSupportsImageInput() {
|
|
555
|
-
return runtimeSelection.selectedModelSupportsImageInput();
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function loadPinnedSessions() {
|
|
559
|
-
runtimeSelection.loadPreferences();
|
|
560
|
-
}
|
|
561
|
-
|
|
562
573
|
function saveModelPreferences() {
|
|
563
574
|
runtimeSelection.saveModelPreferences();
|
|
564
575
|
}
|
|
@@ -610,6 +621,7 @@ function setCurrentSessionTitle(title) {
|
|
|
610
621
|
|
|
611
622
|
function renderSessions() {
|
|
612
623
|
sessionController.render();
|
|
624
|
+
dashboardFeature?.publish();
|
|
613
625
|
}
|
|
614
626
|
|
|
615
627
|
function renderMessages() {
|
|
@@ -632,22 +644,10 @@ function cancelScheduledThinkingRender() {
|
|
|
632
644
|
conversationView.cancelScheduledThinkingRender();
|
|
633
645
|
}
|
|
634
646
|
|
|
635
|
-
function renderAttachmentComposer() {
|
|
636
|
-
composerAttachments.render();
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
function removeUnsupportedPendingImages() {
|
|
640
|
-
composerAttachments.removeUnsupportedImages();
|
|
641
|
-
}
|
|
642
|
-
|
|
643
647
|
function attachmentPreviewUrl(attachment) {
|
|
644
648
|
return composerAttachments.previewUrl(attachment);
|
|
645
649
|
}
|
|
646
650
|
|
|
647
|
-
function updateComposerSendState() {
|
|
648
|
-
composerSubmitController.updateSendState();
|
|
649
|
-
}
|
|
650
|
-
|
|
651
651
|
function clearPendingAttachments(options = {}) {
|
|
652
652
|
composerAttachments.clear(options);
|
|
653
653
|
}
|
|
@@ -680,10 +680,6 @@ function handleRealtimeMessage(message) {
|
|
|
680
680
|
realtimeEvents.handle(message);
|
|
681
681
|
}
|
|
682
682
|
|
|
683
|
-
function connectRealtime() {
|
|
684
|
-
realtimeTransport.connect();
|
|
685
|
-
}
|
|
686
|
-
|
|
687
683
|
function sendRealtime(payload) {
|
|
688
684
|
return realtimeTransport.send(payload);
|
|
689
685
|
}
|
|
@@ -716,10 +712,6 @@ async function drainQueuedComposerMessage({
|
|
|
716
712
|
});
|
|
717
713
|
}
|
|
718
714
|
|
|
719
|
-
async function uploadComposerAttachment(file) {
|
|
720
|
-
await composerAttachments.upload(file);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
715
|
async function loadRuntimeStatus() {
|
|
724
716
|
await operationsController.loadRuntimeStatus();
|
|
725
717
|
}
|
|
@@ -734,58 +726,49 @@ async function loadSystemHealth() {
|
|
|
734
726
|
|
|
735
727
|
function bindEvents() {
|
|
736
728
|
appEventBindings.bind();
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
729
|
+
document.addEventListener(
|
|
730
|
+
"visibilitychange",
|
|
731
|
+
conversationSession.markCurrentSessionReadSoon,
|
|
732
|
+
);
|
|
733
|
+
dom.environmentSelect.addEventListener("change", () => {
|
|
734
|
+
homeComposer.environmentChanged();
|
|
735
|
+
dashboardFeature.environmentChanged();
|
|
736
|
+
});
|
|
741
737
|
}
|
|
742
738
|
|
|
743
739
|
function suspendRecoveredComposerReleaseForNavigation() {
|
|
744
740
|
return composerQueueController.suspendRecoveryForNavigation();
|
|
745
741
|
}
|
|
746
742
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
renderAgentPicker();
|
|
777
|
-
connectRealtime();
|
|
778
|
-
await Promise.allSettled([
|
|
779
|
-
loadModels(),
|
|
780
|
-
loadAgentMode(),
|
|
781
|
-
loadRuntimeStatus(),
|
|
782
|
-
loadSystemHealth(),
|
|
783
|
-
loadRuntimeConfig(),
|
|
784
|
-
]);
|
|
785
|
-
await restoreLastSession();
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
void boot().catch((error) => {
|
|
743
|
+
void bootstrapWebApp({
|
|
744
|
+
state,
|
|
745
|
+
dom,
|
|
746
|
+
preferences,
|
|
747
|
+
shell,
|
|
748
|
+
homeComposer,
|
|
749
|
+
dashboard: dashboardFeature,
|
|
750
|
+
schedules: schedulesFeature,
|
|
751
|
+
selection: runtimeSelection,
|
|
752
|
+
client: runtimeClient,
|
|
753
|
+
bindables: [
|
|
754
|
+
sessionActionsMenu,
|
|
755
|
+
conversationView,
|
|
756
|
+
configWorkspace,
|
|
757
|
+
composerActions,
|
|
758
|
+
modelSelector,
|
|
759
|
+
runtimeOnboarding,
|
|
760
|
+
],
|
|
761
|
+
bindEvents,
|
|
762
|
+
renderComposer: () => {
|
|
763
|
+
resizeComposerInput();
|
|
764
|
+
updateComposerSendState();
|
|
765
|
+
},
|
|
766
|
+
renderMessages,
|
|
767
|
+
operations: operationsController,
|
|
768
|
+
configuration: configWorkspace,
|
|
769
|
+
realtime: realtimeTransport,
|
|
770
|
+
restoreLastSession,
|
|
771
|
+
}).catch((error) => {
|
|
789
772
|
setConnectionLabel(
|
|
790
773
|
error instanceof Error ? error.message : String(error),
|
|
791
774
|
true,
|