@mclawnet/mcp-server 0.1.5 → 0.1.6
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/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/index.d.ts +209 -209
- package/dist/tools/memory.d.ts +28 -18
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/memory.js +80 -40
- package/dist/tools/memory.js.map +1 -1
- package/package.json +5 -5
package/dist/server.js
CHANGED
|
@@ -26,7 +26,7 @@ const embeddingService = new EmbeddingService(db, providers);
|
|
|
26
26
|
const skillStore = new SkillStore(clawnetDir);
|
|
27
27
|
const evolutionPipeline = new EvolutionPipeline(clawnetDir);
|
|
28
28
|
const context = {
|
|
29
|
-
memory: { store, embeddingService },
|
|
29
|
+
memory: { store, embeddingService, workDir: process.cwd() },
|
|
30
30
|
skill: { store: skillStore },
|
|
31
31
|
evolution: { pipeline: evolutionPipeline },
|
|
32
32
|
task: { rootDir: homeDir },
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,qB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AAI,CAAC,kCAAkC,CAAC,CAAC;IAC7C,IAAI,CAAC;QACH,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;IAAC,MAAM,CAAC;QACP,SAAS;IACX,CAAC;AACH,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC5B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,EAAE,CAAC;IACV,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,OAAO,EAAE,CAAC;IACV,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -15,6 +15,215 @@ export interface ToolContext {
|
|
|
15
15
|
planReview: PlanReviewToolContext;
|
|
16
16
|
}
|
|
17
17
|
export declare function getAllToolDefinitions(): ({
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object";
|
|
22
|
+
properties: {
|
|
23
|
+
query: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
domain: {
|
|
28
|
+
type: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
limit: {
|
|
32
|
+
type: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
crossWorkdir: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
workDir: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
content?: undefined;
|
|
44
|
+
type?: undefined;
|
|
45
|
+
tags?: undefined;
|
|
46
|
+
importance?: undefined;
|
|
47
|
+
scope?: undefined;
|
|
48
|
+
};
|
|
49
|
+
required: string[];
|
|
50
|
+
};
|
|
51
|
+
} | {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: "object";
|
|
56
|
+
properties: {
|
|
57
|
+
content: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
type: {
|
|
62
|
+
type: string;
|
|
63
|
+
enum: string[];
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
tags: {
|
|
67
|
+
type: string;
|
|
68
|
+
items: {
|
|
69
|
+
type: string;
|
|
70
|
+
};
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
domain: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
importance: {
|
|
78
|
+
type: string;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
workDir: {
|
|
82
|
+
type: string;
|
|
83
|
+
description: string;
|
|
84
|
+
};
|
|
85
|
+
query?: undefined;
|
|
86
|
+
limit?: undefined;
|
|
87
|
+
crossWorkdir?: undefined;
|
|
88
|
+
scope?: undefined;
|
|
89
|
+
};
|
|
90
|
+
required: string[];
|
|
91
|
+
};
|
|
92
|
+
} | {
|
|
93
|
+
name: string;
|
|
94
|
+
description: string;
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: "object";
|
|
97
|
+
properties: {
|
|
98
|
+
workDir: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
query?: undefined;
|
|
103
|
+
domain?: undefined;
|
|
104
|
+
limit?: undefined;
|
|
105
|
+
crossWorkdir?: undefined;
|
|
106
|
+
content?: undefined;
|
|
107
|
+
type?: undefined;
|
|
108
|
+
tags?: undefined;
|
|
109
|
+
importance?: undefined;
|
|
110
|
+
scope?: undefined;
|
|
111
|
+
};
|
|
112
|
+
required?: undefined;
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
name: string;
|
|
116
|
+
description: string;
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: "object";
|
|
119
|
+
properties: {
|
|
120
|
+
scope: {
|
|
121
|
+
type: string;
|
|
122
|
+
enum: string[];
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
workDir: {
|
|
126
|
+
type: string;
|
|
127
|
+
description: string;
|
|
128
|
+
};
|
|
129
|
+
query?: undefined;
|
|
130
|
+
domain?: undefined;
|
|
131
|
+
limit?: undefined;
|
|
132
|
+
crossWorkdir?: undefined;
|
|
133
|
+
content?: undefined;
|
|
134
|
+
type?: undefined;
|
|
135
|
+
tags?: undefined;
|
|
136
|
+
importance?: undefined;
|
|
137
|
+
};
|
|
138
|
+
required?: undefined;
|
|
139
|
+
};
|
|
140
|
+
} | {
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: "object";
|
|
145
|
+
properties: {
|
|
146
|
+
name?: undefined;
|
|
147
|
+
};
|
|
148
|
+
required?: undefined;
|
|
149
|
+
};
|
|
150
|
+
} | {
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: "object";
|
|
155
|
+
properties: {
|
|
156
|
+
name: {
|
|
157
|
+
type: string;
|
|
158
|
+
description: string;
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
required: string[];
|
|
162
|
+
};
|
|
163
|
+
} | {
|
|
164
|
+
name: string;
|
|
165
|
+
description: string;
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: "object";
|
|
168
|
+
properties: {
|
|
169
|
+
skillName: {
|
|
170
|
+
type: string;
|
|
171
|
+
description: string;
|
|
172
|
+
};
|
|
173
|
+
signal: {
|
|
174
|
+
type: string;
|
|
175
|
+
enum: string[];
|
|
176
|
+
};
|
|
177
|
+
problem: {
|
|
178
|
+
type: string;
|
|
179
|
+
description: string;
|
|
180
|
+
};
|
|
181
|
+
fix: {
|
|
182
|
+
type: string;
|
|
183
|
+
description: string;
|
|
184
|
+
};
|
|
185
|
+
patch: {
|
|
186
|
+
type: string;
|
|
187
|
+
description: string;
|
|
188
|
+
};
|
|
189
|
+
id?: undefined;
|
|
190
|
+
};
|
|
191
|
+
required: string[];
|
|
192
|
+
};
|
|
193
|
+
} | {
|
|
194
|
+
name: string;
|
|
195
|
+
description: string;
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: "object";
|
|
198
|
+
properties: {
|
|
199
|
+
skillName?: undefined;
|
|
200
|
+
signal?: undefined;
|
|
201
|
+
problem?: undefined;
|
|
202
|
+
fix?: undefined;
|
|
203
|
+
patch?: undefined;
|
|
204
|
+
id?: undefined;
|
|
205
|
+
};
|
|
206
|
+
required?: undefined;
|
|
207
|
+
};
|
|
208
|
+
} | {
|
|
209
|
+
name: string;
|
|
210
|
+
description: string;
|
|
211
|
+
inputSchema: {
|
|
212
|
+
type: "object";
|
|
213
|
+
properties: {
|
|
214
|
+
id: {
|
|
215
|
+
type: string;
|
|
216
|
+
description: string;
|
|
217
|
+
};
|
|
218
|
+
skillName?: undefined;
|
|
219
|
+
signal?: undefined;
|
|
220
|
+
problem?: undefined;
|
|
221
|
+
fix?: undefined;
|
|
222
|
+
patch?: undefined;
|
|
223
|
+
};
|
|
224
|
+
required: string[];
|
|
225
|
+
};
|
|
226
|
+
} | {
|
|
18
227
|
name: string;
|
|
19
228
|
description: string;
|
|
20
229
|
inputSchema: {
|
|
@@ -589,215 +798,6 @@ export declare function getAllToolDefinitions(): ({
|
|
|
589
798
|
};
|
|
590
799
|
required: string[];
|
|
591
800
|
};
|
|
592
|
-
} | {
|
|
593
|
-
name: string;
|
|
594
|
-
description: string;
|
|
595
|
-
inputSchema: {
|
|
596
|
-
type: "object";
|
|
597
|
-
properties: {
|
|
598
|
-
roleId: {
|
|
599
|
-
type: string;
|
|
600
|
-
description: string;
|
|
601
|
-
};
|
|
602
|
-
query: {
|
|
603
|
-
type: string;
|
|
604
|
-
description: string;
|
|
605
|
-
};
|
|
606
|
-
domain: {
|
|
607
|
-
type: string;
|
|
608
|
-
description: string;
|
|
609
|
-
};
|
|
610
|
-
limit: {
|
|
611
|
-
type: string;
|
|
612
|
-
description: string;
|
|
613
|
-
};
|
|
614
|
-
crossRole: {
|
|
615
|
-
type: string;
|
|
616
|
-
description: string;
|
|
617
|
-
};
|
|
618
|
-
content?: undefined;
|
|
619
|
-
type?: undefined;
|
|
620
|
-
tags?: undefined;
|
|
621
|
-
importance?: undefined;
|
|
622
|
-
scope?: undefined;
|
|
623
|
-
};
|
|
624
|
-
required: string[];
|
|
625
|
-
};
|
|
626
|
-
} | {
|
|
627
|
-
name: string;
|
|
628
|
-
description: string;
|
|
629
|
-
inputSchema: {
|
|
630
|
-
type: "object";
|
|
631
|
-
properties: {
|
|
632
|
-
roleId: {
|
|
633
|
-
type: string;
|
|
634
|
-
description: string;
|
|
635
|
-
};
|
|
636
|
-
content: {
|
|
637
|
-
type: string;
|
|
638
|
-
description: string;
|
|
639
|
-
};
|
|
640
|
-
type: {
|
|
641
|
-
type: string;
|
|
642
|
-
enum: string[];
|
|
643
|
-
description: string;
|
|
644
|
-
};
|
|
645
|
-
tags: {
|
|
646
|
-
type: string;
|
|
647
|
-
items: {
|
|
648
|
-
type: string;
|
|
649
|
-
};
|
|
650
|
-
description: string;
|
|
651
|
-
};
|
|
652
|
-
domain: {
|
|
653
|
-
type: string;
|
|
654
|
-
description: string;
|
|
655
|
-
};
|
|
656
|
-
importance: {
|
|
657
|
-
type: string;
|
|
658
|
-
description: string;
|
|
659
|
-
};
|
|
660
|
-
query?: undefined;
|
|
661
|
-
limit?: undefined;
|
|
662
|
-
crossRole?: undefined;
|
|
663
|
-
scope?: undefined;
|
|
664
|
-
};
|
|
665
|
-
required: string[];
|
|
666
|
-
};
|
|
667
|
-
} | {
|
|
668
|
-
name: string;
|
|
669
|
-
description: string;
|
|
670
|
-
inputSchema: {
|
|
671
|
-
type: "object";
|
|
672
|
-
properties: {
|
|
673
|
-
roleId: {
|
|
674
|
-
type: string;
|
|
675
|
-
description: string;
|
|
676
|
-
};
|
|
677
|
-
query?: undefined;
|
|
678
|
-
domain?: undefined;
|
|
679
|
-
limit?: undefined;
|
|
680
|
-
crossRole?: undefined;
|
|
681
|
-
content?: undefined;
|
|
682
|
-
type?: undefined;
|
|
683
|
-
tags?: undefined;
|
|
684
|
-
importance?: undefined;
|
|
685
|
-
scope?: undefined;
|
|
686
|
-
};
|
|
687
|
-
required: string[];
|
|
688
|
-
};
|
|
689
|
-
} | {
|
|
690
|
-
name: string;
|
|
691
|
-
description: string;
|
|
692
|
-
inputSchema: {
|
|
693
|
-
type: "object";
|
|
694
|
-
properties: {
|
|
695
|
-
roleId: {
|
|
696
|
-
type: string;
|
|
697
|
-
description: string;
|
|
698
|
-
};
|
|
699
|
-
scope: {
|
|
700
|
-
type: string;
|
|
701
|
-
enum: string[];
|
|
702
|
-
description: string;
|
|
703
|
-
};
|
|
704
|
-
query?: undefined;
|
|
705
|
-
domain?: undefined;
|
|
706
|
-
limit?: undefined;
|
|
707
|
-
crossRole?: undefined;
|
|
708
|
-
content?: undefined;
|
|
709
|
-
type?: undefined;
|
|
710
|
-
tags?: undefined;
|
|
711
|
-
importance?: undefined;
|
|
712
|
-
};
|
|
713
|
-
required: string[];
|
|
714
|
-
};
|
|
715
|
-
} | {
|
|
716
|
-
name: string;
|
|
717
|
-
description: string;
|
|
718
|
-
inputSchema: {
|
|
719
|
-
type: "object";
|
|
720
|
-
properties: {
|
|
721
|
-
name?: undefined;
|
|
722
|
-
};
|
|
723
|
-
required?: undefined;
|
|
724
|
-
};
|
|
725
|
-
} | {
|
|
726
|
-
name: string;
|
|
727
|
-
description: string;
|
|
728
|
-
inputSchema: {
|
|
729
|
-
type: "object";
|
|
730
|
-
properties: {
|
|
731
|
-
name: {
|
|
732
|
-
type: string;
|
|
733
|
-
description: string;
|
|
734
|
-
};
|
|
735
|
-
};
|
|
736
|
-
required: string[];
|
|
737
|
-
};
|
|
738
|
-
} | {
|
|
739
|
-
name: string;
|
|
740
|
-
description: string;
|
|
741
|
-
inputSchema: {
|
|
742
|
-
type: "object";
|
|
743
|
-
properties: {
|
|
744
|
-
skillName: {
|
|
745
|
-
type: string;
|
|
746
|
-
description: string;
|
|
747
|
-
};
|
|
748
|
-
signal: {
|
|
749
|
-
type: string;
|
|
750
|
-
enum: string[];
|
|
751
|
-
};
|
|
752
|
-
problem: {
|
|
753
|
-
type: string;
|
|
754
|
-
description: string;
|
|
755
|
-
};
|
|
756
|
-
fix: {
|
|
757
|
-
type: string;
|
|
758
|
-
description: string;
|
|
759
|
-
};
|
|
760
|
-
patch: {
|
|
761
|
-
type: string;
|
|
762
|
-
description: string;
|
|
763
|
-
};
|
|
764
|
-
id?: undefined;
|
|
765
|
-
};
|
|
766
|
-
required: string[];
|
|
767
|
-
};
|
|
768
|
-
} | {
|
|
769
|
-
name: string;
|
|
770
|
-
description: string;
|
|
771
|
-
inputSchema: {
|
|
772
|
-
type: "object";
|
|
773
|
-
properties: {
|
|
774
|
-
skillName?: undefined;
|
|
775
|
-
signal?: undefined;
|
|
776
|
-
problem?: undefined;
|
|
777
|
-
fix?: undefined;
|
|
778
|
-
patch?: undefined;
|
|
779
|
-
id?: undefined;
|
|
780
|
-
};
|
|
781
|
-
required?: undefined;
|
|
782
|
-
};
|
|
783
|
-
} | {
|
|
784
|
-
name: string;
|
|
785
|
-
description: string;
|
|
786
|
-
inputSchema: {
|
|
787
|
-
type: "object";
|
|
788
|
-
properties: {
|
|
789
|
-
id: {
|
|
790
|
-
type: string;
|
|
791
|
-
description: string;
|
|
792
|
-
};
|
|
793
|
-
skillName?: undefined;
|
|
794
|
-
signal?: undefined;
|
|
795
|
-
problem?: undefined;
|
|
796
|
-
fix?: undefined;
|
|
797
|
-
patch?: undefined;
|
|
798
|
-
};
|
|
799
|
-
required: string[];
|
|
800
|
-
};
|
|
801
801
|
})[];
|
|
802
802
|
export declare function routeToolCall(name: string, args: Record<string, unknown>, context: ToolContext): Promise<{
|
|
803
803
|
content: Array<{
|
package/dist/tools/memory.d.ts
CHANGED
|
@@ -2,6 +2,16 @@ import { type EmbeddingService, type MemoryStore } from "@mclawnet/memory";
|
|
|
2
2
|
export interface MemoryToolContext {
|
|
3
3
|
store: MemoryStore;
|
|
4
4
|
embeddingService: EmbeddingService;
|
|
5
|
+
/**
|
|
6
|
+
* Default working directory for this server instance — used when the caller
|
|
7
|
+
* doesn't pass `workDir` in the request args. Acts as a fallback only; the
|
|
8
|
+
* authoritative value is the request-supplied `workDir` so a single stdio
|
|
9
|
+
* server can be shared across multiple sessions / swarm instances without
|
|
10
|
+
* leaking memory between projects.
|
|
11
|
+
*/
|
|
12
|
+
workDir: string;
|
|
13
|
+
/** Optional role hint stored alongside the memory for legacy compatibility. */
|
|
14
|
+
roleId?: string;
|
|
5
15
|
}
|
|
6
16
|
export declare function getMemoryToolDefinitions(): ({
|
|
7
17
|
name: string;
|
|
@@ -9,10 +19,6 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
9
19
|
inputSchema: {
|
|
10
20
|
type: "object";
|
|
11
21
|
properties: {
|
|
12
|
-
roleId: {
|
|
13
|
-
type: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
22
|
query: {
|
|
17
23
|
type: string;
|
|
18
24
|
description: string;
|
|
@@ -25,7 +31,11 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
25
31
|
type: string;
|
|
26
32
|
description: string;
|
|
27
33
|
};
|
|
28
|
-
|
|
34
|
+
crossWorkdir: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
workDir: {
|
|
29
39
|
type: string;
|
|
30
40
|
description: string;
|
|
31
41
|
};
|
|
@@ -43,10 +53,6 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
43
53
|
inputSchema: {
|
|
44
54
|
type: "object";
|
|
45
55
|
properties: {
|
|
46
|
-
roleId: {
|
|
47
|
-
type: string;
|
|
48
|
-
description: string;
|
|
49
|
-
};
|
|
50
56
|
content: {
|
|
51
57
|
type: string;
|
|
52
58
|
description: string;
|
|
@@ -71,9 +77,13 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
71
77
|
type: string;
|
|
72
78
|
description: string;
|
|
73
79
|
};
|
|
80
|
+
workDir: {
|
|
81
|
+
type: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
74
84
|
query?: undefined;
|
|
75
85
|
limit?: undefined;
|
|
76
|
-
|
|
86
|
+
crossWorkdir?: undefined;
|
|
77
87
|
scope?: undefined;
|
|
78
88
|
};
|
|
79
89
|
required: string[];
|
|
@@ -84,21 +94,21 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
84
94
|
inputSchema: {
|
|
85
95
|
type: "object";
|
|
86
96
|
properties: {
|
|
87
|
-
|
|
97
|
+
workDir: {
|
|
88
98
|
type: string;
|
|
89
99
|
description: string;
|
|
90
100
|
};
|
|
91
101
|
query?: undefined;
|
|
92
102
|
domain?: undefined;
|
|
93
103
|
limit?: undefined;
|
|
94
|
-
|
|
104
|
+
crossWorkdir?: undefined;
|
|
95
105
|
content?: undefined;
|
|
96
106
|
type?: undefined;
|
|
97
107
|
tags?: undefined;
|
|
98
108
|
importance?: undefined;
|
|
99
109
|
scope?: undefined;
|
|
100
110
|
};
|
|
101
|
-
required
|
|
111
|
+
required?: undefined;
|
|
102
112
|
};
|
|
103
113
|
} | {
|
|
104
114
|
name: string;
|
|
@@ -106,25 +116,25 @@ export declare function getMemoryToolDefinitions(): ({
|
|
|
106
116
|
inputSchema: {
|
|
107
117
|
type: "object";
|
|
108
118
|
properties: {
|
|
109
|
-
|
|
119
|
+
scope: {
|
|
110
120
|
type: string;
|
|
121
|
+
enum: string[];
|
|
111
122
|
description: string;
|
|
112
123
|
};
|
|
113
|
-
|
|
124
|
+
workDir: {
|
|
114
125
|
type: string;
|
|
115
|
-
enum: string[];
|
|
116
126
|
description: string;
|
|
117
127
|
};
|
|
118
128
|
query?: undefined;
|
|
119
129
|
domain?: undefined;
|
|
120
130
|
limit?: undefined;
|
|
121
|
-
|
|
131
|
+
crossWorkdir?: undefined;
|
|
122
132
|
content?: undefined;
|
|
123
133
|
type?: undefined;
|
|
124
134
|
tags?: undefined;
|
|
125
135
|
importance?: undefined;
|
|
126
136
|
};
|
|
127
|
-
required
|
|
137
|
+
required?: undefined;
|
|
128
138
|
};
|
|
129
139
|
})[];
|
|
130
140
|
export declare function handleMemoryToolCall(name: string, args: Record<string, unknown>, context: MemoryToolContext): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAC;AAI1B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,WAAW,CAAC;IACnB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAkBD,wBAAgB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsFvC;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA0BhF"}
|
package/dist/tools/memory.js
CHANGED
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
import { createLogger } from "@mclawnet/logger";
|
|
2
|
-
import { EWCGuard, pruneMemories, recalculateAllImportance, storeWithFusion, } from "@mclawnet/memory";
|
|
2
|
+
import { DEFAULT_ASSISTANT_ROLE_ID, EWCGuard, pruneMemories, recalculateAllImportance, storeWithFusion, } from "@mclawnet/memory";
|
|
3
3
|
const log = createLogger({ module: "mcp-server/tools/memory" });
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the effective workDir for a request: prefer the caller-supplied
|
|
6
|
+
* `workDir` arg, else fall back to the server default (ToolContext.workDir
|
|
7
|
+
* which itself is initialised from process.cwd() at startup). This is the
|
|
8
|
+
* single chokepoint that lets a shared stdio server serve multiple workDirs.
|
|
9
|
+
*/
|
|
10
|
+
function resolveWorkDir(args, context) {
|
|
11
|
+
const requested = typeof args.workDir === "string" && args.workDir.length > 0
|
|
12
|
+
? args.workDir
|
|
13
|
+
: undefined;
|
|
14
|
+
return requested ?? context.workDir;
|
|
15
|
+
}
|
|
4
16
|
export function getMemoryToolDefinitions() {
|
|
5
17
|
return [
|
|
6
18
|
{
|
|
7
19
|
name: "memory_search",
|
|
8
|
-
description: "Search
|
|
20
|
+
description: "Search memories by semantic similarity, scoped to the current working directory. Returns the most relevant past experiences, patterns, and lessons.",
|
|
9
21
|
inputSchema: {
|
|
10
22
|
type: "object",
|
|
11
23
|
properties: {
|
|
12
|
-
roleId: { type: "string", description: "Role ID for memory scope" },
|
|
13
24
|
query: { type: "string", description: "Natural language search query" },
|
|
14
25
|
domain: { type: "string", description: "Filter by domain label" },
|
|
15
26
|
limit: { type: "number", description: "Max results to return (default 5)" },
|
|
16
|
-
|
|
27
|
+
crossWorkdir: {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "Search across all working directories (ignore workdir filter)",
|
|
30
|
+
},
|
|
31
|
+
workDir: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Override working-directory scope for this call (defaults to the server's process.cwd()).",
|
|
34
|
+
},
|
|
17
35
|
},
|
|
18
|
-
required: ["
|
|
36
|
+
required: ["query"],
|
|
19
37
|
},
|
|
20
38
|
},
|
|
21
39
|
{
|
|
22
40
|
name: "memory_store",
|
|
23
|
-
description: "Store a new memory entry
|
|
41
|
+
description: "Store a new memory entry scoped to the current working directory. Use this to persist valuable experiences, patterns, error lessons, or preferences.",
|
|
24
42
|
inputSchema: {
|
|
25
43
|
type: "object",
|
|
26
44
|
properties: {
|
|
27
|
-
roleId: { type: "string", description: "Role ID for memory scope" },
|
|
28
45
|
content: { type: "string", description: "Memory content in natural language" },
|
|
29
46
|
type: {
|
|
30
47
|
type: "string",
|
|
@@ -37,23 +54,26 @@ export function getMemoryToolDefinitions() {
|
|
|
37
54
|
description: "Tags for categorisation",
|
|
38
55
|
},
|
|
39
56
|
domain: { type: "string", description: "Domain label (e.g. 'frontend', 'backend')" },
|
|
40
|
-
importance: {
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
importance: { type: "number", description: "Importance score 0-1 (default 0.5)" },
|
|
58
|
+
workDir: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "Override working-directory scope for this call (defaults to the server's process.cwd()).",
|
|
43
61
|
},
|
|
44
62
|
},
|
|
45
|
-
required: ["
|
|
63
|
+
required: ["content", "type"],
|
|
46
64
|
},
|
|
47
65
|
},
|
|
48
66
|
{
|
|
49
67
|
name: "memory_stats",
|
|
50
|
-
description: "Get memory statistics for the
|
|
68
|
+
description: "Get memory statistics for the current working directory: total count, breakdown by type/status, top domains.",
|
|
51
69
|
inputSchema: {
|
|
52
70
|
type: "object",
|
|
53
71
|
properties: {
|
|
54
|
-
|
|
72
|
+
workDir: {
|
|
73
|
+
type: "string",
|
|
74
|
+
description: "Override working-directory scope for this call (defaults to the server's process.cwd()).",
|
|
75
|
+
},
|
|
55
76
|
},
|
|
56
|
-
required: ["roleId"],
|
|
57
77
|
},
|
|
58
78
|
},
|
|
59
79
|
{
|
|
@@ -62,22 +82,23 @@ export function getMemoryToolDefinitions() {
|
|
|
62
82
|
inputSchema: {
|
|
63
83
|
type: "object",
|
|
64
84
|
properties: {
|
|
65
|
-
roleId: { type: "string", description: "Role ID for memory scope" },
|
|
66
85
|
scope: {
|
|
67
86
|
type: "string",
|
|
68
87
|
enum: ["light", "full"],
|
|
69
88
|
description: "Reflection depth: light (quick) or full (thorough)",
|
|
70
89
|
},
|
|
90
|
+
workDir: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Override working-directory scope for this call (defaults to the server's process.cwd()).",
|
|
93
|
+
},
|
|
71
94
|
},
|
|
72
|
-
required: ["roleId"],
|
|
73
95
|
},
|
|
74
96
|
},
|
|
75
97
|
];
|
|
76
98
|
}
|
|
77
99
|
export async function handleMemoryToolCall(name, args, context) {
|
|
78
100
|
try {
|
|
79
|
-
|
|
80
|
-
log.info({ tool: name, roleId }, "MCP tool called");
|
|
101
|
+
log.info({ tool: name, workDir: context.workDir }, "MCP tool called");
|
|
81
102
|
switch (name) {
|
|
82
103
|
case "memory_search":
|
|
83
104
|
return await handleMemorySearch(args, context);
|
|
@@ -105,51 +126,60 @@ export async function handleMemoryToolCall(name, args, context) {
|
|
|
105
126
|
}
|
|
106
127
|
async function handleMemorySearch(args, context) {
|
|
107
128
|
const query = args.query;
|
|
108
|
-
const
|
|
109
|
-
const roleId = crossRole ? undefined : args.roleId;
|
|
129
|
+
const crossWorkdir = args.crossWorkdir;
|
|
110
130
|
const domain = args.domain;
|
|
111
131
|
const limit = args.limit ?? 5;
|
|
132
|
+
const workDir = resolveWorkDir(args, context);
|
|
112
133
|
const queryEmbedding = await context.embeddingService.embed(query);
|
|
113
134
|
const results = context.store.searchMemories(queryEmbedding, {
|
|
114
|
-
roleId,
|
|
115
135
|
domain,
|
|
116
136
|
limit,
|
|
117
|
-
|
|
137
|
+
workdir: workDir,
|
|
138
|
+
crossWorkdir,
|
|
118
139
|
});
|
|
119
140
|
const serialisable = results.map((m) => ({
|
|
120
141
|
id: m.id,
|
|
121
142
|
roleId: m.roleId,
|
|
122
143
|
content: m.content,
|
|
123
144
|
type: m.type,
|
|
124
|
-
|
|
145
|
+
status: m.status,
|
|
146
|
+
workdir: m.workdir,
|
|
125
147
|
tags: m.tags,
|
|
126
148
|
domain: m.domain,
|
|
127
149
|
importance: m.importance,
|
|
128
150
|
accessCount: m.accessCount,
|
|
129
151
|
createdAt: m.createdAt,
|
|
130
152
|
}));
|
|
131
|
-
log.info({ query,
|
|
153
|
+
log.info({ query, workDir, crossWorkdir, resultCount: serialisable.length }, "memory_search completed");
|
|
132
154
|
return {
|
|
133
155
|
content: [{ type: "text", text: JSON.stringify(serialisable, null, 2) }],
|
|
134
156
|
};
|
|
135
157
|
}
|
|
136
158
|
async function handleMemoryStore(args, context) {
|
|
137
|
-
const roleId = args.roleId;
|
|
138
159
|
const content = args.content;
|
|
139
160
|
const type = args.type;
|
|
140
161
|
const tags = args.tags ?? [];
|
|
141
162
|
const domain = args.domain;
|
|
142
163
|
const importance = args.importance;
|
|
164
|
+
const workDir = resolveWorkDir(args, context);
|
|
143
165
|
const result = await storeWithFusion(context.store, context.embeddingService, {
|
|
144
|
-
roleId,
|
|
166
|
+
roleId: context.roleId ?? DEFAULT_ASSISTANT_ROLE_ID,
|
|
145
167
|
content,
|
|
146
168
|
type,
|
|
147
|
-
|
|
169
|
+
status: "active",
|
|
170
|
+
workdir: workDir,
|
|
148
171
|
tags,
|
|
149
172
|
domain,
|
|
150
173
|
importance,
|
|
151
174
|
});
|
|
152
|
-
log.info({
|
|
175
|
+
log.info({
|
|
176
|
+
id: result.memory.id,
|
|
177
|
+
workDir,
|
|
178
|
+
type,
|
|
179
|
+
domain,
|
|
180
|
+
importance,
|
|
181
|
+
fusionAction: result.fusionAction,
|
|
182
|
+
}, "memory_store completed");
|
|
153
183
|
return {
|
|
154
184
|
content: [
|
|
155
185
|
{
|
|
@@ -164,35 +194,46 @@ async function handleMemoryStore(args, context) {
|
|
|
164
194
|
};
|
|
165
195
|
}
|
|
166
196
|
async function handleMemoryStats(args, context) {
|
|
167
|
-
const
|
|
168
|
-
const stats = context.store.
|
|
197
|
+
const workDir = resolveWorkDir(args, context);
|
|
198
|
+
const stats = context.store.getStatsByWorkdir(workDir);
|
|
169
199
|
return {
|
|
170
200
|
content: [{ type: "text", text: JSON.stringify(stats, null, 2) }],
|
|
171
201
|
};
|
|
172
202
|
}
|
|
173
203
|
async function handleMemoryReflect(args, context) {
|
|
174
|
-
const roleId = args.roleId;
|
|
175
204
|
const scope = args.scope ?? "light";
|
|
205
|
+
const workDir = resolveWorkDir(args, context);
|
|
176
206
|
const db = context.store.getDb();
|
|
177
207
|
const vectorIndex = context.store.getVectorIndex();
|
|
178
208
|
if (scope === "light") {
|
|
179
|
-
const
|
|
180
|
-
|
|
209
|
+
const roleIds = db
|
|
210
|
+
.prepare("SELECT DISTINCT role_id FROM memories WHERE workdir = ?")
|
|
211
|
+
.all(workDir).map((r) => r.role_id);
|
|
212
|
+
let archived = 0;
|
|
213
|
+
let deleted = 0;
|
|
214
|
+
let recalculated = 0;
|
|
215
|
+
for (const rid of roleIds) {
|
|
216
|
+
const r = pruneMemories(rid, db, vectorIndex);
|
|
217
|
+
archived += r.archived;
|
|
218
|
+
deleted += r.deleted;
|
|
219
|
+
recalculated += r.recalculated;
|
|
220
|
+
}
|
|
221
|
+
log.info({ workDir, scope, archived, deleted }, "memory_reflect completed");
|
|
181
222
|
return {
|
|
182
|
-
content: [
|
|
223
|
+
content: [
|
|
224
|
+
{ type: "text", text: JSON.stringify({ scope, archived, deleted, recalculated }) },
|
|
225
|
+
],
|
|
183
226
|
};
|
|
184
227
|
}
|
|
185
228
|
// scope === "full": re-embed if needed + recalculate all + prune all roles
|
|
186
229
|
const reembedResult = await context.store.reembedAll(context.embeddingService);
|
|
187
230
|
const recalculated = recalculateAllImportance(db);
|
|
188
231
|
const roleIds = db.prepare("SELECT DISTINCT role_id FROM memories").all().map((r) => r.role_id);
|
|
189
|
-
let
|
|
190
|
-
let totalDemotedToArchived = 0;
|
|
232
|
+
let totalArchived = 0;
|
|
191
233
|
let totalDeleted = 0;
|
|
192
234
|
for (const rid of roleIds) {
|
|
193
235
|
const r = pruneMemories(rid, db, vectorIndex);
|
|
194
|
-
|
|
195
|
-
totalDemotedToArchived += r.demotedToArchived;
|
|
236
|
+
totalArchived += r.archived;
|
|
196
237
|
totalDeleted += r.deleted;
|
|
197
238
|
}
|
|
198
239
|
const ewcGuard = new EWCGuard(db);
|
|
@@ -208,8 +249,7 @@ async function handleMemoryReflect(args, context) {
|
|
|
208
249
|
reembedFailed: reembedResult.failed,
|
|
209
250
|
recalculated,
|
|
210
251
|
rolesProcessed: roleIds.length,
|
|
211
|
-
|
|
212
|
-
demotedToArchived: totalDemotedToArchived,
|
|
252
|
+
archived: totalArchived,
|
|
213
253
|
deleted: totalDeleted,
|
|
214
254
|
profilesRefreshed,
|
|
215
255
|
};
|
package/dist/tools/memory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,wBAAwB,EACxB,eAAe,GAIhB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,GAAG,GAAG,YAAY,CAAC,EAAE,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/tools/memory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,yBAAyB,EACzB,QAAQ,EACR,aAAa,EACb,wBAAwB,EACxB,eAAe,GAIhB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,GAAG,GAAG,YAAY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AAa,CAAC,MAAM;QACnC,YAAY;QACZ,cAAc,EAAE,OAAO,CAAC,MAAM;QAC9B,QAAQ,EAAE,aAAa;QACvB,OAAO,EAAE,YAAY;QACrB,iBAAiB;KAClB,CAAC;IAEF,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IAC7C,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mclawnet/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
23
|
+
"@mclawnet/swarm": "0.1.10",
|
|
24
|
+
"@mclawnet/memory": "0.1.6",
|
|
23
25
|
"@mclawnet/logger": "0.1.6",
|
|
24
|
-
"@mclawnet/
|
|
25
|
-
"@mclawnet/skill-manager": "0.1.5"
|
|
26
|
-
"@mclawnet/swarm": "0.1.7",
|
|
27
|
-
"@mclawnet/task": "0.1.1"
|
|
26
|
+
"@mclawnet/task": "0.1.1",
|
|
27
|
+
"@mclawnet/skill-manager": "0.1.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/better-sqlite3": "^7",
|