nolo-cli 0.251.0-alpha.1 → 0.252.0-alpha.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 (169) hide show
  1. package/{_executeModel-55PHWQWB.js → _executeModel-RXHY2BDR.js} +47 -47
  2. package/{action-WZTKEF5H.js → action-4MADDU52.js} +5 -5
  3. package/{addContentAction-LBVAQUF7.js → addContentAction-F4XO3VRF.js} +8 -8
  4. package/{addDialogAgentAction-6WAUSUSZ.js → addDialogAgentAction-NSCVHTZJ.js} +7 -7
  5. package/{agentDeleteCommand-KEO3KDK3.js → agentDeleteCommand-EJAI2VTH.js} +69 -68
  6. package/{agentEmailCommands-RWJQQRNT.js → agentEmailCommands-YBKHZMMZ.js} +69 -68
  7. package/{agentListCommands-L3TLPLNH.js → agentListCommands-M2KYLAOB.js} +226 -39
  8. package/{agentMachineCommands-EZWWXWDH.js → agentMachineCommands-GLY6NJWZ.js} +31 -29
  9. package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
  10. package/{agentRecordCommands-7W2CGHJJ.js → agentRecordCommands-JANPX6XI.js} +68 -67
  11. package/{agentRunCommand-POL6B6BO.js → agentRunCommand-TNLAXLUU.js} +68 -67
  12. package/{agentRunControl-FKSXBUAF.js → agentRunControl-KNNDEEDI.js} +8 -6
  13. package/{agentRuntimeLocal-WSHWNIMF.js → agentRuntimeLocal-EOW6FFXL.js} +26 -25
  14. package/{agentSlice-3G2YLTA4.js → agentSlice-PVFGBJXB.js} +8 -8
  15. package/{appDeleteCommands-DZZQCVYH.js → appDeleteCommands-3VCRRWUX.js} +33 -31
  16. package/{appDeployCommands-NJJBVNH5.js → appDeployCommands-XN6IEMYK.js} +33 -31
  17. package/{appDeployStatusCommands-GBOAFEYG.js → appDeployStatusCommands-ZSJJXMVR.js} +33 -31
  18. package/{appGetCommands-GOOKYMKO.js → appGetCommands-DJ7YQCEE.js} +33 -31
  19. package/{appListCommands-OBCGUG3S.js → appListCommands-4KU5CV5H.js} +33 -31
  20. package/{authCommand-77CRN332.js → authCommand-5DC3ES4Q.js} +12 -12
  21. package/{builtinSkillRegistry-PFTTFPWW.js → builtinSkillRegistry-PQWEXSFW.js} +1 -1
  22. package/{chromeOpsCommands-6RLEBBJJ.js → chromeOpsCommands-AA555ANS.js} +1 -1
  23. package/{chunk-LOXR4TQN.js → chunk-25GCVHBZ.js} +2 -2
  24. package/{chunk-A55E2OCP.js → chunk-26KL6533.js} +639 -125
  25. package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
  26. package/{chunk-CUYFRVJF.js → chunk-2HF6DINU.js} +6 -6
  27. package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
  28. package/{chunk-GMWZRXRM.js → chunk-3272HU62.js} +1 -1
  29. package/{chunk-43VT5PLM.js → chunk-3LL5HRIJ.js} +1 -1
  30. package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
  31. package/{chunk-T4V6C3J3.js → chunk-52M4RYVP.js} +1 -1
  32. package/{chunk-OQCAHPDQ.js → chunk-5QEOTC35.js} +4 -4
  33. package/{chunk-R7D5SRAZ.js → chunk-5UYDG6HP.js} +17 -0
  34. package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
  35. package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
  36. package/{chunk-UCMUXZJV.js → chunk-7XO73H5X.js} +111 -1
  37. package/{chunk-222CJNC2.js → chunk-BLBGVSLB.js} +3 -3
  38. package/{chunk-ZM5AZTQG.js → chunk-BTQU2PRC.js} +19 -7
  39. package/{chunk-QJ5YDTEF.js → chunk-BVCCRSGK.js} +42 -24
  40. package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
  41. package/chunk-CGSIW2KI.js +594 -0
  42. package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
  43. package/{chunk-Q5KZ6F55.js → chunk-CSTCYYCR.js} +19 -17
  44. package/{chunk-D3E5MYXO.js → chunk-CYGFNMCH.js} +1 -1
  45. package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
  46. package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
  47. package/{chunk-MTS5DCL2.js → chunk-EG3JTV7H.js} +2 -2
  48. package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
  49. package/{chunk-D35TOEMM.js → chunk-EPBEZKYK.js} +137 -53
  50. package/{chunk-KJDN2YRH.js → chunk-EQJK6LSN.js} +4 -4
  51. package/{chunk-N3SEV3CG.js → chunk-F6GZFIGR.js} +79 -30
  52. package/{chunk-6UNJ6JGR.js → chunk-FJPVVLP3.js} +4 -4
  53. package/{chunk-L5HV76QT.js → chunk-FRC2DNTN.js} +1 -1
  54. package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
  55. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  56. package/{chunk-IFJ6OTI6.js → chunk-GJ4UTSAW.js} +33 -11
  57. package/{chunk-ZKKJZBNO.js → chunk-GUFTHWDO.js} +10 -10
  58. package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
  59. package/{chunk-W2N4OAKM.js → chunk-IQXMWBI6.js} +3 -3
  60. package/chunk-IVK2KT3H.js +209 -0
  61. package/{chunk-PLS2MJVW.js → chunk-J4KLOLYP.js} +4 -4
  62. package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
  63. package/{chunk-CDIRKCPD.js → chunk-JX2IG37T.js} +153 -153
  64. package/{chunk-TGKAUEV3.js → chunk-K7RWY7JH.js} +14 -11
  65. package/{chunk-5IKKSJYX.js → chunk-KHYSFS3W.js} +76 -2
  66. package/{chunk-K5CIMK3R.js → chunk-KO6JNZCF.js} +115 -57
  67. package/{chunk-XJSEST7D.js → chunk-KQBGXCKM.js} +3 -3
  68. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  69. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  70. package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
  71. package/{chunk-HD5EKSLF.js → chunk-MDWHMQON.js} +3 -3
  72. package/{chunk-X337N4D6.js → chunk-MOAVLCCM.js} +4 -4
  73. package/{chunk-OARYOLF3.js → chunk-N2MDL5AZ.js} +12 -12
  74. package/{chunk-ZSRR6HCH.js → chunk-N2ZAY2DK.js} +1 -1
  75. package/{chunk-X3OZ655T.js → chunk-N7UXTVAR.js} +2 -2
  76. package/{chunk-KGOBJAWC.js → chunk-NJDOID7N.js} +207 -94
  77. package/{chunk-NTNX77FI.js → chunk-NRWZHHOB.js} +6 -6
  78. package/{chunk-3ZWJVKFB.js → chunk-NWZRCUHM.js} +84 -40
  79. package/{chunk-HQLCYPL4.js → chunk-OB4FBZXJ.js} +4 -4
  80. package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
  81. package/{chunk-IZWGO2ZS.js → chunk-OMIXG25B.js} +1 -1
  82. package/{chunk-CJ2BP6V7.js → chunk-OOV5JN25.js} +2 -2
  83. package/{chunk-3KWJPTVP.js → chunk-OQOXDQLB.js} +4 -4
  84. package/{chunk-LXKK7QFI.js → chunk-OTNPEE4G.js} +54 -24
  85. package/{chunk-LMMRWGGJ.js → chunk-OTOPQXP5.js} +2 -2
  86. package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
  87. package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
  88. package/{chunk-WZPG63Q4.js → chunk-PIVTQRX6.js} +43 -13
  89. package/{chunk-SLUZ6FBJ.js → chunk-Q5M27DUE.js} +1 -1
  90. package/{chunk-XC5RPSXK.js → chunk-QV32GSVO.js} +2 -2
  91. package/{chunk-WQDTSK5U.js → chunk-REINTCQF.js} +8 -2
  92. package/{chunk-IXAGRTAR.js → chunk-SBBSUBY3.js} +1 -1
  93. package/{chunk-MTM4LRVG.js → chunk-SCY2O7CU.js} +2 -2
  94. package/{chunk-FAFDIQJG.js → chunk-U3ZK2MXG.js} +3 -3
  95. package/{chunk-PKMDYRAM.js → chunk-UDQZ5JT7.js} +175 -241
  96. package/{chunk-UR4ZMRV3.js → chunk-UGHNYYOE.js} +2 -2
  97. package/{chunk-KZVRPCOR.js → chunk-UTFTXJU3.js} +4 -4
  98. package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
  99. package/{chunk-U2OWDHDE.js → chunk-VH7AQEEF.js} +2 -2
  100. package/{chunk-QLGL43SI.js → chunk-VZWYP7LD.js} +2 -2
  101. package/{chunk-6XVPMGXK.js → chunk-W4S5FQWQ.js} +10 -4
  102. package/{chunk-KRAPKTAS.js → chunk-WJOC3AEM.js} +2 -2
  103. package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
  104. package/{chunk-JUYI2D7J.js → chunk-WNIBQBOR.js} +1 -1
  105. package/{chunk-BQ4CZEVZ.js → chunk-YWLMUFZ5.js} +1 -1
  106. package/{chunk-CD64YXRB.js → chunk-Z47UZT27.js} +1 -1
  107. package/{chunk-75TXQ4GY.js → chunk-ZMWDHPNG.js} +15 -29
  108. package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
  109. package/{cliAgentConfigHelpers-N6LTB7UY.js → cliAgentConfigHelpers-FKBPFPKR.js} +6 -6
  110. package/{cliLocalAgentRecordReader-NFNGYOOW.js → cliLocalAgentRecordReader-OHAC4JTY.js} +30 -29
  111. package/{commandRegistry-OM5DU4DS.js → commandRegistry-YQMAXCLP.js} +81 -81
  112. package/{contentThunks-7URM43ET.js → contentThunks-GSMUNWBA.js} +20 -20
  113. package/{cooldownCommands-JEEV75B7.js → cooldownCommands-PT5L4LNB.js} +3 -3
  114. package/{createAgentAutomationAction-GGEXIKMC.js → createAgentAutomationAction-RMADR4LG.js} +20 -20
  115. package/{createDialogAction-IXXEMFRQ.js → createDialogAction-CM5CBQVH.js} +21 -21
  116. package/{createPageAction-IXIVLIOO.js → createPageAction-JMGVMCTH.js} +21 -21
  117. package/{db-J5KE7XRI.js → db-VR74ADGC.js} +5 -1
  118. package/{dbSlice-IE4ADINL.js → dbSlice-Q637QR4L.js} +7 -7
  119. package/{deleteFile-ZCQESEEQ.js → deleteFile-TP6MKFUX.js} +10 -5
  120. package/{dialogCommands-RPBHOZB6.js → dialogCommands-ULWP5ASX.js} +35 -33
  121. package/{dialogNotifyCommand-ECKI5MMA.js → dialogNotifyCommand-JKYVSR6K.js} +7 -7
  122. package/{dialogSlice-5FQB2TNN.js → dialogSlice-ARQKXXTD.js} +18 -18
  123. package/{docCreateCommands-XJ2X57DW.js → docCreateCommands-ZJFHCZV4.js} +32 -30
  124. package/{docDeleteCommands-45WGFFEB.js → docDeleteCommands-LY5MF2BI.js} +33 -31
  125. package/{docReadCommands-LRRVDS46.js → docReadCommands-4X2DHCNZ.js} +32 -30
  126. package/{docStore-SUAVM24F.js → docStore-QWRVKIRI.js} +8 -8
  127. package/{docUpdateCommands-QUYX6BVR.js → docUpdateCommands-5TIT7DAJ.js} +32 -30
  128. package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
  129. package/{handleSendMessageAction-FDIWBQUB.js → handleSendMessageAction-TVR55KVT.js} +36 -36
  130. package/{hostCredentialCreate-CEXQHYT4.js → hostCredentialCreate-SIRXPUFR.js} +68 -67
  131. package/index.js +8 -8
  132. package/{localDialogRead-USDZXKIL.js → localDialogRead-BJJT3TF5.js} +1 -1
  133. package/{localRuntimeAdapter-O3JBRK6S.js → localRuntimeAdapter-VRB5EDDZ.js} +67 -66
  134. package/{machineCommands-I3YA7TNC.js → machineCommands-MG3BB6XM.js} +68 -67
  135. package/{machineWsRunDispatch-E5CIE2OJ.js → machineWsRunDispatch-3TOO3NCU.js} +68 -67
  136. package/{mcpLocalAuthorizeCommand-K5J2VMG6.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +6 -6
  137. package/{memberThunks-T7EAZE6A.js → memberThunks-IGYRMEQC.js} +9 -9
  138. package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
  139. package/package.json +1 -1
  140. package/{projectArchive-A7E65AZO.js → projectArchive-Q46BYZQ6.js} +21 -21
  141. package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
  142. package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
  143. package/{read-BRZHXUJ6.js → read-MPPXZHAO.js} +10 -5
  144. package/{readDocTool-N7RVFQEE.js → readDocTool-PKZ35PCR.js} +1 -1
  145. package/{readlineWorkspace-2O65NBFG.js → readlineWorkspace-RBH6PSE7.js} +613 -209
  146. package/{removeDialogAgentAction-GRT72HLK.js → removeDialogAgentAction-H6S7VLNA.js} +9 -9
  147. package/{runAgentClientLoop-NWCZIXCG.js → runAgentClientLoop-WZJ4HXOH.js} +44 -44
  148. package/{runtimeDoctorCommands-26HYHFTK.js → runtimeDoctorCommands-QGZSKNSE.js} +5 -5
  149. package/{secretCommands-XR72SHLK.js → secretCommands-BXAQEOES.js} +2 -2
  150. package/{setDialogExtraReferencesAction-CBG3X46B.js → setDialogExtraReferencesAction-CARUTAWS.js} +8 -8
  151. package/{setPrimaryDialogAgentAction-EWTDZOAX.js → setPrimaryDialogAgentAction-VRV56MLG.js} +9 -9
  152. package/{settingThunks-X4PT66J2.js → settingThunks-4FC4HXGN.js} +7 -7
  153. package/{spaceCommands-EVSNTGRS.js → spaceCommands-27Z5JAU3.js} +31 -29
  154. package/{streamAgentChatTurn-SYP3OEM5.js → streamAgentChatTurn-JKMBFM2O.js} +57 -53
  155. package/{switchDialogAgentAction-YHPZ7K6E.js → switchDialogAgentAction-O236K6HB.js} +7 -7
  156. package/{tableCommands-44GC4N6J.js → tableCommands-C3P2HHKK.js} +2 -2
  157. package/{tools-2AO2SK4L.js → tools-4RFLNHUW.js} +37 -37
  158. package/{tuiRestart-HBQDF4AE.js → tuiRestart-GF4DGAAN.js} +7 -7
  159. package/{tuiSummaryLlmCaller-Q2PNR63K.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
  160. package/{updateCommands-6SI7NWVC.js → updateCommands-BZ4YDHNM.js} +3 -3
  161. package/{updateDialogTitleAction-MWVMBIPZ.js → updateDialogTitleAction-F3ONQM3N.js} +20 -20
  162. package/{usageCommand-D44AOTMH.js → usageCommand-XVJ7ZUTM.js} +1 -1
  163. package/{usageRebuildCommand-IRIMKDI5.js → usageRebuildCommand-NK6S3D4J.js} +2 -2
  164. package/{windowsSelfUpdate-BJIJKKIS.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
  165. package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
  166. package/chunk-FGHEF6WI.js +0 -34
  167. package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
  168. package/{chunk-YHNUDTU4.js → chunk-VYRTLHIT.js} +3 -3
  169. package/{dialogUsageCommand-TBIA2QAF.js → dialogUsageCommand-IHAXS7DW.js} +3 -3
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-CUYFRVJF.js";
4
+ } from "./chunk-2HF6DINU.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-A55E2OCP.js";
7
+ } from "./chunk-26KL6533.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-U35UUM5K.js";
@@ -12,7 +12,7 @@ import {
12
12
  extractReasoningFromResponseOutput,
13
13
  extractTextFromResponseOutput,
14
14
  extractToolCallsFromResponseOutput
15
- } from "./chunk-W3HSD32M.js";
15
+ } from "./chunk-FXEPZKNJ.js";
16
16
  import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
