nanocodex 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +15 -1
  2. package/browser/Voice.mjs +11 -4
  3. package/browser/VoiceSession.mjs +20 -6
  4. package/cloud/types.d.mts +1 -0
  5. package/cloudflare/Agent.d.mts +4 -0
  6. package/cloudflare/Agent.mjs +103 -9
  7. package/cloudflare/agent-settings.d.mts +1 -1
  8. package/cloudflare/agent-settings.mjs +3 -3
  9. package/cloudflare/gateway-binding-responses.mjs +3 -3
  10. package/cloudflare/gateway-responses.mjs +5 -5
  11. package/cloudflare/managed-auth.d.mts +1 -1
  12. package/cloudflare/managed-auth.mjs +6 -0
  13. package/cloudflare/tracing.d.mts +16 -0
  14. package/cloudflare/tracing.mjs +47 -0
  15. package/cloudflare/workers-ai-responses.d.mts +1 -1
  16. package/cloudflare/workers-ai-responses.mjs +3 -2
  17. package/internal.mjs +5 -0
  18. package/managed/Agent.d.mts +4 -1
  19. package/managed/Agent.mjs +22 -6
  20. package/managed/Voice.mjs +3 -1
  21. package/managed/internal.mjs +2 -1
  22. package/package.json +6 -2
  23. package/pkg-node/nanocodex.d.ts +14 -2
  24. package/pkg-node/nanocodex.js +73 -50
  25. package/pkg-node/nanocodex_bg.wasm.d.ts +5 -3
  26. package/pkg-web/.nanocodex-bindgen-stamp +2 -2
  27. package/pkg-web/nanocodex-build.json +1 -1
  28. package/pkg-web/nanocodex.d.ts +19 -5
  29. package/pkg-web/nanocodex.js +72 -50
  30. package/pkg-web/nanocodex_bg.js +72 -50
  31. package/pkg-web/nanocodex_bg.wasm +0 -0
  32. package/pkg-web/nanocodex_bg.wasm.d.ts +5 -3
  33. package/pkg-web/nanocodex_worker.js +1 -1
  34. package/runtime/mcp-runtime.mjs +5 -3
  35. package/runtime/response-controls.mjs +15 -4
  36. package/runtime/subagent-routing.mjs +2 -1
  37. package/tools/environment.d.mts +9 -0
  38. package/tools/environment.mjs +14 -1
  39. package/types.d.mts +3 -2
