nanocodex 0.6.4 → 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 (78) hide show
  1. package/README.md +37 -11
  2. package/browser/Agent.d.mts +1 -1
  3. package/browser/ElevenLabsPlayback.mjs +119 -0
  4. package/browser/InlineAgent.mjs +22 -17
  5. package/browser/Transport.d.mts +2 -0
  6. package/browser/Transport.mjs +3 -2
  7. package/browser/Voice.d.mts +4 -0
  8. package/browser/Voice.mjs +38 -6
  9. package/browser/VoiceSession.mjs +37 -7
  10. package/browser/host.d.mts +20 -4
  11. package/browser/host.mjs +156 -18
  12. package/cloud/types.d.mts +1 -0
  13. package/cloudflare/Agent.d.mts +14 -9
  14. package/cloudflare/Agent.mjs +354 -96
  15. package/cloudflare/agent-settings.d.mts +15 -0
  16. package/cloudflare/agent-settings.mjs +135 -0
  17. package/cloudflare/chat-reasoning.mjs +20 -0
  18. package/cloudflare/durable-placement.d.mts +12 -0
  19. package/cloudflare/durable-placement.mjs +82 -0
  20. package/cloudflare/egress.d.mts +31 -0
  21. package/cloudflare/gateway-binding-responses.mjs +84 -0
  22. package/cloudflare/gateway-responses.d.mts +48 -0
  23. package/cloudflare/gateway-responses.mjs +191 -0
  24. package/cloudflare/index.d.mts +6 -0
  25. package/cloudflare/index.mjs +3 -0
  26. package/cloudflare/managed-auth.d.mts +15 -0
  27. package/cloudflare/managed-auth.mjs +119 -0
  28. package/cloudflare/managed-live.d.mts +7 -0
  29. package/cloudflare/managed-live.mjs +56 -0
  30. package/cloudflare/prepared-connection.mjs +49 -0
  31. package/cloudflare/provider-stream.mjs +353 -0
  32. package/cloudflare/rpc.d.mts +9 -0
  33. package/cloudflare/rpc.mjs +14 -0
  34. package/cloudflare/tool-alias-diagnostic.mjs +21 -0
  35. package/cloudflare/tracing.d.mts +16 -0
  36. package/cloudflare/tracing.mjs +47 -0
  37. package/cloudflare/workers-ai-responses.d.mts +28 -0
  38. package/cloudflare/workers-ai-responses.mjs +399 -0
  39. package/host/Agent.d.mts +1 -1
  40. package/index.d.mts +2 -0
  41. package/internal.mjs +53 -14
  42. package/managed/Agent.d.mts +25 -69
  43. package/managed/Agent.mjs +82 -196
  44. package/managed/README.md +9 -38
  45. package/managed/Voice.mjs +5 -2
  46. package/managed/index.d.mts +0 -3
  47. package/managed/internal.mjs +2 -1
  48. package/node/Agent.d.mts +1 -1
  49. package/node/Agent.mjs +9 -3
  50. package/node/host.mjs +5 -0
  51. package/package.json +34 -2
  52. package/pkg-node/nanocodex.d.ts +22 -18
  53. package/pkg-node/nanocodex.js +118 -92
  54. package/pkg-node/nanocodex_bg.wasm.d.ts +6 -5
  55. package/pkg-web/.nanocodex-bindgen-stamp +7 -1
  56. package/pkg-web/nanocodex-build.json +1 -1
  57. package/pkg-web/nanocodex.d.ts +28 -23
  58. package/pkg-web/nanocodex.js +117 -91
  59. package/pkg-web/nanocodex_bg.js +117 -91
  60. package/pkg-web/nanocodex_bg.wasm +0 -0
  61. package/pkg-web/nanocodex_bg.wasm.d.ts +6 -5
  62. package/pkg-web/nanocodex_worker.js +1 -1
  63. package/runtime/before-compaction.mjs +49 -0
  64. package/runtime/code-evaluator.worker.mjs +2 -9
  65. package/runtime/managed-transport.mjs +10 -2
  66. package/runtime/mcp-runtime.mjs +20 -4
  67. package/runtime/quickjs-evaluator.mjs +11 -5
  68. package/runtime/response-controls.mjs +67 -4
  69. package/runtime/steer-receipt.mjs +13 -0
  70. package/runtime/subagent-routing.d.mts +38 -0
  71. package/runtime/subagent-routing.mjs +81 -0
  72. package/runtime/subagents.d.mts +1 -1
  73. package/runtime/tempo-provider.d.mts +1 -1
  74. package/runtime/tempo-provider.mjs +1 -1
  75. package/tools/environment.d.mts +17 -2
  76. package/tools/environment.mjs +30 -3
  77. package/tools/index.d.mts +2 -0
  78. package/types.d.mts +30 -2
@@ -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
  *
@@ -756,6 +756,28 @@ class ManagedBrowserVoice {
756
756
  wasm.__wbindgen_export5(deferred4_0, deferred4_1, 1);
757
757
  }
