@rkat/mobkit-sdk 0.7.18 → 0.7.20

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/builder.d.ts CHANGED
@@ -106,6 +106,37 @@ export declare class MobKitBuilder {
106
106
  recallTimeoutMs?: number;
107
107
  recallFailurePolicy?: "skip" | "fail";
108
108
  instructionHeader?: string;
109
+ perTurnInjection?: "off" | "budgeted";
110
+ defangInbound?: boolean;
111
+ store?: "sqlite" | "markdown";
112
+ llmWrites?: "observed" | "quarantined";
113
+ recorderTool?: boolean;
114
+ contentTrust?: {
115
+ trustedMcpServers?: string[];
116
+ untrustedTools?: string[];
117
+ trustedTools?: string[];
118
+ };
119
+ selector?: "off" | "default" | `profile:${string}`;
120
+ operatorScope?: "off" | "provisional";
121
+ distiller?: boolean | {
122
+ enabled?: boolean;
123
+ runsPerHour?: number;
124
+ minInteractions?: number;
125
+ model?: string;
126
+ };
127
+ steward?: boolean | {
128
+ enabled?: boolean;
129
+ cadence?: string;
130
+ model?: string;
131
+ perMob?: boolean;
132
+ runsPerDay?: number;
133
+ minSignals?: number;
134
+ };
135
+ hygienist?: boolean | {
136
+ enabled?: boolean;
137
+ runsPerDay?: number;
138
+ model?: string;
139
+ };
109
140
  }): this;
110
141
  auth(config: unknown): this;
