@openclaw/discord 2026.10.5 → 2026.10.10-beta.2

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 (64) hide show
  1. package/dist/.setup/{approval-handler.runtime-D88-QVlO.mjs → approval-handler.runtime-BvF8oUpa.mjs} +9 -9
  2. package/dist/.setup/{approval-message-updates-CIGByUcE.mjs → approval-message-updates-wbUqLtLI.mjs} +2 -2
  3. package/dist/.setup/{audit-TGIPL0f_.mjs → audit-UwzCdDJk.mjs} +3 -3
  4. package/dist/.setup/{channel-C24afwHP.mjs → channel-BlvyeRAu.mjs} +72 -49
  5. package/dist/.setup/{channel.setup-B3KEh05g.mjs → channel.setup-By7wNopw.mjs} +1 -1
  6. package/dist/.setup/{command-owners-C7rUdqUX.mjs → command-owners-D78sAoOz.mjs} +1 -1
  7. package/dist/.setup/{components-HN9052L1.mjs → components-C_cuoW1q.mjs} +1 -1
  8. package/dist/.setup/conversation-binding-route-fdYsXexV.mjs +68 -0
  9. package/dist/.setup/{discord-BGqgx-yd.mjs → discord-Cl2OPTZ6.mjs} +18 -14
  10. package/dist/.setup/{doctor-9Ka20lDD.mjs → doctor-94GSI6lY.mjs} +2 -2
  11. package/dist/.setup/{handle-action-CsQmpfGZ.mjs → handle-action-0-FZD3Am.mjs} +7 -7
  12. package/dist/.setup/{handle-action.guild-admin-Aw-vutu3.mjs → handle-action.guild-admin-DfAWANBE.mjs} +2 -2
  13. package/dist/.setup/{message-handler-C_BQFYCW.mjs → message-handler-CtR2w7W_.mjs} +4 -4
  14. package/dist/.setup/{message-handler.preflight-C_xFOxPN.mjs → message-handler.preflight-BqUw7LWb.mjs} +11 -10
  15. package/dist/.setup/{message-handler.preflight-pluralkit-CfRsEwg4.mjs → message-handler.preflight-pluralkit-BU9I_X-b.mjs} +4 -6
  16. package/dist/.setup/{message-handler.process-_np9if7z.mjs → message-handler.process-BZeWmSNC.mjs} +40 -50
  17. package/dist/.setup/{outbound-adapter-L3UDoMOG.mjs → outbound-adapter-DBwgKemw.mjs} +5 -5
  18. package/dist/.setup/{outbound-session-route-iwnu6IK8.mjs → outbound-session-route-CsHHPxsQ.mjs} +24 -7
  19. package/dist/.setup/{provider-CbmXLYrW.mjs → provider-DUTsZJHz.mjs} +230 -205
  20. package/dist/.setup/{provider-session.runtime-BMOuDbod.mjs → provider-session.runtime-Ucr3XodI.mjs} +3 -3
  21. package/dist/.setup/provider.runtime-J8NuMCNs.mjs +1 -0
  22. package/dist/.setup/{realtime-session.runtime-YCumnRSE.mjs → realtime-session.runtime-bNnPOKP_.mjs} +161 -150
  23. package/dist/.setup/{receive-recovery-eVmK2_hl.mjs → receive-recovery-CKvaG2Hf.mjs} +4 -25
  24. package/dist/.setup/{runtime-DPm3gZXk.mjs → runtime-Cg5pIBm_.mjs} +1 -1
  25. package/dist/.setup/{runtime-CRTkKU1G.mjs → runtime-DE6W14G3.mjs} +7 -7
  26. package/dist/.setup/{send-DbILKgcm.mjs → send-yR1hfybW.mjs} +26 -12
  27. package/dist/.setup/{send.components-FxOS3CeP.mjs → send.components--dxMjc2O.mjs} +5 -5
  28. package/dist/.setup/{send.outbound-_jx4Xpd3.mjs → send.outbound-B5vQwgUK.mjs} +10 -4
  29. package/dist/.setup/{send.receipt-BAlzXd8e.mjs → send.receipt-eE3zLTDH.mjs} +3 -9
  30. package/dist/.setup/{send.shared-CjQ4jbMA.mjs → send.shared-iGf1rqAm.mjs} +4 -3
  31. package/dist/.setup/setup-plugin-api-DVpA_yqS.mjs +2 -0
  32. package/dist/.setup/{shared-C027f-lL.mjs → shared-DgzLizSt.mjs} +1 -1
  33. package/dist/.setup/{subagent-hooks-CME7dSGf.mjs → subagent-hooks-tBtaqWkD.mjs} +21 -12
  34. package/dist/.setup/{system-events-BwwSDCw4.mjs → system-events-DGsxf-l9.mjs} +1 -1
  35. package/dist/.setup/{target-resolver-Bse8fuTi.mjs → target-resolver-BFOKmBni.mjs} +1 -1
  36. package/dist/.setup/{targets-DZJjkzwv.mjs → targets-UbCpek5o.mjs} +1 -1
  37. package/dist/.setup/{thread-bindings-0hPTSK14.mjs → thread-bindings-Dsc3zsrI.mjs} +29 -7
  38. package/dist/.setup/{thread-bindings.manager-CdNa6UIs.mjs → thread-bindings.manager-BMpmKLQh.mjs} +63 -19
  39. package/dist/.setup/{thread-bindings.session-updates-DGSljVf6.mjs → thread-bindings.session-updates-BMdJeJMc.mjs} +39 -122
  40. package/dist/.setup/{threading-BWz5lW0p.mjs → threading-Cg_QRc8s.mjs} +2 -2
  41. package/dist/.setup/{transcripts-source-EMrQb132.mjs → transcripts-source-fRvFsZng.mjs} +12 -17
  42. package/dist/.setup/{voice-runtime-BFEBhf2B.mjs → voice-runtime-DHDNu0fz.mjs} +73 -120
  43. package/dist/action-runtime-api.js +1 -1
  44. package/dist/activities-api.js +3 -3
  45. package/dist/api.js +11 -11
  46. package/dist/channel-plugin-api.js +1 -1
  47. package/dist/runtime-api.js +15 -15
  48. package/dist/setup-entry.js +1 -1
  49. package/dist/setup-plugin-api.js +1 -1
  50. package/dist/src/voice/audio-worker.runtime.js +8 -11
  51. package/dist/subagent-hooks-api.js +1 -1
  52. package/dist/transcripts-source-api.js +1 -1
  53. package/node_modules/mdast-util-from-markdown/dev/lib/index.js +152 -45
  54. package/node_modules/mdast-util-from-markdown/dev/lib/types.d.ts +26 -0
  55. package/node_modules/mdast-util-from-markdown/lib/index.js +133 -40
  56. package/node_modules/mdast-util-from-markdown/lib/types.d.ts +26 -0
  57. package/node_modules/mdast-util-from-markdown/package.json +6 -7
  58. package/node_modules/mdast-util-from-markdown/readme.md +15 -1
  59. package/node_modules/typebox/build/value/clean/from_object.mjs +1 -1
  60. package/node_modules/typebox/package.json +1 -1
  61. package/package.json +6 -6
  62. package/dist/.setup/conversation-binding-route-r4XyytCE.mjs +0 -51
  63. package/dist/.setup/provider.runtime-1yN_05AK.mjs +0 -1
  64. package/dist/.setup/setup-plugin-api-BFl2FljJ.mjs +0 -2