@@ -0,0 +1,209 @@
1
+ // node_modules/async-mutex/index.mjs
2
+ var E_TIMEOUT = new Error("timeout while waiting for mutex to become available");
3
+ var E_ALREADY_LOCKED = new Error("mutex already locked");
4
+ var E_CANCELED = new Error("request for lock canceled");
5
+ var __awaiter$2 = function(thisArg, _arguments, P, generator) {
6
+ function adopt(value) {
7
+ return value instanceof P ? value : new P(function(resolve) {
8
+ resolve(value);
9
+ });
10
+ }
11
+ return new (P || (P = Promise))(function(resolve, reject) {
12
+ function fulfilled(value) {
13
+ try {
14
+ step(generator.next(value));
15
+ } catch (e) {
16
+ reject(e);
17
+ }
18
+ }
19
+ function rejected(value) {
20
+ try {
21
+ step(generator["throw"](value));
22
+ } catch (e) {
23
+ reject(e);
24
+ }
25
+ }
26
+ function step(result) {
27
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
28
+ }
29
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
30
+ });
31
+ };
32
+ var Semaphore = class {
33
+ constructor(_value, _cancelError = E_CANCELED) {
34
+ this._value = _value;
35
+ this._cancelError = _cancelError;
36
+ this._queue = [];
37
+ this._weightedWaiters = [];
38
+ }
39
+ acquire(weight = 1, priority = 0) {
40
+ if (weight <= 0)
41
+ throw new Error(`invalid weight ${weight}: must be positive`);
42
+ return new Promise((resolve, reject) => {
43
+ const task = { resolve, reject, weight, priority };
44
+ const i = findIndexFromEnd(this._queue, (other) => priority <= other.priority);
45
+ if (i === -1 && weight <= this._value) {
46
+ this._dispatchItem(task);
47
+ } else {
48
+ this._queue.splice(i + 1, 0, task);
49
+ }
50
+ });
51
+ }
52
+ runExclusive(callback_1) {
53
+ return __awaiter$2(this, arguments, void 0, function* (callback, weight = 1, priority = 0) {
54
+ const [value, release] = yield this.acquire(weight, priority);
55
+ try {
56
+ return yield callback(value);
57
+ } finally {
58
+ release();
59
+ }
60
+ });
61
+ }
62
+ waitForUnlock(weight = 1, priority = 0) {
63
+ if (weight <= 0)
64
+ throw new Error(`invalid weight ${weight}: must be positive`);
65
+ if (this._couldLockImmediately(weight, priority)) {
66
+ return Promise.resolve();
67
+ } else {
68
+ return new Promise((resolve) => {
69
+ if (!this._weightedWaiters[weight - 1])
70
+ this._weightedWaiters[weight - 1] = [];
71
+ insertSorted(this._weightedWaiters[weight - 1], { resolve, priority });
72
+ });
73
+ }
74
+ }
75
+ isLocked() {
76
+ return this._value <= 0;
77
+ }
78
+ getValue() {
79
+ return this._value;
80
+ }
81
+ setValue(value) {
82
+ this._value = value;
83
+ this._dispatchQueue();
84
+ }
85
+ release(weight = 1) {
86
+ if (weight <= 0)
87
+ throw new Error(`invalid weight ${weight}: must be positive`);
88
+ this._value += weight;
89
+ this._dispatchQueue();
90
+ }
91
+ cancel() {
92
+ this._queue.forEach((entry) => entry.reject(this._cancelError));
93
+ this._queue = [];
94
+ }
95
+ _dispatchQueue() {
96
+ this._drainUnlockWaiters();
97
+ while (this._queue.length > 0 && this._queue[0].weight <= this._value) {
98
+ this._dispatchItem(this._queue.shift());
99
+ this._drainUnlockWaiters();
100
+ }
101
+ }
102
+ _dispatchItem(item) {
103
+ const previousValue = this._value;
104
+ this._value -= item.weight;
105
+ item.resolve([previousValue, this._newReleaser(item.weight)]);
106
+ }
107
+ _newReleaser(weight) {
108
+ let called = false;
109
+ return () => {
110
+ if (called)
111
+ return;
112
+ called = true;
113
+ this.release(weight);
114
+ };
115
+ }
116
+ _drainUnlockWaiters() {
117
+ if (this._queue.length === 0) {
118
+ for (let weight = this._value; weight > 0; weight--) {
119
+ const waiters = this._weightedWaiters[weight - 1];
120
+ if (!waiters)
121
+ continue;
122
+ waiters.forEach((waiter) => waiter.resolve());
123
+ this._weightedWaiters[weight - 1] = [];
124
+ }
125
+ } else {
126
+ const queuedPriority = this._queue[0].priority;
127
+ for (let weight = this._value; weight > 0; weight--) {
128
+ const waiters = this._weightedWaiters[weight - 1];
129
+ if (!waiters)
130
+ continue;
131
+ const i = waiters.findIndex((waiter) => waiter.priority <= queuedPriority);
132
+ (i === -1 ? waiters : waiters.splice(0, i)).forEach((waiter) => waiter.resolve());
133
+ }
134
+ }
135
+ }
136
+ _couldLockImmediately(weight, priority) {
137
+ return (this._queue.length === 0 || this._queue[0].priority < priority) && weight <= this._value;
138
+ }
139
+ };
140
+ function insertSorted(a, v) {
141
+ const i = findIndexFromEnd(a, (other) => v.priority <= other.priority);
142
+ a.splice(i + 1, 0, v);
143
+ }
144
+ function findIndexFromEnd(a, predicate) {
145
+ for (let i = a.length - 1; i >= 0; i--) {
146
+ if (predicate(a[i])) {
147
+ return i;
148
+ }
149
+ }
150
+ return -1;
151
+ }
152
+ var __awaiter$1 = function(thisArg, _arguments, P, generator) {
153
+ function adopt(value) {
154
+ return value instanceof P ? value : new P(function(resolve) {
155
+ resolve(value);
156
+ });
157
+ }
158
+ return new (P || (P = Promise))(function(resolve, reject) {
159
+ function fulfilled(value) {
160
+ try {
161
+ step(generator.next(value));
162
+ } catch (e) {
163
+ reject(e);
164
+ }
165
+ }
166
+ function rejected(value) {
167
+ try {
168
+ step(generator["throw"](value));
169
+ } catch (e) {
170
+ reject(e);
171
+ }
172
+ }
173
+ function step(result) {
174
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
175
+ }
176
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
177
+ });
178
+ };
179
+ var Mutex = class {
180
+ constructor(cancelError) {
181
+ this._semaphore = new Semaphore(1, cancelError);
182
+ }
183
+ acquire() {
184
+ return __awaiter$1(this, arguments, void 0, function* (priority = 0) {
185
+ const [, releaser] = yield this._semaphore.acquire(1, priority);
186
+ return releaser;
187
+ });
188
+ }
189
+ runExclusive(callback, priority = 0) {
190
+ return this._semaphore.runExclusive(() => callback(), 1, priority);
191
+ }
192
+ isLocked() {
193
+ return this._semaphore.isLocked();
194
+ }
195
+ waitForUnlock(priority = 0) {
196
+ return this._semaphore.waitForUnlock(1, priority);
197
+ }
198
+ release() {
199
+ if (this._semaphore.isLocked())
200
+ this._semaphore.release();
201
+ }
202
+ cancel() {
203
+ return this._semaphore.cancel();
204
+ }
205
+ };
206
+
207
+ export {
208
+ Mutex
209
+ };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-KGOBJAWC.js";
4
+ } from "./chunk-NJDOID7N.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-ZKKJZBNO.js";
7
+ } from "./chunk-GUFTHWDO.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-PKMDYRAM.js";
10
+ } from "./chunk-UDQZ5JT7.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
13
  } from "./chunk-USGHJSGO.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-4O22PGNQ.js";
