@tyvm/knowhow 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/launch.json +14 -0
- package/CONFIG.md +336 -0
- package/README.md +49 -0
- package/autodoc/chat.mdx +20 -0
- package/autodoc/cli.mdx +11 -0
- package/autodoc/plugins/asana.mdx +47 -0
- package/autodoc/plugins/downloader/downloader.mdx +38 -0
- package/autodoc/plugins/downloader/plugin.mdx +37 -0
- package/autodoc/plugins/downloader/types.mdx +42 -0
- package/autodoc/plugins/embedding.mdx +41 -0
- package/autodoc/plugins/figma.mdx +45 -0
- package/autodoc/plugins/github.mdx +40 -0
- package/autodoc/plugins/jira.mdx +46 -0
- package/autodoc/plugins/language.mdx +37 -0
- package/autodoc/plugins/linear.mdx +35 -0
- package/autodoc/plugins/notion.mdx +38 -0
- package/autodoc/plugins/plugins.mdx +59 -0
- package/autodoc/plugins/types.mdx +51 -0
- package/autodoc/plugins/vim.mdx +39 -0
- package/autodoc/tools/addInternalTools.mdx +1 -0
- package/autodoc/tools/agentCall.mdx +1 -0
- package/autodoc/tools/asana/definitions.mdx +10 -0
- package/autodoc/tools/asana/index.mdx +12 -0
- package/autodoc/tools/askHuman.mdx +1 -0
- package/autodoc/tools/callPlugin.mdx +1 -0
- package/autodoc/tools/embeddingSearch.mdx +1 -0
- package/autodoc/tools/execCommand.mdx +1 -0
- package/autodoc/tools/fileSearch.mdx +1 -0
- package/autodoc/tools/finalAnswer.mdx +1 -0
- package/autodoc/tools/github/definitions.mdx +6 -0
- package/autodoc/tools/github/index.mdx +8 -0
- package/autodoc/tools/index.mdx +14 -0
- package/autodoc/tools/lintFile.mdx +7 -0
- package/autodoc/tools/list.mdx +16 -0
- package/autodoc/tools/modifyFile.mdx +7 -0
- package/autodoc/tools/patch.mdx +9 -0
- package/autodoc/tools/readBlocks.mdx +1 -0
- package/autodoc/tools/readFile.mdx +1 -0
- package/autodoc/tools/scanFile.mdx +1 -0
- package/autodoc/tools/textSearch.mdx +6 -0
- package/autodoc/tools/types/fileblock.mdx +1 -0
- package/autodoc/tools/visionTool.mdx +1 -0
- package/autodoc/tools/writeFile.mdx +1 -0
- package/jest.config.js +18 -0
- package/package.json +89 -0
- package/src/agents/base/base.ts +619 -0
- package/src/agents/base/prompt.ts +26 -0
- package/src/agents/configurable/ConfigAgent.ts +23 -0
- package/src/agents/developer/developer.ts +69 -0
- package/src/agents/index.ts +8 -0
- package/src/agents/interface.ts +11 -0
- package/src/agents/patcher/codebase.md +27 -0
- package/src/agents/patcher/patcher.ts +110 -0
- package/src/agents/researcher/researcher.ts +109 -0
- package/src/agents/tools/addInternalTools.ts +21 -0
- package/src/agents/tools/agentCall.ts +18 -0
- package/src/agents/tools/aiClient.ts +36 -0
- package/src/agents/tools/asana/definitions.ts +199 -0
- package/src/agents/tools/asana/index.ts +108 -0
- package/src/agents/tools/askHuman.ts +8 -0
- package/src/agents/tools/callPlugin.ts +4 -0
- package/src/agents/tools/embeddingSearch.ts +5 -0
- package/src/agents/tools/execCommand.ts +26 -0
- package/src/agents/tools/fileSearch.ts +33 -0
- package/src/agents/tools/finalAnswer.ts +4 -0
- package/src/agents/tools/github/definitions.ts +89 -0
- package/src/agents/tools/github/index.ts +67 -0
- package/src/agents/tools/googleSearch.ts +242 -0
- package/src/agents/tools/index.ts +24 -0
- package/src/agents/tools/language/definitions.ts +97 -0
- package/src/agents/tools/language/index.ts +19 -0
- package/src/agents/tools/lintFile.ts +17 -0
- package/src/agents/tools/list.ts +514 -0
- package/src/agents/tools/loadWebpage.ts +129 -0
- package/src/agents/tools/modifyFile.ts +53 -0
- package/src/agents/tools/patch.ts +672 -0
- package/src/agents/tools/readBlocks.ts +41 -0
- package/src/agents/tools/readFile.ts +39 -0
- package/src/agents/tools/scanFile.ts +16 -0
- package/src/agents/tools/textSearch.ts +21 -0
- package/src/agents/tools/types/fileblock.ts +5 -0
- package/src/agents/tools/visionTool.ts +5 -0
- package/src/agents/tools/writeFile.ts +46 -0
- package/src/agents/vim/vim.ts +153 -0
- package/src/ai.ts +167 -0
- package/src/chat.ts +412 -0
- package/src/cli.ts +85 -0
- package/src/clients/anthropic.ts +399 -0
- package/src/clients/gemini.ts +486 -0
- package/src/clients/http.ts +107 -0
- package/src/clients/index.ts +183 -0
- package/src/clients/knowhow.ts +33 -0
- package/src/clients/openai.ts +253 -0
- package/src/clients/types.ts +91 -0
- package/src/clients/xai.ts +132 -0
- package/src/config.ts +211 -0
- package/src/conversion.ts +140 -0
- package/src/dataset/diffs/README.md +12 -0
- package/src/dataset/diffs/debug-errors.ts +29 -0
- package/src/dataset/diffs/debug.ts +64 -0
- package/src/dataset/diffs/generate.ts +71 -0
- package/src/dataset/diffs/jsonl.ts +54 -0
- package/src/dataset/diffs/test.ts +193 -0
- package/src/embeddings.ts +411 -0
- package/src/hashes.ts +67 -0
- package/src/index.ts +376 -0
- package/src/login.ts +78 -0
- package/src/microphone.ts +136 -0
- package/src/modules/index.ts +37 -0
- package/src/modules/types.ts +48 -0
- package/src/plugins/asana.ts +134 -0
- package/src/plugins/downloader/downloader.ts +204 -0
- package/src/plugins/downloader/plugin.ts +85 -0
- package/src/plugins/downloader/types.ts +85 -0
- package/src/plugins/embedding.ts +42 -0
- package/src/plugins/figma.ts +137 -0
- package/src/plugins/github.ts +153 -0
- package/src/plugins/jira.ts +104 -0
- package/src/plugins/language.ts +100 -0
- package/src/plugins/linear.ts +219 -0
- package/src/plugins/notion.ts +170 -0
- package/src/plugins/plugins.ts +56 -0
- package/src/plugins/types.ts +5 -0
- package/src/plugins/url.ts +63 -0
- package/src/plugins/vim.ts +73 -0
- package/src/prompts/BasicCodeDocumenter.ts +1 -0
- package/src/prompts/BasicProjectDocumenter.ts +1 -0
- package/src/prompts/EmbeddingSeachHelper.ts +1 -0
- package/src/prompts/index.ts +9 -0
- package/src/server/index.ts +14 -0
- package/src/services/AgentService.ts +98 -0
- package/src/services/EmbeddingService.ts +410 -0
- package/src/services/EventService.ts +20 -0
- package/src/services/GitHub.ts +60 -0
- package/src/services/KnowhowClient.ts +113 -0
- package/src/services/Mcp.ts +270 -0
- package/src/services/McpServer.ts +119 -0
- package/src/services/McpWebsocketTransport.ts +64 -0
- package/src/services/S3.ts +126 -0
- package/src/services/Tools.ts +65 -0
- package/src/services/flags.ts +52 -0
- package/src/services/index.ts +8 -0
- package/src/types.ts +225 -0
- package/src/utils/index.ts +108 -0
- package/src/worker.ts +80 -0
- package/tests/integration/figma.test.ts +70 -0
- package/tests/integration/fileblocks/readwrite.test.ts +95 -0
- package/tests/integration/patching/input.txt +145 -0
- package/tests/integration/patching/output.txt +145 -0
- package/tests/integration/patching/patch.txt +15 -0
- package/tests/integration/patching/unseen.txt +80 -0
- package/tests/integration/patching.test.ts +136 -0
- package/tests/languagePlugin.test.ts +74 -0
- package/tests/patching/corrupted.test.ts +78 -0
- package/tests/patching/imports.patch.txt +11 -0
- package/tests/patching/imports.test.ts +43 -0
- package/tests/patching/imports.txt +11 -0
- package/tests/patching/interface.patch.txt +15 -0
- package/tests/patching/interface.txt +7 -0
- package/tests/test.spec.ts +132 -0
- package/ts_build/src/agents/base/base.d.ts +88 -0
- package/ts_build/src/agents/base/base.js +464 -0
- package/ts_build/src/agents/base/base.js.map +1 -0
- package/ts_build/src/agents/base/prompt.d.ts +1 -0
- package/ts_build/src/agents/base/prompt.js +30 -0
- package/ts_build/src/agents/base/prompt.js.map +1 -0
- package/ts_build/src/agents/configurable/ConfigAgent.d.ts +10 -0
- package/ts_build/src/agents/configurable/ConfigAgent.js +25 -0
- package/ts_build/src/agents/configurable/ConfigAgent.js.map +1 -0
- package/ts_build/src/agents/configurable/OpenAIAgent.d.ts +0 -0
- package/ts_build/src/agents/configurable/OpenAIAgent.js +1 -0
- package/ts_build/src/agents/configurable/OpenAIAgent.js.map +1 -0
- package/ts_build/src/agents/developer/developer.d.ts +9 -0
- package/ts_build/src/agents/developer/developer.js +69 -0
- package/ts_build/src/agents/developer/developer.js.map +1 -0
- package/ts_build/src/agents/index.d.ts +7 -0
- package/ts_build/src/agents/index.js +38 -0
- package/ts_build/src/agents/index.js.map +1 -0
- package/ts_build/src/agents/interface.d.ts +10 -0
- package/ts_build/src/agents/interface.js +3 -0
- package/ts_build/src/agents/interface.js.map +1 -0
- package/ts_build/src/agents/patcher/patcher.d.ts +9 -0
- package/ts_build/src/agents/patcher/patcher.js +106 -0
- package/ts_build/src/agents/patcher/patcher.js.map +1 -0
- package/ts_build/src/agents/researcher/researcher.d.ts +9 -0
- package/ts_build/src/agents/researcher/researcher.js +107 -0
- package/ts_build/src/agents/researcher/researcher.js.map +1 -0
- package/ts_build/src/agents/tools/addInternalTools.d.ts +5 -0
- package/ts_build/src/agents/tools/addInternalTools.js +18 -0
- package/ts_build/src/agents/tools/addInternalTools.js.map +1 -0
- package/ts_build/src/agents/tools/agentCall.d.ts +1 -0
- package/ts_build/src/agents/tools/agentCall.js +21 -0
- package/ts_build/src/agents/tools/agentCall.js.map +1 -0
- package/ts_build/src/agents/tools/aiClient.d.ts +6 -0
- package/ts_build/src/agents/tools/aiClient.js +25 -0
- package/ts_build/src/agents/tools/aiClient.js.map +1 -0
- package/ts_build/src/agents/tools/asana/definitions.d.ts +202 -0
- package/ts_build/src/agents/tools/asana/definitions.js +197 -0
- package/ts_build/src/agents/tools/asana/definitions.js.map +1 -0
- package/ts_build/src/agents/tools/asana/index.d.ts +8 -0
- package/ts_build/src/agents/tools/asana/index.js +98 -0
- package/ts_build/src/agents/tools/asana/index.js.map +1 -0
- package/ts_build/src/agents/tools/askHuman.d.ts +1 -0
- package/ts_build/src/agents/tools/askHuman.js +15 -0
- package/ts_build/src/agents/tools/askHuman.js.map +1 -0
- package/ts_build/src/agents/tools/callPlugin.d.ts +1 -0
- package/ts_build/src/agents/tools/callPlugin.js +9 -0
- package/ts_build/src/agents/tools/callPlugin.js.map +1 -0
- package/ts_build/src/agents/tools/client.d.ts +5 -0
- package/ts_build/src/agents/tools/client.js +21 -0
- package/ts_build/src/agents/tools/client.js.map +1 -0
- package/ts_build/src/agents/tools/embeddingSearch.d.ts +1 -0
- package/ts_build/src/agents/tools/embeddingSearch.js +9 -0
- package/ts_build/src/agents/tools/embeddingSearch.js.map +1 -0
- package/ts_build/src/agents/tools/execCommand.d.ts +1 -0
- package/ts_build/src/agents/tools/execCommand.js +25 -0
- package/ts_build/src/agents/tools/execCommand.js.map +1 -0
- package/ts_build/src/agents/tools/fileSearch.d.ts +1 -0
- package/ts_build/src/agents/tools/fileSearch.js +31 -0
- package/ts_build/src/agents/tools/fileSearch.js.map +1 -0
- package/ts_build/src/agents/tools/finalAnswer.d.ts +1 -0
- package/ts_build/src/agents/tools/finalAnswer.js +8 -0
- package/ts_build/src/agents/tools/finalAnswer.js.map +1 -0
- package/ts_build/src/agents/tools/github/definitions.d.ts +47 -0
- package/ts_build/src/agents/tools/github/definitions.js +86 -0
- package/ts_build/src/agents/tools/github/definitions.js.map +1 -0
- package/ts_build/src/agents/tools/github/index.d.ts +789 -0
- package/ts_build/src/agents/tools/github/index.js +56 -0
- package/ts_build/src/agents/tools/github/index.js.map +1 -0
- package/ts_build/src/agents/tools/googleSearch.d.ts +93 -0
- package/ts_build/src/agents/tools/googleSearch.js +117 -0
- package/ts_build/src/agents/tools/googleSearch.js.map +1 -0
- package/ts_build/src/agents/tools/googleSearchTypes.d.ts +74 -0
- package/ts_build/src/agents/tools/googleSearchTypes.js +3 -0
- package/ts_build/src/agents/tools/googleSearchTypes.js.map +1 -0
- package/ts_build/src/agents/tools/index.d.ts +24 -0
- package/ts_build/src/agents/tools/index.js +41 -0
- package/ts_build/src/agents/tools/index.js.map +1 -0
- package/ts_build/src/agents/tools/language/definitions.d.ts +89 -0
- package/ts_build/src/agents/tools/language/definitions.js +95 -0
- package/ts_build/src/agents/tools/language/definitions.js.map +1 -0
- package/ts_build/src/agents/tools/language/index.d.ts +4 -0
- package/ts_build/src/agents/tools/language/index.js +22 -0
- package/ts_build/src/agents/tools/language/index.js.map +1 -0
- package/ts_build/src/agents/tools/lintFile.d.ts +1 -0
- package/ts_build/src/agents/tools/lintFile.js +22 -0
- package/ts_build/src/agents/tools/lintFile.js.map +1 -0
- package/ts_build/src/agents/tools/list.d.ts +2 -0
- package/ts_build/src/agents/tools/list.js +505 -0
- package/ts_build/src/agents/tools/list.js.map +1 -0
- package/ts_build/src/agents/tools/loadWebpage.d.ts +8 -0
- package/ts_build/src/agents/tools/loadWebpage.js +97 -0
- package/ts_build/src/agents/tools/loadWebpage.js.map +1 -0
- package/ts_build/src/agents/tools/modifyFile.d.ts +2 -0
- package/ts_build/src/agents/tools/modifyFile.js +74 -0
- package/ts_build/src/agents/tools/modifyFile.js.map +1 -0
- package/ts_build/src/agents/tools/patch.d.ts +21 -0
- package/ts_build/src/agents/tools/patch.js +443 -0
- package/ts_build/src/agents/tools/patch.js.map +1 -0
- package/ts_build/src/agents/tools/readBlocks.d.ts +2 -0
- package/ts_build/src/agents/tools/readBlocks.js +59 -0
- package/ts_build/src/agents/tools/readBlocks.js.map +1 -0
- package/ts_build/src/agents/tools/readFile.d.ts +1 -0
- package/ts_build/src/agents/tools/readFile.js +46 -0
- package/ts_build/src/agents/tools/readFile.js.map +1 -0
- package/ts_build/src/agents/tools/scanFile.d.ts +1 -0
- package/ts_build/src/agents/tools/scanFile.js +36 -0
- package/ts_build/src/agents/tools/scanFile.js.map +1 -0
- package/ts_build/src/agents/tools/textSearch.d.ts +1 -0
- package/ts_build/src/agents/tools/textSearch.js +22 -0
- package/ts_build/src/agents/tools/textSearch.js.map +1 -0
- package/ts_build/src/agents/tools/types/fileblock.d.ts +5 -0
- package/ts_build/src/agents/tools/types/fileblock.js +3 -0
- package/ts_build/src/agents/tools/types/fileblock.js.map +1 -0
- package/ts_build/src/agents/tools/visionTool.d.ts +1 -0
- package/ts_build/src/agents/tools/visionTool.js +9 -0
- package/ts_build/src/agents/tools/visionTool.js.map +1 -0
- package/ts_build/src/agents/tools/writeFile.d.ts +2 -0
- package/ts_build/src/agents/tools/writeFile.js +61 -0
- package/ts_build/src/agents/tools/writeFile.js.map +1 -0
- package/ts_build/src/agents/vim/vim.d.ts +14 -0
- package/ts_build/src/agents/vim/vim.js +171 -0
- package/ts_build/src/agents/vim/vim.js.map +1 -0
- package/ts_build/src/ai.d.ts +10 -0
- package/ts_build/src/ai.js +102 -0
- package/ts_build/src/ai.js.map +1 -0
- package/ts_build/src/chat.d.ts +13 -0
- package/ts_build/src/chat.js +319 -0
- package/ts_build/src/chat.js.map +1 -0
- package/ts_build/src/cli.d.ts +2 -0
- package/ts_build/src/cli.js +98 -0
- package/ts_build/src/cli.js.map +1 -0
- package/ts_build/src/clients/anthropic.d.ts +31 -0
- package/ts_build/src/clients/anthropic.js +344 -0
- package/ts_build/src/clients/anthropic.js.map +1 -0
- package/ts_build/src/clients/gemini.d.ts +20 -0
- package/ts_build/src/clients/gemini.js +347 -0
- package/ts_build/src/clients/gemini.js.map +1 -0
- package/ts_build/src/clients/http.d.ts +12 -0
- package/ts_build/src/clients/http.js +91 -0
- package/ts_build/src/clients/http.js.map +1 -0
- package/ts_build/src/clients/index.d.ts +47 -0
- package/ts_build/src/clients/index.js +143 -0
- package/ts_build/src/clients/index.js.map +1 -0
- package/ts_build/src/clients/knowhow.d.ts +10 -0
- package/ts_build/src/clients/knowhow.js +24 -0
- package/ts_build/src/clients/knowhow.js.map +1 -0
- package/ts_build/src/clients/openai.d.ts +20 -0
- package/ts_build/src/clients/openai.js +221 -0
- package/ts_build/src/clients/openai.js.map +1 -0
- package/ts_build/src/clients/types.d.ts +89 -0
- package/ts_build/src/clients/types.js +3 -0
- package/ts_build/src/clients/types.js.map +1 -0
- package/ts_build/src/clients/xai.d.ts +22 -0
- package/ts_build/src/clients/xai.js +108 -0
- package/ts_build/src/clients/xai.js.map +1 -0
- package/ts_build/src/config.d.ts +9 -0
- package/ts_build/src/config.js +216 -0
- package/ts_build/src/config.js.map +1 -0
- package/ts_build/src/conversion.d.ts +7 -0
- package/ts_build/src/conversion.js +114 -0
- package/ts_build/src/conversion.js.map +1 -0
- package/ts_build/src/dataset/diffs/debug-errors.d.ts +1 -0
- package/ts_build/src/dataset/diffs/debug-errors.js +28 -0
- package/ts_build/src/dataset/diffs/debug-errors.js.map +1 -0
- package/ts_build/src/dataset/diffs/debug.d.ts +1 -0
- package/ts_build/src/dataset/diffs/debug.js +50 -0
- package/ts_build/src/dataset/diffs/debug.js.map +1 -0
- package/ts_build/src/dataset/diffs/generate.d.ts +1 -0
- package/ts_build/src/dataset/diffs/generate.js +70 -0
- package/ts_build/src/dataset/diffs/generate.js.map +1 -0
- package/ts_build/src/dataset/diffs/jsonl.d.ts +1 -0
- package/ts_build/src/dataset/diffs/jsonl.js +47 -0
- package/ts_build/src/dataset/diffs/jsonl.js.map +1 -0
- package/ts_build/src/dataset/diffs/test.d.ts +1 -0
- package/ts_build/src/dataset/diffs/test.js +114 -0
- package/ts_build/src/dataset/diffs/test.js.map +1 -0
- package/ts_build/src/embeddings.d.ts +19 -0
- package/ts_build/src/embeddings.js +322 -0
- package/ts_build/src/embeddings.js.map +1 -0
- package/ts_build/src/hashes.d.ts +6 -0
- package/ts_build/src/hashes.js +78 -0
- package/ts_build/src/hashes.js.map +1 -0
- package/ts_build/src/index.d.ts +14 -0
- package/ts_build/src/index.js +258 -0
- package/ts_build/src/index.js.map +1 -0
- package/ts_build/src/login.d.ts +2 -0
- package/ts_build/src/login.js +63 -0
- package/ts_build/src/login.js.map +1 -0
- package/ts_build/src/microphone.d.ts +9 -0
- package/ts_build/src/microphone.js +131 -0
- package/ts_build/src/microphone.js.map +1 -0
- package/ts_build/src/modules/index.d.ts +3 -0
- package/ts_build/src/modules/index.js +34 -0
- package/ts_build/src/modules/index.js.map +1 -0
- package/ts_build/src/modules/types.d.ts +37 -0
- package/ts_build/src/modules/types.js +3 -0
- package/ts_build/src/modules/types.js.map +1 -0
- package/ts_build/src/plugins/asana.d.ts +16 -0
- package/ts_build/src/plugins/asana.js +114 -0
- package/ts_build/src/plugins/asana.js.map +1 -0
- package/ts_build/src/plugins/downloader/downloader.d.ts +12 -0
- package/ts_build/src/plugins/downloader/downloader.js +174 -0
- package/ts_build/src/plugins/downloader/downloader.js.map +1 -0
- package/ts_build/src/plugins/downloader/index.d.ts +3 -0
- package/ts_build/src/plugins/downloader/index.js +41 -0
- package/ts_build/src/plugins/downloader/index.js.map +1 -0
- package/ts_build/src/plugins/downloader/plugin.d.ts +8 -0
- package/ts_build/src/plugins/downloader/plugin.js +83 -0
- package/ts_build/src/plugins/downloader/plugin.js.map +1 -0
- package/ts_build/src/plugins/downloader/types.d.ts +82 -0
- package/ts_build/src/plugins/downloader/types.js +79 -0
- package/ts_build/src/plugins/downloader/types.js.map +1 -0
- package/ts_build/src/plugins/embedding.d.ts +5 -0
- package/ts_build/src/plugins/embedding.js +28 -0
- package/ts_build/src/plugins/embedding.js.map +1 -0
- package/ts_build/src/plugins/figma.d.ts +20 -0
- package/ts_build/src/plugins/figma.js +94 -0
- package/ts_build/src/plugins/figma.js.map +1 -0
- package/ts_build/src/plugins/github.d.ts +1223 -0
- package/ts_build/src/plugins/github.js +115 -0
- package/ts_build/src/plugins/github.js.map +1 -0
- package/ts_build/src/plugins/jira.d.ts +15 -0
- package/ts_build/src/plugins/jira.js +94 -0
- package/ts_build/src/plugins/jira.js.map +1 -0
- package/ts_build/src/plugins/language.d.ts +8 -0
- package/ts_build/src/plugins/language.js +69 -0
- package/ts_build/src/plugins/language.js.map +1 -0
- package/ts_build/src/plugins/linear.d.ts +23 -0
- package/ts_build/src/plugins/linear.js +184 -0
- package/ts_build/src/plugins/linear.js.map +1 -0
- package/ts_build/src/plugins/notion.d.ts +32 -0
- package/ts_build/src/plugins/notion.js +131 -0
- package/ts_build/src/plugins/notion.js.map +1 -0
- package/ts_build/src/plugins/plugins.d.ts +11 -0
- package/ts_build/src/plugins/plugins.js +51 -0
- package/ts_build/src/plugins/plugins.js.map +1 -0
- package/ts_build/src/plugins/types.d.ts +5 -0
- package/ts_build/src/plugins/types.js +3 -0
- package/ts_build/src/plugins/types.js.map +1 -0
- package/ts_build/src/plugins/url.d.ts +8 -0
- package/ts_build/src/plugins/url.js +50 -0
- package/ts_build/src/plugins/url.js.map +1 -0
- package/ts_build/src/plugins/vim.d.ts +11 -0
- package/ts_build/src/plugins/vim.js +63 -0
- package/ts_build/src/plugins/vim.js.map +1 -0
- package/ts_build/src/prompts/BasicCodeDocumenter.d.ts +2 -0
- package/ts_build/src/prompts/BasicCodeDocumenter.js +4 -0
- package/ts_build/src/prompts/BasicCodeDocumenter.js.map +1 -0
- package/ts_build/src/prompts/BasicProjectDocumenter.d.ts +2 -0
- package/ts_build/src/prompts/BasicProjectDocumenter.js +4 -0
- package/ts_build/src/prompts/BasicProjectDocumenter.js.map +1 -0
- package/ts_build/src/prompts/EmbeddingSeachHelper.d.ts +2 -0
- package/ts_build/src/prompts/EmbeddingSeachHelper.js +4 -0
- package/ts_build/src/prompts/EmbeddingSeachHelper.js.map +1 -0
- package/ts_build/src/prompts/index.d.ts +13 -0
- package/ts_build/src/prompts/index.js +15 -0
- package/ts_build/src/prompts/index.js.map +1 -0
- package/ts_build/src/server/index.d.ts +1 -0
- package/ts_build/src/server/index.js +17 -0
- package/ts_build/src/server/index.js.map +1 -0
- package/ts_build/src/services/AgentService.d.ts +14 -0
- package/ts_build/src/services/AgentService.js +87 -0
- package/ts_build/src/services/AgentService.js.map +1 -0
- package/ts_build/src/services/EmbeddingService.d.ts +39 -0
- package/ts_build/src/services/EmbeddingService.js +307 -0
- package/ts_build/src/services/EmbeddingService.js.map +1 -0
- package/ts_build/src/services/EventService.d.ts +9 -0
- package/ts_build/src/services/EventService.js +20 -0
- package/ts_build/src/services/EventService.js.map +1 -0
- package/ts_build/src/services/GitHub.d.ts +11 -0
- package/ts_build/src/services/GitHub.js +52 -0
- package/ts_build/src/services/GitHub.js.map +1 -0
- package/ts_build/src/services/KnowhowClient.d.ts +18 -0
- package/ts_build/src/services/KnowhowClient.js +85 -0
- package/ts_build/src/services/KnowhowClient.js.map +1 -0
- package/ts_build/src/services/Mcp.d.ts +377 -0
- package/ts_build/src/services/Mcp.js +221 -0
- package/ts_build/src/services/Mcp.js.map +1 -0
- package/ts_build/src/services/McpServer.d.ts +19 -0
- package/ts_build/src/services/McpServer.js +104 -0
- package/ts_build/src/services/McpServer.js.map +1 -0
- package/ts_build/src/services/McpWebsocketTransport.d.ts +13 -0
- package/ts_build/src/services/McpWebsocketTransport.js +59 -0
- package/ts_build/src/services/McpWebsocketTransport.js.map +1 -0
- package/ts_build/src/services/S3.d.ts +9 -0
- package/ts_build/src/services/S3.js +116 -0
- package/ts_build/src/services/S3.js.map +1 -0
- package/ts_build/src/services/Tools.d.ts +19 -0
- package/ts_build/src/services/Tools.js +51 -0
- package/ts_build/src/services/Tools.js.map +1 -0
- package/ts_build/src/services/flags.d.ts +13 -0
- package/ts_build/src/services/flags.js +48 -0
- package/ts_build/src/services/flags.js.map +1 -0
- package/ts_build/src/services/index.d.ts +8 -0
- package/ts_build/src/services/index.js +38 -0
- package/ts_build/src/services/index.js.map +1 -0
- package/ts_build/src/terminal.d.ts +1 -0
- package/ts_build/src/terminal.js +35 -0
- package/ts_build/src/terminal.js.map +1 -0
- package/ts_build/src/types.d.ts +181 -0
- package/ts_build/src/types.js +94 -0
- package/ts_build/src/types.js.map +1 -0
- package/ts_build/src/utils/index.d.ts +24 -0
- package/ts_build/src/utils/index.js +116 -0
- package/ts_build/src/utils/index.js.map +1 -0
- package/ts_build/src/worker.d.ts +1 -0
- package/ts_build/src/worker.js +68 -0
- package/ts_build/src/worker.js.map +1 -0
- package/ts_build/tests/integration/figma.test.d.ts +1 -0
- package/ts_build/tests/integration/figma.test.js +47 -0
- package/ts_build/tests/integration/figma.test.js.map +1 -0
- package/ts_build/tests/integration/fileblocks/readwrite.test.d.ts +1 -0
- package/ts_build/tests/integration/fileblocks/readwrite.test.js +95 -0
- package/ts_build/tests/integration/fileblocks/readwrite.test.js.map +1 -0
- package/ts_build/tests/integration/patching.test.d.ts +1 -0
- package/ts_build/tests/integration/patching.test.js +117 -0
- package/ts_build/tests/integration/patching.test.js.map +1 -0
- package/ts_build/tests/languagePlugin.test.d.ts +1 -0
- package/ts_build/tests/languagePlugin.test.js +78 -0
- package/ts_build/tests/languagePlugin.test.js.map +1 -0
- package/ts_build/tests/patching/corrupted.test.d.ts +1 -0
- package/ts_build/tests/patching/corrupted.test.js +53 -0
- package/ts_build/tests/patching/corrupted.test.js.map +1 -0
- package/ts_build/tests/patching/imports.test.d.ts +1 -0
- package/ts_build/tests/patching/imports.test.js +61 -0
- package/ts_build/tests/patching/imports.test.js.map +1 -0
- package/ts_build/tests/test.spec.d.ts +1 -0
- package/ts_build/tests/test.spec.js +101 -0
- package/ts_build/tests/test.spec.js.map +1 -0
- package/tsconfig.json +31 -0
- package/tslint.json +11 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.definitions = void 0;
|
|
4
|
+
exports.definitions = [
|
|
5
|
+
{
|
|
6
|
+
type: "function",
|
|
7
|
+
function: {
|
|
8
|
+
name: "createTask",
|
|
9
|
+
description: "Create a new task in Asana",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: "object",
|
|
12
|
+
positional: true,
|
|
13
|
+
properties: {
|
|
14
|
+
projectId: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "The ID of the project where the task will be created",
|
|
17
|
+
},
|
|
18
|
+
taskName: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "The name of the task to be created",
|
|
21
|
+
},
|
|
22
|
+
taskNotes: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "The notes or description of the task",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ["projectId", "taskName", "taskNotes"],
|
|
28
|
+
},
|
|
29
|
+
returns: {
|
|
30
|
+
type: "object",
|
|
31
|
+
description: "The created task object",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "function",
|
|
37
|
+
function: {
|
|
38
|
+
name: "updateTask",
|
|
39
|
+
description: "Update an existing task in Asana",
|
|
40
|
+
parameters: {
|
|
41
|
+
type: "object",
|
|
42
|
+
positional: true,
|
|
43
|
+
properties: {
|
|
44
|
+
taskId: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The ID of the task to be updated",
|
|
47
|
+
},
|
|
48
|
+
updates: {
|
|
49
|
+
type: "object",
|
|
50
|
+
description: "An object containing the updates to be applied to the task",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
required: ["taskId", "updates"],
|
|
54
|
+
},
|
|
55
|
+
returns: {
|
|
56
|
+
type: "object",
|
|
57
|
+
description: "The updated task object",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: "function",
|
|
63
|
+
function: {
|
|
64
|
+
name: "searchTasks",
|
|
65
|
+
description: "Search for tasks in Asana based on a search term",
|
|
66
|
+
parameters: {
|
|
67
|
+
type: "object",
|
|
68
|
+
positional: true,
|
|
69
|
+
properties: {
|
|
70
|
+
searchTerm: {
|
|
71
|
+
type: "string",
|
|
72
|
+
description: "The term to search for in task names and notes",
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
required: ["searchTerm"],
|
|
76
|
+
},
|
|
77
|
+
returns: {
|
|
78
|
+
type: "array",
|
|
79
|
+
description: "An array of tasks that match the search term",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: "function",
|
|
85
|
+
function: {
|
|
86
|
+
name: "listProjects",
|
|
87
|
+
description: "List all projects in Asana",
|
|
88
|
+
parameters: {
|
|
89
|
+
type: "object",
|
|
90
|
+
positional: true,
|
|
91
|
+
properties: {},
|
|
92
|
+
required: [],
|
|
93
|
+
},
|
|
94
|
+
returns: {
|
|
95
|
+
type: "array",
|
|
96
|
+
description: "An array of project objects",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "function",
|
|
102
|
+
function: {
|
|
103
|
+
name: "findTask",
|
|
104
|
+
description: "Find a specific task in Asana by its ID",
|
|
105
|
+
parameters: {
|
|
106
|
+
type: "object",
|
|
107
|
+
positional: true,
|
|
108
|
+
properties: {
|
|
109
|
+
taskId: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "The ID of the task to be found",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ["taskId"],
|
|
115
|
+
},
|
|
116
|
+
returns: {
|
|
117
|
+
type: "object",
|
|
118
|
+
description: "The task object that matches the given ID",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: "function",
|
|
124
|
+
function: {
|
|
125
|
+
name: "myTasks",
|
|
126
|
+
description: "Retrieve tasks assigned to the current user in Asana, only shows the uncompleted ones",
|
|
127
|
+
parameters: {
|
|
128
|
+
type: "object",
|
|
129
|
+
positional: true,
|
|
130
|
+
properties: {
|
|
131
|
+
project: {
|
|
132
|
+
type: "string",
|
|
133
|
+
description: "The ID of the project to filter tasks by (optional)",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
required: [],
|
|
137
|
+
},
|
|
138
|
+
returns: {
|
|
139
|
+
type: "array",
|
|
140
|
+
description: "An array of tasks assigned to the current user",
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "function",
|
|
146
|
+
function: {
|
|
147
|
+
name: "getSubtasks",
|
|
148
|
+
description: "Retrieve all subtasks for a given Asana task.",
|
|
149
|
+
parameters: {
|
|
150
|
+
type: "object",
|
|
151
|
+
positional: true,
|
|
152
|
+
properties: {
|
|
153
|
+
taskId: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "The ID of the parent task for which to retrieve subtasks.",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["taskId"],
|
|
159
|
+
},
|
|
160
|
+
returns: {
|
|
161
|
+
type: "array",
|
|
162
|
+
description: "An array of subtasks associated with the specified parent task.",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: "function",
|
|
168
|
+
function: {
|
|
169
|
+
name: "createSubtask",
|
|
170
|
+
description: "Create a new subtask under a given Asana task.",
|
|
171
|
+
parameters: {
|
|
172
|
+
type: "object",
|
|
173
|
+
positional: true,
|
|
174
|
+
properties: {
|
|
175
|
+
taskId: {
|
|
176
|
+
type: "string",
|
|
177
|
+
description: "The ID of the parent task under which the subtask will be created.",
|
|
178
|
+
},
|
|
179
|
+
taskName: {
|
|
180
|
+
type: "string",
|
|
181
|
+
description: "The name of the subtask to be created.",
|
|
182
|
+
},
|
|
183
|
+
taskNotes: {
|
|
184
|
+
type: "string",
|
|
185
|
+
description: "The optional notes or description of the subtask.",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
required: ["taskId", "taskName"],
|
|
189
|
+
},
|
|
190
|
+
returns: {
|
|
191
|
+
type: "object",
|
|
192
|
+
description: "The created subtask object.",
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
];
|
|
197
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../../../src/agents/tools/asana/definitions.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE;YACR,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,4BAA4B;YACzC,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,sDAAsD;qBACpE;oBACD,QAAQ,EAA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AI,EAAE,QAAQ;wBACd,WAAW,EACT,2DAA2D;qBAC9D;iBACF;gBACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;aACrB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,WAAW,EACT,iEAAiE;aACpE;SACF;KACF;IACD;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE;YACR,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,gDAAgD;YAC7D,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EACT,oEAAoE;qBACvE;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,wCAAwC;qBACtD;oBACD,SAAS,EAAE;wBACT,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mDAAmD;qBACjE;iBACF;gBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;aACjC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const createTask: any;
|
|
2
|
+
export declare const updateTask: any;
|
|
3
|
+
export declare const searchTasks: any;
|
|
4
|
+
export declare const findTask: any;
|
|
5
|
+
export declare const getSubtasks: any;
|
|
6
|
+
export declare const createSubtask: any;
|
|
7
|
+
export declare const myTasks: any;
|
|
8
|
+
export declare const listProjects: any;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listProjects = exports.myTasks = exports.createSubtask = exports.getSubtasks = exports.findTask = exports.searchTasks = exports.updateTask = exports.createTask = void 0;
|
|
4
|
+
const workspace = process.env.ASANA_WORKSPACE;
|
|
5
|
+
class AsanaTools {
|
|
6
|
+
accessToken;
|
|
7
|
+
client = require("asana").ApiClient.instance;
|
|
8
|
+
constructor(accessToken) {
|
|
9
|
+
this.accessToken = accessToken;
|
|
10
|
+
this.client.authentications.token = process.env.ASANA_TOKEN;
|
|
11
|
+
this.client.defaultHeaders = {
|
|
12
|
+
"Asana-Enable": "new_user_task_lists,new_goal_memberships",
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
async createTask(projectId, taskName, taskNotes) {
|
|
16
|
+
if (!workspace) {
|
|
17
|
+
throw new Error("Need to set ENV Variable ASANA Workspace");
|
|
18
|
+
}
|
|
19
|
+
const task = await this.client.tasks.create({
|
|
20
|
+
workspace,
|
|
21
|
+
projects: [projectId],
|
|
22
|
+
name: taskName,
|
|
23
|
+
notes: taskNotes,
|
|
24
|
+
});
|
|
25
|
+
console.log(`Task created: ${task.permalink_url}`);
|
|
26
|
+
return task;
|
|
27
|
+
}
|
|
28
|
+
async updateTask(taskId, updates) {
|
|
29
|
+
const task = await this.client.tasks.updateTask(taskId, updates);
|
|
30
|
+
console.log(`Task updated: ${task.permalink_url}`);
|
|
31
|
+
return task;
|
|
32
|
+
}
|
|
33
|
+
async searchTasks(searchTerm) {
|
|
34
|
+
if (!workspace) {
|
|
35
|
+
throw new Error("Need to set ENV Variable ASANA Workspace");
|
|
36
|
+
}
|
|
37
|
+
searchTerm = searchTerm.toLowerCase();
|
|
38
|
+
const allTasks = await this.client.tasks.findAll({
|
|
39
|
+
opt_expand: "notes",
|
|
40
|
+
workspace,
|
|
41
|
+
});
|
|
42
|
+
const found = allTasks.data.filter((t) => t.notes.toLowerCase().includes(searchTerm) ||
|
|
43
|
+
t.name.toLowerCase().includes(searchTerm));
|
|
44
|
+
console.log("Found", found.length, "tasks");
|
|
45
|
+
return found;
|
|
46
|
+
}
|
|
47
|
+
async findTask(taskId) {
|
|
48
|
+
const task = await this.client.tasks.findById(taskId);
|
|
49
|
+
console.log(`Task found: ${task.permalink_url}`);
|
|
50
|
+
return task;
|
|
51
|
+
}
|
|
52
|
+
async getSubtasks(taskId) {
|
|
53
|
+
const tasks = await this.client.tasks.subtasks(taskId);
|
|
54
|
+
return tasks.data;
|
|
55
|
+
}
|
|
56
|
+
async createSubtask(taskId, taskName, taskNotes = "") {
|
|
57
|
+
const task = await this.client.tasks.addSubtask(taskId, {
|
|
58
|
+
name: taskName,
|
|
59
|
+
notes: taskNotes,
|
|
60
|
+
});
|
|
61
|
+
return task;
|
|
62
|
+
}
|
|
63
|
+
async myTasks(project) {
|
|
64
|
+
const me = await this.client.users.me();
|
|
65
|
+
const tasks = await this.client.tasks.findAll({
|
|
66
|
+
assignee: Number(me.gid),
|
|
67
|
+
project,
|
|
68
|
+
workspace,
|
|
69
|
+
opt_expand: "completed",
|
|
70
|
+
});
|
|
71
|
+
return tasks.data.filter((t) => !t.completed);
|
|
72
|
+
}
|
|
73
|
+
async listProjects() {
|
|
74
|
+
if (!workspace) {
|
|
75
|
+
throw new Error("Need to set ENV Variable ASANA Workspace");
|
|
76
|
+
}
|
|
77
|
+
const allData = [];
|
|
78
|
+
let projects = await this.client.projects.findAll({
|
|
79
|
+
workspace,
|
|
80
|
+
archived: false,
|
|
81
|
+
});
|
|
82
|
+
do {
|
|
83
|
+
allData.push(...projects.data);
|
|
84
|
+
projects = await projects.nextPage();
|
|
85
|
+
} while (projects && projects?.data?.length);
|
|
86
|
+
return allData;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const asana = new AsanaTools(process.env.ASANA_TOKEN);
|
|
90
|
+
exports.createTask = asana.createTask.bind(asana);
|
|
91
|
+
exports.updateTask = asana.updateTask.bind(asana);
|
|
92
|
+
exports.searchTasks = asana.searchTasks.bind(asana);
|
|
93
|
+
exports.findTask = asana.findTask.bind(asana);
|
|
94
|
+
exports.getSubtasks = asana.getSubtasks.bind(asana);
|
|
95
|
+
exports.createSubtask = asana.createSubtask.bind(asana);
|
|
96
|
+
exports.myTasks = asana.myTasks.bind(asana);
|
|
97
|
+
exports.listProjects = asana.listProjects.bind(asana);
|
|
98
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/agents/tools/asana/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAC9C,MAAM,UAAU;IAGM;IAFZ,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC;IAErD,YAAoB,WAAmB;QAAnB,gBAAW,GAAX,WAAW,CAAQ;QACrC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG;YAC3B,cAAc,EAAE,0CAA0C;SAC3D,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,SAAiB,EAAE,QAAgB,EAAE,SAAiB;QACrE,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;SAC7D;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC;YAC1C,SAAS;YACT,QAAQ,EAAE,CAAC,SAAS,CAAC;YACrB,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,OAAe;QAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjE,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,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AAC;AACzC,QAAA,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAA,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,QAAA,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5C,QAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACtC,QAAA,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC5C,QAAA,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAChD,QAAA,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpC,QAAA,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function askHuman(question: string): Promise<any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.askHuman = void 0;
|
|
7
|
+
const marked_1 = __importDefault(require("marked"));
|
|
8
|
+
const utils_1 = require("../../utils");
|
|
9
|
+
async function askHuman(question) {
|
|
10
|
+
console.log("AI has asked: ");
|
|
11
|
+
console.log(marked_1.default.parse(question), "\n");
|
|
12
|
+
return (0, utils_1.ask)("response: ");
|
|
13
|
+
}
|
|
14
|
+
exports.askHuman = askHuman;
|
|
15
|
+
//# sourceMappingURL=askHuman.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"askHuman.js","sourceRoot":"","sources":["../../../../src/agents/tools/askHuman.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA4B;AAC5B,uCAAkC;AAE3B,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IAC9B,OAAO,CAAC,GAAG,CAAC,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IAC1C,OAAO,IAAA,WAAG,EAAC,YAAY,CAAC,CAAC;AAC3B,CAAC;AAJD,4BAIC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function callPlugin(pluginName: string, userInput: string): Promise<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.callPlugin = void 0;
|
|
4
|
+
const plugins_1 = require("../../plugins/plugins");
|
|
5
|
+
async function callPlugin(pluginName, userInput) {
|
|
6
|
+
return plugins_1.Plugins.call(pluginName, userInput);
|
|
7
|
+
}
|
|
8
|
+
exports.callPlugin = callPlugin;
|
|
9
|
+
//# sourceMappingURL=callPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callPlugin.js","sourceRoot":"","sources":["../../../../src/agents/tools/callPlugin.ts"],"names":[],"mappings":";;;AAAA,mDAAgD;AACzC,KAAK,UAAU,UAAU,CAAC,UAAkB,EAAE,SAAiB;IACpE,OAAO,iBAAO,CAAC,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AAC7C,CAAC;AAFD,gCAEC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CompletionOptions, CompletionResponse } from "../../clients/types";
|
|
2
|
+
export declare function createAiCompletion(provider: string, options: CompletionOptions): Promise<CompletionResponse>;
|
|
3
|
+
export declare function listModelsForProvider(provider: string): Promise<string[]>;
|
|
4
|
+
export declare function listAllModels(): Promise<Record<string, string[]>>;
|
|
5
|
+
export declare function listAllProviders(): Promise<string[]>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAllProviders = exports.listAllModels = exports.listModelsForProvider = exports.createAiCompletion = void 0;
|
|
4
|
+
const clients_1 = require("../../clients");
|
|
5
|
+
function createAiCompletion(provider, options) {
|
|
6
|
+
return clients_1.Clients.createCompletion(provider, options);
|
|
7
|
+
}
|
|
8
|
+
exports.createAiCompletion = createAiCompletion;
|
|
9
|
+
async function listModelsForProvider(provider) {
|
|
10
|
+
return clients_1.Clients.getRegisteredModels(provider);
|
|
11
|
+
}
|
|
12
|
+
exports.listModelsForProvider = listModelsForProvider;
|
|
13
|
+
async function listAllModels() {
|
|
14
|
+
return clients_1.Clients.listAllModels();
|
|
15
|
+
}
|
|
16
|
+
exports.listAllModels = listAllModels;
|
|
17
|
+
async function listAllProviders() {
|
|
18
|
+
return clients_1.Clients.listAllProviders();
|
|
19
|
+
}
|
|
20
|
+
exports.listAllProviders = listAllProviders;
|
|
21
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../src/agents/tools/client.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AAOxC,SAAgB,kBAAkB,CAChC,QAAgB,EAChB,OAA0B;IAE1B,OAAO,iBAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACrD,CAAC;AALD,gDAKC;AAEM,KAAK,UAAU,qBAAqB,CACzC,QAAgB;IAEhB,OAAO,iBAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC;AAJD,sDAIC;AAEM,KAAK,UAAU,aAAa;IACjC,OAAO,iBAAO,CAAC,aAAa,EAAE,CAAC;AACjC,CAAC;AAFD,sCAEC;AAEM,KAAK,UAAU,gBAAgB;IACpC,OAAO,iBAAO,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC;AAFD,4CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function embeddingSearch(keyword: string): Promise<string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.embeddingSearch = void 0;
|
|
4
|
+
const plugins_1 = require("../../plugins/plugins");
|
|
5
|
+
async function embeddingSearch(keyword) {
|
|
6
|
+
return plugins_1.Plugins.call("embeddings", keyword);
|
|
7
|
+
}
|
|
8
|
+
exports.embeddingSearch = embeddingSearch;
|
|
9
|
+
//# sourceMappingURL=embeddingSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddingSearch.js","sourceRoot":"","sources":["../../../../src/agents/tools/embeddingSearch.ts"],"names":[],"mappings":";;;AACA,mDAAgD;AACzC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,OAAO,iBAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const execCommand: (command: string) => Promise<string>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execCommand = void 0;
|
|
4
|
+
const utils_1 = require("../../utils");
|
|
5
|
+
const execCommand = async (command) => {
|
|
6
|
+
let output = "";
|
|
7
|
+
console.log("execCommand:", command);
|
|
8
|
+
const { stdout, stderr } = await (0, utils_1.execAsync)(command).catch((e) => e);
|
|
9
|
+
if (stderr) {
|
|
10
|
+
output += stderr + "\n";
|
|
11
|
+
}
|
|
12
|
+
output += stdout;
|
|
13
|
+
console.log(`$ ${command}:\n${output}`);
|
|
14
|
+
const fullOutput = output.split("\n");
|
|
15
|
+
const maxLines = 1000;
|
|
16
|
+
const maxCharacters = 40000;
|
|
17
|
+
const shouldTrim = fullOutput.length > maxLines;
|
|
18
|
+
const trimmedOutput = shouldTrim ? fullOutput.slice(0, maxLines) : fullOutput;
|
|
19
|
+
const trimmedMessage = shouldTrim
|
|
20
|
+
? ` (${fullOutput.length - maxLines} results trimmed)`
|
|
21
|
+
: "";
|
|
22
|
+
return trimmedOutput.join("\n").slice(0, maxCharacters) + trimmedMessage;
|
|
23
|
+
};
|
|
24
|
+
exports.execCommand = execCommand;
|
|
25
|
+
//# sourceMappingURL=execCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execCommand.js","sourceRoot":"","sources":["../../../../src/agents/tools/execCommand.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAGjC,MAAM,WAAW,GAAG,KAAK,EAAE,OAAe,EAAmB,EAAE;IACpE,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,iBAAS,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IACpE,IAAI,MAAM,EAAE;QACV,MAAM,IAAI,MAAM,GAAG,IAAI,CAAC;KACzB;IACD,MAAM,IAAI,MAAM,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,OAAO,MAAM,MAAM,EAAE,CAAC,CAAC;IAExC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAI,CAAC;IACtB,MAAM,aAAa,GAAG,KAAK,CAAC;IAC5B,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,GAAG,QAAQ,CAAC;IAChD,MAAM,aAAa,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAE9E,MAAM,cAAc,GAAG,UAAU;QAC/B,CAAC,CAAC,KAAK,UAAU,CAAC,MAAM,GAAG,QAAQ,mBAAmB;QACtD,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,GAAG,cAAc,CAAC;AAC3E,CAAC,CAAC;AAtBW,QAAA,WAAW,eAsBtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fileSearch(searchTerm: any): Promise<string>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.fileSearch = void 0;
|
|
7
|
+
const glob_1 = __importDefault(require("glob"));
|
|
8
|
+
const embeddings_1 = require("../../embeddings");
|
|
9
|
+
const config_1 = require("../../config");
|
|
10
|
+
const utils_1 = require("../../utils");
|
|
11
|
+
async function fileSearch(searchTerm) {
|
|
12
|
+
const searchTermLower = searchTerm.toLowerCase();
|
|
13
|
+
const pattern = `./**/*${searchTermLower}*`;
|
|
14
|
+
const ignore = await (0, config_1.getIgnorePattern)();
|
|
15
|
+
console.log({ pattern, ignore });
|
|
16
|
+
const files = await glob_1.default.sync(pattern, {
|
|
17
|
+
ignore,
|
|
18
|
+
});
|
|
19
|
+
if (files.length === 0) {
|
|
20
|
+
const embeddings = await (0, embeddings_1.getConfiguredEmbeddings)();
|
|
21
|
+
const results = embeddings.filter((embedding) => embedding.id.toLowerCase().includes(searchTermLower));
|
|
22
|
+
const ids = (0, utils_1.toUniqueArray)(results.map((r) => {
|
|
23
|
+
const parts = r.id.split("-");
|
|
24
|
+
return parts.slice(0, -1).join("-");
|
|
25
|
+
}));
|
|
26
|
+
files.push(...ids);
|
|
27
|
+
}
|
|
28
|
+
return JSON.stringify(files);
|
|
29
|
+
}
|
|
30
|
+
exports.fileSearch = fileSearch;
|
|
31
|
+
//# sourceMappingURL=fileSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileSearch.js","sourceRoot":"","sources":["../../../../src/agents/tools/fileSearch.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,iDAA2D;AAE3D,yCAAgD;AAChD,uCAA4C;AAErC,KAAK,UAAU,UAAU,CAAC,UAAU;IACzC,MAAM,eAAe,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IACjD,MAAM,OAAO,GAAG,SAAS,eAAe,GAAG,CAAC;IAC5C,MAAM,MAAM,GAAG,MAAM,IAAA,yBAAgB,GAAE,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,MAAM,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QACrC,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,MAAM,UAAU,GAAG,MAAM,IAAA,oCAAuB,GAAE,CAAC;QACnD,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAC9C,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CACrD,CAAC;QAGF,MAAM,GAAG,GAAG,IAAA,qBAAa,EACvB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAChB,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAAC,CACH,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;KACpB;IAED,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AA1BD,gCA0BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function finalAnswer(answer: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalAnswer.js","sourceRoot":"","sources":["../../../../src/agents/tools/finalAnswer.ts"],"names":[],"mappings":";;;AACA,SAAgB,WAAW,CAAC,MAAc;IACxC,OAAO,MAAM,CAAC;AAChB,CAAC;AAFD,kCAEC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const definitions: ({
|
|
2
|
+
type: string;
|
|
3
|
+
function: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
type: string;
|
|
8
|
+
positional: boolean;
|
|
9
|
+
properties: {
|
|
10
|
+
url: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
runId?: undefined;
|
|
15
|
+
owner?: undefined;
|
|
16
|
+
repo?: undefined;
|
|
17
|
+
};
|
|
18
|
+
required: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | {
|
|
22
|
+
type: string;
|
|
23
|
+
function: {
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
parameters: {
|
|
27
|
+
type: string;
|
|
28
|
+
positional: boolean;
|
|
29
|
+
properties: {
|
|
30
|
+
runId: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
owner: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
repo: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
url?: undefined;
|
|
43
|
+
};
|
|
44
|
+
required: string[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
})[];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.definitions = void 0;
|
|
4
|
+
exports.definitions = [
|
|
5
|
+
{
|
|
6
|
+
type: "function",
|
|
7
|
+
function: {
|
|
8
|
+
name: "getPullRequest",
|
|
9
|
+
description: "Fetches a pull request from GitHub using the provided URL. Requires a valid GITHUB_TOKEN.",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: "object",
|
|
12
|
+
positional: true,
|
|
13
|
+
properties: {
|
|
14
|
+
url: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "The URL of the pull request to fetch.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ["url"],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
type: "function",
|
|
25
|
+
function: {
|
|
26
|
+
name: "getPullRequestBuildStatuses",
|
|
27
|
+
description: "Fetches the build statuses for a pull request using the provided URL. Requires a valid GITHUB_TOKEN.",
|
|
28
|
+
parameters: {
|
|
29
|
+
type: "object",
|
|
30
|
+
positional: true,
|
|
31
|
+
properties: {
|
|
32
|
+
url: {
|
|
33
|
+
type: "string",
|
|
34
|
+
description: "The URL of the pull request to fetch build statuses for.",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
required: ["url"],
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "function",
|
|
43
|
+
function: {
|
|
44
|
+
name: "getRunLogs",
|
|
45
|
+
description: "Retrieves the run logs for a specified GitHub Actions run ID in the specified repository.",
|
|
46
|
+
parameters: {
|
|
47
|
+
type: "object",
|
|
48
|
+
positional: true,
|
|
49
|
+
properties: {
|
|
50
|
+
runId: {
|
|
51
|
+
type: "number",
|
|
52
|
+
description: "The ID of the GitHub Actions run to retrieve logs for.",
|
|
53
|
+
},
|
|
54
|
+
owner: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The owner of the repository containing the run.",
|
|
57
|
+
},
|
|
58
|
+
repo: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "The name of the repository containing the run.",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
required: ["runId", "owner", "repo"],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: "function",
|
|
69
|
+
function: {
|
|
70
|
+
name: "getPullRequestBuildFailureLogs",
|
|
71
|
+
description: "Fetches the build failure logs for a pull request using the provided URL. Specifically focuses on failures.",
|
|
72
|
+
parameters: {
|
|
73
|
+
type: "object",
|
|
74
|
+
positional: true,
|
|
75
|
+
properties: {
|
|
76
|
+
url: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "The URL of the pull request to fetch failure logs for.",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ["url"],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../../../src/agents/tools/github/definitions.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,UAAU;QAChB,QAAQ,EAAE;YACR,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACT,2FAA2F;YAC7F,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,IAAI;gBAChB,UAAU,EAAE;oBACV,GAAG,EAAE;wBACH,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,uCAAuC;qBACrD;iBACF;gBACD,QAAQ,EAAE,CAAC,KAAK,CAAC;aAClB;SACF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