@@ -87,6 +87,8 @@ export function fromMarkdown(value, encoding, options) {
87
87
  function compiler(options) {
88
88
  /** @type {Config} */
89
89
  const config = {
90
+ afterExit: [],
91
+ beforeEnter: [],
90
92
  transforms: [],
91
93
  canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],
92
94
  enter: {
@@ -202,7 +204,8 @@ function compiler(options) {
202
204
  /** @type {Root} */
203
205
  let tree = {
204
206
  type: 'root',
205
- children: []
207
+ children: [],
208
+ position: undefined
206
209
  };
207
210
  /** @type {Omit<CompileContext, 'sliceSerialize'>} */
208
211
  const context = {
@@ -217,26 +220,45 @@ function compiler(options) {
217
220
  };
218
221
  /** @type {Array<number>} */
219
222
  const listStack = [];
223
+ /** @type {Array<Event>} */
224
+ const prepared = [];
220
225
  let index = -1;
226
+
227
+ // Add `listItem` tokens and infer spread.
228
+ // Each list is prepared while it is last in `prepared`, so nothing shifts.
221
229
  while (++index < events.length) {
222
- // We preprocess lists to add `listItem` tokens, and to infer whether
223
- // items the list itself are spread out.
230
+ prepared.push(events[index]);
224
231
  if (events[index][1].type === "listOrdered" || events[index][1].type === "listUnordered") {
225
232
  if (events[index][0] === 'enter') {
226
- listStack.push(index);
233
+ listStack.push(prepared.length - 1);
227
234
  } else {
228
235
  const tail = listStack.pop();
229
- index = prepareList(events, tail, index);
236
+ prepareList(prepared, tail);
230
237
  }
231
238
  }
232
239
  }
240
+ events = prepared;
233
241
  index = -1;
234
242
  while (++index < events.length) {
235
243
  const handler = config[events[index][0]];
244
+ if (events[index][0] === 'enter' && config.beforeEnter.length > 0) {
245
+ callListeners(config.beforeEnter, {
246
+ ...context,
247
+ sliceSerialize: events[index][2].sliceSerialize
248
+ }, events[index][1]);
249
+ }
236
250
  if (own.call(handler, events[index][1].type)) {
237
- handler[events[index][1].type].call(Object.assign({
251
+ // Note: spread first, V8 has optimizations for object shape cloning.
252
+ handler[events[index][1].type].call({
253
+ ...context,
254
+ sliceSerialize: events[index][2].sliceSerialize
255
+ }, events[index][1]);
256
+ }
257
+ if (events[index][0] === 'exit' && config.afterExit.length > 0) {
258
+ callListeners(config.afterExit, {
259
+ ...context,
238
260
  sliceSerialize: events[index][2].sliceSerialize
239
- }, context), events[index][1]);
261
+ }, events[index][1]);
240
262
  }
241
263
  }
242
264
 
@@ -269,13 +291,32 @@ function compiler(options) {
269
291
  return tree;
270
292
  }
271
293
 
294
+ /**
295
+ * @param {Array<Handle>} listeners
296
+ * Listeners.
297
+ * @param {CompileContext} context
298
+ * Context.
299
+ * @param {Token} token
300
+ * Token.
301
+ * @returns {undefined}
302
+ * Nothing.
303
+ */
304
+ function callListeners(listeners, context, token) {
305
+ let index = -1;
306
+ while (++index < listeners.length) {
307
+ listeners[index].call(context, token);
308
+ }
309
+ }
310
+
272
311
  /**
273
312
  * @param {Array<Event>} events
313
+ * Events, ending with the list to prepare.
274
314
  * @param {number} start
275
- * @param {number} length
276
- * @returns {number}
315
+ * Index of the list enter.
316
+ * @returns {undefined}
277
317
  */
278
- function prepareList(events, start, length) {
318
+ function prepareList(events, start) {
319
+ const end = events.length - 1;
279
320
  let index = start - 1;
280
321
  let containerBalance = -1;
281
322
  let listSpread = false;
@@ -287,7 +328,14 @@ function compiler(options) {
287
328
  let firstBlankLineIndex;
288
329
  /** @type {boolean | undefined} */
289
330
  let atMarker;
290
- while (++index <= length) {
331
+ /**
332
+ * `listItem` events to insert before the event at `at`, in walk order.
333
+ * Merged in after the walk, as inserting while walking would shift the
334
+ * rest of the list once per item.
335
+ * @type {Array<{at: number, event: Event}>}
336
+ */
337
+ const insertions = [];
338
+ while (++index <= end) {
291
339
  const event = events[index];
292
340
  switch (event[1].type) {
293
341
  case "listUnordered":
@@ -353,9 +401,10 @@ function compiler(options) {
353
401
 
354
402
  // Fix position.
355
403
  listItem.end = Object.assign({}, lineIndex ? events[lineIndex][1].start : event[1].end);
356
- events.splice(lineIndex || index, 0, ['exit', listItem, event[2]]);
357
- index++;
358
- length++;
404
+ insertions.push({
405
+ at: lineIndex || index,
406
+ event: ['exit', listItem, event[2]]
407
+ });
359
408
  }
360
409
 
361
410
  // Create a new list item.
@@ -369,16 +418,29 @@ function compiler(options) {
369
418
  end: undefined
370
419
  };
371
420
  listItem = item;
372
- events.splice(index, 0, ['enter', item, event[2]]);
373
- index++;
374
- length++;
421
+ insertions.push({
422
+ at: index,
423
+ event: ['enter', item, event[2]]
424
+ });
375
425
  firstBlankLineIndex = undefined;
376
426
  atMarker = true;
377
427
  }
378
428
  }
379
429
  }
430
+
431
+ // The list is at the end of `events`: take it off, then push it back with
432
+ // the insertions merged in.
433
+ // Nothing follows the list, so nothing shifts.
434
+ const listEvents = events.splice(start);
435
+ let insertion = 0;
436
+ index = -1;
437
+ while (++index < listEvents.length) {
438
+ while (insertion < insertions.length && insertions[insertion].at === start + index) {
439
+ events.push(insertions[insertion++].event);
440
+ }
441
+ events.push(listEvents[index]);
442
+ }
380
443
  events[start][1]._spread = listSpread;
381
- return length;
382
444
  }
383
445
 
384
446
  /**
@@ -465,7 +527,8 @@ function compiler(options) {
465
527
  start: token.start,
466
528
  end: token.end
467
529
  }) + '): it’s not open');
468
- } else if (open[0].type !== token.type) {
530
+ }
531
+ if (open[0].type !== token.type) {
469
532
  if (onExitError) {
470
533
  onExitError.call(this, token, open[0]);
471
534
  } else {
@@ -934,11 +997,18 @@ function compiler(options) {
934
997
  // Creaters.
935
998
  //
936
999
 
1000
+ // Each node factory pre-declares `position` as undefined as the trailing
1001
+ // property. enter() patches it to a real value, but the property already
1002
+ // exists, so V8 sees a single hidden class for each node type from
1003
+ // construction through the rest of the pipeline. Without the pre-declare,
1004
+ // each node took a hidden-class transition when enter() added position.
1005
+
937
1006
  /** @returns {Blockquote} */
938
1007
  function blockQuote() {
939
1008
  return {
940
1009
  type: 'blockquote',
941
- children: []
1010
+ children: [],
1011
+ position: undefined
942
1012
  };
943
1013
  }
944
1014
 
@@ -948,7 +1018,8 @@ function compiler(options) {
948
1018
  type: 'code',
949
1019
  lang: null,
950
1020
  meta: null,
951
- value: ''
1021
+ value: '',
1022
+ position: undefined
952
1023
  };
953
1024
  }
954
1025
 
@@ -956,7 +1027,8 @@ function compiler(options) {
956
1027
  function codeText() {
957
1028
  return {
958
1029
  type: 'inlineCode',
959
- value: ''
1030
+ value: '',
1031
+ position: undefined
960
1032
  };
961
1033
  }
962
1034
 
@@ -967,7 +1039,8 @@ function compiler(options) {
967
1039
  identifier: '',
968
1040
  label: null,
969
1041
  title: null,
970
- url: ''
1042
+ url: '',
1043
+ position: undefined
971
1044
  };
972
1045
  }
973
1046
 
@@ -975,7 +1048,8 @@ function compiler(options) {
975
1048
  function emphasis() {
976
1049
  return {
977
1050
  type: 'emphasis',
978
- children: []
1051
+ children: [],
1052
+ position: undefined
979
1053
  };
980
1054
  }
981
1055
 
@@ -985,14 +1059,16 @@ function compiler(options) {
985
1059
  type: 'heading',
986
1060
  // @ts-expect-error `depth` will be set later.
987
1061
  depth: 0,
988
- children: []
1062
+ children: [],
1063
+ position: undefined
989
1064
  };
990
1065
  }
991
1066
 
992
1067
  /** @returns {Break} */
993
1068
  function hardBreak() {
994
1069
  return {
995
- type: 'break'
1070
+ type: 'break',
1071
+ position: undefined
996
1072
  };
997
1073
  }
998
1074
 
@@ -1000,7 +1076,8 @@ function compiler(options) {
1000
1076
  function html() {
1001
1077
  return {
1002
1078
  type: 'html',
1003
- value: ''
1079
+ value: '',
1080
+ position: undefined
1004
1081
  };
1005
1082
  }
1006
1083
 
@@ -1010,7 +1087,8 @@ function compiler(options) {
1010
1087
  type: 'image',
1011
1088
  title: null,
1012
1089
  url: '',
1013
- alt: null
1090
+ alt: null,
1091
+ position: undefined
1014
1092
  };
1015
1093
  }
1016
1094
 
@@ -1020,7 +1098,8 @@ function compiler(options) {
1020
1098
  type: 'link',
1021
1099
  title: null,
1022
1100
  url: '',
1023
- children: []
1101
+ children: [],
1102
+ position: undefined
1024
1103
  };
1025
1104
  }
1026
1105
 
@@ -1034,7 +1113,8 @@ function compiler(options) {
1034
1113
  ordered: token.type === 'listOrdered',
1035
1114
  start: null,
1036
1115
  spread: token._spread,
1037
- children: []
1116
+ children: [],
1117
+ position: undefined
1038
1118
  };
1039
1119
  }
1040
1120
 
@@ -1047,7 +1127,8 @@ function compiler(options) {
1047
1127
  type: 'listItem',
1048
1128
  spread: token._spread,
1049
1129
  checked: null,
1050
- children: []
1130
+ children: [],
1131
+ position: undefined
1051
1132
  };
1052
1133
  }
1053
1134
 
@@ -1055,7 +1136,8 @@ function compiler(options) {
1055
1136
  function paragraph() {
1056
1137
  return {
1057
1138
  type: 'paragraph',
1058
- children: []
1139
+ children: [],
1140
+ position: undefined
1059
1141
  };
1060
1142
  }
1061
1143
 
@@ -1063,7 +1145,8 @@ function compiler(options) {
1063
1145
  function strong() {
1064
1146
  return {
1065
1147
  type: 'strong',
1066
- children: []
1148
+ children: [],
1149
+ position: undefined
1067
1150
  };
1068
1151
  }
1069
1152
 
@@ -1071,14 +1154,16 @@ function compiler(options) {
1071
1154
  function text() {
1072
1155
  return {
1073
1156
  type: 'text',
1074
- value: ''
1157
+ value: '',
1158
+ position: undefined
1075
1159
  };
1076
1160
  }
1077
1161
 
1078
1162
  /** @returns {ThematicBreak} */
1079
1163
  function thematicBreak() {
1080
1164
  return {
1081
- type: 'thematicBreak'
1165
+ type: 'thematicBreak',
1166
+ position: undefined
1082
1167
  };
1083
1168
  }
1084
1169
  }
@@ -1143,6 +1228,15 @@ function extension(combined, extension) {
1143
1228
  }
1144
1229
  break;
1145
1230
  }
1231
+ case 'afterExit':
1232
+ case 'beforeEnter':
1233
+ {
1234
+ const right = extension[key];
1235
+ if (right) {
1236
+ combined[key].push(right);
1237
+ }
1238
+ break;
1239
+ }
1146
1240
  case 'enter':
1147
1241
  case 'exit':
1148
1242
  {
@@ -1168,10 +1262,9 @@ function defaultOnError(left, right) {
1168
1262
  start: right.start,
1169
1263
  end: right.end
1170
1264
  }) + ') is open');
1171
- } else {
1172
- throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({
1173
- start: right.start,
1174
- end: right.end
1175
- }) + ') is still open');
1176
1265
  }
1266
+ throw new Error('Cannot close document, a token (`' + right.type + '`, ' + stringifyPosition({
1267
+ start: right.start,
1268
+ end: right.end
1269
+ }) + ') is still open');
1177
1270
  }
