nolo-cli 0.159.0-alpha.2 → 0.159.0-alpha.3

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 (63) hide show
  1. package/{_executeModel-VGY53B7B.js → _executeModel-SHA5BWRT.js} +15 -15
  2. package/{agentDeleteCommand-N7LJGVHB.js → agentDeleteCommand-VU3BA264.js} +14 -14
  3. package/{agentEmailCommands-2K3P3XDT.js → agentEmailCommands-WUANEGTM.js} +16 -16
  4. package/{agentListCommands-3CJ4GF6C.js → agentListCommands-3YNO6UP4.js} +5 -5
  5. package/{agentMachineCommands-4QQV7GGA.js → agentMachineCommands-ONGZXXQW.js} +6 -6
  6. package/{agentRecordCommands-U7OAV5ZX.js → agentRecordCommands-DXXA2RET.js} +15 -15
  7. package/{agentRunCommand-55RMQNVI.js → agentRunCommand-WY77TJ72.js} +16 -16
  8. package/{agentRuntimeLocal-7JDS3OAL.js → agentRuntimeLocal-NHC5DQPJ.js} +5 -5
  9. package/{agentSlice-OXGFFQ6L.js → agentSlice-MIOEV36T.js} +1 -1
  10. package/{appDeleteCommands-UVWHW4TJ.js → appDeleteCommands-VQYCXZRF.js} +5 -5
  11. package/{appDeployCommands-67JPR4JU.js → appDeployCommands-OKSJDVEY.js} +5 -5
  12. package/{appDeployStatusCommands-UTC6IR5V.js → appDeployStatusCommands-UFGNZS6G.js} +5 -5
  13. package/{appGetCommands-KLLIGWNC.js → appGetCommands-3HNO5WLF.js} +5 -5
  14. package/{appListCommands-AZKNWJUR.js → appListCommands-H33BIZHJ.js} +5 -5
  15. package/{chunk-AAZ4QBFU.js → chunk-2NROMJBM.js} +1 -1
  16. package/{chunk-TQA3UACU.js → chunk-6MH6PWVJ.js} +1 -1
  17. package/{chunk-RX2CAWIB.js → chunk-BFI6JGF6.js} +10 -10
  18. package/{chunk-CTDOZWQX.js → chunk-C47WM5SD.js} +1 -1
  19. package/{chunk-MLGFCRL2.js → chunk-CSCSMGQI.js} +3 -3
  20. package/{chunk-4JOZECCA.js → chunk-CVSKYIXX.js} +2 -2
  21. package/{chunk-HNMY5XY6.js → chunk-DWBY333O.js} +3 -3
  22. package/{chunk-XMHE5P5T.js → chunk-E46SJRWA.js} +3 -3
  23. package/{chunk-4UCLMT27.js → chunk-FBSDWUOJ.js} +2 -2
  24. package/{chunk-VKU6G2TC.js → chunk-FZYTJOAQ.js} +10 -10
  25. package/{chunk-2QCLJA24.js → chunk-GCLZBOB6.js} +8 -8
  26. package/{chunk-UKD7M7MB.js → chunk-GSKVOMBU.js} +2 -2
  27. package/{chunk-EJQBSOQQ.js → chunk-NNE5NIW2.js} +2 -2
  28. package/{chunk-IULXURBL.js → chunk-NT3LMOSE.js} +4 -4
  29. package/{chunk-HSTLMIPE.js → chunk-QO436IJ5.js} +2 -2
  30. package/{chunk-U6TTTB6V.js → chunk-QYAYO5JA.js} +1 -1
  31. package/{chunk-WI47DIF3.js → chunk-RJBHRIEL.js} +9 -9
  32. package/{chunk-MGSNS22D.js → chunk-TCQPBZUL.js} +2 -736
  33. package/{chunk-CT5G7V46.js → chunk-TMYAT2MD.js} +3 -3
  34. package/{chunk-WQ2FSETX.js → chunk-V4AK4IVZ.js} +2 -2
  35. package/{chunk-KLOUPPO6.js → chunk-XBLZ5IFE.js} +7 -7
  36. package/{chunk-AVB7CTVJ.js → chunk-ZAB4R7LU.js} +10 -10
  37. package/{chunk-GB552UJS.js → chunk-ZJG7YU3I.js} +1 -1
  38. package/{commandRegistry-J3BFLLBY.js → commandRegistry-DAM7RV6E.js} +40 -40
  39. package/{contentThunks-ZDSBE7NG.js → contentThunks-WLKR5KQ6.js} +5 -5
  40. package/{createAgentAutomationAction-TRWBF5DQ.js → createAgentAutomationAction-AI2HZHLE.js} +5 -5
  41. package/{createDialogAction-AMYWLRO4.js → createDialogAction-AU4IWDR3.js} +6 -6
  42. package/{createPageAction-KHKRLVQO.js → createPageAction-CAXS6ZUJ.js} +5 -5
  43. package/{dialogCommands-K4OVKDYD.js → dialogCommands-2QMR63AY.js} +5 -5
  44. package/{dialogSlice-WNLY25YV.js → dialogSlice-QEP5EUON.js} +4 -4
  45. package/{dist-NJC2W7I4.js → dist-Q2JSMAKA.js} +7 -361
  46. package/{docCreateCommands-GI377ZFI.js → docCreateCommands-EG3KFJGO.js} +5 -5
  47. package/{docDeleteCommands-NBQNTVHB.js → docDeleteCommands-MAM2BLCP.js} +5 -5
  48. package/{docReadCommands-6SKEW6AO.js → docReadCommands-XVX2VLVM.js} +5 -5
  49. package/{docStore-UEYBUHOJ.js → docStore-WTXUKAQB.js} +1 -1
  50. package/{docUpdateCommands-NJ7JD6VA.js → docUpdateCommands-JURMHPS5.js} +5 -5
  51. package/{handleSendMessageAction-FKTNID5I.js → handleSendMessageAction-7MAFLFOD.js} +9 -9
  52. package/index.js +4 -4
  53. package/{localRuntimeAdapter-ZT3P7NFH.js → localRuntimeAdapter-DSO3Y5ZS.js} +14 -14
  54. package/{machineCommands-4I3POIF2.js → machineCommands-DWILXGTZ.js} +15 -15
  55. package/{machineWsRunDispatch-EBTOI2EU.js → machineWsRunDispatch-NJJZ34JJ.js} +15 -15
  56. package/package.json +4 -2
  57. package/{readlineWorkspace-7DXZALKF.js → readlineWorkspace-STK57SSQ.js} +17 -17
  58. package/{runAgentClientLoop-MITBRXTT.js → runAgentClientLoop-6OD2CTYG.js} +13 -13
  59. package/{spaceCommands-UM3ZQKJU.js → spaceCommands-WPCHZKEY.js} +5 -5
  60. package/{streamAgentChatTurn-7ZIKATEO.js → streamAgentChatTurn-BOATI5H3.js} +15 -15
  61. package/{tools-TSKAUQYD.js → tools-FPKQX2J6.js} +9 -9
  62. package/{tuiSummaryLlmCaller-VSNIIH63.js → tuiSummaryLlmCaller-PEYFTAVL.js} +3 -3
  63. package/{updateDialogTitleAction-73QX44WS.js → updateDialogTitleAction-WAH5KADA.js} +5 -5
