@mysten-incubation/memwal-mcp 0.0.13 → 0.0.14-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-required.d.ts +330 -0
- package/dist/auth-required.d.ts.map +1 -1
- package/dist/auth-required.js +83 -5
- package/dist/auth-required.js.map +1 -1
- package/dist/auth.d.ts +60 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +135 -0
- package/dist/auth.js.map +1 -1
- package/dist/bridge.d.ts +4 -0
- package/dist/bridge.d.ts.map +1 -1
- package/dist/bridge.js +195 -22
- package/dist/bridge.js.map +1 -1
- package/dist/crypto.d.ts +9 -0
- package/dist/crypto.d.ts.map +1 -1
- package/dist/crypto.js +13 -1
- package/dist/crypto.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -1
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +4 -1
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +12 -1
- package/dist/instructions.js.map +1 -1
- package/dist/login.d.ts +5 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +78 -11
- package/dist/login.js.map +1 -1
- package/dist/messages.d.ts +5 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +11 -4
- package/dist/messages.js.map +1 -1
- package/dist/recovery.d.ts +61 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +227 -0
- package/dist/recovery.js.map +1 -0
- package/dist/streamable.d.ts +48 -0
- package/dist/streamable.d.ts.map +1 -0
- package/dist/streamable.js +136 -0
- package/dist/streamable.js.map +1 -0
- package/package.json +1 -1
package/dist/auth-required.d.ts
CHANGED
|
@@ -22,6 +22,226 @@
|
|
|
22
22
|
* and coexist.
|
|
23
23
|
*/
|
|
24
24
|
import { type MemWalCredentials } from "./auth.js";
|
|
25
|
+
/** Tool names the OLDEST relayer this bridge still talks to serves.
|
|
26
|
+
*
|
|
27
|
+
* The bridge ships on npm and updates itself; a relayer ships per environment
|
|
28
|
+
* and does not, so the bridge is routinely NEWER than the relayer it dials —
|
|
29
|
+
* 0.0.14-dev.0 against prod and staging on 0.0.13, which is GH #928. The
|
|
30
|
+
* cold-start list is served before any relayer capability is known, so every
|
|
31
|
+
* name in it that the dialled relayer does not serve is a tool the agent can
|
|
32
|
+
* be told about and then cannot call.
|
|
33
|
+
*
|
|
34
|
+
* Cold start is therefore a FLOOR, not a forecast: add a name here only once
|
|
35
|
+
* the tool has shipped to prod, never when it lands on dev. Newer tools reach
|
|
36
|
+
* the client a beat later anyway — the relayer's own `tools/list` replaces
|
|
37
|
+
* this one and `notifications/tools/list_changed` tells the client to re-read
|
|
38
|
+
* it. `memwal_remember_status` is the worked example: it exists on dev, not on
|
|
39
|
+
* prod/staging, and belongs here only after a prod release carries it. */
|
|
40
|
+
export declare const BASELINE_RELAYER_TOOLS: ReadonlySet<string>;
|
|
41
|
+
/** Every tool this bridge can describe, baseline or not. Only the baseline
|
|
42
|
+
* subset is advertised at cold start; this is what the schema tests pin, so a
|
|
43
|
+
* newer tool's shape stays reviewed while it waits for a prod release. */
|
|
44
|
+
export declare const ALL_TOOL_DEFINITIONS: ({
|
|
45
|
+
name: string;
|
|
46
|
+
title: string;
|
|
47
|
+
annotations: {
|
|
48
|
+
readOnlyHint: boolean;
|
|
49
|
+
destructiveHint: boolean;
|
|
50
|
+
};
|
|
51
|
+
description: string;
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: string;
|
|
54
|
+
properties: {
|
|
55
|
+
text: {
|
|
56
|
+
type: string;
|
|
57
|
+
minLength: number;
|
|
58
|
+
};
|
|
59
|
+
namespace: {
|
|
60
|
+
type: string;
|
|
61
|
+
minLength?: undefined;
|
|
62
|
+
};
|
|
63
|
+
facts?: undefined;
|
|
64
|
+
job_id?: undefined;
|
|
65
|
+
job_ids?: undefined;
|
|
66
|
+
waitMs?: undefined;
|
|
67
|
+
query?: undefined;
|
|
68
|
+
limit?: undefined;
|
|
69
|
+
maxDistance?: undefined;
|
|
70
|
+
};
|
|
71
|
+
required: string[];
|
|
72
|
+
additionalProperties: boolean;
|
|
73
|
+
};
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
title: string;
|
|
77
|
+
annotations: {
|
|
78
|
+
readOnlyHint: boolean;
|
|
79
|
+
destructiveHint: boolean;
|
|
80
|
+
};
|
|
81
|
+
description: string;
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: string;
|
|
84
|
+
properties: {
|
|
85
|
+
facts: {
|
|
86
|
+
type: string;
|
|
87
|
+
items: {
|
|
88
|
+
type: string;
|
|
89
|
+
minLength: number;
|
|
90
|
+
};
|
|
91
|
+
minItems: number;
|
|
92
|
+
maxItems: number;
|
|
93
|
+
};
|
|
94
|
+
namespace: {
|
|
95
|
+
type: string;
|
|
96
|
+
minLength?: undefined;
|
|
97
|
+
};
|
|
98
|
+
text?: undefined;
|
|
99
|
+
job_id?: undefined;
|
|
100
|
+
job_ids?: undefined;
|
|
101
|
+
waitMs?: undefined;
|
|
102
|
+
query?: undefined;
|
|
103
|
+
limit?: undefined;
|
|
104
|
+
maxDistance?: undefined;
|
|
105
|
+
};
|
|
106
|
+
required: string[];
|
|
107
|
+
additionalProperties: boolean;
|
|
108
|
+
};
|
|
109
|
+
} | {
|
|
110
|
+
name: string;
|
|
111
|
+
title: string;
|
|
112
|
+
annotations: {
|
|
113
|
+
readOnlyHint: boolean;
|
|
114
|
+
destructiveHint: boolean;
|
|
115
|
+
};
|
|
116
|
+
description: string;
|
|
117
|
+
inputSchema: {
|
|
118
|
+
type: string;
|
|
119
|
+
properties: {
|
|
120
|
+
job_id: {
|
|
121
|
+
type: string;
|
|
122
|
+
minLength: number;
|
|
123
|
+
};
|
|
124
|
+
job_ids: {
|
|
125
|
+
type: string;
|
|
126
|
+
items: {
|
|
127
|
+
type: string;
|
|
128
|
+
minLength: number;
|
|
129
|
+
};
|
|
130
|
+
minItems: number;
|
|
131
|
+
maxItems: number;
|
|
132
|
+
};
|
|
133
|
+
waitMs: {
|
|
134
|
+
type: string;
|
|
135
|
+
minimum: number;
|
|
136
|
+
maximum: number;
|
|
137
|
+
default: number;
|
|
138
|
+
};
|
|
139
|
+
text?: undefined;
|
|
140
|
+
namespace?: undefined;
|
|
141
|
+
facts?: undefined;
|
|
142
|
+
query?: undefined;
|
|
143
|
+
limit?: undefined;
|
|
144
|
+
maxDistance?: undefined;
|
|
145
|
+
};
|
|
146
|
+
additionalProperties: boolean;
|
|
147
|
+
required?: undefined;
|
|
148
|
+
};
|
|
149
|
+
} | {
|
|
150
|
+
name: string;
|
|
151
|
+
title: string;
|
|
152
|
+
annotations: {
|
|
153
|
+
readOnlyHint: boolean;
|
|
154
|
+
destructiveHint: boolean;
|
|
155
|
+
};
|
|
156
|
+
description: string;
|
|
157
|
+
inputSchema: {
|
|
158
|
+
type: string;
|
|
159
|
+
properties: {
|
|
160
|
+
query: {
|
|
161
|
+
type: string;
|
|
162
|
+
minLength: number;
|
|
163
|
+
};
|
|
164
|
+
limit: {
|
|
165
|
+
type: string;
|
|
166
|
+
minimum: number;
|
|
167
|
+
maximum: number;
|
|
168
|
+
default: number;
|
|
169
|
+
};
|
|
170
|
+
namespace: {
|
|
171
|
+
type: string;
|
|
172
|
+
minLength?: undefined;
|
|
173
|
+
};
|
|
174
|
+
maxDistance: {
|
|
175
|
+
type: string;
|
|
176
|
+
minimum: number;
|
|
177
|
+
description: string;
|
|
178
|
+
};
|
|
179
|
+
text?: undefined;
|
|
180
|
+
facts?: undefined;
|
|
181
|
+
job_id?: undefined;
|
|
182
|
+
job_ids?: undefined;
|
|
183
|
+
waitMs?: undefined;
|
|
184
|
+
};
|
|
185
|
+
required: string[];
|
|
186
|
+
additionalProperties: boolean;
|
|
187
|
+
};
|
|
188
|
+
} | {
|
|
189
|
+
name: string;
|
|
190
|
+
title: string;
|
|
191
|
+
annotations: {
|
|
192
|
+
readOnlyHint: boolean;
|
|
193
|
+
destructiveHint: boolean;
|
|
194
|
+
};
|
|
195
|
+
description: string;
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: string;
|
|
198
|
+
properties: {
|
|
199
|
+
namespace: {
|
|
200
|
+
type: string;
|
|
201
|
+
minLength: number;
|
|
202
|
+
};
|
|
203
|
+
limit: {
|
|
204
|
+
type: string;
|
|
205
|
+
minimum: number;
|
|
206
|
+
maximum: number;
|
|
207
|
+
default: number;
|
|
208
|
+
};
|
|
209
|
+
text?: undefined;
|
|
210
|
+
facts?: undefined;
|
|
211
|
+
job_id?: undefined;
|
|
212
|
+
job_ids?: undefined;
|
|
213
|
+
waitMs?: undefined;
|
|
214
|
+
query?: undefined;
|
|
215
|
+
maxDistance?: undefined;
|
|
216
|
+
};
|
|
217
|
+
required: string[];
|
|
218
|
+
additionalProperties: boolean;
|
|
219
|
+
};
|
|
220
|
+
} | {
|
|
221
|
+
name: string;
|
|
222
|
+
title: string;
|
|
223
|
+
annotations: {
|
|
224
|
+
readOnlyHint: boolean;
|
|
225
|
+
destructiveHint: boolean;
|
|
226
|
+
};
|
|
227
|
+
description: string;
|
|
228
|
+
inputSchema: {
|
|
229
|
+
type: string;
|
|
230
|
+
properties: {
|
|
231
|
+
text?: undefined;
|
|
232
|
+
namespace?: undefined;
|
|
233
|
+
facts?: undefined;
|
|
234
|
+
job_id?: undefined;
|
|
235
|
+
job_ids?: undefined;
|
|
236
|
+
waitMs?: undefined;
|
|
237
|
+
query?: undefined;
|
|
238
|
+
limit?: undefined;
|
|
239
|
+
maxDistance?: undefined;
|
|
240
|
+
};
|
|
241
|
+
additionalProperties: boolean;
|
|
242
|
+
required?: undefined;
|
|
243
|
+
};
|
|
244
|
+
})[];
|
|
25
245
|
/** Signed-in cold-start list (bridge). Credentials exist; the relayer session
|
|
26
246
|
* is not up yet. Proactive wording so clients that keep the first tools/list
|
|
27
247
|
* still save/recall without being asked. */
|
|
@@ -45,6 +265,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
45
265
|
minLength?: undefined;
|
|
46
266
|
};
|
|
47
267
|
facts?: undefined;
|
|
268
|
+
job_id?: undefined;
|
|
269
|
+
job_ids?: undefined;
|
|
270
|
+
waitMs?: undefined;
|
|
48
271
|
query?: undefined;
|
|
49
272
|
limit?: undefined;
|
|
50
273
|
maxDistance?: undefined;
|
|
@@ -77,6 +300,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
77
300
|
minLength?: undefined;
|
|
78
301
|
};
|
|
79
302
|
text?: undefined;
|
|
303
|
+
job_id?: undefined;
|
|
304
|
+
job_ids?: undefined;
|
|
305
|
+
waitMs?: undefined;
|
|
80
306
|
query?: undefined;
|
|
81
307
|
limit?: undefined;
|
|
82
308
|
maxDistance?: undefined;
|
|
@@ -84,6 +310,46 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
84
310
|
required: string[];
|
|
85
311
|
additionalProperties: boolean;
|
|
86
312
|
};
|
|
313
|
+
} | {
|
|
314
|
+
name: string;
|
|
315
|
+
title: string;
|
|
316
|
+
annotations: {
|
|
317
|
+
readOnlyHint: boolean;
|
|
318
|
+
destructiveHint: boolean;
|
|
319
|
+
};
|
|
320
|
+
description: string;
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: string;
|
|
323
|
+
properties: {
|
|
324
|
+
job_id: {
|
|
325
|
+
type: string;
|
|
326
|
+
minLength: number;
|
|
327
|
+
};
|
|
328
|
+
job_ids: {
|
|
329
|
+
type: string;
|
|
330
|
+
items: {
|
|
331
|
+
type: string;
|
|
332
|
+
minLength: number;
|
|
333
|
+
};
|
|
334
|
+
minItems: number;
|
|
335
|
+
maxItems: number;
|
|
336
|
+
};
|
|
337
|
+
waitMs: {
|
|
338
|
+
type: string;
|
|
339
|
+
minimum: number;
|
|
340
|
+
maximum: number;
|
|
341
|
+
default: number;
|
|
342
|
+
};
|
|
343
|
+
text?: undefined;
|
|
344
|
+
namespace?: undefined;
|
|
345
|
+
facts?: undefined;
|
|
346
|
+
query?: undefined;
|
|
347
|
+
limit?: undefined;
|
|
348
|
+
maxDistance?: undefined;
|
|
349
|
+
};
|
|
350
|
+
additionalProperties: boolean;
|
|
351
|
+
required?: undefined;
|
|
352
|
+
};
|
|
87
353
|
} | {
|
|
88
354
|
name: string;
|
|
89
355
|
title: string;
|
|
@@ -116,6 +382,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
116
382
|
};
|
|
117
383
|
text?: undefined;
|
|
118
384
|
facts?: undefined;
|
|
385
|
+
job_id?: undefined;
|
|
386
|
+
job_ids?: undefined;
|
|
387
|
+
waitMs?: undefined;
|
|
119
388
|
};
|
|
120
389
|
required: string[];
|
|
121
390
|
additionalProperties: boolean;
|
|
@@ -143,6 +412,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
143
412
|
};
|
|
144
413
|
text?: undefined;
|
|
145
414
|
facts?: undefined;
|
|
415
|
+
job_id?: undefined;
|
|
416
|
+
job_ids?: undefined;
|
|
417
|
+
waitMs?: undefined;
|
|
146
418
|
query?: undefined;
|
|
147
419
|
maxDistance?: undefined;
|
|
148
420
|
};
|
|
@@ -163,6 +435,9 @@ export declare const TOOL_DEFINITIONS: ({
|
|
|
163
435
|
text?: undefined;
|
|
164
436
|
namespace?: undefined;
|
|
165
437
|
facts?: undefined;
|
|
438
|
+
job_id?: undefined;
|
|
439
|
+
job_ids?: undefined;
|
|
440
|
+
waitMs?: undefined;
|
|
166
441
|
query?: undefined;
|
|
167
442
|
limit?: undefined;
|
|
168
443
|
maxDistance?: undefined;
|
|
@@ -194,6 +469,9 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
194
469
|
minLength?: undefined;
|
|
195
470
|
};
|
|
196
471
|
facts?: undefined;
|
|
472
|
+
job_id?: undefined;
|
|
473
|
+
job_ids?: undefined;
|
|
474
|
+
waitMs?: undefined;
|
|
197
475
|
query?: undefined;
|
|
198
476
|
limit?: undefined;
|
|
199
477
|
maxDistance?: undefined;
|
|
@@ -226,6 +504,9 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
226
504
|
minLength?: undefined;
|
|
227
505
|
};
|
|
228
506
|
text?: undefined;
|
|
507
|
+
job_id?: undefined;
|
|
508
|
+
job_ids?: undefined;
|
|
509
|
+
waitMs?: undefined;
|
|
229
510
|
query?: undefined;
|
|
230
511
|
limit?: undefined;
|
|
231
512
|
maxDistance?: undefined;
|
|
@@ -233,6 +514,46 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
233
514
|
required: string[];
|
|
234
515
|
additionalProperties: boolean;
|
|
235
516
|
};
|
|
517
|
+
} | {
|
|
518
|
+
name: string;
|
|
519
|
+
title: string;
|
|
520
|
+
annotations: {
|
|
521
|
+
readOnlyHint: boolean;
|
|
522
|
+
destructiveHint: boolean;
|
|
523
|
+
};
|
|
524
|
+
description: string;
|
|
525
|
+
inputSchema: {
|
|
526
|
+
type: string;
|
|
527
|
+
properties: {
|
|
528
|
+
job_id: {
|
|
529
|
+
type: string;
|
|
530
|
+
minLength: number;
|
|
531
|
+
};
|
|
532
|
+
job_ids: {
|
|
533
|
+
type: string;
|
|
534
|
+
items: {
|
|
535
|
+
type: string;
|
|
536
|
+
minLength: number;
|
|
537
|
+
};
|
|
538
|
+
minItems: number;
|
|
539
|
+
maxItems: number;
|
|
540
|
+
};
|
|
541
|
+
waitMs: {
|
|
542
|
+
type: string;
|
|
543
|
+
minimum: number;
|
|
544
|
+
maximum: number;
|
|
545
|
+
default: number;
|
|
546
|
+
};
|
|
547
|
+
text?: undefined;
|
|
548
|
+
namespace?: undefined;
|
|
549
|
+
facts?: undefined;
|
|
550
|
+
query?: undefined;
|
|
551
|
+
limit?: undefined;
|
|
552
|
+
maxDistance?: undefined;
|
|
553
|
+
};
|
|
554
|
+
additionalProperties: boolean;
|
|
555
|
+
required?: undefined;
|
|
556
|
+
};
|
|
236
557
|
} | {
|
|
237
558
|
name: string;
|
|
238
559
|
title: string;
|
|
@@ -265,6 +586,9 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
265
586
|
};
|
|
266
587
|
text?: undefined;
|
|
267
588
|
facts?: undefined;
|
|
589
|
+
job_id?: undefined;
|
|
590
|
+
job_ids?: undefined;
|
|
591
|
+
waitMs?: undefined;
|
|
268
592
|
};
|
|
269
593
|
required: string[];
|
|
270
594
|
additionalProperties: boolean;
|
|
@@ -292,6 +616,9 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
292
616
|
};
|
|
293
617
|
text?: undefined;
|
|
294
618
|
facts?: undefined;
|
|
619
|
+
job_id?: undefined;
|
|
620
|
+
job_ids?: undefined;
|
|
621
|
+
waitMs?: undefined;
|
|
295
622
|
query?: undefined;
|
|
296
623
|
maxDistance?: undefined;
|
|
297
624
|
};
|
|
@@ -312,6 +639,9 @@ export declare const SIGNED_OUT_TOOL_DEFINITIONS: ({
|
|
|
312
639
|
text?: undefined;
|
|
313
640
|
namespace?: undefined;
|
|
314
641
|
facts?: undefined;
|
|
642
|
+
job_id?: undefined;
|
|
643
|
+
job_ids?: undefined;
|
|
644
|
+
waitMs?: undefined;
|
|
315
645
|
query?: undefined;
|
|
316
646
|
limit?: undefined;
|
|
317
647
|
maxDistance?: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-required.d.ts","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"auth-required.d.ts","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAiLzE;;;;;;;;;;;;;;0EAc0E;AAC1E,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAOrD,CAAC;AAMH;;0EAE0E;AA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H,wBAAsB,qBAAqB,CACvC,MAAM,EAAE,kBAAkB,GAC3B,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAgE7B"}
|
package/dist/auth-required.js
CHANGED
|
@@ -29,7 +29,7 @@ import { startOrReuseLoginFlow, resolveLoginTimeoutMs } from "./login.js";
|
|
|
29
29
|
import { AUTH_REQUIRED_INSTRUCTIONS } from "./instructions.js";
|
|
30
30
|
import { MEMWAL_MCP_VERSION } from "./version.js";
|
|
31
31
|
const SIGNED_OUT_REMEMBER = "Save a fact to the user's Walrus Memory personal memory. Call ONLY when the user explicitly asks to remember/save something. Pass the full, detailed text — never summarize.";
|
|
32
|
-
const SIGNED_IN_REMEMBER = "Save a durable fact about the user or project to their Walrus Memory. Call this PROACTIVELY whenever the user states a preference, decision, constraint, correction, identity detail, or recurring workflow — even if they did not say 'remember this'. Skip one-off tasks, the current file or bug, and small talk. Pass the full statement; do not summarize. To save several facts at once, use memwal_remember_bulk instead.";
|
|
32
|
+
const SIGNED_IN_REMEMBER = "Save a durable fact about the user or project to their Walrus Memory. Call this PROACTIVELY whenever the user states a preference, decision, constraint, correction, identity detail, or recurring workflow — even if they did not say 'remember this'. Skip one-off tasks, the current file or bug, and small talk. Pass the full statement; do not summarize. To save several facts at once, use memwal_remember_bulk instead. By default this returns in ~1s once the relayer has accepted the job (job_id) — the Walrus write is still in flight and the fact is NOT stored yet. Do not claim it is saved. Settle it with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means it already stored (optional wait budget).";
|
|
33
33
|
const SIGNED_OUT_RECALL = "Search the user's Walrus Memory for facts relevant to a query. Returns matching memories ranked by relevance.";
|
|
34
34
|
const SIGNED_IN_RECALL = "Search the user's Walrus Memory for relevant facts before responding. Call this PROACTIVELY at the start of a task, or whenever the user references past work, prior decisions, their preferences, or anything you may have stored earlier — don't wait to be asked. A single focused query is usually enough — recall is a real retrieval over encrypted storage, so do NOT fire multiple redundant searches for the same question. Returns matching memories ranked by relevance.";
|
|
35
35
|
/** Build the static memory-tool list. `proactive` is true for the signed-in
|
|
@@ -56,7 +56,7 @@ function buildToolDefinitions(proactive) {
|
|
|
56
56
|
name: "memwal_remember_bulk",
|
|
57
57
|
title: "Remember Multiple Facts",
|
|
58
58
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
59
|
-
description: "Save multiple durable facts in one call. Use when you learned several distinct facts at once (onboarding details, a list of preferences, decisions from a discussion). Pass an array of complete fact statements (max 20) — do not summarize. Prefer this over repeated memwal_remember calls.",
|
|
59
|
+
description: "Save multiple durable facts in one call. Use when you learned several distinct facts at once (onboarding details, a list of preferences, decisions from a discussion). Pass an array of complete fact statements (max 20) — do not summarize. Prefer this over repeated memwal_remember calls. By default this returns in ~1s once the relayer has accepted the batch (job_ids) — the Walrus writes are still in flight and the facts are NOT stored yet. Do not claim they are saved. Settle them with the job-status tool this server advertises (re-list tools if you do not see one). A blob_id in the same reply means that fact already stored (optional wait budget).",
|
|
60
60
|
inputSchema: {
|
|
61
61
|
type: "object",
|
|
62
62
|
properties: {
|
|
@@ -72,6 +72,34 @@ function buildToolDefinitions(proactive) {
|
|
|
72
72
|
additionalProperties: false,
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
|
+
{
|
|
76
|
+
name: "memwal_remember_status",
|
|
77
|
+
title: "Check a Remember Job",
|
|
78
|
+
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
79
|
+
description: "Check whether in-flight Walrus Memory writes have landed. Call this with the job_id memwal_remember returned, or job_ids from memwal_remember_bulk, when the write was reported NOT saved yet. Returns the blob_id once stored, reports that it is still uploading (call again with the ids still listed), or reports that it failed \u2014 in which case the fact was never stored and you should send it again. A batch can come back mixed, so read every line before telling the user anything is saved.",
|
|
80
|
+
inputSchema: {
|
|
81
|
+
type: "object",
|
|
82
|
+
properties: {
|
|
83
|
+
job_id: { type: "string", minLength: 1 },
|
|
84
|
+
// The sidecar takes either one id or a whole batch, and the
|
|
85
|
+
// pending body `memwal_remember_bulk` returns tells the agent
|
|
86
|
+
// to come back with `job_ids`. Advertising only `job_id` —
|
|
87
|
+
// required, under `additionalProperties: false` — made that
|
|
88
|
+
// instruction unfollowable for the whole cold-start window.
|
|
89
|
+
job_ids: {
|
|
90
|
+
type: "array",
|
|
91
|
+
items: { type: "string", minLength: 1 },
|
|
92
|
+
minItems: 1,
|
|
93
|
+
maxItems: 20,
|
|
94
|
+
},
|
|
95
|
+
waitMs: { type: "integer", minimum: 0, maximum: 45000, default: 10000 },
|
|
96
|
+
},
|
|
97
|
+
// Neither is required on its own; the sidecar rejects passing both
|
|
98
|
+
// and rejects passing neither, which JSON Schema cannot express
|
|
99
|
+
// here without a `oneOf` that some clients mishandle.
|
|
100
|
+
additionalProperties: false,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
75
103
|
{
|
|
76
104
|
name: "memwal_recall",
|
|
77
105
|
title: "Recall Memories",
|
|
@@ -147,14 +175,48 @@ function buildToolDefinitions(proactive) {
|
|
|
147
175
|
},
|
|
148
176
|
];
|
|
149
177
|
}
|
|
178
|
+
/** Tool names the OLDEST relayer this bridge still talks to serves.
|
|
179
|
+
*
|
|
180
|
+
* The bridge ships on npm and updates itself; a relayer ships per environment
|
|
181
|
+
* and does not, so the bridge is routinely NEWER than the relayer it dials —
|
|
182
|
+
* 0.0.14-dev.0 against prod and staging on 0.0.13, which is GH #928. The
|
|
183
|
+
* cold-start list is served before any relayer capability is known, so every
|
|
184
|
+
* name in it that the dialled relayer does not serve is a tool the agent can
|
|
185
|
+
* be told about and then cannot call.
|
|
186
|
+
*
|
|
187
|
+
* Cold start is therefore a FLOOR, not a forecast: add a name here only once
|
|
188
|
+
* the tool has shipped to prod, never when it lands on dev. Newer tools reach
|
|
189
|
+
* the client a beat later anyway — the relayer's own `tools/list` replaces
|
|
190
|
+
* this one and `notifications/tools/list_changed` tells the client to re-read
|
|
191
|
+
* it. `memwal_remember_status` is the worked example: it exists on dev, not on
|
|
192
|
+
* prod/staging, and belongs here only after a prod release carries it. */
|
|
193
|
+
export const BASELINE_RELAYER_TOOLS = new Set([
|
|
194
|
+
"memwal_remember",
|
|
195
|
+
"memwal_remember_bulk",
|
|
196
|
+
"memwal_recall",
|
|
197
|
+
"memwal_analyze",
|
|
198
|
+
"memwal_restore",
|
|
199
|
+
"memwal_health",
|
|
200
|
+
]);
|
|
201
|
+
/** Served by this process, so no relayer has to know about it. Advertising it
|
|
202
|
+
* at cold start is always safe. */
|
|
203
|
+
const LOCALLY_SERVED_TOOLS = new Set(["memwal_login"]);
|
|
204
|
+
/** Every tool this bridge can describe, baseline or not. Only the baseline
|
|
205
|
+
* subset is advertised at cold start; this is what the schema tests pin, so a
|
|
206
|
+
* newer tool's shape stays reviewed while it waits for a prod release. */
|
|
207
|
+
export const ALL_TOOL_DEFINITIONS = buildToolDefinitions(true);
|
|
208
|
+
/** Drop anything the oldest supported relayer would not serve. */
|
|
209
|
+
function coldStartTools(proactive) {
|
|
210
|
+
return buildToolDefinitions(proactive).filter((t) => BASELINE_RELAYER_TOOLS.has(t.name) || LOCALLY_SERVED_TOOLS.has(t.name));
|
|
211
|
+
}
|
|
150
212
|
/** Signed-in cold-start list (bridge). Credentials exist; the relayer session
|
|
151
213
|
* is not up yet. Proactive wording so clients that keep the first tools/list
|
|
152
214
|
* still save/recall without being asked. */
|
|
153
|
-
export const TOOL_DEFINITIONS =
|
|
215
|
+
export const TOOL_DEFINITIONS = coldStartTools(true);
|
|
154
216
|
/** Signed-out list (auth-required). No credentials, so every memory call
|
|
155
217
|
* fails: keep conservative wording or the model will spam remember and get
|
|
156
218
|
* a stream of auth errors. */
|
|
157
|
-
export const SIGNED_OUT_TOOL_DEFINITIONS =
|
|
219
|
+
export const SIGNED_OUT_TOOL_DEFINITIONS = coldStartTools(false);
|
|
158
220
|
/** How long to wait for the local listener to bind + emit its URL before we
|
|
159
221
|
* give up and return an error. Should be near-instant; 5s is paranoia. */
|
|
160
222
|
const URL_READY_TIMEOUT_MS = 5_000;
|
|
@@ -174,6 +236,17 @@ const LOGIN_INSTRUCTION = [
|
|
|
174
236
|
"Either path opens a browser tab — click **Connect Sui Wallet** and approve the on-chain",
|
|
175
237
|
"`add_delegate_key` transaction. Credentials land at `~/.memwal/credentials.json`.",
|
|
176
238
|
].join("\n");
|
|
239
|
+
/** Replaces {@link LOGIN_INSTRUCTION} after a failed attempt, which
|
|
240
|
+
* {@link loginFailureNotice} has just described. The generic copy promises "no
|
|
241
|
+
* client restart" and leads with `memwal_login`; for a key the user already
|
|
242
|
+
* approved, a restart is the only thing that recovers it and signing in again
|
|
243
|
+
* cannot register it twice. So the retry is offered only for the case it
|
|
244
|
+
* actually fixes. */
|
|
245
|
+
const LOGIN_RETRY_INSTRUCTION = [
|
|
246
|
+
"If you did not approve the wallet step, start a new sign-in: call the `memwal_login`",
|
|
247
|
+
"tool from this client, or run `npx -y @mysten-incubation/memwal-mcp login`. Open the",
|
|
248
|
+
"new link straight away and leave this client running through the wallet prompt.",
|
|
249
|
+
].join("\n");
|
|
177
250
|
/** Set when a background `memwal_login` ends without credentials. The tool call
|
|
178
251
|
* already returned the URL by then, so this is the only place left to say so. */
|
|
179
252
|
let lastLoginFailure = null;
|
|
@@ -386,7 +459,12 @@ function handleAuthLine(line, config) {
|
|
|
386
459
|
id,
|
|
387
460
|
result: {
|
|
388
461
|
content: [
|
|
389
|
-
{
|
|
462
|
+
{
|
|
463
|
+
type: "text",
|
|
464
|
+
text: lastLoginFailure
|
|
465
|
+
? `${loginFailureNotice(lastLoginFailure)}${LOGIN_RETRY_INSTRUCTION}`
|
|
466
|
+
: LOGIN_INSTRUCTION,
|
|
467
|
+
},
|
|
390
468
|
],
|
|
391
469
|
isError: true,
|
|
392
470
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-required.js","sourceRoot":"","sources":["../src/auth-required.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,SAAS,EAAE,SAAS,EAA0B,MAAM,WAAW,CAA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C,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/auth.d.ts
CHANGED
|
@@ -135,4 +135,64 @@ export interface ClearCredsResult {
|
|
|
135
135
|
* leaving the user to discover a different account later (GH #628).
|
|
136
136
|
*/
|
|
137
137
|
export declare function clearCreds(): ClearCredsResult;
|
|
138
|
+
/**
|
|
139
|
+
* How long a stranded record stays recoverable.
|
|
140
|
+
*
|
|
141
|
+
* Deliberately far longer than the 5-minute login timeout: the whole point is
|
|
142
|
+
* to survive a client restart, and a user who quits for the evening and comes
|
|
143
|
+
* back tomorrow is exactly the case worth covering. The cost of holding it is
|
|
144
|
+
* an unregistered key on disk, which grants nothing.
|
|
145
|
+
*/
|
|
146
|
+
export declare const PENDING_LOGIN_TTL_MS: number;
|
|
147
|
+
export interface PendingLogin {
|
|
148
|
+
/** 64-hex Ed25519 private key seed. NEVER log this. */
|
|
149
|
+
delegatePrivateKey: string;
|
|
150
|
+
delegatePublicKeyHex: string;
|
|
151
|
+
delegateAddress: string;
|
|
152
|
+
/** Relayer the flow was started against — recovery must not repoint. */
|
|
153
|
+
relayerUrl: string;
|
|
154
|
+
label?: string;
|
|
155
|
+
/** ISO timestamp, for TTL expiry. */
|
|
156
|
+
createdAt: string;
|
|
157
|
+
version: 1;
|
|
158
|
+
}
|
|
159
|
+
/** Sits beside whichever credentials file `credsPath()` resolves to, so a
|
|
160
|
+
* project-local sign-in recovers into that same project. */
|
|
161
|
+
export declare function pendingLoginPath(): string;
|
|
162
|
+
/**
|
|
163
|
+
* Persist the pending keypair. Throws if it cannot.
|
|
164
|
+
*
|
|
165
|
+
* Deliberately NOT best-effort. The invariant this record exists to hold is
|
|
166
|
+
* that the delegate private key is on disk before its public half can reach a
|
|
167
|
+
* browser that will pay gas to register it. Swallowing the error would publish
|
|
168
|
+
* the connect URL while claiming a durability that does not exist — the
|
|
169
|
+
* original WALM-332 loss, now silent.
|
|
170
|
+
*
|
|
171
|
+
* Failing the login costs the user nothing: this file sits beside
|
|
172
|
+
* `credentials.json`, so a directory that cannot take it cannot take the
|
|
173
|
+
* credentials either. The same login would have failed at the callback anyway,
|
|
174
|
+
* one on-chain `add_delegate_key` later.
|
|
175
|
+
*/
|
|
176
|
+
export declare function savePendingLogin(pending: PendingLogin): void;
|
|
177
|
+
/**
|
|
178
|
+
* A pending record this login can adopt instead of minting a new keypair.
|
|
179
|
+
*
|
|
180
|
+
* `loginFlow` used to generate a fresh keypair every call and overwrite the
|
|
181
|
+
* record unconditionally. Recovery only runs at process start and is skipped
|
|
182
|
+
* for `--login` / `forceLogin`, so a timed-out login followed by `memwal_login`
|
|
183
|
+
* in the same process replaced the only copy of a key the browser may already
|
|
184
|
+
* have paid to register. Reusing the record keeps that key reclaimable.
|
|
185
|
+
*
|
|
186
|
+
* Scoped to the same relayer: a key registered against one relayer's account
|
|
187
|
+
* proves nothing to another, and `recovery` must never repoint. TTL and shape
|
|
188
|
+
* are already enforced by {@link loadPendingLogin}.
|
|
189
|
+
*/
|
|
190
|
+
export declare function reusablePendingLogin(relayerUrl: string): PendingLogin | null;
|
|
191
|
+
/**
|
|
192
|
+
* Load a pending record, or null if there is none, it is malformed, or it has
|
|
193
|
+
* aged out. An expired record is deleted on read rather than left to linger.
|
|
194
|
+
*/
|
|
195
|
+
export declare function loadPendingLogin(): PendingLogin | null;
|
|
196
|
+
/** Remove the pending record. Safe to call when there isn't one. */
|
|
197
|
+
export declare function clearPendingLogin(): void;
|
|
138
198
|
//# sourceMappingURL=auth.d.ts.map
|