mcp-probe-kit 3.0.16 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +601 -399
  2. package/build/index.js +13 -1
  3. package/build/lib/__tests__/memory-client.unit.test.d.ts +1 -0
  4. package/build/lib/__tests__/memory-client.unit.test.js +83 -0
  5. package/build/lib/__tests__/memory-config.unit.test.d.ts +1 -0
  6. package/build/lib/__tests__/memory-config.unit.test.js +33 -0
  7. package/build/lib/cursor-history-client.d.ts +54 -0
  8. package/build/lib/cursor-history-client.js +240 -0
  9. package/build/lib/gitnexus-bridge.js +6 -8
  10. package/build/lib/memory-client.d.ts +61 -0
  11. package/build/lib/memory-client.js +293 -0
  12. package/build/lib/memory-config.d.ts +14 -0
  13. package/build/lib/memory-config.js +31 -0
  14. package/build/lib/memory-orchestration.d.ts +26 -0
  15. package/build/lib/memory-orchestration.js +65 -0
  16. package/build/lib/project-detector.js +6 -4
  17. package/build/lib/workspace-root.d.ts +12 -0
  18. package/build/lib/workspace-root.js +153 -0
  19. package/build/resources/ui-ux-data/metadata.json +1 -1
  20. package/build/schemas/code-analysis-tools.d.ts +1 -1
  21. package/build/schemas/code-analysis-tools.js +1 -1
  22. package/build/schemas/index.d.ts +198 -4
  23. package/build/schemas/index.js +2 -0
  24. package/build/schemas/memory-tools.d.ts +191 -0
  25. package/build/schemas/memory-tools.js +106 -0
  26. package/build/schemas/orchestration-tools.d.ts +3 -3
  27. package/build/schemas/orchestration-tools.js +3 -3
  28. package/build/schemas/ui-ux-schemas.d.ts +8 -0
  29. package/build/schemas/ui-ux-schemas.js +4 -0
  30. package/build/tools/__tests__/cursor-history.unit.test.d.ts +1 -0
  31. package/build/tools/__tests__/cursor-history.unit.test.js +87 -0
  32. package/build/tools/__tests__/memorize_asset.unit.test.d.ts +1 -0
  33. package/build/tools/__tests__/memorize_asset.unit.test.js +68 -0
  34. package/build/tools/code_insight.d.ts +20 -0
  35. package/build/tools/code_insight.js +15 -0
  36. package/build/tools/cursor_list_conversations.d.ts +7 -0
  37. package/build/tools/cursor_list_conversations.js +35 -0
  38. package/build/tools/cursor_read_conversation.d.ts +7 -0
  39. package/build/tools/cursor_read_conversation.js +36 -0
  40. package/build/tools/cursor_search_conversations.d.ts +7 -0
  41. package/build/tools/cursor_search_conversations.js +36 -0
  42. package/build/tools/index.d.ts +6 -0
  43. package/build/tools/index.js +7 -0
  44. package/build/tools/init_project_context.d.ts +20 -1
  45. package/build/tools/init_project_context.js +114 -99
  46. package/build/tools/memorize_asset.d.ts +7 -0
  47. package/build/tools/memorize_asset.js +66 -0
  48. package/build/tools/read_memory_asset.d.ts +7 -0
  49. package/build/tools/read_memory_asset.js +26 -0
  50. package/build/tools/scan_and_extract_patterns.d.ts +27 -0
  51. package/build/tools/scan_and_extract_patterns.js +346 -0
  52. package/build/tools/start_bugfix.d.ts +20 -0
  53. package/build/tools/start_bugfix.js +97 -69
  54. package/build/tools/start_feature.d.ts +20 -0
  55. package/build/tools/start_feature.js +61 -31
  56. package/build/tools/start_onboard.d.ts +20 -0
  57. package/build/tools/start_onboard.js +15 -0
  58. package/build/tools/start_ui.d.ts +20 -0
  59. package/build/tools/start_ui.js +66 -32
  60. package/docs/data/tools.js +472 -373
  61. package/docs/i18n/all-tools/en.json +38 -5
  62. package/docs/i18n/all-tools/ja.json +14 -4
  63. package/docs/i18n/all-tools/ko.json +13 -3
  64. package/docs/i18n/all-tools/zh-CN.json +38 -5
  65. package/docs/i18n/en.json +48 -10
  66. package/docs/i18n/ja.json +47 -9
  67. package/docs/i18n/ko.json +47 -9
  68. package/docs/i18n/zh-CN.json +48 -10
  69. package/docs/pages/all-tools.html +515 -515
  70. package/docs/pages/examples.html +661 -661
  71. package/docs/pages/getting-started.html +673 -582
  72. package/docs/pages/migration.html +291 -291
  73. package/package.json +83 -82
  74. package/docs/debug-i18n.html +0 -163