39
39
  import {
40
40
  t
41
- } from "./chunk-R7D5SRAZ.js";
41
+ } from "./chunk-5UYDG6HP.js";
42
42
  import {
43
43
  toErrorMessage
44
44
  } from "./chunk-HNMXYYJR.js";
@@ -37,6 +37,9 @@ var resolveFireworksKimiModel = (model) => {
37
37
  }
38
38
  return model ?? "";
39
39
  };
40
+ function hostedKimiLegacyThinkingOverride(provider, model, enableThinking, effort) {
41
+ return enableThinking === false && !effort && isPlatformKimiProviderModel(provider, model) ? { thinking: { type: "disabled" }, reasoning: { enabled: false } } : void 0;
42
+ }
40
43
 
41
44
  // packages/ai/llm/platformHostedRoutingTable.ts
42
45
  var PLATFORM_HOSTED_CLAUDE_SONNET_5_MODEL = "anthropic/claude-sonnet-5";
@@ -1751,6 +1754,9 @@ var platformHostedModels = [
1751
1754
  ]
1752
1755
  })
1753
1756
  ];
1757
+ function usesMimoThinkingWire(provider, model, endpoint) {
1758
+ return /xiaomimimo\.com/i.test(endpoint ?? "") || provider?.toLowerCase() === "mimo" || isPlatformMimoProviderModel(provider, model);
1759
+ }
1754
1760
 