@@ -10,740 +10,6 @@ import {
10
10
  import {
11
11
  isPlatformManagedProvider
12
12
  } from "./chunk-CGFNDIKK.js";
13
- import {
14
- __commonJS,
15
- __require,
16
- __toESM
17
- } from "./chunk-4VNS5WPM.js";
18
-
19
- // node_modules/crypto-js/core.js
20
- var require_core = __commonJS({
21
- "node_modules/crypto-js/core.js"(exports, module) {
22
- (function(root, factory) {
23
- if (typeof exports === "object") {
24
- module.exports = exports = factory();
25
- } else if (typeof define === "function" && define.amd) {
26
- define([], factory);
27
- } else {
28
- root.CryptoJS = factory();
29
- }
30
- })(exports, function() {
31
- var CryptoJS = CryptoJS || function(Math2, undefined2) {
32
- var crypto;
33
- if (typeof window !== "undefined" && window.crypto) {
34
- crypto = window.crypto;
35
- }
36
- if (typeof self !== "undefined" && self.crypto) {
37
- crypto = self.crypto;
38
- }
39
- if (typeof globalThis !== "undefined" && globalThis.crypto) {
40
- crypto = globalThis.crypto;
41
- }
42
- if (!crypto && typeof window !== "undefined" && window.msCrypto) {
43
- crypto = window.msCrypto;
44
- }
45
- if (!crypto && typeof global !== "undefined" && global.crypto) {
46
- crypto = global.crypto;
47
- }
48
- if (!crypto && typeof __require === "function") {
49
- try {
50
- crypto = __require("crypto");
51
- } catch (err) {
52
- }
53
- }
54
- var cryptoSecureRandomInt = function() {
55
- if (crypto) {
56
- if (typeof crypto.getRandomValues === "function") {
57
- try {
58
- return crypto.getRandomValues(new Uint32Array(1))[0];
59
- } catch (err) {
60
- }
61
- }
62
- if (typeof crypto.randomBytes === "function") {
63
- try {
64
- return crypto.randomBytes(4).readInt32LE();
65
- } catch (err) {
66
- }
67
- }
68
- }
69
- throw new Error("Native crypto module could not be used to get secure random number.");
70
- };
71
- var create = Object.create || /* @__PURE__ */ function() {
72
- function F() {
73
- }
74
- return function(obj) {
75
- var subtype;
76
- F.prototype = obj;
77
- subtype = new F();
78
- F.prototype = null;
79
- return subtype;
80
- };
81
- }();
82
- var C = {};
83
- var C_lib = C.lib = {};
84
- var Base = C_lib.Base = /* @__PURE__ */ function() {
85
- return {
86
- /**
87
- * Creates a new object that inherits from this object.
88
- *
89
- * @param {Object} overrides Properties to copy into the new object.
90
- *
91
- * @return {Object} The new object.
92
- *
93
- * @static
94
- *
95
- * @example
96
- *
97
- * var MyType = CryptoJS.lib.Base.extend({
98
- * field: 'value',
99
- *
100
- * method: function () {
101
- * }
102
- * });
103
- */
104
- extend: function(overrides) {
105
- var subtype = create(this);
106
- if (overrides) {
107
- subtype.mixIn(overrides);
108
- }
109
- if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
110
- subtype.init = function() {
111
- subtype.$super.init.apply(this, arguments);
112
- };
113
- }
114
- subtype.init.prototype = subtype;
115
- subtype.$super = this;
116
- return subtype;
117
- },
118
- /**
119
- * Extends this object and runs the init method.
120
- * Arguments to create() will be passed to init().
121
- *
122
- * @return {Object} The new object.
123
- *
124
- * @static
125
- *
126
- * @example
127
- *
128
- * var instance = MyType.create();
129
- */
130
- create: function() {
131
- var instance = this.extend();
132
- instance.init.apply(instance, arguments);
133
- return instance;
134
- },
135
- /**
136
- * Initializes a newly created object.
137
- * Override this method to add some logic when your objects are created.
138
- *
139
- * @example
140
- *
141
- * var MyType = CryptoJS.lib.Base.extend({
142
- * init: function () {
143
- * // ...
144
- * }
145
- * });
146
- */
147
- init: function() {
148
- },
149
- /**
150
- * Copies properties into this object.
151
- *
152
- * @param {Object} properties The properties to mix in.
153
- *
154
- * @example
155
- *
156
- * MyType.mixIn({
157
- * field: 'value'
158
- * });
159
- */
160
- mixIn: function(properties) {
161
- for (var propertyName in properties) {
162
- if (properties.hasOwnProperty(propertyName)) {
163
- this[propertyName] = properties[propertyName];
164
- }
165
- }
166
- if (properties.hasOwnProperty("toString")) {
167
- this.toString = properties.toString;
168
- }
169
- },
170
- /**
171
- * Creates a copy of this object.
172
- *
173
- * @return {Object} The clone.
174
- *
175
- * @example
176
- *
177
- * var clone = instance.clone();
178
- */
179
- clone: function() {
180
- return this.init.prototype.extend(this);
181
- }
182
- };
183
- }();
184
- var WordArray = C_lib.WordArray = Base.extend({
185
- /**
186
- * Initializes a newly created word array.
187
- *
188
- * @param {Array} words (Optional) An array of 32-bit words.
189
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
190
- *
191
- * @example
192
- *
193
- * var wordArray = CryptoJS.lib.WordArray.create();
194
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
195
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
196
- */
197
- init: function(words, sigBytes) {
198
- words = this.words = words || [];
199
- if (sigBytes != undefined2) {
200
- this.sigBytes = sigBytes;
201
- } else {
202
- this.sigBytes = words.length * 4;
203
- }
204
- },
205
- /**
206
- * Converts this word array to a string.
207
- *
208
- * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
209
- *
210
- * @return {string} The stringified word array.
211
- *
212
- * @example
213
- *
214
- * var string = wordArray + '';
215
- * var string = wordArray.toString();
216
- * var string = wordArray.toString(CryptoJS.enc.Utf8);
217
- */
218
- toString: function(encoder) {
219
- return (encoder || Hex).stringify(this);
220
- },
221
- /**
222
- * Concatenates a word array to this word array.
223
- *
224
- * @param {WordArray} wordArray The word array to append.
225
- *
226
- * @return {WordArray} This word array.
227
- *
228
- * @example
229
- *
230
- * wordArray1.concat(wordArray2);
231
- */
232
- concat: function(wordArray) {
233
- var thisWords = this.words;
234
- var thatWords = wordArray.words;
235
- var thisSigBytes = this.sigBytes;
236
- var thatSigBytes = wordArray.sigBytes;
237
- this.clamp();
238
- if (thisSigBytes % 4) {
239
- for (var i = 0; i < thatSigBytes; i++) {
240
- var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
241
- thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
242
- }
243
- } else {
244
- for (var j = 0; j < thatSigBytes; j += 4) {
245
- thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
246
- }
247
- }
248
- this.sigBytes += thatSigBytes;
249
- return this;
250
- },
251
- /**
252
- * Removes insignificant bits.
253
- *
254
- * @example
255
- *
256
- * wordArray.clamp();
257
- */
258
- clamp: function() {
259
- var words = this.words;
260
- var sigBytes = this.sigBytes;
261
- words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
262
- words.length = Math2.ceil(sigBytes / 4);
263
- },
264
- /**
265
- * Creates a copy of this word array.
266
- *
267
- * @return {WordArray} The clone.
268
- *
269
- * @example
270
- *
271
- * var clone = wordArray.clone();
272
- */
273
- clone: function() {
274
- var clone = Base.clone.call(this);
275
- clone.words = this.words.slice(0);
276
- return clone;
277
- },
278
- /**
279
- * Creates a word array filled with random bytes.
280
- *
281
- * @param {number} nBytes The number of random bytes to generate.
282
- *
283
- * @return {WordArray} The random word array.
284
- *
285
- * @static
286
- *
287
- * @example
288
- *
289
- * var wordArray = CryptoJS.lib.WordArray.random(16);
290
- */
291
- random: function(nBytes) {
292
- var words = [];
293
- for (var i = 0; i < nBytes; i += 4) {
294
- words.push(cryptoSecureRandomInt());
295
- }
296
- return new WordArray.init(words, nBytes);
297
- }
298
- });
299
- var C_enc = C.enc = {};
300
- var Hex = C_enc.Hex = {
301
- /**
302
- * Converts a word array to a hex string.
303
- *
304
- * @param {WordArray} wordArray The word array.
305
- *
306
- * @return {string} The hex string.
307
- *
308
- * @static
309
- *
310
- * @example
311
- *
312
- * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
313
- */
314
- stringify: function(wordArray) {
315
- var words = wordArray.words;
316
- var sigBytes = wordArray.sigBytes;
317
- var hexChars = [];
318
- for (var i = 0; i < sigBytes; i++) {
319
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
320
- hexChars.push((bite >>> 4).toString(16));
321
- hexChars.push((bite & 15).toString(16));
322
- }
323
- return hexChars.join("");
324
- },
325
- /**
326
- * Converts a hex string to a word array.
327
- *
328
- * @param {string} hexStr The hex string.
329
- *
330
- * @return {WordArray} The word array.
331
- *
332
- * @static
333
- *
334
- * @example
335
- *
336
- * var wordArray = CryptoJS.enc.Hex.parse(hexString);
337
- */
338
- parse: function(hexStr) {
339
- var hexStrLength = hexStr.length;
340
- var words = [];
341
- for (var i = 0; i < hexStrLength; i += 2) {
342
- words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
343
- }
344
- return new WordArray.init(words, hexStrLength / 2);
345
- }
346
- };
347
- var Latin1 = C_enc.Latin1 = {
348
- /**
349
- * Converts a word array to a Latin1 string.
350
- *
351
- * @param {WordArray} wordArray The word array.
352
- *
353
- * @return {string} The Latin1 string.
354
- *
355
- * @static
356
- *
357
- * @example
358
- *
359
- * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
360
- */
361
- stringify: function(wordArray) {
362
- var words = wordArray.words;
363
- var sigBytes = wordArray.sigBytes;
364
- var latin1Chars = [];
365
- for (var i = 0; i < sigBytes; i++) {
366
- var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
367
- latin1Chars.push(String.fromCharCode(bite));
368
- }
369
- return latin1Chars.join("");
370
- },
371
- /**
372
- * Converts a Latin1 string to a word array.
373
- *
374
- * @param {string} latin1Str The Latin1 string.
375
- *
376
- * @return {WordArray} The word array.
377
- *
378
- * @static
379
- *
380
- * @example
381
- *
382
- * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
383
- */
384
- parse: function(latin1Str) {
385
- var latin1StrLength = latin1Str.length;
386
- var words = [];
387
- for (var i = 0; i < latin1StrLength; i++) {
388
- words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
389
- }
390
- return new WordArray.init(words, latin1StrLength);
391
- }
392
- };
393
- var Utf8 = C_enc.Utf8 = {
394
- /**
395
- * Converts a word array to a UTF-8 string.
396
- *
397
- * @param {WordArray} wordArray The word array.
398
- *
399
- * @return {string} The UTF-8 string.
400
- *
401
- * @static
402
- *
403
- * @example
404
- *
405
- * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
406
- */
407
- stringify: function(wordArray) {
408
- try {
409
- return decodeURIComponent(escape(Latin1.stringify(wordArray)));
410
- } catch (e) {
411
- throw new Error("Malformed UTF-8 data");
412
- }
413
- },
414
- /**
415
- * Converts a UTF-8 string to a word array.
416
- *
417
- * @param {string} utf8Str The UTF-8 string.
418
- *
419
- * @return {WordArray} The word array.
420
- *
421
- * @static
422
- *
423
- * @example
424
- *
425
- * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
426
- */
427
- parse: function(utf8Str) {
428
- return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
429
- }
430
- };
431
- var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
432
- /**
433
- * Resets this block algorithm's data buffer to its initial state.
434
- *
435
- * @example
436
- *
437
- * bufferedBlockAlgorithm.reset();
438
- */
439
- reset: function() {
440
- this._data = new WordArray.init();
441
- this._nDataBytes = 0;
442
- },
443
- /**
444
- * Adds new data to this block algorithm's buffer.
445
- *
446
- * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
447
- *
448
- * @example
449
- *
450
- * bufferedBlockAlgorithm._append('data');
451
- * bufferedBlockAlgorithm._append(wordArray);
452
- */
453
- _append: function(data) {
454
- if (typeof data == "string") {
455
- data = Utf8.parse(data);
456
- }
457
- this._data.concat(data);
458
- this._nDataBytes += data.sigBytes;
459
- },
460
- /**
461
- * Processes available data blocks.
462
- *
463
- * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
464
- *
465
- * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
466
- *
467
- * @return {WordArray} The processed data.
468
- *
469
- * @example
470
- *
471
- * var processedData = bufferedBlockAlgorithm._process();
472
- * var processedData = bufferedBlockAlgorithm._process(!!'flush');
473
- */
474
- _process: function(doFlush) {
475
- var processedWords;
476
- var data = this._data;
477
- var dataWords = data.words;
478
- var dataSigBytes = data.sigBytes;
479
- var blockSize = this.blockSize;
480
- var blockSizeBytes = blockSize * 4;
481
- var nBlocksReady = dataSigBytes / blockSizeBytes;
482
- if (doFlush) {
483
- nBlocksReady = Math2.ceil(nBlocksReady);
484
- } else {
485
- nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
486
- }
487
- var nWordsReady = nBlocksReady * blockSize;
488
- var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
489
- if (nWordsReady) {
490
- for (var offset = 0; offset < nWordsReady; offset += blockSize) {
491
- this._doProcessBlock(dataWords, offset);
492
- }
493
- processedWords = dataWords.splice(0, nWordsReady);
494
- data.sigBytes -= nBytesReady;
495
- }
496
- return new WordArray.init(processedWords, nBytesReady);
497
- },
498
- /**
499
- * Creates a copy of this object.
500
- *
501
- * @return {Object} The clone.
502
- *
503
- * @example
504
- *
505
- * var clone = bufferedBlockAlgorithm.clone();
506
- */
507
- clone: function() {
508
- var clone = Base.clone.call(this);
509
- clone._data = this._data.clone();
510
- return clone;
511
- },
512
- _minBufferSize: 0
513
- });
514
- var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
515
- /**
516
- * Configuration options.
517
- */
518
- cfg: Base.extend(),
519
- /**
520
- * Initializes a newly created hasher.
521
- *
522
- * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
523
- *
524
- * @example
525
- *
526
- * var hasher = CryptoJS.algo.SHA256.create();
527
- */
528
- init: function(cfg) {
529
- this.cfg = this.cfg.extend(cfg);
530
- this.reset();
531
- },
532
- /**
533
- * Resets this hasher to its initial state.
534
- *
535
- * @example
536
- *
537
- * hasher.reset();
538
- */
539
- reset: function() {
540
- BufferedBlockAlgorithm.reset.call(this);
541
- this._doReset();
542
- },
543
- /**
544
- * Updates this hasher with a message.
545
- *
546
- * @param {WordArray|string} messageUpdate The message to append.
547
- *
548
- * @return {Hasher} This hasher.
549
- *
550
- * @example
551
- *
552
- * hasher.update('message');
553
- * hasher.update(wordArray);
554
- */
555
- update: function(messageUpdate) {
556
- this._append(messageUpdate);
557
- this._process();
558
- return this;
559
- },
560
- /**
561
- * Finalizes the hash computation.
562
- * Note that the finalize operation is effectively a destructive, read-once operation.
563
- *
564
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
565
- *
566
- * @return {WordArray} The hash.
567
- *
568
- * @example
569
- *
570
- * var hash = hasher.finalize();
571
- * var hash = hasher.finalize('message');
572
- * var hash = hasher.finalize(wordArray);
573
- */
574
- finalize: function(messageUpdate) {
575
- if (messageUpdate) {
576
- this._append(messageUpdate);
577
- }
578
- var hash = this._doFinalize();
579
- return hash;
580
- },
581
- blockSize: 512 / 32,
582
- /**
583
- * Creates a shortcut function to a hasher's object interface.
584
- *
585
- * @param {Hasher} hasher The hasher to create a helper for.
586
- *
587
- * @return {Function} The shortcut function.
588
- *
589
- * @static
590
- *
591
- * @example
592
- *
593
- * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
594
- */
595
- _createHelper: function(hasher) {
596
- return function(message, cfg) {
597
- return new hasher.init(cfg).finalize(message);
598
- };
599
- },
600
- /**
601
- * Creates a shortcut function to the HMAC's object interface.
602
- *
603
- * @param {Hasher} hasher The hasher to use in this HMAC helper.
604
- *
605
- * @return {Function} The shortcut function.
606
- *
607
- * @static
608
- *
609
- * @example
610
- *
611
- * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
612
- */
613
- _createHmacHelper: function(hasher) {
614
- return function(message, key) {
615
- return new C_algo.HMAC.init(hasher, key).finalize(message);
616
- };
617
- }
618
- });
619
- var C_algo = C.algo = {};
620
- return C;
621
- }(Math);
622
- return CryptoJS;
623
- });
624
- }
625
- });
626
-
627
- // node_modules/crypto-js/sha256.js
628
- var require_sha256 = __commonJS({
629
- "node_modules/crypto-js/sha256.js"(exports, module) {
630
- (function(root, factory) {
631
- if (typeof exports === "object") {
632
- module.exports = exports = factory(require_core());
633
- } else if (typeof define === "function" && define.amd) {
634
- define(["./core"], factory);
635
- } else {
636
- factory(root.CryptoJS);
637
- }
638
- })(exports, function(CryptoJS) {
639
- (function(Math2) {
640
- var C = CryptoJS;
641
- var C_lib = C.lib;
642
- var WordArray = C_lib.WordArray;
643
- var Hasher = C_lib.Hasher;
644
- var C_algo = C.algo;
645
- var H = [];
646
- var K = [];
647
- (function() {
648
- function isPrime(n2) {
649
- var sqrtN = Math2.sqrt(n2);
650
- for (var factor = 2; factor <= sqrtN; factor++) {
651
- if (!(n2 % factor)) {
652
- return false;
653
- }
654
- }
655
- return true;
656
- }
657
- function getFractionalBits(n2) {
658
- return (n2 - (n2 | 0)) * 4294967296 | 0;
659
- }
660
- var n = 2;
661
- var nPrime = 0;
662
- while (nPrime < 64) {
663
- if (isPrime(n)) {
664
- if (nPrime < 8) {
665
- H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
666
- }
667
- K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
668
- nPrime++;
669
- }
670
- n++;
671
- }
672
- })();
673
- var W = [];
674
- var SHA2562 = C_algo.SHA256 = Hasher.extend({
675
- _doReset: function() {
676
- this._hash = new WordArray.init(H.slice(0));
677
- },
678
- _doProcessBlock: function(M, offset) {
679
- var H2 = this._hash.words;
680
- var a = H2[0];
681
- var b = H2[1];
682
- var c = H2[2];
683
- var d = H2[3];
684
- var e = H2[4];
685
- var f = H2[5];
686
- var g = H2[6];
687
- var h = H2[7];
688
- for (var i = 0; i < 64; i++) {
689
- if (i < 16) {
690
- W[i] = M[offset + i] | 0;
691
- } else {
692
- var gamma0x = W[i - 15];
693
- var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
694
- var gamma1x = W[i - 2];
695
- var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
696
- W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
697
- }
698
- var ch = e & f ^ ~e & g;
699
- var maj = a & b ^ a & c ^ b & c;
700
- var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
701
- var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
702
- var t1 = h + sigma1 + ch + K[i] + W[i];
703
- var t2 = sigma0 + maj;
704
- h = g;
705
- g = f;
706
- f = e;
707
- e = d + t1 | 0;
708
- d = c;
709
- c = b;
710
- b = a;
711
- a = t1 + t2 | 0;
712
- }
713
- H2[0] = H2[0] + a | 0;
714
- H2[1] = H2[1] + b | 0;
715
- H2[2] = H2[2] + c | 0;
716
- H2[3] = H2[3] + d | 0;
717
- H2[4] = H2[4] + e | 0;
718
- H2[5] = H2[5] + f | 0;
719
- H2[6] = H2[6] + g | 0;
720
- H2[7] = H2[7] + h | 0;
721
- },
722
- _doFinalize: function() {
723
- var data = this._data;
724
- var dataWords = data.words;
725
- var nBitsTotal = this._nDataBytes * 8;
726
- var nBitsLeft = data.sigBytes * 8;
727
- dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
728
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
729
- dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
730
- data.sigBytes = dataWords.length * 4;
731
- this._process();
732
- return this._hash;
733
- },
734
- clone: function() {
735
- var clone = Hasher.clone.call(this);
736
- clone._hash = this._hash.clone();
737
- return clone;
738
- }
739
- });
740
- C.SHA256 = Hasher._createHelper(SHA2562);
741
- C.HmacSHA256 = Hasher._createHmacHelper(SHA2562);
742
- })(Math);
743
- return CryptoJS.SHA256;
744
- });
745
- }
746
- });
747
13
 
748
14
  // packages/core/chat/messageContentSerialize.ts
749
15
  var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
@@ -768,9 +34,9 @@ var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") =>
768
34
  };
769
35
 
770
36
  // packages/core/sha256.ts
771
- var import_sha256 = __toESM(require_sha256(), 1);
37
+ import SHA256 from "crypto-js/sha256";
772
38
  function sha256Hex(text) {
773
- return (0, import_sha256.default)(text).toString();
39
+ return SHA256(text).toString();
774
40
  }
775
41
 
776
42
  // packages/ai/context/retention.ts