@comate/zulu 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +8 -0
  2. package/comate-engine/assets/skills/auto-commit/SKILL.md +386 -0
  3. package/comate-engine/assets/skills/auto-commit/references/issue_type_mapping.json +19 -0
  4. package/comate-engine/assets/skills/auto-commit/references/new_version_instruction.md +196 -0
  5. package/comate-engine/assets/skills/auto-commit/references/old_version_instruction.md +189 -0
  6. package/comate-engine/assets/skills/auto-commit/references/query_reference.md +176 -0
  7. package/comate-engine/assets/skills/auto-commit/scripts/compat.py +86 -0
  8. package/comate-engine/assets/skills/auto-commit/scripts/create_card_cli.py +67 -0
  9. package/comate-engine/assets/skills/auto-commit/scripts/git_diff_cli.py +195 -0
  10. package/comate-engine/assets/skills/auto-commit/scripts/git_utils.py +225 -0
  11. package/comate-engine/assets/skills/auto-commit/scripts/icafe/__init__.py +66 -0
  12. package/comate-engine/assets/skills/auto-commit/scripts/icafe/client.py +444 -0
  13. package/comate-engine/assets/skills/auto-commit/scripts/icafe/farseer.py +53 -0
  14. package/comate-engine/assets/skills/auto-commit/scripts/icafe/matching.py +778 -0
  15. package/comate-engine/assets/skills/auto-commit/scripts/logger.py +32 -0
  16. package/comate-engine/assets/skills/auto-commit/scripts/recognize_card_cli.py +63 -0
  17. package/comate-engine/assets/skills/automation-browser-comate/SKILL.md +193 -90
  18. package/comate-engine/assets/skills/figma2code-comate/SKILL.md +2 -2
  19. package/comate-engine/assets/skills/figma2code-comate/references/codeConnect.md +7 -10
  20. package/comate-engine/assets/skills/smart-commit/SKILL.md +646 -0
  21. package/comate-engine/assets/skills/smart-commit/references/issue_type_mapping.json +19 -0
  22. package/comate-engine/assets/skills/smart-commit/references/query_reference.md +176 -0
  23. package/comate-engine/assets/skills/smart-commit/scripts/compat.py +86 -0
  24. package/comate-engine/assets/skills/smart-commit/scripts/create_card_cli.py +67 -0
  25. package/comate-engine/assets/skills/smart-commit/scripts/git_utils.py +220 -0
  26. package/comate-engine/assets/skills/smart-commit/scripts/icafe/__init__.py +66 -0
  27. package/comate-engine/assets/skills/smart-commit/scripts/icafe/client.py +444 -0
  28. package/comate-engine/assets/skills/smart-commit/scripts/icafe/farseer.py +53 -0
  29. package/comate-engine/assets/skills/smart-commit/scripts/icafe/matching.py +728 -0
  30. package/comate-engine/assets/skills/smart-commit/scripts/logger.py +32 -0
  31. package/comate-engine/assets/skills/smart-commit/scripts/recognize_card_cli.py +63 -0
  32. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +7 -7
  33. package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -1
  34. package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +1 -1
  35. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +8 -8
  36. package/comate-engine/node_modules/@comate/preview-proxy/package.json +2 -2
  37. package/comate-engine/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  38. package/comate-engine/package.json +2 -2
  39. package/comate-engine/server.js +61 -44
  40. package/dist/bundle/index.js +8 -8
  41. package/package.json +1 -1
  42. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +0 -188
  43. package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +0 -14
  44. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +0 -4817
  45. package/comate-engine/node_modules/better-sqlite3/README.md +0 -99
  46. package/comate-engine/node_modules/bindings/LICENSE.md +0 -22
  47. package/comate-engine/node_modules/bindings/README.md +0 -98
  48. package/comate-engine/node_modules/compare-versions/README.md +0 -133
  49. package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +0 -19
  50. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +0 -8
  51. package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +0 -5
  52. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +0 -14
  53. package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +0 -7
  54. package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +0 -28
  55. package/comate-engine/node_modules/file-uri-to-path/History.md +0 -21
  56. package/comate-engine/node_modules/file-uri-to-path/README.md +0 -74
  57. package/comate-engine/node_modules/file-uri-to-path/index.d.ts +0 -2
  58. package/comate-engine/node_modules/pkce-challenge/README.md +0 -55
  59. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +0 -19
  60. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +0 -19
  61. package/comate-engine/node_modules/sqlite-vec/README.md +0 -1
  62. package/comate-engine/node_modules/sqlite-vec/index.d.ts +0 -17
  63. package/comate-engine/node_modules/sqlite-vec-darwin-arm64/README.md +0 -1
  64. package/comate-engine/node_modules/sqlite-vec-darwin-x64/README.md +0 -1
  65. package/comate-engine/node_modules/sqlite-vec-linux-arm64/README.md +0 -1
  66. package/comate-engine/node_modules/sqlite-vec-linux-x64/README.md +0 -1
  67. package/comate-engine/node_modules/sqlite-vec-windows-x64/README.md +0 -1
  68. package/comate-engine/node_modules/tree-sitter-bash/README.md +0 -44
  69. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/binding_test.js +0 -9
  70. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/index.d.ts +0 -28
  71. package/comate-engine/node_modules/tree-sitter-bash/bindings/node/index.js +0 -11
  72. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/darwin-arm64/tree-sitter-bash.node +0 -0
  73. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/darwin-x64/tree-sitter-bash.node +0 -0
  74. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/linux-arm64/tree-sitter-bash.node +0 -0
  75. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/linux-x64/tree-sitter-bash.node +0 -0
  76. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/win32-arm64/tree-sitter-bash.node +0 -0
  77. package/comate-engine/node_modules/tree-sitter-bash/prebuilds/win32-x64/tree-sitter-bash.node +0 -0
  78. package/comate-engine/node_modules/tree-sitter-bash/src/grammar.json +0 -7145
  79. package/comate-engine/node_modules/tree-sitter-bash/src/node-types.json +0 -2894
  80. package/comate-engine/node_modules/web-streams-polyfill/README.md +0 -119
  81. package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +0 -28
  82. package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +0 -809
  83. package/comate-engine/node_modules/web-tree-sitter/README.md +0 -269
  84. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.cjs +0 -4558
  85. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.js +0 -4516
  86. package/comate-engine/node_modules/web-tree-sitter/debug/tree-sitter.wasm +0 -0
  87. package/comate-engine/node_modules/web-tree-sitter/web-tree-sitter.d.ts +0 -1030
  88. package/comate-engine/node_modules/win-ca/README.md +0 -648
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comate/zulu",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "AI Coding Agent",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,188 +0,0 @@
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 };
@@ -1,14 +0,0 @@
1
- import * as _comate_plugin_shared_internals from '@comate/plugin-shared-internals';
2
-
3
- declare class PluginHost {
4
- private readonly invoker;
5
- private readonly channel;
6
- /**
7
- * 加载插件的主入口,插件进程启动后调用本函数
8
- */
9
- start(): Promise<void>;
10
- attach(directory: string): Promise<_comate_plugin_shared_internals.PluginDescription | null>;
11
- detach(pluginName: string): Promise<void>;
12
- }
13
-
14
- export { PluginHost };