1755
1761
  // packages/ai/llm/cloudflare.ts
1756
1762
  var getCloudflareWorkersAiChatCompletionsUrl = (accountId = (typeof process !== "undefined" ? process.env?.CLOUDFLARE_ACCOUNT_ID : void 0)?.trim()) => {
@@ -1776,8 +1782,10 @@ export {
1776
1782
  isNoloHostedProvider,
1777
1783
  isFireworksKimiModel,
1778
1784
  isDeepInfraKimiModel,
1785
+ isPlatformKimiProviderModel,
1779
1786
  isPlatformManagedProvider,
1780
1787
  resolveFireworksKimiModel,
1788
+ hostedKimiLegacyThinkingOverride,
1781
1789
  PLATFORM_HOSTED_CLAUDE_SONNET_5_MODEL,
1782
1790
  PLATFORM_HOSTED_CLAUDE_OPUS_5_MODEL,
1783
1791
  PLATFORM_HOSTED_CLAUDE_FABLE_5_MODEL,
@@ -1801,7 +1809,6 @@ export {
1801
1809
  PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE,
1802
1810
  isPlatformHostedOpenAIImageModel,
1803
1811
  isPlatformHostedImageModel,
1804
- isPlatformMimoProviderModel,
1805
1812
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
1806
1813
  PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
1807
1814
  PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE,
@@ -1810,6 +1817,7 @@ export {
1810
1817
  isPlatformHostedDeepseekModel,
1811
1818
  isPlatformHostedDeepSeekV4Model,
1812
1819
  platformHostedModels,
1820
+ usesMimoThinkingWire,
1813
1821
  getCloudflareWorkersAiChatCompletionsUrl,
1814
1822
  cloudflareModels,
1815
1823
  GMI_CHAT_COMPLETIONS_URL,
@@ -1,49 +1,121 @@
1
1
  import {
2
2
  resolveBuiltinCapability,
3
3
  resolveBuiltinSkillEntry
4
- } from "./chunk-75TXQ4GY.js";
4
+ } from "./chunk-ZMWDHPNG.js";
5
5
  import {
6
6
  asTrimmedNonEmptyStringArray
7
7
  } from "./chunk-I42VC5KR.js";
8
8
 
9
- // packages/core/agentSkillModes.ts
10
- var AGENT_SKILL_MODES = [
11
- "required",
12
- "recommended",
13
- "disabled"
9
+ // packages/agent-runtime/secretScrubber.ts
10
+ var SECRET_PATTERNS = [
11
+ // 1. PEM 私钥块(高危硬拦截)
12
+ {
13
+ kind: "PRIVATE_KEY",
14
+ placeholder: "[REDACTED:PRIVATE_KEY]",
15
+ regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\s\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
16
+ },
17
+ // 2. Anthropic API Key (sk-ant-...)
18
+ {
19
+ kind: "ANTHROPIC_KEY",
20
+ placeholder: "[REDACTED:ANTHROPIC_KEY]",
21
+ regex: /\bsk-ant-[a-zA-Z0-9_\-]{20,}\b/g
22
+ },
23
+ // 3. OpenAI / DeepSeek / 通用 API Key (sk-...)
24
+ {
25
+ kind: "API_KEY",
26
+ placeholder: "[REDACTED:API_KEY]",
27
+ regex: /\bsk-[a-zA-Z0-9_\-]{24,}\b/g
28
+ },
29
+ // 3b. BigModel / 智谱(GLM)API Key:32 位 hex + "." + 16 位字母数字
30
+ // (2026-11 实证:这类 key 没有任何可辨识前缀,此前漏在清洗与入路隔离之外,
31
+ // 用户贴进对话后明文直接进了 prompt / 历史 / 工具日志。)
32
+ {
33
+ kind: "BIGMODEL_KEY",
34
+ placeholder: "[REDACTED:BIGMODEL_KEY]",
35
+ regex: /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/g
36
+ },
37
+ // 4. GitHub 访问令牌 (ghp_..., gho_..., github_pat_...)
38
+ {
39
+ kind: "GITHUB_TOKEN",
40
+ placeholder: "[REDACTED:GITHUB_TOKEN]",
41
+ regex: /\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\b/g
42
+ },
43
+ // 5. Bearer Token (JWT / Authorization Bearer)
44
+ {
45
+ kind: "BEARER_TOKEN",
46
+ placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
47
+ regex: /\bBearer\s+[a-zA-Z0-9_\-\.]{25,}\b/gi
48
+ },
49
+ // 6. 常见环境变量或配置中的密码赋值 (PASSWORD=..., PASSWD=...)
50
+ {
51
+ kind: "PASSWORD",
52
+ placeholder: "$1=[REDACTED:PASSWORD]",
53
+ regex: /\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\s*=\s*['"]?([^\s'"]{4,})['"]?/gi
54
+ }
14
55
  ];
15
- var isAgentSkillMode = (value) => typeof value === "string" && AGENT_SKILL_MODES.includes(value);
16
- var collectInvalidAgentSkillModes = (skills) => {
17
- if (!skills || typeof skills !== "object" || Array.isArray(skills)) return [];
18
- const out = [];
19
- for (const [slug, value] of Object.entries(skills)) {
20
- if (value === null) continue;
21
- if (!isAgentSkillMode(value)) out.push({ slug, value });
56
+ var QUICK_PROBE_SUBSTRINGS = [
57
+ "sk-",
58
+ "ghp_",
59
+ "gho_",
60
+ "ghu_",
61
+ "ghs_",
62
+ "ghr_",
63
+ "github_pat_",
64
+ "PRIVATE KEY",
65
+ "Bearer ",
66
+ "bearer ",
67
+ "PASSWORD",
68
+ "password",
69
+ "PASSWD",
70
+ "SECRET_KEY"
71
+ ];
72
+ var UNPREFIXED_PROBE_REGEX = /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/;
73
+ function hasPotentialSecrets(text) {
74
+ if (typeof text !== "string" || text.length === 0) return false;
75
+ if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe))) return true;
76
+ return UNPREFIXED_PROBE_REGEX.test(text);
77
+ }
78
+ function scrubSecrets(text) {
79
+ if (typeof text !== "string" || text.length === 0) {
80
+ return { cleaned: text, redactedCount: 0, matchedKinds: [] };
22
81
  }
23
- return out;
24
- };
25
- var describeAgentSkillModeValue = (value) => {
26
- let text;
27
- if (typeof value === "string") {
28
- text = JSON.stringify(value.length > 40 ? `${value.slice(0, 40)}\u2026` : value);
29
- } else if (value === void 0) {
30
- text = "undefined";
31
- } else {
32
- try {
33
- const serialized = JSON.stringify(value);
34
- text = typeof serialized === "string" ? serialized : String(value);
35
- } catch {
36
- text = typeof value;
82
+ if (!hasPotentialSecrets(text)) {
83
+ return { cleaned: text, redactedCount: 0, matchedKinds: [] };
84
+ }
85
+ let cleaned = text;
86
+ let redactedCount = 0;
87
+ const matchedKinds = [];
88
+ for (const pattern of SECRET_PATTERNS) {
89
+ pattern.regex.lastIndex = 0;
90
+ const matches = cleaned.match(pattern.regex);
91
+ if (matches && matches.length > 0) {
92
+ redactedCount += matches.length;
93
+ if (!matchedKinds.includes(pattern.kind)) {
94
+ matchedKinds.push(pattern.kind);
95
+ }
96
+ cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
37
97
  }
38
98
  }
39
- return text.length > 60 ? `${text.slice(0, 60)}\u2026` : text;
40
- };
41
- var formatInvalidAgentSkillModeMessage = (invalid, allowed = AGENT_SKILL_MODES) => `Invalid agent skill mode for "${invalid.slug}": ${describeAgentSkillModeValue(invalid.value)}. Allowed values: ${allowed.join(", ")}.`;
42
- var isAgentSkillModesFieldShapeValid = (skills) => {
43
- if (skills === null || skills === void 0) return true;
44
- return typeof skills === "object" && !Array.isArray(skills);
45
- };
46
- var formatInvalidAgentSkillModesFieldMessage = (allowed = AGENT_SKILL_MODES) => `Invalid agent skills field: expected an object mapping slug \u2192 mode (${allowed.join(" | ")}).`;
99
+ return { cleaned, redactedCount, matchedKinds };
100
+ }
101
+ function scrubObjectSecrets(val) {
102
+ if (val === null || val === void 0) return val;
103
+ if (typeof val === "string") {
104
+ return scrubSecrets(val).cleaned;
105
+ }
106
+ if (Array.isArray(val)) {
107
+ return val.map((item) => scrubObjectSecrets(item));
108
+ }
109
+ if (typeof val === "object") {
110
+ if (val instanceof Date || val instanceof RegExp) return val;
111
+ const result = {};
112
+ for (const [k, v] of Object.entries(val)) {
113
+ result[k] = scrubObjectSecrets(v);
114
+ }
115
+ return result;
116
+ }
117
+ return val;
118
+ }
47
119
 
48
120
  // packages/agent-runtime/toolOutputSanitizer.ts
49
121
  var SANITIZE_REPLACEMENT_CHAR = "\uFFFD";
@@ -183,117 +255,6 @@ function sanitizeToolOutputContent(content) {
183
255
  return typeof content === "string" ? sanitizeToolOutputText(content) : content;
184
256
  }
185
257
 
186
- // packages/agent-runtime/secretScrubber.ts
187
- var SECRET_PATTERNS = [
188
- // 1. PEM 私钥块(高危硬拦截)
189
- {
190
- kind: "PRIVATE_KEY",
191
- placeholder: "[REDACTED:PRIVATE_KEY]",
192
- regex: /-----BEGIN (?:[A-Z0-9 ]+)?PRIVATE KEY-----[\s\S]+?-----END (?:[A-Z0-9 ]+)?PRIVATE KEY-----/g
193
- },
194
- // 2. Anthropic API Key (sk-ant-...)
195
- {
196
- kind: "ANTHROPIC_KEY",
197
- placeholder: "[REDACTED:ANTHROPIC_KEY]",
198
- regex: /\bsk-ant-[a-zA-Z0-9_\-]{20,}\b/g
199
- },
200
- // 3. OpenAI / DeepSeek / 通用 API Key (sk-...)
201
- {
202
- kind: "API_KEY",
203
- placeholder: "[REDACTED:API_KEY]",
204
- regex: /\bsk-[a-zA-Z0-9_\-]{24,}\b/g
205
- },
206
- // 3b. BigModel / 智谱(GLM)API Key:32 位 hex + "." + 16 位字母数字
207
- // (2026-11 实证:这类 key 没有任何可辨识前缀,此前漏在清洗与入路隔离之外,
208
- // 用户贴进对话后明文直接进了 prompt / 历史 / 工具日志。)
209
- {
210
- kind: "BIGMODEL_KEY",
211
- placeholder: "[REDACTED:BIGMODEL_KEY]",
212
- regex: /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/g
213
- },
214
- // 4. GitHub 访问令牌 (ghp_..., gho_..., github_pat_...)
215
- {
216
- kind: "GITHUB_TOKEN",
217
- placeholder: "[REDACTED:GITHUB_TOKEN]",
218
- regex: /\b(?:gh[pousr]_[a-zA-Z0-9]{30,}|github_pat_[a-zA-Z0-9_]{40,})\b/g
219
- },
220
- // 5. Bearer Token (JWT / Authorization Bearer)
221
- {
222
- kind: "BEARER_TOKEN",
223
- placeholder: "Bearer [REDACTED:BEARER_TOKEN]",
224
- regex: /\bBearer\s+[a-zA-Z0-9_\-\.]{25,}\b/gi
225
- },
226
- // 6. 常见环境变量或配置中的密码赋值 (PASSWORD=..., PASSWD=...)
227
- {
228
- kind: "PASSWORD",
229
- placeholder: "$1=[REDACTED:PASSWORD]",
230
- regex: /\b((?:DB_|DATABASE_|ADMIN_|ROOT_|MYSQL_|POSTGRES_)?(?:PASSWORD|PASSWD|SECRET_KEY))\s*=\s*['"]?([^\s'"]{4,})['"]?/gi
231
- }
232
- ];
233
- var QUICK_PROBE_SUBSTRINGS = [
234
- "sk-",
235
- "ghp_",
236
- "gho_",
237
- "ghu_",
238
- "ghs_",
239
- "ghr_",
240
- "github_pat_",
241
- "PRIVATE KEY",
242
- "Bearer ",
243
- "bearer ",
244
- "PASSWORD",
245
- "password",
246
- "PASSWD",
247
- "SECRET_KEY"
248
- ];
249
- var UNPREFIXED_PROBE_REGEX = /\b[0-9a-fA-F]{32}\.[A-Za-z0-9]{16}\b/;
250
- function hasPotentialSecrets(text) {
251
- if (typeof text !== "string" || text.length === 0) return false;
252
- if (QUICK_PROBE_SUBSTRINGS.some((probe) => text.includes(probe))) return true;
253
- return UNPREFIXED_PROBE_REGEX.test(text);
254
- }
255
- function scrubSecrets(text) {
256
- if (typeof text !== "string" || text.length === 0) {
257
- return { cleaned: text, redactedCount: 0, matchedKinds: [] };
258
- }
259
- if (!hasPotentialSecrets(text)) {
260
- return { cleaned: text, redactedCount: 0, matchedKinds: [] };
261
- }
262
- let cleaned = text;
263
- let redactedCount = 0;
264
- const matchedKinds = [];
265
- for (const pattern of SECRET_PATTERNS) {
266
- pattern.regex.lastIndex = 0;
267
- const matches = cleaned.match(pattern.regex);
268
- if (matches && matches.length > 0) {
269
- redactedCount += matches.length;
270
- if (!matchedKinds.includes(pattern.kind)) {
271
- matchedKinds.push(pattern.kind);
272
- }
273
- cleaned = cleaned.replace(pattern.regex, pattern.placeholder);
274
- }
275
- }
276
- return { cleaned, redactedCount, matchedKinds };
277
- }
278
- function scrubObjectSecrets(val) {
279
- if (val === null || val === void 0) return val;
280
- if (typeof val === "string") {
281
- return scrubSecrets(val).cleaned;
282
- }
283
- if (Array.isArray(val)) {
284
- return val.map((item) => scrubObjectSecrets(item));
285
- }
286
- if (typeof val === "object") {
287
- if (val instanceof Date || val instanceof RegExp) return val;
288
- const result = {};
289
- for (const [k, v] of Object.entries(val)) {
290
- result[k] = scrubObjectSecrets(v);
291
- }
292
- return result;
293
- }
294
- return val;
295
- }
296
-
297
258
  // packages/ai/agent/toolOutputPolicy.ts
298
259
  var PROJECT_INSTRUCTION_MAX_BYTES = 24 * 1024;
299
260
  var PROJECT_INSTRUCTION_MAX_CHARS = PROJECT_INSTRUCTION_MAX_BYTES + 2048;
@@ -354,6 +315,45 @@ function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool outp
354
315
  return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
355
316
  }
356
317
 
318
+ // packages/core/agentSkillModes.ts
319
+ var AGENT_SKILL_MODES = [
320
+ "required",
321
+ "recommended",
322
+ "disabled"
323
+ ];
324
+ var isAgentSkillMode = (value) => typeof value === "string" && AGENT_SKILL_MODES.includes(value);
325
+ var collectInvalidAgentSkillModes = (skills) => {
326
+ if (!skills || typeof skills !== "object" || Array.isArray(skills)) return [];
327
+ const out = [];
328
+ for (const [slug, value] of Object.entries(skills)) {
329
+ if (value === null) continue;
330
+ if (!isAgentSkillMode(value)) out.push({ slug, value });
331
+ }
332
+ return out;
333
+ };
334
+ var describeAgentSkillModeValue = (value) => {
335
+ let text;
336
+ if (typeof value === "string") {
337
+ text = JSON.stringify(value.length > 40 ? `${value.slice(0, 40)}\u2026` : value);
338
+ } else if (value === void 0) {
339
+ text = "undefined";
340
+ } else {
341
+ try {
342
+ const serialized = JSON.stringify(value);
343
+ text = typeof serialized === "string" ? serialized : String(value);
344
+ } catch {
345
+ text = typeof value;
346
+ }
347
+ }
348
+ return text.length > 60 ? `${text.slice(0, 60)}\u2026` : text;
349
+ };
350
+ var formatInvalidAgentSkillModeMessage = (invalid, allowed = AGENT_SKILL_MODES) => `Invalid agent skill mode for "${invalid.slug}": ${describeAgentSkillModeValue(invalid.value)}. Allowed values: ${allowed.join(", ")}.`;
351
+ var isAgentSkillModesFieldShapeValid = (skills) => {
352
+ if (skills === null || skills === void 0) return true;
353
+ return typeof skills === "object" && !Array.isArray(skills);
354
+ };
355
+ var formatInvalidAgentSkillModesFieldMessage = (allowed = AGENT_SKILL_MODES) => `Invalid agent skills field: expected an object mapping slug \u2192 mode (${allowed.join(" | ")}).`;
356
+
357
357
  // packages/ai/tools/agentSkillConfig.ts
358
358
  var MODES = AGENT_SKILL_MODES;
359
359
  var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
@@ -438,17 +438,12 @@ var defaultSkillTitleLookup = (slug) => {
438
438
  var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
439
439
 
440
440
  export {
441
- collectInvalidAgentSkillModes,
442
- describeAgentSkillModeValue,
443
- formatInvalidAgentSkillModeMessage,
444
- isAgentSkillModesFieldShapeValid,
445
- formatInvalidAgentSkillModesFieldMessage,
446
- sanitizeToolOutputText,
447
- sanitizeToolOutputContent,
448
441
  SECRET_PATTERNS,
449
442
  hasPotentialSecrets,
450
443
  scrubSecrets,
451
444
  scrubObjectSecrets,
445
+ sanitizeToolOutputText,
446
+ sanitizeToolOutputContent,
452
447
  PROJECT_INSTRUCTION_MAX_BYTES,
453
448
  PROJECT_INSTRUCTION_MAX_CHARS,
454
449
  isCompleteInstructionOutput,
@@ -458,6 +453,11 @@ export {
458
453
  resolveHistoricalToolContentCap,
459
454
  projectToolMessageContent,
460
455
  clipToolText,
456
+ collectInvalidAgentSkillModes,
457
+ describeAgentSkillModeValue,
458
+ formatInvalidAgentSkillModeMessage,
459
+ isAgentSkillModesFieldShapeValid,
460
+ formatInvalidAgentSkillModesFieldMessage,
461
461
  resolveAgentSkillConfig,
462
462
  collectAgentSkillConfigIssues,
463
463
  resolveAgentRequiredPackIds,