758
758
  }
759
+ /**
760
+ * Binds the known managed call before admission or microphone setup begins.
761
+ *
762
+ * # Errors
763
+ * Rejects invalid session IDs or rebinding an active call.
764
+ * @param {string} managed_session_id
765
+ */
766
+ bindSession(managed_session_id) {
767
+ try {
768
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
769
+ const ptr0 = passStringToWasm0(managed_session_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
770
+ const len0 = WASM_VECTOR_LEN;
771
+ wasm.managedbrowservoice_bindSession(retptr, this.__wbg_ptr, ptr0, len0);
772
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
773
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
774
+ if (r1) {
775
+ throw takeObject(r0);
776
+ }
777
+ } finally {
778
+ wasm.__wbindgen_add_to_stack_pointer(16);
779
+ }
780
+ }
759
781
  /**
760
782
  * Encodes the managed same-origin call request after the browser creates its SDP offer.
761
783
  *
@@ -1174,8 +1196,11 @@ class ManagedBrowserVoice {
1174
1196
  *
1175
1197
  * Rejects malformed `AgentSessionContext` JSON.
1176
1198
  * @param {string} context_json
1199
+ * @returns {string}
1177
1200
  */
1178
1201
  start(context_json) {
1202
+ let deferred3_0;
1203
+ let deferred3_1;
1179
1204
  try {
1180
1205
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1181
1206
  const ptr0 = passStringToWasm0(context_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -1183,15 +1208,24 @@ class ManagedBrowserVoice {
1183
1208
  wasm.managedbrowservoice_start(retptr, this.__wbg_ptr, ptr0, len0);
1184
1209
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1185
1210
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1186
- if (r1) {
1187
- throw takeObject(r0);
1211
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1212
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1213
+ var ptr2 = r0;
1214
+ var len2 = r1;
1215
+ if (r3) {
1216
+ ptr2 = 0; len2 = 0;
1217
+ throw takeObject(r2);
1188
1218
  }
1219
+ deferred3_0 = ptr2;
1220
+ deferred3_1 = len2;
1221
+ return getStringFromWasm0(ptr2, len2);
1189
1222
  } finally {
1190
1223
  wasm.__wbindgen_add_to_stack_pointer(16);
1224
+ wasm.__wbindgen_export5(deferred3_0, deferred3_1, 1);
1191
1225
  }
1192
1226
  }
1193
1227
  /**
1194
- * 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.
1195
1229
  *
1196
1230
  * # Errors
1197
1231
  *
@@ -1309,6 +1343,18 @@ class Nanocodex {
1309
1343
  wasm.__wbindgen_add_to_stack_pointer(16);
1310
1344
  }
1311
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
+ }
1312
1358
  /**
1313
1359
  * Closes one canonical task-tree child and its descendants.
1314
1360
  * @param {string} task
@@ -1562,26 +1608,6 @@ class Nanocodex {
1562
1608
  wasm.__wbindgen_add_to_stack_pointer(16);
1563
1609
  }
1564
1610
  }
1565
- /**
1566
- * Restores persisted logical children after the JavaScript owner acquires
1567
- * its durability generation and activates the replacement host.
1568
- *
1569
- * # Errors
1570
- *
1571
- * Rejects malformed descriptors, disabled subagents, duplicate restoration,
1572
- * or an invalid persisted topology.
1573
- * @param {string} descriptors_json
1574
- * @param {string | null} [host_contexts_json]
1575
- * @returns {Promise<void>}
1576
- */
1577
- restoreSubagents(descriptors_json, host_contexts_json) {
1578
- const ptr0 = passStringToWasm0(descriptors_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1579
- const len0 = WASM_VECTOR_LEN;
1580
- var ptr1 = isLikeNone(host_contexts_json) ? 0 : passStringToWasm0(host_contexts_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1581
- var len1 = WASM_VECTOR_LEN;
1582
- const ret = wasm.nanocodex_restoreSubagents(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1583
- return takeObject(ret);
1584
- }
1585
1611
  /**
1586
1612
  * Atomically steers the active turn or starts a new independently awaitable turn.
1587
1613
  *
@@ -2002,32 +2028,18 @@ function applyBrowserPatch(patch, session_id) {
2002
2028
  exports.applyBrowserPatch = applyBrowserPatch;
2003
2029
 
2004
2030
  /**
2005
- * Returns the shared bounded first-prompt retrieval plan for a managed host.
2006
- * @param {string} input
2007
- * @returns {string}
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}
2008
2035
  */
2009
- function managedBootstrapPlan(input) {
2010
- let deferred2_0;
2011
- let deferred2_1;
2012
- try {
2013
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2014
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2015
- const len0 = WASM_VECTOR_LEN;
2016
- wasm.managedBootstrapPlan(retptr, ptr0, len0);
2017
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2018
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2019
- deferred2_0 = r0;
2020
- deferred2_1 = r1;
2021
- return getStringFromWasm0(r0, r1);
2022
- } finally {
2023
- wasm.__wbindgen_add_to_stack_pointer(16);
2024
- wasm.__wbindgen_export5(deferred2_0, deferred2_1, 1);
2025
- }
2036
+ function nativeSpawnContractVersion() {
2037
+ const ret = wasm.nativeSpawnContractVersion();
2038
+ return ret >>> 0;
2026
2039
  }
2027
- exports.managedBootstrapPlan = managedBootstrapPlan;
2040
+ exports.nativeSpawnContractVersion = nativeSpawnContractVersion;
2028
2041
 
2029
2042
  /**
2030
- * Prunes old replay receipts before the full Agent runtime is constructed.
2031
2043
  * @param {string} durability_host_id
2032
2044
  * @param {string} durability_id
2033
2045
  * @param {number} terminal_receipt_limit
@@ -2078,10 +2090,17 @@ function __wbg_get_imports() {
2078
2090
  __wbg__wbg_cb_unref_fffb441def202758: function(arg0) {
2079
2091
  getObject(arg0)._wbg_cb_unref();
2080
2092
  },
2081
- __wbg_beginCodeTurn_0a7124b7eee451a5: function(arg0, arg1) {
2093
+ __wbg_beforeCompaction_b303f80f5cb5cdf4: function() { return handleError(function (arg0, arg1, arg2) {
2094
+ const ret = globalThis.nanocodexHost.beforeCompaction(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2095
+ return addHeapObject(ret);
2096
+ }, arguments); },
2097
+ __wbg_beginCodeTurn_e32b2ddf7e8702fd: function(arg0, arg1) {
2082
2098
  globalThis.nanocodexHost.beginCodeTurn(getStringFromWasm0(arg0, arg1));
2083
2099
  },
2084
- __wbg_bindSubagentSession_94bff1e8dd70d1d1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
2100
+ __wbg_bindSubagentRoute_d041b9f9b8527fa9: function() { return handleError(function (arg0, arg1, arg2) {
2101
+ globalThis.nanocodexHost.bindSubagentRoute(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2102
+ }, arguments); },
2103
+ __wbg_bindSubagentSession_2a90c3cfce8d0060: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
2085
2104
  globalThis.nanocodexHost.bindSubagentSession(arg0 >>> 0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getStringFromWasm0(arg5, arg6), arg7 === 0 ? undefined : getStringFromWasm0(arg7, arg8));
2086
2105
  }, arguments); },
2087
2106
  __wbg_call_8a2dd23819f8a60a: function() { return handleError(function (arg0, arg1) {
@@ -2092,51 +2111,54 @@ function __wbg_get_imports() {
2092
2111
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
2093
2112
  return addHeapObject(ret);
2094
2113
  }, arguments); },
2095
- __wbg_cancelCodeTurn_cd5a2ff077ecc94f: function(arg0, arg1) {
2114
+ __wbg_cancelBeforeCompaction_8624268077236826: function() { return handleError(function (arg0, arg1, arg2) {
2115
+ globalThis.nanocodexHost.cancelBeforeCompaction(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2116
+ }, arguments); },
2117
+ __wbg_cancelCodeTurn_2cdbff1a552010be: function(arg0, arg1) {
2096
2118
  globalThis.nanocodexHost.cancelCodeTurn(getStringFromWasm0(arg0, arg1));
2097
2119
  },
2098
- __wbg_cancelCode_c598a558677e0400: function(arg0, arg1) {
2120
+ __wbg_cancelCode_493974742471a707: function(arg0, arg1) {
2099
2121
  globalThis.nanocodexHost.cancelCode(getStringFromWasm0(arg0, arg1));
2100
2122
  },
2101
2123
  __wbg_chatgptsubscription_new: function(arg0) {
2102
2124
  const ret = ChatGptSubscription.__wrap(arg0);
2103
2125
  return addHeapObject(ret);
2104
2126
  },
2105
- __wbg_close_fdf88ca6545d2dfa: function(arg0) {
2127
+ __wbg_close_e6d0bcb3a2c08180: function(arg0) {
2106
2128
  globalThis.nanocodexHost.close(arg0 >>> 0);
2107
2129
  },
2108
- __wbg_connect_a4aca5683039d7a7: 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) {
2109
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));
2110
2132
  return addHeapObject(ret);
2111
2133
  }, arguments); },
2112
- __wbg_durabilityAcquire_2ef4917a34fa75f2: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2134
+ __wbg_durabilityAcquire_30ec0d49cf76f8be: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2113
2135
  const ret = globalThis.nanocodexHost.durabilityAcquire(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2114
2136
  return addHeapObject(ret);
2115
2137
  }, arguments); },
2116
- __wbg_durabilityReadRecord_539304eeef4f34de: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2138
+ __wbg_durabilityReadRecord_02300e0c1b657b22: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2117
2139
  const ret = globalThis.nanocodexHost.durabilityReadRecord(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2118
2140
  return addHeapObject(ret);
2119
2141
  }, arguments); },
2120
- __wbg_durabilityReadRecords_d858dd4d53e07fad: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2142
+ __wbg_durabilityReadRecords_943fdfe53e994877: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2121
2143
  const ret = globalThis.nanocodexHost.durabilityReadRecords(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2122
2144
  return addHeapObject(ret);
2123
2145
  }, arguments); },
2124
- __wbg_durabilityReplace_98e18f8a4e1ffa87: 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) {
2125
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));
2126
2148
  return addHeapObject(ret);
2127
2149
  }, arguments); },
2128
- __wbg_emitEvent_ea060841206c3e75: 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) {
2129
2151
  globalThis.nanocodexHost.emitEvent(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), arg4 >>> 0, arg5 === 0 ? undefined : getStringFromWasm0(arg5, arg6));
2130
2152
  }, arguments); },
2131
- __wbg_error_90a3fc8068d88664: function() { return handleError(function (arg0, arg1, arg2) {
2153
+ __wbg_error_03253ac053bcf00f: function() { return handleError(function (arg0, arg1, arg2) {
2132
2154
  console.error(getStringFromWasm0(arg0, arg1), getObject(arg2));
2133
2155
  }, arguments); },
2134
- __wbg_executeCode_1f043e54c74768ed: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
2135
- const ret = globalThis.nanocodexHost.executeCode(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7));
2156
+ __wbg_executeCode_c23c145098e390f0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
2157
+ const ret = globalThis.nanocodexHost.executeCode(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), arg8 === 0 ? undefined : getStringFromWasm0(arg8, arg9));
2136
2158
  return addHeapObject(ret);
2137
2159
  }, arguments); },
2138
- __wbg_executeTool_77f3e9a52b85860c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
2139
- const ret = globalThis.nanocodexHost.executeTool(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5), getStringFromWasm0(arg6, arg7), getStringFromWasm0(arg8, arg9));
2160
+ __wbg_executeTool_3d591f25d46c4ed7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) {
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));
2140
2162
  return addHeapObject(ret);
2141
2163
  }, arguments); },
2142
2164
  __wbg_getRandomValues_3f44b700395062e5: function() { return handleError(function (arg0, arg1) {
@@ -2161,18 +2183,18 @@ function __wbg_get_imports() {
2161
2183
  const ret = getObject(arg0)[arg1 >>> 0];
2162
2184
  return addHeapObject(ret);
2163
2185
  },
2164
- __wbg_httpClose_bb7d713b151b9a56: function(arg0) {
2186
+ __wbg_httpClose_715f307ae61e2f4a: function(arg0) {
2165
2187
  globalThis.nanocodexHost.httpClose(arg0 >>> 0);
2166
2188
  },
2167
- __wbg_httpNext_4cb6bce08da7fadb: function() { return handleError(function (arg0) {
2189
+ __wbg_httpNext_5763589a87b00322: function() { return handleError(function (arg0) {
2168
2190
  const ret = globalThis.nanocodexHost.httpNext(arg0 >>> 0);
2169
2191
  return addHeapObject(ret);
2170
2192
  }, arguments); },
2171
- __wbg_httpOpen_7b0f76ffd6c246d1: 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) {
2172
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));
2173
2195
  return ret;
2174
2196
  }, arguments); },
2175
- __wbg_httpReady_472d23f7f1654a26: function() { return handleError(function (arg0) {
2197
+ __wbg_httpReady_c9640f77896ae762: function() { return handleError(function (arg0) {
2176
2198
  const ret = globalThis.nanocodexHost.httpReady(arg0 >>> 0);
2177
2199
  return addHeapObject(ret);
2178
2200
  }, arguments); },
@@ -2241,7 +2263,7 @@ function __wbg_get_imports() {
2241
2263
  const a = state0.a;
2242
2264
  state0.a = 0;
2243
2265
  try {
2244
- return __wasm_bindgen_func_elem_24935(a, state0.b, arg0, arg1);
2266
+ return __wasm_bindgen_func_elem_25546(a, state0.b, arg0, arg1);
2245
2267
  } finally {
2246
2268
  state0.a = a;
2247
2269
  }
@@ -2252,11 +2274,11 @@ function __wbg_get_imports() {
2252
2274
  state0.a = 0;
2253
2275
  }
2254
2276
  },
2255
- __wbg_nextCodeUpdate_8f3d030aa1cf40cf: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2277
+ __wbg_nextCodeUpdate_d88b4092cb66d3dc: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2256
2278
  const ret = globalThis.nanocodexHost.nextCodeUpdate(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2257
2279
  return addHeapObject(ret);
2258
2280
  }, arguments); },
2259
- __wbg_next_73a833f68917f36e: function() { return handleError(function (arg0) {
2281
+ __wbg_next_8fe5f0ef64dfa82f: function() { return handleError(function (arg0) {
2260
2282
  const ret = globalThis.nanocodexHost.next(arg0 >>> 0);
2261
2283
  return addHeapObject(ret);
2262
2284
  }, arguments); },
@@ -2286,14 +2308,14 @@ function __wbg_get_imports() {
2286
2308
  __wbg_queueMicrotask_6a09b7bc46549209: function(arg0) {
2287
2309
  queueMicrotask(getObject(arg0));
2288
2310
  },
2289
- __wbg_readWorkspaceFile_aa4a72507d05aff1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2311
+ __wbg_readWorkspaceFile_39d760f5338ed353: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2290
2312
  const ret = globalThis.nanocodexHost.readWorkspaceFile(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2291
2313
  return addHeapObject(ret);
2292
2314
  }, arguments); },
2293
- __wbg_releaseSubagentSession_1a80c6837d2f614c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2315
+ __wbg_releaseSubagentSession_5ed68a58c33c14f3: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2294
2316
  globalThis.nanocodexHost.releaseSubagentSession(arg0 >>> 0, getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
2295
2317
  }, arguments); },
2296
- __wbg_removeWorkspaceFile_142bc3149a6ebc97: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2318
+ __wbg_removeWorkspaceFile_2f92e2fbb9fda25a: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2297
2319
  const ret = globalThis.nanocodexHost.removeWorkspaceFile(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2298
2320
  return addHeapObject(ret);
2299
2321
  }, arguments); },
@@ -2305,11 +2327,15 @@ function __wbg_get_imports() {
2305
2327
  const ret = getObject(arg0).resolvedOptions();
2306
2328
  return addHeapObject(ret);
2307
2329
  },
2308
- __wbg_send_4a0833d63a63b91f: function() { return handleError(function (arg0, arg1, arg2) {
2330
+ __wbg_routeSubagent_859e6ae616b5667a: function() { return handleError(function (arg0, arg1, arg2) {
2331
+ const ret = globalThis.nanocodexHost.routeSubagent(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2332
+ return addHeapObject(ret);
2333
+ }, arguments); },
2334
+ __wbg_send_d6caced94ed60b39: function() { return handleError(function (arg0, arg1, arg2) {
2309
2335
  const ret = globalThis.nanocodexHost.send(arg0 >>> 0, getStringFromWasm0(arg1, arg2));
2310
2336
  return addHeapObject(ret);
2311
2337
  }, arguments); },
2312
- __wbg_setTimeout_c6205ad5adcd1a59: function(arg0, arg1) {
2338
+ __wbg_setTimeout_82524b6b9e5ea9d8: function(arg0, arg1) {
2313
2339
  const ret = globalThis.setTimeout(getObject(arg0), arg1);
2314
2340
  return addHeapObject(ret);
2315
2341
  },
@@ -2317,7 +2343,7 @@ function __wbg_get_imports() {
2317
2343
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
2318
2344
  return ret;
2319
2345
  }, arguments); },
2320
- __wbg_sleep_3921e17fb319947c: function() { return handleError(function (arg0, arg1, arg2) {
2346
+ __wbg_sleep_7dee50be506f4a6c: function() { return handleError(function (arg0, arg1, arg2) {
2321
2347
  const ret = globalThis.nanocodexHost.sleep(getStringFromWasm0(arg0, arg1), arg2 >>> 0);
2322
2348
  return addHeapObject(ret);
2323
2349
  }, arguments); },
@@ -2337,15 +2363,15 @@ function __wbg_get_imports() {
2337
2363
  const ret = typeof window === 'undefined' ? null : window;
2338
2364
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
2339
2365
  },
2340
- __wbg_subscriptionCompareAndSwap_a9d25cd277d5d0ef: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2366
+ __wbg_subscriptionCompareAndSwap_2b498ca430ef83d0: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2341
2367
  const ret = globalThis.nanocodexHost.subscriptionCompareAndSwap(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2342
2368
  return addHeapObject(ret);
2343
2369
  }, arguments); },
2344
- __wbg_subscriptionLoad_26d28b5db170c54b: function() { return handleError(function (arg0, arg1) {
2370
+ __wbg_subscriptionLoad_e56d3781922fb89b: function() { return handleError(function (arg0, arg1) {
2345
2371
  const ret = globalThis.nanocodexHost.subscriptionLoad(getStringFromWasm0(arg0, arg1));
2346
2372
  return addHeapObject(ret);
2347
2373
  }, arguments); },
2348
- __wbg_subscriptionRequest_cedb47bd8ab61075: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2374
+ __wbg_subscriptionRequest_79f8aa8564c89a94: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2349
2375
  const ret = globalThis.nanocodexHost.subscriptionRequest(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
2350
2376
  return addHeapObject(ret);
2351
2377
  }, arguments); },
@@ -2357,14 +2383,14 @@ function __wbg_get_imports() {
2357
2383
  const ret = getObject(arg0).then(getObject(arg1));
2358
2384
  return addHeapObject(ret);
2359
2385
  },
2360
- __wbg_toolDefinitions_1a0d8e90ad1fa7f9: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2386
+ __wbg_toolDefinitions_0ffcd06988393fe1: function() { return handleError(function (arg0, arg1, arg2, arg3) {
2361
2387
  const ret = globalThis.nanocodexHost.toolDefinitions(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
2362
2388
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2363
2389
  const len1 = WASM_VECTOR_LEN;
2364
2390
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
2365
2391
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
2366
2392
  }, arguments); },
2367
- __wbg_toolMode_a1078d9aa4c7dda3: function(arg0, arg1, arg2, arg3) {
2393
+ __wbg_toolMode_ba71d3bef71840ac: function(arg0, arg1, arg2, arg3) {
2368
2394
  const ret = globalThis.nanocodexHost.toolMode(arg1 >>> 0, getStringFromWasm0(arg2, arg3));
2369
2395
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2370
2396
  const len1 = WASM_VECTOR_LEN;
@@ -2379,22 +2405,22 @@ function __wbg_get_imports() {
2379
2405
  const ret = TurnResult.__wrap(arg0);
2380
2406
  return addHeapObject(ret);
2381
2407
  },
2382
- __wbg_waitCode_a3ad47cf509664d9: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2408
+ __wbg_waitCode_893d86be8aa679d7: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
2383
2409
  const ret = globalThis.nanocodexHost.waitCode(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3), getStringFromWasm0(arg4, arg5));
2384
2410
  return addHeapObject(ret);
2385
2411
  }, arguments); },
2386
- __wbg_writeWorkspaceFile_6285745ca0de9e76: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2412
+ __wbg_writeWorkspaceFile_8c9433484e50953c: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
2387
2413
  const ret = globalThis.nanocodexHost.writeWorkspaceFile(getStringFromWasm0(arg0, arg1), getObject(arg2), getStringFromWasm0(arg3, arg4));
2388
2414
  return addHeapObject(ret);
2389
2415
  }, arguments); },
2390
2416
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2391
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3664, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2392
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_24933);
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);
2393
2419
  return addHeapObject(ret);
2394
2420
  },
2395
2421
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2396
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 529, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2397
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_4744);
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);
2398
2424
  return addHeapObject(ret);
2399
2425
  },
2400
2426
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -2421,14 +2447,14 @@ function __wbg_get_imports() {
2421
2447
  };
2422
2448
  }
2423
2449
 
2424
- function __wasm_bindgen_func_elem_4744(arg0, arg1) {
2425
- wasm.__wasm_bindgen_func_elem_4744(arg0, arg1);
2450
+ function __wasm_bindgen_func_elem_4810(arg0, arg1) {
2451
+ wasm.__wasm_bindgen_func_elem_4810(arg0, arg1);
2426
2452
  }
2427
2453
 
2428
- function __wasm_bindgen_func_elem_24933(arg0, arg1, arg2) {
2454
+ function __wasm_bindgen_func_elem_25544(arg0, arg1, arg2) {
2429
2455
  try {
2430
2456
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2431
- wasm.__wasm_bindgen_func_elem_24933(retptr, arg0, arg1, addHeapObject(arg2));
2457
+ wasm.__wasm_bindgen_func_elem_25544(retptr, arg0, arg1, addHeapObject(arg2));
2432
2458
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2433
2459
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2434
2460
  if (r1) {
@@ -2439,8 +2465,8 @@ function __wasm_bindgen_func_elem_24933(arg0, arg1, arg2) {
2439
2465
  }
2440
2466
  }
2441
2467
 
2442
- function __wasm_bindgen_func_elem_24935(arg0, arg1, arg2, arg3) {
2443
- wasm.__wasm_bindgen_func_elem_24935(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));
2444
2470
  }
2445
2471
 
2446
2472
  const BrowserVoiceFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -33,11 +33,11 @@ export const chatgptsubscription_open: (a: number, b: number) => number;
33
33
  export const chatgptsubscription_recover: (a: number, b: number, c: number) => number;
34
34
  export const chatgptsubscription_startLogin: (a: number) => number;
35
35
  export const chatgptsubscription_status: (a: number) => number;
36
- export const managedBootstrapPlan: (a: number, b: number, c: number) => void;
37
36
  export const managedbrowservoice_agentEvent: (a: number, b: number, c: number, d: number) => void;
38
37
  export const managedbrowservoice_appendContext: (a: number, b: number, c: number, d: number) => void;
39
38
  export const managedbrowservoice_appendSpeech: (a: number, b: number, c: number, d: number) => void;
40
39
  export const managedbrowservoice_appendText: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
40
+ export const managedbrowservoice_bindSession: (a: number, b: number, c: number, d: number) => void;
41
41
  export const managedbrowservoice_callBody: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
42
42
  export const managedbrowservoice_completeCall: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
43
43
  export const managedbrowservoice_configure: (a: number, b: number, c: number, d: number) => void;
@@ -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;
@@ -71,7 +72,6 @@ export const nanocodex_prompt: (a: number, b: number, c: number, d: number, e: n
71
72
  export const nanocodex_promptContent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
72
73
  export const nanocodex_realtimeDelegation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
73
74
  export const nanocodex_realtimeTailDelegation: (a: number, b: number, c: number, d: number) => void;
74
- export const nanocodex_restoreSubagents: (a: number, b: number, c: number, d: number, e: number) => number;
75
75
  export const nanocodex_routePrompt: (a: number, b: number, c: number) => number;
76
76
  export const nanocodex_sendSubagentMessage: (a: number, b: number, c: number) => number;
77
77
  export const nanocodex_sessionId: (a: number, b: number) => void;
@@ -85,6 +85,7 @@ export const nanocodex_spawnSubagent: (a: number, b: number, c: number) => numbe
85
85
  export const nanocodex_spawnSubagents: (a: number, b: number, c: number) => number;
86
86
  export const nanocodex_startRealtimeConversation: (a: number) => number;
87
87
  export const nanocodex_waitSubagents: (a: number, b: number, c: number) => number;
88
+ export const nativeSpawnContractVersion: () => number;
88
89
  export const pruneDurableReceipts: (a: number, b: number, c: number, d: number, e: number) => number;
89
90
  export const turn_accepted: (a: number) => number;
90
91
  export const turn_cancel: (a: number) => number;
@@ -95,9 +96,9 @@ export const turn_withdrawSteer: (a: number, b: number, c: number) => number;
95
96
  export const turnresult_finalMessage: (a: number, b: number) => void;
96
97
  export const turnresult_snapshot: (a: number, b: number) => void;
97
98
  export const turnresult_usage: (a: number, b: number) => void;
98
- export const __wasm_bindgen_func_elem_24933: (a: number, b: number, c: number, d: number) => void;
99
- export const __wasm_bindgen_func_elem_24935: (a: number, b: number, c: number, d: number) => void;
100
- export const __wasm_bindgen_func_elem_4744: (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;
101
102
  export const __wbindgen_export: (a: number, b: number) => number;
102
103
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
103
104
  export const __wbindgen_export3: (a: number) => void;
@@ -1,6 +1,12 @@
1
1
  wasm-bindgen 0.2.126
2
2
  build-mode=release
3
3
  worker-bundler-v1-simd
4
+ 3938113410 5756
5
+ 3892929478 13915
4
6
  1601142751 2004
7
+ 271501285 630
8
+ 2360453989 252
9
+ 98157300 1906
10
+ 2504064109 4134
5
11
  wasm-opt version 132 (version_132)
6
- 1860610414 6997672
12
+ 2596841149 7191191
@@ -1 +1 @@
1
- {"schema":1,"revision":"6f5dadf6d32e9592733957dd54056a3b2563b745","dirty":false,"sourceWasmSha256":"04d42aeb3c4e236ece174adc2636166c1920ff08f546d9e02e765ea31844ce24","artifacts":{"nanocodex.js":"90651421cbac4382e6777f7d705937896f6914c97a07d9dc97139888aaf7ce1d","nanocodex.d.ts":"d2d1787f608641010a9c6e960ee10445ee393535b05b5f6f8028bbfb8452f35c","nanocodex_bg.js":"62585f8faa01f3c36a9b2f3e6e8d9cb68edd5b27a212035012dc3bf0db0fbf08","nanocodex_bg.wasm":"a62c90ae4a34d7d95b2e7098689a83974b2fe4c4eb736b23c36ce710639b682c","nanocodex_worker.js":"cc34f0bba38a928752eb147dc75fc1c6b9ced408027b07f7cf237451152a8de9","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
  *
@@ -220,6 +220,13 @@ export class ManagedBrowserVoice {
220
220
  * Rejects inactive sessions, invalid roles/text, or a full output queue.
221
221
  */
222
222
  appendText(role: string, text: string): string;
223
+ /**
224
+ * Binds the known managed call before admission or microphone setup begins.
225
+ *
226
+ * # Errors
227
+ * Rejects invalid session IDs or rebinding an active call.
228
+ */
229
+ bindSession(managed_session_id: string): void;
223
230
  /**
224
231
  * Encodes the managed same-origin call request after the browser creates its SDP offer.
225
232
  *
@@ -331,9 +338,9 @@ export class ManagedBrowserVoice {
331
338
  *
332
339
  * Rejects malformed `AgentSessionContext` JSON.
333
340
  */
334
- start(context_json: string): void;
341
+ start(context_json: string): string;
335
342
  /**
336
- * 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.
337
344
  *
338
345
  * # Errors
339
346
  *
@@ -367,6 +374,14 @@ export class Nanocodex {
367
374
  * Rejects voices outside Codex's ChatGPT V3 catalog.
368
375
  */
369
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>;
370
385
  /**
371
386
  * Closes one canonical task-tree child and its descendants.
372
387
  */
@@ -463,16 +478,6 @@ export class Nanocodex {
463
478
  * Rejects malformed transcript JSON.
464
479
  */
465
480
  realtimeTailDelegation(transcript: string): string | undefined;
466
- /**
467
- * Restores persisted logical children after the JavaScript owner acquires
468
- * its durability generation and activates the replacement host.
469
- *
470
- * # Errors
471
- *
472
- * Rejects malformed descriptors, disabled subagents, duplicate restoration,
473
- * or an invalid persisted topology.
474
- */
475
- restoreSubagents(descriptors_json: string, host_contexts_json?: string | null): Promise<void>;
476
481
  /**
477
482
  * Atomically steers the active turn or starts a new independently awaitable turn.
478
483
  *
@@ -665,14 +670,13 @@ export class TurnResult {
665
670
  */
666
671
  export function applyBrowserPatch(patch: string, session_id: string): Promise<string>;
667
672
 
668
- /**
669
- * Returns the shared bounded first-prompt retrieval plan for a managed host.
670
- */
671
- export function managedBootstrapPlan(input: string): string;
672
-
673
673
  /**
674
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.
675
677
  */
678
+ export function nativeSpawnContractVersion(): number;
679
+
676
680
  export function pruneDurableReceipts(durability_host_id: string, durability_id: string, terminal_receipt_limit: number): Promise<void>;
677
681
 
678
682
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -711,11 +715,11 @@ export interface InitOutput {
711
715
  readonly chatgptsubscription_recover: (a: number, b: number, c: number) => number;
712
716
  readonly chatgptsubscription_startLogin: (a: number) => number;
713
717
  readonly chatgptsubscription_status: (a: number) => number;
714
- readonly managedBootstrapPlan: (a: number, b: number, c: number) => void;
715
718
  readonly managedbrowservoice_agentEvent: (a: number, b: number, c: number, d: number) => void;
716
719
  readonly managedbrowservoice_appendContext: (a: number, b: number, c: number, d: number) => void;
717
720
  readonly managedbrowservoice_appendSpeech: (a: number, b: number, c: number, d: number) => void;
718
721
  readonly managedbrowservoice_appendText: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
722
+ readonly managedbrowservoice_bindSession: (a: number, b: number, c: number, d: number) => void;
719
723
  readonly managedbrowservoice_callBody: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
720
724
  readonly managedbrowservoice_completeCall: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
721
725
  readonly managedbrowservoice_configure: (a: number, b: number, c: number, d: number) => void;
@@ -735,6 +739,7 @@ export interface InitOutput {
735
739
  readonly nanocodex_agentId: (a: number, b: number) => void;
736
740
  readonly nanocodex_appendDeveloperMessage: (a: number, b: number, c: number) => number;
737
741
  readonly nanocodex_browserVoice: (a: number, b: number, c: number, d: number) => void;
742
+ readonly nanocodex_checkpoint: (a: number) => number;
738
743
  readonly nanocodex_closeSubagent: (a: number, b: number, c: number) => number;
739
744
  readonly nanocodex_compact: (a: number) => number;
740
745
  readonly nanocodex_context: (a: number) => number;
@@ -749,7 +754,6 @@ export interface InitOutput {
749
754
  readonly nanocodex_promptContent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
750
755
  readonly nanocodex_realtimeDelegation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
751
756
  readonly nanocodex_realtimeTailDelegation: (a: number, b: number, c: number, d: number) => void;
752
- readonly nanocodex_restoreSubagents: (a: number, b: number, c: number, d: number, e: number) => number;
753
757
  readonly nanocodex_routePrompt: (a: number, b: number, c: number) => number;
754
758
  readonly nanocodex_sendSubagentMessage: (a: number, b: number, c: number) => number;
755
759
  readonly nanocodex_sessionId: (a: number, b: number) => void;
@@ -763,6 +767,7 @@ export interface InitOutput {
763
767
  readonly nanocodex_spawnSubagents: (a: number, b: number, c: number) => number;
764
768
  readonly nanocodex_startRealtimeConversation: (a: number) => number;
765
769
  readonly nanocodex_waitSubagents: (a: number, b: number, c: number) => number;
770
+ readonly nativeSpawnContractVersion: () => number;
766
771
  readonly pruneDurableReceipts: (a: number, b: number, c: number, d: number, e: number) => number;
767
772
  readonly turn_accepted: (a: number) => number;
768
773
  readonly turn_cancel: (a: number) => number;
@@ -773,9 +778,9 @@ export interface InitOutput {
773
778
  readonly turnresult_finalMessage: (a: number, b: number) => void;
774
779
  readonly turnresult_snapshot: (a: number, b: number) => void;
775
780
  readonly turnresult_usage: (a: number, b: number) => void;
776
- readonly __wasm_bindgen_func_elem_24933: (a: number, b: number, c: number, d: number) => void;
777
- readonly __wasm_bindgen_func_elem_24935: (a: number, b: number, c: number, d: number) => void;
778
- readonly __wasm_bindgen_func_elem_4744: (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;
779
784
  readonly __wbindgen_export: (a: number, b: number) => number;
780
785
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
781
786
  readonly __wbindgen_export3: (a: number) => void;