@@ -159,6 +159,14 @@ export interface CompileData {
159
159
  * We have our defaults, but extensions will add more.
160
160
  */
161
161
  export interface Config {
162
+ /**
163
+ * Listeners called for every token, after closing handles.
164
+ */
165
+ afterExit: Array<Handle>
166
+ /**
167
+ * Listeners called for every token, before opening handles.
168
+ */
169
+ beforeEnter: Array<Handle>
162
170
  /**
163
171
  * Token types where line endings are used.
164
172
  */
@@ -179,8 +187,26 @@ export interface Config {
179
187
 
180
188
  /**
181
189
  * Change how markdown tokens from micromark are turned into mdast.
190
+ *
191
+ * ###### Notes
192
+ *
193
+ * Handles (`enter`, `exit`) create the tree;
194
+ * a later handle for a token type from an extension overwrites earlier ones.
195
+ * Listeners (`afterExit`, `beforeEnter`) observe all tokens including unhandled
196
+ * ones.
197
+ * The point of listeners is that they *do not* interfere with handling,
198
+ * potentially changed by extensions.
199
+ * Don’t modify unexpected things!
182
200
  */
183
201
  export interface Extension {
202
+ /**
203
+ * Listener called for every token, after closing handles.
204
+ */
205
+ afterExit?: Handle | null | undefined
206
+ /**
207
+ * Listener called for every token, before opening handles.
208
+ */
209
+ beforeEnter?: Handle | null | undefined
184
210
  /**
185
211
  * Token types where line endings are used.
186
212
  */
@@ -20,10 +20,9 @@
20
20
  },
21
21
  "description": "mdast utility to parse markdown",
22
22
  "devDependencies": {
23
- "@types/node": "^25.0.0",
24
- "c8": "^10.0.0",
23
+ "@types/node": "^26.0.0",
25
24
  "commonmark.json": "^0.31.0",
26
- "esbuild": "^0.27.0",
25
+ "esbuild": "^0.28.0",
27
26
  "gzip-size-cli": "^5.0.0",
28
27
  "hast-util-from-html": "^2.0.0",
29
28
  "hast-util-to-html": "^9.0.0",
@@ -34,8 +33,8 @@
34
33
  "remark-preset-wooorm": "^11.0.0",
35
34
  "terser": "^5.0.0",
36
35
  "type-coverage": "^2.0.0",
37
- "typescript": "^5.0.0",
38
- "xo": "^1.0.0"
36
+ "typescript": "^6.0.0",
37
+ "xo": "^5.0.0"
39
38
  },
40
39
  "exports": {
41
40
  "development": "./dev/index.js",
@@ -86,7 +85,7 @@
86
85
  "test-api-dev": "node --conditions development test/index.js",
87
86
  "test-api-prod": "node --conditions production test/index.js",
88
87
  "test-api": "npm run test-api-dev && npm run test-api-prod",
89
- "test-coverage": "c8 --100 --reporter lcov -- npm run test-api",
88
+ "test-coverage": "node --experimental-test-coverage --test-coverage-exclude='test/**' --test-coverage-lines=100 --test-coverage-branches=100 --test-coverage-functions=100 --conditions development test/index.js && node --experimental-test-coverage --test-coverage-exclude='test/**' --test-coverage-lines=100 --test-coverage-branches=100 --test-coverage-functions=100 --conditions production test/index.js",
90
89
  "test": "npm run build && npm run format && npm run test-coverage"
91
90
  },
92
91
  "sideEffects": false,
@@ -95,5 +94,5 @@
95
94
  "strict": true
96
95
  },
97
96
  "type": "module",
98
- "version": "2.0.3"
97
+ "version": "2.1.0"
99
98
  }
@@ -181,7 +181,7 @@ mdast compiler context (TypeScript type).
181
181
  — exit a node
182
182
  * `sliceSerialize` (`(token: Token, expandTabs?: boolean) => string`)
183
183
  — get the string value of a token
184
- * `config` (`Required<Extension>`)
184
+ * `config` (`Config`)
185
185
  — configuration
186
186
 
187
187
  ### `CompileData`
@@ -226,6 +226,10 @@ type).
226
226
 
