@rkat/web 0.8.45 → 0.8.46
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/generated/runtime.d.ts +9 -0
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/runtime.js +4 -2
- package/dist/generated/runtime.js.map +1 -1
- package/dist/generated/session.d.ts +176 -40
- package/dist/generated/session.d.ts.map +1 -1
- package/dist/generated/session.js +3 -0
- package/dist/generated/session.js.map +1 -1
- package/dist/mob.d.ts.map +1 -1
- package/dist/mob.js +6 -2
- package/dist/mob.js.map +1 -1
- package/dist/runtime.d.ts +14 -12
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +29 -17
- package/dist/runtime.js.map +1 -1
- package/dist/session.d.ts +23 -23
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +44 -32
- package/dist/session.js.map +1 -1
- package/dist/types.d.ts +4 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -1
- package/wasm/.meerkat-wasm-build.json +9 -3
- package/wasm/meerkat_web_runtime.d.ts +42 -31
- package/wasm/meerkat_web_runtime.js +80 -126
- package/wasm/meerkat_web_runtime_bg.wasm +0 -0
- package/wasm/meerkat_web_runtime_bg.wasm.d.ts +21 -20
- package/wasm/package.json +1 -1
|
@@ -54,7 +54,7 @@ export function close_subscription(stream_id: string): void;
|
|
|
54
54
|
/**
|
|
55
55
|
* Create a session from a mobpack + config.
|
|
56
56
|
*
|
|
57
|
-
* Allocates a session through the initialized
|
|
57
|
+
* Allocates a session through the initialized canonical runtime-backed session
|
|
58
58
|
* service, then returns a browser-local session handle for convenience.
|
|
59
59
|
*
|
|
60
60
|
* The pack's skills/definition become session prompt truth here, so this
|
|
@@ -63,17 +63,17 @@ export function close_subscription(stream_id: string): void;
|
|
|
63
63
|
* the one the host installed at bootstrap (Strict + empty when none was
|
|
64
64
|
* supplied, so unsigned/unknown-signer packs fail closed).
|
|
65
65
|
*/
|
|
66
|
-
export function create_session(mobpack_bytes: Uint8Array, config_json: string): number
|
|
66
|
+
export function create_session(mobpack_bytes: Uint8Array, config_json: string): Promise<number>;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* Create a
|
|
69
|
+
* Create a session through initialized canonical runtime state.
|
|
70
70
|
*
|
|
71
71
|
* When the runtime was bootstrapped from a trust-verified mobpack
|
|
72
72
|
* (`init_runtime`), that pack's skills and definition are folded into the
|
|
73
73
|
* system prompt so the verified bootstrap pack is actually consumed rather
|
|
74
74
|
* than discarded.
|
|
75
75
|
*/
|
|
76
|
-
export function create_session_simple(config_json: string): number
|
|
76
|
+
export function create_session_simple(config_json: string): Promise<number>;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Tear down the embedded runtime and release all local handles/subscriptions.
|
|
@@ -82,7 +82,7 @@ export function create_session_simple(config_json: string): number;
|
|
|
82
82
|
* this call. Also clears any registered external-auth resolver so a later
|
|
83
83
|
* runtime never inherits a stale host auth callback.
|
|
84
84
|
*/
|
|
85
|
-
export function destroy_runtime(): void
|
|
85
|
+
export function destroy_runtime(expected_handle?: string | null): Promise<void>;
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Remove a session.
|
|
@@ -93,12 +93,12 @@ export function destroy_runtime(): void;
|
|
|
93
93
|
* projection. The handle is only removed after cleanup succeeds, so a failed
|
|
94
94
|
* destroy leaves the handle live for retry.
|
|
95
95
|
*/
|
|
96
|
-
export function destroy_session(handle: number): void
|
|
96
|
+
export function destroy_session(handle: number): Promise<void>;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
99
|
* Get current session state.
|
|
100
100
|
*/
|
|
101
|
-
export function get_session_state(handle: number): string
|
|
101
|
+
export function get_session_state(handle: number): Promise<string>;
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Returns `true` if a JS-side external-auth resolver has been
|
|
@@ -125,7 +125,7 @@ export function has_external_auth_resolver(): boolean;
|
|
|
125
125
|
* Stores an `EphemeralSessionService<FactoryAgentBuilder>` and a `MobMcpState`
|
|
126
126
|
* in a `thread_local! RuntimeState` for subsequent mob/comms calls.
|
|
127
127
|
*/
|
|
128
|
-
export function init_runtime(mobpack_bytes: Uint8Array, credentials_json: string): any
|
|
128
|
+
export function init_runtime(mobpack_bytes: Uint8Array, credentials_json: string): Promise<any>;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Advanced bare-bones bootstrap without a mobpack.
|
|
@@ -134,7 +134,7 @@ export function init_runtime(mobpack_bytes: Uint8Array, credentials_json: string
|
|
|
134
134
|
* "gemini_api_key"?: "...", "model"?: "<catalog default for configured provider>",
|
|
135
135
|
* "max_sessions"?: 100000 }`
|
|
136
136
|
*/
|
|
137
|
-
export function init_runtime_from_config(config_json: string): any
|
|
137
|
+
export function init_runtime_from_config(config_json: string): Promise<any>;
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
140
|
* Inspect a mobpack without creating a session.
|
|
@@ -146,6 +146,11 @@ export function init_runtime_from_config(config_json: string): any;
|
|
|
146
146
|
*/
|
|
147
147
|
export function inspect_mobpack(mobpack_bytes: Uint8Array): string;
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Interrupt the current run through the canonical machine authority.
|
|
151
|
+
*/
|
|
152
|
+
export function interrupt_session(handle: number): Promise<void>;
|
|
153
|
+
|
|
149
154
|
/**
|
|
150
155
|
* Append one ordinary durable System message to a mob member's session.
|
|
151
156
|
*/
|
|
@@ -427,7 +432,12 @@ export function register_tool_callback(name: string, description: string, schema
|
|
|
427
432
|
export function runtime_version(): string;
|
|
428
433
|
|
|
429
434
|
/**
|
|
430
|
-
*
|
|
435
|
+
* Install directional trust from one direct session to another local session.
|
|
436
|
+
*/
|
|
437
|
+
export function session_wire_peer(handle: number, peer_handle: number): Promise<void>;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Run a turn through generated runtime input admission.
|
|
431
441
|
*
|
|
432
442
|
* On success, resolves (Ok) with a JSON-serialized [`meerkat_contracts::WireRunResult`]
|
|
433
443
|
* — the same canonical wire shape RPC's `turn/start` returns — exposing
|
|
@@ -440,7 +450,7 @@ export function runtime_version(): string;
|
|
|
440
450
|
* `AGENT_ERROR`; they are NOT laundered into an Ok value with a `status`
|
|
441
451
|
* string.
|
|
442
452
|
*/
|
|
443
|
-
export function start_turn(handle: number, prompt: string): Promise<any>;
|
|
453
|
+
export function start_turn(handle: number, prompt: string, options_json?: string | null): Promise<any>;
|
|
444
454
|
|
|
445
455
|
/**
|
|
446
456
|
* Entry point invoked by JavaScript in a worker.
|
|
@@ -454,14 +464,15 @@ export interface InitOutput {
|
|
|
454
464
|
readonly append_system_context: (a: number, b: number, c: number) => any;
|
|
455
465
|
readonly clear_tool_callbacks: () => void;
|
|
456
466
|
readonly close_subscription: (a: number, b: number) => [number, number];
|
|
457
|
-
readonly create_session: (a: number, b: number, c: number, d: number) =>
|
|
458
|
-
readonly create_session_simple: (a: number, b: number) =>
|
|
459
|
-
readonly destroy_runtime: (
|
|
460
|
-
readonly destroy_session: (a: number) =>
|
|
461
|
-
readonly get_session_state: (a: number) =>
|
|
462
|
-
readonly init_runtime: (a: number, b: number, c: number, d: number) =>
|
|
463
|
-
readonly init_runtime_from_config: (a: number, b: number) =>
|
|
467
|
+
readonly create_session: (a: number, b: number, c: number, d: number) => any;
|
|
468
|
+
readonly create_session_simple: (a: number, b: number) => any;
|
|
469
|
+
readonly destroy_runtime: (a: number, b: number) => any;
|
|
470
|
+
readonly destroy_session: (a: number) => any;
|
|
471
|
+
readonly get_session_state: (a: number) => any;
|
|
472
|
+
readonly init_runtime: (a: number, b: number, c: number, d: number) => any;
|
|
473
|
+
readonly init_runtime_from_config: (a: number, b: number) => any;
|
|
464
474
|
readonly inspect_mobpack: (a: number, b: number) => [number, number, number, number];
|
|
475
|
+
readonly interrupt_session: (a: number) => any;
|
|
465
476
|
readonly mob_append_system_context: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
466
477
|
readonly mob_cancel_flow: (a: number, b: number, c: number, d: number) => any;
|
|
467
478
|
readonly mob_create: (a: number, b: number) => any;
|
|
@@ -492,16 +503,17 @@ export interface InitOutput {
|
|
|
492
503
|
readonly register_js_tool: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
493
504
|
readonly register_tool_callback: (a: number, b: number, c: number, d: number, e: number, f: number, g: any) => [number, number];
|
|
494
505
|
readonly runtime_version: () => [number, number];
|
|
495
|
-
readonly
|
|
506
|
+
readonly session_wire_peer: (a: number, b: number) => any;
|
|
507
|
+
readonly start_turn: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
496
508
|
readonly has_external_auth_resolver: () => number;
|
|
497
509
|
readonly register_external_auth_resolver: (a: any) => [number, number];
|
|
498
510
|
readonly __meerkat_core_mob_generated_comms_trust_authority_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
499
511
|
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_member_trust_wiring_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
500
512
|
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_external_peer_reciprocal_trust_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
513
|
+
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_external_peer_trust_repair_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
501
514
|
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_external_peer_trust_wiring_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
502
|
-
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_external_peer_trust_unwiring_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
503
515
|
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_member_trust_unwiring_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
504
|
-
readonly
|
|
516
|
+
readonly __meerkat_mob_generated_authority_bridge_token_is_valid_v1_mob_external_peer_trust_unwiring_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
505
517
|
readonly __meerkat_agent_factory_parent_tool_composition_authority_new_v2_7142379ae5792941: (a: number, b: number, c: number, d: number) => void;
|
|
506
518
|
readonly __meerkat_agent_factory_policy_build_v3_7142379ae5792941: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
507
519
|
readonly __meerkat_agent_factory_parent_tool_composition_authority_set_tool_scope_v1_7142379ae5792941: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -510,6 +522,7 @@ export interface InitOutput {
|
|
|
510
522
|
readonly __meerkat_core_session_generated_live_playback_truncation_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
511
523
|
readonly __meerkat_session_generated_authority_bridge_token_is_valid_v1_live_user_transcript_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
512
524
|
readonly __meerkat_core_runtime_generated_tool_visibility_owner_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
525
|
+
readonly __meerkat_core_runtime_generated_auth_lease_handle_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
513
526
|
readonly __meerkat_runtime_generated_authority_bridge_token_is_valid_v1_tool_visibility_owner_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
514
527
|
readonly __meerkat_core_runtime_generated_comms_trust_authority_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
515
528
|
readonly __meerkat_runtime_generated_authority_bridge_token_is_valid_v1_comms_trust_reconcile_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
@@ -517,7 +530,6 @@ export interface InitOutput {
|
|
|
517
530
|
readonly __meerkat_core_runtime_generated_mob_tool_authority_context_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
518
531
|
readonly __meerkat_runtime_generated_authority_bridge_token_is_valid_v1_mob_operator_authority_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
519
532
|
readonly __meerkat_runtime_generated_authority_bridge_token_is_valid_v1_supervisor_trust_revoke_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
520
|
-
readonly __meerkat_core_runtime_generated_auth_lease_handle_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
521
533
|
readonly __meerkat_core_runtime_generated_auth_lease_transition_build_v1_036fb4d02d9dbed7: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: bigint, h: bigint, i: bigint) => void;
|
|
522
534
|
readonly __meerkat_runtime_generated_authority_bridge_token_is_valid_v1_auth_lease_lifecycle_publication_036fb4d02d9dbed7: (a: number, b: number) => number;
|
|
523
535
|
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
@@ -526,20 +538,19 @@ export interface InitOutput {
|
|
|
526
538
|
readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
|
|
527
539
|
readonly intounderlyingbytesource_start: (a: number, b: any) => void;
|
|
528
540
|
readonly intounderlyingbytesource_type: (a: number) => number;
|
|
541
|
+
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
542
|
+
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
543
|
+
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
529
544
|
readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
530
545
|
readonly intounderlyingsink_abort: (a: number, b: any) => any;
|
|
531
546
|
readonly intounderlyingsink_close: (a: number) => any;
|
|
532
547
|
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
533
|
-
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
534
|
-
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
535
|
-
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
536
548
|
readonly task_worker_entry_point: (a: number) => [number, number];
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
readonly
|
|
540
|
-
readonly
|
|
541
|
-
readonly
|
|
542
|
-
readonly wasm_bindgen__convert__closures_____invoke__h14d5b4457903d659: (a: number, b: number) => void;
|
|
549
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2c6cb6d1a06496b7: (a: number, b: number, c: any) => [number, number];
|
|
550
|
+
readonly wasm_bindgen__convert__closures_____invoke__h3cba0c4cd3462e0e: (a: number, b: number, c: any, d: any) => void;
|
|
551
|
+
readonly wasm_bindgen__convert__closures_____invoke__ha7346b5e9b6fa88d: (a: number, b: number, c: any) => void;
|
|
552
|
+
readonly wasm_bindgen__convert__closures_____invoke__h70f9de3e771e3fb0: (a: number, b: number) => void;
|
|
553
|
+
readonly wasm_bindgen__convert__closures_____invoke__h563325fc293da55b: (a: number, b: number) => void;
|
|
543
554
|
readonly __wbindgen_malloc_command_export: (a: number, b: number) => number;
|
|
544
555
|
readonly __wbindgen_realloc_command_export: (a: number, b: number, c: number, d: number) => number;
|
|
545
556
|
readonly __wbindgen_exn_store_command_export: (a: number) => void;
|
|
@@ -147,7 +147,7 @@ export function close_subscription(stream_id) {
|
|
|
147
147
|
/**
|
|
148
148
|
* Create a session from a mobpack + config.
|
|
149
149
|
*
|
|
150
|
-
* Allocates a session through the initialized
|
|
150
|
+
* Allocates a session through the initialized canonical runtime-backed session
|
|
151
151
|
* service, then returns a browser-local session handle for convenience.
|
|
152
152
|
*
|
|
153
153
|
* The pack's skills/definition become session prompt truth here, so this
|
|
@@ -157,7 +157,7 @@ export function close_subscription(stream_id) {
|
|
|
157
157
|
* supplied, so unsigned/unknown-signer packs fail closed).
|
|
158
158
|
* @param {Uint8Array} mobpack_bytes
|
|
159
159
|
* @param {string} config_json
|
|
160
|
-
* @returns {number}
|
|
160
|
+
* @returns {Promise<number>}
|
|
161
161
|
*/
|
|
162
162
|
export function create_session(mobpack_bytes, config_json) {
|
|
163
163
|
const ptr0 = passArray8ToWasm0(mobpack_bytes, wasm.__wbindgen_malloc_command_export);
|
|
@@ -165,30 +165,24 @@ export function create_session(mobpack_bytes, config_json) {
|
|
|
165
165
|
const ptr1 = passStringToWasm0(config_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
166
166
|
const len1 = WASM_VECTOR_LEN;
|
|
167
167
|
const ret = wasm.create_session(ptr0, len0, ptr1, len1);
|
|
168
|
-
|
|
169
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
170
|
-
}
|
|
171
|
-
return ret[0] >>> 0;
|
|
168
|
+
return ret;
|
|
172
169
|
}
|
|
173
170
|
|
|
174
171
|
/**
|
|
175
|
-
* Create a
|
|
172
|
+
* Create a session through initialized canonical runtime state.
|
|
176
173
|
*
|
|
177
174
|
* When the runtime was bootstrapped from a trust-verified mobpack
|
|
178
175
|
* (`init_runtime`), that pack's skills and definition are folded into the
|
|
179
176
|
* system prompt so the verified bootstrap pack is actually consumed rather
|
|
180
177
|
* than discarded.
|
|
181
178
|
* @param {string} config_json
|
|
182
|
-
* @returns {number}
|
|
179
|
+
* @returns {Promise<number>}
|
|
183
180
|
*/
|
|
184
181
|
export function create_session_simple(config_json) {
|
|
185
182
|
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
186
183
|
const len0 = WASM_VECTOR_LEN;
|
|
187
184
|
const ret = wasm.create_session_simple(ptr0, len0);
|
|
188
|
-
|
|
189
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
190
|
-
}
|
|
191
|
-
return ret[0] >>> 0;
|
|
185
|
+
return ret;
|
|
192
186
|
}
|
|
193
187
|
|
|
194
188
|
/**
|
|
@@ -197,12 +191,14 @@ export function create_session_simple(config_json) {
|
|
|
197
191
|
* Existing `Session`, `Mob`, and subscription handles become invalid after
|
|
198
192
|
* this call. Also clears any registered external-auth resolver so a later
|
|
199
193
|
* runtime never inherits a stale host auth callback.
|
|
194
|
+
* @param {string | null} [expected_handle]
|
|
195
|
+
* @returns {Promise<void>}
|
|
200
196
|
*/
|
|
201
|
-
export function destroy_runtime() {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
197
|
+
export function destroy_runtime(expected_handle) {
|
|
198
|
+
var ptr0 = isLikeNone(expected_handle) ? 0 : passStringToWasm0(expected_handle, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
199
|
+
var len0 = WASM_VECTOR_LEN;
|
|
200
|
+
const ret = wasm.destroy_runtime(ptr0, len0);
|
|
201
|
+
return ret;
|
|
206
202
|
}
|
|
207
203
|
|
|
208
204
|
/**
|
|
@@ -214,36 +210,21 @@ export function destroy_runtime() {
|
|
|
214
210
|
* projection. The handle is only removed after cleanup succeeds, so a failed
|
|
215
211
|
* destroy leaves the handle live for retry.
|
|
216
212
|
* @param {number} handle
|
|
213
|
+
* @returns {Promise<void>}
|
|
217
214
|
*/
|
|
218
215
|
export function destroy_session(handle) {
|
|
219
216
|
const ret = wasm.destroy_session(handle);
|
|
220
|
-
|
|
221
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
222
|
-
}
|
|
217
|
+
return ret;
|
|
223
218
|
}
|
|
224
219
|
|
|
225
220
|
/**
|
|
226
221
|
* Get current session state.
|
|
227
222
|
* @param {number} handle
|
|
228
|
-
* @returns {string}
|
|
223
|
+
* @returns {Promise<string>}
|
|
229
224
|
*/
|
|
230
225
|
export function get_session_state(handle) {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
try {
|
|
234
|
-
const ret = wasm.get_session_state(handle);
|
|
235
|
-
var ptr1 = ret[0];
|
|
236
|
-
var len1 = ret[1];
|
|
237
|
-
if (ret[3]) {
|
|
238
|
-
ptr1 = 0; len1 = 0;
|
|
239
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
240
|
-
}
|
|
241
|
-
deferred2_0 = ptr1;
|
|
242
|
-
deferred2_1 = len1;
|
|
243
|
-
return getStringFromWasm0(ptr1, len1);
|
|
244
|
-
} finally {
|
|
245
|
-
wasm.__wbindgen_free_command_export(deferred2_0, deferred2_1, 1);
|
|
246
|
-
}
|
|
226
|
+
const ret = wasm.get_session_state(handle);
|
|
227
|
+
return ret;
|
|
247
228
|
}
|
|
248
229
|
|
|
249
230
|
/**
|
|
@@ -276,7 +257,7 @@ export function has_external_auth_resolver() {
|
|
|
276
257
|
* in a `thread_local! RuntimeState` for subsequent mob/comms calls.
|
|
277
258
|
* @param {Uint8Array} mobpack_bytes
|
|
278
259
|
* @param {string} credentials_json
|
|
279
|
-
* @returns {any}
|
|
260
|
+
* @returns {Promise<any>}
|
|
280
261
|
*/
|
|
281
262
|
export function init_runtime(mobpack_bytes, credentials_json) {
|
|
282
263
|
const ptr0 = passArray8ToWasm0(mobpack_bytes, wasm.__wbindgen_malloc_command_export);
|
|
@@ -284,10 +265,7 @@ export function init_runtime(mobpack_bytes, credentials_json) {
|
|
|
284
265
|
const ptr1 = passStringToWasm0(credentials_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
285
266
|
const len1 = WASM_VECTOR_LEN;
|
|
286
267
|
const ret = wasm.init_runtime(ptr0, len0, ptr1, len1);
|
|
287
|
-
|
|
288
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
289
|
-
}
|
|
290
|
-
return takeFromExternrefTable0(ret[0]);
|
|
268
|
+
return ret;
|
|
291
269
|
}
|
|
292
270
|
|
|
293
271
|
/**
|
|
@@ -297,16 +275,13 @@ export function init_runtime(mobpack_bytes, credentials_json) {
|
|
|
297
275
|
* "gemini_api_key"?: "...", "model"?: "<catalog default for configured provider>",
|
|
298
276
|
* "max_sessions"?: 100000 }`
|
|
299
277
|
* @param {string} config_json
|
|
300
|
-
* @returns {any}
|
|
278
|
+
* @returns {Promise<any>}
|
|
301
279
|
*/
|
|
302
280
|
export function init_runtime_from_config(config_json) {
|
|
303
281
|
const ptr0 = passStringToWasm0(config_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
304
282
|
const len0 = WASM_VECTOR_LEN;
|
|
305
283
|
const ret = wasm.init_runtime_from_config(ptr0, len0);
|
|
306
|
-
|
|
307
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
308
|
-
}
|
|
309
|
-
return takeFromExternrefTable0(ret[0]);
|
|
284
|
+
return ret;
|
|
310
285
|
}
|
|
311
286
|
|
|
312
287
|
/**
|
|
@@ -340,6 +315,16 @@ export function inspect_mobpack(mobpack_bytes) {
|
|
|
340
315
|
}
|
|
341
316
|
}
|
|
342
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Interrupt the current run through the canonical machine authority.
|
|
320
|
+
* @param {number} handle
|
|
321
|
+
* @returns {Promise<void>}
|
|
322
|
+
*/
|
|
323
|
+
export function interrupt_session(handle) {
|
|
324
|
+
const ret = wasm.interrupt_session(handle);
|
|
325
|
+
return ret;
|
|
326
|
+
}
|
|
327
|
+
|
|
343
328
|
/**
|
|
344
329
|
* Append one ordinary durable System message to a mob member's session.
|
|
345
330
|
* @param {string} mob_id
|
|
@@ -965,7 +950,18 @@ export function runtime_version() {
|
|
|
965
950
|
}
|
|
966
951
|
|
|
967
952
|
/**
|
|
968
|
-
*
|
|
953
|
+
* Install directional trust from one direct session to another local session.
|
|
954
|
+
* @param {number} handle
|
|
955
|
+
* @param {number} peer_handle
|
|
956
|
+
* @returns {Promise<void>}
|
|
957
|
+
*/
|
|
958
|
+
export function session_wire_peer(handle, peer_handle) {
|
|
959
|
+
const ret = wasm.session_wire_peer(handle, peer_handle);
|
|
960
|
+
return ret;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Run a turn through generated runtime input admission.
|
|
969
965
|
*
|
|
970
966
|
* On success, resolves (Ok) with a JSON-serialized [`meerkat_contracts::WireRunResult`]
|
|
971
967
|
* — the same canonical wire shape RPC's `turn/start` returns — exposing
|
|
@@ -979,12 +975,15 @@ export function runtime_version() {
|
|
|
979
975
|
* string.
|
|
980
976
|
* @param {number} handle
|
|
981
977
|
* @param {string} prompt
|
|
978
|
+
* @param {string | null} [options_json]
|
|
982
979
|
* @returns {Promise<any>}
|
|
983
980
|
*/
|
|
984
|
-
export function start_turn(handle, prompt) {
|
|
981
|
+
export function start_turn(handle, prompt, options_json) {
|
|
985
982
|
const ptr0 = passStringToWasm0(prompt, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
986
983
|
const len0 = WASM_VECTOR_LEN;
|
|
987
|
-
|
|
984
|
+
var ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc_command_export, wasm.__wbindgen_realloc_command_export);
|
|
985
|
+
var len1 = WASM_VECTOR_LEN;
|
|
986
|
+
const ret = wasm.start_turn(handle, ptr0, len0, ptr1, len1);
|
|
988
987
|
return ret;
|
|
989
988
|
}
|
|
990
989
|
|
|
@@ -1088,13 +1087,13 @@ function __wbg_get_imports() {
|
|
|
1088
1087
|
const ret = arg0.catch(arg1);
|
|
1089
1088
|
return ret;
|
|
1090
1089
|
},
|
|
1091
|
-
__wbg_clearInterval_a784e7b87f37a6f3: function(arg0) {
|
|
1092
|
-
globalThis.clearInterval(arg0);
|
|
1093
|
-
},
|
|
1094
1090
|
__wbg_clearTimeout_6b8d9a38b9263d65: function(arg0) {
|
|
1095
1091
|
const ret = clearTimeout(arg0);
|
|
1096
1092
|
return ret;
|
|
1097
1093
|
},
|
|
1094
|
+
__wbg_clearTimeout_e1d818fa323cfc1e: function(arg0) {
|
|
1095
|
+
globalThis.clearTimeout(arg0);
|
|
1096
|
+
},
|
|
1098
1097
|
__wbg_close_249a23304523681b: function() { return handleError(function (arg0) {
|
|
1099
1098
|
arg0.close();
|
|
1100
1099
|
}, arguments); },
|
|
@@ -1263,24 +1262,6 @@ function __wbg_get_imports() {
|
|
|
1263
1262
|
const ret = new AbortController();
|
|
1264
1263
|
return ret;
|
|
1265
1264
|
}, arguments); },
|
|
1266
|
-
__wbg_new_aec3e25493d729fe: function(arg0, arg1) {
|
|
1267
|
-
try {
|
|
1268
|
-
var state0 = {a: arg0, b: arg1};
|
|
1269
|
-
var cb0 = (arg0, arg1) => {
|
|
1270
|
-
const a = state0.a;
|
|
1271
|
-
state0.a = 0;
|
|
1272
|
-
try {
|
|
1273
|
-
return wasm_bindgen__convert__closures_____invoke__h61c6df70ddce3ae8(a, state0.b, arg0, arg1);
|
|
1274
|
-
} finally {
|
|
1275
|
-
state0.a = a;
|
|
1276
|
-
}
|
|
1277
|
-
};
|
|
1278
|
-
const ret = new Promise(cb0);
|
|
1279
|
-
return ret;
|
|
1280
|
-
} finally {
|
|
1281
|
-
state0.a = 0;
|
|
1282
|
-
}
|
|
1283
|
-
},
|
|
1284
1265
|
__wbg_new_b667d279fd5aa943: function(arg0, arg1) {
|
|
1285
1266
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1286
1267
|
return ret;
|
|
@@ -1304,7 +1285,7 @@ function __wbg_get_imports() {
|
|
|
1304
1285
|
const a = state0.a;
|
|
1305
1286
|
state0.a = 0;
|
|
1306
1287
|
try {
|
|
1307
|
-
return
|
|
1288
|
+
return wasm_bindgen__convert__closures_____invoke__h3cba0c4cd3462e0e(a, state0.b, arg0, arg1);
|
|
1308
1289
|
} finally {
|
|
1309
1290
|
state0.a = a;
|
|
1310
1291
|
}
|
|
@@ -1393,13 +1374,10 @@ function __wbg_get_imports() {
|
|
|
1393
1374
|
__wbg_respond_510e32df8aeb6817: function() { return handleError(function (arg0, arg1) {
|
|
1394
1375
|
arg0.respond(arg1 >>> 0);
|
|
1395
1376
|
}, arguments); },
|
|
1396
|
-
|
|
1397
|
-
const ret = globalThis.
|
|
1377
|
+
__wbg_setTimeout_a3bab300624bd51b: function(arg0, arg1) {
|
|
1378
|
+
const ret = globalThis.setTimeout(arg0, arg1);
|
|
1398
1379
|
return ret;
|
|
1399
1380
|
},
|
|
1400
|
-
__wbg_setTimeout_2a1fbbfbc00febf2: function(arg0, arg1) {
|
|
1401
|
-
globalThis.setTimeout(arg0, arg1);
|
|
1402
|
-
},
|
|
1403
1381
|
__wbg_setTimeout_f757f00851f76c42: function(arg0, arg1) {
|
|
1404
1382
|
const ret = setTimeout(arg0, arg1);
|
|
1405
1383
|
return ret;
|
|
@@ -1496,31 +1474,36 @@ function __wbg_get_imports() {
|
|
|
1496
1474
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1497
1475
|
},
|
|
1498
1476
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1499
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1500
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1477
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 10329, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1478
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__ha7346b5e9b6fa88d);
|
|
1501
1479
|
return ret;
|
|
1502
1480
|
},
|
|
1503
1481
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1504
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1505
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1482
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 14096, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1483
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h2c6cb6d1a06496b7);
|
|
1506
1484
|
return ret;
|
|
1507
1485
|
},
|
|
1508
1486
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1509
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1510
|
-
const ret =
|
|
1487
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 10287, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1488
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h70f9de3e771e3fb0);
|
|
1511
1489
|
return ret;
|
|
1512
1490
|
},
|
|
1513
1491
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1514
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1515
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1492
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 12081, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1493
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h563325fc293da55b);
|
|
1494
|
+
return ret;
|
|
1495
|
+
},
|
|
1496
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
1497
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1498
|
+
const ret = arg0;
|
|
1516
1499
|
return ret;
|
|
1517
1500
|
},
|
|
1518
|
-
|
|
1501
|
+
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
1519
1502
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1520
1503
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1521
1504
|
return ret;
|
|
1522
1505
|
},
|
|
1523
|
-
|
|
1506
|
+
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
1524
1507
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1525
1508
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1526
1509
|
return ret;
|
|
@@ -1541,31 +1524,27 @@ function __wbg_get_imports() {
|
|
|
1541
1524
|
};
|
|
1542
1525
|
}
|
|
1543
1526
|
|
|
1544
|
-
function
|
|
1545
|
-
wasm.
|
|
1527
|
+
function wasm_bindgen__convert__closures_____invoke__h70f9de3e771e3fb0(arg0, arg1) {
|
|
1528
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h70f9de3e771e3fb0(arg0, arg1);
|
|
1546
1529
|
}
|
|
1547
1530
|
|
|
1548
|
-
function
|
|
1549
|
-
wasm.
|
|
1531
|
+
function wasm_bindgen__convert__closures_____invoke__h563325fc293da55b(arg0, arg1) {
|
|
1532
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h563325fc293da55b(arg0, arg1);
|
|
1550
1533
|
}
|
|
1551
1534
|
|
|
1552
|
-
function
|
|
1553
|
-
wasm.
|
|
1535
|
+
function wasm_bindgen__convert__closures_____invoke__ha7346b5e9b6fa88d(arg0, arg1, arg2) {
|
|
1536
|
+
wasm.wasm_bindgen__convert__closures_____invoke__ha7346b5e9b6fa88d(arg0, arg1, arg2);
|
|
1554
1537
|
}
|
|
1555
1538
|
|
|
1556
|
-
function
|
|
1557
|
-
const ret = wasm.
|
|
1539
|
+
function wasm_bindgen__convert__closures_____invoke__h2c6cb6d1a06496b7(arg0, arg1, arg2) {
|
|
1540
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h2c6cb6d1a06496b7(arg0, arg1, arg2);
|
|
1558
1541
|
if (ret[1]) {
|
|
1559
1542
|
throw takeFromExternrefTable0(ret[0]);
|
|
1560
1543
|
}
|
|
1561
1544
|
}
|
|
1562
1545
|
|
|
1563
|
-
function
|
|
1564
|
-
wasm.
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
function wasm_bindgen__convert__closures_____invoke__hd1076257eba07e45(arg0, arg1, arg2, arg3) {
|
|
1568
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hd1076257eba07e45(arg0, arg1, arg2, arg3);
|
|
1546
|
+
function wasm_bindgen__convert__closures_____invoke__h3cba0c4cd3462e0e(arg0, arg1, arg2, arg3) {
|
|
1547
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h3cba0c4cd3462e0e(arg0, arg1, arg2, arg3);
|
|
1569
1548
|
}
|
|
1570
1549
|
|
|
1571
1550
|
|
|
@@ -1702,31 +1681,6 @@ function isLikeNone(x) {
|
|
|
1702
1681
|
return x === undefined || x === null;
|
|
1703
1682
|
}
|
|
1704
1683
|
|
|
1705
|
-
function makeClosure(arg0, arg1, f) {
|
|
1706
|
-
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1707
|
-
const real = (...args) => {
|
|
1708
|
-
|
|
1709
|
-
// First up with a closure we increment the internal reference
|
|
1710
|
-
// count. This ensures that the Rust closure environment won't
|
|
1711
|
-
// be deallocated while we're invoking it.
|
|
1712
|
-
state.cnt++;
|
|
1713
|
-
try {
|
|
1714
|
-
return f(state.a, state.b, ...args);
|
|
1715
|
-
} finally {
|
|
1716
|
-
real._wbg_cb_unref();
|
|
1717
|
-
}
|
|
1718
|
-
};
|
|
1719
|
-
real._wbg_cb_unref = () => {
|
|
1720
|
-
if (--state.cnt === 0) {
|
|
1721
|
-
wasm.__wbindgen_destroy_closure_command_export(state.a, state.b);
|
|
1722
|
-
state.a = 0;
|
|
1723
|
-
CLOSURE_DTORS.unregister(state);
|
|
1724
|
-
}
|
|
1725
|
-
};
|
|
1726
|
-
CLOSURE_DTORS.register(real, state, state);
|
|
1727
|
-
return real;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
1684
|
function makeMutClosure(arg0, arg1, f) {
|
|
1731
1685
|
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1732
1686
|
const real = (...args) => {
|
|
Binary file
|