111
142
  implicitDelegateIdleRetirement(seconds: number | null): this;
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,mBAAmB;IAClC,aAAa,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e,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI;IAKlD,8BAA8B;IAC9B,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAK5C,KAAK,IAAI,OAAO,CAAC,aAAa,CAAC;IAQrC,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,wBAAwB;CAwCjC;AAID,qBAAa,MAAM;IACjB,MAAM,CAAC,OAAO,IAAI,aAAa;CAGhC"}
package/dist/builder.js CHANGED
@@ -16,6 +16,56 @@
16
16
  * ```
17
17
  */
18
18
  import { existsSync } from "node:fs";
19
+ // -- agentMemory() key whitelists ------------------------------------------
20
+ // Mirror the gateway's supported-field lists (rpc_gateway.rs); the runtime
21
+ // checks exist so plain-JS callers fail loud on typos the way TS callers do
22
+ // at compile time.
23
+ const AGENT_MEMORY_KEYS = new Set([
24
+ "enabled",
25
+ "realm",
26
+ "selection",
27
+ "maxEntries",
28
+ "recallTimeoutMs",
29
+ "recallFailurePolicy",
30
+ "instructionHeader",
31
+ "perTurnInjection",
32
+ "defangInbound",
33
+ "store",
34
+ "llmWrites",
35
+ "recorderTool",
36
+ "contentTrust",
37
+ "selector",
38
+ "operatorScope",
39
+ "distiller",
40
+ "steward",
41
+ "hygienist",
42
+ ]);
43
+ const CONTENT_TRUST_KEYS = new Set([
44
+ "trustedMcpServers",
45
+ "untrustedTools",
46
+ "trustedTools",
47
+ ]);
48
+ const DISTILLER_KEYS = new Set([
49
+ "enabled",
50
+ "runsPerHour",
51
+ "minInteractions",
52
+ "model",
53
+ ]);
54
+ const STEWARD_KEYS = new Set([
55
+ "enabled",
56
+ "cadence",
57
+ "model",
58
+ "perMob",
59
+ "runsPerDay",
60
+ "minSignals",
61
+ ]);
62
+ const HYGIENIST_KEYS = new Set(["enabled", "runsPerDay", "model"]);
63
+ function rejectUnknownKeys(config, known, context) {
64
+ const unknown = Object.keys(config).filter((key) => !known.has(key)).sort();
65
+ if (unknown.length > 0) {
66
+ throw new Error(`${context} got unsupported option(s): ${unknown.join(", ")}`);
67
+ }
68
+ }
19
69
  function defaultConfig() {
20
70
  return {
21
71
  mobConfigPath: null,
@@ -144,12 +194,18 @@ export class MobKitBuilder {
144
194
  }
145
195
  memory(config, options) {
146
196
  if (config === undefined && options?.stores !== undefined) {
147
- throw new Error("memory(stores=...) is not supported by the Rust gateway; pass memory.elephant(endpoint)");
197
+ throw new Error("memory(stores=...) is not supported by the Rust gateway; pass memory.localJson()");
148
198
  }
149
199
  this._config.memoryConfig = config ?? null;
150
200
  return this;
151
201
  }
152
202
  agentMemory(config = true) {
203
+ // Runtime unknown-key rejection for plain-JS callers (the type already
204
+ // catches typos for TS callers): a typo'd option would otherwise be
205
+ // silently dropped here, before the gateway's own fail-loud check.
206
+ if (config !== true) {
207
+ rejectUnknownKeys(config, AGENT_MEMORY_KEYS, "agentMemory");
208
+ }
153
209
  if (config !== true && config.enabled === false) {
154
210
  this._config.agentMemoryConfig = { enabled: false };
155
211
  return this;
@@ -176,6 +232,107 @@ export class MobKitBuilder {
176
232
  if (config.instructionHeader !== undefined) {
177
233
  wire.instruction_header = config.instructionHeader;
178
234
  }
235
+ if (config.perTurnInjection !== undefined) {
236
+ wire.per_turn_injection = config.perTurnInjection;
237
+ }
238
+ if (config.defangInbound !== undefined) {
239
+ wire.defang_inbound = config.defangInbound;
240
+ }
241
+ if (config.store !== undefined)
242
+ wire.store = config.store;
243
+ if (config.llmWrites !== undefined)
244
+ wire.llm_writes = config.llmWrites;
245
+ if (config.recorderTool !== undefined) {
246
+ wire.recorder_tool = config.recorderTool;
247
+ }
248
+ if (config.contentTrust !== undefined) {
249
+ rejectUnknownKeys(config.contentTrust, CONTENT_TRUST_KEYS, "agentMemory contentTrust");
250
+ const contentTrust = {};
251
+ if (config.contentTrust.trustedMcpServers !== undefined) {
252
+ contentTrust.trusted_mcp_servers = config.contentTrust.trustedMcpServers;
253
+ }
254
+ if (config.contentTrust.untrustedTools !== undefined) {
255
+ contentTrust.untrusted_tools = config.contentTrust.untrustedTools;
256
+ }
257
+ if (config.contentTrust.trustedTools !== undefined) {
258
+ contentTrust.trusted_tools = config.contentTrust.trustedTools;
259
+ }
260
+ wire.content_trust = contentTrust;
261
+ }
262
+ if (config.selector !== undefined)
263
+ wire.selector = config.selector;
264
+ if (config.operatorScope !== undefined) {
265
+ wire.operator_scope = config.operatorScope;
266
+ }
267
+ if (config.distiller !== undefined) {
268
+ if (typeof config.distiller === "boolean") {
269
+ wire.distiller = config.distiller;
270
+ }
271
+ else {
272
+ rejectUnknownKeys(config.distiller, DISTILLER_KEYS, "agentMemory distiller");
273
+ const distiller = {};
274
+ if (config.distiller.enabled !== undefined) {
275
+ distiller.enabled = config.distiller.enabled;
276
+ }
277
+ if (config.distiller.runsPerHour !== undefined) {
278
+ distiller.runs_per_hour = config.distiller.runsPerHour;
279
+ }
280
+ if (config.distiller.minInteractions !== undefined) {
281
+ distiller.min_interactions = config.distiller.minInteractions;
282
+ }
283
+ if (config.distiller.model !== undefined) {
284
+ distiller.model = config.distiller.model;
285
+ }
286
+ wire.distiller = distiller;
287
+ }
288
+ }
289
+ if (config.steward !== undefined) {
290
+ if (typeof config.steward === "boolean") {
291
+ wire.steward = config.steward;
292
+ }
293
+ else {
294
+ rejectUnknownKeys(config.steward, STEWARD_KEYS, "agentMemory steward");
295
+ const steward = {};
296
+ if (config.steward.enabled !== undefined) {
297
+ steward.enabled = config.steward.enabled;
298
+ }
299
+ if (config.steward.cadence !== undefined) {
300
+ steward.cadence = config.steward.cadence;
301
+ }
302
+ if (config.steward.model !== undefined) {
303
+ steward.model = config.steward.model;
304
+ }
305
+ if (config.steward.perMob !== undefined) {
306
+ steward.per_mob = config.steward.perMob;
307
+ }
308
+ if (config.steward.runsPerDay !== undefined) {
309
+ steward.runs_per_day = config.steward.runsPerDay;
310
+ }
311
+ if (config.steward.minSignals !== undefined) {
312
+ steward.min_signals = config.steward.minSignals;
313
+ }
314
+ wire.steward = steward;
315
+ }
316
+ }
317
+ if (config.hygienist !== undefined) {
318
+ if (typeof config.hygienist === "boolean") {
319
+ wire.hygienist = config.hygienist;
320
+ }
321
+ else {
322
+ rejectUnknownKeys(config.hygienist, HYGIENIST_KEYS, "agentMemory hygienist");
323
+ const hygienist = {};
324
+ if (config.hygienist.enabled !== undefined) {
325
+ hygienist.enabled = config.hygienist.enabled;
326
+ }
327
+ if (config.hygienist.runsPerDay !== undefined) {
328
+ hygienist.runs_per_day = config.hygienist.runsPerDay;
329
+ }
330
+ if (config.hygienist.model !== undefined) {
331
+ hygienist.model = config.hygienist.model;
332
+ }
333
+ wire.hygienist = hygienist;
334
+ }
335
+ }
179
336
  this._config.agentMemoryConfig = wire;
180
337
  return this;
181
338
  }
@@ -1 +1 @@
1
- {"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA+CrC,SAAS,aAAa;IACpB,OAAO;QACL,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,IAAI;QACd,iBAAiB,EAAE,IAAI;QACvB,gBAAgB,EAAE,IAAI;QACtB,qBAAqB,EAAE,IAAI;QAC3B,eAAe,EAAE,IAAI;QACrB,qBAAqB,EAAE,IAAI;QAC3B,OAAO,EAAE,KAAK;QACd,gBAAgB,EAAE,IAAI;QACtB,iBAAiB,EAAE,IAAI;QACvB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE,IAAI;QACvB,UAAU,EAAE,IAAI;QAChB,8BAA8B,EAAE,SAAS;QACzC,WAAW,EAAE,IAAI;QACjB,gBAAgB,EAAE,IAAI;QACtB,UAAU,EAAE,IAAI;QAChB,OAAO,EAAE,EAAE;QACX,eAAe,EAAE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,MAAM,SAAS,GAAG,yBAAyB,CAAC;YAC5C,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC1B,IAAI,CAAC,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC9C,MAAM,KAAK,GAAa,EAAE,CAAC;YAC3B,MAAM,WAAW,GAAG,gCAAgC,CAAC;YACrD,IAAI,UAAU,CAAC,WAAW,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACrD,MAAM,YAAY,GAAG,2BAA2B,CAAC;YACjD,IAAI,UAAU,CAAC,YAAY,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACvD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrB,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC;YACvC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,4EAA4E;AAE5E,MAAM,OAAO,MAAM;IACjB,MAAM,CAAC,OAAO;QACZ,OAAO,IAAI,aAAa,EAAE,CAAC;IAC7B,CAAC;CACF"}
@@ -52,6 +52,56 @@ var __importStar = (this && this.__importStar) || (function () {
52
52
  Object.defineProperty(exports, "__esModule", { value: true });
53
53
  exports.MobKit = exports.MobKitBuilder = void 0;
54
54
  const node_fs_1 = require("node:fs");
55
+ // -- agentMemory() key whitelists ------------------------------------------
56
+ // Mirror the gateway's supported-field lists (rpc_gateway.rs); the runtime
57
+ // checks exist so plain-JS callers fail loud on typos the way TS callers do
58
+ // at compile time.
59
+ const AGENT_MEMORY_KEYS = new Set([
60
+ "enabled",
61
+ "realm",
62
+ "selection",
63
+ "maxEntries",
64
+ "recallTimeoutMs",
65
+ "recallFailurePolicy",
66
+ "instructionHeader",
67
+ "perTurnInjection",
68
+ "defangInbound",
69
+ "store",
70
+ "llmWrites",
71
+ "recorderTool",
72
+ "contentTrust",
73
+ "selector",
74
+ "operatorScope",
75
+ "distiller",
76
+ "steward",
77
+ "hygienist",
78
+ ]);
79
+ const CONTENT_TRUST_KEYS = new Set([
80
+ "trustedMcpServers",
81
+ "untrustedTools",
82
+ "trustedTools",
83
+ ]);
84
+ const DISTILLER_KEYS = new Set([
85
+ "enabled",
86
+ "runsPerHour",
87
+ "minInteractions",
88
+ "model",
89
+ ]);
90
+ const STEWARD_KEYS = new Set([
91
+ "enabled",
92
+ "cadence",
93
+ "model",
94
+ "perMob",
95
+ "runsPerDay",
96
+ "minSignals",
97
+ ]);
98
+ const HYGIENIST_KEYS = new Set(["enabled", "runsPerDay", "model"]);
99
+ function rejectUnknownKeys(config, known, context) {
100
+ const unknown = Object.keys(config).filter((key) => !known.has(key)).sort();
101
+ if (unknown.length > 0) {
102
+ throw new Error(`${context} got unsupported option(s): ${unknown.join(", ")}`);
103
+ }
104
+ }
55
105
  function defaultConfig() {
56
106
  return {
57
107
  mobConfigPath: null,
@@ -180,12 +230,18 @@ class MobKitBuilder {
180
230
  }
181
231
  memory(config, options) {
182
232
  if (config === undefined && options?.stores !== undefined) {
183
- throw new Error("memory(stores=...) is not supported by the Rust gateway; pass memory.elephant(endpoint)");
233
+ throw new Error("memory(stores=...) is not supported by the Rust gateway; pass memory.localJson()");
184
234
  }
185
235
  this._config.memoryConfig = config ?? null;
186
236
  return this;
187
237
  }
188
238
  agentMemory(config = true) {
239
+ // Runtime unknown-key rejection for plain-JS callers (the type already
240
+ // catches typos for TS callers): a typo'd option would otherwise be
241
+ // silently dropped here, before the gateway's own fail-loud check.
242
+ if (config !== true) {
243
+ rejectUnknownKeys(config, AGENT_MEMORY_KEYS, "agentMemory");
244
+ }
189
245
  if (config !== true && config.enabled === false) {
190
246
  this._config.agentMemoryConfig = { enabled: false };
191
247
  return this;
@@ -212,6 +268,107 @@ class MobKitBuilder {
212
268
  if (config.instructionHeader !== undefined) {
213
269
  wire.instruction_header = config.instructionHeader;
214
270
  }
271
+ if (config.perTurnInjection !== undefined) {
272
+ wire.per_turn_injection = config.perTurnInjection;
273
+ }
274
+ if (config.defangInbound !== undefined) {
275
+ wire.defang_inbound = config.defangInbound;
276
+ }
277
+ if (config.store !== undefined)
278
+ wire.store = config.store;
279
+ if (config.llmWrites !== undefined)
280
+ wire.llm_writes = config.llmWrites;
281
+ if (config.recorderTool !== undefined) {
282
+ wire.recorder_tool = config.recorderTool;
283
+ }
284
+ if (config.contentTrust !== undefined) {
285
+ rejectUnknownKeys(config.contentTrust, CONTENT_TRUST_KEYS, "agentMemory contentTrust");
286
+ const contentTrust = {};
287
+ if (config.contentTrust.trustedMcpServers !== undefined) {
288
+ contentTrust.trusted_mcp_servers = config.contentTrust.trustedMcpServers;
289
+ }
290
+ if (config.contentTrust.untrustedTools !== undefined) {
291
+ contentTrust.untrusted_tools = config.contentTrust.untrustedTools;
292
+ }
293
+ if (config.contentTrust.trustedTools !== undefined) {
294
+ contentTrust.trusted_tools = config.contentTrust.trustedTools;
295
+ }
296
+ wire.content_trust = contentTrust;
297
+ }
298
+ if (config.selector !== undefined)
299
+ wire.selector = config.selector;
300
+ if (config.operatorScope !== undefined) {
301
+ wire.operator_scope = config.operatorScope;
302
+ }
303
+ if (config.distiller !== undefined) {
304
+ if (typeof config.distiller === "boolean") {
305
+ wire.distiller = config.distiller;
306
+ }
307
+ else {
308
+ rejectUnknownKeys(config.distiller, DISTILLER_KEYS, "agentMemory distiller");
309
+ const distiller = {};
310
+ if (config.distiller.enabled !== undefined) {
311
+ distiller.enabled = config.distiller.enabled;
312
+ }
313
+ if (config.distiller.runsPerHour !== undefined) {
314
+ distiller.runs_per_hour = config.distiller.runsPerHour;
315
+ }
316
+ if (config.distiller.minInteractions !== undefined) {
317
+ distiller.min_interactions = config.distiller.minInteractions;
318
+ }
319
+ if (config.distiller.model !== undefined) {
320
+ distiller.model = config.distiller.model;
321
+ }
322
+ wire.distiller = distiller;
323
+ }
324
+ }
325
+ if (config.steward !== undefined) {
326
+ if (typeof config.steward === "boolean") {
327
+ wire.steward = config.steward;
328
+ }
329
+ else {
330
+ rejectUnknownKeys(config.steward, STEWARD_KEYS, "agentMemory steward");
331
+ const steward = {};
332
+ if (config.steward.enabled !== undefined) {
333
+ steward.enabled = config.steward.enabled;
334
+ }
335
+ if (config.steward.cadence !== undefined) {
336
+ steward.cadence = config.steward.cadence;
337
+ }
338
+ if (config.steward.model !== undefined) {
339
+ steward.model = config.steward.model;
340
+ }
341
+ if (config.steward.perMob !== undefined) {
342
+ steward.per_mob = config.steward.perMob;
343
+ }
344
+ if (config.steward.runsPerDay !== undefined) {
345
+ steward.runs_per_day = config.steward.runsPerDay;
346
+ }
347
+ if (config.steward.minSignals !== undefined) {
348
+ steward.min_signals = config.steward.minSignals;
349
+ }
350
+ wire.steward = steward;
351
+ }
352
+ }
353
+ if (config.hygienist !== undefined) {
354
+ if (typeof config.hygienist === "boolean") {
355
+ wire.hygienist = config.hygienist;
356
+ }
357
+ else {
358
+ rejectUnknownKeys(config.hygienist, HYGIENIST_KEYS, "agentMemory hygienist");
359
+ const hygienist = {};
360
+ if (config.hygienist.enabled !== undefined) {
361
+ hygienist.enabled = config.hygienist.enabled;
362
+ }
363
+ if (config.hygienist.runsPerDay !== undefined) {
364
+ hygienist.runs_per_day = config.hygienist.runsPerDay;
365
+ }
366
+ if (config.hygienist.model !== undefined) {
367
+ hygienist.model = config.hygienist.model;
368
+ }
369
+ wire.hygienist = hygienist;
370
+ }
371
+ }
215
372
  this._config.agentMemoryConfig = wire;
216
373
  return this;
217
374
  }
@@ -7,7 +7,7 @@
7
7
  * import { auth, memory, sessionStore } from "@rkat/mobkit-sdk";
8
8
  *
9
9
  * const authConfig = auth.google("my-client-id");
10
- * const memConfig = memory.elephant("http://elephant:8080");
10
+ * const memConfig = memory.localJson();
11
11
  * const storeConfig = sessionStore.json("./sessions.json");
12
12
  * ```
