@rkat/web 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.d.ts +181 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +134 -0
- package/dist/auth.js.map +1 -0
- package/dist/events.d.ts +1 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +3 -0
- package/dist/events.js.map +1 -1
- package/dist/generated/auth.d.ts +247 -0
- package/dist/generated/auth.d.ts.map +1 -0
- package/dist/generated/auth.js +502 -0
- package/dist/generated/auth.js.map +1 -0
- package/dist/generated/events.d.ts +226 -54
- package/dist/generated/events.d.ts.map +1 -1
- package/dist/generated/events.js +5 -3
- package/dist/generated/events.js.map +1 -1
- package/dist/generated/mob.d.ts +50 -0
- package/dist/generated/mob.d.ts.map +1 -0
- package/dist/generated/mob.js +4 -0
- package/dist/generated/mob.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mob.d.ts +23 -21
- package/dist/mob.d.ts.map +1 -1
- package/dist/mob.js +510 -47
- package/dist/mob.js.map +1 -1
- package/dist/runtime.d.ts +8 -8
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +29 -8
- package/dist/runtime.js.map +1 -1
- package/dist/session.d.ts +9 -6
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +44 -33
- package/dist/session.js.map +1 -1
- package/dist/types.d.ts +91 -45
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +67 -1
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
- package/wasm/.meerkat-wasm-build.json +5 -0
- package/wasm/meerkat_web_runtime.d.ts +68 -34
- package/wasm/meerkat_web_runtime.js +132 -67
- package/wasm/meerkat_web_runtime_bg.wasm +0 -0
- package/wasm/meerkat_web_runtime_bg.wasm.d.ts +12 -8
- package/wasm/package.json +1 -1
|
@@ -82,11 +82,18 @@ export function destroy_session(handle: number): void;
|
|
|
82
82
|
*/
|
|
83
83
|
export function get_session_state(handle: number): string;
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Returns `true` if a JS-side external-auth resolver has been
|
|
87
|
+
* registered. Exposed to the browser so host pages can verify their
|
|
88
|
+
* registration before creating a session.
|
|
89
|
+
*/
|
|
90
|
+
export function has_external_auth_resolver(): boolean;
|
|
91
|
+
|
|
85
92
|
/**
|
|
86
93
|
* Primary bootstrap: parse a mobpack and create service infrastructure.
|
|
87
94
|
*
|
|
88
95
|
* `mobpack_bytes`: tar.gz mobpack archive.
|
|
89
|
-
* `credentials_json`: `{ "
|
|
96
|
+
* `credentials_json`: `{ "anthropic_api_key"?: "...", "openai_api_key"?: "...", "gemini_api_key"?: "...", "model"?: "claude-sonnet-4-5" }`
|
|
90
97
|
*
|
|
91
98
|
* Stores an `EphemeralSessionService<FactoryAgentBuilder>` and a `MobMcpState`
|
|
92
99
|
* in a `thread_local! RuntimeState` for subsequent mob/comms calls.
|
|
@@ -96,7 +103,7 @@ export function init_runtime(mobpack_bytes: Uint8Array, credentials_json: string
|
|
|
96
103
|
/**
|
|
97
104
|
* Advanced bare-bones bootstrap without a mobpack.
|
|
98
105
|
*
|
|
99
|
-
* `config_json`: `{ "
|
|
106
|
+
* `config_json`: `{ "anthropic_api_key"?: "...", "openai_api_key"?: "...", "gemini_api_key"?: "...", "model"?: "claude-sonnet-4-5", "max_sessions"?: 100000 }`
|
|
100
107
|
*/
|
|
101
108
|
export function init_runtime_from_config(config_json: string): any;
|
|
102
109
|
|
|
@@ -108,7 +115,7 @@ export function inspect_mobpack(mobpack_bytes: Uint8Array): string;
|
|
|
108
115
|
/**
|
|
109
116
|
* Append runtime system context to an individual mob member's session.
|
|
110
117
|
*/
|
|
111
|
-
export function mob_append_system_context(mob_id: string,
|
|
118
|
+
export function mob_append_system_context(mob_id: string, agent_identity: string, request_json: string): Promise<any>;
|
|
112
119
|
|
|
113
120
|
/**
|
|
114
121
|
* Cancel an in-flight flow run.
|
|
@@ -135,14 +142,15 @@ export function mob_events(mob_id: string, after_cursor: number, limit: number):
|
|
|
135
142
|
/**
|
|
136
143
|
* Read flow run status.
|
|
137
144
|
*
|
|
138
|
-
* Returns
|
|
145
|
+
* Returns a generated `MobFlowStatusResult` JSON envelope whose `run` field
|
|
146
|
+
* carries run state and ledgers, or null when not found.
|
|
139
147
|
*/
|
|
140
148
|
export function mob_flow_status(mob_id: string, run_id: string): Promise<any>;
|
|
141
149
|
|
|
142
150
|
/**
|
|
143
151
|
* Force-cancel an active mob member turn.
|
|
144
152
|
*/
|
|
145
|
-
export function mob_force_cancel(mob_id: string,
|
|
153
|
+
export function mob_force_cancel(mob_id: string, agent_identity: string): Promise<void>;
|
|
146
154
|
|
|
147
155
|
/**
|
|
148
156
|
* Fork a short-lived helper from an existing member and return its terminal result.
|
|
@@ -152,14 +160,15 @@ export function mob_fork_helper(mob_id: string, request_json: string): Promise<a
|
|
|
152
160
|
/**
|
|
153
161
|
* Perform a lifecycle action on a mob.
|
|
154
162
|
*
|
|
155
|
-
* `action
|
|
163
|
+
* `action` is a compatibility string carrier that is immediately
|
|
164
|
+
* deserialized into the typed wire lifecycle action contract.
|
|
156
165
|
*/
|
|
157
166
|
export function mob_lifecycle(mob_id: string, action: string): Promise<void>;
|
|
158
167
|
|
|
159
168
|
/**
|
|
160
169
|
* List all mobs.
|
|
161
170
|
*
|
|
162
|
-
* Returns
|
|
171
|
+
* Returns a generated `MobListResult` JSON envelope.
|
|
163
172
|
*/
|
|
164
173
|
export function mob_list(): Promise<any>;
|
|
165
174
|
|
|
@@ -171,16 +180,16 @@ export function mob_list(): Promise<any>;
|
|
|
171
180
|
export function mob_list_members(mob_id: string): Promise<any>;
|
|
172
181
|
|
|
173
182
|
/**
|
|
174
|
-
* Send external work to a spawned
|
|
183
|
+
* Send external work to a spawned member through the canonical member path.
|
|
175
184
|
*
|
|
176
185
|
* Returns a JSON-encoded delivery receipt.
|
|
177
186
|
*/
|
|
178
|
-
export function mob_member_send(mob_id: string,
|
|
187
|
+
export function mob_member_send(mob_id: string, agent_identity: string, request_json: string): Promise<string>;
|
|
179
188
|
|
|
180
189
|
/**
|
|
181
190
|
* Read the current execution snapshot for a mob member.
|
|
182
191
|
*/
|
|
183
|
-
export function mob_member_status(mob_id: string,
|
|
192
|
+
export function mob_member_status(mob_id: string, agent_identity: string): Promise<any>;
|
|
184
193
|
|
|
185
194
|
/**
|
|
186
195
|
* Subscribe to a mob member's session event stream.
|
|
@@ -191,19 +200,19 @@ export function mob_member_status(mob_id: string, meerkat_id: string): Promise<a
|
|
|
191
200
|
* The subscription captures ALL agent activity: text deltas, tool calls
|
|
192
201
|
* (including comms send_message/peers), turn completions, etc.
|
|
193
202
|
*/
|
|
194
|
-
export function mob_member_subscribe(mob_id: string,
|
|
203
|
+
export function mob_member_subscribe(mob_id: string, agent_identity: string): Promise<number>;
|
|
195
204
|
|
|
196
205
|
/**
|
|
197
|
-
* Retire and re-spawn a
|
|
206
|
+
* Retire and re-spawn a member with the same profile.
|
|
198
207
|
*
|
|
199
208
|
* Returns JSON result envelope with receipt.
|
|
200
209
|
*/
|
|
201
|
-
export function mob_respawn(mob_id: string,
|
|
210
|
+
export function mob_respawn(mob_id: string, agent_identity: string, initial_message?: string | null): Promise<any>;
|
|
202
211
|
|
|
203
212
|
/**
|
|
204
|
-
* Retire a
|
|
213
|
+
* Retire a member from a mob.
|
|
205
214
|
*/
|
|
206
|
-
export function mob_retire(mob_id: string,
|
|
215
|
+
export function mob_retire(mob_id: string, agent_identity: string): Promise<void>;
|
|
207
216
|
|
|
208
217
|
/**
|
|
209
218
|
* Start a configured flow run.
|
|
@@ -213,12 +222,12 @@ export function mob_retire(mob_id: string, meerkat_id: string): Promise<void>;
|
|
|
213
222
|
export function mob_run_flow(mob_id: string, flow_id: string, params_json: string): Promise<any>;
|
|
214
223
|
|
|
215
224
|
/**
|
|
216
|
-
* Spawn one or more
|
|
225
|
+
* Spawn one or more members in a mob.
|
|
217
226
|
*
|
|
218
|
-
* `specs_json`: JSON array of `{ "profile": "...", "
|
|
227
|
+
* `specs_json`: JSON array of `{ "profile": "...", "agent_identity": "...", "initial_message"?: "...",
|
|
219
228
|
* "runtime_mode"?: "autonomous_host"|"turn_driven", "backend"?: "session"|"external" }`
|
|
220
229
|
*
|
|
221
|
-
* Returns JSON array of
|
|
230
|
+
* Returns JSON array of typed result entries per spec.
|
|
222
231
|
*/
|
|
223
232
|
export function mob_spawn(mob_id: string, specs_json: string): Promise<any>;
|
|
224
233
|
|
|
@@ -230,7 +239,7 @@ export function mob_spawn_helper(mob_id: string, request_json: string): Promise<
|
|
|
230
239
|
/**
|
|
231
240
|
* Get the status of a mob.
|
|
232
241
|
*
|
|
233
|
-
* Returns JSON with the mob state.
|
|
242
|
+
* Returns JSON with the generated mob status plus the legacy state projection.
|
|
234
243
|
*/
|
|
235
244
|
export function mob_status(mob_id: string): Promise<any>;
|
|
236
245
|
|
|
@@ -241,13 +250,13 @@ export function mob_status(mob_id: string): Promise<any>;
|
|
|
241
250
|
* buffered events. Each call returns all events since the last poll.
|
|
242
251
|
*
|
|
243
252
|
* Unlike `mob_member_subscribe` which streams a single member's agent events,
|
|
244
|
-
* this streams [`AttributedEvent`]s tagged with source
|
|
253
|
+
* this streams [`AttributedEvent`]s tagged with source runtime identity and role
|
|
245
254
|
* for every member in the mob, automatically tracking roster changes.
|
|
246
255
|
*/
|
|
247
256
|
export function mob_subscribe_events(mob_id: string): Promise<number>;
|
|
248
257
|
|
|
249
258
|
/**
|
|
250
|
-
* Unwire bidirectional trust between two
|
|
259
|
+
* Unwire bidirectional trust between two members.
|
|
251
260
|
*/
|
|
252
261
|
export function mob_unwire(mob_id: string, a: string, b: string): Promise<void>;
|
|
253
262
|
|
|
@@ -257,12 +266,12 @@ export function mob_unwire(mob_id: string, a: string, b: string): Promise<void>;
|
|
|
257
266
|
export function mob_unwire_peer(mob_id: string, member: string, peer_json: string): Promise<void>;
|
|
258
267
|
|
|
259
268
|
/**
|
|
260
|
-
* Unwire a local
|
|
269
|
+
* Unwire a local member from a local or external peer target.
|
|
261
270
|
*/
|
|
262
271
|
export function mob_unwire_target(mob_id: string, local: string, target_json: string): Promise<void>;
|
|
263
272
|
|
|
264
273
|
/**
|
|
265
|
-
* Wire bidirectional trust between two
|
|
274
|
+
* Wire bidirectional trust between two members.
|
|
266
275
|
*/
|
|
267
276
|
export function mob_wire(mob_id: string, a: string, b: string): Promise<void>;
|
|
268
277
|
|
|
@@ -272,7 +281,7 @@ export function mob_wire(mob_id: string, a: string, b: string): Promise<void>;
|
|
|
272
281
|
export function mob_wire_peer(mob_id: string, member: string, peer_json: string): Promise<void>;
|
|
273
282
|
|
|
274
283
|
/**
|
|
275
|
-
* Wire a local
|
|
284
|
+
* Wire a local member to a local or external peer target.
|
|
276
285
|
*/
|
|
277
286
|
export function mob_wire_target(mob_id: string, local: string, target_json: string): Promise<void>;
|
|
278
287
|
|
|
@@ -289,6 +298,8 @@ export function poll_events(handle: number): string;
|
|
|
289
298
|
*
|
|
290
299
|
* Returns a JSON array of event objects. Drains all buffered events
|
|
291
300
|
* since the last poll. Non-blocking: returns `[]` if no new events.
|
|
301
|
+
* If any buffered event cannot be projected to JSON, returns a typed
|
|
302
|
+
* `serialize_error` instead of silently omitting the event.
|
|
292
303
|
*
|
|
293
304
|
* For per-member subscriptions (`mob_member_subscribe`), returns
|
|
294
305
|
* `EventEnvelope<AgentEvent>` objects. For mob-wide subscriptions
|
|
@@ -297,6 +308,25 @@ export function poll_events(handle: number): string;
|
|
|
297
308
|
*/
|
|
298
309
|
export function poll_subscription(handle: number): string;
|
|
299
310
|
|
|
311
|
+
/**
|
|
312
|
+
* Register a JS-side external-auth resolver. The callback receives a
|
|
313
|
+
* structural auth binding reference argument (`{ realm, binding, profile? }`)
|
|
314
|
+
* and must return a Promise that resolves to a JSON-serializable
|
|
315
|
+
* `ResolvedAuthEnvelope` object.
|
|
316
|
+
*
|
|
317
|
+
* Lease-bearing credentials must use the typed object form:
|
|
318
|
+
* `{ kind: "inline_secret", secret, metadata, expires_at? }`.
|
|
319
|
+
* Structured failures should reject the Promise with a wire auth error
|
|
320
|
+
* object, e.g. `{ kind: "interactive_login_required" }` or
|
|
321
|
+
* `{ kind: "refresh_failed", detail }`.
|
|
322
|
+
*
|
|
323
|
+
* Subsequent registrations overwrite the previous one. Passing
|
|
324
|
+
* `undefined` clears the registration.
|
|
325
|
+
*
|
|
326
|
+
* Plan §Phase 4d.wasm.1.
|
|
327
|
+
*/
|
|
328
|
+
export function register_external_auth_resolver(callback: any): void;
|
|
329
|
+
|
|
300
330
|
/**
|
|
301
331
|
* Register a fire-and-forget tool from JavaScript.
|
|
302
332
|
*
|
|
@@ -357,7 +387,7 @@ export function runtime_version(): string;
|
|
|
357
387
|
* Only rejects (Err) for infrastructure errors (session not found, busy, etc).
|
|
358
388
|
* Agent-level errors (LLM failure, timeout) resolve with `status: "failed"` + `error` field.
|
|
359
389
|
*/
|
|
360
|
-
export function start_turn(handle: number, prompt: string
|
|
390
|
+
export function start_turn(handle: number, prompt: string): Promise<any>;
|
|
361
391
|
|
|
362
392
|
/**
|
|
363
393
|
* Entry point invoked by JavaScript in a worker.
|
|
@@ -371,12 +401,14 @@ export function task_worker_entry_point(ptr: number): void;
|
|
|
371
401
|
* mob boundaries by accessing each member's comms runtime through the shared
|
|
372
402
|
* session service. Both members must have comms enabled.
|
|
373
403
|
*/
|
|
374
|
-
export function wire_cross_mob(mob_a: string,
|
|
404
|
+
export function wire_cross_mob(mob_a: string, agent_a: string, mob_b: string, agent_b: string): Promise<void>;
|
|
375
405
|
|
|
376
406
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
377
407
|
|
|
378
408
|
export interface InitOutput {
|
|
379
409
|
readonly memory: WebAssembly.Memory;
|
|
410
|
+
readonly has_external_auth_resolver: () => number;
|
|
411
|
+
readonly register_external_auth_resolver: (a: any) => [number, number];
|
|
380
412
|
readonly append_system_context: (a: number, b: number, c: number) => any;
|
|
381
413
|
readonly close_subscription: (a: number) => [number, number];
|
|
382
414
|
readonly create_session: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
@@ -418,9 +450,11 @@ export interface InitOutput {
|
|
|
418
450
|
readonly register_js_tool: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
419
451
|
readonly register_tool_callback: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number];
|
|
420
452
|
readonly runtime_version: () => [number, number];
|
|
421
|
-
readonly start_turn: (a: number, b: number, c: number
|
|
453
|
+
readonly start_turn: (a: number, b: number, c: number) => any;
|
|
422
454
|
readonly wire_cross_mob: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
423
455
|
readonly clear_tool_callbacks: () => void;
|
|
456
|
+
readonly __meerkat_agent_factory_policy_build_v3_22bac767e5ac2bbb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
457
|
+
readonly __meerkat_agent_factory_policy_bridge_token_is_valid_v1_22bac767e5ac2bbb: (a: number, b: number) => number;
|
|
424
458
|
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
425
459
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
426
460
|
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
@@ -435,13 +469,13 @@ export interface InitOutput {
|
|
|
435
469
|
readonly intounderlyingbytesource_start: (a: number, b: any) => void;
|
|
436
470
|
readonly intounderlyingbytesource_type: (a: number) => number;
|
|
437
471
|
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
438
|
-
readonly
|
|
439
|
-
readonly
|
|
440
|
-
readonly
|
|
441
|
-
readonly
|
|
442
|
-
readonly
|
|
443
|
-
readonly
|
|
444
|
-
readonly
|
|
472
|
+
readonly wasm_bindgen__closure__destroy__h8d4c756ab63d9770: (a: number, b: number) => void;
|
|
473
|
+
readonly wasm_bindgen__closure__destroy__h5aa0d731ff57d357: (a: number, b: number) => void;
|
|
474
|
+
readonly wasm_bindgen__closure__destroy__h973cae16c57d7463: (a: number, b: number) => void;
|
|
475
|
+
readonly wasm_bindgen__convert__closures_____invoke__h000908a3022707e8: (a: number, b: number, c: any, d: any) => void;
|
|
476
|
+
readonly wasm_bindgen__convert__closures_____invoke__h5b49a0460cf7b45a: (a: number, b: number, c: any) => void;
|
|
477
|
+
readonly wasm_bindgen__convert__closures_____invoke__hc044ecd2c461ff5b: (a: number, b: number) => void;
|
|
478
|
+
readonly wasm_bindgen__convert__closures_____invoke__hf7f43c07d2237779: (a: number, b: number) => void;
|
|
445
479
|
readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
|
446
480
|
readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
|
|
447
481
|
readonly __wbindgen_exn_store_command_export: (a: number) => void;
|