227
227
  ###### Properties
228
228
 
229
+ * `afterExit` ([`Handle`][api-handle], optional)
230
+ — listener called for every token, after closing handles
231
+ * `beforeEnter` ([`Handle`][api-handle], optional)
232
+ — listener called for every token, before opening handles
229
233
  * `canContainEols` (`Array<string>`, optional)
230
234
  — token types where line endings are used
231
235
  * `enter` ([`Record<string, Handle>`][api-handle], optional)
@@ -235,6 +239,16 @@ type).
235
239
  * `transforms` ([`Array<Transform>`][api-transform], optional)
236
240
  — tree transforms
237
241
 
242
+ ###### Notes
243
+
244
+ Handles (`enter`, `exit`) create the tree;
245
+ a later handle for a token type from an extension overwrites earlier ones.
246
+ Listeners (`afterExit`, `beforeEnter`) observe all tokens including unhandled
247
+ ones.
248
+ The point of listeners is that they *do not* interfere with handling,
249
+ potentially changed by extensions.
250
+ Don’t modify unexpected things!
251
+
238
252
  ### `Handle`
239
253
 
240
254
  Handle a token (TypeScript type).
@@ -12,7 +12,7 @@ export function FromObject(context, type, value) {
12
12
  return value;
13
13
  const additionalProperties = GetAdditionalProperties(type);
14
14
  for (const key of Guard.Keys(value)) {
15
- if (Guard.HasPropertyKey(type.properties, key)) {
15
+ if (Guard.HasPropertyKey(type.properties, key) && IsSchema(type.properties[key])) {
16
16
  value[key] = FromType(context, type.properties[key], value[key]);
17
17
  continue;
18
18
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.3.34",
4
+ "version": "1.3.35",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/discord",
3
- "version": "2026.10.5",
3
+ "version": "2026.10.10-beta.2",
4
4
  "description": "OpenClaw Discord channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,14 +12,14 @@
12
12
  "@discordjs/voice": "0.19.2",
13
13
  "discord-api-types": "0.38.56",
14
14
  "libopus-wasm": "0.4.1",
15
- "mdast-util-from-markdown": "2.0.3",
16
- "typebox": "1.3.34",
15
+ "mdast-util-from-markdown": "2.1.0",
16
+ "typebox": "1.3.35",
17
17
  "undici": "8.11.2",
18
18
  "ws": "8.22.0",
19
19
  "zod": "4.6.5"
20
20
  },
21
21
  "peerDependencies": {
22
- "openclaw": ">=2026.10.5"
22
+ "openclaw": ">=2026.10.10-beta.2"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "openclaw": {
@@ -95,14 +95,14 @@
95
95
  "allowInvalidConfigRecovery": true
96
96
  },
97
97
  "compat": {
98
- "pluginApi": ">=2026.10.5"
98
+ "pluginApi": ">=2026.10.10-beta.2"
99
99
  },
100
100
  "build": {
101
101
  "bundledDist": false,
102
102
  "workerEntries": [
103
103
  "./src/voice/audio-worker.runtime.ts"
104
104
  ],
105
- "openclawVersion": "2026.10.5",
105
+ "openclawVersion": "2026.10.10-beta.2",
106
106
  "staticAssets": [
107
107
  {
108
108
  "source": "./assets/embedded-app-sdk.mjs",
@@ -1,51 +0,0 @@
1
- import { m as shouldIgnoreStaleDiscordRouteBinding } from "./outbound-session-route-iwnu6IK8.mjs";
2
- import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
3
- import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute } from "openclaw/plugin-sdk/conversation-binding-runtime";
4
- //#region extensions/discord/src/monitor/conversation-binding-route.ts
5
- function resolveDiscordConversationBindingRoute(params) {
6
- let baseRoute;
7
- let runtimeRoute = resolveRuntimeConversationBindingRoute({
8
- resolveRoute: (selection) => {
9
- baseRoute = params.resolveRoute(selection);
10
- return baseRoute;
11
- },
12
- touchBinding: params.touchBinding,
13
- conversation: {
14
- channel: "discord",
15
- accountId: params.accountId,
16
- conversationId: params.runtimeConversationId,
17
- parentConversationId: params.parentConversationId
18
- }
19
- });
20
- const route = baseRoute ?? runtimeRoute.route;
21
- if (shouldIgnoreStaleDiscordRouteBinding({
22
- bindingRecord: runtimeRoute.bindingRecord,
23
- route
24
- })) {
25
- logVerbose(`discord: ignoring stale route binding for conversation ${params.runtimeConversationId} (${runtimeRoute.bindingRecord?.targetSessionKey} -> ${route.sessionKey})`);
26
- runtimeRoute = {
27
- bindingOwnerAvailable: true,
28
- bindingRecord: null,
29
- route: {
30
- ...runtimeRoute.route,
31
- ...route
32
- }
33
- };
34
- }
35
- const configuredRoute = runtimeRoute.bindingRecord ? null : resolveConfiguredBindingRoute({
36
- cfg: params.cfg,
37
- route: runtimeRoute.route,
38
- conversation: {
39
- channel: "discord",
40
- accountId: params.accountId,
41
- conversationId: params.configuredConversationId,
42
- parentConversationId: params.parentConversationId
43
- }
44
- });
45
- return {
46
- runtimeRoute,
47
- configuredRoute
48
- };
49
- }
50
- //#endregion
51
- export { resolveDiscordConversationBindingRoute as t };
@@ -1 +0,0 @@
1
- export { t as monitorDiscordProvider } from "./provider-CbmXLYrW.mjs";
@@ -1,2 +0,0 @@
1
- export { t as discordSetupPlugin } from "./channel.setup-B3KEh05g.mjs";
2
- import "../setup-plugin-api.js";