13
13
  */
@@ -1,11 +1,45 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Memory backend configuration for MobKit runtime.
4
+ *
5
+ * The operational memory ledger (`mobkit/memory/*`) is persisted by the
6
+ * gateway as local JSON under `persistent_state`, with an optional HTTP
7
+ * health-check gate. `localJson()` is the honest configuration for that
8
+ * backend; `elephant()` is a deprecated alias kept for wire compatibility
9
+ * with older gateways (it never wrote data to Elephant).
4
10
  */
5
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.localJson = localJson;
6
13
  exports.elephant = elephant;
7
14
  exports.elephantMemoryConfigToDict = elephantMemoryConfigToDict;
15
+ function localJson(options) {
16
+ const config = {
17
+ healthCheckEndpoint: options?.healthCheckEndpoint ?? null,
18
+ toDict() {
19
+ const result = { backend: "local_json" };
20
+ if (config.healthCheckEndpoint !== null) {
21
+ result.health_check_endpoint = config.healthCheckEndpoint;
22
+ }
23
+ return result;
24
+ },
25
+ };
26
+ return config;
27
+ }
28
+ let warnedElephantDeprecated = false;
29
+ /**
30
+ * @deprecated Use {@link localJson} instead. Despite the name, this backend
31
+ * never sent data to Elephant: the gateway only health-checks `endpoint` and
32
+ * persists the ledger as local JSON. `spaceId`, `collection`, and `stores`
33
+ * are not sent to the gateway and have never had any effect. The legacy wire
34
+ * shape is still emitted for compatibility with older gateways.
35
+ */
8
36
  function elephant(endpoint, options) {
37
+ if (!warnedElephantDeprecated) {
38
+ warnedElephantDeprecated = true;
39
+ console.warn("memory.elephant() is deprecated: it only health-checks the endpoint and " +
40
+ "persists the operational ledger as local JSON; use " +
41
+ "memory.localJson({ healthCheckEndpoint }) instead");
42
+ }
9
43
  const config = {
10
44
  endpoint,
11
45
  spaceId: options?.spaceId ?? null,
@@ -17,6 +51,7 @@ function elephant(endpoint, options) {
17
51
  };
18
52
  return config;
19
53
  }
54
+ /** @deprecated See {@link elephant}. */
20
55
  function elephantMemoryConfigToDict(config) {
21
56
  const result = {
22
57
  backend: "elephant",
@@ -26,9 +26,9 @@
26
26
  */
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  exports.parseDeliveryResult = exports.parseRoutingResolution = exports.parseSendMessageResult = exports.parseSubscribeResult = exports.parseEventEnvelope = exports.parseKeepAliveConfig = exports.parseSpawnResult = exports.parseReconcileResult = exports.parseCapabilitiesResult = exports.parseStatusResult = exports.ErrorCategory = exports.MEMBER_STATE_UNKNOWN = exports.MEMBER_STATE_COMPLETED = exports.MEMBER_STATE_BROKEN = exports.MEMBER_STATE_RETIRING = exports.MEMBER_STATE_ACTIVE = exports.isMobEventsStaleError = exports.isRpcError = exports.MobkitRpcError = exports.NotConnectedError = exports.ContractMismatchError = exports.MemoryBackendUnavailableError = exports.LeaseLostError = exports.ConsoleTimelineReplayUnavailableError = exports.CapabilityUnavailableError = exports.MEMORY_BACKEND_UNAVAILABLE_CODE = exports.LEASE_LOST_CODE = exports.CONSOLE_TIMELINE_REPLAY_UNAVAILABLE_CODE = exports.CAPABILITY_UNAVAILABLE_CODE = exports.MOB_EVENTS_STALE_CURSOR_CODE = exports.MobEventsStaleError = exports.RpcError = exports.TransportError = exports.MobKitError = exports.CallbackDispatcher = exports.sessionQueryToDict = exports.preSpawnDataToDict = exports.discoverySpecToDict = exports.SessionBuildOptions = exports.ToolResultContent = exports.toolContent = exports.imageBlobBlock = exports.imageBlock = exports.textBlock = exports.SseBridge = exports.ToolCaller = exports.MobHandle = exports.MobKitRuntime = exports.MobKitBuilder = exports.MobKit = void 0;
29
- exports.parseLoopIterationRecord = exports.parseLoopRecord = exports.parseFrameRecord = exports.parseFailureRecord = exports.parseStepRecord = exports.parseMobpackDeployResult = exports.parseMobpackDeployCommandResult = exports.parseMobpackApplyOperationResult = exports.parseMobpackDraftHistoryResult = exports.parseMobpackDraftDeleteResult = exports.parseMobpackDraftSaveResult = exports.parseMobpackDraftGetResult = exports.parseMobpackDraftListResult = exports.parseMobpackDraftRow = exports.parseMobpackImportResult = exports.parseMobpackExportResult = exports.parseMobpackSourceResult = exports.parseMobpackSourceFile = exports.parseMobpackValidationResult = exports.parseMobpackDisplayRow = exports.parseMobpackDiagnostic = exports.parseMobpackCatalogsResult = exports.parseMobpackTemplatesResult = exports.parseMobpackAgentDefinitionsResult = exports.parseMobpackSkillsCatalogResult = exports.parseMobpackToolsCatalogResult = exports.parseModelsCatalogResult = exports.parseCrossMobContactEntry = exports.parseMobRunSnapshot = exports.parseHelperResult = exports.parseRichMemberSnapshot = exports.parseMobRun = exports.parseMobStructuralEvent = exports.parsePersistedEvent = exports.parseReconcileEdgesReport = exports.parseRediscoverReport = exports.parseGatingPendingEntry = exports.parseGatingAuditEntry = exports.parseGatingDecisionResult = exports.parseGatingEvaluateResult = exports.parseRuntimeRouteResult = exports.parseMemberSnapshot = exports.parseCallToolResult = exports.parseMemoryIndexResult = exports.parseMemoryStoreInfo = exports.parseAgentMemoryForgetResult = exports.parseAgentMemoryRecallResult = exports.parseAgentMemoryRecord = exports.parseMemoryQueryResult = exports.parseDeliveryHistoryResult = void 0;
30
- exports.PersistentTransport = exports.buildConsoleRoutes = exports.buildConsoleExperienceRoute = exports.buildConsoleModulesRoute = exports.buildConsoleRoute = exports.defineModule = exports.defineModuleTool = exports.decorateModuleTool = exports.decorateModuleSpec = exports.defineModuleSpec = exports.sessionStore = exports.memory = exports.auth = exports.EventStream = exports.isToolCallRequested = exports.isTurnCompleted = exports.isRunFailed = exports.isRunCompleted = exports.isTextComplete = exports.isTextDelta = exports.parseAgentEventFromSse = exports.parseMobEventFromSse = exports.parseAgentEvent = exports.parseBlobUploadResult = exports.leaseRenewResultToDict = exports.parseLeaseRenewResult = exports.leaseAcquireResultToDict = exports.parseLeaseAcquireResult = exports.leaseGrantToDict = exports.parseLeaseGrant = exports.sessionSnapshotToDict = exports.parseSessionSnapshot = exports.parseContinuityResolveState = exports.parseContinuityFailure = exports.continuityRecordToDict = exports.parseContinuityRecord = exports.parseIdentityStatus = exports.agentBuildDraftToDict = exports.parseAgentBuildDraft = exports.parseAgentBuildContext = exports.externalToolDefToDict = exports.parseExternalToolDef = exports.managedPeerEdgeToDict = exports.parseManagedPeerEdge = exports.dispatchInputToDict = exports.parseDispatchInput = exports.durableAgentSpecToDict = exports.parseDurableAgentSpec = exports.eventQueryToDict = exports.parseErrorEvent = void 0;
31
- exports.MobkitAsyncClient = exports.MobkitTypedClient = exports.encodeSseEvent = exports.parseSseStream = exports.createJsonRpcHttpTransport = exports.createGatewayAsyncTransport = exports.createGatewaySyncTransport = exports.buildJsonRpcRequest = void 0;
29
+ exports.parseStepRecord = exports.parseMobpackDeployResult = exports.parseMobpackDeployCommandResult = exports.parseMobpackApplyOperationResult = exports.parseMobpackDraftHistoryResult = exports.parseMobpackDraftDeleteResult = exports.parseMobpackDraftSaveResult = exports.parseMobpackDraftGetResult = exports.parseMobpackDraftListResult = exports.parseMobpackDraftRow = exports.parseMobpackImportResult = exports.parseMobpackExportResult = exports.parseMobpackSourceResult = exports.parseMobpackSourceFile = exports.parseMobpackValidationResult = exports.parseMobpackDisplayRow = exports.parseMobpackDiagnostic = exports.parseMobpackCatalogsResult = exports.parseMobpackTemplatesResult = exports.parseMobpackAgentDefinitionsResult = exports.parseMobpackSkillsCatalogResult = exports.parseMobpackToolsCatalogResult = exports.parseModelsCatalogResult = exports.parseCrossMobContactEntry = exports.parseMobRunSnapshot = exports.parseHelperResult = exports.parseIdentityResolvedToolsResult = exports.parseRichMemberSnapshot = exports.parseMobRun = exports.parseMobStructuralEvent = exports.parsePersistedEvent = exports.parseReconcileEdgesReport = exports.parseRediscoverReport = exports.parseGatingPendingEntry = exports.parseGatingAuditEntry = exports.parseGatingDecisionResult = exports.parseGatingEvaluateResult = exports.parseRuntimeRouteResult = exports.parseMemberSnapshot = exports.parseCallToolResult = exports.parseMemoryIndexResult = exports.parseMemoryStoreInfo = exports.parseAgentMemoryManifestResult = exports.parseAgentMemoryUpdateResult = exports.parseAgentMemoryForgetResult = exports.parseAgentMemoryRecallResult = exports.parseAgentMemoryRecordMeta = exports.parseAgentMemoryRecord = exports.parseMemoryQueryResult = exports.parseDeliveryHistoryResult = void 0;
30
+ exports.buildConsoleRoute = exports.defineModule = exports.defineModuleTool = exports.decorateModuleTool = exports.decorateModuleSpec = exports.defineModuleSpec = exports.sessionStore = exports.memory = exports.auth = exports.EventStream = exports.isToolCallRequested = exports.isTurnCompleted = exports.isRunFailed = exports.isRunCompleted = exports.isTextComplete = exports.isTextDelta = exports.parseAgentEventFromSse = exports.parseMobEventFromSse = exports.parseAgentEvent = exports.parseBlobUploadResult = exports.leaseRenewResultToDict = exports.parseLeaseRenewResult = exports.leaseAcquireResultToDict = exports.parseLeaseAcquireResult = exports.leaseGrantToDict = exports.parseLeaseGrant = exports.sessionSnapshotToDict = exports.parseSessionSnapshot = exports.parseContinuityResolveState = exports.parseContinuityFailure = exports.continuityRecordToDict = exports.parseContinuityRecord = exports.parseIdentityStatus = exports.agentBuildDraftToDict = exports.parseAgentBuildDraft = exports.parseAgentBuildContext = exports.externalToolDefToDict = exports.parseExternalToolDef = exports.managedPeerEdgeToDict = exports.parseManagedPeerEdge = exports.dispatchInputToDict = exports.parseDispatchInput = exports.durableAgentSpecToDict = exports.parseDurableAgentSpec = exports.eventQueryToDict = exports.parseErrorEvent = exports.parseLoopIterationRecord = exports.parseLoopRecord = exports.parseFrameRecord = exports.parseFailureRecord = void 0;
31
+ exports.MobkitAsyncClient = exports.MobkitTypedClient = exports.encodeSseEvent = exports.parseSseStream = exports.createJsonRpcHttpTransport = exports.createGatewayAsyncTransport = exports.createGatewaySyncTransport = exports.buildJsonRpcRequest = exports.PersistentTransport = exports.buildConsoleRoutes = exports.buildConsoleExperienceRoute = exports.buildConsoleModulesRoute = void 0;
32
32
  // -- Builder + Runtime ----------------------------------------------------
33
33
  var builder_js_1 = require("./builder.cjs");
34
34
  Object.defineProperty(exports, "MobKit", { enumerable: true, get: function () { return builder_js_1.MobKit; } });
@@ -95,8 +95,11 @@ Object.defineProperty(exports, "parseDeliveryResult", { enumerable: true, get: f
95
95
  Object.defineProperty(exports, "parseDeliveryHistoryResult", { enumerable: true, get: function () { return types_js_1.parseDeliveryHistoryResult; } });
96
96
  Object.defineProperty(exports, "parseMemoryQueryResult", { enumerable: true, get: function () { return types_js_1.parseMemoryQueryResult; } });
97
97
  Object.defineProperty(exports, "parseAgentMemoryRecord", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryRecord; } });
98
+ Object.defineProperty(exports, "parseAgentMemoryRecordMeta", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryRecordMeta; } });
98
99
  Object.defineProperty(exports, "parseAgentMemoryRecallResult", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryRecallResult; } });