@@ -222,7 +222,7 @@ export type EventData = Readonly<{
222
222
  model_routing_automatic?: boolean;
223
223
  }> & (
224
224
  | { type: "agent_created"; agent_id: string; capabilities: Capabilities }
225
- | { type: "turn_accepted"; id: string; input: PromptInput; replayed: boolean }
225
+ | { type: "turn_accepted"; id: string; input: PromptInput; replayed: boolean; author?: "guest"; share_link_id?: string }
226
226
  | { type: "turn_cancelling"; id: string; error?: string; retry_at?: number }
227
227
  | CompletedEventData
228
228
  | { type: "turn_cancelled"; id: string }
@@ -375,6 +375,9 @@ export type Agent = Readonly<{
375
375
  /** Account-owned list metadata, present on handles returned by `list()`. */
376
376
  summary?: Summary | undefined;
377
377
  turn: Readonly<{ prompt(options: PromptOptions): Turn }>;
378
+ /** Copy the latest committed model boundary into a separate durable agent.
379
+ * Reuse the same key to reconcile an uncertain response. */
380
+ fork(options: Readonly<{ idempotencyKey: string; signal?: AbortSignal | undefined }>): Promise<Agent>;
378
381
  settings: Readonly<{
379
382
  read(): Promise<CreateSettings>;
380
383
  update(patch: SettingsPatch): Promise<CreateSettings>;
package/managed/Agent.mjs CHANGED
@@ -29,7 +29,7 @@ const TURN_STATE_READ_TIMEOUT_MS = 2_000;
29
29
  const ALLOWED_OPTIONS = new Set(["apiKey", "baseUrl", "fetch", "toolsTransport", "requestOrigin"]);
30
30
  const CREATE_SETTINGS = new Set(["model", "thinking", "reasoningMode", "fastMode"]);
31
31
  const SETTINGS_PATCH = CREATE_SETTINGS;
32
- const MODELS = new Set(["gpt-6-sol", "gpt-6-luna", "gpt-6-astra", "@cf/zai-org/glm-5.3", "kimi-k3", "mimo-v2.6-pro"]);
32
+ const MODELS = new Set(["gpt-6.1-sol", "gpt-6-luna", "gpt-6-astra", "@cf/zai-org/glm-5.3", "kimi-k3", "mimo-v2.6-pro"]);
33
33
  const THINKING = new Set(["none", "low", "medium", "high", "xhigh", "max"]);
34
34
  const REASONING_MODES = new Set(["standard", "pro"]);
35
35
  const eventEncoder = new TextEncoder();
@@ -153,8 +153,8 @@ function managedCreateOptions(options) {
153
153
  if (["@cf/zai-org/glm-5.3", "kimi-k3", "mimo-v2.6-pro"].includes(settings.model) && ((settings.thinking !== undefined && !(settings.model === "kimi-k3" ? ["low", "high"] : ["low", "medium", "high"]).includes(settings.thinking)) || settings.reasoningMode === "pro")) {
154
154
  throw new TypeError(`${settings.model === "@cf/zai-org/glm-5.3" ? "GLM-5.3" : settings.model} requires a supported thinking effort and standard reasoning mode`);
155
155
  }
156
- if (settings.model === "gpt-6-astra" && settings.thinking === "none") {
157
- throw new TypeError("GPT-6 Astra requires low, medium, high, xhigh, or max thinking");
156
+ if (["gpt-6-astra", "gpt-6.1-sol"].includes(settings.model) && settings.thinking === "none") {
157
+ throw new TypeError("GPT-6 Astra and GPT-6.1 Sol require low, medium, high, xhigh, or max thinking");
158
158
  }
159
159
  if (settings.model === "gpt-6-astra" && settings.reasoningMode === "pro") {
160
160
  throw new TypeError("GPT-6 Astra does not support pro reasoning mode");
@@ -285,6 +285,22 @@ function agentHandle(client, id, summary, retainedEventStream) {
285
285
  id,
286
286
  ...(summary === undefined ? {} : { summary }),
287
287
  events,
288
+ fork: async (options) => {
289
+ if (!options || typeof options !== "object" || Array.isArray(options)
290
+ || Object.keys(options).some(key => !["idempotencyKey", "signal"].includes(key))
291
+ || typeof options.idempotencyKey !== "string"
292
+ || !IDEMPOTENCY_KEY.test(options.idempotencyKey)) {
293
+ throw new TypeError("managed fork requires a valid idempotency key");
294
+ }
295
+ if (options.signal !== undefined && !(options.signal instanceof AbortSignal))
296
+ throw new TypeError("managed fork signal must be an AbortSignal");
297
+ const receipt = await retryCreateMutation(client, `${agentPath(id)}/forks`,
298
+ options.idempotencyKey, undefined, options.signal);
299
+ const childId = requiredString(receipt, "agent_id");
300
+ if (!SESSION_ID.test(childId) || childId === id || receipt.parent_agent_id !== id)
301
+ throw new ManagedError("invalid_response", "managed fork response did not identify a separate child");
302
+ return agentHandle(client, childId);
303
+ },
288
304
  // Activation is explicit: passive event/history readers never warm a model.
289
305
  prepare: (options = {}) => client.json(`${agentPath(id)}/prepare`, {
290
306
  method: "POST", ...(options.signal === undefined ? {} : { signal: options.signal }),
@@ -416,8 +432,8 @@ function managedSettingsPatch(patch) {
416
432
  if (["@cf/zai-org/glm-5.3", "kimi-k3", "mimo-v2.6-pro"].includes(patch.model) && ((patch.thinking !== undefined && !(patch.model === "kimi-k3" ? ["low", "high"] : ["low", "medium", "high"]).includes(patch.thinking)) || patch.reasoningMode === "pro")) {
417
433
  throw new TypeError(`${patch.model === "@cf/zai-org/glm-5.3" ? "GLM-5.3" : patch.model} requires a supported thinking effort and standard reasoning mode`);
418
434
  }
419
- if (patch.model === "gpt-6-astra" && patch.thinking === "none") {
420
- throw new TypeError("GPT-6 Astra requires low, medium, high, xhigh, or max thinking");
435
+ if (["gpt-6-astra", "gpt-6.1-sol"].includes(patch.model) && patch.thinking === "none") {
436
+ throw new TypeError("GPT-6 Astra and GPT-6.1 Sol require low, medium, high, xhigh, or max thinking");
421
437
  }
422
438
  if (patch.model === "gpt-6-astra" && patch.reasoningMode === "pro") {
423
439
  throw new TypeError("GPT-6 Astra does not support pro reasoning mode");
@@ -435,7 +451,7 @@ function managedSettings(value) {
435
451
  || !MODELS.has(value.model) || !THINKING.has(value.thinking)
436
452
  || !REASONING_MODES.has(value.reasoning_mode) || typeof value.fast_mode !== "boolean"
437
453
  || (["@cf/zai-org/glm-5.3", "kimi-k3", "mimo-v2.6-pro"].includes(value.model) && (!(value.model === "kimi-k3" ? ["low", "high"] : ["low", "medium", "high"]).includes(value.thinking) || value.reasoning_mode === "pro"))
438
- || (value.model === "gpt-6-astra" && value.thinking === "none")
454
+ || (["gpt-6-astra", "gpt-6.1-sol"].includes(value.model) && value.thinking === "none")
439
455
  || (value.model === "gpt-6-astra" && value.reasoning_mode === "pro")
440
456
  ) {
441
457
  throw new ManagedError("invalid_response", "managed agent settings are malformed");
package/managed/Voice.mjs CHANGED
@@ -39,6 +39,7 @@ export async function createManagedBrowserVoice(agent, voice, options = {}) {
39
39
  if (typeof routed.turn_id !== "string") return [];
40
40
  activeTurnId = routed.turn_id;
41
41
  if (routed.route === "started") startedTurnId = routed.turn_id;
42
+ else if (startedTurnId !== activeTurnId) startedTurnId = undefined;
42
43
  const buffered = pendingEvents;
43
44
  pendingEvents = [];
44
45
  return buffered.map(observe).filter((effects) => effects !== undefined);
@@ -137,7 +138,8 @@ export async function createManagedBrowserVoice(agent, voice, options = {}) {
137
138
  }
138
139
  let stopFailure;
139
140
  try {
140
- await stopManagedRealtime(agent, voiceSessionId, stopOperationId);
141
+ await stopManagedRealtime(agent, voiceSessionId, stopOperationId,
142
+ update.delegation?.trim() ? undefined : update.transcript);
141
143
  } catch (error) {
142
144
  stopFailure = error;
143
145
  }
@@ -59,13 +59,14 @@ export function routeManagedRealtime(agent, voiceSessionId, operationId, input)
59
59
  }
60
60
 
61
61
  /** @internal Ends the canonical Realtime lifecycle on the selected durable Agent. */
62
- export function stopManagedRealtime(agent, voiceSessionId, operationId) {
62
+ export function stopManagedRealtime(agent, voiceSessionId, operationId, transcript) {
63
63
  const { client, id } = managedAgent(agent);
64
64
  return client.json(`${agentPath(id)}/realtime/stop`, {
65
65
  method: "POST",
66
66
  body: JSON.stringify({
67
67
  voice_session_id: voiceSessionId,
68
68
  operation_id: operationId,
69
+ ...(transcript?.length ? { transcript } : {}),
69
70
  }),
70
71
  });
71
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanocodex",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
4
4
  "description": "Viem-style Node and browser bindings for the Nanocodex WASM agent",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -162,6 +162,10 @@
162
162
  "./cloudflare/managed-live": {
163
163
  "types": "./cloudflare/managed-live.d.mts",
164
164
  "import": "./cloudflare/managed-live.mjs"
165
+ },
166
+ "./cloudflare/tracing": {
167
+ "types": "./cloudflare/tracing.d.mts",
168
+ "import": "./cloudflare/tracing.mjs"
165
169
  }
166
170
  },
167
171
  "files": [
@@ -199,7 +203,7 @@
199
203
  "isomorphic-git": "^1.41.5",
200
204
  "minisearch": "7.2.0",
201
205
  "mppx": "0.9.1",
202
- "nanocodex-tools": "0.6.5",
206
+ "nanocodex-tools": "0.6.6",
203
207
  "ox": "1.6.2",
204
208
  "pako": "2.1.0",
205
209
  "pyodide": "314.0.5",
@@ -140,7 +140,7 @@ export class BrowserVoice {
140
140
  */
141
141
  start(): Promise<void>;
142
142
  /**
143
- * Flushes any final transcript tail and ends Codex's Realtime lifecycle.
143
+ * Retains final transcript history without a task and ends the Realtime lifecycle.
144
144
  *
145
145
  * # Errors
146
146
  *
@@ -340,7 +340,7 @@ export class ManagedBrowserVoice {
340
340
  */
341
341
  start(context_json: string): string;
342
342
  /**
343
- * Stops the protocol and returns final transcript delegation plus close effects.
343
+ * Stops the protocol and returns transcript history plus close effects, without a delegation.
344
344
  *
345
345
  * # Errors
346
346
  *
@@ -374,6 +374,14 @@ export class Nanocodex {
374
374
  * Rejects voices outside Codex's ChatGPT V3 catalog.
375
375
  */
376
376
  browserVoice(voice: string): BrowserVoice;
377
+ /**
378
+ * Exports the exact latest committed model boundary without mutating this agent.
379
+ *
380
+ * # Errors
381
+ *
382
+ * Rejects before the first safe boundary or after the driver stops.
383
+ */
384
+ checkpoint(): Promise<string>;
377
385
  /**
378
386
  * Closes one canonical task-tree child and its descendants.
379
387
  */
@@ -664,5 +672,9 @@ export function applyBrowserPatch(patch: string, session_id: string): Promise<st
664
672
 
665
673
  /**
666
674
  * Prunes old replay receipts before the full Agent runtime is constructed.
675
+ * Capability marker checked against the actual bundled module before deployment.
676
+ * Older kernels reject the native child route emitted by the current host.
667
677
  */
678
+ export function nativeSpawnContractVersion(): number;
679
+
668
680
  export function pruneDurableReceipts(durability_host_id: string, durability_id: string, terminal_receipt_limit: number): Promise<void>;
@@ -506,7 +506,7 @@ class BrowserVoice {
506
506
  return takeObject(ret);
507
507
  }
508
508
  /**
509
- * Flushes any final transcript tail and ends Codex's Realtime lifecycle.
509
+ * Retains final transcript history without a task and ends the Realtime lifecycle.
510
510
  *
511
511
  * # Errors
512
512
  *
@@ -1225,7 +1225,7 @@ class ManagedBrowserVoice {
1225
1225
  }
1226
1226
  }
1227
1227
  /**
1228
- * Stops the protocol and returns final transcript delegation plus close effects.
1228
+ * Stops the protocol and returns transcript history plus close effects, without a delegation.
1229
1229
  *
1230
1230
  * # Errors
1231
1231
  *
@@ -1343,6 +1343,18 @@ class Nanocodex {
1343
1343
  wasm.__wbindgen_add_to_stack_pointer(16);
1344
1344
  }
1345
1345
  }
1346
+ /**
1347
+ * Exports the exact latest committed model boundary without mutating this agent.
1348
+ *
1349
+ * # Errors
1350
+ *
1351
+ * Rejects before the first safe boundary or after the driver stops.
1352
+ * @returns {Promise<string>}
1353
+ */
1354
+ checkpoint() {
1355
+ const ret = wasm.nanocodex_checkpoint(this.__wbg_ptr);
1356
+ return takeObject(ret);
1357
+ }
1346
1358
  /**
1347
1359
  * Closes one canonical task-tree child and its descendants.
1348
1360
  * @param {string} task
@@ -2017,6 +2029,17 @@ exports.applyBrowserPatch = applyBrowserPatch;
2017
2029
 
2018
2030
  /**
2019
2031
  * Prunes old replay receipts before the full Agent runtime is constructed.
2032
+ * Capability marker checked against the actual bundled module before deployment.
2033
+ * Older kernels reject the native child route emitted by the current host.
2034
+ * @returns {number}
2035
+ */
2036
+ function nativeSpawnContractVersion() {
2037
+ const ret = wasm.nativeSpawnContractVersion();
2038
+ return ret >>> 0;
2039
+ }
2040
+ exports.nativeSpawnContractVersion = nativeSpawnContractVersion;
2041
+
2042
+ /**
2020
2043
  * @param {string} durability_host_id
2021
2044
  * @param {string} durability_id
2022
2045
  * @param {number} terminal_receipt_limit
@@ -2067,17 +2090,17 @@ function __wbg_get_imports() {
2067
2090
  __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
2068
2091
  getObject(arg0)._wbg_cb_unref();
2069
2092
  },
2070
- __wbg_beforeCompaction_9b2973672463c0c8: function() { return handleError(function (arg0, arg1, arg2) {
2093
+ __wbg_beforeCompaction_b303f80f5cb5cdf4: function() { return handleError(function (arg0, arg1, arg2) {
2071
2094
  const ret = globalThis.nanocodexHost.beforeCompaction(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2072
2095
  return addHeapObject(ret);
2073
2096
  }, arguments); },
2074
- __wbg_beginCodeTurn_7e9f07bb97942ec4: function(arg0, arg1) {
2097
+ __wbg_beginCodeTurn_e32b2ddf7e8702fd: function(arg0, arg1) {
2075
2098
  globalThis.nanocodexHost.beginCodeTurn(getStringFromWasm0(arg0, arg1));
2076
2099
  },
2077
- __wbg_bindSubagentRoute_25420cf9a8cc8ba1: function() { return handleError(function (arg0, arg1, arg2) {
2100
+ __wbg_bindSubagentRoute_d041b9f9b8527fa9: function() { return handleError(function (arg0, arg1, arg2) {
2078
2101
  globalThis.nanocodexHost.bindSubagentRoute(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2079
2102
  }, arguments); },
2080
- __wbg_bindSubagentSession_4d28395c9d4c48ba: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
2103
+ __wbg_bindSubagentSession_2a90c3cfce8d0060: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
2081
2104
  globalThis.nanocodexHost.bindSubagentSession(arg0 >>> 0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6), arg7 === 0 ? undefined : getStringFromWasm0(arg7, arg8));
2082
2105
  }, arguments); },
2083
2106
  __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
@@ -2088,53 +2111,53 @@ function __wbg_get_imports() {
2088
2111
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2089
2112
  return addHeapObject(ret);
2090
2113
  }, arguments); },
2091
- __wbg_cancelBeforeCompaction_450c782e3061f2b9: function() { return handleError(function (arg0, arg1, arg2) {
2114
+ __wbg_cancelBeforeCompaction_8624268077236826: function() { return handleError(function (arg0, arg1, arg2) {
2092
2115
  globalThis.nanocodexHost.cancelBeforeCompaction(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2093
2116
  }, arguments); },
2094
- __wbg_cancelCodeTurn_017f3f8eb647137b: function(arg0, arg1) {
2117
+ __wbg_cancelCodeTurn_2cdbff1a552010be: function(arg0, arg1) {
2095
2118
  globalThis.nanocodexHost.cancelCodeTurn(getStringFromWasm0(arg0, arg1));
2096
2119
  },
2097
- __wbg_cancelCode_e7c9c7a09291389b: function(arg0, arg1) {
2120
+ __wbg_cancelCode_493974742471a707: function(arg0, arg1) {
2098
2121
  globalThis.nanocodexHost.cancelCode(getStringFromWasm0(arg0, arg1));
2099
2122
  },
2100
2123
  __wbg_chatgptsubscription_new: function(arg0) {
2101
2124
  const ret = ChatGptSubscription.__wrap(arg0);
2102
2125
  return addHeapObject(ret);
2103
2126
  },
2104
- __wbg_close_3d8c71ffdda96254: function(arg0) {
2127
+ __wbg_close_e6d0bcb3a2c08180: function(arg0) {
2105
2128
  globalThis.nanocodexHost.close(arg0 >>> 0);
2106
2129
  },
2107
- __wbg_connect_5f3e2441fbe827f1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) {
2130
+ __wbg_connect_08858d1230c284c8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) {
2108
2131
  const ret = globalThis.nanocodexHost.connect(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5), arg6 !== 0, getStringFromWasm0(arg7, arg8), getStringFromWasm0(arg9, arg10), arg11 === 0 ? undefined : getStringFromWasm0(arg11, arg12));
2109
2132
  return addHeapObject(ret);
2110
2133
  }, arguments); },
2111
- __wbg_durabilityAcquire_6455b947ef7941b0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2134
+ __wbg_durabilityAcquire_30ec0d49cf76f8be: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2112
2135
  const ret = globalThis.nanocodexHost.durabilityAcquire(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2113
2136
  return addHeapObject(ret);
2114
2137
  }, arguments); },
2115
- __wbg_durabilityReadRecord_011121aeebbe7f45: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2138
+ __wbg_durabilityReadRecord_02300e0c1b657b22: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2116
2139
  const ret = globalThis.nanocodexHost.durabilityReadRecord(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2117
2140
  return addHeapObject(ret);
2118
2141
  }, arguments); },
2119
- __wbg_durabilityReadRecords_a4471cb6bcca8e7e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2142
+ __wbg_durabilityReadRecords_943fdfe53e994877: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2120
2143
  const ret = globalThis.nanocodexHost.durabilityReadRecords(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2121
2144
  return addHeapObject(ret);
2122
2145
  }, arguments); },
2123
- __wbg_durabilityReplace_1af6d7f578982063: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) {
2146
+ __wbg_durabilityReplace_2d48b0eeb7a3b5e9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) {
2124
2147
  const ret = globalThis.nanocodexHost.durabilityReplace(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), getStringFromWasm0(arg10, arg11), getStringFromWasm0(arg12, arg13));
2125
2148
  return addHeapObject(ret);
2126
2149
  }, arguments); },
2127
- __wbg_emitEvent_84c7d57c0fe9889a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2150
+ __wbg_emitEvent_c02916fca51ebccc: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
2128
2151
  globalThis.nanocodexHost.emitEvent(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4 >>> 0, arg5 === 0 ? undefined : getStringFromWasm0(arg5, arg6));
2129
2152
  }, arguments); },
2130
- __wbg_error_726b3794b4cedafa: function() { return handleError(function (arg0, arg1, arg2) {
2153
+ __wbg_error_03253ac053bcf00f: function() { return handleError(function (arg0, arg1, arg2) {
2131
2154
  console.error(getStringFromWasm0(arg0, arg1), getObject(arg2));
2132
2155
  }, arguments); },
2133
- __wbg_executeCode_9e0fede564aef199: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
2156
+ __wbg_executeCode_c23c145098e390f0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
2134
2157
  const ret = globalThis.nanocodexHost.executeCode(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), arg8 === 0 ? undefined : getStringFromWasm0(arg8, arg9));
2135
2158
  return addHeapObject(ret);
2136
2159
  }, arguments); },
2137
- __wbg_executeTool_511491cd1dde04ff: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
2160
+ __wbg_executeTool_3d591f25d46c4ed7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
2138
2161
  const ret = globalThis.nanocodexHost.executeTool(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9), arg10 === 0 ? undefined : getStringFromWasm0(arg10, arg11));
2139
2162
  return addHeapObject(ret);
2140
2163
  }, arguments); },
@@ -2160,18 +2183,18 @@ function __wbg_get_imports() {
2160
2183
  const ret = getObject(arg0)[arg1 >>> 0];
2161
2184
  return addHeapObject(ret);
2162
2185
  },
2163
- __wbg_httpClose_bea0f116bcad9132: function(arg0) {
2186
+ __wbg_httpClose_715f307ae61e2f4a: function(arg0) {
2164
2187
  globalThis.nanocodexHost.httpClose(arg0 >>> 0);
2165
2188
  },
2166
- __wbg_httpNext_29a8e86235de5b86: function() { return handleError(function (arg0) {
2189
+ __wbg_httpNext_5763589a87b00322: function() { return handleError(function (arg0) {
2167
2190
  const ret = globalThis.nanocodexHost.httpNext(arg0 >>> 0);
2168
2191
  return addHeapObject(ret);
2169
2192
  }, arguments); },
2170
- __wbg_httpOpen_ad2c0e60ae7decbd: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) {
2193
+ __wbg_httpOpen_fa5fa8aafc7b1071: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) {
2171
2194
  const ret = globalThis.nanocodexHost.httpOpen(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5), arg6 !== 0, getStringFromWasm0(arg7, arg8), getStringFromWasm0(arg9, arg10), arg11 === 0 ? undefined : getStringFromWasm0(arg11, arg12), getStringFromWasm0(arg13, arg14));
2172
2195
  return ret;
2173
2196
  }, arguments); },
2174
- __wbg_httpReady_e36e58121f425974: function() { return handleError(function (arg0) {
2197
+ __wbg_httpReady_c9640f77896ae762: function() { return handleError(function (arg0) {
2175
2198
  const ret = globalThis.nanocodexHost.httpReady(arg0 >>> 0);
2176
2199
  return addHeapObject(ret);
2177
2200
  }, arguments); },
@@ -2240,7 +2263,7 @@ function __wbg_get_imports() {
2240
2263
  const a = state0.a;
2241
2264
  state0.a = 0;
2242
2265
  try {
2243
- return __wasm_bindgen_func_elem_25238(a, state0.b, arg0, arg1);
2266
+ return __wasm_bindgen_func_elem_25546(a, state0.b, arg0, arg1);
2244
2267
  } finally {
2245
2268
  state0.a = a;
2246
2269
  }
@@ -2251,11 +2274,11 @@ function __wbg_get_imports() {
2251
2274
  state0.a = 0;
2252
2275
  }
2253
2276
  },
2254
- __wbg_nextCodeUpdate_f354578fe0c92325: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2277
+ __wbg_nextCodeUpdate_d88b4092cb66d3dc: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2255
2278
  const ret = globalThis.nanocodexHost.nextCodeUpdate(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2256
2279
  return addHeapObject(ret);
2257
2280
  }, arguments); },
2258
- __wbg_next_54069a304bc5ce61: function() { return handleError(function (arg0) {
2281
+ __wbg_next_8fe5f0ef64dfa82f: function() { return handleError(function (arg0) {
2259
2282
  const ret = globalThis.nanocodexHost.next(arg0 >>> 0);
2260
2283
  return addHeapObject(ret);
2261
2284
  }, arguments); },
@@ -2285,14 +2308,14 @@ function __wbg_get_imports() {
2285
2308
  __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
2286
2309
  queueMicrotask(getObject(arg0));
2287
2310
  },
2288
- __wbg_readWorkspaceFile_c246562c8d31fd20: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2311
+ __wbg_readWorkspaceFile_39d760f5338ed353: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2289
2312
  const ret = globalThis.nanocodexHost.readWorkspaceFile(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2290
2313
  return addHeapObject(ret);
2291
2314
  }, arguments); },
2292
- __wbg_releaseSubagentSession_66e4b35e320238d8: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2315
+ __wbg_releaseSubagentSession_5ed68a58c33c14f3: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2293
2316
  globalThis.nanocodexHost.releaseSubagentSession(arg0 >>> 0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2294
2317
  }, arguments); },
2295
- __wbg_removeWorkspaceFile_89adaf48c6a2ae37: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2318
+ __wbg_removeWorkspaceFile_2f92e2fbb9fda25a: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2296
2319
  const ret = globalThis.nanocodexHost.removeWorkspaceFile(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2297
2320
  return addHeapObject(ret);
2298
2321
  }, arguments); },
@@ -2304,15 +2327,15 @@ function __wbg_get_imports() {
2304
2327
  const ret = getObject(arg0).resolvedOptions();
2305
2328
  return addHeapObject(ret);
2306
2329
  },
2307
- __wbg_routeSubagent_dcff9208c102e1c5: function() { return handleError(function (arg0, arg1, arg2) {
2330
+ __wbg_routeSubagent_859e6ae616b5667a: function() { return handleError(function (arg0, arg1, arg2) {
2308
2331
  const ret = globalThis.nanocodexHost.routeSubagent(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2309
2332
  return addHeapObject(ret);
2310
2333
  }, arguments); },
2311
- __wbg_send_c854c9def13971f5: function() { return handleError(function (arg0, arg1, arg2) {
2334
+ __wbg_send_d6caced94ed60b39: function() { return handleError(function (arg0, arg1, arg2) {
2312
2335
  const ret = globalThis.nanocodexHost.send(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2313
2336
  return addHeapObject(ret);
2314
2337
  }, arguments); },
2315
- __wbg_setTimeout_43d600f1aa620dee: function(arg0, arg1) {
2338
+ __wbg_setTimeout_82524b6b9e5ea9d8: function(arg0, arg1) {
2316
2339
  const ret = globalThis.setTimeout(getObject(arg0), arg1);
2317
2340
  return addHeapObject(ret);
2318
2341
  },
@@ -2320,7 +2343,7 @@ function __wbg_get_imports() {
2320
2343
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2321
2344
  return ret;
2322
2345
  }, arguments); },
2323
- __wbg_sleep_d69fa29119bcab2d: function() { return handleError(function (arg0, arg1, arg2) {
2346
+ __wbg_sleep_7dee50be506f4a6c: function() { return handleError(function (arg0, arg1, arg2) {
2324
2347
  const ret = globalThis.nanocodexHost.sleep(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
2325
2348
  return addHeapObject(ret);
2326
2349
  }, arguments); },
@@ -2340,15 +2363,15 @@ function __wbg_get_imports() {
2340
2363
  const ret = typeof window === 'undefined' ? null : window;
2341
2364
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2342
2365
  },
2343
- __wbg_subscriptionCompareAndSwap_897947e11ce44d02: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2366
+ __wbg_subscriptionCompareAndSwap_2b498ca430ef83d0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2344
2367
  const ret = globalThis.nanocodexHost.subscriptionCompareAndSwap(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2345
2368
  return addHeapObject(ret);
2346
2369
  }, arguments); },
2347
- __wbg_subscriptionLoad_4577ccb462c57b10: function() { return handleError(function (arg0, arg1) {
2370
+ __wbg_subscriptionLoad_e56d3781922fb89b: function() { return handleError(function (arg0, arg1) {
2348
2371
  const ret = globalThis.nanocodexHost.subscriptionLoad(getStringFromWasm0(arg0, arg1));
2349
2372
  return addHeapObject(ret);
2350
2373
  }, arguments); },
2351
- __wbg_subscriptionRequest_d2aef956962865d4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2374
+ __wbg_subscriptionRequest_79f8aa8564c89a94: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2352
2375
  const ret = globalThis.nanocodexHost.subscriptionRequest(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2353
2376
  return addHeapObject(ret);
2354
2377
  }, arguments); },
@@ -2360,14 +2383,14 @@ function __wbg_get_imports() {
2360
2383
  const ret = getObject(arg0).then(getObject(arg1));
2361
2384
  return addHeapObject(ret);
2362
2385
  },
2363
- __wbg_toolDefinitions_3493454651c49fa9: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2386
+ __wbg_toolDefinitions_0ffcd06988393fe1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2364
2387
  const ret = globalThis.nanocodexHost.toolDefinitions(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
2365
2388
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2366
2389
  const len1 = WASM_VECTOR_LEN;
2367
2390
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2368
2391
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2369
2392
  }, arguments); },
2370
- __wbg_toolMode_0824bc01849933c6: function(arg0, arg1, arg2, arg3) {
2393
+ __wbg_toolMode_ba71d3bef71840ac: function(arg0, arg1, arg2, arg3) {
2371
2394
  const ret = globalThis.nanocodexHost.toolMode(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
2372
2395
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2373
2396
  const len1 = WASM_VECTOR_LEN;
@@ -2382,22 +2405,22 @@ function __wbg_get_imports() {
2382
2405
  const ret = TurnResult.__wrap(arg0);
2383
2406
  return addHeapObject(ret);
2384
2407
  },
2385
- __wbg_waitCode_ee0df3e5a63a8010: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2408
+ __wbg_waitCode_893d86be8aa679d7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2386
2409
  const ret = globalThis.nanocodexHost.waitCode(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2387
2410
  return addHeapObject(ret);
2388
2411
  }, arguments); },
2389
- __wbg_writeWorkspaceFile_d0109429b0feb688: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2412
+ __wbg_writeWorkspaceFile_8c9433484e50953c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2390
2413
  const ret = globalThis.nanocodexHost.writeWorkspaceFile(getStringFromWasm0(arg0, arg1), getObject(arg2), getStringFromWasm0(arg3, arg4));
2391
2414
  return addHeapObject(ret);
2392
2415
  }, arguments); },
2393
2416
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2394
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3636, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2395
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_25236);
2417
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3647, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2418
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_25544);
2396
2419
  return addHeapObject(ret);
2397
2420
  },
2398
2421
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2399
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 516, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2400
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_4680);
2422
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 520, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2423
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_4810);
2401
2424
  return addHeapObject(ret);
2402
2425
  },
2403
2426
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -2424,14 +2447,14 @@ function __wbg_get_imports() {
2424
2447
  };
2425
2448
  }
2426
2449
 
2427
- function __wasm_bindgen_func_elem_4680(arg0, arg1) {
2428
- wasm.__wasm_bindgen_func_elem_4680(arg0, arg1);
2450
+ function __wasm_bindgen_func_elem_4810(arg0, arg1) {
2451
+ wasm.__wasm_bindgen_func_elem_4810(arg0, arg1);
2429
2452
  }
2430
2453
 
2431
- function __wasm_bindgen_func_elem_25236(arg0, arg1, arg2) {
2454
+ function __wasm_bindgen_func_elem_25544(arg0, arg1, arg2) {
2432
2455
  try {
2433
2456
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2434
- wasm.__wasm_bindgen_func_elem_25236(retptr, arg0, arg1, addHeapObject(arg2));
2457
+ wasm.__wasm_bindgen_func_elem_25544(retptr, arg0, arg1, addHeapObject(arg2));
2435
2458
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2436
2459
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2437
2460
  if (r1) {
@@ -2442,8 +2465,8 @@ function __wasm_bindgen_func_elem_25236(arg0, arg1, arg2) {
2442
2465
  }
2443
2466
  }
2444
2467
 
2445
- function __wasm_bindgen_func_elem_25238(arg0, arg1, arg2, arg3) {
2446
- wasm.__wasm_bindgen_func_elem_25238(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2468
+ function __wasm_bindgen_func_elem_25546(arg0, arg1, arg2, arg3) {
2469
+ wasm.__wasm_bindgen_func_elem_25546(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2447
2470
  }
2448
2471
 
2449
2472
  const BrowserVoiceFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -57,6 +57,7 @@ export const managedbrowservoice_stop: (a: number, b: number) => void;
57
57
  export const nanocodex_agentId: (a: number, b: number) => void;
58
58
  export const nanocodex_appendDeveloperMessage: (a: number, b: number, c: number) => number;
59
59
  export const nanocodex_browserVoice: (a: number, b: number, c: number, d: number) => void;
60
+ export const nanocodex_checkpoint: (a: number) => number;
60
61
  export const nanocodex_closeSubagent: (a: number, b: number, c: number) => number;
61
62
  export const nanocodex_compact: (a: number) => number;
62
63
  export const nanocodex_context: (a: number) => number;
@@ -84,6 +85,7 @@ export const nanocodex_spawnSubagent: (a: number, b: number, c: number) => numbe
84
85
  export const nanocodex_spawnSubagents: (a: number, b: number, c: number) => number;
85
86
  export const nanocodex_startRealtimeConversation: (a: number) => number;
86
87
  export const nanocodex_waitSubagents: (a: number, b: number, c: number) => number;
88
+ export const nativeSpawnContractVersion: () => number;
87
89
  export const pruneDurableReceipts: (a: number, b: number, c: number, d: number, e: number) => number;
88
90
  export const turn_accepted: (a: number) => number;
89
91
  export const turn_cancel: (a: number) => number;
@@ -94,9 +96,9 @@ export const turn_withdrawSteer: (a: number, b: number, c: number) => number;
94
96
  export const turnresult_finalMessage: (a: number, b: number) => void;
95
97
  export const turnresult_snapshot: (a: number, b: number) => void;
96
98
  export const turnresult_usage: (a: number, b: number) => void;
97
- export const __wasm_bindgen_func_elem_25236: (a: number, b: number, c: number, d: number) => void;
98
- export const __wasm_bindgen_func_elem_25238: (a: number, b: number, c: number, d: number) => void;
99
- export const __wasm_bindgen_func_elem_4680: (a: number, b: number) => void;
99
+ export const __wasm_bindgen_func_elem_25544: (a: number, b: number, c: number, d: number) => void;
100
+ export const __wasm_bindgen_func_elem_25546: (a: number, b: number, c: number, d: number) => void;
101
+ export const __wasm_bindgen_func_elem_4810: (a: number, b: number) => void;
100
102
  export const __wbindgen_export: (a: number, b: number) => number;
101
103
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
102
104
  export const __wbindgen_export3: (a: number) => void;
@@ -7,6 +7,6 @@ worker-bundler-v1-simd
7
7
  271501285 630
8
8
  2360453989 252
9
9
  98157300 1906
10
- 4021294033 4008
10
+ 2504064109 4134
11
11
  wasm-opt version 132 (version_132)
12
- 2657750140 7120491
12
+ 2596841149 7191191
@@ -1 +1 @@
1
- {"schema":1,"revision":"6e3bb302fdf4258fa37f25e31ac42cd382d3660a","dirty":false,"sourceWasmSha256":"1711103d6f101dd52e61cc6bcfd39ee3d073c56af8d8323cb46db8ad396bb8cf","artifacts":{"nanocodex.js":"595ea6d64a10c0bf559c35f997acc0c8535902dcaf99772108df843707af65b7","nanocodex.d.ts":"a541ddc5e88d503b55bad66898d4d90ea1cc73fcb7b76dd73418a166e72629f5","nanocodex_bg.js":"26d60fa7f98ea2dd41901ca28e48d39845b9c789eb8a94da71e7671ec57c47fe","nanocodex_bg.wasm":"7de29b3f14edccf39ec57f994cfa73ee01dd854c6af4de87236be106a299881d","nanocodex_worker.js":"56a74ef761e79916a3da282ed6bb6ee5dbd0750bc69027b9df91d63a2ea75776","package.json":"1239d4d885dcad42201a27ed9324f8f0f760b78700d8db9ced39a511cffe7eae"}}
1
+ {"schema":1,"revision":"7fcc3e795cc5c39b07a8ab1734184c50afff6b13","dirty":false,"sourceWasmSha256":"7a321915a155a346aeb46d019a2fe68b93da185efbdd4804d2e4a63d4dc09dd4","artifacts":{"nanocodex.js":"b1cf8c54d9dafc61b101873a9e0baeccd0ac0372e4bcca0b97b5e3e95a84d221","nanocodex.d.ts":"b928ea4e3bc61d4771bf0fd6dfb010b35d825e963ee4752810143de67a26fb27","nanocodex_bg.js":"067db46b8d5f90c86d33f7aaec5cd61443359c8ea56076cd0b74428159cd8b8e","nanocodex_bg.wasm":"c4be2738783c8f4960af8d9ec9ba3fb435f72459bec6fcdd211fedc912423609","nanocodex_worker.js":"8ad61dea25c711e5b5094b2ab1dfdf00e8d15743bc99987d4b626c26c2e04368","package.json":"1239d4d885dcad42201a27ed9324f8f0f760b78700d8db9ced39a511cffe7eae"}}
@@ -140,7 +140,7 @@ export class BrowserVoice {
140
140
  */
141
141
  start(): Promise<void>;
142
142
  /**
143
- * Flushes any final transcript tail and ends Codex's Realtime lifecycle.
143
+ * Retains final transcript history without a task and ends the Realtime lifecycle.
144
144
  *
145
145
  * # Errors
146
146
  *
@@ -340,7 +340,7 @@ export class ManagedBrowserVoice {
340
340
  */
341
341
  start(context_json: string): string;
342
342
  /**
343
- * Stops the protocol and returns final transcript delegation plus close effects.
343
+ * Stops the protocol and returns transcript history plus close effects, without a delegation.
344
344
  *
345
345
  * # Errors
346
346
  *
@@ -374,6 +374,14 @@ export class Nanocodex {
374
374
  * Rejects voices outside Codex's ChatGPT V3 catalog.
375
375
  */
376
376
  browserVoice(voice: string): BrowserVoice;
377
+ /**
378
+ * Exports the exact latest committed model boundary without mutating this agent.
379
+ *
380
+ * # Errors
381
+ *
382
+ * Rejects before the first safe boundary or after the driver stops.
383
+ */
384
+ checkpoint(): Promise<string>;
377
385
  /**
378
386
  * Closes one canonical task-tree child and its descendants.
379
387
  */
@@ -664,7 +672,11 @@ export function applyBrowserPatch(patch: string, session_id: string): Promise<st
664
672
 
665
673
  /**
666
674
  * Prunes old replay receipts before the full Agent runtime is constructed.
675
+ * Capability marker checked against the actual bundled module before deployment.
676
+ * Older kernels reject the native child route emitted by the current host.
667
677
  */
678
+ export function nativeSpawnContractVersion(): number;
679
+
668
680
  export function pruneDurableReceipts(durability_host_id: string, durability_id: string, terminal_receipt_limit: number): Promise<void>;
669
681
 
670
682
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -727,6 +739,7 @@ export interface InitOutput {
727
739
  readonly nanocodex_agentId: (a: number, b: number) => void;
728
740
  readonly nanocodex_appendDeveloperMessage: (a: number, b: number, c: number) => number;
729
741
  readonly nanocodex_browserVoice: (a: number, b: number, c: number, d: number) => void;
742
+ readonly nanocodex_checkpoint: (a: number) => number;
730
743
  readonly nanocodex_closeSubagent: (a: number, b: number, c: number) => number;
731
744
  readonly nanocodex_compact: (a: number) => number;
732
745
  readonly nanocodex_context: (a: number) => number;
@@ -754,6 +767,7 @@ export interface InitOutput {
754
767
  readonly nanocodex_spawnSubagents: (a: number, b: number, c: number) => number;
755
768
  readonly nanocodex_startRealtimeConversation: (a: number) => number;
756
769
  readonly nanocodex_waitSubagents: (a: number, b: number, c: number) => number;
770
+ readonly nativeSpawnContractVersion: () => number;
757
771
  readonly pruneDurableReceipts: (a: number, b: number, c: number, d: number, e: number) => number;
758
772
  readonly turn_accepted: (a: number) => number;
759
773
  readonly turn_cancel: (a: number) => number;
@@ -764,9 +778,9 @@ export interface InitOutput {
764
778
  readonly turnresult_finalMessage: (a: number, b: number) => void;
765
779
  readonly turnresult_snapshot: (a: number, b: number) => void;
766
780
  readonly turnresult_usage: (a: number, b: number) => void;
767
- readonly __wasm_bindgen_func_elem_25236: (a: number, b: number, c: number, d: number) => void;
768
- readonly __wasm_bindgen_func_elem_25238: (a: number, b: number, c: number, d: number) => void;
769
- readonly __wasm_bindgen_func_elem_4680: (a: number, b: number) => void;
781
+ readonly __wasm_bindgen_func_elem_25544: (a: number, b: number, c: number, d: number) => void;
782
+ readonly __wasm_bindgen_func_elem_25546: (a: number, b: number, c: number, d: number) => void;
783
+ readonly __wasm_bindgen_func_elem_4810: (a: number, b: number) => void;
770
784
  readonly __wbindgen_export: (a: number, b: number) => number;
771
785
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
772
786
  readonly __wbindgen_export3: (a: number) => void;