@@ -105,7 +105,7 @@ export declare const allToolSchemas: ({
105
105
  };
106
106
  readonly project_root: {
107
107
  readonly type: "string";
108
- readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
108
+ readonly description: "项目根目录绝对路径。建议显式传入;当调用里还包含相对路径参数时,应统一相对该项目根目录解析,避免依赖客户端 cwd";
109
109
  };
110
110
  readonly goal: {
111
111
  readonly type: "string";
@@ -279,7 +279,7 @@ export declare const allToolSchemas: ({
279
279
  };
280
280
  readonly project_root: {
281
281
  readonly type: "string";
282
- readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
282
+ readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd";
283
283
  };
284
284
  readonly template_profile: {
285
285
  readonly type: "string";
@@ -325,7 +325,7 @@ export declare const allToolSchemas: ({
325
325
  };
326
326
  readonly project_root: {
327
327
  readonly type: "string";
328
- readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
328
+ readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd";
329
329
  };
330
330
  readonly analysis_mode: {
331
331
  readonly type: "string";
@@ -363,7 +363,7 @@ export declare const allToolSchemas: ({
363
363
  readonly properties: {
364
364
  readonly project_path: {
365
365
  readonly type: "string";
366
- readonly description: "项目路径。可选,默认当前目录";
366
+ readonly description: "项目根目录绝对路径。建议显式传入;如果还传 docs_dir 等相对路径,应统一相对该项目根目录解析。";
367
367
  };
368
368
  readonly docs_dir: {
369
369
  readonly type: "string";
@@ -600,6 +600,10 @@ export declare const allToolSchemas: ({
600
600
  type: string;
601
601
  description: string;
602
602
  };
603
+ project_root: {
604
+ type: string;
605
+ description: string;
606
+ };
603
607
  template_profile: {
604
608
  type: string;
605
609
  description: string;
@@ -662,4 +666,194 @@ export declare const allToolSchemas: ({
662
666
  };
663
667
  required: never[];
664
668
  };
669
+ } | {
670
+ readonly name: "read_memory_asset";
671
+ readonly description: "当编排阶段已检索到记忆摘要,且 AI 需要查看完整沉淀代码或详细规范时使用。根据 asset_id 读取记忆资产详情。";
672
+ readonly inputSchema: {
673
+ readonly type: "object";
674
+ readonly properties: {
675
+ readonly asset_id: {
676
+ readonly type: "string";
677
+ readonly description: "记忆资产 ID";
678
+ };
679
+ };
680
+ readonly required: readonly ["asset_id"];
681
+ readonly additionalProperties: true;
682
+ };
683
+ } | {
684
+ readonly name: "memorize_asset";
685
+ readonly description: "当 AI 完成开发并确认存在可复用代码、模式或规范时使用。将高价值资产沉淀到记忆系统。";
686
+ readonly inputSchema: {
687
+ readonly type: "object";
688
+ readonly properties: {
689
+ readonly name: {
690
+ readonly type: "string";
691
+ readonly description: "资产名称";
692
+ };
693
+ readonly type: {
694
+ readonly type: "string";
695
+ readonly description: "资产类型,如 code/component/pattern/spec";
696
+ };
697
+ readonly description: {
698
+ readonly type: "string";
699
+ readonly description: "资产描述";
700
+ };
701
+ readonly summary: {
702
+ readonly type: "string";
703
+ readonly description: "用于检索的凝练摘要";
704
+ };
705
+ readonly content: {
706
+ readonly type: "string";
707
+ readonly description: "完整内容";
708
+ };
709
+ readonly code_snippet: {
710
+ readonly type: "string";
711
+ readonly description: "代码片段,content 的别名";
712
+ };
713
+ readonly file_path: {
714
+ readonly type: "string";
715
+ readonly description: "来源文件路径";
716
+ };
717
+ readonly source_project: {
718
+ readonly type: "string";
719
+ readonly description: "来源项目";
720
+ };
721
+ readonly source_path: {
722
+ readonly type: "string";
723
+ readonly description: "来源路径";
724
+ };
725
+ readonly usage: {
726
+ readonly type: "string";
727
+ readonly description: "适用场景/使用方式";
728
+ };
729
+ readonly confidence: {
730
+ readonly type: "number";
731
+ readonly description: "置信度,0-1";
732
+ };
733
+ readonly tags: {
734
+ readonly type: "array";
735
+ readonly items: {
736
+ readonly type: "string";
737
+ };
738
+ readonly description: "标签列表";
739
+ };
740
+ };
741
+ readonly required: readonly ["name", "description", "summary"];
742
+ readonly additionalProperties: true;
743
+ };
744
+ } | {
745
+ readonly name: "scan_and_extract_patterns";
746
+ readonly description: "当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
747
+ readonly inputSchema: {
748
+ readonly type: "object";
749
+ readonly properties: {
750
+ readonly content: {
751
+ readonly type: "string";
752
+ readonly description: "待分析的代码或文本内容。传入该字段时走单段分析模式";
753
+ };
754
+ readonly file_path: {
755
+ readonly type: "string";
756
+ readonly description: "来源文件路径。单段分析时作为来源路径使用";
757
+ };
758
+ readonly project_name: {
759
+ readonly type: "string";
760
+ readonly description: "来源项目名";
761
+ };
762
+ readonly directory_path: {
763
+ readonly type: "string";
764
+ readonly description: "要扫描的目录路径。最佳实践是传相对 `project_root` 的路径,例如 `app/utils`;如果拿不到 `project_root`,才传目录绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
765
+ };
766
+ readonly project_root: {
767
+ readonly type: "string";
768
+ readonly description: "项目根目录绝对路径。目录扫描时建议始终传入;传入后,`directory_path` 应写成相对项目根的路径。";
769
+ };
770
+ readonly max_files: {
771
+ readonly type: "number";
772
+ readonly description: "最多扫描多少个文件,默认 30,最大 200";
773
+ };
774
+ readonly max_patterns: {
775
+ readonly type: "number";
776
+ readonly description: "最多返回多少个候选模式,默认 20,最大 100";
777
+ };
778
+ readonly include_extensions: {
779
+ readonly type: "array";
780
+ readonly items: {
781
+ readonly type: "string";
782
+ };
783
+ readonly description: "允许扫描的文件扩展名列表,例如 [\".ts\", \".tsx\", \".py\"]";
784
+ };
785
+ };
786
+ readonly required: readonly [];
787
+ readonly additionalProperties: true;
788
+ };
789
+ } | {
790
+ readonly name: "cursor_list_conversations";
791
+ readonly description: "读取 Cursor 本地历史会话摘要。适合按标题、工作区列出最近会话,用于续接旧上下文。";
792
+ readonly inputSchema: {
793
+ readonly type: "object";
794
+ readonly properties: {
795
+ readonly title_query: {
796
+ readonly type: "string";
797
+ readonly description: "按会话标题过滤,支持部分匹配";
798
+ };
799
+ readonly workspace_query: {
800
+ readonly type: "string";
801
+ readonly description: "按工作区路径过滤,支持部分匹配";
802
+ };
803
+ readonly include_archived: {
804
+ readonly type: "boolean";
805
+ readonly description: "是否包含已归档会话,默认 false";
806
+ };
807
+ readonly limit: {
808
+ readonly type: "number";
809
+ readonly description: "最多返回多少条,默认 20,最大 200";
810
+ };
811
+ };
812
+ readonly required: readonly [];
813
+ readonly additionalProperties: true;
814
+ };
815
+ } | {
816
+ readonly name: "cursor_search_conversations";
817
+ readonly description: "在 Cursor 本地历史消息里按关键词、request id 搜索命中内容,可选限定某个会话。";
818
+ readonly inputSchema: {
819
+ readonly type: "object";
820
+ readonly properties: {
821
+ readonly query: {
822
+ readonly type: "string";
823
+ readonly description: "搜索关键词,可传标题片段、正文片段或 request id";
824
+ };
825
+ readonly composer_id: {
826
+ readonly type: "string";
827
+ readonly description: "可选,限定某个 Cursor 会话 ID";
828
+ };
829
+ readonly limit: {
830
+ readonly type: "number";
831
+ readonly description: "最多返回多少条,默认 20,最大 200";
832
+ };
833
+ };
834
+ readonly required: readonly ["query"];
835
+ readonly additionalProperties: true;
836
+ };
837
+ } | {
838
+ readonly name: "cursor_read_conversation";
839
+ readonly description: "按 composer_id 读取一条 Cursor 本地会话的消息时间线。";
840
+ readonly inputSchema: {
841
+ readonly type: "object";
842
+ readonly properties: {
843
+ readonly composer_id: {
844
+ readonly type: "string";
845
+ readonly description: "Cursor 会话 ID";
846
+ };
847
+ readonly limit: {
848
+ readonly type: "number";
849
+ readonly description: "最多返回多少条消息,默认 200,最大 2000";
850
+ };
851
+ readonly include_empty: {
852
+ readonly type: "boolean";
853
+ readonly description: "是否包含空文本消息,默认 false";
854
+ };
855
+ };
856
+ readonly required: readonly ["composer_id"];
857
+ readonly additionalProperties: true;
858
+ };
665
859
  })[];
@@ -11,6 +11,7 @@ import { orchestrationToolSchemas } from "./orchestration-tools.js";
11
11
  import { interviewToolSchemas } from "./interview-tools.js";
12
12
  import { uiUxSchemas } from "./ui-ux-schemas.js";
13
13
  import { productDesignSchemas } from "./product-design-schemas.js";
14
+ import { memoryToolSchemas } from "./memory-tools.js";
14
15
  // 合并所有工具 schemas
15
16
  export const allToolSchemas = [
16
17
  ...basicToolSchemas,
@@ -23,4 +24,5 @@ export const allToolSchemas = [
23
24
  ...interviewToolSchemas,
24
25
  ...uiUxSchemas,
25
26
  ...productDesignSchemas,
27
+ ...memoryToolSchemas,
26
28
  ];
@@ -0,0 +1,191 @@
1
+ export declare const memoryToolSchemas: readonly [{
2
+ readonly name: "read_memory_asset";
3
+ readonly description: "当编排阶段已检索到记忆摘要,且 AI 需要查看完整沉淀代码或详细规范时使用。根据 asset_id 读取记忆资产详情。";
4
+ readonly inputSchema: {
5
+ readonly type: "object";
6
+ readonly properties: {
7
+ readonly asset_id: {
8
+ readonly type: "string";
9
+ readonly description: "记忆资产 ID";
10
+ };
11
+ };
12
+ readonly required: readonly ["asset_id"];
13
+ readonly additionalProperties: true;
14
+ };
15
+ }, {
16
+ readonly name: "memorize_asset";
17
+ readonly description: "当 AI 完成开发并确认存在可复用代码、模式或规范时使用。将高价值资产沉淀到记忆系统。";
18
+ readonly inputSchema: {
19
+ readonly type: "object";
20
+ readonly properties: {
21
+ readonly name: {
22
+ readonly type: "string";
23
+ readonly description: "资产名称";
24
+ };
25
+ readonly type: {
26
+ readonly type: "string";
27
+ readonly description: "资产类型,如 code/component/pattern/spec";
28
+ };
29
+ readonly description: {
30
+ readonly type: "string";
31
+ readonly description: "资产描述";
32
+ };
33
+ readonly summary: {
34
+ readonly type: "string";
35
+ readonly description: "用于检索的凝练摘要";
36
+ };
37
+ readonly content: {
38
+ readonly type: "string";
39
+ readonly description: "完整内容";
40
+ };
41
+ readonly code_snippet: {
42
+ readonly type: "string";
43
+ readonly description: "代码片段,content 的别名";
44
+ };
45
+ readonly file_path: {
46
+ readonly type: "string";
47
+ readonly description: "来源文件路径";
48
+ };
49
+ readonly source_project: {
50
+ readonly type: "string";
51
+ readonly description: "来源项目";
52
+ };
53
+ readonly source_path: {
54
+ readonly type: "string";
55
+ readonly description: "来源路径";
56
+ };
57
+ readonly usage: {
58
+ readonly type: "string";
59
+ readonly description: "适用场景/使用方式";
60
+ };
61
+ readonly confidence: {
62
+ readonly type: "number";
63
+ readonly description: "置信度,0-1";
64
+ };
65
+ readonly tags: {
66
+ readonly type: "array";
67
+ readonly items: {
68
+ readonly type: "string";
69
+ };
70
+ readonly description: "标签列表";
71
+ };
72
+ };
73
+ readonly required: readonly ["name", "description", "summary"];
74
+ readonly additionalProperties: true;
75
+ };
76
+ }, {
77
+ readonly name: "scan_and_extract_patterns";
78
+ readonly description: "当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
79
+ readonly inputSchema: {
80
+ readonly type: "object";
81
+ readonly properties: {
82
+ readonly content: {
83
+ readonly type: "string";
84
+ readonly description: "待分析的代码或文本内容。传入该字段时走单段分析模式";
85
+ };
86
+ readonly file_path: {
87
+ readonly type: "string";
88
+ readonly description: "来源文件路径。单段分析时作为来源路径使用";
89
+ };
90
+ readonly project_name: {
91
+ readonly type: "string";
92
+ readonly description: "来源项目名";
93
+ };
94
+ readonly directory_path: {
95
+ readonly type: "string";
96
+ readonly description: "要扫描的目录路径。最佳实践是传相对 `project_root` 的路径,例如 `app/utils`;如果拿不到 `project_root`,才传目录绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。";
97
+ };
98
+ readonly project_root: {
99
+ readonly type: "string";
100
+ readonly description: "项目根目录绝对路径。目录扫描时建议始终传入;传入后,`directory_path` 应写成相对项目根的路径。";
101
+ };
102
+ readonly max_files: {
103
+ readonly type: "number";
104
+ readonly description: "最多扫描多少个文件,默认 30,最大 200";
105
+ };
106
+ readonly max_patterns: {
107
+ readonly type: "number";
108
+ readonly description: "最多返回多少个候选模式,默认 20,最大 100";
109
+ };
110
+ readonly include_extensions: {
111
+ readonly type: "array";
112
+ readonly items: {
113
+ readonly type: "string";
114
+ };
115
+ readonly description: "允许扫描的文件扩展名列表,例如 [\".ts\", \".tsx\", \".py\"]";
116
+ };
117
+ };
118
+ readonly required: readonly [];
119
+ readonly additionalProperties: true;
120
+ };
121
+ }, {
122
+ readonly name: "cursor_list_conversations";
123
+ readonly description: "读取 Cursor 本地历史会话摘要。适合按标题、工作区列出最近会话,用于续接旧上下文。";
124
+ readonly inputSchema: {
125
+ readonly type: "object";
126
+ readonly properties: {
127
+ readonly title_query: {
128
+ readonly type: "string";
129
+ readonly description: "按会话标题过滤,支持部分匹配";
130
+ };
131
+ readonly workspace_query: {
132
+ readonly type: "string";
133
+ readonly description: "按工作区路径过滤,支持部分匹配";
134
+ };
135
+ readonly include_archived: {
136
+ readonly type: "boolean";
137
+ readonly description: "是否包含已归档会话,默认 false";
138
+ };
139
+ readonly limit: {
140
+ readonly type: "number";
141
+ readonly description: "最多返回多少条,默认 20,最大 200";
142
+ };
143
+ };
144
+ readonly required: readonly [];
145
+ readonly additionalProperties: true;
146
+ };
147
+ }, {
148
+ readonly name: "cursor_search_conversations";
149
+ readonly description: "在 Cursor 本地历史消息里按关键词、request id 搜索命中内容,可选限定某个会话。";
150
+ readonly inputSchema: {
151
+ readonly type: "object";
152
+ readonly properties: {
153
+ readonly query: {
154
+ readonly type: "string";
155
+ readonly description: "搜索关键词,可传标题片段、正文片段或 request id";
156
+ };
157
+ readonly composer_id: {
158
+ readonly type: "string";
159
+ readonly description: "可选,限定某个 Cursor 会话 ID";
160
+ };
161
+ readonly limit: {
162
+ readonly type: "number";
163
+ readonly description: "最多返回多少条,默认 20,最大 200";
164
+ };
165
+ };
166
+ readonly required: readonly ["query"];
167
+ readonly additionalProperties: true;
168
+ };
169
+ }, {
170
+ readonly name: "cursor_read_conversation";
171
+ readonly description: "按 composer_id 读取一条 Cursor 本地会话的消息时间线。";
172
+ readonly inputSchema: {
173
+ readonly type: "object";
174
+ readonly properties: {
175
+ readonly composer_id: {
176
+ readonly type: "string";
177
+ readonly description: "Cursor 会话 ID";
178
+ };
179
+ readonly limit: {
180
+ readonly type: "number";
181
+ readonly description: "最多返回多少条消息,默认 200,最大 2000";
182
+ };
183
+ readonly include_empty: {
184
+ readonly type: "boolean";
185
+ readonly description: "是否包含空文本消息,默认 false";
186
+ };
187
+ };
188
+ readonly required: readonly ["composer_id"];
189
+ readonly additionalProperties: true;
190
+ };
191
+ }];
@@ -0,0 +1,106 @@
1
+ export const memoryToolSchemas = [
2
+ {
3
+ name: 'read_memory_asset',
4
+ description: '当编排阶段已检索到记忆摘要,且 AI 需要查看完整沉淀代码或详细规范时使用。根据 asset_id 读取记忆资产详情。',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ asset_id: {
9
+ type: 'string',
10
+ description: '记忆资产 ID',
11
+ },
12
+ },
13
+ required: ['asset_id'],
14
+ additionalProperties: true,
15
+ },
16
+ },
17
+ {
18
+ name: 'memorize_asset',
19
+ description: '当 AI 完成开发并确认存在可复用代码、模式或规范时使用。将高价值资产沉淀到记忆系统。',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ name: { type: 'string', description: '资产名称' },
24
+ type: { type: 'string', description: '资产类型,如 code/component/pattern/spec' },
25
+ description: { type: 'string', description: '资产描述' },
26
+ summary: { type: 'string', description: '用于检索的凝练摘要' },
27
+ content: { type: 'string', description: '完整内容' },
28
+ code_snippet: { type: 'string', description: '代码片段,content 的别名' },
29
+ file_path: { type: 'string', description: '来源文件路径' },
30
+ source_project: { type: 'string', description: '来源项目' },
31
+ source_path: { type: 'string', description: '来源路径' },
32
+ usage: { type: 'string', description: '适用场景/使用方式' },
33
+ confidence: { type: 'number', description: '置信度,0-1' },
34
+ tags: { type: 'array', items: { type: 'string' }, description: '标签列表' },
35
+ },
36
+ required: ['name', 'description', 'summary'],
37
+ additionalProperties: true,
38
+ },
39
+ },
40
+ {
41
+ name: 'scan_and_extract_patterns',
42
+ description: '当需要从单段代码、单文件或整个目录中抽取可复用模式,再决定是否沉淀到记忆系统时使用。目录扫描时,优先传 `project_root` 为项目根目录绝对路径,并让 `directory_path` 传相对项目根的路径,例如 `app/utils`;只有无法确定项目根时,才把 `directory_path` 直接设为绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。',
43
+ inputSchema: {
44
+ type: 'object',
45
+ properties: {
46
+ content: { type: 'string', description: '待分析的代码或文本内容。传入该字段时走单段分析模式' },
47
+ file_path: { type: 'string', description: '来源文件路径。单段分析时作为来源路径使用' },
48
+ project_name: { type: 'string', description: '来源项目名' },
49
+ directory_path: { type: 'string', description: '要扫描的目录路径。最佳实践是传相对 `project_root` 的路径,例如 `app/utils`;如果拿不到 `project_root`,才传目录绝对路径。不要传带项目名的半相对路径,例如 `font-miniapp-api/app/utils`。' },
50
+ project_root: { type: 'string', description: '项目根目录绝对路径。目录扫描时建议始终传入;传入后,`directory_path` 应写成相对项目根的路径。' },
51
+ max_files: { type: 'number', description: '最多扫描多少个文件,默认 30,最大 200' },
52
+ max_patterns: { type: 'number', description: '最多返回多少个候选模式,默认 20,最大 100' },
53
+ include_extensions: {
54
+ type: 'array',
55
+ items: { type: 'string' },
56
+ description: '允许扫描的文件扩展名列表,例如 [".ts", ".tsx", ".py"]'
57
+ },
58
+ },
59
+ required: [],
60
+ additionalProperties: true,
61
+ },
62
+ },
63
+ {
64
+ name: 'cursor_list_conversations',
65
+ description: '读取 Cursor 本地历史会话摘要。适合按标题、工作区列出最近会话,用于续接旧上下文。',
66
+ inputSchema: {
67
+ type: 'object',
68
+ properties: {
69
+ title_query: { type: 'string', description: '按会话标题过滤,支持部分匹配' },
70
+ workspace_query: { type: 'string', description: '按工作区路径过滤,支持部分匹配' },
71
+ include_archived: { type: 'boolean', description: '是否包含已归档会话,默认 false' },
72
+ limit: { type: 'number', description: '最多返回多少条,默认 20,最大 200' },
73
+ },
74
+ required: [],
75
+ additionalProperties: true,
76
+ },
77
+ },
78
+ {
79
+ name: 'cursor_search_conversations',
80
+ description: '在 Cursor 本地历史消息里按关键词、request id 搜索命中内容,可选限定某个会话。',
81
+ inputSchema: {
82
+ type: 'object',
83
+ properties: {
84
+ query: { type: 'string', description: '搜索关键词,可传标题片段、正文片段或 request id' },
85
+ composer_id: { type: 'string', description: '可选,限定某个 Cursor 会话 ID' },
86
+ limit: { type: 'number', description: '最多返回多少条,默认 20,最大 200' },
87
+ },
88
+ required: ['query'],
89
+ additionalProperties: true,
90
+ },
91
+ },
92
+ {
93
+ name: 'cursor_read_conversation',
94
+ description: '按 composer_id 读取一条 Cursor 本地会话的消息时间线。',
95
+ inputSchema: {
96
+ type: 'object',
97
+ properties: {
98
+ composer_id: { type: 'string', description: 'Cursor 会话 ID' },
99
+ limit: { type: 'number', description: '最多返回多少条消息,默认 200,最大 2000' },
100
+ include_empty: { type: 'boolean', description: '是否包含空文本消息,默认 false' },
101
+ },
102
+ required: ['composer_id'],
103
+ additionalProperties: true,
104
+ },
105
+ },
106
+ ];
@@ -21,7 +21,7 @@ export declare const orchestrationToolSchemas: readonly [{
21
21
  };
22
22
  readonly project_root: {
23
23
  readonly type: "string";
24
- readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
24
+ readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd";
25
25
  };
26
26
  readonly template_profile: {
27
27
  readonly type: "string";
@@ -67,7 +67,7 @@ export declare const orchestrationToolSchemas: readonly [{
67
67
  };
68
68
  readonly project_root: {
69
69
  readonly type: "string";
70
- readonly description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定";
70
+ readonly description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd";
71
71
  };
72
72
  readonly analysis_mode: {
73
73
  readonly type: "string";
@@ -105,7 +105,7 @@ export declare const orchestrationToolSchemas: readonly [{
105
105
  readonly properties: {
106
106
  readonly project_path: {
107
107
  readonly type: "string";
108
- readonly description: "项目路径。可选,默认当前目录";
108
+ readonly description: "项目根目录绝对路径。建议显式传入;如果还传 docs_dir 等相对路径,应统一相对该项目根目录解析。";
109
109
  };
110
110
  readonly docs_dir: {
111
111
  readonly type: "string";
@@ -22,7 +22,7 @@ export const orchestrationToolSchemas = [
22
22
  },
23
23
  project_root: {
24
24
  type: "string",
25
- description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定",
25
+ description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd",
26
26
  },
27
27
  template_profile: {
28
28
  type: "string",
@@ -69,7 +69,7 @@ export const orchestrationToolSchemas = [
69
69
  },
70
70
  project_root: {
71
71
  type: "string",
72
- description: "项目根目录。当前客户端未把工作区作为进程 cwd 传进来时,建议显式指定",
72
+ description: "项目根目录绝对路径。建议显式传入;docs_dir 等相对路径参数应统一相对该项目根目录解析,避免依赖客户端 cwd",
73
73
  },
74
74
  analysis_mode: {
75
75
  type: "string",
@@ -108,7 +108,7 @@ export const orchestrationToolSchemas = [
108
108
  properties: {
109
109
  project_path: {
110
110
  type: "string",
111
- description: "项目路径。可选,默认当前目录",
111
+ description: "项目根目录绝对路径。建议显式传入;如果还传 docs_dir 等相对路径,应统一相对该项目根目录解析。",
112
112
  },
113
113
  docs_dir: {
114
114
  type: "string",
@@ -105,6 +105,10 @@ export declare const startUiSchema: {
105
105
  type: string;
106
106
  description: string;
107
107
  };
108
+ project_root: {
109
+ type: string;
110
+ description: string;
111
+ };
108
112
  template_profile: {
109
113
  type: string;
110
114
  description: string;
@@ -236,6 +240,10 @@ export declare const uiUxSchemas: ({
236
240
  type: string;
237
241
  description: string;
238
242
  };
243
+ project_root: {
244
+ type: string;
245
+ description: string;
246
+ };
239
247
  template_profile: {
240
248
  type: string;
241
249
  description: string;
@@ -105,6 +105,10 @@ export const startUiSchema = {
105
105
  type: "string",
106
106
  description: "模板名称(可选,不提供则自动生成)",
107
107
  },
108
+ project_root: {
109
+ type: "string",
110
+ description: "项目根目录绝对路径。建议显式传入;如果存在 docs 或模板等相对路径解析,应统一相对该项目根目录处理,避免依赖客户端 cwd。",
111
+ },
108
112
  template_profile: {
109
113
  type: "string",
110
114
  description: "模板档位:auto(默认,自动选择 guided/strict)、guided(普通模型友好)或 strict(结构更紧凑)",