99
100
  Object.defineProperty(exports, "parseAgentMemoryForgetResult", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryForgetResult; } });
101
+ Object.defineProperty(exports, "parseAgentMemoryUpdateResult", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryUpdateResult; } });
102
+ Object.defineProperty(exports, "parseAgentMemoryManifestResult", { enumerable: true, get: function () { return types_js_1.parseAgentMemoryManifestResult; } });
100
103
  Object.defineProperty(exports, "parseMemoryStoreInfo", { enumerable: true, get: function () { return types_js_1.parseMemoryStoreInfo; } });
101
104
  Object.defineProperty(exports, "parseMemoryIndexResult", { enumerable: true, get: function () { return types_js_1.parseMemoryIndexResult; } });
102
105
  Object.defineProperty(exports, "parseCallToolResult", { enumerable: true, get: function () { return types_js_1.parseCallToolResult; } });
@@ -112,6 +115,7 @@ Object.defineProperty(exports, "parsePersistedEvent", { enumerable: true, get: f
112
115
  Object.defineProperty(exports, "parseMobStructuralEvent", { enumerable: true, get: function () { return types_js_1.parseMobStructuralEvent; } });
113
116
  Object.defineProperty(exports, "parseMobRun", { enumerable: true, get: function () { return types_js_1.parseMobRun; } });
114
117
  Object.defineProperty(exports, "parseRichMemberSnapshot", { enumerable: true, get: function () { return types_js_1.parseRichMemberSnapshot; } });
118
+ Object.defineProperty(exports, "parseIdentityResolvedToolsResult", { enumerable: true, get: function () { return types_js_1.parseIdentityResolvedToolsResult; } });
115
119
  Object.defineProperty(exports, "parseHelperResult", { enumerable: true, get: function () { return types_js_1.parseHelperResult; } });
116
120
  Object.defineProperty(exports, "parseMobRunSnapshot", { enumerable: true, get: function () { return types_js_1.parseMobRunSnapshot; } });
117
121
  Object.defineProperty(exports, "parseCrossMobContactEntry", { enumerable: true, get: function () { return types_js_1.parseCrossMobContactEntry; } });
@@ -809,6 +809,13 @@ class MobHandle {
809
809
  async memberStatus(memberId) {
810
810
  return (0, types_js_1.parseRichMemberSnapshot)(await this._runtime._rpc("mobkit/member_status", { member_id: memberId }));
811
811
  }
812
+ async identityResolvedTools(identity) {
813
+ const result = await this.identityResolvedToolsDetail(identity);
814
+ return result.tools;
815
+ }
816
+ async identityResolvedToolsDetail(identity) {
817
+ return (0, types_js_1.parseIdentityResolvedToolsResult)(await this._runtime._rpc("mobkit/identity/resolved_tools", { identity }));
818
+ }
812
819
  async forceCancelMember(memberId) {
813
820
  await this._runtime._rpc("mobkit/force_cancel_member", {
814
821
  member_id: memberId,
@@ -1010,9 +1017,9 @@ class MobHandle {
1010
1017
  * Query the operational memory assertion ledger.
1011
1018
  *
1012
1019
  * Pass `{ entity, topic, store }` for the Rust gateway's exact-filter
1013
- * contract. The string overload is retained only for older callers and is
1014
- * forwarded as `query`; current Rust gateways do not perform semantic search
1015
- * on that field.
1020
+ * contract. The string overload is forwarded as `query`, which the gateway
1021
+ * applies as a case-insensitive substring filter across entity, topic, and
1022
+ * fact (reason for conflict signals), after the exact filters.
1016
1023
  */
1017
1024
  async memoryQuery(queryOrOptions, options) {
1018
1025
  const params = typeof queryOrOptions === "string"
@@ -1068,6 +1075,40 @@ class MobHandle {
1068
1075
  params.realm = options.realm;
1069
1076
  return (0, types_js_1.parseAgentMemoryForgetResult)(await this._runtime._rpc("mobkit/agent_memory/forget", params));
1070
1077
  }
1078
+ /**
1079
+ * Supersede a durable memory record within its lineage: the new
1080
+ * title/body/tags become the active record; the prior stays retrievable
1081
+ * with provenance and is no longer recalled.
1082
+ */
1083
+ async updateAgentMemory(identity, memoryId, memory) {
1084
+ const params = {
1085
+ identity,
1086
+ memory_id: memoryId,
1087
+ title: memory.title,
1088
+ body: memory.body,
1089
+ };
1090
+ if (memory.realm !== undefined)
1091
+ params.realm = memory.realm;
1092
+ if (memory.tags !== undefined)
1093
+ params.tags = [...memory.tags];
1094
+ return (0, types_js_1.parseAgentMemoryUpdateResult)(await this._runtime._rpc("mobkit/agent_memory/update", params));
1095
+ }
1096
+ /**
1097
+ * List durable memory record metadata (id/kind/title/description/age/rank
1098
+ * — never bodies). Tier "working_set" (default) returns the top-K ranked
1099
+ * records plus the recent/unranked slice; "full" returns everything.
1100
+ */
1101
+ async manifestAgentMemory(identity, options = {}) {
1102
+ const params = { identity };
1103
+ if (options.realm !== undefined)
1104
+ params.realm = options.realm;
1105
+ if (options.tier !== undefined)
1106
+ params.tier = options.tier;
1107
+ if (options.k !== undefined)
1108
+ params.k = options.k;
1109
+ const result = (0, types_js_1.parseAgentMemoryManifestResult)(await this._runtime._rpc("mobkit/agent_memory/manifest", params));
1110
+ return [...result.records];
1111
+ }
1071
1112
  // -- Tools --------------------------------------------------------------
1072
1113
  async callTool(moduleId, tool, args) {
1073
1114
  const params = { module_id: moduleId, tool };