@abot-ai/runtime 1.8.0 → 1.9.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/README.md +216 -222
- package/dist/scripts/runtime-setup-files.js +46 -2
- package/dist/src/capabilities/tool-definition-validator/definition-parser.js +8 -0
- package/dist/src/capabilities/tool-types.d.ts +4 -0
- package/dist/src/model-gateway/client/chat.js +9 -5
- package/dist/src/model-gateway/client/invocation-error.d.ts +9 -0
- package/dist/src/model-gateway/client/invocation-error.js +30 -0
- package/dist/src/model-gateway/client/stream-consumer.js +9 -2
- package/dist/src/model-gateway/client/stream-parser.js +2 -1
- package/dist/src/model-gateway/protocol/message-contract.d.ts +1 -0
- package/dist/src/model-gateway/protocol/message-contract.js +1 -1
- package/dist/src/model-gateway/server/chat-handler.js +5 -7
- package/dist/src/model-gateway/server/chat-stream-response.d.ts +7 -0
- package/dist/src/model-gateway/server/chat-stream-response.js +25 -0
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/approval.d.ts +5 -1
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/approval.js +15 -1
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/prepared-execution.js +7 -5
- package/dist/src/runtime/adapters/registered-tool-normal-invocations/execution/prepared-snapshot.js +9 -2
- package/dist/src/runtime/adapters/registered-tool-worker-capabilities/payload-rejection.d.ts +2 -2
- package/dist/src/runtime/adapters/registered-tool-worker-capabilities/payload-rejection.js +2 -2
- package/dist/src/runtime/adapters/registered-tool-worker-capabilities/prepared-execution.js +17 -11
- package/dist/src/runtime/automations/service.d.ts +1 -1
- package/dist/src/runtime/capabilities/automation-builder/tool-module.js +4 -4
- package/dist/src/runtime/capabilities/automations/draft-index.d.ts +1 -1
- package/dist/src/runtime/capabilities/automations/tool-module.js +4 -4
- package/dist/src/runtime/capabilities/core-tool-contracts.d.ts +29 -0
- package/dist/src/runtime/capabilities/core-tool-contracts.js +38 -0
- package/dist/src/runtime/capabilities/knowledge-skills/read-many.d.ts +4 -0
- package/dist/src/runtime/capabilities/knowledge-skills/read-many.js +21 -0
- package/dist/src/runtime/capabilities/knowledge-skills/read-targets.d.ts +13 -0
- package/dist/src/runtime/capabilities/knowledge-skills/read-targets.js +44 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-contract.d.ts +141 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-contract.js +58 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-module.d.ts +4 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-module.js +78 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-output.d.ts +12 -0
- package/dist/src/runtime/capabilities/knowledge-skills/tool-output.js +21 -0
- package/dist/src/runtime/capabilities/knowledge-skills/write-contract.d.ts +77 -0
- package/dist/src/runtime/capabilities/knowledge-skills/write-contract.js +28 -0
- package/dist/src/runtime/capabilities/knowledge-skills/write-operations.d.ts +3 -0
- package/dist/src/runtime/capabilities/knowledge-skills/write-operations.js +34 -0
- package/dist/src/runtime/capabilities/scheduling/tool-module.js +3 -3
- package/dist/src/runtime/capabilities/tool-availability.js +6 -0
- package/dist/src/runtime/composition.d.ts +5 -0
- package/dist/src/runtime/context/capability-brief.d.ts +2 -2
- package/dist/src/runtime/context/capability-brief.js +3 -3
- package/dist/src/runtime/context/capability-descriptions.d.ts +3 -2
- package/dist/src/runtime/context/capability-descriptions.js +57 -20
- package/dist/src/runtime/context/capability-result-compaction-source.d.ts +3 -1
- package/dist/src/runtime/context/capability-result-compaction-source.js +13 -1
- package/dist/src/runtime/context/core-skill-read-context.d.ts +16 -0
- package/dist/src/runtime/context/core-skill-read-context.js +76 -0
- package/dist/src/runtime/context/exact-evidence-match.d.ts +3 -0
- package/dist/src/runtime/context/exact-evidence-match.js +34 -0
- package/dist/src/runtime/context/model-step-compaction.js +20 -6
- package/dist/src/runtime/context/semantic-compaction/core-skill-read-source.d.ts +9 -0
- package/dist/src/runtime/context/semantic-compaction/core-skill-read-source.js +38 -0
- package/dist/src/runtime/context/semantic-compaction/generation-contracts.d.ts +2 -0
- package/dist/src/runtime/context/semantic-compaction/prompt.js +7 -7
- package/dist/src/runtime/context/semantic-compaction/run.js +10 -3
- package/dist/src/runtime/context/semantic-compaction/super-source-integrity.js +33 -3
- package/dist/src/runtime/context/session-artifact-paths.d.ts +2 -1
- package/dist/src/runtime/context/session-artifact-paths.js +2 -1
- package/dist/src/runtime/context/session-memory/model-step-controller.d.ts +2 -2
- package/dist/src/runtime/context/super-worker-compaction-failure.d.ts +1 -1
- package/dist/src/runtime/context/super-worker-compaction-failure.js +2 -1
- package/dist/src/runtime/context/super-worker-compaction-sidecar.d.ts +2 -1
- package/dist/src/runtime/context/super-worker-compaction-sidecar.js +9 -3
- package/dist/src/runtime/default-environment-adapters.d.ts +2 -1
- package/dist/src/runtime/default-environment-adapters.js +5 -1
- package/dist/src/runtime/knowledge-skills/available-skills-projection.d.ts +17 -0
- package/dist/src/runtime/knowledge-skills/available-skills-projection.js +66 -0
- package/dist/src/runtime/knowledge-skills/available-skills.d.ts +7 -0
- package/dist/src/runtime/knowledge-skills/available-skills.js +17 -0
- package/dist/src/runtime/knowledge-skills/builtins/abot-studio.d.ts +2 -0
- package/dist/src/runtime/knowledge-skills/builtins/abot-studio.js +27 -0
- package/dist/src/runtime/knowledge-skills/builtins/computer-use.d.ts +2 -0
- package/dist/src/runtime/knowledge-skills/builtins/computer-use.js +34 -0
- package/dist/src/runtime/knowledge-skills/builtins/skill-creator.d.ts +2 -0
- package/dist/src/runtime/knowledge-skills/builtins/skill-creator.js +29 -0
- package/dist/src/runtime/knowledge-skills/builtins/technical-work.d.ts +2 -0
- package/dist/src/runtime/knowledge-skills/builtins/technical-work.js +27 -0
- package/dist/src/runtime/knowledge-skills/catalog.d.ts +2 -0
- package/dist/src/runtime/knowledge-skills/catalog.js +12 -0
- package/dist/src/runtime/knowledge-skills/personal-contracts.d.ts +48 -0
- package/dist/src/runtime/knowledge-skills/personal-contracts.js +29 -0
- package/dist/src/runtime/knowledge-skills/personal-documents.d.ts +6 -0
- package/dist/src/runtime/knowledge-skills/personal-documents.js +56 -0
- package/dist/src/runtime/knowledge-skills/personal-management.d.ts +9 -0
- package/dist/src/runtime/knowledge-skills/personal-management.js +64 -0
- package/dist/src/runtime/knowledge-skills/personal-repository.d.ts +6 -0
- package/dist/src/runtime/knowledge-skills/personal-repository.js +76 -0
- package/dist/src/runtime/knowledge-skills/personal-store.d.ts +4 -0
- package/dist/src/runtime/knowledge-skills/personal-store.js +33 -0
- package/dist/src/runtime/knowledge-skills/read-evidence.d.ts +3 -0
- package/dist/src/runtime/knowledge-skills/read-evidence.js +13 -0
- package/dist/src/runtime/knowledge-skills/store.d.ts +19 -0
- package/dist/src/runtime/knowledge-skills/store.js +41 -0
- package/dist/src/runtime/local-application.d.ts +2 -1
- package/dist/src/runtime/local-host/app-service-dispatch.d.ts +1 -0
- package/dist/src/runtime/local-host/app-service-dispatch.js +5 -0
- package/dist/src/runtime/local-host/client-services.d.ts +3 -1
- package/dist/src/runtime/local-host/client-services.js +3 -2
- package/dist/src/runtime/long-term-memory/conversation-authoring/context.d.ts +7 -1
- package/dist/src/runtime/long-term-memory/conversation-authoring/context.js +51 -25
- package/dist/src/runtime/long-term-memory/conversation-authoring/plain-text-context.d.ts +5 -0
- package/dist/src/runtime/long-term-memory/conversation-authoring/plain-text-context.js +28 -0
- package/dist/src/runtime/long-term-memory/initial-context.d.ts +18 -0
- package/dist/src/runtime/long-term-memory/initial-context.js +57 -0
- package/dist/src/runtime/long-term-memory/projection.js +1 -1
- package/dist/src/runtime/model/context-compaction-admission.d.ts +1 -0
- package/dist/src/runtime/model/context-compaction-admission.js +35 -1
- package/dist/src/runtime/model/context-compaction-contracts.d.ts +9 -1
- package/dist/src/runtime/model/invoke-step.js +6 -2
- package/dist/src/runtime/model/provider-failure.d.ts +13 -0
- package/dist/src/runtime/model/provider-failure.js +37 -0
- package/dist/src/runtime/orchestration/role-calls/activation-budget.js +1 -0
- package/dist/src/runtime/orchestration/role-calls/candidate-validation.js +4 -1
- package/dist/src/runtime/orchestration/role-calls/checkpoint-state.d.ts +1 -1
- package/dist/src/runtime/orchestration/role-calls/checkpoint-state.js +7 -3
- package/dist/src/runtime/orchestration/role-calls/command-decoder.js +3 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/skill-read-transition.d.ts +4 -0
- package/dist/src/runtime/orchestration/role-calls/command-dispatch/skill-read-transition.js +48 -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/contracts.js +3 -3
- package/dist/src/runtime/orchestration/role-calls/ledger.d.ts +2 -1
- package/dist/src/runtime/orchestration/role-calls/ledger.js +2 -2
- package/dist/src/runtime/orchestration/role-calls/memory-recall-contract.d.ts +7 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-state-validation.d.ts +2 -0
- package/dist/src/runtime/orchestration/role-calls/memory-recall-state-validation.js +88 -0
- package/dist/src/runtime/orchestration/role-calls/reducer.d.ts +1 -1
- package/dist/src/runtime/orchestration/role-calls/reducer.js +2 -1
- package/dist/src/runtime/orchestration/role-calls/skill-read.d.ts +47 -0
- package/dist/src/runtime/orchestration/role-calls/skill-read.js +196 -0
- package/dist/src/runtime/orchestration/role-executors/activation/model-output-failure.d.ts +1 -1
- package/dist/src/runtime/orchestration/role-executors/activation/model-output-failure.js +4 -2
- package/dist/src/runtime/orchestration/worker-capabilities/binding/create-binding.js +4 -1
- package/dist/src/runtime/orchestration/worker-capabilities/contracts.d.ts +4 -2
- package/dist/src/runtime/orchestration/worker-capabilities/contracts.js +2 -2
- package/dist/src/runtime/orchestration/worker-capabilities/execution/approval-group.js +10 -4
- package/dist/src/runtime/orchestration/worker-capabilities/execution/execution-freshness.d.ts +5 -0
- package/dist/src/runtime/orchestration/worker-capabilities/execution/execution-freshness.js +31 -0
- package/dist/src/runtime/orchestration/worker-capabilities/payload-compaction-transport.d.ts +2 -0
- package/dist/src/runtime/orchestration/worker-capabilities/payload-compaction-transport.js +7 -2
- package/dist/src/runtime/orchestration/worker-capabilities/supervisor-skill-authority.d.ts +19 -0
- package/dist/src/runtime/orchestration/worker-capabilities/supervisor-skill-authority.js +43 -0
- package/dist/src/runtime/plugins/loader.js +7 -6
- package/dist/src/runtime/plugins/manifest-projection.js +3 -0
- package/dist/src/runtime/request/approval-wait/preflight.js +1 -0
- package/dist/src/runtime/request/bound-runtime-handler.js +1 -0
- package/dist/src/runtime/request/capability-execution-freshness.js +6 -1
- package/dist/src/runtime/request/contracts.d.ts +2 -0
- package/dist/src/runtime/request/execution-agent-root-execution.js +11 -1
- package/dist/src/runtime/request/execution-payload-compacted-evidence.d.ts +2 -2
- package/dist/src/runtime/request/execution-scope-surfaces.d.ts +2 -0
- package/dist/src/runtime/request/execution-scope-surfaces.js +7 -0
- package/dist/src/runtime/request/execution-scope.d.ts +6 -2
- package/dist/src/runtime/request/execution-scope.js +11 -0
- package/dist/src/runtime/request/payload-settled-evidence.d.ts +11 -0
- package/dist/src/runtime/request/payload-settled-evidence.js +29 -0
- package/dist/src/runtime/request/prepared-execution.js +2 -0
- package/dist/src/runtime/request/role-call-delegation-events.d.ts +19 -0
- package/dist/src/runtime/request/role-call-delegation-events.js +52 -0
- package/dist/src/runtime/request/role-call-return-events.d.ts +19 -0
- package/dist/src/runtime/request/role-call-return-events.js +63 -0
- package/dist/src/runtime/request/role-executor-composition.js +2 -2
- package/dist/src/runtime/request/root-capability-binding.d.ts +24 -0
- package/dist/src/runtime/request/root-capability-binding.js +57 -0
- package/dist/src/runtime/request/root-capability-catalog.d.ts +16 -0
- package/dist/src/runtime/request/root-capability-catalog.js +20 -0
- package/dist/src/runtime/request/root-contract.d.ts +13 -1
- package/dist/src/runtime/request/root-execution-kernel.js +36 -68
- package/dist/src/runtime/request/root-reference-action.d.ts +15 -0
- package/dist/src/runtime/request/root-reference-action.js +48 -0
- package/dist/src/runtime/request/root-skill-read.d.ts +13 -0
- package/dist/src/runtime/request/root-skill-read.js +102 -0
- package/dist/src/runtime/request/runner.js +19 -3
- package/dist/src/runtime/request/super-payload-context-failure.js +13 -4
- package/dist/src/runtime/request/supervisor-root-execution.js +54 -1
- package/dist/src/runtime/request/supervisor-skill-edit-target.d.ts +9 -0
- package/dist/src/runtime/request/supervisor-skill-edit-target.js +25 -0
- package/dist/src/runtime/request/supervisor-skill-payload-context.d.ts +21 -0
- package/dist/src/runtime/request/supervisor-skill-payload-context.js +91 -0
- package/dist/src/runtime/request/supervisor-skill-write-preparation.d.ts +25 -0
- package/dist/src/runtime/request/supervisor-skill-write-preparation.js +71 -0
- package/dist/src/runtime/request/worker-capability-composition.d.ts +4 -1
- package/dist/src/runtime/request/worker-capability-composition.js +4 -1
- package/dist/src/runtime/request/worker-capability-payload.d.ts +1 -1
- package/dist/src/runtime/request/worker-capability-payload.js +44 -37
- package/dist/src/runtime/runtime-environment.d.ts +2 -0
- package/dist/src/runtime/runtime-environment.js +12 -1
- package/dist/src/runtime/scheduler/contracts.d.ts +4 -0
- package/dist/src/runtime/scheduler/run-list-filter.d.ts +11 -0
- package/dist/src/runtime/scheduler/run-list-filter.js +56 -0
- package/dist/src/runtime/scheduler/run-list-query.d.ts +2 -2
- package/dist/src/runtime/scheduler/run-list-query.js +4 -1
- package/dist/src/runtime/steps/auditor-decision/contracts.d.ts +2 -0
- package/dist/src/runtime/steps/auditor-decision/evidence-representation.d.ts +2 -2
- package/dist/src/runtime/steps/auditor-decision/evidence-representation.js +2 -34
- package/dist/src/runtime/steps/auditor-decision/input.js +21 -3
- package/dist/src/runtime/steps/auditor-decision/projection.js +5 -0
- package/dist/src/runtime/steps/auditor-decision/prompt.d.ts +1 -1
- package/dist/src/runtime/steps/auditor-decision/prompt.js +14 -3
- package/dist/src/runtime/steps/capability-execution-guidance.d.ts +7 -0
- package/dist/src/runtime/steps/capability-execution-guidance.js +28 -0
- package/dist/src/runtime/steps/capability-execution-instructions.d.ts +0 -2
- package/dist/src/runtime/steps/capability-execution-instructions.js +0 -2
- package/dist/src/runtime/steps/execution-agent/capability-result-context.d.ts +5 -2
- package/dist/src/runtime/steps/execution-agent/capability-result-context.js +22 -3
- package/dist/src/runtime/steps/execution-agent/compaction.d.ts +3 -2
- package/dist/src/runtime/steps/execution-agent/compaction.js +9 -1
- package/dist/src/runtime/steps/execution-agent/contracts.d.ts +10 -0
- package/dist/src/runtime/steps/execution-agent/decision-parsing.js +13 -1
- package/dist/src/runtime/steps/execution-agent/direct-response-configuration.d.ts +3 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-configuration.js +64 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-contract.d.ts +7 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-contract.js +56 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-policy.d.ts +9 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-policy.js +30 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-prompt.d.ts +7 -0
- package/dist/src/runtime/steps/execution-agent/direct-response-prompt.js +43 -0
- package/dist/src/runtime/steps/execution-agent/format.js +2 -0
- package/dist/src/runtime/steps/execution-agent/input.d.ts +2 -0
- package/dist/src/runtime/steps/execution-agent/input.js +35 -2
- package/dist/src/runtime/steps/execution-agent/plugin-catalog.d.ts +4 -0
- package/dist/src/runtime/steps/execution-agent/plugin-catalog.js +8 -0
- package/dist/src/runtime/steps/execution-agent/prompt.d.ts +1 -0
- package/dist/src/runtime/steps/execution-agent/prompt.js +42 -41
- package/dist/src/runtime/steps/execution-agent/refinement-input.d.ts +1 -0
- package/dist/src/runtime/steps/execution-agent/refinement-prompt.js +4 -1
- package/dist/src/runtime/steps/execution-agent/response-prompt.js +1 -0
- package/dist/src/runtime/steps/execution-agent/response-run.js +6 -12
- package/dist/src/runtime/steps/execution-agent/run.js +5 -2
- package/dist/src/runtime/steps/execution-agent/state-context.d.ts +2 -3
- package/dist/src/runtime/steps/execution-agent/state-context.js +3 -40
- package/dist/src/runtime/steps/knowledge-skill-instructions.d.ts +3 -0
- package/dist/src/runtime/steps/knowledge-skill-instructions.js +3 -0
- package/dist/src/runtime/steps/planner-decision/capability-brief.d.ts +4 -2
- package/dist/src/runtime/steps/planner-decision/capability-brief.js +5 -1
- package/dist/src/runtime/steps/planner-decision/input.d.ts +2 -2
- package/dist/src/runtime/steps/planner-decision/input.js +7 -1
- package/dist/src/runtime/steps/planner-decision/prompt.js +29 -49
- package/dist/src/runtime/steps/planner-graph/input.d.ts +2 -2
- package/dist/src/runtime/steps/planner-graph/input.js +9 -8
- package/dist/src/runtime/steps/planner-graph/prompt.js +2 -2
- package/dist/src/runtime/steps/planner-graph/run.d.ts +2 -2
- package/dist/src/runtime/steps/planner-graph/run.js +5 -5
- package/dist/src/runtime/steps/planner-graph/skill-guidance.d.ts +5 -0
- package/dist/src/runtime/steps/planner-graph/skill-guidance.js +62 -0
- package/dist/src/runtime/steps/reviewer-decision/final-evidence.d.ts +1 -0
- package/dist/src/runtime/steps/reviewer-decision/final-evidence.js +3 -1
- package/dist/src/runtime/steps/reviewer-decision/input.d.ts +3 -1
- package/dist/src/runtime/steps/reviewer-decision/input.js +2 -22
- package/dist/src/runtime/steps/reviewer-decision/model-context.d.ts +21 -0
- package/dist/src/runtime/steps/reviewer-decision/model-context.js +32 -1
- package/dist/src/runtime/steps/reviewer-decision/projection.js +4 -0
- package/dist/src/runtime/steps/reviewer-decision/prompt.d.ts +1 -1
- package/dist/src/runtime/steps/reviewer-decision/prompt.js +15 -4
- package/dist/src/runtime/steps/reviewer-decision/run.d.ts +2 -0
- package/dist/src/runtime/steps/reviewer-decision/run.js +6 -0
- package/dist/src/runtime/steps/skill-read-decision.d.ts +34 -0
- package/dist/src/runtime/steps/skill-read-decision.js +91 -0
- package/dist/src/runtime/steps/supervisor-decision/artifact-paths.d.ts +22 -0
- package/dist/src/runtime/steps/supervisor-decision/artifact-paths.js +132 -0
- package/dist/src/runtime/steps/supervisor-decision/capability-brief.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/capability-brief.js +9 -2
- package/dist/src/runtime/steps/supervisor-decision/contracts.d.ts +12 -3
- package/dist/src/runtime/steps/supervisor-decision/contracts.js +3 -0
- package/dist/src/runtime/steps/supervisor-decision/decision-phases.d.ts +37 -0
- package/dist/src/runtime/steps/supervisor-decision/decision-phases.js +124 -0
- package/dist/src/runtime/steps/supervisor-decision/diagnostics.d.ts +5 -1
- package/dist/src/runtime/steps/supervisor-decision/diagnostics.js +4 -0
- package/dist/src/runtime/steps/supervisor-decision/format.d.ts +1 -0
- package/dist/src/runtime/steps/supervisor-decision/format.js +2 -0
- package/dist/src/runtime/steps/supervisor-decision/input.d.ts +8 -1
- package/dist/src/runtime/steps/supervisor-decision/input.js +35 -11
- package/dist/src/runtime/steps/supervisor-decision/parser.d.ts +1 -0
- package/dist/src/runtime/steps/supervisor-decision/parser.js +11 -0
- package/dist/src/runtime/steps/supervisor-decision/preparation-input.d.ts +26 -0
- package/dist/src/runtime/steps/supervisor-decision/preparation-input.js +39 -0
- package/dist/src/runtime/steps/supervisor-decision/preparation.d.ts +17 -0
- package/dist/src/runtime/steps/supervisor-decision/preparation.js +65 -0
- package/dist/src/runtime/steps/supervisor-decision/presentation.d.ts +13 -0
- package/dist/src/runtime/steps/supervisor-decision/presentation.js +47 -0
- package/dist/src/runtime/steps/supervisor-decision/prompt.d.ts +5 -0
- package/dist/src/runtime/steps/supervisor-decision/prompt.js +97 -106
- package/dist/src/runtime/steps/supervisor-decision/response-recommendation.d.ts +2 -0
- package/dist/src/runtime/steps/supervisor-decision/response-recommendation.js +2 -0
- package/dist/src/runtime/steps/supervisor-decision/resume.d.ts +3 -0
- package/dist/src/runtime/steps/supervisor-decision/resume.js +20 -0
- package/dist/src/runtime/steps/supervisor-decision/run.d.ts +7 -0
- package/dist/src/runtime/steps/supervisor-decision/run.js +76 -158
- package/dist/src/runtime/steps/supervisor-decision/skill-selection-input.d.ts +21 -0
- package/dist/src/runtime/steps/supervisor-decision/skill-selection-input.js +29 -0
- package/dist/src/runtime/steps/supervisor-decision/skill-selection.d.ts +16 -0
- package/dist/src/runtime/steps/supervisor-decision/skill-selection.js +44 -0
- package/dist/src/runtime/steps/supervisor-response/input.d.ts +3 -0
- package/dist/src/runtime/steps/supervisor-response/input.js +5 -0
- package/dist/src/runtime/steps/supervisor-response/prompt.js +2 -0
- package/dist/src/runtime/steps/supervisor-response/response-recommendation.d.ts +3 -0
- package/dist/src/runtime/steps/supervisor-response/response-recommendation.js +24 -4
- package/dist/src/runtime/steps/supervisor-response/run.d.ts +7 -0
- package/dist/src/runtime/steps/supervisor-response/run.js +3 -6
- package/dist/src/runtime/steps/supervisor-skill-authoring/contract.d.ts +43 -0
- package/dist/src/runtime/steps/supervisor-skill-authoring/contract.js +85 -0
- package/dist/src/runtime/steps/supervisor-skill-authoring/input.d.ts +35 -0
- package/dist/src/runtime/steps/supervisor-skill-authoring/input.js +87 -0
- package/dist/src/runtime/steps/supervisor-skill-authoring/run.d.ts +10 -0
- package/dist/src/runtime/steps/supervisor-skill-authoring/run.js +35 -0
- package/dist/src/runtime/steps/supervisor-skill-instructions.d.ts +4 -0
- package/dist/src/runtime/steps/supervisor-skill-instructions.js +4 -0
- package/dist/src/runtime/steps/worker-capability-scope-decision.js +14 -1
- package/dist/src/runtime/steps/worker-decision/contracts.d.ts +1 -0
- package/dist/src/runtime/steps/worker-decision/input/execution-guidance.d.ts +5 -0
- package/dist/src/runtime/steps/worker-decision/input/execution-guidance.js +31 -0
- package/dist/src/runtime/steps/worker-decision/input/prompt-context.js +2 -25
- package/dist/src/runtime/steps/worker-decision/input/reference-context.js +4 -0
- package/dist/src/runtime/steps/worker-decision/prompt.js +6 -2
- package/dist/src/runtime/steps/worker-decision/result-author.js +6 -0
- package/dist/src/web-ui/app/ARCHITECTURE.md +1 -1
- package/dist/src/web-ui/app/app-bootstrap.js +3 -0
- package/dist/src/web-ui/app/app.js +7 -1
- package/dist/src/web-ui/app/components/automations/run-history-controls.js +77 -0
- package/dist/src/web-ui/app/components/automations/run-history.js +55 -0
- package/dist/src/web-ui/app/components/automations/run.js +3 -8
- package/dist/src/web-ui/app/components/automations/timeline.js +3 -2
- package/dist/src/web-ui/app/components/automations/workspace.js +11 -2
- package/dist/src/web-ui/app/components/conversation-role-cards.js +27 -0
- package/dist/src/web-ui/app/components/conversation-role-delegations.d.ts +12 -0
- package/dist/src/web-ui/app/components/conversation-role-delegations.js +24 -0
- package/dist/src/web-ui/app/components/conversation-role-history.d.ts +13 -0
- package/dist/src/web-ui/app/components/conversation-role-history.js +81 -0
- package/dist/src/web-ui/app/components/conversation-role-returns.d.ts +12 -0
- package/dist/src/web-ui/app/components/conversation-role-returns.js +23 -0
- package/dist/src/web-ui/app/components/dashboard/compact-layout.js +137 -0
- package/dist/src/web-ui/app/components/dashboard/icons.js +5 -0
- package/dist/src/web-ui/app/components/dashboard/widget-card.js +85 -0
- package/dist/src/web-ui/app/components/dashboard/widget-dialog.js +83 -0
- package/dist/src/web-ui/app/components/dashboard/widget-summaries.js +155 -0
- package/dist/src/web-ui/app/components/dashboard/workspace.js +28 -4
- package/dist/src/web-ui/app/components/onboarding-workspace-access.js +1 -1
- package/dist/src/web-ui/app/components/operations-summary.js +2 -1
- package/dist/src/web-ui/app/components/passive-learning/home-widget-preview.js +32 -0
- package/dist/src/web-ui/app/components/passive-learning/home.js +4 -1
- package/dist/src/web-ui/app/components/schedules/details.js +3 -2
- package/dist/src/web-ui/app/components/skills/workspace.js +119 -0
- package/dist/src/web-ui/app/components/spark-chat/panel.js +1 -1
- package/dist/src/web-ui/app/components/spark-chat/settings.js +1 -1
- package/dist/src/web-ui/app/components/system-host/home-widget-permission-preview.js +75 -0
- package/dist/src/web-ui/app/components/system-host/home-widget-summary.js +93 -0
- package/dist/src/web-ui/app/components/system-host/macos-permission-rendering.js +2 -2
- package/dist/src/web-ui/app/components/system-host/native-windows-access.js +1 -1
- package/dist/src/web-ui/app/components/system-host/rendering.js +3 -3
- package/dist/src/web-ui/app/components/system-host/windows-store-setup.js +2 -2
- package/dist/src/web-ui/app/components/workspace-shell.js +11 -1
- package/dist/src/web-ui/app/computer-access-feature.js +13 -1
- package/dist/src/web-ui/app/configuration-feature.js +2 -0
- package/dist/src/web-ui/app/controllers/automation-read-projection.js +8 -4
- package/dist/src/web-ui/app/controllers/automation-run-actions.js +3 -1
- package/dist/src/web-ui/app/controllers/automation-run-history.js +159 -0
- package/dist/src/web-ui/app/controllers/automations-controller.js +27 -11
- package/dist/src/web-ui/app/controllers/environment-workspace-preparation.js +6 -2
- package/dist/src/web-ui/app/controllers/operations-controller.js +2 -1
- package/dist/src/web-ui/app/controllers/realtime-event-controller.js +22 -1
- package/dist/src/web-ui/app/controllers/reasoning-mode-controller.js +1 -1
- package/dist/src/web-ui/app/controllers/runtime-selection-controller.js +7 -1
- package/dist/src/web-ui/app/controllers/skills-controller.js +237 -0
- package/dist/src/web-ui/app/dashboard-feature.js +9 -0
- package/dist/src/web-ui/app/lib/conversation-role-model.d.ts +5 -0
- package/dist/src/web-ui/app/lib/conversation-role-model.js +63 -5
- package/dist/src/web-ui/app/lib/event-presentation.js +34 -0
- package/dist/src/web-ui/app/lib/reasoning-controls.js +6 -1
- package/dist/src/web-ui/app/lib/role-delegation-event.d.ts +18 -0
- package/dist/src/web-ui/app/lib/role-delegation-event.js +47 -0
- package/dist/src/web-ui/app/lib/role-return-event.d.ts +19 -0
- package/dist/src/web-ui/app/lib/role-return-event.js +36 -0
- package/dist/src/web-ui/app/lib/tool-activity-event.js +8 -6
- package/dist/src/web-ui/app/lib/tool-skill-activity-fields.js +50 -0
- package/dist/src/web-ui/app/lib/workspace-route.js +1 -0
- package/dist/src/web-ui/app/passive-learning-feature.js +2 -2
- package/dist/src/web-ui/app/services/runtime-web-client/automations.d.ts +9 -1
- package/dist/src/web-ui/app/services/runtime-web-client/automations.js +10 -2
- package/dist/src/web-ui/app/services/runtime-web-client/skills.js +23 -0
- package/dist/src/web-ui/app/services/runtime-web-client.js +2 -0
- package/dist/src/web-ui/app/skills-feature.js +36 -0
- package/dist/src/web-ui/app/styles/24-conversation-role-cards.css +58 -0
- package/dist/src/web-ui/app/styles/40-skills.css +34 -0
- package/dist/src/web-ui/app/styles/50-automations.css +24 -3
- package/dist/src/web-ui/app/styles/95-home-widgets.css +110 -0
- package/dist/src/web-ui/app/styles.css +2 -0
- package/dist/src/web-ui/app/ui-behavior.d.ts +1 -1
- package/dist/src/web-ui/app/ui-behavior.js +1 -0
- package/dist/src/web-ui/client-state/store.js +3 -2
- package/dist/src/web-ui/client-state/transaction-order.d.ts +2 -0
- package/dist/src/web-ui/client-state/transaction-order.js +18 -0
- package/dist/src/web-ui/local-runtime/api-router.d.ts +1 -0
- package/dist/src/web-ui/local-runtime/api-router.js +7 -0
- package/dist/src/web-ui/local-runtime/automation-routes.js +2 -1
- package/dist/src/web-ui/local-runtime/automation-run-page.d.ts +5 -0
- package/dist/src/web-ui/local-runtime/automation-run-page.js +26 -0
- package/dist/src/web-ui/local-runtime/skill-management-routes.d.ts +18 -0
- package/dist/src/web-ui/local-runtime/skill-management-routes.js +118 -0
- package/docs/configuration.md +8 -0
- package/docs/plugins.md +37 -32
- package/docs/runtime-public-contracts.md +37 -0
- package/examples/request-runner.config.example.json +3 -0
- package/package.json +1 -1
- package/plugins/capability-brief/plugin.json +1 -1
- package/plugins/code-outline/plugin.json +1 -1
- package/plugins/document-reader/plugin.json +1 -1
- package/plugins/exec/plugin.json +1 -1
- package/plugins/filesystem/plugin.json +1 -1
- package/plugins/json-inspector/plugin.json +1 -1
- package/plugins/local-search/plugin.json +1 -1
- package/plugins/memory/plugin.json +1 -1
- package/plugins/project-orientation/plugin.json +1 -1
- package/plugins/system/plugin.json +1 -1
- package/plugins/system-probe/plugin.json +1 -1
- package/plugins/web/plugin.json +1 -1
- package/plugins/web/skills/web_fetch_skill/SKILL.md +1 -2
- package/plugins/web/skills/web_search_skill/SKILL.md +3 -7
- package/src/runtime/README.md +96 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { hostSetupIsReady } from "./rendering.js";
|
|
2
|
+
import { hasNativePermissionSurface, permissionSummary } from "./macos-permission-rendering.js";
|
|
3
|
+
import { canCheckMacPermissions, canCheckNativePermissions, permissionsMatchConnection, permissionsMatchNativeOwner } from "./macos-permission-scopes.js";
|
|
4
|
+
|
|
5
|
+
function currentPermissionScopes(state) {
|
|
6
|
+
const snapshot = state.snapshot;
|
|
7
|
+
const scopes = [];
|
|
8
|
+
if (snapshot.identity?.os === "macos") {
|
|
9
|
+
scopes.push({
|
|
10
|
+
available: canCheckMacPermissions(snapshot),
|
|
11
|
+
current: permissionsMatchConnection(state.macPermissions, snapshot),
|
|
12
|
+
receipt: state.macPermissions,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
if (hasNativePermissionSurface(snapshot)) {
|
|
16
|
+
const environmentId = snapshot.nativePermissions?.environmentId;
|
|
17
|
+
scopes.push({
|
|
18
|
+
available: canCheckNativePermissions(snapshot, environmentId),
|
|
19
|
+
current: permissionsMatchNativeOwner(state.nativeMacPermissions, snapshot, environmentId),
|
|
20
|
+
receipt: state.nativeMacPermissions,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return scopes;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function scopeRequiresPermission(scope) {
|
|
27
|
+
if (!scope.current) return false;
|
|
28
|
+
return permissionSummary(scope.receipt) === "action needed";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function scopeHasGrantedPermissions(scope) {
|
|
32
|
+
if (!scope.current) return false;
|
|
33
|
+
return permissionSummary(scope.receipt) === "granted";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function scopeCannotCheckPermissions(scope) {
|
|
37
|
+
return !scope.available;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function computerPermissionIndicator(state) {
|
|
41
|
+
const scopes = currentPermissionScopes(state);
|
|
42
|
+
if (scopes.some(scopeRequiresPermission))
|
|
43
|
+
return { icon: "failed", label: "Required", tone: "attention" };
|
|
44
|
+
if (!scopes.length)
|
|
45
|
+
return { icon: "neutral", label: "Unavailable", tone: "neutral" };
|
|
46
|
+
if (scopes.some(scopeCannotCheckPermissions))
|
|
47
|
+
return { icon: "paused", label: "Unavailable", tone: "neutral" };
|
|
48
|
+
if (scopes.every(scopeHasGrantedPermissions))
|
|
49
|
+
return { icon: "success", label: "Granted", tone: "success" };
|
|
50
|
+
return { icon: "unknown", label: "Not checked", tone: "neutral" };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function canPreviewConnectedComputer(state) {
|
|
54
|
+
if (state.snapshot?.connected !== true) return false;
|
|
55
|
+
if (!hostSetupIsReady(state.snapshot)) return false;
|
|
56
|
+
if (state.busy) return false;
|
|
57
|
+
if (state.downloaded) return false;
|
|
58
|
+
if (state.manualMac) return false;
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Project current receipts without requesting permissions or changing connection state. */
|
|
63
|
+
export function computerWidgetPreview(state, title, status) {
|
|
64
|
+
if (!canPreviewConnectedComputer(state)) return null;
|
|
65
|
+
const os = state.snapshot.identity?.os;
|
|
66
|
+
return {
|
|
67
|
+
kind: "computer",
|
|
68
|
+
title,
|
|
69
|
+
detail: { macos: "macOS", windows: "Windows", linux: "Linux" }[os] || os || "Unknown OS",
|
|
70
|
+
items: [
|
|
71
|
+
{ label: "Connection", indicator: { icon: "success", label: status, tone: "success" } },
|
|
72
|
+
{ label: "Permissions", indicator: computerPermissionIndicator(state) },
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { connectionDescription, connectionStatus, connectionTitle, hostSetupIsReady } from "./rendering.js";
|
|
2
|
+
import { isNativeWindowsLocalAccess, nativeWindowsAccessPresentation } from "./native-windows-access.js";
|
|
3
|
+
import { computerWidgetPreview } from "./home-widget-permission-preview.js";
|
|
4
|
+
import { macPermissionSummary, permissionSummary } from "./macos-permission-rendering.js";
|
|
5
|
+
import { permissionsMatchConnection, permissionsMatchNativeOwner } from "./macos-permission-scopes.js";
|
|
6
|
+
import { storeConnectionStage, storeConnectionDisplayContent, windowsStorePanelIsAvailable } from "./windows-store-setup.js";
|
|
7
|
+
|
|
8
|
+
function currentMacPermissionStates(state) {
|
|
9
|
+
const snapshot = state.snapshot;
|
|
10
|
+
const states = [];
|
|
11
|
+
if (permissionsMatchConnection(state.macPermissions, snapshot))
|
|
12
|
+
states.push(permissionSummary(state.macPermissions));
|
|
13
|
+
if (permissionsMatchNativeOwner(state.nativeMacPermissions, snapshot, snapshot?.nativePermissions?.environmentId))
|
|
14
|
+
states.push(permissionSummary(state.nativeMacPermissions));
|
|
15
|
+
return states;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function hasComputerActionFailure(state) {
|
|
19
|
+
return Boolean(state.error || state.actionError || state.macPermissionError || state.nativeMacPermissionError);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function computerPermissionTone(state, permissionText) {
|
|
23
|
+
if (hasComputerActionFailure(state)) return "attention";
|
|
24
|
+
const status = connectionStatus(state.snapshot, state.statusUnavailable, state.busy);
|
|
25
|
+
if (["Paired · offline", "Update needed", "Computer access unavailable"].includes(status)) return "attention";
|
|
26
|
+
const states = currentMacPermissionStates(state);
|
|
27
|
+
if (states.includes("action needed")) return "attention";
|
|
28
|
+
// A connected Mac with unmeasured or unavailable permissions is not all-clear.
|
|
29
|
+
if (permissionText) return "neutral";
|
|
30
|
+
if (hostSetupIsReady(state.snapshot)) return "success";
|
|
31
|
+
return "neutral";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function windowsStoreTone(state, stage) {
|
|
35
|
+
if (hasComputerActionFailure(state)) return "attention";
|
|
36
|
+
if (state.busy) return "neutral";
|
|
37
|
+
const tones = { ready: "success", reconnect: "attention", expired: "attention", "confirm-repair": "attention", preparing: "active", repairing: "active", waiting: "active", open: "active" };
|
|
38
|
+
return tones[stage] || "neutral";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function nativeWindowsTone(state, status) {
|
|
42
|
+
if (hasComputerActionFailure(state)) return "attention";
|
|
43
|
+
if (status === "Check needed") return "attention";
|
|
44
|
+
return "neutral";
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function windowsStoreSummary(state) {
|
|
48
|
+
const snapshot = state.snapshot;
|
|
49
|
+
const invitation = state.windowsStoreInvitation;
|
|
50
|
+
const stage = storeConnectionStage(snapshot, invitation, state.windowsStoreAttempt);
|
|
51
|
+
const content = storeConnectionDisplayContent(stage, snapshot, invitation, state.busy, state.statusUnavailable);
|
|
52
|
+
return {
|
|
53
|
+
title: snapshot.identity?.name || content.step,
|
|
54
|
+
detail: state.error || state.actionError || state.message || content.copy,
|
|
55
|
+
status: content.status,
|
|
56
|
+
tone: windowsStoreTone(state, stage),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Connection and process-bound permission receipts stay separate facts. */
|
|
61
|
+
export function computerAccessWidgetSummary(state = {}, supported = true) {
|
|
62
|
+
const input = { ...state, supported };
|
|
63
|
+
if (!supported)
|
|
64
|
+
return { title: "Computer connection unavailable", detail: "Computer access setup requires the local Runtime backend.", status: "Unavailable", tone: "neutral" };
|
|
65
|
+
if (state.statusUnavailable)
|
|
66
|
+
return { title: "Check your computer connection", detail: "The current connection status could not be checked.", status: "Status unavailable", tone: "attention" };
|
|
67
|
+
if (!state.snapshot)
|
|
68
|
+
return { title: "Checking this computer…", detail: "", status: "Checking", tone: "neutral" };
|
|
69
|
+
if (isNativeWindowsLocalAccess(state.snapshot)) {
|
|
70
|
+
const presentation = nativeWindowsAccessPresentation(input);
|
|
71
|
+
return {
|
|
72
|
+
title: presentation.title,
|
|
73
|
+
detail: state.error || state.actionError || state.message || presentation.description,
|
|
74
|
+
status: presentation.status,
|
|
75
|
+
tone: nativeWindowsTone(state, presentation.status),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (windowsStorePanelIsAvailable(state.snapshot)) return windowsStoreSummary(state);
|
|
79
|
+
const permissionText = macPermissionSummary(state.snapshot, state.macPermissions, state.nativeMacPermissions);
|
|
80
|
+
const title = state.snapshot.identity?.name || connectionTitle(input);
|
|
81
|
+
if (state.busy)
|
|
82
|
+
return { title, detail: "Waiting for the current connection status…", status: "Checking", tone: "neutral" };
|
|
83
|
+
const feedback = state.error || state.actionError || state.macPermissionError || state.nativeMacPermissionError || state.message;
|
|
84
|
+
const status = connectionStatus(state.snapshot, state.statusUnavailable, state.busy);
|
|
85
|
+
const preview = feedback ? null : computerWidgetPreview(state, title, status);
|
|
86
|
+
return {
|
|
87
|
+
title,
|
|
88
|
+
detail: feedback || permissionText || connectionDescription(input),
|
|
89
|
+
status,
|
|
90
|
+
tone: computerPermissionTone(state, permissionText),
|
|
91
|
+
...(preview ? { preview } : {}),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { escapeHtml } from "../../lib/text-format.js";
|
|
2
2
|
import { canCheckMacPermissions, canCheckNativePermissions, permissionsMatchConnection, permissionsMatchNativeOwner } from "./macos-permission-scopes.js";
|
|
3
3
|
|
|
4
|
-
function hasNativePermissionSurface(snapshot) {
|
|
4
|
+
export function hasNativePermissionSurface(snapshot) {
|
|
5
5
|
if (snapshot?.identity?.os === "macos") return true;
|
|
6
6
|
if (!snapshot?.nativePermissions) return false;
|
|
7
7
|
return snapshot.nativePermissions.reason !== "native_macos_unavailable";
|
|
8
8
|
}
|
|
9
|
-
function permissionSummary(receipt) {
|
|
9
|
+
export function permissionSummary(receipt) {
|
|
10
10
|
if (!receipt) return "not checked";
|
|
11
11
|
if (receipt.permissions.screenRecording !== "granted") return "action needed";
|
|
12
12
|
if (receipt.permissions.accessibility !== "granted") return "action needed";
|
|
@@ -11,7 +11,7 @@ export function shouldRenderNativeWindowsAccess(input) {
|
|
|
11
11
|
return isNativeWindowsLocalAccess(input.snapshot);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function nativeWindowsAccessPresentation(input) {
|
|
14
|
+
export function nativeWindowsAccessPresentation(input) {
|
|
15
15
|
if (input.statusUnavailable) return {
|
|
16
16
|
title: "Check Windows access", status: "Status unavailable",
|
|
17
17
|
description: "The current local access status could not be checked. Refresh to try again.",
|
|
@@ -23,7 +23,7 @@ function pairedCompanionIsOffline(snapshot) {
|
|
|
23
23
|
function hasDirectAccess(snapshot) {
|
|
24
24
|
return ["native", "wsl_interop"].includes(snapshot?.readiness?.route);
|
|
25
25
|
}
|
|
26
|
-
function connectionStatus(snapshot, statusUnavailable, busy) {
|
|
26
|
+
export function connectionStatus(snapshot, statusUnavailable, busy) {
|
|
27
27
|
if (statusUnavailable) return "Status unavailable";
|
|
28
28
|
if (busy || !snapshot) return "Checking";
|
|
29
29
|
if (hostSetupIsReady(snapshot)) return snapshot.identity?.os === "macos" ? "Connected" : "Ready";
|
|
@@ -42,7 +42,7 @@ function readyDescription(snapshot) {
|
|
|
42
42
|
return "Direct commands are available. No extra installation is needed for direct commands.";
|
|
43
43
|
return "You can use computer tools from your ABot chat. Permissions and Spark collection are managed separately.";
|
|
44
44
|
}
|
|
45
|
-
function connectionTitle({ snapshot, supported, statusUnavailable, busy }) {
|
|
45
|
+
export function connectionTitle({ snapshot, supported, statusUnavailable, busy }) {
|
|
46
46
|
if (!supported) return "Computer connection unavailable";
|
|
47
47
|
if (statusUnavailable) return "Check your computer connection";
|
|
48
48
|
if (busy || !snapshot) return "Checking this computer…";
|
|
@@ -55,7 +55,7 @@ function connectionTitle({ snapshot, supported, statusUnavailable, busy }) {
|
|
|
55
55
|
if (platforms.length === 1 && platforms[0] === "linux") return "Connect your Linux computer";
|
|
56
56
|
return "Connect your computer";
|
|
57
57
|
}
|
|
58
|
-
function connectionDescription({ snapshot, supported, statusUnavailable, busy }) {
|
|
58
|
+
export function connectionDescription({ snapshot, supported, statusUnavailable, busy }) {
|
|
59
59
|
if (!supported) return "Computer access setup requires the local Runtime backend.";
|
|
60
60
|
if (statusUnavailable) return "The current connection status could not be checked. Refresh to try again.";
|
|
61
61
|
if (busy || !snapshot) return "Waiting for the current connection status…";
|
|
@@ -41,7 +41,7 @@ function storeRepairConfirmationIsCurrent(snapshot, attempt) {
|
|
|
41
41
|
return attempt?.phase === "confirm-repair";
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function storeConnectionStage(snapshot, invitation, attempt) {
|
|
44
|
+
export function storeConnectionStage(snapshot, invitation, attempt) {
|
|
45
45
|
if (snapshot?.readiness?.ready === true) return "ready";
|
|
46
46
|
if (attempt?.phase === "repairing") return "repairing";
|
|
47
47
|
if (storeRepairConfirmationIsCurrent(snapshot, attempt)) return "confirm-repair";
|
|
@@ -111,7 +111,7 @@ function connectionStageContent(stage, snapshot, invitation, disabled) {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
function storeConnectionDisplayContent(stage, snapshot, invitation, disabled, statusUnavailable) {
|
|
114
|
+
export function storeConnectionDisplayContent(stage, snapshot, invitation, disabled, statusUnavailable) {
|
|
115
115
|
if (statusUnavailable) return {
|
|
116
116
|
status: "Status unavailable", step: "Check your computer connection",
|
|
117
117
|
copy: "The current connection status could not be checked. Refresh to try again.",
|
|
@@ -74,6 +74,7 @@ export function createWorkspaceShell({
|
|
|
74
74
|
const automationsWorkspace = shellState.workspace === "automations";
|
|
75
75
|
const learningWorkspace = shellState.workspace === "learning";
|
|
76
76
|
const memoryWorkspace = shellState.workspace === "memory";
|
|
77
|
+
const skillsWorkspace = shellState.workspace === "skills";
|
|
77
78
|
const notificationsWorkspace = shellState.workspace === "notifications";
|
|
78
79
|
const sessions = sidebarLayout();
|
|
79
80
|
const showSessionsToggle = chatWorkspace && !sessions.docked;
|
|
@@ -128,6 +129,12 @@ export function createWorkspaceShell({
|
|
|
128
129
|
"aria-hidden",
|
|
129
130
|
String(!memoryWorkspace),
|
|
130
131
|
);
|
|
132
|
+
if (dom.skillsWorkspacePanel) {
|
|
133
|
+
dom.skillsWorkspacePanel.hidden = !skillsWorkspace;
|
|
134
|
+
dom.skillsWorkspacePanel.inert = !skillsWorkspace;
|
|
135
|
+
dom.skillsWorkspacePanel.setAttribute("aria-hidden", String(!skillsWorkspace));
|
|
136
|
+
}
|
|
137
|
+
setCurrentPage(dom.skillsWorkspaceButton, skillsWorkspace);
|
|
131
138
|
if (dom.notificationsWorkspacePanel) {
|
|
132
139
|
dom.notificationsWorkspacePanel.hidden = !notificationsWorkspace;
|
|
133
140
|
dom.notificationsWorkspacePanel.inert = !notificationsWorkspace;
|
|
@@ -263,6 +270,7 @@ export function createWorkspaceShell({
|
|
|
263
270
|
automations: dom.closeAutomationsWorkspaceButton,
|
|
264
271
|
learning: dom.closeLearningWorkspaceButton,
|
|
265
272
|
memory: dom.closeMemoryWorkspaceButton,
|
|
273
|
+
skills: dom.closeSkillsWorkspaceButton,
|
|
266
274
|
config: dom.closeConfigWorkspaceButton,
|
|
267
275
|
models: dom.closeConfigWorkspaceButton,
|
|
268
276
|
plugins: dom.closeConfigWorkspaceButton,
|
|
@@ -342,7 +350,7 @@ export function createWorkspaceShell({
|
|
|
342
350
|
setSessionsDrawerOpen(false, { restoreFocus: true });
|
|
343
351
|
return true;
|
|
344
352
|
}
|
|
345
|
-
if (["config", "models", "plugins", "schedules", "automations", "learning", "memory", "notifications"].includes(shellState.workspace)) {
|
|
353
|
+
if (["config", "models", "plugins", "schedules", "automations", "learning", "memory", "skills", "notifications"].includes(shellState.workspace)) {
|
|
346
354
|
return activateWorkspace("chat");
|
|
347
355
|
}
|
|
348
356
|
return false;
|
|
@@ -351,6 +359,8 @@ export function createWorkspaceShell({
|
|
|
351
359
|
function bind() {
|
|
352
360
|
if (shellState.bound) return;
|
|
353
361
|
shellState.bound = true;
|
|
362
|
+
dom.skillsWorkspaceButton?.addEventListener("click", () => activateWorkspace("skills"));
|
|
363
|
+
dom.closeSkillsWorkspaceButton?.addEventListener("click", () => activateWorkspace("chat"));
|
|
354
364
|
dom.notificationsWorkspaceButton?.addEventListener("click", () => activateWorkspace("notifications"));
|
|
355
365
|
dom.closeNotificationsWorkspaceButton?.addEventListener("click", () => activateWorkspace("chat"));
|
|
356
366
|
dom.homeWorkspaceButton?.addEventListener("click", () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSystemHostConnectionManager } from "./components/system-host/manager.js";
|
|
2
2
|
import { createSystemHostSetupNotice } from "./components/system-host/setup-notice.js";
|
|
3
|
+
import { computerAccessWidgetSummary } from "./components/system-host/home-widget-summary.js";
|
|
3
4
|
|
|
4
5
|
/** One connection owner for configured Home and its shared chat notice. */
|
|
5
6
|
export function createComputerAccessFeature({
|
|
@@ -7,11 +8,13 @@ export function createComputerAccessFeature({
|
|
|
7
8
|
runtimeClient,
|
|
8
9
|
getEnvironmentId = () => "",
|
|
9
10
|
isComputerAccessAvailable = () => true,
|
|
11
|
+
compactHomeWidgets,
|
|
10
12
|
onChange = () => {},
|
|
11
13
|
}) {
|
|
12
14
|
const documentRoot = dom.homeDashboardRoot?.ownerDocument;
|
|
13
15
|
const root = documentRoot?.createElement("section");
|
|
14
16
|
let notice;
|
|
17
|
+
let unregisterWidget = () => {};
|
|
15
18
|
const connection = createSystemHostConnectionManager({
|
|
16
19
|
documentRoot,
|
|
17
20
|
compact: true,
|
|
@@ -27,6 +30,7 @@ export function createComputerAccessFeature({
|
|
|
27
30
|
supportsConnection: () => runtimeClient.supportsSystemHostConnection(),
|
|
28
31
|
onChange: () => {
|
|
29
32
|
notice?.render();
|
|
33
|
+
compactHomeWidgets?.refresh();
|
|
30
34
|
onChange();
|
|
31
35
|
},
|
|
32
36
|
});
|
|
@@ -35,7 +39,7 @@ export function createComputerAccessFeature({
|
|
|
35
39
|
if (!isComputerAccessAvailable()) return false;
|
|
36
40
|
dom.homeWorkspaceButton?.click();
|
|
37
41
|
if (dom.homeWorkspacePanel?.hidden !== false || !root) return false;
|
|
38
|
-
connection.openManagement();
|
|
42
|
+
if (!compactHomeWidgets?.open("computer")) connection.openManagement();
|
|
39
43
|
root.scrollIntoView?.({ block: "start", behavior: "smooth" });
|
|
40
44
|
root.focus({ preventScroll: true });
|
|
41
45
|
return true;
|
|
@@ -45,6 +49,7 @@ export function createComputerAccessFeature({
|
|
|
45
49
|
const ready = isComputerAccessAvailable();
|
|
46
50
|
if (root) root.hidden = !ready;
|
|
47
51
|
connection.setActive(ready);
|
|
52
|
+
compactHomeWidgets?.refresh();
|
|
48
53
|
notice?.render();
|
|
49
54
|
}
|
|
50
55
|
|
|
@@ -71,6 +76,12 @@ export function createComputerAccessFeature({
|
|
|
71
76
|
dom.homeDashboardRoot,
|
|
72
77
|
);
|
|
73
78
|
connection.mount(root);
|
|
79
|
+
unregisterWidget = compactHomeWidgets?.register({
|
|
80
|
+
id: "computer", label: "Computer access", icon: "computer", element: root,
|
|
81
|
+
isAvailable: isComputerAccessAvailable,
|
|
82
|
+
getSummary: () => computerAccessWidgetSummary(connection.state, runtimeClient.supportsSystemHostConnection()),
|
|
83
|
+
onOpen: connection.openManagement,
|
|
84
|
+
}) || unregisterWidget;
|
|
74
85
|
runtimeAvailabilityChanged();
|
|
75
86
|
}
|
|
76
87
|
dom.environmentSelect?.addEventListener("change", connection.environmentChanged);
|
|
@@ -80,6 +91,7 @@ export function createComputerAccessFeature({
|
|
|
80
91
|
open,
|
|
81
92
|
runtimeAvailabilityChanged,
|
|
82
93
|
dispose() {
|
|
94
|
+
unregisterWidget();
|
|
83
95
|
dom.environmentSelect?.removeEventListener("change", connection.environmentChanged);
|
|
84
96
|
notice.dispose();
|
|
85
97
|
connection.dispose();
|
|
@@ -22,6 +22,7 @@ export function createConfigurationFeature({
|
|
|
22
22
|
getLearningSnapshot = () => null,
|
|
23
23
|
isRuntimeReady = () => true,
|
|
24
24
|
isComputerAccessAvailable = () => true,
|
|
25
|
+
compactHomeWidgets,
|
|
25
26
|
}) {
|
|
26
27
|
let configWorkspace;
|
|
27
28
|
let activation;
|
|
@@ -107,6 +108,7 @@ export function createConfigurationFeature({
|
|
|
107
108
|
let homeSetupSuggestion;
|
|
108
109
|
const computerAccess = createComputerAccessFeature({
|
|
109
110
|
dom,
|
|
111
|
+
compactHomeWidgets,
|
|
110
112
|
runtimeClient,
|
|
111
113
|
getEnvironmentId: selectedEnvironmentId,
|
|
112
114
|
isComputerAccessAvailable,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { automationRunPage } from "./automation-run-history.js";
|
|
2
|
+
|
|
1
3
|
export function validationResult(value) {
|
|
2
4
|
if (Array.isArray(value)) return { issues: value };
|
|
3
5
|
if (Array.isArray(value?.issues)) return value;
|
|
@@ -17,11 +19,12 @@ export async function readAutomationList(client, environmentId) {
|
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export async function readAutomationSelection(client, automationId, runId, environmentId
|
|
22
|
+
export async function readAutomationSelection(client, automationId, runId, environmentId,
|
|
23
|
+
{ runsQuery = { limit: 50 } } = {}) {
|
|
21
24
|
const [draftResponse, catalog, runsResponse, runResponse] = await Promise.all([
|
|
22
25
|
client.getAutomationDraft(automationId, environmentId),
|
|
23
26
|
client.getAutomationCatalog(automationId, environmentId),
|
|
24
|
-
client.listAutomationRuns(automationId, environmentId),
|
|
27
|
+
runsQuery ? client.listAutomationRuns(automationId, environmentId, runsQuery) : Promise.resolve(null),
|
|
25
28
|
runId ? client.getAutomationRun(runId, environmentId) : Promise.resolve(null),
|
|
26
29
|
]);
|
|
27
30
|
if (runResponse?.run && runResponse.run.automationId !== automationId)
|
|
@@ -32,7 +35,7 @@ export async function readAutomationSelection(client, automationId, runId, envir
|
|
|
32
35
|
grant: draftResponse.grant || null,
|
|
33
36
|
validation: validationResult(draftResponse.validation),
|
|
34
37
|
catalog,
|
|
35
|
-
|
|
38
|
+
...(runsResponse ? automationRunPage(runsResponse) : {}),
|
|
36
39
|
run: runResponse?.run || null,
|
|
37
40
|
};
|
|
38
41
|
}
|
|
@@ -41,7 +44,8 @@ export async function readAutomationBackgroundProjection(client, identity) {
|
|
|
41
44
|
const [list, selected, evidenceResponse] = await Promise.all([
|
|
42
45
|
readAutomationList(client, identity.environmentId),
|
|
43
46
|
identity.automationId
|
|
44
|
-
? readAutomationSelection(client, identity.automationId, identity.runId, identity.environmentId
|
|
47
|
+
? readAutomationSelection(client, identity.automationId, identity.runId, identity.environmentId,
|
|
48
|
+
{ runsQuery: identity.runsQuery })
|
|
45
49
|
: Promise.resolve(null),
|
|
46
50
|
identity.runId && identity.nodeId
|
|
47
51
|
? client.getAutomationStepEvidence(identity.runId, identity.nodeId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Async run commands retain the view that authorized them through every read. */
|
|
2
|
-
export function createAutomationRunActions({ client, mutation, publish, loadSelected, openRun,
|
|
2
|
+
export function createAutomationRunActions({ client, mutation, publish, loadSelected, refreshRunHistory, openRun,
|
|
3
3
|
captureView }) {
|
|
4
4
|
const pendingStarts = new Set();
|
|
5
5
|
const runStartKey = (view) => JSON.stringify([view.environmentId, view.automationId]);
|
|
@@ -10,6 +10,8 @@ export function createAutomationRunActions({ client, mutation, publish, loadSele
|
|
|
10
10
|
const continuation = view.captureContinuation();
|
|
11
11
|
const refreshed = await loadSelected(view.automationId, "", continuation.isCurrent);
|
|
12
12
|
if (!refreshed || !continuation.isCurrent()) return false;
|
|
13
|
+
await refreshRunHistory(continuation.isCurrent);
|
|
14
|
+
if (!continuation.isCurrent()) return false;
|
|
13
15
|
return openRun(result.run.id, continuation.ownsMutation);
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
const PAGE_SIZE = 50;
|
|
2
|
+
const emptyFilters = () => ({ status: "", from: "", to: "" });
|
|
3
|
+
|
|
4
|
+
function localDay(value) {
|
|
5
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return null;
|
|
6
|
+
const [year, month, day] = value.split("-").map(Number);
|
|
7
|
+
const date = new Date(0);
|
|
8
|
+
date.setFullYear(year, month - 1, day);
|
|
9
|
+
date.setHours(0, 0, 0, 0);
|
|
10
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day)
|
|
11
|
+
return null;
|
|
12
|
+
return date;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function historyQuery(filters) {
|
|
16
|
+
const query = { limit: PAGE_SIZE };
|
|
17
|
+
if (filters.status) query.status = filters.status;
|
|
18
|
+
const from = filters.from ? localDay(filters.from) : null;
|
|
19
|
+
const to = filters.to ? localDay(filters.to) : null;
|
|
20
|
+
if (filters.from && !from) throw new Error("Choose a valid start date.");
|
|
21
|
+
if (filters.to && !to) throw new Error("Choose a valid end date.");
|
|
22
|
+
if (to) to.setDate(to.getDate() + 1);
|
|
23
|
+
if (from && to && from >= to) throw new Error("The end date must be on or after the start date.");
|
|
24
|
+
if (from) query.from = from.toISOString();
|
|
25
|
+
if (to) query.to = to.toISOString();
|
|
26
|
+
return query;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function automationRunPage(response) {
|
|
30
|
+
return {
|
|
31
|
+
runs: Array.isArray(response?.runs) ? response.runs : [],
|
|
32
|
+
runsNextCursor: typeof response?.nextCursor === "string" ? response.nextCursor : null,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function appendRunPage(runs, page) {
|
|
37
|
+
const entries = new Map(runs.map((run) => [run.id, run]));
|
|
38
|
+
for (const run of page) entries.set(run.id, run);
|
|
39
|
+
return [...entries.values()];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** History belongs to an automation/environment, independently of its selected report. */
|
|
43
|
+
export function createAutomationRunHistory({ state, client, getEnvironmentId, publish, errorLabel }) {
|
|
44
|
+
let revision = 0;
|
|
45
|
+
let loaded = false;
|
|
46
|
+
let pages = 0;
|
|
47
|
+
let failedRead = null;
|
|
48
|
+
let pendingFilters = null;
|
|
49
|
+
|
|
50
|
+
function resetScope() {
|
|
51
|
+
revision += 1;
|
|
52
|
+
loaded = false;
|
|
53
|
+
pages = 0;
|
|
54
|
+
failedRead = null;
|
|
55
|
+
pendingFilters = null;
|
|
56
|
+
Object.assign(state, { runs: [], runsNextCursor: null, runsLoading: false,
|
|
57
|
+
runsError: "", runsFilterError: "", runsFilters: emptyFilters() });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function captureScope() {
|
|
61
|
+
const environmentId = getEnvironmentId(), automationId = state.selectedAutomationId;
|
|
62
|
+
const capturedRevision = revision;
|
|
63
|
+
return { environmentId, automationId, isCurrent: () => capturedRevision === revision &&
|
|
64
|
+
environmentId === getEnvironmentId() && automationId === state.selectedAutomationId };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function canRefreshFirstPage(refresh) {
|
|
68
|
+
if (state.runsLoading) return false;
|
|
69
|
+
if (failedRead) return false;
|
|
70
|
+
if (!loaded) return true;
|
|
71
|
+
return refresh && pages < 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function captureRead({ refresh = false } = {}) {
|
|
75
|
+
const scope = captureScope();
|
|
76
|
+
const query = scope.automationId && canRefreshFirstPage(refresh) ? historyQuery(state.runsFilters) : null;
|
|
77
|
+
return { query, isCurrent: scope.isCurrent, accept(projection) {
|
|
78
|
+
if (!query || !scope.isCurrent()) return;
|
|
79
|
+
state.runs = projection.runs;
|
|
80
|
+
state.runsNextCursor = projection.runsNextCursor;
|
|
81
|
+
loaded = true;
|
|
82
|
+
pages = 1;
|
|
83
|
+
} };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function readPage(filters, query, kind, isCurrent = () => true) {
|
|
87
|
+
revision += 1;
|
|
88
|
+
const scope = captureScope();
|
|
89
|
+
const canApplyHistoryRead = () => scope.isCurrent() && isCurrent();
|
|
90
|
+
failedRead = null;
|
|
91
|
+
pendingFilters = filters;
|
|
92
|
+
state.runsLoading = true;
|
|
93
|
+
state.runsError = "";
|
|
94
|
+
state.runsFilterError = "";
|
|
95
|
+
publish();
|
|
96
|
+
try {
|
|
97
|
+
const response = await client.listAutomationRuns(scope.automationId, scope.environmentId, query);
|
|
98
|
+
if (!canApplyHistoryRead()) return false;
|
|
99
|
+
const page = automationRunPage(response);
|
|
100
|
+
state.runs = kind === "more" ? appendRunPage(state.runs, page.runs) : page.runs;
|
|
101
|
+
state.runsNextCursor = page.runsNextCursor;
|
|
102
|
+
state.runsFilters = filters;
|
|
103
|
+
loaded = true;
|
|
104
|
+
pages = kind === "more" ? pages + 1 : 1;
|
|
105
|
+
return true;
|
|
106
|
+
} catch (error) {
|
|
107
|
+
if (!canApplyHistoryRead()) return false;
|
|
108
|
+
if (kind === "filter") {
|
|
109
|
+
state.runsFilterError = errorLabel(error);
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
state.runsError = errorLabel(error);
|
|
113
|
+
failedRead = { filters, query, kind };
|
|
114
|
+
return false;
|
|
115
|
+
} finally {
|
|
116
|
+
if (scope.isCurrent()) {
|
|
117
|
+
pendingFilters = null;
|
|
118
|
+
state.runsLoading = false;
|
|
119
|
+
publish();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async function setRunFilters(input) {
|
|
125
|
+
if (!state.selectedAutomationId) return false;
|
|
126
|
+
const filters = { status: input?.status || "", from: input?.from || "", to: input?.to || "" };
|
|
127
|
+
let query;
|
|
128
|
+
try { query = historyQuery(filters); }
|
|
129
|
+
catch (error) {
|
|
130
|
+
state.runsFilterError = errorLabel(error);
|
|
131
|
+
publish();
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
return readPage(filters, query, "filter");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function loadMoreRuns() {
|
|
138
|
+
if (!state.selectedAutomationId || !state.runsNextCursor || state.runsLoading) return false;
|
|
139
|
+
return readPage(state.runsFilters,
|
|
140
|
+
{ ...historyQuery(state.runsFilters), cursor: state.runsNextCursor }, "more");
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function resetRunHistory({ isCurrent = () => true, supersede = false } = {}) {
|
|
144
|
+
if (!state.selectedAutomationId || !isCurrent()) return false;
|
|
145
|
+
if (state.runsLoading && !supersede) return false;
|
|
146
|
+
const filters = pendingFilters || state.runsFilters;
|
|
147
|
+
return readPage(filters, historyQuery(filters), "reset", isCurrent);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function retryRunHistory() {
|
|
151
|
+
if (!failedRead || state.runsLoading) return false;
|
|
152
|
+
const { filters, query, kind } = failedRead;
|
|
153
|
+
return readPage(filters, query, kind);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
resetScope();
|
|
157
|
+
return { resetScope, captureRead, revision: () => revision,
|
|
158
|
+
setRunFilters, loadMoreRuns, resetRunHistory, retryRunHistory };
|
|
159
|
+
}
|