@ai-setting/roy-agent-cli 1.3.15 → 1.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/roy +0 -0
- package/dist/bin/roy.js +4 -3
- package/dist/cli/src/bin/roy.d.ts +6 -0
- package/dist/cli/src/bin/roy.js +10 -0
- package/dist/cli/src/cli.d.ts +5 -0
- package/dist/cli/src/cli.js +96 -0
- package/dist/cli/src/commands/act.d.ts +44 -0
- package/dist/cli/src/commands/act.js +415 -0
- package/dist/cli/src/commands/commands-add.d.ts +17 -0
- package/dist/cli/src/commands/commands-add.js +90 -0
- package/dist/cli/src/commands/commands-dirs.d.ts +12 -0
- package/dist/cli/src/commands/commands-dirs.js +58 -0
- package/dist/cli/src/commands/commands-info.d.ts +12 -0
- package/dist/cli/src/commands/commands-info.js +76 -0
- package/dist/cli/src/commands/commands-list.d.ts +13 -0
- package/dist/cli/src/commands/commands-list.js +132 -0
- package/dist/cli/src/commands/commands-remove.d.ts +14 -0
- package/dist/cli/src/commands/commands-remove.js +136 -0
- package/dist/cli/src/commands/commands.d.ts +27 -0
- package/dist/cli/src/commands/commands.js +39 -0
- package/dist/cli/src/commands/config/config-service.d.ts +70 -0
- package/dist/cli/src/commands/config/config-service.js +233 -0
- package/dist/cli/src/commands/config/deep-merge.d.ts +22 -0
- package/dist/cli/src/commands/config/deep-merge.js +33 -0
- package/dist/cli/src/commands/config/export.d.ts +15 -0
- package/dist/cli/src/commands/config/export.js +83 -0
- package/dist/cli/src/commands/config/import.d.ts +16 -0
- package/dist/cli/src/commands/config/import.js +102 -0
- package/dist/cli/src/commands/config/index.d.ts +13 -0
- package/dist/cli/src/commands/config/index.js +29 -0
- package/dist/cli/src/commands/config/list.d.ts +18 -0
- package/dist/cli/src/commands/config/list.js +233 -0
- package/dist/cli/src/commands/config/types.d.ts +21 -0
- package/dist/cli/src/commands/config/types.js +49 -0
- package/dist/cli/src/commands/debug/index.d.ts +19 -0
- package/dist/cli/src/commands/debug/index.js +34 -0
- package/dist/cli/src/commands/debug/log.d.ts +29 -0
- package/dist/cli/src/commands/debug/log.js +102 -0
- package/dist/cli/src/commands/debug/span.d.ts +24 -0
- package/dist/cli/src/commands/debug/span.js +187 -0
- package/dist/cli/src/commands/debug/trace.d.ts +27 -0
- package/dist/cli/src/commands/debug/trace.js +111 -0
- package/dist/cli/src/commands/eventsource/add.d.ts +19 -0
- package/dist/cli/src/commands/eventsource/add.js +108 -0
- package/dist/cli/src/commands/eventsource/index.d.ts +20 -0
- package/dist/cli/src/commands/eventsource/index.js +35 -0
- package/dist/cli/src/commands/eventsource/list.d.ts +13 -0
- package/dist/cli/src/commands/eventsource/list.js +159 -0
- package/dist/cli/src/commands/eventsource/remove.d.ts +13 -0
- package/dist/cli/src/commands/eventsource/remove.js +74 -0
- package/dist/cli/src/commands/eventsource/start.d.ts +13 -0
- package/dist/cli/src/commands/eventsource/start.js +81 -0
- package/dist/cli/src/commands/eventsource/status.d.ts +13 -0
- package/dist/cli/src/commands/eventsource/status.js +149 -0
- package/dist/cli/src/commands/eventsource/stop.d.ts +13 -0
- package/dist/cli/src/commands/eventsource/stop.js +69 -0
- package/dist/cli/src/commands/index.d.ts +15 -0
- package/dist/cli/src/commands/index.js +14 -0
- package/dist/cli/src/commands/input-handler.d.ts +27 -0
- package/dist/cli/src/commands/input-handler.js +38 -0
- package/dist/cli/src/commands/interactive.d.ts +141 -0
- package/dist/cli/src/commands/interactive.js +854 -0
- package/dist/cli/src/commands/lsp/check.d.ts +9 -0
- package/dist/cli/src/commands/lsp/check.js +79 -0
- package/dist/cli/src/commands/lsp/index.d.ts +12 -0
- package/dist/cli/src/commands/lsp/index.js +26 -0
- package/dist/cli/src/commands/lsp/install.d.ts +9 -0
- package/dist/cli/src/commands/lsp/install.js +114 -0
- package/dist/cli/src/commands/lsp/list.d.ts +9 -0
- package/dist/cli/src/commands/lsp/list.js +53 -0
- package/dist/cli/src/commands/mcp/index.d.ts +11 -0
- package/dist/cli/src/commands/mcp/index.js +23 -0
- package/dist/cli/src/commands/mcp/list.d.ts +14 -0
- package/dist/cli/src/commands/mcp/list.js +100 -0
- package/dist/cli/src/commands/mcp/reload.d.ts +12 -0
- package/dist/cli/src/commands/mcp/reload.js +54 -0
- package/dist/cli/src/commands/mcp/tools.d.ts +15 -0
- package/dist/cli/src/commands/mcp/tools.js +101 -0
- package/dist/cli/src/commands/memory/index.d.ts +11 -0
- package/dist/cli/src/commands/memory/index.js +11 -0
- package/dist/cli/src/commands/memory/memory.d.ts +10 -0
- package/dist/cli/src/commands/memory/memory.js +21 -0
- package/dist/cli/src/commands/memory/organize.d.ts +48 -0
- package/dist/cli/src/commands/memory/organize.js +233 -0
- package/dist/cli/src/commands/memory/recall.d.ts +10 -0
- package/dist/cli/src/commands/memory/recall.js +69 -0
- package/dist/cli/src/commands/memory/record.d.ts +11 -0
- package/dist/cli/src/commands/memory/record.js +268 -0
- package/dist/cli/src/commands/plugin.d.ts +112 -0
- package/dist/cli/src/commands/plugin.js +186 -0
- package/dist/cli/src/commands/sessions/active.d.ts +14 -0
- package/dist/cli/src/commands/sessions/active.js +79 -0
- package/dist/cli/src/commands/sessions/add-message.d.ts +8 -0
- package/dist/cli/src/commands/sessions/add-message.js +78 -0
- package/dist/cli/src/commands/sessions/checkpoints.d.ts +8 -0
- package/dist/cli/src/commands/sessions/checkpoints.js +133 -0
- package/dist/cli/src/commands/sessions/compact.d.ts +16 -0
- package/dist/cli/src/commands/sessions/compact.js +240 -0
- package/dist/cli/src/commands/sessions/delete.d.ts +14 -0
- package/dist/cli/src/commands/sessions/delete.js +214 -0
- package/dist/cli/src/commands/sessions/get.d.ts +8 -0
- package/dist/cli/src/commands/sessions/get.js +129 -0
- package/dist/cli/src/commands/sessions/grep.d.ts +15 -0
- package/dist/cli/src/commands/sessions/grep.js +210 -0
- package/dist/cli/src/commands/sessions/index.d.ts +42 -0
- package/dist/cli/src/commands/sessions/index.js +93 -0
- package/dist/cli/src/commands/sessions/list.d.ts +21 -0
- package/dist/cli/src/commands/sessions/list.js +163 -0
- package/dist/cli/src/commands/sessions/messages.d.ts +8 -0
- package/dist/cli/src/commands/sessions/messages.js +228 -0
- package/dist/cli/src/commands/sessions/mock.d.ts +10 -0
- package/dist/cli/src/commands/sessions/mock.js +172 -0
- package/dist/cli/src/commands/sessions/new.d.ts +16 -0
- package/dist/cli/src/commands/sessions/new.js +66 -0
- package/dist/cli/src/commands/sessions/rename.d.ts +8 -0
- package/dist/cli/src/commands/sessions/rename.js +82 -0
- package/dist/cli/src/commands/shared/event-handler.d.ts +91 -0
- package/dist/cli/src/commands/shared/event-handler.js +167 -0
- package/dist/cli/src/commands/shared/event-message-formatter.d.ts +150 -0
- package/dist/cli/src/commands/shared/event-message-formatter.js +198 -0
- package/dist/cli/src/commands/shared/index.d.ts +10 -0
- package/dist/cli/src/commands/shared/index.js +8 -0
- package/dist/cli/src/commands/shared/query-executor.d.ts +81 -0
- package/dist/cli/src/commands/shared/query-executor.js +254 -0
- package/dist/cli/src/commands/shared/session-manager.d.ts +49 -0
- package/dist/cli/src/commands/shared/session-manager.js +93 -0
- package/dist/cli/src/commands/skills/get.d.ts +14 -0
- package/dist/cli/src/commands/skills/get.js +76 -0
- package/dist/cli/src/commands/skills/index.d.ts +18 -0
- package/dist/cli/src/commands/skills/index.js +36 -0
- package/dist/cli/src/commands/skills/list.d.ts +8 -0
- package/dist/cli/src/commands/skills/list.js +112 -0
- package/dist/cli/src/commands/skills/reload.d.ts +12 -0
- package/dist/cli/src/commands/skills/reload.js +46 -0
- package/dist/cli/src/commands/skills/search.d.ts +15 -0
- package/dist/cli/src/commands/skills/search.js +110 -0
- package/dist/cli/src/commands/skills/show-config.d.ts +12 -0
- package/dist/cli/src/commands/skills/show-config.js +74 -0
- package/dist/cli/src/commands/tasks/complete.d.ts +15 -0
- package/dist/cli/src/commands/tasks/complete.js +72 -0
- package/dist/cli/src/commands/tasks/create.d.ts +19 -0
- package/dist/cli/src/commands/tasks/create.js +93 -0
- package/dist/cli/src/commands/tasks/delete.d.ts +14 -0
- package/dist/cli/src/commands/tasks/delete.js +71 -0
- package/dist/cli/src/commands/tasks/get.d.ts +15 -0
- package/dist/cli/src/commands/tasks/get.js +98 -0
- package/dist/cli/src/commands/tasks/index.d.ts +20 -0
- package/dist/cli/src/commands/tasks/index.js +50 -0
- package/dist/cli/src/commands/tasks/list.d.ts +18 -0
- package/dist/cli/src/commands/tasks/list.js +116 -0
- package/dist/cli/src/commands/tasks/operations.d.ts +8 -0
- package/dist/cli/src/commands/tasks/operations.js +95 -0
- package/dist/cli/src/commands/tasks/update.d.ts +20 -0
- package/dist/cli/src/commands/tasks/update.js +93 -0
- package/dist/cli/src/commands/tools/exec-tool.d.ts +14 -0
- package/dist/cli/src/commands/tools/exec-tool.js +103 -0
- package/dist/cli/src/commands/tools/get.d.ts +14 -0
- package/dist/cli/src/commands/tools/get.js +97 -0
- package/dist/cli/src/commands/tools/index.d.ts +16 -0
- package/dist/cli/src/commands/tools/index.js +30 -0
- package/dist/cli/src/commands/tools/list.d.ts +14 -0
- package/dist/cli/src/commands/tools/list.js +92 -0
- package/dist/cli/src/commands/tools/shared/index.d.ts +7 -0
- package/dist/cli/src/commands/tools/shared/index.js +7 -0
- package/dist/cli/src/commands/tools/shared/schema-helper.d.ts +53 -0
- package/dist/cli/src/commands/tools/shared/schema-helper.js +74 -0
- package/dist/cli/src/commands/workflow/commands/add.d.ts +22 -0
- package/dist/cli/src/commands/workflow/commands/add.js +271 -0
- package/dist/cli/src/commands/workflow/commands/get.d.ts +20 -0
- package/dist/cli/src/commands/workflow/commands/get.js +169 -0
- package/dist/cli/src/commands/workflow/commands/list.d.ts +21 -0
- package/dist/cli/src/commands/workflow/commands/list.js +117 -0
- package/dist/cli/src/commands/workflow/commands/nodes.d.ts +34 -0
- package/dist/cli/src/commands/workflow/commands/nodes.js +465 -0
- package/dist/cli/src/commands/workflow/commands/remove.d.ts +16 -0
- package/dist/cli/src/commands/workflow/commands/remove.js +77 -0
- package/dist/cli/src/commands/workflow/commands/run.d.ts +32 -0
- package/dist/cli/src/commands/workflow/commands/run.js +335 -0
- package/dist/cli/src/commands/workflow/commands/status.d.ts +17 -0
- package/dist/cli/src/commands/workflow/commands/status.js +125 -0
- package/dist/cli/src/commands/workflow/commands/stop.d.ts +15 -0
- package/dist/cli/src/commands/workflow/commands/stop.js +70 -0
- package/dist/cli/src/commands/workflow/commands/update.d.ts +19 -0
- package/dist/cli/src/commands/workflow/commands/update.js +105 -0
- package/dist/cli/src/commands/workflow/commands/validate.d.ts +14 -0
- package/dist/cli/src/commands/workflow/commands/validate.js +118 -0
- package/dist/cli/src/commands/workflow/index.d.ts +28 -0
- package/dist/cli/src/commands/workflow/index.js +44 -0
- package/dist/cli/src/commands/workflow/renderers.d.ts +60 -0
- package/dist/cli/src/commands/workflow/renderers.js +320 -0
- package/dist/cli/src/commands/workflow/validators/index.d.ts +8 -0
- package/dist/cli/src/commands/workflow/validators/index.js +8 -0
- package/dist/cli/src/commands/workflow/validators/node-validator-factory.d.ts +13 -0
- package/dist/cli/src/commands/workflow/validators/node-validator-factory.js +35 -0
- package/dist/cli/src/commands/workflow/validators/node-validator.d.ts +37 -0
- package/dist/cli/src/commands/workflow/validators/node-validator.js +89 -0
- package/dist/cli/src/commands/workflow/validators/nodes/agent-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/agent-node-validator.js +50 -0
- package/dist/cli/src/commands/workflow/validators/nodes/condition-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/condition-node-validator.js +28 -0
- package/dist/cli/src/commands/workflow/validators/nodes/decorator-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/decorator-node-validator.js +38 -0
- package/dist/cli/src/commands/workflow/validators/nodes/merge-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/merge-node-validator.js +41 -0
- package/dist/cli/src/commands/workflow/validators/nodes/skill-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/skill-node-validator.js +27 -0
- package/dist/cli/src/commands/workflow/validators/nodes/tool-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/tool-node-validator.js +45 -0
- package/dist/cli/src/commands/workflow/validators/nodes/workflow-node-validator.d.ts +11 -0
- package/dist/cli/src/commands/workflow/validators/nodes/workflow-node-validator.js +27 -0
- package/dist/cli/src/commands/workflow/validators/types.d.ts +74 -0
- package/dist/cli/src/commands/workflow/validators/types.js +18 -0
- package/dist/cli/src/commands/workflow/validators/workflow-validator.d.ts +37 -0
- package/dist/cli/src/commands/workflow/validators/workflow-validator.js +284 -0
- package/dist/cli/src/index.d.ts +16 -0
- package/dist/cli/src/index.js +18 -0
- package/dist/cli/src/plugin/apply.d.ts +51 -0
- package/dist/cli/src/plugin/apply.js +85 -0
- package/dist/cli/src/plugin/discover.d.ts +29 -0
- package/dist/cli/src/plugin/discover.js +187 -0
- package/dist/cli/src/plugin/index.d.ts +16 -0
- package/dist/cli/src/plugin/index.js +18 -0
- package/dist/cli/src/plugin/registry.d.ts +109 -0
- package/dist/cli/src/plugin/registry.js +226 -0
- package/dist/cli/src/plugin/types.d.ts +145 -0
- package/dist/cli/src/plugin/types.js +7 -0
- package/dist/cli/src/services/context-handler.service.d.ts +72 -0
- package/dist/cli/src/services/context-handler.service.js +312 -0
- package/dist/cli/src/services/environment.service.d.ts +129 -0
- package/dist/cli/src/services/environment.service.js +544 -0
- package/dist/cli/src/services/output.service.d.ts +68 -0
- package/dist/cli/src/services/output.service.js +104 -0
- package/dist/cli/src/services/quiet-mode.service.d.ts +58 -0
- package/dist/cli/src/services/quiet-mode.service.js +74 -0
- package/dist/cli/src/services/stream-output.service.d.ts +116 -0
- package/dist/cli/src/services/stream-output.service.js +242 -0
- package/dist/cli/src/util/which.d.ts +13 -0
- package/dist/cli/src/util/which.js +50 -0
- package/dist/coder-harness/src/index.d.ts +32 -0
- package/dist/coder-harness/src/index.js +36 -0
- package/dist/coder-harness/src/lsp/client.d.ts +104 -0
- package/dist/coder-harness/src/lsp/client.js +490 -0
- package/dist/coder-harness/src/lsp/client.test.d.ts +5 -0
- package/dist/coder-harness/src/lsp/client.test.js +154 -0
- package/dist/coder-harness/src/lsp/language-map.d.ts +42 -0
- package/dist/coder-harness/src/lsp/language-map.js +105 -0
- package/dist/coder-harness/src/lsp/language-map.test.d.ts +5 -0
- package/dist/coder-harness/src/lsp/language-map.test.js +95 -0
- package/dist/coder-harness/src/lsp/manager.d.ts +166 -0
- package/dist/coder-harness/src/lsp/manager.js +457 -0
- package/dist/coder-harness/src/lsp/manager.test.d.ts +11 -0
- package/dist/coder-harness/src/lsp/manager.test.js +121 -0
- package/dist/coder-harness/src/lsp/preload.integration.test.d.ts +5 -0
- package/dist/coder-harness/src/lsp/preload.integration.test.js +125 -0
- package/dist/coder-harness/src/lsp/server.d.ts +72 -0
- package/dist/coder-harness/src/lsp/server.js +271 -0
- package/dist/coder-harness/src/lsp/server.test.d.ts +5 -0
- package/dist/coder-harness/src/lsp/server.test.js +78 -0
- package/dist/coder-harness/src/lsp-deps/config.d.ts +84 -0
- package/dist/coder-harness/src/lsp-deps/config.js +123 -0
- package/dist/coder-harness/src/lsp-deps/index.d.ts +10 -0
- package/dist/coder-harness/src/lsp-deps/index.js +8 -0
- package/dist/coder-harness/src/lsp-deps/installer.d.ts +101 -0
- package/dist/coder-harness/src/lsp-deps/installer.js +207 -0
- package/dist/coder-harness/src/plugins/code-check-manager.d.ts +43 -0
- package/dist/coder-harness/src/plugins/code-check-manager.js +238 -0
- package/dist/coder-harness/src/plugins/code-check-manager.test.d.ts +2 -0
- package/dist/coder-harness/src/plugins/code-check-manager.test.js +45 -0
- package/dist/coder-harness/src/plugins/code-check-plugin.d.ts +79 -0
- package/dist/coder-harness/src/plugins/code-check-plugin.js +181 -0
- package/dist/coder-harness/src/plugins/code-check-plugin.test.d.ts +2 -0
- package/dist/coder-harness/src/plugins/code-check-plugin.test.js +94 -0
- package/dist/coder-harness/src/plugins/lsp-plugin.d.ts +131 -0
- package/dist/coder-harness/src/plugins/lsp-plugin.js +253 -0
- package/dist/coder-harness/src/plugins/lsp-plugin.test.d.ts +9 -0
- package/dist/coder-harness/src/plugins/lsp-plugin.test.js +304 -0
- package/dist/coder-harness/src/plugins/plugin-hook-adapter.d.ts +192 -0
- package/dist/coder-harness/src/plugins/plugin-hook-adapter.js +294 -0
- package/dist/coder-harness/src/plugins/plugin-hook-adapter.test.d.ts +5 -0
- package/dist/coder-harness/src/plugins/plugin-hook-adapter.test.js +312 -0
- package/dist/coder-harness/src/plugins/reminder-plugin.d.ts +69 -0
- package/dist/coder-harness/src/plugins/reminder-plugin.js +92 -0
- package/dist/coder-harness/src/plugins/reminder-plugin.test.d.ts +5 -0
- package/dist/coder-harness/src/plugins/reminder-plugin.test.js +132 -0
- package/dist/coder-harness/src/types/linter.d.ts +263 -0
- package/dist/coder-harness/src/types/linter.js +18 -0
- package/dist/coder-harness/src/util/glob.d.ts +22 -0
- package/dist/coder-harness/src/util/glob.js +31 -0
- package/dist/coder-harness/src/util/glob.test.d.ts +5 -0
- package/dist/coder-harness/src/util/glob.test.js +63 -0
- package/dist/coder-harness/src/util/which.d.ts +13 -0
- package/dist/coder-harness/src/util/which.js +46 -0
- package/dist/core/src/config/config-component.d.ts +323 -0
- package/dist/core/src/config/config-component.js +686 -0
- package/dist/core/src/config/config-component.test.d.ts +2 -0
- package/dist/core/src/config/config-component.test.js +486 -0
- package/dist/core/src/config/config-parser.d.ts +46 -0
- package/dist/core/src/config/config-parser.js +173 -0
- package/dist/core/src/config/config-parser.test.d.ts +2 -0
- package/dist/core/src/config/config-parser.test.js +252 -0
- package/dist/core/src/config/decentralized-config.test.d.ts +2 -0
- package/dist/core/src/config/decentralized-config.test.js +602 -0
- package/dist/core/src/config/env-key.d.ts +93 -0
- package/dist/core/src/config/env-key.js +189 -0
- package/dist/core/src/config/env-source.d.ts +83 -0
- package/dist/core/src/config/env-source.js +240 -0
- package/dist/core/src/config/env-source.test.d.ts +2 -0
- package/dist/core/src/config/env-source.test.js +196 -0
- package/dist/core/src/config/file-source.d.ts +87 -0
- package/dist/core/src/config/file-source.js +349 -0
- package/dist/core/src/config/file-source.test.d.ts +2 -0
- package/dist/core/src/config/file-source.test.js +275 -0
- package/dist/core/src/config/index.d.ts +5 -0
- package/dist/core/src/config/index.js +5 -0
- package/dist/core/src/config/protocol-resolver.d.ts +95 -0
- package/dist/core/src/config/protocol-resolver.js +175 -0
- package/dist/core/src/config/protocol-resolver.test.d.ts +2 -0
- package/dist/core/src/config/protocol-resolver.test.js +167 -0
- package/dist/core/src/env/agent/agent-component.abort.test.d.ts +11 -0
- package/dist/core/src/env/agent/agent-component.abort.test.js +440 -0
- package/dist/core/src/env/agent/agent-component.d.ts +349 -0
- package/dist/core/src/env/agent/agent-component.js +1481 -0
- package/dist/core/src/env/agent/agent-component.record-session.test.d.ts +14 -0
- package/dist/core/src/env/agent/agent-component.record-session.test.js +280 -0
- package/dist/core/src/env/agent/agent-component.test.d.ts +7 -0
- package/dist/core/src/env/agent/agent-component.test.js +1169 -0
- package/dist/core/src/env/agent/agent-component.tool-error.test.d.ts +25 -0
- package/dist/core/src/env/agent/agent-component.tool-error.test.js +272 -0
- package/dist/core/src/env/agent/agent-config-registration.d.ts +19 -0
- package/dist/core/src/env/agent/agent-config-registration.js +41 -0
- package/dist/core/src/env/agent/agent-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/agent/agent-config-registration.test.js +193 -0
- package/dist/core/src/env/agent/agent-reminder-plugin.integration.test.d.ts +7 -0
- package/dist/core/src/env/agent/agent-reminder-plugin.integration.test.js +206 -0
- package/dist/core/src/env/agent/index.d.ts +10 -0
- package/dist/core/src/env/agent/index.js +9 -0
- package/dist/core/src/env/agent/summary-agent.d.ts +101 -0
- package/dist/core/src/env/agent/summary-agent.js +473 -0
- package/dist/core/src/env/agent/summary-agent.parse-hint.test.d.ts +12 -0
- package/dist/core/src/env/agent/summary-agent.parse-hint.test.js +267 -0
- package/dist/core/src/env/agent/types.d.ts +394 -0
- package/dist/core/src/env/agent/types.js +9 -0
- package/dist/core/src/env/commands/commands-component.d.ts +98 -0
- package/dist/core/src/env/commands/commands-component.js +517 -0
- package/dist/core/src/env/commands/commands-component.test.d.ts +2 -0
- package/dist/core/src/env/commands/commands-component.test.js +304 -0
- package/dist/core/src/env/commands/commands-config-registration.d.ts +20 -0
- package/dist/core/src/env/commands/commands-config-registration.js +33 -0
- package/dist/core/src/env/commands/commands-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/commands/commands-config-registration.test.js +164 -0
- package/dist/core/src/env/commands/index.d.ts +8 -0
- package/dist/core/src/env/commands/index.js +8 -0
- package/dist/core/src/env/commands/parser.d.ts +19 -0
- package/dist/core/src/env/commands/parser.js +97 -0
- package/dist/core/src/env/commands/parser.test.d.ts +2 -0
- package/dist/core/src/env/commands/parser.test.js +155 -0
- package/dist/core/src/env/commands/types.d.ts +134 -0
- package/dist/core/src/env/commands/types.js +7 -0
- package/dist/core/src/env/commands-prompt-integration.test.d.ts +2 -0
- package/dist/core/src/env/commands-prompt-integration.test.js +205 -0
- package/dist/core/src/env/component-env.test.d.ts +2 -0
- package/dist/core/src/env/component-env.test.js +101 -0
- package/dist/core/src/env/component.d.ts +187 -0
- package/dist/core/src/env/component.js +160 -0
- package/dist/core/src/env/constants.d.ts +99 -0
- package/dist/core/src/env/constants.js +107 -0
- package/dist/core/src/env/constants.test.d.ts +2 -0
- package/dist/core/src/env/constants.test.js +55 -0
- package/dist/core/src/env/debug/debug-component.d.ts +161 -0
- package/dist/core/src/env/debug/debug-component.js +441 -0
- package/dist/core/src/env/debug/debug-component.test.d.ts +2 -0
- package/dist/core/src/env/debug/debug-component.test.js +89 -0
- package/dist/core/src/env/debug/formatters/index.d.ts +9 -0
- package/dist/core/src/env/debug/formatters/index.js +9 -0
- package/dist/core/src/env/debug/formatters/repl-formatter.d.ts +81 -0
- package/dist/core/src/env/debug/formatters/repl-formatter.js +309 -0
- package/dist/core/src/env/debug/formatters/repl-formatter.test.d.ts +2 -0
- package/dist/core/src/env/debug/formatters/repl-formatter.test.js +119 -0
- package/dist/core/src/env/debug/formatters/trace-formatter.d.ts +44 -0
- package/dist/core/src/env/debug/formatters/trace-formatter.js +157 -0
- package/dist/core/src/env/debug/formatters/trace-formatter.test.d.ts +2 -0
- package/dist/core/src/env/debug/formatters/trace-formatter.test.js +102 -0
- package/dist/core/src/env/debug/formatters/tree-formatter.d.ts +73 -0
- package/dist/core/src/env/debug/formatters/tree-formatter.js +252 -0
- package/dist/core/src/env/debug/formatters/tree-formatter.test.d.ts +2 -0
- package/dist/core/src/env/debug/formatters/tree-formatter.test.js +91 -0
- package/dist/core/src/env/debug/index.d.ts +16 -0
- package/dist/core/src/env/debug/index.js +18 -0
- package/dist/core/src/env/debug/parser/regex-parser.d.ts +50 -0
- package/dist/core/src/env/debug/parser/regex-parser.js +167 -0
- package/dist/core/src/env/debug/parser/regex-parser.test.d.ts +2 -0
- package/dist/core/src/env/debug/parser/regex-parser.test.js +147 -0
- package/dist/core/src/env/debug/parser/span-builder.d.ts +80 -0
- package/dist/core/src/env/debug/parser/span-builder.js +321 -0
- package/dist/core/src/env/debug/parser/span-builder.test.d.ts +2 -0
- package/dist/core/src/env/debug/parser/span-builder.test.js +207 -0
- package/dist/core/src/env/debug/reader/log-reader.d.ts +56 -0
- package/dist/core/src/env/debug/reader/log-reader.js +163 -0
- package/dist/core/src/env/debug/reader/log-reader.test.d.ts +2 -0
- package/dist/core/src/env/debug/reader/log-reader.test.js +132 -0
- package/dist/core/src/env/debug/reader/span-db-reader.d.ts +71 -0
- package/dist/core/src/env/debug/reader/span-db-reader.js +167 -0
- package/dist/core/src/env/debug/reader/span-db-reader.test.d.ts +5 -0
- package/dist/core/src/env/debug/reader/span-db-reader.test.js +96 -0
- package/dist/core/src/env/debug/types.d.ts +146 -0
- package/dist/core/src/env/debug/types.js +7 -0
- package/dist/core/src/env/debug/types.test.d.ts +2 -0
- package/dist/core/src/env/debug/types.test.js +160 -0
- package/dist/core/src/env/environment-init.test.d.ts +2 -0
- package/dist/core/src/env/environment-init.test.js +142 -0
- package/dist/core/src/env/environment-lifecycle.test.d.ts +16 -0
- package/dist/core/src/env/environment-lifecycle.test.js +391 -0
- package/dist/core/src/env/environment-service.test.d.ts +7 -0
- package/dist/core/src/env/environment-service.test.js +265 -0
- package/dist/core/src/env/environment.d.ts +163 -0
- package/dist/core/src/env/environment.handle-query.test.d.ts +5 -0
- package/dist/core/src/env/environment.handle-query.test.js +74 -0
- package/dist/core/src/env/environment.js +607 -0
- package/dist/core/src/env/environment.test.d.ts +5 -0
- package/dist/core/src/env/environment.test.js +188 -0
- package/dist/core/src/env/errors.d.ts +96 -0
- package/dist/core/src/env/errors.js +123 -0
- package/dist/core/src/env/errors.test.d.ts +2 -0
- package/dist/core/src/env/errors.test.js +110 -0
- package/dist/core/src/env/event-source/event-source-agent-handler.d.ts +45 -0
- package/dist/core/src/env/event-source/event-source-agent-handler.js +80 -0
- package/dist/core/src/env/event-source/event-source-agent-handler.test.d.ts +2 -0
- package/dist/core/src/env/event-source/event-source-agent-handler.test.js +165 -0
- package/dist/core/src/env/event-source/event-source-component.d.ts +197 -0
- package/dist/core/src/env/event-source/event-source-component.js +1155 -0
- package/dist/core/src/env/event-source/event-source-component.process-cleanup.test.d.ts +9 -0
- package/dist/core/src/env/event-source/event-source-component.process-cleanup.test.js +207 -0
- package/dist/core/src/env/event-source/event-source-component.stop.test.d.ts +7 -0
- package/dist/core/src/env/event-source/event-source-component.stop.test.js +293 -0
- package/dist/core/src/env/event-source/event-source-component.test.d.ts +2 -0
- package/dist/core/src/env/event-source/event-source-component.test.js +1036 -0
- package/dist/core/src/env/event-source/event-source-config-registration.d.ts +19 -0
- package/dist/core/src/env/event-source/event-source-config-registration.js +32 -0
- package/dist/core/src/env/event-source/event-source-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/event-source/event-source-config-registration.test.js +208 -0
- package/dist/core/src/env/event-source/event-source-integration.test.d.ts +2 -0
- package/dist/core/src/env/event-source/event-source-integration.test.js +275 -0
- package/dist/core/src/env/event-source/event-source-platform.test.d.ts +12 -0
- package/dist/core/src/env/event-source/event-source-platform.test.js +536 -0
- package/dist/core/src/env/event-source/types.d.ts +213 -0
- package/dist/core/src/env/event-source/types.js +57 -0
- package/dist/core/src/env/hook/global-hook-manager.d.ts +74 -0
- package/dist/core/src/env/hook/global-hook-manager.js +126 -0
- package/dist/core/src/env/hook/hook-manager.d.ts +133 -0
- package/dist/core/src/env/hook/hook-manager.js +249 -0
- package/dist/core/src/env/hook/hook-manager.test.d.ts +2 -0
- package/dist/core/src/env/hook/hook-manager.test.js +275 -0
- package/dist/core/src/env/hook/index.d.ts +10 -0
- package/dist/core/src/env/hook/index.js +12 -0
- package/dist/core/src/env/hook/types.d.ts +104 -0
- package/dist/core/src/env/hook/types.js +33 -0
- package/dist/core/src/env/index.d.ts +23 -0
- package/dist/core/src/env/index.js +26 -0
- package/dist/core/src/env/interface.d.ts +156 -0
- package/dist/core/src/env/interface.js +19 -0
- package/dist/core/src/env/llm/hooks.d.ts +151 -0
- package/dist/core/src/env/llm/hooks.js +209 -0
- package/dist/core/src/env/llm/hooks.test.d.ts +2 -0
- package/dist/core/src/env/llm/hooks.test.js +233 -0
- package/dist/core/src/env/llm/index.d.ts +12 -0
- package/dist/core/src/env/llm/index.js +16 -0
- package/dist/core/src/env/llm/invoke-threshold-check.test.d.ts +11 -0
- package/dist/core/src/env/llm/invoke-threshold-check.test.js +76 -0
- package/dist/core/src/env/llm/invoke-timeout.test.d.ts +2 -0
- package/dist/core/src/env/llm/invoke-timeout.test.js +31 -0
- package/dist/core/src/env/llm/invoke.d.ts +118 -0
- package/dist/core/src/env/llm/invoke.js +755 -0
- package/dist/core/src/env/llm/invoke.test.d.ts +2 -0
- package/dist/core/src/env/llm/invoke.test.js +62 -0
- package/dist/core/src/env/llm/llm-config.test.d.ts +2 -0
- package/dist/core/src/env/llm/llm-config.test.js +453 -0
- package/dist/core/src/env/llm/llm.d.ts +164 -0
- package/dist/core/src/env/llm/llm.js +461 -0
- package/dist/core/src/env/llm/llm.test.d.ts +2 -0
- package/dist/core/src/env/llm/llm.test.js +197 -0
- package/dist/core/src/env/llm/provider.d.ts +41 -0
- package/dist/core/src/env/llm/provider.js +90 -0
- package/dist/core/src/env/llm/provider.test.d.ts +2 -0
- package/dist/core/src/env/llm/provider.test.js +152 -0
- package/dist/core/src/env/llm/transform.d.ts +58 -0
- package/dist/core/src/env/llm/transform.js +254 -0
- package/dist/core/src/env/llm/transform.test.d.ts +2 -0
- package/dist/core/src/env/llm/transform.test.js +215 -0
- package/dist/core/src/env/llm/types.d.ts +771 -0
- package/dist/core/src/env/llm/types.js +67 -0
- package/dist/core/src/env/llm/types.test.d.ts +2 -0
- package/dist/core/src/env/llm/types.test.js +520 -0
- package/dist/core/src/env/log-trace/decorator-otel.test.d.ts +7 -0
- package/dist/core/src/env/log-trace/decorator-otel.test.js +204 -0
- package/dist/core/src/env/log-trace/decorator.d.ts +47 -0
- package/dist/core/src/env/log-trace/decorator.js +190 -0
- package/dist/core/src/env/log-trace/index.d.ts +15 -0
- package/dist/core/src/env/log-trace/index.js +20 -0
- package/dist/core/src/env/log-trace/log-trace-component.d.ts +262 -0
- package/dist/core/src/env/log-trace/log-trace-component.js +405 -0
- package/dist/core/src/env/log-trace/log-trace-component.test.d.ts +7 -0
- package/dist/core/src/env/log-trace/log-trace-component.test.js +212 -0
- package/dist/core/src/env/log-trace/log-trace-config-registration.d.ts +20 -0
- package/dist/core/src/env/log-trace/log-trace-config-registration.js +40 -0
- package/dist/core/src/env/log-trace/log-trace-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/log-trace/log-trace-config-registration.test.js +295 -0
- package/dist/core/src/env/log-trace/logger.d.ts +84 -0
- package/dist/core/src/env/log-trace/logger.js +445 -0
- package/dist/core/src/env/log-trace/logger.test.d.ts +2 -0
- package/dist/core/src/env/log-trace/logger.test.js +118 -0
- package/dist/core/src/env/log-trace/opentelemetry/cli-propagation.d.ts +106 -0
- package/dist/core/src/env/log-trace/opentelemetry/cli-propagation.js +149 -0
- package/dist/core/src/env/log-trace/opentelemetry/cli-propagation.test.d.ts +9 -0
- package/dist/core/src/env/log-trace/opentelemetry/cli-propagation.test.js +122 -0
- package/dist/core/src/env/log-trace/opentelemetry/integration.test.d.ts +19 -0
- package/dist/core/src/env/log-trace/opentelemetry/integration.test.js +535 -0
- package/dist/core/src/env/log-trace/opentelemetry/mod.d.ts +25 -0
- package/dist/core/src/env/log-trace/opentelemetry/mod.js +25 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation-env.d.ts +82 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation-env.js +109 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation-env.test.d.ts +9 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation-env.test.js +143 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation.d.ts +80 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation.js +163 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation.test.d.ts +11 -0
- package/dist/core/src/env/log-trace/opentelemetry/propagation.test.js +197 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider-context.test.d.ts +8 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider-context.test.js +127 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider.d.ts +143 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider.js +451 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider.test.d.ts +11 -0
- package/dist/core/src/env/log-trace/opentelemetry/tracer-provider.test.js +291 -0
- package/dist/core/src/env/log-trace/span-storage.d.ts +38 -0
- package/dist/core/src/env/log-trace/span-storage.js +185 -0
- package/dist/core/src/env/log-trace/span-storage.test.d.ts +5 -0
- package/dist/core/src/env/log-trace/span-storage.test.js +121 -0
- package/dist/core/src/env/log-trace/trace-context.d.ts +29 -0
- package/dist/core/src/env/log-trace/trace-context.js +133 -0
- package/dist/core/src/env/log-trace/trace-context.test.d.ts +2 -0
- package/dist/core/src/env/log-trace/trace-context.test.js +149 -0
- package/dist/core/src/env/log-trace/types.d.ts +128 -0
- package/dist/core/src/env/log-trace/types.js +21 -0
- package/dist/core/src/env/log-trace/types.test.d.ts +2 -0
- package/dist/core/src/env/log-trace/types.test.js +53 -0
- package/dist/core/src/env/mcp/__integration__/mcp-component.integration.test.d.ts +2 -0
- package/dist/core/src/env/mcp/__integration__/mcp-component.integration.test.js +322 -0
- package/dist/core/src/env/mcp/config.d.ts +104 -0
- package/dist/core/src/env/mcp/config.js +65 -0
- package/dist/core/src/env/mcp/config.test.d.ts +2 -0
- package/dist/core/src/env/mcp/config.test.js +56 -0
- package/dist/core/src/env/mcp/index.d.ts +12 -0
- package/dist/core/src/env/mcp/index.js +14 -0
- package/dist/core/src/env/mcp/loader.d.ts +67 -0
- package/dist/core/src/env/mcp/loader.js +163 -0
- package/dist/core/src/env/mcp/loader.test.d.ts +2 -0
- package/dist/core/src/env/mcp/loader.test.js +128 -0
- package/dist/core/src/env/mcp/mcp-component.d.ts +55 -0
- package/dist/core/src/env/mcp/mcp-component.js +296 -0
- package/dist/core/src/env/mcp/mcp-component.test.d.ts +2 -0
- package/dist/core/src/env/mcp/mcp-component.test.js +92 -0
- package/dist/core/src/env/mcp/mcp-config-registration.d.ts +20 -0
- package/dist/core/src/env/mcp/mcp-config-registration.js +45 -0
- package/dist/core/src/env/mcp/mcp-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/mcp/mcp-config-registration.test.js +258 -0
- package/dist/core/src/env/mcp/scanner.d.ts +39 -0
- package/dist/core/src/env/mcp/scanner.js +206 -0
- package/dist/core/src/env/mcp/scanner.test.d.ts +2 -0
- package/dist/core/src/env/mcp/scanner.test.js +115 -0
- package/dist/core/src/env/mcp/tool/adapter.d.ts +33 -0
- package/dist/core/src/env/mcp/tool/adapter.js +413 -0
- package/dist/core/src/env/mcp/tool/adapter.test.d.ts +2 -0
- package/dist/core/src/env/mcp/tool/adapter.test.js +436 -0
- package/dist/core/src/env/mcp/tool/index.d.ts +5 -0
- package/dist/core/src/env/mcp/tool/index.js +5 -0
- package/dist/core/src/env/mcp/types.d.ts +122 -0
- package/dist/core/src/env/mcp/types.js +33 -0
- package/dist/core/src/env/mcp/types.test.d.ts +2 -0
- package/dist/core/src/env/mcp/types.test.js +136 -0
- package/dist/core/src/env/memory/built-in/index.d.ts +42 -0
- package/dist/core/src/env/memory/built-in/index.js +24 -0
- package/dist/core/src/env/memory/built-in/recall-memory.d.ts +30 -0
- package/dist/core/src/env/memory/built-in/recall-memory.js +79 -0
- package/dist/core/src/env/memory/built-in/record-memory.d.ts +45 -0
- package/dist/core/src/env/memory/built-in/record-memory.js +111 -0
- package/dist/core/src/env/memory/index.d.ts +11 -0
- package/dist/core/src/env/memory/index.js +16 -0
- package/dist/core/src/env/memory/memory-component.d.ts +115 -0
- package/dist/core/src/env/memory/memory-component.js +406 -0
- package/dist/core/src/env/memory/memory-component.test.d.ts +5 -0
- package/dist/core/src/env/memory/memory-component.test.js +183 -0
- package/dist/core/src/env/memory/memory-config-registration.d.ts +19 -0
- package/dist/core/src/env/memory/memory-config-registration.js +43 -0
- package/dist/core/src/env/memory/memory-config-registration.test.d.ts +5 -0
- package/dist/core/src/env/memory/memory-config-registration.test.js +48 -0
- package/dist/core/src/env/memory/memory-config.d.ts +19 -0
- package/dist/core/src/env/memory/memory-config.js +41 -0
- package/dist/core/src/env/memory/memory-file.test.d.ts +7 -0
- package/dist/core/src/env/memory/memory-file.test.js +222 -0
- package/dist/core/src/env/memory/plugin/index.d.ts +17 -0
- package/dist/core/src/env/memory/plugin/index.js +17 -0
- package/dist/core/src/env/memory/plugin/memory-agent.d.ts +127 -0
- package/dist/core/src/env/memory/plugin/memory-agent.js +250 -0
- package/dist/core/src/env/memory/plugin/memory-agent.test.d.ts +11 -0
- package/dist/core/src/env/memory/plugin/memory-agent.test.js +207 -0
- package/dist/core/src/env/memory/plugin/memory-manager.d.ts +72 -0
- package/dist/core/src/env/memory/plugin/memory-manager.js +166 -0
- package/dist/core/src/env/memory/plugin/memory-plugin-agent.test.d.ts +7 -0
- package/dist/core/src/env/memory/plugin/memory-plugin-agent.test.js +114 -0
- package/dist/core/src/env/memory/plugin/memory-plugin.d.ts +104 -0
- package/dist/core/src/env/memory/plugin/memory-plugin.js +155 -0
- package/dist/core/src/env/memory/plugin/plugin-simplified.test.d.ts +13 -0
- package/dist/core/src/env/memory/plugin/plugin-simplified.test.js +44 -0
- package/dist/core/src/env/memory/plugin/recall-memory.d.ts +17 -0
- package/dist/core/src/env/memory/plugin/recall-memory.js +44 -0
- package/dist/core/src/env/memory/plugin/recall-memory.test.d.ts +7 -0
- package/dist/core/src/env/memory/plugin/recall-memory.test.js +86 -0
- package/dist/core/src/env/memory/plugin/types.d.ts +76 -0
- package/dist/core/src/env/memory/plugin/types.js +16 -0
- package/dist/core/src/env/memory/tools/memory-agent-tools.d.ts +110 -0
- package/dist/core/src/env/memory/tools/memory-agent-tools.js +157 -0
- package/dist/core/src/env/memory/types.d.ts +81 -0
- package/dist/core/src/env/memory/types.js +25 -0
- package/dist/core/src/env/paths.d.ts +47 -0
- package/dist/core/src/env/paths.js +91 -0
- package/dist/core/src/env/prompt/index.d.ts +8 -0
- package/dist/core/src/env/prompt/index.js +7 -0
- package/dist/core/src/env/prompt/memory-prompts.test.d.ts +7 -0
- package/dist/core/src/env/prompt/memory-prompts.test.js +78 -0
- package/dist/core/src/env/prompt/prompt-component.d.ts +163 -0
- package/dist/core/src/env/prompt/prompt-component.js +489 -0
- package/dist/core/src/env/prompt/prompt-component.test.d.ts +7 -0
- package/dist/core/src/env/prompt/prompt-component.test.js +397 -0
- package/dist/core/src/env/prompt/prompt-config-registration.d.ts +19 -0
- package/dist/core/src/env/prompt/prompt-config-registration.js +34 -0
- package/dist/core/src/env/prompt/prompt-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/prompt/prompt-config-registration.test.js +172 -0
- package/dist/core/src/env/prompt/prompts-index.d.ts +27 -0
- package/dist/core/src/env/prompt/prompts-index.js +498 -0
- package/dist/core/src/env/prompt/renderer.d.ts +22 -0
- package/dist/core/src/env/prompt/renderer.js +47 -0
- package/dist/core/src/env/prompt/types.d.ts +159 -0
- package/dist/core/src/env/prompt/types.js +48 -0
- package/dist/core/src/env/session/hooks.d.ts +15 -0
- package/dist/core/src/env/session/hooks.js +5 -0
- package/dist/core/src/env/session/index.d.ts +19 -0
- package/dist/core/src/env/session/index.js +13 -0
- package/dist/core/src/env/session/search-query-parser.d.ts +42 -0
- package/dist/core/src/env/session/search-query-parser.js +141 -0
- package/dist/core/src/env/session/search-query-parser.test.d.ts +14 -0
- package/dist/core/src/env/session/search-query-parser.test.js +332 -0
- package/dist/core/src/env/session/session-checkpoint.test.d.ts +7 -0
- package/dist/core/src/env/session/session-checkpoint.test.js +455 -0
- package/dist/core/src/env/session/session-component.d.ts +290 -0
- package/dist/core/src/env/session/session-component.extract-recent-messages.test.d.ts +7 -0
- package/dist/core/src/env/session/session-component.extract-recent-messages.test.js +166 -0
- package/dist/core/src/env/session/session-component.js +981 -0
- package/dist/core/src/env/session/session-component.test.d.ts +7 -0
- package/dist/core/src/env/session/session-component.test.js +107 -0
- package/dist/core/src/env/session/session-config-registration.d.ts +19 -0
- package/dist/core/src/env/session/session-config-registration.js +47 -0
- package/dist/core/src/env/session/session-config-registration.test.d.ts +5 -0
- package/dist/core/src/env/session/session-config-registration.test.js +115 -0
- package/dist/core/src/env/session/session-message-converter.d.ts +125 -0
- package/dist/core/src/env/session/session-message-converter.js +354 -0
- package/dist/core/src/env/session/session-message-converter.test.d.ts +8 -0
- package/dist/core/src/env/session/session-message-converter.test.js +623 -0
- package/dist/core/src/env/session/session-message-e2e.test.d.ts +8 -0
- package/dist/core/src/env/session/session-message-e2e.test.js +376 -0
- package/dist/core/src/env/session/session-search.test.d.ts +7 -0
- package/dist/core/src/env/session/session-search.test.js +338 -0
- package/dist/core/src/env/session/session-store.d.ts +103 -0
- package/dist/core/src/env/session/session-store.js +5 -0
- package/dist/core/src/env/session/session-store.test.d.ts +2 -0
- package/dist/core/src/env/session/session-store.test.js +291 -0
- package/dist/core/src/env/session/storage/index.d.ts +6 -0
- package/dist/core/src/env/session/storage/index.js +6 -0
- package/dist/core/src/env/session/storage/memory.d.ts +44 -0
- package/dist/core/src/env/session/storage/memory.js +404 -0
- package/dist/core/src/env/session/storage/sqlite.d.ts +64 -0
- package/dist/core/src/env/session/storage/sqlite.js +616 -0
- package/dist/core/src/env/session/types.d.ts +613 -0
- package/dist/core/src/env/session/types.js +32 -0
- package/dist/core/src/env/skill/config.d.ts +14 -0
- package/dist/core/src/env/skill/config.js +36 -0
- package/dist/core/src/env/skill/index.d.ts +7 -0
- package/dist/core/src/env/skill/index.js +7 -0
- package/dist/core/src/env/skill/parser.d.ts +10 -0
- package/dist/core/src/env/skill/parser.js +64 -0
- package/dist/core/src/env/skill/parser.test.d.ts +2 -0
- package/dist/core/src/env/skill/parser.test.js +92 -0
- package/dist/core/src/env/skill/scanner.d.ts +26 -0
- package/dist/core/src/env/skill/scanner.js +98 -0
- package/dist/core/src/env/skill/scanner.test.d.ts +2 -0
- package/dist/core/src/env/skill/scanner.test.js +166 -0
- package/dist/core/src/env/skill/skill-component.d.ts +90 -0
- package/dist/core/src/env/skill/skill-component.js +266 -0
- package/dist/core/src/env/skill/skill-component.test.d.ts +2 -0
- package/dist/core/src/env/skill/skill-component.test.js +187 -0
- package/dist/core/src/env/skill/skill-config-registration.d.ts +19 -0
- package/dist/core/src/env/skill/skill-config-registration.js +38 -0
- package/dist/core/src/env/skill/skill-config-registration.test.d.ts +5 -0
- package/dist/core/src/env/skill/skill-config-registration.test.js +44 -0
- package/dist/core/src/env/skill/tool/index.d.ts +2 -0
- package/dist/core/src/env/skill/tool/index.js +2 -0
- package/dist/core/src/env/skill/tool/skill-tool.d.ts +16 -0
- package/dist/core/src/env/skill/tool/skill-tool.js +64 -0
- package/dist/core/src/env/skill/tool/skill-tool.test.d.ts +2 -0
- package/dist/core/src/env/skill/tool/skill-tool.test.js +77 -0
- package/dist/core/src/env/skill/types.d.ts +62 -0
- package/dist/core/src/env/skill/types.js +8 -0
- package/dist/core/src/env/task/delegate/delegate-tool.d.ts +141 -0
- package/dist/core/src/env/task/delegate/delegate-tool.js +767 -0
- package/dist/core/src/env/task/delegate/delegate-tool.test.d.ts +7 -0
- package/dist/core/src/env/task/delegate/delegate-tool.test.js +386 -0
- package/dist/core/src/env/task/delegate/index.d.ts +9 -0
- package/dist/core/src/env/task/delegate/index.js +8 -0
- package/dist/core/src/env/task/delegate/stop-tool.d.ts +13 -0
- package/dist/core/src/env/task/delegate/stop-tool.js +108 -0
- package/dist/core/src/env/task/delegate/stop-tool.test.d.ts +7 -0
- package/dist/core/src/env/task/delegate/stop-tool.test.js +103 -0
- package/dist/core/src/env/task/delegate/task-events.d.ts +81 -0
- package/dist/core/src/env/task/delegate/task-events.js +67 -0
- package/dist/core/src/env/task/delegate/task-events.test.d.ts +5 -0
- package/dist/core/src/env/task/delegate/task-events.test.js +149 -0
- package/dist/core/src/env/task/hooks/contexts.d.ts +165 -0
- package/dist/core/src/env/task/hooks/contexts.js +5 -0
- package/dist/core/src/env/task/hooks/contexts.test.d.ts +5 -0
- package/dist/core/src/env/task/hooks/contexts.test.js +73 -0
- package/dist/core/src/env/task/hooks/index.d.ts +8 -0
- package/dist/core/src/env/task/hooks/index.js +8 -0
- package/dist/core/src/env/task/hooks/task-hook-points.d.ts +32 -0
- package/dist/core/src/env/task/hooks/task-hook-points.js +37 -0
- package/dist/core/src/env/task/hooks/task-hook-points.test.d.ts +5 -0
- package/dist/core/src/env/task/hooks/task-hook-points.test.js +28 -0
- package/dist/core/src/env/task/index.d.ts +7 -0
- package/dist/core/src/env/task/index.js +7 -0
- package/dist/core/src/env/task/plugins/index.d.ts +7 -0
- package/dist/core/src/env/task/plugins/index.js +7 -0
- package/dist/core/src/env/task/plugins/task-plugin.d.ts +67 -0
- package/dist/core/src/env/task/plugins/task-plugin.js +40 -0
- package/dist/core/src/env/task/plugins/task-plugin.test.d.ts +5 -0
- package/dist/core/src/env/task/plugins/task-plugin.test.js +60 -0
- package/dist/core/src/env/task/plugins/task-tag-plugin.d.ts +79 -0
- package/dist/core/src/env/task/plugins/task-tag-plugin.js +250 -0
- package/dist/core/src/env/task/plugins/task-tag-plugin.test.d.ts +9 -0
- package/dist/core/src/env/task/plugins/task-tag-plugin.test.js +310 -0
- package/dist/core/src/env/task/plugins/task-workflow-extractor.integration.test.d.ts +5 -0
- package/dist/core/src/env/task/plugins/task-workflow-extractor.integration.test.js +198 -0
- package/dist/core/src/env/task/plugins/workflow-extractor-agent.d.ts +36 -0
- package/dist/core/src/env/task/plugins/workflow-extractor-agent.js +197 -0
- package/dist/core/src/env/task/plugins/workflow-extractor-agent.test.d.ts +8 -0
- package/dist/core/src/env/task/plugins/workflow-extractor-agent.test.js +88 -0
- package/dist/core/src/env/task/storage/index.d.ts +6 -0
- package/dist/core/src/env/task/storage/index.js +6 -0
- package/dist/core/src/env/task/storage/sqlite-task-store.d.ts +127 -0
- package/dist/core/src/env/task/storage/sqlite-task-store.js +718 -0
- package/dist/core/src/env/task/storage/sqlite-task-store.test.d.ts +5 -0
- package/dist/core/src/env/task/storage/sqlite-task-store.test.js +235 -0
- package/dist/core/src/env/task/storage/task-search.test.d.ts +5 -0
- package/dist/core/src/env/task/storage/task-search.test.js +236 -0
- package/dist/core/src/env/task/tag-service.d.ts +139 -0
- package/dist/core/src/env/task/tag-service.js +123 -0
- package/dist/core/src/env/task/tag-service.test.d.ts +5 -0
- package/dist/core/src/env/task/tag-service.test.js +157 -0
- package/dist/core/src/env/task/task-component.d.ts +171 -0
- package/dist/core/src/env/task/task-component.js +519 -0
- package/dist/core/src/env/task/task-component.test.d.ts +5 -0
- package/dist/core/src/env/task/task-component.test.js +163 -0
- package/dist/core/src/env/task/task-config-registration.d.ts +20 -0
- package/dist/core/src/env/task/task-config-registration.js +32 -0
- package/dist/core/src/env/task/task-config-registration.test.d.ts +5 -0
- package/dist/core/src/env/task/task-config-registration.test.js +43 -0
- package/dist/core/src/env/task/task-types.test.d.ts +5 -0
- package/dist/core/src/env/task/task-types.test.js +117 -0
- package/dist/core/src/env/task/tools/complete-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/complete-tool.js +40 -0
- package/dist/core/src/env/task/tools/create-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/create-tool.js +45 -0
- package/dist/core/src/env/task/tools/delete-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/delete-tool.js +39 -0
- package/dist/core/src/env/task/tools/get-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/get-tool.js +57 -0
- package/dist/core/src/env/task/tools/index.d.ts +10 -0
- package/dist/core/src/env/task/tools/index.js +10 -0
- package/dist/core/src/env/task/tools/list-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/list-tool.js +36 -0
- package/dist/core/src/env/task/tools/operation/create-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/operation/create-tool.js +44 -0
- package/dist/core/src/env/task/tools/operation/delete-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/operation/delete-tool.js +39 -0
- package/dist/core/src/env/task/tools/operation/get-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/operation/get-tool.js +39 -0
- package/dist/core/src/env/task/tools/operation/index.d.ts +9 -0
- package/dist/core/src/env/task/tools/operation/index.js +9 -0
- package/dist/core/src/env/task/tools/operation/list-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/operation/list-tool.js +36 -0
- package/dist/core/src/env/task/tools/operation/operation-tools.test.d.ts +5 -0
- package/dist/core/src/env/task/tools/operation/operation-tools.test.js +159 -0
- package/dist/core/src/env/task/tools/operation/operation-types.d.ts +92 -0
- package/dist/core/src/env/task/tools/operation/operation-types.js +58 -0
- package/dist/core/src/env/task/tools/operation/update-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/operation/update-tool.js +42 -0
- package/dist/core/src/env/task/tools/task-tools.test.d.ts +5 -0
- package/dist/core/src/env/task/tools/task-tools.test.js +142 -0
- package/dist/core/src/env/task/tools/task-types.d.ts +114 -0
- package/dist/core/src/env/task/tools/task-types.js +53 -0
- package/dist/core/src/env/task/tools/task-types.test.d.ts +5 -0
- package/dist/core/src/env/task/tools/task-types.test.js +63 -0
- package/dist/core/src/env/task/tools/update-tool.d.ts +7 -0
- package/dist/core/src/env/task/tools/update-tool.js +64 -0
- package/dist/core/src/env/task/types.d.ts +129 -0
- package/dist/core/src/env/task/types.js +39 -0
- package/dist/core/src/env/tool/built-in/bash.d.ts +11 -0
- package/dist/core/src/env/tool/built-in/bash.js +182 -0
- package/dist/core/src/env/tool/built-in/echo.d.ts +8 -0
- package/dist/core/src/env/tool/built-in/echo.js +27 -0
- package/dist/core/src/env/tool/built-in/edit-file.d.ts +7 -0
- package/dist/core/src/env/tool/built-in/edit-file.js +86 -0
- package/dist/core/src/env/tool/built-in/edit-file.test.d.ts +2 -0
- package/dist/core/src/env/tool/built-in/edit-file.test.js +84 -0
- package/dist/core/src/env/tool/built-in/glob.d.ts +7 -0
- package/dist/core/src/env/tool/built-in/glob.js +60 -0
- package/dist/core/src/env/tool/built-in/glob.test.d.ts +2 -0
- package/dist/core/src/env/tool/built-in/glob.test.js +61 -0
- package/dist/core/src/env/tool/built-in/grep.d.ts +7 -0
- package/dist/core/src/env/tool/built-in/grep.js +96 -0
- package/dist/core/src/env/tool/built-in/grep.test.d.ts +2 -0
- package/dist/core/src/env/tool/built-in/grep.test.js +74 -0
- package/dist/core/src/env/tool/built-in/index.d.ts +28 -0
- package/dist/core/src/env/tool/built-in/index.js +41 -0
- package/dist/core/src/env/tool/built-in/read-file.d.ts +6 -0
- package/dist/core/src/env/tool/built-in/read-file.js +73 -0
- package/dist/core/src/env/tool/built-in/read-file.test.d.ts +2 -0
- package/dist/core/src/env/tool/built-in/read-file.test.js +63 -0
- package/dist/core/src/env/tool/built-in/write-file.d.ts +6 -0
- package/dist/core/src/env/tool/built-in/write-file.js +65 -0
- package/dist/core/src/env/tool/built-in/write-file.test.d.ts +2 -0
- package/dist/core/src/env/tool/built-in/write-file.test.js +74 -0
- package/dist/core/src/env/tool/index.d.ts +14 -0
- package/dist/core/src/env/tool/index.js +19 -0
- package/dist/core/src/env/tool/registry.d.ts +62 -0
- package/dist/core/src/env/tool/registry.js +137 -0
- package/dist/core/src/env/tool/registry.test.d.ts +2 -0
- package/dist/core/src/env/tool/registry.test.js +219 -0
- package/dist/core/src/env/tool/tool-component.d.ts +160 -0
- package/dist/core/src/env/tool/tool-component.js +411 -0
- package/dist/core/src/env/tool/tool-component.test.d.ts +2 -0
- package/dist/core/src/env/tool/tool-component.test.js +461 -0
- package/dist/core/src/env/tool/tool-config-registration.d.ts +19 -0
- package/dist/core/src/env/tool/tool-config-registration.js +41 -0
- package/dist/core/src/env/tool/tool-config-registration.test.d.ts +7 -0
- package/dist/core/src/env/tool/tool-config-registration.test.js +202 -0
- package/dist/core/src/env/tool/types.d.ts +226 -0
- package/dist/core/src/env/tool/types.js +2 -0
- package/dist/core/src/env/tool/validator.d.ts +15 -0
- package/dist/core/src/env/tool/validator.js +43 -0
- package/dist/core/src/env/tool/validator.test.d.ts +2 -0
- package/dist/core/src/env/tool/validator.test.js +102 -0
- package/dist/core/src/env/types.d.ts +154 -0
- package/dist/core/src/env/types.js +9 -0
- package/dist/core/src/env/workflow/ask-user-tool-registration.test.d.ts +13 -0
- package/dist/core/src/env/workflow/ask-user-tool-registration.test.js +185 -0
- package/dist/core/src/env/workflow/complex-workflow.integration.test.d.ts +14 -0
- package/dist/core/src/env/workflow/complex-workflow.integration.test.js +1588 -0
- package/dist/core/src/env/workflow/decorators/decorator-node.d.ts +77 -0
- package/dist/core/src/env/workflow/decorators/decorator-node.js +176 -0
- package/dist/core/src/env/workflow/decorators/decorator.test.d.ts +5 -0
- package/dist/core/src/env/workflow/decorators/decorator.test.js +212 -0
- package/dist/core/src/env/workflow/decorators/edge.d.ts +43 -0
- package/dist/core/src/env/workflow/decorators/edge.js +68 -0
- package/dist/core/src/env/workflow/decorators/index.d.ts +14 -0
- package/dist/core/src/env/workflow/decorators/index.js +15 -0
- package/dist/core/src/env/workflow/decorators/node-as.d.ts +41 -0
- package/dist/core/src/env/workflow/decorators/node-as.js +85 -0
- package/dist/core/src/env/workflow/decorators/workflow.d.ts +31 -0
- package/dist/core/src/env/workflow/decorators/workflow.js +49 -0
- package/dist/core/src/env/workflow/engine/dag-manager.d.ts +129 -0
- package/dist/core/src/env/workflow/engine/dag-manager.js +471 -0
- package/dist/core/src/env/workflow/engine/dag-manager.test.d.ts +2 -0
- package/dist/core/src/env/workflow/engine/dag-manager.test.js +488 -0
- package/dist/core/src/env/workflow/engine/engine.d.ts +218 -0
- package/dist/core/src/env/workflow/engine/engine.js +1122 -0
- package/dist/core/src/env/workflow/engine/event-bus.d.ts +55 -0
- package/dist/core/src/env/workflow/engine/event-bus.js +137 -0
- package/dist/core/src/env/workflow/engine/event-bus.test.d.ts +2 -0
- package/dist/core/src/env/workflow/engine/event-bus.test.js +274 -0
- package/dist/core/src/env/workflow/engine/executor-agent-session.test.d.ts +2 -0
- package/dist/core/src/env/workflow/engine/executor-agent-session.test.js +46 -0
- package/dist/core/src/env/workflow/engine/executor.d.ts +106 -0
- package/dist/core/src/env/workflow/engine/executor.js +458 -0
- package/dist/core/src/env/workflow/engine/executor.test.d.ts +11 -0
- package/dist/core/src/env/workflow/engine/executor.test.js +274 -0
- package/dist/core/src/env/workflow/engine/index.d.ts +16 -0
- package/dist/core/src/env/workflow/engine/index.js +10 -0
- package/dist/core/src/env/workflow/engine/node-registry.d.ts +160 -0
- package/dist/core/src/env/workflow/engine/node-registry.js +195 -0
- package/dist/core/src/env/workflow/engine/node-registry.test.d.ts +8 -0
- package/dist/core/src/env/workflow/engine/node-registry.test.js +439 -0
- package/dist/core/src/env/workflow/engine/resume-removed.test.d.ts +2 -0
- package/dist/core/src/env/workflow/engine/resume-removed.test.js +19 -0
- package/dist/core/src/env/workflow/engine/scheduler.d.ts +133 -0
- package/dist/core/src/env/workflow/engine/scheduler.js +253 -0
- package/dist/core/src/env/workflow/engine/scheduler.test.d.ts +2 -0
- package/dist/core/src/env/workflow/engine/scheduler.test.js +575 -0
- package/dist/core/src/env/workflow/engine/workflow-engine.test.d.ts +11 -0
- package/dist/core/src/env/workflow/engine/workflow-engine.test.js +640 -0
- package/dist/core/src/env/workflow/extractor/workflow-converter.d.ts +56 -0
- package/dist/core/src/env/workflow/extractor/workflow-converter.js +252 -0
- package/dist/core/src/env/workflow/fixtures.d.ts +402 -0
- package/dist/core/src/env/workflow/fixtures.js +369 -0
- package/dist/core/src/env/workflow/index.d.ts +31 -0
- package/dist/core/src/env/workflow/index.js +35 -0
- package/dist/core/src/env/workflow/integration/run-resume-unified.test.d.ts +2 -0
- package/dist/core/src/env/workflow/integration/run-resume-unified.test.js +161 -0
- package/dist/core/src/env/workflow/integration/service-integration.test.d.ts +8 -0
- package/dist/core/src/env/workflow/integration/service-integration.test.js +223 -0
- package/dist/core/src/env/workflow/metadata/keys.d.ts +7 -0
- package/dist/core/src/env/workflow/metadata/keys.js +10 -0
- package/dist/core/src/env/workflow/nodes/agent-component-adapter.d.ts +163 -0
- package/dist/core/src/env/workflow/nodes/agent-component-adapter.js +333 -0
- package/dist/core/src/env/workflow/nodes/agent-component-adapter.test.d.ts +2 -0
- package/dist/core/src/env/workflow/nodes/agent-component-adapter.test.js +257 -0
- package/dist/core/src/env/workflow/nodes/agent-node.d.ts +217 -0
- package/dist/core/src/env/workflow/nodes/agent-node.js +419 -0
- package/dist/core/src/env/workflow/nodes/agent-node.test.d.ts +13 -0
- package/dist/core/src/env/workflow/nodes/agent-node.test.js +296 -0
- package/dist/core/src/env/workflow/nodes/ask-user-node.d.ts +69 -0
- package/dist/core/src/env/workflow/nodes/ask-user-node.js +67 -0
- package/dist/core/src/env/workflow/nodes/condition-node.d.ts +48 -0
- package/dist/core/src/env/workflow/nodes/condition-node.js +185 -0
- package/dist/core/src/env/workflow/nodes/index.d.ts +7 -0
- package/dist/core/src/env/workflow/nodes/index.js +5 -0
- package/dist/core/src/env/workflow/nodes/merge-node.d.ts +41 -0
- package/dist/core/src/env/workflow/nodes/merge-node.js +126 -0
- package/dist/core/src/env/workflow/nodes/skill-node.d.ts +118 -0
- package/dist/core/src/env/workflow/nodes/skill-node.js +322 -0
- package/dist/core/src/env/workflow/nodes/skill-node.test.d.ts +2 -0
- package/dist/core/src/env/workflow/nodes/skill-node.test.js +189 -0
- package/dist/core/src/env/workflow/nodes/tool-node.d.ts +121 -0
- package/dist/core/src/env/workflow/nodes/tool-node.js +415 -0
- package/dist/core/src/env/workflow/nodes/tool-node.test.d.ts +2 -0
- package/dist/core/src/env/workflow/nodes/tool-node.test.js +181 -0
- package/dist/core/src/env/workflow/nodes/workflow-llm-history.test.d.ts +7 -0
- package/dist/core/src/env/workflow/nodes/workflow-llm-history.test.js +377 -0
- package/dist/core/src/env/workflow/nodes/workflow-node.d.ts +119 -0
- package/dist/core/src/env/workflow/nodes/workflow-node.js +215 -0
- package/dist/core/src/env/workflow/nodes/workflow-node.test.d.ts +2 -0
- package/dist/core/src/env/workflow/nodes/workflow-node.test.js +255 -0
- package/dist/core/src/env/workflow/service/index.d.ts +10 -0
- package/dist/core/src/env/workflow/service/index.js +8 -0
- package/dist/core/src/env/workflow/service/registry.d.ts +38 -0
- package/dist/core/src/env/workflow/service/registry.js +58 -0
- package/dist/core/src/env/workflow/service/registry.test.d.ts +5 -0
- package/dist/core/src/env/workflow/service/registry.test.js +90 -0
- package/dist/core/src/env/workflow/service/workflow-service.d.ts +162 -0
- package/dist/core/src/env/workflow/service/workflow-service.js +244 -0
- package/dist/core/src/env/workflow/service/workflow-service.test.d.ts +5 -0
- package/dist/core/src/env/workflow/service/workflow-service.test.js +228 -0
- package/dist/core/src/env/workflow/storage/index.d.ts +11 -0
- package/dist/core/src/env/workflow/storage/index.js +13 -0
- package/dist/core/src/env/workflow/storage/mock-repositories.d.ts +89 -0
- package/dist/core/src/env/workflow/storage/mock-repositories.js +286 -0
- package/dist/core/src/env/workflow/storage/sqlite.d.ts +56 -0
- package/dist/core/src/env/workflow/storage/sqlite.js +135 -0
- package/dist/core/src/env/workflow/storage/sqlite.test.d.ts +2 -0
- package/dist/core/src/env/workflow/storage/sqlite.test.js +152 -0
- package/dist/core/src/env/workflow/storage/workflow-repo.d.ts +108 -0
- package/dist/core/src/env/workflow/storage/workflow-repo.js +252 -0
- package/dist/core/src/env/workflow/storage/workflow-repo.test.d.ts +2 -0
- package/dist/core/src/env/workflow/storage/workflow-repo.test.js +447 -0
- package/dist/core/src/env/workflow/tools/ask-user-tool.d.ts +36 -0
- package/dist/core/src/env/workflow/tools/ask-user-tool.js +50 -0
- package/dist/core/src/env/workflow/tools/index.d.ts +8 -0
- package/dist/core/src/env/workflow/tools/index.js +10 -0
- package/dist/core/src/env/workflow/tools/run-workflow.d.ts +61 -0
- package/dist/core/src/env/workflow/tools/run-workflow.js +180 -0
- package/dist/core/src/env/workflow/tools/run-workflow.test.d.ts +5 -0
- package/dist/core/src/env/workflow/tools/run-workflow.test.js +235 -0
- package/dist/core/src/env/workflow/types/context.d.ts +18 -0
- package/dist/core/src/env/workflow/types/context.js +2 -0
- package/dist/core/src/env/workflow/types/decorators-types.d.ts +178 -0
- package/dist/core/src/env/workflow/types/decorators-types.js +9 -0
- package/dist/core/src/env/workflow/types/event.d.ts +864 -0
- package/dist/core/src/env/workflow/types/event.js +154 -0
- package/dist/core/src/env/workflow/types/event.test.d.ts +2 -0
- package/dist/core/src/env/workflow/types/event.test.js +484 -0
- package/dist/core/src/env/workflow/types/index.d.ts +14 -0
- package/dist/core/src/env/workflow/types/index.js +10 -0
- package/dist/core/src/env/workflow/types/run.d.ts +123 -0
- package/dist/core/src/env/workflow/types/run.js +23 -0
- package/dist/core/src/env/workflow/types/run.test.d.ts +2 -0
- package/dist/core/src/env/workflow/types/run.test.js +381 -0
- package/dist/core/src/env/workflow/types/workflow-hil.d.ts +58 -0
- package/dist/core/src/env/workflow/types/workflow-hil.js +76 -0
- package/dist/core/src/env/workflow/types/workflow-message.d.ts +139 -0
- package/dist/core/src/env/workflow/types/workflow-message.js +15 -0
- package/dist/core/src/env/workflow/types/workflow-message.test.d.ts +2 -0
- package/dist/core/src/env/workflow/types/workflow-message.test.js +87 -0
- package/dist/core/src/env/workflow/types/workflow-session.d.ts +18 -0
- package/dist/core/src/env/workflow/types/workflow-session.js +41 -0
- package/dist/core/src/env/workflow/types/workflow-session.test.d.ts +2 -0
- package/dist/core/src/env/workflow/types/workflow-session.test.js +80 -0
- package/dist/core/src/env/workflow/types/workflow.d.ts +387 -0
- package/dist/core/src/env/workflow/types/workflow.js +124 -0
- package/dist/core/src/env/workflow/types/workflow.test.d.ts +2 -0
- package/dist/core/src/env/workflow/types/workflow.test.js +455 -0
- package/dist/core/src/env/workflow/types_compat.d.ts +11 -0
- package/dist/core/src/env/workflow/types_compat.js +8 -0
- package/dist/core/src/env/workflow/utils/create-workflow.d.ts +36 -0
- package/dist/core/src/env/workflow/utils/create-workflow.js +36 -0
- package/dist/core/src/env/workflow/utils/execution-state.d.ts +47 -0
- package/dist/core/src/env/workflow/utils/execution-state.js +228 -0
- package/dist/core/src/env/workflow/utils/index.d.ts +9 -0
- package/dist/core/src/env/workflow/utils/index.js +9 -0
- package/dist/core/src/env/workflow/utils/node-registry-helper.d.ts +37 -0
- package/dist/core/src/env/workflow/utils/node-registry-helper.js +48 -0
- package/dist/core/src/env/workflow/utils/recovery-validator.d.ts +31 -0
- package/dist/core/src/env/workflow/utils/recovery-validator.js +325 -0
- package/dist/core/src/env/workflow/utils/recovery-validator.test.d.ts +2 -0
- package/dist/core/src/env/workflow/utils/recovery-validator.test.js +401 -0
- package/dist/core/src/env/workflow/utils/session-parser.d.ts +22 -0
- package/dist/core/src/env/workflow/utils/session-parser.js +72 -0
- package/dist/core/src/env/workflow/utils/session-parser.test.d.ts +2 -0
- package/dist/core/src/env/workflow/utils/session-parser.test.js +89 -0
- package/dist/core/src/env/workflow/utils/session-recovery.d.ts +62 -0
- package/dist/core/src/env/workflow/utils/session-recovery.js +138 -0
- package/dist/core/src/env/workflow/utils/session-recovery.test.d.ts +2 -0
- package/dist/core/src/env/workflow/utils/session-recovery.test.js +263 -0
- package/dist/core/src/env/workflow/utils/template-resolver.d.ts +161 -0
- package/dist/core/src/env/workflow/utils/template-resolver.js +359 -0
- package/dist/core/src/env/workflow/utils/template-resolver.test.d.ts +2 -0
- package/dist/core/src/env/workflow/utils/template-resolver.test.js +216 -0
- package/dist/core/src/env/workflow/utils/validation-rules.d.ts +104 -0
- package/dist/core/src/env/workflow/utils/validation-rules.js +44 -0
- package/dist/core/src/env/workflow/workflow-component.d.ts +135 -0
- package/dist/core/src/env/workflow/workflow-component.js +376 -0
- package/dist/core/src/index.d.ts +54 -0
- package/dist/core/src/index.js +66 -0
- package/dist/core/src/utils/id.d.ts +12 -0
- package/dist/core/src/utils/id.js +20 -0
- package/dist/roy-agent-darwin-arm64/bin/roy.js +4 -3
- package/dist/roy-agent-darwin-x64/bin/roy.js +4 -3
- package/dist/roy-agent-linux-arm64/bin/roy.js +4 -3
- package/dist/roy-agent-linux-x64/bin/roy.js +4 -3
- package/dist/roy-agent-windows-x64/bin/roy.js +4 -3
- package/package.json +3 -2
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AgentComponentAdapter - Bridge between Workflow AgentNode and AgentComponent
|
|
3
|
+
*
|
|
4
|
+
* This adapter implements the AgentRunner interface required by AgentNode,
|
|
5
|
+
* delegating actual execution to the AgentComponent.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const agentComponent = env.getComponent<AgentComponent>('agent');
|
|
10
|
+
* const adapter = new AgentComponentAdapter(agentComponent);
|
|
11
|
+
*
|
|
12
|
+
* // Register agents that can be used in workflows
|
|
13
|
+
* adapter.registerAgent('researcher', {
|
|
14
|
+
* systemPrompt: 'You are a research assistant...',
|
|
15
|
+
* type: 'general',
|
|
16
|
+
* model: 'gpt-4'
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // Now AgentNode can use 'researcher' agent type
|
|
20
|
+
* const workflow = {
|
|
21
|
+
* nodes: [{
|
|
22
|
+
* type: 'agent',
|
|
23
|
+
* config: { agent_type: 'researcher', prompt: '...' }
|
|
24
|
+
* }]
|
|
25
|
+
* };
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
import { AskUserError } from "../types/workflow-hil.js";
|
|
29
|
+
/**
|
|
30
|
+
* AgentComponentAdapter
|
|
31
|
+
*
|
|
32
|
+
* Adapts AgentComponent to the AgentRunner interface expected by Workflow's AgentNode.
|
|
33
|
+
* Provides session isolation for agent execution within workflow context.
|
|
34
|
+
*
|
|
35
|
+
* Features:
|
|
36
|
+
* - Creates dedicated agent sessions for each workflow agent node execution
|
|
37
|
+
* - Tracks pending sessions for resume after user input
|
|
38
|
+
* - Supports mapping agent sessions to workflow run session messages
|
|
39
|
+
*/
|
|
40
|
+
export class AgentComponentAdapter {
|
|
41
|
+
agentComponent;
|
|
42
|
+
options;
|
|
43
|
+
_sessionComponent;
|
|
44
|
+
/** Session prefix for agent sessions */
|
|
45
|
+
agentSessionPrefix = 'agent';
|
|
46
|
+
/** Current agent session ID */
|
|
47
|
+
_currentAgentSessionId;
|
|
48
|
+
/** Pending agent sessions (waiting for user input) */
|
|
49
|
+
pendingSessions = new Map();
|
|
50
|
+
/** Map from workflow run session to agent sessions */
|
|
51
|
+
runSessionToAgentSessions = new Map();
|
|
52
|
+
constructor(agentComponent, options = {}, _sessionComponent) {
|
|
53
|
+
this.agentComponent = agentComponent;
|
|
54
|
+
this.options = options;
|
|
55
|
+
this._sessionComponent = _sessionComponent;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Set the SessionComponent for agent session management
|
|
59
|
+
*/
|
|
60
|
+
setSessionComponent(sessionComponent) {
|
|
61
|
+
this._sessionComponent = sessionComponent;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the current agent session ID
|
|
65
|
+
*/
|
|
66
|
+
getCurrentAgentSessionId() {
|
|
67
|
+
return this._currentAgentSessionId;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Register an agent that can be used in workflows
|
|
71
|
+
*
|
|
72
|
+
* @param name - Agent name (used as agent_type in workflow definition)
|
|
73
|
+
* @param config - Agent configuration
|
|
74
|
+
*/
|
|
75
|
+
registerAgent(name, config) {
|
|
76
|
+
this.agentComponent.registerAgent(name, {
|
|
77
|
+
type: (config.type || 'general'),
|
|
78
|
+
model: config.model,
|
|
79
|
+
systemPrompt: config.systemPrompt,
|
|
80
|
+
maxIterations: config.maxIterations,
|
|
81
|
+
allowedTools: config.allowedTools,
|
|
82
|
+
deniedTools: config.deniedTools,
|
|
83
|
+
timeout: config.timeout,
|
|
84
|
+
maxErrorRetries: config.maxErrorRetries,
|
|
85
|
+
});
|
|
86
|
+
// Store session prefix for this agent
|
|
87
|
+
if (config.sessionIdPrefix) {
|
|
88
|
+
this.agentSessionPrefixes.set(name, config.sessionIdPrefix);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Run an agent
|
|
93
|
+
*
|
|
94
|
+
* Implements AgentRunner interface.
|
|
95
|
+
* Creates a dedicated agent session for each execution within workflow context.
|
|
96
|
+
*
|
|
97
|
+
* @param config - Agent configuration
|
|
98
|
+
* @param resumeOptions - Optional options for resuming a paused agent
|
|
99
|
+
* @returns Agent execution result
|
|
100
|
+
*/
|
|
101
|
+
async run(config, resumeOptions) {
|
|
102
|
+
const startTime = Date.now();
|
|
103
|
+
// Extract context info from config (set by Executor)
|
|
104
|
+
const nodeId = config.nodeId || 'unknown';
|
|
105
|
+
const runId = config.runId || 'unknown';
|
|
106
|
+
const workflowSessionId = config.workflowSessionId;
|
|
107
|
+
const existingAgentSessionId = config.agentSessionId;
|
|
108
|
+
// Also extract agentSessionId from resumeOptions if provided (set by engine.resumeNode)
|
|
109
|
+
const resumeAgentSessionId = resumeOptions?.agentSessionId;
|
|
110
|
+
// Check if this is a resume (user response or existing session)
|
|
111
|
+
const isResume = !!resumeOptions?.userResponse || !!existingAgentSessionId || !!resumeAgentSessionId;
|
|
112
|
+
// Determine agent session ID
|
|
113
|
+
let agentSessionId;
|
|
114
|
+
if (isResume && (this._currentAgentSessionId || existingAgentSessionId || resumeAgentSessionId)) {
|
|
115
|
+
// Resume existing session - use agentSessionId from resumeOptions if available
|
|
116
|
+
agentSessionId = resumeAgentSessionId || existingAgentSessionId || this._currentAgentSessionId;
|
|
117
|
+
// Add user response to session if provided
|
|
118
|
+
if (resumeOptions?.userResponse && this._sessionComponent && agentSessionId) {
|
|
119
|
+
try {
|
|
120
|
+
await this._sessionComponent.addMessage(agentSessionId, {
|
|
121
|
+
role: 'user',
|
|
122
|
+
content: resumeOptions.userResponse,
|
|
123
|
+
metadata: {
|
|
124
|
+
type: 'user_intent',
|
|
125
|
+
intent: 'workflow.resume',
|
|
126
|
+
workflowNodeId: nodeId,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
console.warn(`Failed to add user response to agent session ${agentSessionId}:`, error);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
// Create new agent session
|
|
137
|
+
if (this._sessionComponent) {
|
|
138
|
+
agentSessionId = `${this.agentSessionPrefix}_${runId}_${nodeId}_${Date.now()}`;
|
|
139
|
+
try {
|
|
140
|
+
// Create agent session for workflow isolation
|
|
141
|
+
await this._sessionComponent.create({
|
|
142
|
+
title: `Agent Session: ${config.type} (${agentSessionId})`,
|
|
143
|
+
metadata: {
|
|
144
|
+
type: 'agent',
|
|
145
|
+
workflowRunId: runId,
|
|
146
|
+
workflowNodeId: nodeId,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
// Set as current session
|
|
150
|
+
this._currentAgentSessionId = agentSessionId;
|
|
151
|
+
// Track mapping from workflow session to agent session
|
|
152
|
+
if (workflowSessionId) {
|
|
153
|
+
const mapping = this.runSessionToAgentSessions.get(workflowSessionId) || [];
|
|
154
|
+
mapping.push(agentSessionId);
|
|
155
|
+
this.runSessionToAgentSessions.set(workflowSessionId, mapping);
|
|
156
|
+
}
|
|
157
|
+
// Store as pending session for resume
|
|
158
|
+
this.pendingSessions.set(agentSessionId, {
|
|
159
|
+
agentSessionId,
|
|
160
|
+
nodeId,
|
|
161
|
+
runId,
|
|
162
|
+
createdAt: Date.now(),
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
// Session might already exist, continue with fallback ID
|
|
167
|
+
console.warn(`Failed to create agent session ${agentSessionId}:`, error);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
// Build context from options
|
|
173
|
+
const context = {};
|
|
174
|
+
// Add timeout if specified
|
|
175
|
+
if (config.options?.timeout) {
|
|
176
|
+
// @ts-ignore - AbortController compatible with AbortSignal
|
|
177
|
+
context.abort = new AbortController();
|
|
178
|
+
}
|
|
179
|
+
// Use the agent session ID for isolation
|
|
180
|
+
if (agentSessionId) {
|
|
181
|
+
context.sessionId = agentSessionId;
|
|
182
|
+
}
|
|
183
|
+
// Pass allowedTools from options to context
|
|
184
|
+
// This is used by AgentComponent to filter available tools
|
|
185
|
+
// For workflow agents, this includes 'ask_user' tool
|
|
186
|
+
if (config.options?.allowedTools) {
|
|
187
|
+
context.allowedTools = config.options.allowedTools;
|
|
188
|
+
}
|
|
189
|
+
// Pass deniedTools from options to context
|
|
190
|
+
if (config.options?.deniedTools) {
|
|
191
|
+
context.deniedTools = config.options.deniedTools;
|
|
192
|
+
}
|
|
193
|
+
// Pass workflow history to agent context
|
|
194
|
+
if (config.workflowHistory) {
|
|
195
|
+
context.workflowHistory = config.workflowHistory;
|
|
196
|
+
}
|
|
197
|
+
// Execute agent
|
|
198
|
+
// Use config.type or fallback to 'general' agent type
|
|
199
|
+
const result = await this.agentComponent.run(config.type || 'general', config.prompt, context);
|
|
200
|
+
// Calculate duration
|
|
201
|
+
// Check if agent stopped due to ask_user (encoded in result.error)
|
|
202
|
+
if (result.error?.startsWith('__ASK_USER_ERROR__:')) {
|
|
203
|
+
// Parse the JSON-encoded AskUserError info
|
|
204
|
+
const jsonStr = result.error.substring('__ASK_USER_ERROR__:'.length);
|
|
205
|
+
const errorInfo = JSON.parse(jsonStr);
|
|
206
|
+
// Reconstruct and throw AskUserError
|
|
207
|
+
throw new AskUserError(runId, errorInfo.sessionId, errorInfo.nodeId, errorInfo.nodeType || 'agent', errorInfo.query);
|
|
208
|
+
}
|
|
209
|
+
const duration = Date.now() - startTime;
|
|
210
|
+
// Clear pending session on success
|
|
211
|
+
if (agentSessionId) {
|
|
212
|
+
this.pendingSessions.delete(agentSessionId);
|
|
213
|
+
}
|
|
214
|
+
// Convert AgentRunResult to AgentResult
|
|
215
|
+
// Include messages in result for workflow history accumulation
|
|
216
|
+
const messages = result._messages || [];
|
|
217
|
+
return {
|
|
218
|
+
output: result.finalText || result.output,
|
|
219
|
+
metadata: {
|
|
220
|
+
duration,
|
|
221
|
+
iterations: result.iterations,
|
|
222
|
+
toolCalls: result.toolCalls?.length,
|
|
223
|
+
agentSessionId,
|
|
224
|
+
},
|
|
225
|
+
messages,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
// Check if this is AskUserError - don't clear pending session
|
|
230
|
+
const isAskUserError = error instanceof Error && error.name === 'AskUserError';
|
|
231
|
+
// Convert error to AgentResult format (unless AskUserError which should propagate)
|
|
232
|
+
if (isAskUserError) {
|
|
233
|
+
throw error; // Re-throw AskUserError to be handled by Executor
|
|
234
|
+
}
|
|
235
|
+
const duration = Date.now() - startTime;
|
|
236
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
237
|
+
// Clear pending session on other errors
|
|
238
|
+
if (agentSessionId) {
|
|
239
|
+
this.pendingSessions.delete(agentSessionId);
|
|
240
|
+
}
|
|
241
|
+
return {
|
|
242
|
+
output: undefined,
|
|
243
|
+
metadata: {
|
|
244
|
+
duration,
|
|
245
|
+
error: errorMessage,
|
|
246
|
+
agentSessionId,
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
finally {
|
|
251
|
+
// Only clear current session if not pending
|
|
252
|
+
if (!isResume) {
|
|
253
|
+
this._currentAgentSessionId = undefined;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Resume a paused agent with user response
|
|
259
|
+
*
|
|
260
|
+
* This method is called when workflow resumes after user input.
|
|
261
|
+
* It retrieves the pending agent session and continues execution.
|
|
262
|
+
*
|
|
263
|
+
* @param agentSessionId - The agent session ID to resume
|
|
264
|
+
* @param userResponse - User's response to the ask_user query
|
|
265
|
+
* @param config - Original agent config
|
|
266
|
+
* @returns Agent execution result
|
|
267
|
+
*/
|
|
268
|
+
async resumeAgent(agentSessionId, userResponse, config) {
|
|
269
|
+
// Add user response to agent session
|
|
270
|
+
if (this._sessionComponent) {
|
|
271
|
+
try {
|
|
272
|
+
await this._sessionComponent.addMessage(agentSessionId, {
|
|
273
|
+
role: 'user',
|
|
274
|
+
content: userResponse,
|
|
275
|
+
metadata: {
|
|
276
|
+
type: 'user_intent',
|
|
277
|
+
intent: 'workflow.resume',
|
|
278
|
+
},
|
|
279
|
+
});
|
|
280
|
+
// Remove from pending
|
|
281
|
+
this.pendingSessions.delete(agentSessionId);
|
|
282
|
+
// Restore as current session
|
|
283
|
+
this._currentAgentSessionId = agentSessionId;
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
console.warn(`Failed to add user response to agent session ${agentSessionId}:`, error);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// Set agentSessionId in config so AgentComponent knows which session to load
|
|
290
|
+
config.agentSessionId = agentSessionId;
|
|
291
|
+
// Resume agent execution
|
|
292
|
+
return this.run(config, { userResponse });
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Get pending agent session by agent session ID
|
|
296
|
+
*/
|
|
297
|
+
getPendingSession(agentSessionId) {
|
|
298
|
+
return this.pendingSessions.get(agentSessionId);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get pending agent sessions for a workflow run
|
|
302
|
+
*/
|
|
303
|
+
getPendingSessionsForRun(runId) {
|
|
304
|
+
return Array.from(this.pendingSessions.values()).filter(session => session.runId === runId);
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Get all agent session IDs associated with a workflow session
|
|
308
|
+
*/
|
|
309
|
+
getAgentSessionsForWorkflowSession(workflowSessionId) {
|
|
310
|
+
return this.runSessionToAgentSessions.get(workflowSessionId) || [];
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Check if an agent is registered
|
|
314
|
+
*/
|
|
315
|
+
hasAgent(name) {
|
|
316
|
+
return this.agentComponent.getAgent(name) !== undefined;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* List all registered agents
|
|
320
|
+
*/
|
|
321
|
+
listAgents() {
|
|
322
|
+
return this.agentComponent.listAgents().map(a => a.name);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Get the underlying AgentComponent
|
|
326
|
+
*/
|
|
327
|
+
getAgentComponent() {
|
|
328
|
+
return this.agentComponent;
|
|
329
|
+
}
|
|
330
|
+
// Session prefix map for workflow isolation
|
|
331
|
+
agentSessionPrefixes = new Map();
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=agent-component-adapter.js.map
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, vi } from 'bun:test';
|
|
2
|
+
import { AgentComponentAdapter } from "./agent-component-adapter.js";
|
|
3
|
+
// Custom AskUserError for testing
|
|
4
|
+
class AskUserError extends Error {
|
|
5
|
+
runId;
|
|
6
|
+
sessionId;
|
|
7
|
+
nodeId;
|
|
8
|
+
nodeType;
|
|
9
|
+
query;
|
|
10
|
+
type = 'ask-user';
|
|
11
|
+
constructor(runId, sessionId, nodeId, nodeType, query) {
|
|
12
|
+
super(`Ask user: ${query}`);
|
|
13
|
+
this.runId = runId;
|
|
14
|
+
this.sessionId = sessionId;
|
|
15
|
+
this.nodeId = nodeId;
|
|
16
|
+
this.nodeType = nodeType;
|
|
17
|
+
this.query = query;
|
|
18
|
+
this.name = 'AskUserError';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// Mock AgentComponent
|
|
22
|
+
const mockAgentComponent = {
|
|
23
|
+
registerAgent: vi.fn(),
|
|
24
|
+
getAgent: vi.fn().mockReturnValue({ name: 'test-agent' }),
|
|
25
|
+
listAgents: vi.fn().mockReturnValue([{ name: 'test-agent' }]),
|
|
26
|
+
run: vi.fn().mockResolvedValue({
|
|
27
|
+
finalText: 'test response',
|
|
28
|
+
iterations: 1,
|
|
29
|
+
toolCalls: [],
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
// Mock SessionComponent
|
|
33
|
+
const mockSessionComponent = {
|
|
34
|
+
create: vi.fn().mockResolvedValue({ id: 'agent_session_123' }),
|
|
35
|
+
addMessage: vi.fn().mockResolvedValue('msg_123'),
|
|
36
|
+
getMessages: vi.fn().mockResolvedValue([]),
|
|
37
|
+
};
|
|
38
|
+
describe('AgentComponentAdapter', () => {
|
|
39
|
+
let adapter;
|
|
40
|
+
beforeEach(() => {
|
|
41
|
+
vi.clearAllMocks();
|
|
42
|
+
// Reset mock to return successful result by default
|
|
43
|
+
mockAgentComponent.run.mockResolvedValue({
|
|
44
|
+
finalText: 'test response',
|
|
45
|
+
iterations: 1,
|
|
46
|
+
toolCalls: [],
|
|
47
|
+
});
|
|
48
|
+
adapter = new AgentComponentAdapter(mockAgentComponent, {}, mockSessionComponent);
|
|
49
|
+
});
|
|
50
|
+
describe('run()', () => {
|
|
51
|
+
it('should create agent session when sessionComponent is available', async () => {
|
|
52
|
+
const config = {
|
|
53
|
+
type: 'test-agent',
|
|
54
|
+
prompt: 'test prompt',
|
|
55
|
+
nodeId: 'node1',
|
|
56
|
+
runId: 'run1',
|
|
57
|
+
workflowSessionId: 'workflow_run_1',
|
|
58
|
+
};
|
|
59
|
+
const result = await adapter.run(config);
|
|
60
|
+
expect(mockSessionComponent.create).toHaveBeenCalledWith(expect.objectContaining({
|
|
61
|
+
title: expect.stringContaining('Agent Session'),
|
|
62
|
+
metadata: expect.objectContaining({
|
|
63
|
+
type: 'agent',
|
|
64
|
+
workflowRunId: 'run1',
|
|
65
|
+
workflowNodeId: 'node1',
|
|
66
|
+
}),
|
|
67
|
+
}));
|
|
68
|
+
expect(result.output).toBe('test response');
|
|
69
|
+
});
|
|
70
|
+
it('should not create session when sessionComponent is not available', async () => {
|
|
71
|
+
const adapterWithoutSession = new AgentComponentAdapter(mockAgentComponent, {}, undefined);
|
|
72
|
+
const config = {
|
|
73
|
+
type: 'test-agent',
|
|
74
|
+
prompt: 'test prompt',
|
|
75
|
+
};
|
|
76
|
+
await adapterWithoutSession.run(config);
|
|
77
|
+
expect(mockSessionComponent.create).not.toHaveBeenCalled();
|
|
78
|
+
});
|
|
79
|
+
it('should map workflow session to agent sessions', async () => {
|
|
80
|
+
const config = {
|
|
81
|
+
type: 'test-agent',
|
|
82
|
+
prompt: 'test prompt',
|
|
83
|
+
nodeId: 'node1',
|
|
84
|
+
runId: 'run1',
|
|
85
|
+
workflowSessionId: 'workflow_run_1',
|
|
86
|
+
};
|
|
87
|
+
await adapter.run(config);
|
|
88
|
+
// Should have mapping
|
|
89
|
+
const agentSessions = adapter.getAgentSessionsForWorkflowSession('workflow_run_1');
|
|
90
|
+
expect(agentSessions.length).toBeGreaterThan(0);
|
|
91
|
+
});
|
|
92
|
+
it('should throw AskUserError to interrupt workflow (pending session preserved)', async () => {
|
|
93
|
+
// Mock agent to throw AskUserError
|
|
94
|
+
mockAgentComponent.run.mockImplementation(() => {
|
|
95
|
+
throw new AskUserError('run1', 'workflow_run1', 'node1', 'agent', 'Need user input?');
|
|
96
|
+
});
|
|
97
|
+
const config = {
|
|
98
|
+
type: 'test-agent',
|
|
99
|
+
prompt: 'test prompt',
|
|
100
|
+
nodeId: 'node1',
|
|
101
|
+
runId: 'run1',
|
|
102
|
+
workflowSessionId: 'workflow_run_1',
|
|
103
|
+
};
|
|
104
|
+
// Should reject with AskUserError
|
|
105
|
+
try {
|
|
106
|
+
await adapter.run(config);
|
|
107
|
+
expect(true).toBe(false); // Should not reach here
|
|
108
|
+
}
|
|
109
|
+
catch (e) {
|
|
110
|
+
expect(e.name).toBe('AskUserError');
|
|
111
|
+
}
|
|
112
|
+
// Pending session should be preserved (not cleared)
|
|
113
|
+
const sessions = adapter.getPendingSessionsForRun('run1');
|
|
114
|
+
expect(sessions.length).toBeGreaterThan(0);
|
|
115
|
+
expect(sessions[0].nodeId).toBe('node1');
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
describe('resumeAgent()', () => {
|
|
119
|
+
it('should add user response to session and resume', async () => {
|
|
120
|
+
const agentSessionId = 'agent_session_123';
|
|
121
|
+
const userResponse = 'User response text';
|
|
122
|
+
const config = {
|
|
123
|
+
type: 'test-agent',
|
|
124
|
+
prompt: 'test prompt',
|
|
125
|
+
};
|
|
126
|
+
await adapter.resumeAgent(agentSessionId, userResponse, config);
|
|
127
|
+
// Verify addMessage was called (mock is already reset in beforeEach, so it should be called)
|
|
128
|
+
// Note: In this test, we just verify no error is thrown
|
|
129
|
+
expect(mockAgentComponent.run).toHaveBeenCalled();
|
|
130
|
+
});
|
|
131
|
+
it('should add user response as a new message with resume metadata', async () => {
|
|
132
|
+
const agentSessionId = 'agent_session_123';
|
|
133
|
+
const userResponse = 'yes, continue';
|
|
134
|
+
const config = {
|
|
135
|
+
type: 'test-agent',
|
|
136
|
+
prompt: 'test prompt',
|
|
137
|
+
};
|
|
138
|
+
await adapter.resumeAgent(agentSessionId, userResponse, config);
|
|
139
|
+
// Verify addMessage was called with correct metadata
|
|
140
|
+
expect(mockSessionComponent.addMessage).toHaveBeenCalledWith(agentSessionId, expect.objectContaining({
|
|
141
|
+
role: 'user',
|
|
142
|
+
content: userResponse,
|
|
143
|
+
metadata: expect.objectContaining({
|
|
144
|
+
type: 'user_intent',
|
|
145
|
+
intent: 'workflow.resume',
|
|
146
|
+
}),
|
|
147
|
+
}));
|
|
148
|
+
});
|
|
149
|
+
it('should pass userResponse to run() for resume context', async () => {
|
|
150
|
+
const agentSessionId = 'agent_session_123';
|
|
151
|
+
const userResponse = 'yes';
|
|
152
|
+
const config = {
|
|
153
|
+
type: 'test-agent',
|
|
154
|
+
prompt: 'test prompt',
|
|
155
|
+
};
|
|
156
|
+
await adapter.resumeAgent(agentSessionId, userResponse, config);
|
|
157
|
+
// Verify run was called with sessionId set to agentSessionId
|
|
158
|
+
// (userResponse is stored in session, agent will load it from there)
|
|
159
|
+
expect(mockAgentComponent.run).toHaveBeenCalledWith(config.type, config.prompt, expect.objectContaining({
|
|
160
|
+
sessionId: agentSessionId,
|
|
161
|
+
}));
|
|
162
|
+
});
|
|
163
|
+
it('should remove session from pending after resume', async () => {
|
|
164
|
+
// First add a pending session manually
|
|
165
|
+
adapter.pendingSessions.set('agent_session_456', {
|
|
166
|
+
agentSessionId: 'agent_session_456',
|
|
167
|
+
nodeId: 'node1',
|
|
168
|
+
runId: 'run1',
|
|
169
|
+
createdAt: Date.now(),
|
|
170
|
+
});
|
|
171
|
+
const userResponse = 'yes';
|
|
172
|
+
const config = {
|
|
173
|
+
type: 'test-agent',
|
|
174
|
+
prompt: 'test prompt',
|
|
175
|
+
};
|
|
176
|
+
await adapter.resumeAgent('agent_session_456', userResponse, config);
|
|
177
|
+
// Session should be removed from pending
|
|
178
|
+
expect(adapter.pendingSessions.has('agent_session_456')).toBe(false);
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
describe('getPendingSession()', () => {
|
|
182
|
+
it('should return pending session when agent throws AskUserError', async () => {
|
|
183
|
+
// Mock agent to throw AskUserError
|
|
184
|
+
mockAgentComponent.run.mockImplementation(() => {
|
|
185
|
+
throw new AskUserError('run1', 'workflow_run1', 'node1', 'agent', 'Need user input?');
|
|
186
|
+
});
|
|
187
|
+
const config = {
|
|
188
|
+
type: 'test-agent',
|
|
189
|
+
prompt: 'test prompt',
|
|
190
|
+
nodeId: 'node1',
|
|
191
|
+
runId: 'run1',
|
|
192
|
+
workflowSessionId: 'workflow_run_1',
|
|
193
|
+
};
|
|
194
|
+
try {
|
|
195
|
+
await adapter.run(config);
|
|
196
|
+
}
|
|
197
|
+
catch (e) {
|
|
198
|
+
// Expected
|
|
199
|
+
}
|
|
200
|
+
const sessions = adapter.getPendingSessionsForRun('run1');
|
|
201
|
+
expect(sessions.length).toBe(1);
|
|
202
|
+
const pending = adapter.getPendingSession(sessions[0].agentSessionId);
|
|
203
|
+
expect(pending).toBeDefined();
|
|
204
|
+
expect(pending?.nodeId).toBe('node1');
|
|
205
|
+
});
|
|
206
|
+
it('should return undefined for non-existent session', () => {
|
|
207
|
+
const pending = adapter.getPendingSession('non-existent');
|
|
208
|
+
expect(pending).toBeUndefined();
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
describe('getCurrentAgentSessionId()', () => {
|
|
212
|
+
it('should return current agent session ID during execution', async () => {
|
|
213
|
+
const config = {
|
|
214
|
+
type: 'test-agent',
|
|
215
|
+
prompt: 'test prompt',
|
|
216
|
+
nodeId: 'node1',
|
|
217
|
+
runId: 'run1',
|
|
218
|
+
workflowSessionId: 'workflow_run_1',
|
|
219
|
+
};
|
|
220
|
+
await adapter.run(config);
|
|
221
|
+
// After successful completion, current session is cleared
|
|
222
|
+
// But we can verify the session was created during execution
|
|
223
|
+
const agentSessions = adapter.getAgentSessionsForWorkflowSession('workflow_run_1');
|
|
224
|
+
expect(agentSessions.length).toBeGreaterThan(0);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
describe('setSessionComponent()', () => {
|
|
228
|
+
it('should allow setting session component after construction', async () => {
|
|
229
|
+
const adapterWithoutSession = new AgentComponentAdapter(mockAgentComponent, {}, undefined);
|
|
230
|
+
adapterWithoutSession.setSessionComponent(mockSessionComponent);
|
|
231
|
+
// Now adapter should be able to create sessions
|
|
232
|
+
const config = {
|
|
233
|
+
type: 'test-agent',
|
|
234
|
+
prompt: 'test prompt',
|
|
235
|
+
nodeId: 'node1',
|
|
236
|
+
runId: 'run1',
|
|
237
|
+
};
|
|
238
|
+
await adapterWithoutSession.run(config);
|
|
239
|
+
expect(mockSessionComponent.create).toHaveBeenCalled();
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
describe('PendingAgentSession type', () => {
|
|
244
|
+
it('should have correct structure', () => {
|
|
245
|
+
const session = {
|
|
246
|
+
agentSessionId: 'agent_123',
|
|
247
|
+
nodeId: 'node_1',
|
|
248
|
+
runId: 'run_1',
|
|
249
|
+
createdAt: Date.now(),
|
|
250
|
+
};
|
|
251
|
+
expect(session.agentSessionId).toBe('agent_123');
|
|
252
|
+
expect(session.nodeId).toBe('node_1');
|
|
253
|
+
expect(session.runId).toBe('run_1');
|
|
254
|
+
expect(session.createdAt).toBeGreaterThan(0);
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
//# sourceMappingURL=agent-component-adapter.test.js.map
|