@vybestack/llxprt-code-tools 0.10.0-nightly.260613.1adad3b34
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/LICENSE +202 -0
- package/README.md +294 -0
- package/dist/.last_build +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/src/__tests__/fixtures/filesystem-tool-fixtures.d.ts +29 -0
- package/dist/src/__tests__/fixtures/filesystem-tool-fixtures.js +30 -0
- package/dist/src/__tests__/fixtures/filesystem-tool-fixtures.js.map +1 -0
- package/dist/src/__tests__/fixtures/key-storage-fixtures.d.ts +39 -0
- package/dist/src/__tests__/fixtures/key-storage-fixtures.js +53 -0
- package/dist/src/__tests__/fixtures/key-storage-fixtures.js.map +1 -0
- package/dist/src/__tests__/fixtures/provider-formatting-fixtures.d.ts +140 -0
- package/dist/src/__tests__/fixtures/provider-formatting-fixtures.js +157 -0
- package/dist/src/__tests__/fixtures/provider-formatting-fixtures.js.map +1 -0
- package/dist/src/__tests__/red-test-helpers.d.ts +14 -0
- package/dist/src/__tests__/red-test-helpers.js +18 -0
- package/dist/src/__tests__/red-test-helpers.js.map +1 -0
- package/dist/src/formatters/IToolFormatter.d.ts +84 -0
- package/dist/src/formatters/IToolFormatter.js +6 -0
- package/dist/src/formatters/IToolFormatter.js.map +1 -0
- package/dist/src/formatters/ToolFormatter.d.ts +94 -0
- package/dist/src/formatters/ToolFormatter.js +379 -0
- package/dist/src/formatters/ToolFormatter.js.map +1 -0
- package/dist/src/formatters/ToolIdStrategy.d.ts +79 -0
- package/dist/src/formatters/ToolIdStrategy.js +173 -0
- package/dist/src/formatters/ToolIdStrategy.js.map +1 -0
- package/dist/src/formatters/doubleEscapeUtils.d.ts +46 -0
- package/dist/src/formatters/doubleEscapeUtils.js +223 -0
- package/dist/src/formatters/doubleEscapeUtils.js.map +1 -0
- package/dist/src/formatters/index.d.ts +21 -0
- package/dist/src/formatters/index.js +12 -0
- package/dist/src/formatters/index.js.map +1 -0
- package/dist/src/formatters/toolIdNormalization.d.ts +28 -0
- package/dist/src/formatters/toolIdNormalization.js +97 -0
- package/dist/src/formatters/toolIdNormalization.js.map +1 -0
- package/dist/src/formatters/toolNameUtils.d.ts +43 -0
- package/dist/src/formatters/toolNameUtils.js +143 -0
- package/dist/src/formatters/toolNameUtils.js.map +1 -0
- package/dist/src/index.d.ts +88 -0
- package/dist/src/index.js +68 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interfaces/IAsyncTaskService.d.ts +57 -0
- package/dist/src/interfaces/IAsyncTaskService.js +6 -0
- package/dist/src/interfaces/IAsyncTaskService.js.map +1 -0
- package/dist/src/interfaces/IIdeService.d.ts +62 -0
- package/dist/src/interfaces/IIdeService.js +6 -0
- package/dist/src/interfaces/IIdeService.js.map +1 -0
- package/dist/src/interfaces/ILspService.d.ts +54 -0
- package/dist/src/interfaces/ILspService.js +6 -0
- package/dist/src/interfaces/ILspService.js.map +1 -0
- package/dist/src/interfaces/IMcpToolService.d.ts +47 -0
- package/dist/src/interfaces/IMcpToolService.js +6 -0
- package/dist/src/interfaces/IMcpToolService.js.map +1 -0
- package/dist/src/interfaces/IPromptRegistryService.d.ts +51 -0
- package/dist/src/interfaces/IPromptRegistryService.js +6 -0
- package/dist/src/interfaces/IPromptRegistryService.js.map +1 -0
- package/dist/src/interfaces/ISettingsService.d.ts +50 -0
- package/dist/src/interfaces/ISettingsService.js +6 -0
- package/dist/src/interfaces/ISettingsService.js.map +1 -0
- package/dist/src/interfaces/IShellExecutionService.d.ts +55 -0
- package/dist/src/interfaces/IShellExecutionService.js +6 -0
- package/dist/src/interfaces/IShellExecutionService.js.map +1 -0
- package/dist/src/interfaces/IShellToolHost.d.ts +176 -0
- package/dist/src/interfaces/IShellToolHost.js +6 -0
- package/dist/src/interfaces/IShellToolHost.js.map +1 -0
- package/dist/src/interfaces/ISkillService.d.ts +69 -0
- package/dist/src/interfaces/ISkillService.js +6 -0
- package/dist/src/interfaces/ISkillService.js.map +1 -0
- package/dist/src/interfaces/IStorageService.d.ts +42 -0
- package/dist/src/interfaces/IStorageService.js +6 -0
- package/dist/src/interfaces/IStorageService.js.map +1 -0
- package/dist/src/interfaces/ISubagentService.d.ts +112 -0
- package/dist/src/interfaces/ISubagentService.js +6 -0
- package/dist/src/interfaces/ISubagentService.js.map +1 -0
- package/dist/src/interfaces/ITaskToolHost.d.ts +185 -0
- package/dist/src/interfaces/ITaskToolHost.js +6 -0
- package/dist/src/interfaces/ITaskToolHost.js.map +1 -0
- package/dist/src/interfaces/ITodoService.d.ts +79 -0
- package/dist/src/interfaces/ITodoService.js +6 -0
- package/dist/src/interfaces/ITodoService.js.map +1 -0
- package/dist/src/interfaces/IToolHost.d.ts +91 -0
- package/dist/src/interfaces/IToolHost.js +6 -0
- package/dist/src/interfaces/IToolHost.js.map +1 -0
- package/dist/src/interfaces/IToolKeyStorage.d.ts +62 -0
- package/dist/src/interfaces/IToolKeyStorage.js +6 -0
- package/dist/src/interfaces/IToolKeyStorage.js.map +1 -0
- package/dist/src/interfaces/IToolMessageBus.d.ts +63 -0
- package/dist/src/interfaces/IToolMessageBus.js +6 -0
- package/dist/src/interfaces/IToolMessageBus.js.map +1 -0
- package/dist/src/interfaces/IToolRegistryHost.d.ts +43 -0
- package/dist/src/interfaces/IToolRegistryHost.js +6 -0
- package/dist/src/interfaces/IToolRegistryHost.js.map +1 -0
- package/dist/src/interfaces/IWebSearchService.d.ts +16 -0
- package/dist/src/interfaces/IWebSearchService.js +7 -0
- package/dist/src/interfaces/IWebSearchService.js.map +1 -0
- package/dist/src/interfaces/index.d.ts +33 -0
- package/dist/src/interfaces/index.js +6 -0
- package/dist/src/interfaces/index.js.map +1 -0
- package/dist/src/tools/activate-skill.d.ts +26 -0
- package/dist/src/tools/activate-skill.js +121 -0
- package/dist/src/tools/activate-skill.js.map +1 -0
- package/dist/src/tools/apply-patch.d.ts +65 -0
- package/dist/src/tools/apply-patch.js +528 -0
- package/dist/src/tools/apply-patch.js.map +1 -0
- package/dist/src/tools/ast-edit/ast-config.d.ts +67 -0
- package/dist/src/tools/ast-edit/ast-config.js +72 -0
- package/dist/src/tools/ast-edit/ast-config.js.map +1 -0
- package/dist/src/tools/ast-edit/ast-edit-invocation.d.ts +40 -0
- package/dist/src/tools/ast-edit/ast-edit-invocation.js +410 -0
- package/dist/src/tools/ast-edit/ast-edit-invocation.js.map +1 -0
- package/dist/src/tools/ast-edit/ast-query-extractor.d.ts +21 -0
- package/dist/src/tools/ast-edit/ast-query-extractor.js +178 -0
- package/dist/src/tools/ast-edit/ast-query-extractor.js.map +1 -0
- package/dist/src/tools/ast-edit/ast-read-file-invocation.d.ts +26 -0
- package/dist/src/tools/ast-edit/ast-read-file-invocation.js +149 -0
- package/dist/src/tools/ast-edit/ast-read-file-invocation.js.map +1 -0
- package/dist/src/tools/ast-edit/constants.d.ts +30 -0
- package/dist/src/tools/ast-edit/constants.js +36 -0
- package/dist/src/tools/ast-edit/constants.js.map +1 -0
- package/dist/src/tools/ast-edit/context-collector.d.ts +25 -0
- package/dist/src/tools/ast-edit/context-collector.js +115 -0
- package/dist/src/tools/ast-edit/context-collector.js.map +1 -0
- package/dist/src/tools/ast-edit/context-optimizer.d.ts +29 -0
- package/dist/src/tools/ast-edit/context-optimizer.js +86 -0
- package/dist/src/tools/ast-edit/context-optimizer.js.map +1 -0
- package/dist/src/tools/ast-edit/cross-file-analyzer.d.ts +41 -0
- package/dist/src/tools/ast-edit/cross-file-analyzer.js +294 -0
- package/dist/src/tools/ast-edit/cross-file-analyzer.js.map +1 -0
- package/dist/src/tools/ast-edit/edit-calculator.d.ts +71 -0
- package/dist/src/tools/ast-edit/edit-calculator.js +249 -0
- package/dist/src/tools/ast-edit/edit-calculator.js.map +1 -0
- package/dist/src/tools/ast-edit/edit-helpers.d.ts +22 -0
- package/dist/src/tools/ast-edit/edit-helpers.js +36 -0
- package/dist/src/tools/ast-edit/edit-helpers.js.map +1 -0
- package/dist/src/tools/ast-edit/language-analysis.d.ts +19 -0
- package/dist/src/tools/ast-edit/language-analysis.js +123 -0
- package/dist/src/tools/ast-edit/language-analysis.js.map +1 -0
- package/dist/src/tools/ast-edit/local-context-analyzer.d.ts +84 -0
- package/dist/src/tools/ast-edit/local-context-analyzer.js +267 -0
- package/dist/src/tools/ast-edit/local-context-analyzer.js.map +1 -0
- package/dist/src/tools/ast-edit/repository-context-provider.d.ts +22 -0
- package/dist/src/tools/ast-edit/repository-context-provider.js +139 -0
- package/dist/src/tools/ast-edit/repository-context-provider.js.map +1 -0
- package/dist/src/tools/ast-edit/types.d.ts +155 -0
- package/dist/src/tools/ast-edit/types.js +7 -0
- package/dist/src/tools/ast-edit/types.js.map +1 -0
- package/dist/src/tools/ast-edit/workspace-context-provider.d.ts +22 -0
- package/dist/src/tools/ast-edit/workspace-context-provider.js +39 -0
- package/dist/src/tools/ast-edit/workspace-context-provider.js.map +1 -0
- package/dist/src/tools/ast-edit.d.ts +43 -0
- package/dist/src/tools/ast-edit.js +183 -0
- package/dist/src/tools/ast-edit.js.map +1 -0
- package/dist/src/tools/ast-grep.d.ts +22 -0
- package/dist/src/tools/ast-grep.js +291 -0
- package/dist/src/tools/ast-grep.js.map +1 -0
- package/dist/src/tools/check-async-tasks.d.ts +46 -0
- package/dist/src/tools/check-async-tasks.js +241 -0
- package/dist/src/tools/check-async-tasks.js.map +1 -0
- package/dist/src/tools/codesearch.d.ts +25 -0
- package/dist/src/tools/codesearch.js +153 -0
- package/dist/src/tools/codesearch.js.map +1 -0
- package/dist/src/tools/delete_line_range.d.ts +41 -0
- package/dist/src/tools/delete_line_range.js +238 -0
- package/dist/src/tools/delete_line_range.js.map +1 -0
- package/dist/src/tools/direct-web-fetch.d.ts +22 -0
- package/dist/src/tools/direct-web-fetch.js +215 -0
- package/dist/src/tools/direct-web-fetch.js.map +1 -0
- package/dist/src/tools/edit-utils.d.ts +53 -0
- package/dist/src/tools/edit-utils.js +250 -0
- package/dist/src/tools/edit-utils.js.map +1 -0
- package/dist/src/tools/edit.d.ts +70 -0
- package/dist/src/tools/edit.js +816 -0
- package/dist/src/tools/edit.js.map +1 -0
- package/dist/src/tools/exa-web-search.d.ts +27 -0
- package/dist/src/tools/exa-web-search.js +153 -0
- package/dist/src/tools/exa-web-search.js.map +1 -0
- package/dist/src/tools/glob.d.ts +55 -0
- package/dist/src/tools/glob.js +284 -0
- package/dist/src/tools/glob.js.map +1 -0
- package/dist/src/tools/google-web-fetch.d.ts +34 -0
- package/dist/src/tools/google-web-fetch.js +417 -0
- package/dist/src/tools/google-web-fetch.js.map +1 -0
- package/dist/src/tools/google-web-search-invocation.d.ts +53 -0
- package/dist/src/tools/google-web-search-invocation.js +180 -0
- package/dist/src/tools/google-web-search-invocation.js.map +1 -0
- package/dist/src/tools/google-web-search.d.ts +16 -0
- package/dist/src/tools/google-web-search.js +34 -0
- package/dist/src/tools/google-web-search.js.map +1 -0
- package/dist/src/tools/grep.d.ts +56 -0
- package/dist/src/tools/grep.js +883 -0
- package/dist/src/tools/grep.js.map +1 -0
- package/dist/src/tools/insert_at_line.d.ts +41 -0
- package/dist/src/tools/insert_at_line.js +287 -0
- package/dist/src/tools/insert_at_line.js.map +1 -0
- package/dist/src/tools/list-subagents.d.ts +31 -0
- package/dist/src/tools/list-subagents.js +122 -0
- package/dist/src/tools/list-subagents.js.map +1 -0
- package/dist/src/tools/ls.d.ts +71 -0
- package/dist/src/tools/ls.js +238 -0
- package/dist/src/tools/ls.js.map +1 -0
- package/dist/src/tools/memoryTool.d.ts +66 -0
- package/dist/src/tools/memoryTool.js +435 -0
- package/dist/src/tools/memoryTool.js.map +1 -0
- package/dist/src/tools/modifiable-tool.d.ts +37 -0
- package/dist/src/tools/modifiable-tool.js +120 -0
- package/dist/src/tools/modifiable-tool.js.map +1 -0
- package/dist/src/tools/read-file.d.ts +49 -0
- package/dist/src/tools/read-file.js +279 -0
- package/dist/src/tools/read-file.js.map +1 -0
- package/dist/src/tools/read-many-files.d.ts +60 -0
- package/dist/src/tools/read-many-files.js +529 -0
- package/dist/src/tools/read-many-files.js.map +1 -0
- package/dist/src/tools/read_line_range.d.ts +47 -0
- package/dist/src/tools/read_line_range.js +248 -0
- package/dist/src/tools/read_line_range.js.map +1 -0
- package/dist/src/tools/ripGrep.d.ts +41 -0
- package/dist/src/tools/ripGrep.js +395 -0
- package/dist/src/tools/ripGrep.js.map +1 -0
- package/dist/src/tools/shell.d.ts +60 -0
- package/dist/src/tools/shell.js +735 -0
- package/dist/src/tools/shell.js.map +1 -0
- package/dist/src/tools/structural-analysis.d.ts +27 -0
- package/dist/src/tools/structural-analysis.js +1089 -0
- package/dist/src/tools/structural-analysis.js.map +1 -0
- package/dist/src/tools/stubs.d.ts +10 -0
- package/dist/src/tools/stubs.js +6 -0
- package/dist/src/tools/stubs.js.map +1 -0
- package/dist/src/tools/task.d.ts +41 -0
- package/dist/src/tools/task.js +195 -0
- package/dist/src/tools/task.js.map +1 -0
- package/dist/src/tools/todo-events.d.ts +22 -0
- package/dist/src/tools/todo-events.js +24 -0
- package/dist/src/tools/todo-events.js.map +1 -0
- package/dist/src/tools/todo-pause.d.ts +29 -0
- package/dist/src/tools/todo-pause.js +172 -0
- package/dist/src/tools/todo-pause.js.map +1 -0
- package/dist/src/tools/todo-read.d.ts +18 -0
- package/dist/src/tools/todo-read.js +98 -0
- package/dist/src/tools/todo-read.js.map +1 -0
- package/dist/src/tools/todo-store.d.ts +35 -0
- package/dist/src/tools/todo-store.js +124 -0
- package/dist/src/tools/todo-store.js.map +1 -0
- package/dist/src/tools/todo-write.d.ts +29 -0
- package/dist/src/tools/todo-write.js +366 -0
- package/dist/src/tools/todo-write.js.map +1 -0
- package/dist/src/tools/tool-registry.d.ts +156 -0
- package/dist/src/tools/tool-registry.js +623 -0
- package/dist/src/tools/tool-registry.js.map +1 -0
- package/dist/src/tools/tools.d.ts +403 -0
- package/dist/src/tools/tools.js +519 -0
- package/dist/src/tools/tools.js.map +1 -0
- package/dist/src/tools/write-file.d.ts +45 -0
- package/dist/src/tools/write-file.js +320 -0
- package/dist/src/tools/write-file.js.map +1 -0
- package/dist/src/types/index.d.ts +17 -0
- package/dist/src/types/index.js +9 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/types/provider-content-types.d.ts +56 -0
- package/dist/src/types/provider-content-types.js +6 -0
- package/dist/src/types/provider-content-types.js.map +1 -0
- package/dist/src/types/todo-schemas.d.ts +263 -0
- package/dist/src/types/todo-schemas.js +32 -0
- package/dist/src/types/todo-schemas.js.map +1 -0
- package/dist/src/types/tool-confirmation-types.d.ts +34 -0
- package/dist/src/types/tool-confirmation-types.js +29 -0
- package/dist/src/types/tool-confirmation-types.js.map +1 -0
- package/dist/src/types/tool-context.d.ts +31 -0
- package/dist/src/types/tool-context.js +6 -0
- package/dist/src/types/tool-context.js.map +1 -0
- package/dist/src/types/tool-error.d.ts +69 -0
- package/dist/src/types/tool-error.js +94 -0
- package/dist/src/types/tool-error.js.map +1 -0
- package/dist/src/types/tool-names.d.ts +57 -0
- package/dist/src/types/tool-names.js +64 -0
- package/dist/src/types/tool-names.js.map +1 -0
- package/dist/src/utils/EmojiFilter.d.ts +134 -0
- package/dist/src/utils/EmojiFilter.js +370 -0
- package/dist/src/utils/EmojiFilter.js.map +1 -0
- package/dist/src/utils/ast-grep-utils.d.ts +42 -0
- package/dist/src/utils/ast-grep-utils.js +140 -0
- package/dist/src/utils/ast-grep-utils.js.map +1 -0
- package/dist/src/utils/debugLogger.d.ts +11 -0
- package/dist/src/utils/debugLogger.js +16 -0
- package/dist/src/utils/debugLogger.js.map +1 -0
- package/dist/src/utils/diffOptions.d.ts +14 -0
- package/dist/src/utils/diffOptions.js +46 -0
- package/dist/src/utils/diffOptions.js.map +1 -0
- package/dist/src/utils/editor.d.ts +39 -0
- package/dist/src/utils/editor.js +212 -0
- package/dist/src/utils/editor.js.map +1 -0
- package/dist/src/utils/ensure-dirs.d.ts +10 -0
- package/dist/src/utils/ensure-dirs.js +16 -0
- package/dist/src/utils/ensure-dirs.js.map +1 -0
- package/dist/src/utils/errors.d.ts +59 -0
- package/dist/src/utils/errors.js +178 -0
- package/dist/src/utils/errors.js.map +1 -0
- package/dist/src/utils/fetch.d.ts +11 -0
- package/dist/src/utils/fetch.js +74 -0
- package/dist/src/utils/fetch.js.map +1 -0
- package/dist/src/utils/fileUtils.d.ts +32 -0
- package/dist/src/utils/fileUtils.js +363 -0
- package/dist/src/utils/fileUtils.js.map +1 -0
- package/dist/src/utils/fuzzy-replacer.d.ts +61 -0
- package/dist/src/utils/fuzzy-replacer.js +492 -0
- package/dist/src/utils/fuzzy-replacer.js.map +1 -0
- package/dist/src/utils/gitLineChanges.d.ts +12 -0
- package/dist/src/utils/gitLineChanges.js +171 -0
- package/dist/src/utils/gitLineChanges.js.map +1 -0
- package/dist/src/utils/gitUtils.d.ts +6 -0
- package/dist/src/utils/gitUtils.js +31 -0
- package/dist/src/utils/gitUtils.js.map +1 -0
- package/dist/src/utils/lsp-diagnostics-helper.d.ts +27 -0
- package/dist/src/utils/lsp-diagnostics-helper.js +62 -0
- package/dist/src/utils/lsp-diagnostics-helper.js.map +1 -0
- package/dist/src/utils/mediaUtils.d.ts +38 -0
- package/dist/src/utils/mediaUtils.js +22 -0
- package/dist/src/utils/mediaUtils.js.map +1 -0
- package/dist/src/utils/pathValidation.d.ts +7 -0
- package/dist/src/utils/pathValidation.js +39 -0
- package/dist/src/utils/pathValidation.js.map +1 -0
- package/dist/src/utils/paths.d.ts +7 -0
- package/dist/src/utils/paths.js +158 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/src/utils/resolveTextSearchTarget.d.ts +17 -0
- package/dist/src/utils/resolveTextSearchTarget.js +45 -0
- package/dist/src/utils/resolveTextSearchTarget.js.map +1 -0
- package/dist/src/utils/retry.d.ts +17 -0
- package/dist/src/utils/retry.js +185 -0
- package/dist/src/utils/retry.js.map +1 -0
- package/dist/src/utils/ripgrepPathResolver.d.ts +23 -0
- package/dist/src/utils/ripgrepPathResolver.js +179 -0
- package/dist/src/utils/ripgrepPathResolver.js.map +1 -0
- package/dist/src/utils/safeJsonStringify.d.ts +9 -0
- package/dist/src/utils/safeJsonStringify.js +21 -0
- package/dist/src/utils/safeJsonStringify.js.map +1 -0
- package/dist/src/utils/schemaValidator.d.ts +13 -0
- package/dist/src/utils/schemaValidator.js +275 -0
- package/dist/src/utils/schemaValidator.js.map +1 -0
- package/dist/src/utils/terminalSerializer.d.ts +33 -0
- package/dist/src/utils/terminalSerializer.js +6 -0
- package/dist/src/utils/terminalSerializer.js.map +1 -0
- package/dist/src/utils/todoContextTracker.d.ts +12 -0
- package/dist/src/utils/todoContextTracker.js +28 -0
- package/dist/src/utils/todoContextTracker.js.map +1 -0
- package/dist/src/utils/todoFormatter.d.ts +24 -0
- package/dist/src/utils/todoFormatter.js +157 -0
- package/dist/src/utils/todoFormatter.js.map +1 -0
- package/dist/src/utils/todoReminderService.d.ts +22 -0
- package/dist/src/utils/todoReminderService.js +43 -0
- package/dist/src/utils/todoReminderService.js.map +1 -0
- package/dist/src/utils/tool-key-storage-facade.d.ts +32 -0
- package/dist/src/utils/tool-key-storage-facade.js +56 -0
- package/dist/src/utils/tool-key-storage-facade.js.map +1 -0
- package/dist/src/utils/tool-key-storage-types.d.ts +56 -0
- package/dist/src/utils/tool-key-storage-types.js +56 -0
- package/dist/src/utils/tool-key-storage-types.js.map +1 -0
- package/dist/src/utils/toolOutputLimiter.d.ts +29 -0
- package/dist/src/utils/toolOutputLimiter.js +107 -0
- package/dist/src/utils/toolOutputLimiter.js.map +1 -0
- package/dist/src/utils/unicodeUtils.d.ts +55 -0
- package/dist/src/utils/unicodeUtils.js +129 -0
- package/dist/src/utils/unicodeUtils.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tools-owned interface for todo management.
|
|
12
|
+
*
|
|
13
|
+
* Provides todo store, reminder service, context tracker, and
|
|
14
|
+
* default agent ID access needed by todo-read, todo-write,
|
|
15
|
+
* todo-pause, and todo-store tools.
|
|
16
|
+
*
|
|
17
|
+
* Consumed by: todo-read, todo-write, todo-pause, todo-store.
|
|
18
|
+
* Implemented by: CoreTodoServiceAdapter in packages/core.
|
|
19
|
+
*/
|
|
20
|
+
import type { ToolContext } from '../types/tool-context.js';
|
|
21
|
+
import type { Todo } from '../types/todo-schemas.js';
|
|
22
|
+
import type { TodoStateChange } from '../utils/todoReminderService.js';
|
|
23
|
+
/** Opaque handle to the todo store. */
|
|
24
|
+
export interface TodoStore {
|
|
25
|
+
/** Get all todos. */
|
|
26
|
+
getTodos?: () => Todo[];
|
|
27
|
+
/** Set/replace all todos. */
|
|
28
|
+
setTodos?: (todos: Todo[]) => void;
|
|
29
|
+
/** Read persisted todos asynchronously. */
|
|
30
|
+
readTodos?: () => Promise<Todo[]>;
|
|
31
|
+
/** Write persisted todos asynchronously. */
|
|
32
|
+
writeTodos?: (todos: Todo[]) => Promise<void>;
|
|
33
|
+
/** Read paused state. */
|
|
34
|
+
readPausedState?: () => Promise<boolean>;
|
|
35
|
+
/** Write paused state. */
|
|
36
|
+
writePausedState?: (paused: boolean) => Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
/** Opaque handle to the todo reminder service. */
|
|
39
|
+
export interface TodoReminderService {
|
|
40
|
+
/** Calculate the difference between two todo lists. */
|
|
41
|
+
calculateStateChange?: (oldTodos: Todo[], newTodos: Todo[]) => TodoStateChange;
|
|
42
|
+
/** Check whether a reminder should be generated. */
|
|
43
|
+
shouldGenerateReminder?: (stateChange: TodoStateChange) => boolean;
|
|
44
|
+
/** Get reminder text for a state change. */
|
|
45
|
+
getReminderForStateChange?: (stateChange: TodoStateChange) => string | undefined;
|
|
46
|
+
/** Get reminder text when the todo list is empty. */
|
|
47
|
+
getReminderForEmptyTodos?: (isComplexTask: boolean) => string;
|
|
48
|
+
}
|
|
49
|
+
/** Opaque handle to the todo context tracker. */
|
|
50
|
+
export interface TodoContextTracker {
|
|
51
|
+
/** Set the active todo. */
|
|
52
|
+
setActiveTodo?: (todoId: string | null) => void;
|
|
53
|
+
/** Clear the active todo. */
|
|
54
|
+
clearActiveTodo?: () => void;
|
|
55
|
+
/** Read the active todo. */
|
|
56
|
+
getActiveTodo?: () => string | null;
|
|
57
|
+
}
|
|
58
|
+
export interface ITodoService {
|
|
59
|
+
/**
|
|
60
|
+
* Get the todo store instance.
|
|
61
|
+
* @returns The todo store.
|
|
62
|
+
*/
|
|
63
|
+
getTodoStore(context?: ToolContext): TodoStore;
|
|
64
|
+
/**
|
|
65
|
+
* Get the todo reminder service instance.
|
|
66
|
+
* @returns The reminder service.
|
|
67
|
+
*/
|
|
68
|
+
getReminderService(): TodoReminderService;
|
|
69
|
+
/**
|
|
70
|
+
* Get the todo context tracker instance.
|
|
71
|
+
* @returns The context tracker.
|
|
72
|
+
*/
|
|
73
|
+
getContextTracker(context?: ToolContext): TodoContextTracker;
|
|
74
|
+
/**
|
|
75
|
+
* Get the default agent ID for todo scoping.
|
|
76
|
+
* @returns The default agent ID.
|
|
77
|
+
*/
|
|
78
|
+
getDefaultAgentId(): string;
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITodoService.js","sourceRoot":"","sources":["../../../src/interfaces/ITodoService.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tools-owned interface for host environment access.
|
|
12
|
+
*
|
|
13
|
+
* Provides target directory, workspace roots, approval mode,
|
|
14
|
+
* interactive state, and feature flag queries needed by
|
|
15
|
+
* file-manipulation and search tools.
|
|
16
|
+
*
|
|
17
|
+
* Consumed by: write-file, insert_at_line, delete_line_range,
|
|
18
|
+
* apply-patch, read_line_range, glob, grep, edit, ast-edit.
|
|
19
|
+
* Implemented by: CoreToolHostAdapter in packages/core.
|
|
20
|
+
*/
|
|
21
|
+
export type ApprovalMode = 'auto' | 'yolo' | 'default';
|
|
22
|
+
export interface IToolHostFileService {
|
|
23
|
+
shouldGitIgnoreFile(filePath: string): boolean;
|
|
24
|
+
shouldLlxprtIgnoreFile(filePath: string): boolean;
|
|
25
|
+
filterFiles(paths: string[], opts: {
|
|
26
|
+
respectGitIgnore: boolean;
|
|
27
|
+
respectLlxprtIgnore: boolean;
|
|
28
|
+
}): string[];
|
|
29
|
+
}
|
|
30
|
+
export interface IToolHostFileFilteringOptions {
|
|
31
|
+
respectGitIgnore: boolean;
|
|
32
|
+
respectLlxprtIgnore: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface IToolHostFileSystemService {
|
|
35
|
+
readTextFile(filePath: string): Promise<string>;
|
|
36
|
+
writeTextFile(filePath: string, content: string): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
export interface IToolHostGitStatsService {
|
|
39
|
+
trackFileEdit(filePath: string, currentContent: string, newContent: string): Promise<unknown>;
|
|
40
|
+
}
|
|
41
|
+
export interface IToolHost {
|
|
42
|
+
/** Returns the target directory for file operations. */
|
|
43
|
+
getTargetDir(): string;
|
|
44
|
+
/** Returns the list of workspace root paths. */
|
|
45
|
+
getWorkspaceRoots(): string[];
|
|
46
|
+
/** Returns the current approval mode string. */
|
|
47
|
+
getApprovalMode(): ApprovalMode;
|
|
48
|
+
/** Updates the current approval mode. */
|
|
49
|
+
setApprovalMode(mode: ApprovalMode): void;
|
|
50
|
+
/** Whether the tool is running in interactive mode. */
|
|
51
|
+
isInteractive(): boolean;
|
|
52
|
+
/** Whether a specific feature flag is enabled. */
|
|
53
|
+
hasFeatureFlag(flag: string): boolean;
|
|
54
|
+
/** Returns file discovery/filtering services needed by filesystem tools. */
|
|
55
|
+
getFileService(): IToolHostFileService;
|
|
56
|
+
/** Returns default file filtering options. */
|
|
57
|
+
getFileFilteringOptions(): IToolHostFileFilteringOptions;
|
|
58
|
+
/** Returns glob exclusion patterns. */
|
|
59
|
+
getFileExclusions(): string[];
|
|
60
|
+
/** Returns read-many-files exclusion patterns. */
|
|
61
|
+
getReadManyFilesExclusions(): string[];
|
|
62
|
+
/** Whether .llxprtignore filtering is enabled. */
|
|
63
|
+
getFileFilteringRespectLlxprtIgnore(): boolean;
|
|
64
|
+
/** Returns the absolute path to the .llxprtignore file if it should be used. */
|
|
65
|
+
getLlxprtIgnoreFilePath(): string | null;
|
|
66
|
+
/** Records a file read operation for host telemetry. */
|
|
67
|
+
recordFileRead(filePath: string, lines?: number, mimeType?: string): void;
|
|
68
|
+
/** Returns the filesystem service used for file reads/writes when available. */
|
|
69
|
+
getFileSystemService?(): IToolHostFileSystemService | undefined;
|
|
70
|
+
/** Returns the file-service .llxprtignore patterns when available. */
|
|
71
|
+
getLlxprtIgnorePatterns(): string[];
|
|
72
|
+
/** Returns ephemeral settings used for output limits and feature toggles. */
|
|
73
|
+
getEphemeralSettings(): Record<string, unknown>;
|
|
74
|
+
/** Whether debug logging is enabled. */
|
|
75
|
+
getDebugMode(): boolean;
|
|
76
|
+
/** Whether conversation logging is enabled for metadata collection. */
|
|
77
|
+
getConversationLoggingEnabled?(): boolean;
|
|
78
|
+
/** Returns the git stats service used for edit metadata when enabled. */
|
|
79
|
+
getGitStatsService?(): IToolHostGitStatsService | undefined;
|
|
80
|
+
/** Returns provider server-tools support for tools that delegate to provider-native tools. */
|
|
81
|
+
getServerToolsProvider?(): {
|
|
82
|
+
getServerTools: () => string[];
|
|
83
|
+
invokeServerTool: (name: string, params: {
|
|
84
|
+
prompt: string;
|
|
85
|
+
}, options: {
|
|
86
|
+
signal: AbortSignal;
|
|
87
|
+
}) => Promise<unknown>;
|
|
88
|
+
} | null;
|
|
89
|
+
/** Whether the host has a provider manager configured. */
|
|
90
|
+
hasProviderManager?(): boolean;
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IToolHost.js","sourceRoot":"","sources":["../../../src/interfaces/IToolHost.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tools-owned interface for tool key storage.
|
|
12
|
+
*
|
|
13
|
+
* Provides API key management operations needed by
|
|
14
|
+
* tool-key-storage, codesearch, exa-web-search, and
|
|
15
|
+
* google-web-search tools.
|
|
16
|
+
*
|
|
17
|
+
* Consumed by: tool-key-storage, codesearch, exa-web-search,
|
|
18
|
+
* google-web-search.
|
|
19
|
+
* Implemented by: CoreToolKeyStorageAdapter in packages/core.
|
|
20
|
+
*/
|
|
21
|
+
export interface IToolKeyStorage {
|
|
22
|
+
/**
|
|
23
|
+
* Save an API key for a tool.
|
|
24
|
+
* @param toolName - The tool name.
|
|
25
|
+
* @param key - The API key to save.
|
|
26
|
+
*/
|
|
27
|
+
saveKey(toolName: string, key: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Get an API key for a tool.
|
|
30
|
+
* @param toolName - The tool name.
|
|
31
|
+
* @returns The API key, or null if not found.
|
|
32
|
+
*/
|
|
33
|
+
getKey(toolName: string): Promise<string | null>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete an API key for a tool.
|
|
36
|
+
* @param toolName - The tool name.
|
|
37
|
+
*/
|
|
38
|
+
deleteKey(toolName: string): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Check if an API key exists for a tool.
|
|
41
|
+
* @param toolName - The tool name.
|
|
42
|
+
* @returns Whether the key exists.
|
|
43
|
+
*/
|
|
44
|
+
hasKey(toolName: string): Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Resolve an API key for a tool, checking multiple sources.
|
|
47
|
+
* @param toolName - The tool name.
|
|
48
|
+
* @returns The resolved API key, or null if not found.
|
|
49
|
+
*/
|
|
50
|
+
resolveKey(toolName: string): Promise<string | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Mask an API key for display purposes.
|
|
53
|
+
* @param key - The API key to mask.
|
|
54
|
+
* @returns The masked key string.
|
|
55
|
+
*/
|
|
56
|
+
maskKeyForDisplay(key: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Get the list of tool names that support key storage.
|
|
59
|
+
* @returns Array of supported tool names.
|
|
60
|
+
*/
|
|
61
|
+
getSupportedToolNames(): string[];
|
|
62
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IToolKeyStorage.js","sourceRoot":"","sources":["../../../src/interfaces/IToolKeyStorage.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tools-owned interface for the tool message bus.
|
|
12
|
+
*
|
|
13
|
+
* Provides confirmation request, policy update, and optional
|
|
14
|
+
* subscription capabilities needed by tools that require user
|
|
15
|
+
* confirmation before execution.
|
|
16
|
+
*
|
|
17
|
+
* Consumed by: tools.ts / BaseToolInvocation, modifiable-tool,
|
|
18
|
+
* shell, mcp-tool.
|
|
19
|
+
* Implemented by: CoreMessageBusAdapter in packages/core.
|
|
20
|
+
*/
|
|
21
|
+
export type { ToolConfirmationOutcome } from '../types/tool-confirmation-types.js';
|
|
22
|
+
import type { ToolConfirmationOutcome } from '../types/tool-confirmation-types.js';
|
|
23
|
+
/** Options for policy update after confirmation. */
|
|
24
|
+
export interface PolicyUpdateOptions {
|
|
25
|
+
/** Tool name whose policy should be updated. */
|
|
26
|
+
toolName?: string;
|
|
27
|
+
/** Whether to persist the update. */
|
|
28
|
+
persist?: boolean;
|
|
29
|
+
/** Optional shell command prefix used by shell-like tools. */
|
|
30
|
+
commandPrefix?: string | string[];
|
|
31
|
+
/** Optional MCP server name used by MCP tools. */
|
|
32
|
+
mcpName?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Handler for tool message events. */
|
|
35
|
+
export type ToolMessageHandler = (event: ToolMessageEvent) => void | Promise<void>;
|
|
36
|
+
/** Event emitted through the message bus. */
|
|
37
|
+
export interface ToolMessageEvent {
|
|
38
|
+
type: string;
|
|
39
|
+
payload?: unknown;
|
|
40
|
+
}
|
|
41
|
+
/** Unsubscribe function returned by subscribe. */
|
|
42
|
+
export type Unsubscribe = () => void;
|
|
43
|
+
export interface IToolMessageBus {
|
|
44
|
+
/**
|
|
45
|
+
* Request user confirmation for a tool call.
|
|
46
|
+
* @param details - Serializable confirmation details object.
|
|
47
|
+
* @param abortSignal - Optional abort signal for cancellation.
|
|
48
|
+
* @returns The outcome of the confirmation request.
|
|
49
|
+
*/
|
|
50
|
+
requestConfirmation(...args: any[]): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Publish a policy update after confirmation.
|
|
53
|
+
* @param outcome - The confirmation outcome to apply.
|
|
54
|
+
* @param options - Optional policy update options.
|
|
55
|
+
*/
|
|
56
|
+
publishPolicyUpdate?(outcome: ToolConfirmationOutcome, options?: PolicyUpdateOptions): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Optional: subscribe to message bus events.
|
|
59
|
+
* @param handler - Handler function for events.
|
|
60
|
+
* @returns Unsubscribe function.
|
|
61
|
+
*/
|
|
62
|
+
subscribe?: any;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IToolMessageBus.js","sourceRoot":"","sources":["../../../src/interfaces/IToolMessageBus.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Tools-owned interface for tool registry host queries.
|
|
12
|
+
*
|
|
13
|
+
* Provides core tools list, excluded tools, discovery command,
|
|
14
|
+
* and tool enablement checks needed by the tool-registry tool.
|
|
15
|
+
*
|
|
16
|
+
* Consumed by: tool-registry.
|
|
17
|
+
* Implemented by: CoreToolRegistryHostAdapter in packages/core.
|
|
18
|
+
*/
|
|
19
|
+
export interface IToolRegistryHost {
|
|
20
|
+
/** Returns ephemeral settings used for tool governance. */
|
|
21
|
+
getEphemeralSettings?(): Record<string, unknown> | null | undefined;
|
|
22
|
+
/** Returns the list of core tool names. */
|
|
23
|
+
getCoreTools?(): string[] | undefined;
|
|
24
|
+
/** Returns the list of excluded tool names. */
|
|
25
|
+
getExcludeTools?(): string[] | undefined;
|
|
26
|
+
/** Returns the tool discovery command, if configured. */
|
|
27
|
+
getToolDiscoveryCommand?(): string | undefined;
|
|
28
|
+
/** Returns the tool call command, if configured. */
|
|
29
|
+
getToolCallCommand?(): string | undefined;
|
|
30
|
+
/** Returns the prompt registry boundary used by discovery refreshes. */
|
|
31
|
+
getPromptRegistry?(): {
|
|
32
|
+
clear(): void;
|
|
33
|
+
} | undefined;
|
|
34
|
+
/** Returns settings used for schema transforms. */
|
|
35
|
+
getSettingsService?(): {
|
|
36
|
+
getAllGlobalSettings?(): Record<string, unknown> | undefined;
|
|
37
|
+
get?(key: string): unknown;
|
|
38
|
+
} | undefined;
|
|
39
|
+
/** Whether a specific tool is enabled. */
|
|
40
|
+
isToolEnabled?(name: string): boolean;
|
|
41
|
+
/** Whether the host workspace is trusted for trusted MCP tools. */
|
|
42
|
+
isTrustedFolder?(): boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IToolRegistryHost.js","sourceRoot":"","sources":["../../../src/interfaces/IToolRegistryHost.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
export interface WebSearchServerToolsProvider {
|
|
7
|
+
getServerTools(): string[];
|
|
8
|
+
invokeServerTool(name: string, params: {
|
|
9
|
+
query: string;
|
|
10
|
+
}, options: {
|
|
11
|
+
signal: AbortSignal;
|
|
12
|
+
}): Promise<unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface IWebSearchService {
|
|
15
|
+
getServerToolsProvider(): WebSearchServerToolsProvider | undefined;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IWebSearchService.js","sourceRoot":"","sources":["../../../src/interfaces/IWebSearchService.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @plan:PLAN-20260608-ISSUE1585.P03
|
|
3
|
+
* @requirement:REQ-INTERFACE-OWNERSHIP
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2025 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Barrel export for tools-owned interface contracts.
|
|
12
|
+
*
|
|
13
|
+
* All interfaces are defined in packages/tools and must not
|
|
14
|
+
* import from packages/core, packages/cli, or packages/providers.
|
|
15
|
+
*/
|
|
16
|
+
export type { ApprovalMode, IToolHost, IToolHostFileFilteringOptions, IToolHostFileService, IToolHostFileSystemService, IToolHostGitStatsService, } from './IToolHost.js';
|
|
17
|
+
export type { IToolRegistryHost } from './IToolRegistryHost.js';
|
|
18
|
+
export type { IToolMessageBus, ToolConfirmationOutcome, PolicyUpdateOptions, ToolMessageHandler, ToolMessageEvent, Unsubscribe, } from './IToolMessageBus.js';
|
|
19
|
+
export type { IShellExecutionService, ShellOptions, ShellResult, } from './IShellExecutionService.js';
|
|
20
|
+
export type { ISubagentService, SubagentExecutionOptions, SubagentRequest, SubagentResult, SubagentInfo, SubagentConfig, } from './ISubagentService.js';
|
|
21
|
+
export type { IAsyncTaskService, AsyncTaskStatus, AsyncTaskInfo, AsyncTaskLookupResult, } from './IAsyncTaskService.js';
|
|
22
|
+
export type { ISkillService, SkillActivationResult, SkillManager, SkillInfo, } from './ISkillService.js';
|
|
23
|
+
export type { IMcpToolService, McpFunctionCall, McpResponsePart, McpToolParams, } from './IMcpToolService.js';
|
|
24
|
+
export type { IIdeService, DiffParams, DiffUpdateResult, IDEConnectionStatus, OpenDiffParams, } from './IIdeService.js';
|
|
25
|
+
export type { ILspService, Diagnostic, LspConfig } from './ILspService.js';
|
|
26
|
+
export type { IStorageService } from './IStorageService.js';
|
|
27
|
+
export type { IToolKeyStorage } from './IToolKeyStorage.js';
|
|
28
|
+
export type { ITodoService, TodoStore, TodoReminderService, TodoContextTracker, } from './ITodoService.js';
|
|
29
|
+
export type { ISettingsService, SettingsService } from './ISettingsService.js';
|
|
30
|
+
export type { IShellToolHost, ShellExecutionResult, ShellOutputEvent, CommandPolicyResult, OutputLimits, ShellExecutionConfig, ShellTimeoutConfig, CommandRootsResult, } from './IShellToolHost.js';
|
|
31
|
+
export type { ITaskToolHost, LaunchedSubagent, ISubagentScope, ISubagentOutput, TaskLaunchRequest, TaskTimeoutConfig, AsyncSettingsCheck, AsyncSlotResult, AsyncTaskRegistration, CanLaunchResult, IToolGovernance, } from './ITaskToolHost.js';
|
|
32
|
+
export type { IPromptRegistryService, PromptRegistry, Prompt, } from './IPromptRegistryService.js';
|
|
33
|
+
export type { IWebSearchService, WebSearchServerToolsProvider, } from './IWebSearchService.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { ToolResult, ToolInvocation } from './tools.js';
|
|
7
|
+
import { BaseDeclarativeTool } from './tools.js';
|
|
8
|
+
import type { IToolMessageBus, ISkillService } from '../interfaces/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Parameters for the ActivateSkill tool
|
|
11
|
+
*/
|
|
12
|
+
export interface ActivateSkillToolParams {
|
|
13
|
+
/**
|
|
14
|
+
* The name of the skill to activate
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Implementation of the ActivateSkill tool logic
|
|
20
|
+
*/
|
|
21
|
+
export declare class ActivateSkillTool extends BaseDeclarativeTool<ActivateSkillToolParams, ToolResult> {
|
|
22
|
+
private readonly skillService;
|
|
23
|
+
static readonly Name = "activate_skill";
|
|
24
|
+
constructor(skillService: ISkillService, messageBus: IToolMessageBus);
|
|
25
|
+
protected createInvocation(params: ActivateSkillToolParams, messageBus: IToolMessageBus, _toolName?: string, _toolDisplayName?: string): ToolInvocation<ActivateSkillToolParams, ToolResult>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
8
|
+
import { BaseDeclarativeTool, BaseToolInvocation, Kind } from './tools.js';
|
|
9
|
+
import { ACTIVATE_SKILL_TOOL_NAME } from '../types/tool-names.js';
|
|
10
|
+
import { ToolErrorType } from '../types/tool-error.js';
|
|
11
|
+
class ActivateSkillToolInvocation extends BaseToolInvocation {
|
|
12
|
+
skillService;
|
|
13
|
+
cachedFolderStructure;
|
|
14
|
+
constructor(skillService, params, messageBus, _toolName, _toolDisplayName) {
|
|
15
|
+
super(params, messageBus, _toolName, _toolDisplayName);
|
|
16
|
+
this.skillService = skillService;
|
|
17
|
+
}
|
|
18
|
+
getDescription() {
|
|
19
|
+
const skillName = this.params.name;
|
|
20
|
+
const skill = this.skillService.getSkill(skillName);
|
|
21
|
+
if (skill) {
|
|
22
|
+
return `"${skillName}": ${skill.description}`;
|
|
23
|
+
}
|
|
24
|
+
return `"${skillName}" (?) unknown skill`;
|
|
25
|
+
}
|
|
26
|
+
async getOrFetchFolderStructure(skillName) {
|
|
27
|
+
this.cachedFolderStructure ??=
|
|
28
|
+
await this.skillService.getFolderStructure(skillName);
|
|
29
|
+
return this.cachedFolderStructure;
|
|
30
|
+
}
|
|
31
|
+
async shouldConfirmExecute(_abortSignal) {
|
|
32
|
+
if (!this.messageBus) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const skillName = this.params.name;
|
|
36
|
+
const skill = this.skillService.getSkill(skillName);
|
|
37
|
+
if (!skill) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const folderStructure = await this.getOrFetchFolderStructure(skillName);
|
|
41
|
+
const confirmationDetails = {
|
|
42
|
+
type: 'info',
|
|
43
|
+
title: `Activate Skill: ${skillName}`,
|
|
44
|
+
prompt: `You are about to enable the specialized agent skill **${skillName}**.
|
|
45
|
+
|
|
46
|
+
**Description:**
|
|
47
|
+
${skill.description ?? ''}
|
|
48
|
+
|
|
49
|
+
**Resources to be shared with the model:**
|
|
50
|
+
${folderStructure}`,
|
|
51
|
+
onConfirm: async (outcome) => {
|
|
52
|
+
await this.publishPolicyUpdate(outcome);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
return confirmationDetails;
|
|
56
|
+
}
|
|
57
|
+
async execute(_signal) {
|
|
58
|
+
const skillName = this.params.name;
|
|
59
|
+
const result = await this.skillService.activateSkill(skillName);
|
|
60
|
+
if (!result.success) {
|
|
61
|
+
const availableSkills = result.availableSkills?.join(', ') ?? '';
|
|
62
|
+
const errorMessage = result.error ??
|
|
63
|
+
`Skill "${skillName}" not found. Available skills are: ${availableSkills}`;
|
|
64
|
+
return {
|
|
65
|
+
llmContent: `Error: ${errorMessage}`,
|
|
66
|
+
returnDisplay: `Error: ${errorMessage}`,
|
|
67
|
+
error: {
|
|
68
|
+
message: errorMessage,
|
|
69
|
+
type: ToolErrorType.INVALID_TOOL_PARAMS,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const folderStructure = result.folderStructure ??
|
|
74
|
+
(await this.getOrFetchFolderStructure(skillName));
|
|
75
|
+
return {
|
|
76
|
+
llmContent: `<activated_skill name="${skillName}">
|
|
77
|
+
<instructions>
|
|
78
|
+
${result.instructions ?? ''}
|
|
79
|
+
</instructions>
|
|
80
|
+
|
|
81
|
+
<available_resources>
|
|
82
|
+
${folderStructure}
|
|
83
|
+
</available_resources>
|
|
84
|
+
</activated_skill>`,
|
|
85
|
+
returnDisplay: `Skill **${skillName}** activated. Resources loaded from \`${result.resourceDirectory ?? ''}\`:\n\n${folderStructure}`,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Implementation of the ActivateSkill tool logic
|
|
91
|
+
*/
|
|
92
|
+
export class ActivateSkillTool extends BaseDeclarativeTool {
|
|
93
|
+
skillService;
|
|
94
|
+
static Name = ACTIVATE_SKILL_TOOL_NAME;
|
|
95
|
+
constructor(skillService, messageBus) {
|
|
96
|
+
const skills = skillService.listSkills();
|
|
97
|
+
const skillNames = skills.map((s) => s.name);
|
|
98
|
+
let schema;
|
|
99
|
+
if (skillNames.length === 0) {
|
|
100
|
+
schema = z.object({
|
|
101
|
+
name: z.string().describe('No skills are currently available.'),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
schema = z.object({
|
|
106
|
+
name: z
|
|
107
|
+
.enum(skillNames)
|
|
108
|
+
.describe('The name of the skill to activate.'),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
const availableSkillsHint = skillNames.length > 0
|
|
112
|
+
? ` (Available: ${skillNames.map((n) => `'${n}'`).join(', ')})`
|
|
113
|
+
: '';
|
|
114
|
+
super(ActivateSkillTool.Name, 'Activate Skill', `Activates a specialized agent skill by name${availableSkillsHint}. Returns the skill's instructions wrapped in \`<activated_skill>\` tags. These provide specialized guidance for the current task. Use this when you identify a task that matches a skill's description. ONLY use names exactly as they appear in the \`<available_skills>\` section.`, Kind.Other, zodToJsonSchema(schema), true, false, messageBus);
|
|
115
|
+
this.skillService = skillService;
|
|
116
|
+
}
|
|
117
|
+
createInvocation(params, messageBus, _toolName, _toolDisplayName) {
|
|
118
|
+
return new ActivateSkillToolInvocation(this.skillService, params, messageBus, _toolName, _toolDisplayName ?? 'Activate Skill');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=activate-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activate-skill.js","sourceRoot":"","sources":["../../../src/tools/activate-skill.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAOrD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAE3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAYvD,MAAM,2BAA4B,SAAQ,kBAGzC;IAIoB;IAHX,qBAAqB,CAAqB;IAElD,YACmB,YAA2B,EAC5C,MAA+B,EAC/B,UAA2B,EAC3B,SAAkB,EAClB,gBAAyB;QAEzB,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC;QANtC,iBAAY,GAAZ,YAAY,CAAe;IAO9C,CAAC;IAED,cAAc;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACpD,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,IAAI,SAAS,MAAM,KAAK,CAAC,WAAW,EAAE,CAAC;QAChD,CAAC;QACD,OAAO,IAAI,SAAS,qBAAqB,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,yBAAyB,CAAC,SAAiB;QACvD,IAAI,CAAC,qBAAqB;YACxB,MAAM,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC,qBAAqB,CAAC;IACpC,CAAC;IAEQ,KAAK,CAAC,oBAAoB,CACjC,YAAyB;QAEzB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAEpD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC;QAExE,MAAM,mBAAmB,GAAgC;YACvD,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,mBAAmB,SAAS,EAAE;YACrC,MAAM,EAAE,yDAAyD,SAAS;;;EAG9E,KAAK,CAAC,WAAW,IAAI,EAAE;;;EAGvB,eAAe,EAAE;YACb,SAAS,EAAE,KAAK,EAAE,OAAgC,EAAE,EAAE;gBACpD,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC;SACF,CAAC;QACF,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAoB;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAEhE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,eAAe,GAAG,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACjE,MAAM,YAAY,GAChB,MAAM,CAAC,KAAK;gBACZ,UAAU,SAAS,sCAAsC,eAAe,EAAE,CAAC;YAC7E,OAAO;gBACL,UAAU,EAAE,UAAU,YAAY,EAAE;gBACpC,aAAa,EAAE,UAAU,YAAY,EAAE;gBACvC,KAAK,EAAE;oBACL,OAAO,EAAE,YAAY;oBACrB,IAAI,EAAE,aAAa,CAAC,mBAAmB;iBACxC;aACF,CAAC;QACJ,CAAC;QAED,MAAM,eAAe,GACnB,MAAM,CAAC,eAAe;YACtB,CAAC,MAAM,IAAI,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,CAAC;QAEpD,OAAO;YACL,UAAU,EAAE,0BAA0B,SAAS;;MAE/C,MAAM,CAAC,YAAY,IAAI,EAAE;;;;MAIzB,eAAe;;mBAEF;YACb,aAAa,EAAE,WAAW,SAAS,yCAAyC,MAAM,CAAC,iBAAiB,IAAI,EAAE,UAAU,eAAe,EAAE;SACtI,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,mBAGtC;IAIoB;IAHnB,MAAM,CAAU,IAAI,GAAG,wBAAwB,CAAC;IAEhD,YACmB,YAA2B,EAC5C,UAA2B;QAE3B,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,MAAoB,CAAC;QACzB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;gBAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;aAChE,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;gBAChB,IAAI,EAAE,CAAC;qBACJ,IAAI,CAAC,UAAmC,CAAC;qBACzC,QAAQ,CAAC,oCAAoC,CAAC;aAClD,CAAC,CAAC;QACL,CAAC;QAED,MAAM,mBAAmB,GACvB,UAAU,CAAC,MAAM,GAAG,CAAC;YACnB,CAAC,CAAC,gBAAgB,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YAC/D,CAAC,CAAC,EAAE,CAAC;QAET,KAAK,CACH,iBAAiB,CAAC,IAAI,EACtB,gBAAgB,EAChB,8CAA8C,mBAAmB,uRAAuR,EACxV,IAAI,CAAC,KAAK,EACV,eAAe,CAAC,MAAM,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,UAAU,CACX,CAAC;QAjCe,iBAAY,GAAZ,YAAY,CAAe;IAkC9C,CAAC;IAES,gBAAgB,CACxB,MAA+B,EAC/B,UAA2B,EAC3B,SAAkB,EAClB,gBAAyB;QAEzB,OAAO,IAAI,2BAA2B,CACpC,IAAI,CAAC,YAAY,EACjB,MAAM,EACN,UAAU,EACV,SAAS,EACT,gBAAgB,IAAI,gBAAgB,CACrC,CAAC;IACJ,CAAC"}
|