@comate/zulu 0.0.9 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -0
- package/comate-engine/bin/comate.js +10 -0
- package/comate-engine/fallbackServer.js +1 -0
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +188 -0
- package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-engine/package.json +49 -0
- package/comate-engine/node_modules/@comate/plugin-host/bin.js +44 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +14 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +9 -0
- package/comate-engine/node_modules/@comate/plugin-host/dist/user-Btg63hPI.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-host/package.json +47 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +2849 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +36 -0
- package/comate-engine/node_modules/@comate/plugin-shared-internals/package.json +72 -0
- package/comate-engine/node_modules/@comate/preview-proxy/bin/preview.js +13 -0
- package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +350 -0
- package/comate-engine/node_modules/@comate/preview-proxy/package.json +83 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +2 -0
- package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js.LICENSE.txt +58 -0
- package/comate-engine/node_modules/compare-versions/LICENSE +21 -0
- package/comate-engine/node_modules/compare-versions/README.md +133 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +19 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.js +44 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compare.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +8 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js +29 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +5 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.js +5 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/index.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +14 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js +66 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +7 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.js +37 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/utils.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +28 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.js +31 -0
- package/comate-engine/node_modules/compare-versions/lib/esm/validate.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/lib/umd/index.js +216 -0
- package/comate-engine/node_modules/compare-versions/lib/umd/index.js.map +1 -0
- package/comate-engine/node_modules/compare-versions/package.json +45 -0
- package/comate-engine/node_modules/compare-versions/src/compare.ts +54 -0
- package/comate-engine/node_modules/compare-versions/src/compareVersions.ts +31 -0
- package/comate-engine/node_modules/compare-versions/src/index.ts +5 -0
- package/comate-engine/node_modules/compare-versions/src/satisfies.ts +69 -0
- package/comate-engine/node_modules/compare-versions/src/utils.ts +50 -0
- package/comate-engine/node_modules/compare-versions/src/validate.ts +36 -0
- package/comate-engine/node_modules/pkce-challenge/LICENSE +21 -0
- package/comate-engine/node_modules/pkce-challenge/README.md +55 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.browser.js +72 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.cjs +80 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
- package/comate-engine/node_modules/pkce-challenge/dist/index.node.js +75 -0
- package/comate-engine/node_modules/pkce-challenge/package.json +58 -0
- package/comate-engine/node_modules/web-streams-polyfill/LICENSE +22 -0
- package/comate-engine/node_modules/web-streams-polyfill/README.md +119 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.es5.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.mjs +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.js +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.mjs +8 -0
- package/comate-engine/node_modules/web-streams-polyfill/package.json +98 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +28 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +809 -0
- package/comate-engine/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +11 -0
- package/comate-engine/package.json +94 -0
- package/comate-engine/plugins/aiscan/assets/icon.svg +12 -0
- package/comate-engine/plugins/aiscan/dist/index.js +53861 -0
- package/comate-engine/plugins/aiscan/package.json +67 -0
- package/comate-engine/plugins/appdev/assets/icon.png +0 -0
- package/comate-engine/plugins/appdev/dist/help.md +12 -0
- package/comate-engine/plugins/appdev/dist/index.d.ts +2 -0
- package/comate-engine/plugins/appdev/dist/index.js +194 -0
- package/comate-engine/plugins/appdev/dist/providers/err.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/err.js +37 -0
- package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +5 -0
- package/comate-engine/plugins/appdev/dist/providers/fallback.js +28 -0
- package/comate-engine/plugins/appdev/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/help.js +19 -0
- package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/medusa.js +39 -0
- package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +8 -0
- package/comate-engine/plugins/appdev/dist/providers/qa.js +33 -0
- package/comate-engine/plugins/appdev/package.json +67 -0
- package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
- package/comate-engine/plugins/bfc/dist/config/config.d.ts +4 -0
- package/comate-engine/plugins/bfc/dist/config/config.js +4 -0
- package/comate-engine/plugins/bfc/dist/help.md +11 -0
- package/comate-engine/plugins/bfc/dist/index.d.ts +2 -0
- package/comate-engine/plugins/bfc/dist/index.js +452 -0
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +77 -0
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +71 -0
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +74 -0
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +10 -0
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +71 -0
- package/comate-engine/plugins/bfc/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/bfc/dist/providers/help.js +19 -0
- package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +14 -0
- package/comate-engine/plugins/bfc/dist/service/generateService.js +27 -0
- package/comate-engine/plugins/bfc/package.json +85 -0
- package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
- package/comate-engine/plugins/bpm/dist/index.js +313 -0
- package/comate-engine/plugins/bpm/package.json +65 -0
- package/comate-engine/plugins/casebuilder/assets/icon.svg +1 -0
- package/comate-engine/plugins/casebuilder/dist/help.md +33 -0
- package/comate-engine/plugins/casebuilder/dist/index.js +837 -0
- package/comate-engine/plugins/casebuilder/package.json +80 -0
- package/comate-engine/plugins/centrino/assets/icon.png +0 -0
- package/comate-engine/plugins/centrino/dist/help.md +30 -0
- package/comate-engine/plugins/centrino/dist/index.js +1046 -0
- package/comate-engine/plugins/centrino/package.json +68 -0
- package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
- package/comate-engine/plugins/cnap/dist/help.md +11 -0
- package/comate-engine/plugins/cnap/dist/index.js +171 -0
- package/comate-engine/plugins/cnap/package.json +65 -0
- package/comate-engine/plugins/demo-feature/assets/icon.svg +1 -0
- package/comate-engine/plugins/demo-feature/dist/help.md +1 -0
- package/comate-engine/plugins/demo-feature/dist/index.d.ts +2 -0
- package/comate-engine/plugins/demo-feature/dist/index.js +36008 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.js +26 -0
- package/comate-engine/plugins/demo-feature/dist/providers/config.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/config.js +25 -0
- package/comate-engine/plugins/demo-feature/dist/providers/context.d.ts +10 -0
- package/comate-engine/plugins/demo-feature/dist/providers/context.js +49 -0
- package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.js +65 -0
- package/comate-engine/plugins/demo-feature/dist/providers/explainCode.d.ts +9 -0
- package/comate-engine/plugins/demo-feature/dist/providers/explainCode.js +24 -0
- package/comate-engine/plugins/demo-feature/dist/providers/fallback.d.ts +5 -0
- package/comate-engine/plugins/demo-feature/dist/providers/fallback.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/file.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/file.js +36 -0
- package/comate-engine/plugins/demo-feature/dist/providers/help.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/help.js +19 -0
- package/comate-engine/plugins/demo-feature/dist/providers/information.d.ts +13 -0
- package/comate-engine/plugins/demo-feature/dist/providers/information.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/knowledge.d.ts +15 -0
- package/comate-engine/plugins/demo-feature/dist/providers/knowledge.js +71 -0
- package/comate-engine/plugins/demo-feature/dist/providers/log.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/log.js +21 -0
- package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.js +23 -0
- package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.js +47 -0
- package/comate-engine/plugins/demo-feature/dist/providers/prompt.d.ts +7 -0
- package/comate-engine/plugins/demo-feature/dist/providers/prompt.js +7 -0
- package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.js +17 -0
- package/comate-engine/plugins/demo-feature/dist/providers/render.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/render.js +75 -0
- package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.d.ts +10 -0
- package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.js +173 -0
- package/comate-engine/plugins/demo-feature/dist/providers/section.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/section.js +136 -0
- package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.d.ts +12 -0
- package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.js +17 -0
- package/comate-engine/plugins/demo-feature/dist/providers/streaming.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/streaming.js +29 -0
- package/comate-engine/plugins/demo-feature/dist/providers/userDetail.d.ts +8 -0
- package/comate-engine/plugins/demo-feature/dist/providers/userDetail.js +28 -0
- package/comate-engine/plugins/demo-feature/package.json +214 -0
- package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
- package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
- package/comate-engine/plugins/demo-timer/package.json +73 -0
- package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
- package/comate-engine/plugins/dev-tools/dist/help.md +18 -0
- package/comate-engine/plugins/dev-tools/dist/index.js +166160 -0
- package/comate-engine/plugins/dev-tools/package.json +95 -0
- package/comate-engine/plugins/devaux/assets/icon.svg +1 -0
- package/comate-engine/plugins/devaux/dist/help.md +41 -0
- package/comate-engine/plugins/devaux/dist/index.js +73829 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/package.json +83 -0
- package/comate-engine/plugins/f2c/assets/icon.svg +11 -0
- package/comate-engine/plugins/f2c/dist/help.md +13 -0
- package/comate-engine/plugins/f2c/dist/index.js +64551 -0
- package/comate-engine/plugins/f2c/package.json +56 -0
- package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
- package/comate-engine/plugins/fcnap/dist/help.md +9 -0
- package/comate-engine/plugins/fcnap/dist/index.js +105 -0
- package/comate-engine/plugins/fcnap/package.json +50 -0
- package/comate-engine/plugins/front-end-skills/assets/icon.svg +1 -0
- package/comate-engine/plugins/front-end-skills/dist/help.md +17 -0
- package/comate-engine/plugins/front-end-skills/dist/index.js +8172 -0
- package/comate-engine/plugins/front-end-skills/package.json +79 -0
- package/comate-engine/plugins/gdp/assets/icon.png +0 -0
- package/comate-engine/plugins/gdp/dist/help.md +11 -0
- package/comate-engine/plugins/gdp/dist/index.js +53065 -0
- package/comate-engine/plugins/gdp/package.json +79 -0
- package/comate-engine/plugins/git/assets/git.svg +1 -0
- package/comate-engine/plugins/git/assets/icon.svg +1 -0
- package/comate-engine/plugins/git/dist/help.md +7 -0
- package/comate-engine/plugins/git/dist/index.js +32675 -0
- package/comate-engine/plugins/git/package.json +91 -0
- package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
- package/comate-engine/plugins/harmonyos/dist/index.js +78 -0
- package/comate-engine/plugins/harmonyos/package.json +37 -0
- package/comate-engine/plugins/iapi/assets/icon.png +0 -0
- package/comate-engine/plugins/iapi/dist/help.md +13 -0
- package/comate-engine/plugins/iapi/dist/index.js +458 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/iapi/package.json +102 -0
- package/comate-engine/plugins/icafe/assets/icafe.svg +1 -0
- package/comate-engine/plugins/icafe/dist/help.md +5 -0
- package/comate-engine/plugins/icafe/dist/index.js +885 -0
- package/comate-engine/plugins/icafe/package.json +74 -0
- package/comate-engine/plugins/ievalue/assets/iEValue.svg +10 -0
- package/comate-engine/plugins/ievalue/dist/index.js +2920 -0
- package/comate-engine/plugins/ievalue/package.json +88 -0
- package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
- package/comate-engine/plugins/ipipe/dist/help.md +15 -0
- package/comate-engine/plugins/ipipe/dist/index.js +7264 -0
- package/comate-engine/plugins/ipipe/package.json +62 -0
- package/comate-engine/plugins/jarvis/assets/icon.svg +1 -0
- package/comate-engine/plugins/jarvis/dist/help.md +17 -0
- package/comate-engine/plugins/jarvis/dist/index.js +140416 -0
- package/comate-engine/plugins/jarvis/package.json +93 -0
- package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
- package/comate-engine/plugins/mapsearch/dist/help.md +4 -0
- package/comate-engine/plugins/mapsearch/dist/index.js +145 -0
- package/comate-engine/plugins/mapsearch/package.json +53 -0
- package/comate-engine/plugins/paddle/assets/icon.png +0 -0
- package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
- package/comate-engine/plugins/paddle/dist/help.md +31 -0
- package/comate-engine/plugins/paddle/dist/index.js +1011 -0
- package/comate-engine/plugins/paddle/package.json +129 -0
- package/comate-engine/plugins/robot/assets/Robot.png +0 -0
- package/comate-engine/plugins/robot/dist/index.js +288 -0
- package/comate-engine/plugins/robot/package.json +67 -0
- package/comate-engine/plugins/security/assets/comate.png +0 -0
- package/comate-engine/plugins/security/dist/index.js +18393 -0
- package/comate-engine/plugins/security/package.json +82 -0
- package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
- package/comate-engine/plugins/smartapp/dist/help.md +4 -0
- package/comate-engine/plugins/smartapp/dist/index.js +113 -0
- package/comate-engine/plugins/smartapp/package.json +54 -0
- package/comate-engine/plugins/springer/assets/icon.png +0 -0
- package/comate-engine/plugins/springer/dist/help.md +4 -0
- package/comate-engine/plugins/springer/dist/index.js +94525 -0
- package/comate-engine/plugins/springer/package.json +71 -0
- package/comate-engine/plugins/testmate/assets/icon.svg +1 -0
- package/comate-engine/plugins/testmate/dist/help.md +62 -0
- package/comate-engine/plugins/testmate/dist/index.js +21483 -0
- package/comate-engine/plugins/testmate/package.json +85 -0
- package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
- package/comate-engine/plugins/tor/dist/help.md +22 -0
- package/comate-engine/plugins/tor/dist/index.js +807 -0
- package/comate-engine/plugins/tor/package.json +99 -0
- package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
- package/comate-engine/plugins/weiyun/dist/help.md +11 -0
- package/comate-engine/plugins/weiyun/dist/index.js +100491 -0
- package/comate-engine/plugins/weiyun/package.json +55 -0
- package/comate-engine/plugins/wenku/assets/icon.svg +1 -0
- package/comate-engine/plugins/wenku/dist/index.js +249 -0
- package/comate-engine/plugins/wenku/package.json +55 -0
- package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
- package/comate-engine/plugins/workcard/dist/help.md +30 -0
- package/comate-engine/plugins/workcard/dist/index.js +490 -0
- package/comate-engine/plugins/workcard/package.json +95 -0
- package/comate-engine/plugins/xiaomi-aiot/assets/icon.png +0 -0
- package/comate-engine/plugins/xiaomi-aiot/dist/help.md +6 -0
- package/comate-engine/plugins/xiaomi-aiot/dist/index.js +37466 -0
- package/comate-engine/plugins/xiaomi-aiot/package.json +63 -0
- package/comate-engine/server.d.ts +3 -0
- package/comate-engine/server.js +474 -0
- package/dist/bundle/index.js +29 -58174
- package/package.json +2 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as _comate_plugin_shared_internals from '@comate/plugin-shared-internals';
|
|
3
|
+
import { Channel, SessionInit, Session, ACTION_CHAT_TASK_PROGRESS, TaskProgressPayload, ACTION_REQUEST_PERMISSION, RequestPermissionPayload, ACTION_ASK_LLM, LlmPayload, ACTION_ASK_RAG, RAGPayload, ACTION_ASK_LLM_STREAMING, ACTION_GET_PLUGIN_CONFIG, GetPluginConfigPayload, ACTION_INFORMATION_QUERY, InformationPayload, ACTION_DIAGNOSTIC_SCAN_TASK_PROGRESS, DiagnosticScanTaskProgressPayload, ACTION_DIAGNOSTIC_SCAN_TASK_COUNT, DiagnosticScanCountPayload, ACTION_SECUBOT_TASK_PROGRESS, SecubotQueryPayload, ACTION_DEBUG_TASK_PROCESS, DebugAgentPluginPayload, ACTION_CODE_SEARCH, CodeSearchPayload, ACTION_BATCH_ACCEPT, BatchAcceptPayload, ACTION_ISCAN_RESULT, IScanResultPayload, ACTION_ISCAN_JOB_BUILD_ID, IScanJobBuildPayload, ACTION_SA_SCAN_DIAGNOSTIC_RESULT, SAScanDiagnosticResult, ACTION_PLUS_MODULE_LIST_RESULT, PlusModuleListResultPayload, PluginDescription, DiagnosticScanPayload, DiagnosticScanTaskProgressChunk, ActivationContext, DiagnosticCacheValue, DiagnosticScanChangedFiles, ModelOptions, ChannelImplementMaybe, QuerySelectorPayload } from '@comate/plugin-shared-internals';
|
|
4
|
+
import * as execa from 'execa';
|
|
5
|
+
import { ChildProcess } from 'node:child_process';
|
|
6
|
+
|
|
7
|
+
interface PayloadMap {
|
|
8
|
+
[ACTION_CHAT_TASK_PROGRESS]: TaskProgressPayload;
|
|
9
|
+
[ACTION_REQUEST_PERMISSION]: RequestPermissionPayload;
|
|
10
|
+
[ACTION_ASK_LLM]: LlmPayload;
|
|
11
|
+
[ACTION_ASK_RAG]: RAGPayload;
|
|
12
|
+
[ACTION_ASK_LLM_STREAMING]: LlmPayload;
|
|
13
|
+
[ACTION_GET_PLUGIN_CONFIG]: GetPluginConfigPayload;
|
|
14
|
+
[ACTION_INFORMATION_QUERY]: InformationPayload;
|
|
15
|
+
[ACTION_DIAGNOSTIC_SCAN_TASK_PROGRESS]: DiagnosticScanTaskProgressPayload;
|
|
16
|
+
[ACTION_DIAGNOSTIC_SCAN_TASK_COUNT]: DiagnosticScanCountPayload;
|
|
17
|
+
[ACTION_SECUBOT_TASK_PROGRESS]: SecubotQueryPayload;
|
|
18
|
+
[ACTION_DEBUG_TASK_PROCESS]: DebugAgentPluginPayload;
|
|
19
|
+
[ACTION_CODE_SEARCH]: CodeSearchPayload;
|
|
20
|
+
[ACTION_BATCH_ACCEPT]: BatchAcceptPayload;
|
|
21
|
+
[ACTION_ISCAN_RESULT]: IScanResultPayload;
|
|
22
|
+
[ACTION_ISCAN_JOB_BUILD_ID]: IScanJobBuildPayload;
|
|
23
|
+
[ACTION_SA_SCAN_DIAGNOSTIC_RESULT]: SAScanDiagnosticResult;
|
|
24
|
+
[ACTION_PLUS_MODULE_LIST_RESULT]: PlusModuleListResultPayload;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 处理Engine与插件之间的会话
|
|
28
|
+
*/
|
|
29
|
+
declare class PluginSession extends Session<PayloadMap> {
|
|
30
|
+
protected initializeListeners(): void;
|
|
31
|
+
}
|
|
32
|
+
declare class PluginChannel extends Channel<PluginSession> {
|
|
33
|
+
protected createSession(init: SessionInit): PluginSession;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface PluginInitContext {
|
|
37
|
+
description: PluginDescription;
|
|
38
|
+
directory: string;
|
|
39
|
+
inspectPort?: number;
|
|
40
|
+
}
|
|
41
|
+
interface AttachedPlugin extends PluginInitContext {
|
|
42
|
+
onSetup: ((channel: PluginChannel) => void) | undefined;
|
|
43
|
+
onExit: (() => void) | undefined;
|
|
44
|
+
}
|
|
45
|
+
interface PluginGroupValue {
|
|
46
|
+
channel: PluginChannel;
|
|
47
|
+
}
|
|
48
|
+
interface PluginGroup<G extends PluginGroupValue = PluginGroupValue> {
|
|
49
|
+
key: string;
|
|
50
|
+
value: G;
|
|
51
|
+
inspectPort?: number;
|
|
52
|
+
plugins: Map<string, AttachedPlugin>;
|
|
53
|
+
}
|
|
54
|
+
interface PluginSetupContext {
|
|
55
|
+
description: PluginDescription;
|
|
56
|
+
directory: string;
|
|
57
|
+
inspectPort?: number;
|
|
58
|
+
}
|
|
59
|
+
interface GroupJoinOptions {
|
|
60
|
+
onExit?: AttachedPlugin['onExit'];
|
|
61
|
+
onSetup?: AttachedPlugin['onSetup'];
|
|
62
|
+
}
|
|
63
|
+
declare abstract class ChannelGroupManager<G extends PluginGroupValue = PluginGroupValue> {
|
|
64
|
+
protected readonly groups: Map<string, PluginGroup<G>>;
|
|
65
|
+
joinGroup(setupContext: PluginSetupContext, { onExit, onSetup }: GroupJoinOptions): Promise<void>;
|
|
66
|
+
exitGroup(setupContext: PluginSetupContext): Promise<void>;
|
|
67
|
+
protected createGroup(groupKey: string, inspectPort?: number): PluginGroup<G>;
|
|
68
|
+
/**
|
|
69
|
+
* 插件加入到分组后的逻辑钩子
|
|
70
|
+
*
|
|
71
|
+
* @param group 插件加入的分组
|
|
72
|
+
* @param plugin 插件信息
|
|
73
|
+
*/
|
|
74
|
+
protected abstract onPluginJoinGroup(group: PluginGroup<G>, plugin: PluginSetupContext): Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* 插件从分组移除后的逻辑钩子
|
|
77
|
+
*
|
|
78
|
+
* @param group 插件加入的分组
|
|
79
|
+
* @param plugin 插件信息
|
|
80
|
+
*/
|
|
81
|
+
protected abstract onPluginExitGroup(group: PluginGroup<G>, plugin: PluginSetupContext): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* 销毁一个分组,通常在所有插件都已经从中移除后调用
|
|
84
|
+
*
|
|
85
|
+
* @param group 待销毁的分组
|
|
86
|
+
*/
|
|
87
|
+
protected abstract destroyGroup(group: PluginGroup<G>): void;
|
|
88
|
+
/**
|
|
89
|
+
* 通过插件信息计算出分组的键名
|
|
90
|
+
*
|
|
91
|
+
* @param context 插件信息
|
|
92
|
+
*/
|
|
93
|
+
protected abstract getGroupKey(context: PluginSetupContext): string;
|
|
94
|
+
/**
|
|
95
|
+
* 创建分组的具体实现
|
|
96
|
+
*
|
|
97
|
+
* @param groupKey 分级键
|
|
98
|
+
* @param inspectPort 调试用监听端口
|
|
99
|
+
*/
|
|
100
|
+
protected abstract createGroupValue(groupKey: string, inspectPort?: number): G;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface PluginProcessForkOptions {
|
|
104
|
+
nodeOptions?: string[];
|
|
105
|
+
onUnexpectedExit?: (code: number) => void;
|
|
106
|
+
onUnexpectedError?: (error: Error) => void;
|
|
107
|
+
onPluginSetup?: (pluginName: string) => void;
|
|
108
|
+
}
|
|
109
|
+
declare function forkPluginProcess(groupKey: string, options: PluginProcessForkOptions): execa.ExecaChildProcess<string>;
|
|
110
|
+
interface PluginSetupInput {
|
|
111
|
+
name: string;
|
|
112
|
+
directory: string;
|
|
113
|
+
}
|
|
114
|
+
declare function invokePluginSetupToProcess(process: ChildProcess, input: PluginSetupInput): Promise<void>;
|
|
115
|
+
|
|
116
|
+
declare abstract class DiagnosticCache {
|
|
117
|
+
private readonly deletedFilePath;
|
|
118
|
+
private readonly diagnosticCache;
|
|
119
|
+
start(payload: DiagnosticScanPayload): Promise<void>;
|
|
120
|
+
put(chunk: DiagnosticScanTaskProgressChunk): void;
|
|
121
|
+
get(payload: DiagnosticScanPayload & {
|
|
122
|
+
context: ActivationContext;
|
|
123
|
+
}): DiagnosticCacheValue | undefined;
|
|
124
|
+
hasDiagnostics(): boolean;
|
|
125
|
+
private isDirectory;
|
|
126
|
+
private isModifiedRecently;
|
|
127
|
+
private isAddedRecently;
|
|
128
|
+
private getChangedFiles;
|
|
129
|
+
private watch;
|
|
130
|
+
protected abstract handleChangedFiles(payload: DiagnosticScanPayload, changedFiles: DiagnosticScanChangedFiles): Promise<void>;
|
|
131
|
+
protected abstract init(payload: DiagnosticScanPayload): Promise<void>;
|
|
132
|
+
protected abstract beforeGet(payload: DiagnosticScanPayload & {
|
|
133
|
+
context: ActivationContext;
|
|
134
|
+
}): void;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
interface ChatMessage {
|
|
138
|
+
role: 'user' | 'assistant';
|
|
139
|
+
content: string;
|
|
140
|
+
originalQuery?: string;
|
|
141
|
+
}
|
|
142
|
+
declare class ConversationBufferMemory {
|
|
143
|
+
private readonly conversationBuffer;
|
|
144
|
+
private readonly cleanupInterval;
|
|
145
|
+
constructor();
|
|
146
|
+
dispose(): void;
|
|
147
|
+
clear(conversationId?: string): void;
|
|
148
|
+
get(conversationId: string): ChatMessage[];
|
|
149
|
+
putUser(enableMultiturnDialogue: ModelOptions['enableMultiturnDialogue'], conversationId: string, message: ChatMessage): void;
|
|
150
|
+
putAssistant(conversationId: string, content: string): void;
|
|
151
|
+
getConversationId(enableMultiturnDialogue: ModelOptions['enableMultiturnDialogue'], pluginName: string, capabilityName: string): string;
|
|
152
|
+
trimConversation(conversationId: string, maxChars?: number): ChatMessage[] | null;
|
|
153
|
+
private cleanup;
|
|
154
|
+
private getTotalChars;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface EngineInit {
|
|
158
|
+
pluginDirectories: string[];
|
|
159
|
+
channelGroupManager: ChannelGroupManager;
|
|
160
|
+
channel: ChannelImplementMaybe;
|
|
161
|
+
localConfig?: Record<string, any>;
|
|
162
|
+
}
|
|
163
|
+
declare class PluginEngine {
|
|
164
|
+
private readonly channelGroupManager;
|
|
165
|
+
private readonly registry;
|
|
166
|
+
private readonly plugins;
|
|
167
|
+
private readonly ideChannel;
|
|
168
|
+
private readonly pluginDirectories;
|
|
169
|
+
private readonly localConfig?;
|
|
170
|
+
constructor(init: EngineInit);
|
|
171
|
+
/**
|
|
172
|
+
* 启动插件引擎
|
|
173
|
+
*
|
|
174
|
+
* @param entryDirectory 放置所有插件的目录
|
|
175
|
+
*/
|
|
176
|
+
start(): Promise<void>;
|
|
177
|
+
stop(): Promise<void>;
|
|
178
|
+
/**
|
|
179
|
+
* 获取所有插件注册的能力
|
|
180
|
+
*
|
|
181
|
+
* @returns 全部能力的数组
|
|
182
|
+
*/
|
|
183
|
+
listAllCapabilities(): _comate_plugin_shared_internals.ProviderCapabilityInfo[];
|
|
184
|
+
suggestCapabilitiesByMatch(payload: QuerySelectorPayload): Promise<_comate_plugin_shared_internals.ProviderCapabilityInfo[]>;
|
|
185
|
+
private run;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export { ChannelGroupManager, type ChatMessage, ConversationBufferMemory, DiagnosticCache, type EngineInit, PluginChannel, PluginEngine, type PluginGroup, type PluginGroupValue, type PluginSetupContext, forkPluginProcess, invokePluginSetupToProcess };
|