nolo-cli 0.103.0-alpha.1 → 0.103.0

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 (209) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-3UCNJCQA.js → _executeModel-7J7Q3WXY.js} +75 -68
  3. package/action-C4KMTCJF.js +20 -0
  4. package/{addContentAction-O7R66HEX.js → addContentAction-7TNIOVZI.js} +12 -11
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-O47J3MVW.js} +18 -19
  6. package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-YPJHK7JA.js} +117 -42
  7. package/{agentEmailCommands-WLYF3JRS.js → agentEmailCommands-AWEXOHWM.js} +98 -88
  8. package/agentListCommands-2DTLLJZD.js +742 -0
  9. package/{agentMachineCommands-HNGAR5GI.js → agentMachineCommands-PGEEQ4JJ.js} +48 -43
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-XPJYZSCE.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-DZVLCPLJ.js +138 -0
  13. package/agentRunCommand-AX5CYQ46.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-PITRQ2EU.js} +48 -39
  16. package/{agentSlice-SICQBMCM.js → agentSlice-4TLSG6FB.js} +14 -13
  17. package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-UC2JW5FJ.js} +46 -41
  18. package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-OL2RKVJ3.js} +46 -41
  19. package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-B3PLC62M.js} +46 -41
  20. package/{appGetCommands-SFAPP5PB.js → appGetCommands-REESA2XQ.js} +46 -41
  21. package/{appListCommands-EKUBDRUO.js → appListCommands-UF6XX7HR.js} +46 -41
  22. package/{authCommand-F4EFRRX6.js → authCommand-NQPMGYHP.js} +118 -24
  23. package/{authCommands-RGOGCPP6.js → authCommands-LWLOZETU.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-GFY77VRN.js} +10 -8
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  27. package/{chunk-UKZDAFYT.js → chunk-22RVE2PC.js} +6 -10
  28. package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  29. package/{chunk-HVURBGF3.js → chunk-2H6SEVDS.js} +6 -6
  30. package/{chunk-TOP2VXOR.js → chunk-2K4TM6AW.js} +5 -5
  31. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  32. package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
  33. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  34. package/chunk-4A2R7KHG.js +13545 -0
  35. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  36. package/{chunk-JRQFUXY7.js → chunk-4G4C5SXT.js} +99 -22
  37. package/{chunk-DHDMC6FO.js → chunk-4HTMUQIZ.js} +14 -9
  38. package/{chunk-B3TVQ6PI.js → chunk-4IVA6UUE.js} +20 -11
  39. package/chunk-4LCOCOR5.js +50 -0
  40. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  41. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  42. package/{chunk-H62HCIUP.js → chunk-56HJ2LAA.js} +35 -22
  43. package/{chunk-V4MJDUSR.js → chunk-5EPHWMP5.js} +2 -2
  44. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  45. package/{chunk-3WLK2JQ5.js → chunk-5IWONK6X.js} +68 -46
  46. package/chunk-5J3PYNUP.js +255 -0
  47. package/chunk-5MMAK75Q.js +15 -0
  48. package/{chunk-LW4VFPAY.js → chunk-5ZDLVKNG.js} +873 -228
  49. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  50. package/{chunk-AEOE4Z6Q.js → chunk-6UEJDFF7.js} +39 -15
  51. package/{chunk-JPGCXHNM.js → chunk-7JWCVINR.js} +1 -1
  52. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  53. package/{chunk-IIVGDG4I.js → chunk-7KWFIKKK.js} +13 -7
  54. package/chunk-A4SQRTZ6.js +15 -0
  55. package/chunk-AGIM7IMJ.js +147 -0
  56. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  57. package/{chunk-L5UXH3B2.js → chunk-B455PEFD.js} +27 -8
  58. package/{chunk-XS5SWEDQ.js → chunk-BELZY72F.js} +1 -1
  59. package/chunk-BMQ2MJUK.js +153 -0
  60. package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
  61. package/chunk-CHOZJMJS.js +78 -0
  62. package/{chunk-3BMYXEUW.js → chunk-CUF4MYKI.js} +1 -1
  63. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  64. package/{chunk-WV42OMV7.js → chunk-D2GQE6AF.js} +8 -8
  65. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  66. package/chunk-DZ7R5V3Y.js +164 -0
  67. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  68. package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
  69. package/{chunk-ABQYVJBJ.js → chunk-EV235ILT.js} +5 -5
  70. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  71. package/{chunk-AGVEIAQA.js → chunk-F442UK5V.js} +29 -78
  72. package/{chunk-HJUYAD4A.js → chunk-FBTNYNAL.js} +5 -5
  73. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  74. package/{chunk-ETI2NYVF.js → chunk-GCTKWVLU.js} +4 -4
  75. package/chunk-GMZLP5DV.js +82 -0
  76. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  77. package/{chunk-6VFARHZW.js → chunk-H7TQORR4.js} +994 -1079
  78. package/{chunk-5H7KJX7J.js → chunk-HD3S2F7U.js} +5 -5
  79. package/chunk-HDJRLWTG.js +8002 -0
  80. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  81. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  82. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  83. package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
  84. package/{chunk-4OEFYTWL.js → chunk-IRZTHHNM.js} +67 -48
  85. package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
  86. package/{chunk-OZGZPSEG.js → chunk-KGRP4VOK.js} +47 -67
  87. package/{chunk-DNCEALKX.js → chunk-LB5A6JTU.js} +22 -29
  88. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  89. package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
  90. package/{chunk-Z77CRGTW.js → chunk-MSFZ7FMO.js} +1 -1
  91. package/chunk-NKWIS6G2.js +442 -0
  92. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  93. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  94. package/chunk-NWENLDMM.js +42 -0
  95. package/chunk-O7SVKKLY.js +875 -0
  96. package/chunk-OCZKATRC.js +129 -0
  97. package/{chunk-PQFHGD77.js → chunk-OM2RUOEU.js} +161 -14
  98. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  99. package/{chunk-TQBHNYVR.js → chunk-PLRFCQ7C.js} +567 -519
  100. package/{chunk-6D6VBVEW.js → chunk-Q7O72MF5.js} +80 -14
  101. package/{chunk-J4MOO56S.js → chunk-RILRSUGC.js} +10 -2
  102. package/{chunk-RSONHHPE.js → chunk-RNUDNZJW.js} +10 -10
  103. package/{chunk-3N3W7KBB.js → chunk-RZJAZVCF.js} +11 -9
  104. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  105. package/{chunk-GEPUP7OO.js → chunk-TSXNDTXL.js} +3 -3
  106. package/chunk-TY3TIUJK.js +89 -0
  107. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  108. package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
  109. package/{chunk-YYLHWIW6.js → chunk-UKZX3NHN.js} +1 -1
  110. package/{chunk-BP4XNZRM.js → chunk-UNAOTLKO.js} +4 -4
  111. package/{chunk-CUQEXCAU.js → chunk-UQ5P2WHS.js} +29 -9
  112. package/{chunk-NA35QHCF.js → chunk-V6YASAZR.js} +1 -1
  113. package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
  114. package/chunk-VIWDGTDA.js +8 -0
  115. package/chunk-VJVNU77E.js +83 -0
  116. package/{chunk-ZCYXJSTU.js → chunk-VL3H5ZU3.js} +66 -94
  117. package/{chunk-Q554LLSI.js → chunk-VLGL7FOL.js} +1 -1
  118. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  119. package/{chunk-4EG4QFTK.js → chunk-WI6TUGLJ.js} +19 -17
  120. package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
  121. package/{chunk-OEVAY4J6.js → chunk-XMUZHRSB.js} +18 -20
  122. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  123. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  124. package/{chunk-7S4YWN7P.js → chunk-YDO5ERB4.js} +4 -4
  125. package/chunk-YK5MHOWM.js +915 -0
  126. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  127. package/chunk-YV25TM3R.js +780 -0
  128. package/{chunk-IONPPCL5.js → chunk-YZZREBID.js} +86 -16
  129. package/{chunk-DNUUJ45N.js → chunk-Z3WSAK6A.js} +23 -28
  130. package/chunk-ZRAU6T47.js +56 -0
  131. package/commandRegistry-VQPFWVDH.js +833 -0
  132. package/{contentThunks-S4S7QPSO.js → contentThunks-A26ME6OJ.js} +37 -35
  133. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  134. package/{createAgentAutomationAction-ODGL2YGP.js → createAgentAutomationAction-BSAMZJ5W.js} +39 -37
  135. package/createDialogAction-CMCQXYHD.js +69 -0
  136. package/{createPageAction-FBV3OWX7.js → createPageAction-ANGKJTK2.js} +46 -43
  137. package/{chunk-F2RNI7ZR.js → cursorProvider-YGGNMVWX.js} +2496 -9897
  138. package/{dbSlice-XVWBAGYN.js → dbSlice-QOLNF5GN.js} +11 -10
  139. package/{deleteFile-YG6QMJLU.js → deleteFile-KESP65GC.js} +7 -6
  140. package/{dialogCommands-5J56DFWN.js → dialogCommands-AMPAWLX4.js} +49 -45
  141. package/{dialogSlice-LEO27SQG.js → dialogSlice-DGWDEBYC.js} +41 -34
  142. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  143. package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-7NMIYL5D.js} +48 -43
  144. package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-BD4OM5PV.js} +49 -44
  145. package/{docReadCommands-HOSVSBDJ.js → docReadCommands-5IOVAKU2.js} +47 -42
  146. package/{docStore-MNX5MHA5.js → docStore-TP4QDER4.js} +16 -12
  147. package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-ZTKJ6UPC.js} +48 -43
  148. package/{fetchMessages-EIU7UFFK.js → fetchMessages-5L7OVM5Y.js} +5 -5
  149. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
  150. package/{handleSendMessageAction-YB6KQFJS.js → handleSendMessageAction-N4WKFRSQ.js} +111 -87
  151. package/index.js +87 -884
  152. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  153. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-O5A26FDK.js} +2 -2
  154. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  155. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  156. package/{machineCommands-7GVQCUAK.js → machineCommands-47WKGY5Z.js} +92 -82
  157. package/machineWsRunDispatch-CYW5FJ52.js +154 -0
  158. package/{memberThunks-QGFLFVCI.js → memberThunks-25K6DDRA.js} +20 -18
  159. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  160. package/oauthTokenStore-ITEB663N.js +23 -0
  161. package/package.json +1 -1
  162. package/pdf-U6KSUEZZ.js +26435 -0
  163. package/processSpawn-SOAV3FEV.js +11 -0
  164. package/profileConfig-ZGOFORWV.js +43 -0
  165. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
  166. package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
  167. package/{read-COE3ZYR6.js → read-PJIT2YEJ.js} +7 -6
  168. package/{readDocTool-5USN4A6V.js → readDocTool-DRSXHGNL.js} +5 -3
  169. package/{readlineWorkspace-WA7JNI6J.js → readlineWorkspace-CK7GOVOC.js} +2698 -2055
  170. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-VIWJL6MX.js} +21 -25
  171. package/{runAgentClientLoop-JGFQ6KIR.js → runAgentClientLoop-BGHGP5AR.js} +76 -70
  172. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  173. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  174. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-A7VA3NFM.js} +15 -13
  175. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-B4P7YQX2.js} +22 -26
  176. package/{chunk-AFUORTY4.js → settingThunks-KOYSAT65.js} +226 -940
  177. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  178. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  179. package/{spaceCommands-NKJVJCQQ.js → spaceCommands-QJCYG27F.js} +51 -46
  180. package/{streamAgentChatTurn-XLFZ66UC.js → streamAgentChatTurn-ANE7OTCZ.js} +214 -108
  181. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-3VYWHZKH.js} +18 -19
  182. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  183. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
  184. package/tools-WPOVVP7M.js +116 -0
  185. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-QCHCULPM.js} +25 -22
  186. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  187. package/{updateDialogTitleAction-6MBTD4UE.js → updateDialogTitleAction-C4GRCXL4.js} +82 -44
  188. package/action-YVYQEAAV.js +0 -31
  189. package/agentListCommands-JP7S7PT2.js +0 -469
  190. package/agentRecordCommands-SXFPW3DL.js +0 -128
  191. package/agentRunCommand-JIQ4HY4D.js +0 -155
  192. package/browser-image-compression-MFDTD7K6.js +0 -1763
  193. package/chatQueueReduxAdapter-HHMUDNXL.js +0 -186
  194. package/chunk-CQ3WA2NE.js +0 -299
  195. package/chunk-M76ECQRD.js +0 -13658
  196. package/chunk-MEYIRKDN.js +0 -8967
  197. package/chunk-Q5FJJ6XI.js +0 -103
  198. package/chunk-S7Z2HMCN.js +0 -25
  199. package/chunk-XVZ22N6C.js +0 -20782
  200. package/chunk-Y5GCAMGP.js +0 -9
  201. package/chunk-YPREESF4.js +0 -225
  202. package/createDialogAction-GFKRXTK4.js +0 -65
  203. package/machineWsRunDispatch-XA7TD7Z7.js +0 -144
  204. package/settingSlice-ZQZVUPKK.js +0 -204
  205. package/syncMapping-N6RGXGBW.js +0 -437
  206. package/tools-NF5AB34X.js +0 -110
  207. package/{chunk-VMFTFOWF.js → chunk-ODAPITXL.js} +7 -7
  208. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  209. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -0,0 +1,153 @@
1
+ import {
2
+ isRecord
3
+ } from "./chunk-KUG52IAP.js";
4
+
5
+ // packages/core/chat/validationUrl.ts
6
+ function safeUrl(raw) {
7
+ if (typeof raw !== "string") return void 0;
8
+ const trimmed = raw.trim();
9
+ if (!/^https?:\/\//i.test(trimmed)) return void 0;
10
+ try {
11
+ const parsed = new URL(trimmed);
12
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
13
+ return void 0;
14
+ }
15
+ return parsed.href;
16
+ } catch {
17
+ return void 0;
18
+ }
19
+ }
20
+ function scanValidationDetails(details) {
21
+ if (!Array.isArray(details)) return {};
22
+ let url;
23
+ let text;
24
+ let learnMoreUrl;
25
+ for (const detail of details) {
26
+ if (url && learnMoreUrl) break;
27
+ if (!isRecord(detail)) continue;
28
+ const metadata = isRecord(detail.metadata) ? detail.metadata : void 0;
29
+ if (metadata) {
30
+ url = url ?? safeUrl(metadata.validation_url);
31
+ text = text ?? (typeof metadata.validation_url_link_text === "string" ? metadata.validation_url_link_text : void 0);
32
+ learnMoreUrl = learnMoreUrl ?? safeUrl(metadata.validation_learn_more_url);
33
+ }
34
+ const links = Array.isArray(detail.links) ? detail.links : [];
35
+ for (const link of links) {
36
+ if (!isRecord(link)) continue;
37
+ const linkUrl = safeUrl(link.url);
38
+ if (!linkUrl) continue;
39
+ const desc = typeof link.description === "string" ? link.description : "";
40
+ if (!url && /verify|continue/i.test(desc)) {
41
+ url = linkUrl;
42
+ text = text ?? desc;
43
+ } else if (!learnMoreUrl && /learn more/i.test(desc)) {
44
+ learnMoreUrl = linkUrl;
45
+ }
46
+ }
47
+ }
48
+ return { url, text, learnMoreUrl };
49
+ }
50
+ function unescapeJsonString(text) {
51
+ return text.replace(
52
+ /\\(["\\/nrtbf]|u[0-9a-fA-F]{4})/g,
53
+ (_match, esc) => {
54
+ switch (esc[0]) {
55
+ case "n":
56
+ return "\n";
57
+ case "r":
58
+ return "\r";
59
+ case "t":
60
+ return " ";
61
+ case "b":
62
+ return "\b";
63
+ case "f":
64
+ return "\f";
65
+ case "u":
66
+ return String.fromCharCode(parseInt(esc.slice(1), 16));
67
+ default:
68
+ return esc;
69
+ }
70
+ }
71
+ );
72
+ }
73
+ function sliceBalancedJsonObject(text) {
74
+ const start = text.indexOf("{");
75
+ if (start < 0) return void 0;
76
+ let depth = 0;
77
+ let inString = false;
78
+ let escaped = false;
79
+ for (let i = start; i < text.length; i += 1) {
80
+ const ch = text[i];
81
+ if (inString) {
82
+ if (escaped) escaped = false;
83
+ else if (ch === "\\") escaped = true;
84
+ else if (ch === '"') inString = false;
85
+ continue;
86
+ }
87
+ if (ch === '"') inString = true;
88
+ else if (ch === "{") depth += 1;
89
+ else if (ch === "}") {
90
+ depth -= 1;
91
+ if (depth === 0) return text.slice(start, i + 1);
92
+ }
93
+ }
94
+ return void 0;
95
+ }
96
+ function parseBalancedJson(text) {
97
+ const slice = sliceBalancedJsonObject(text);
98
+ if (!slice) return void 0;
99
+ try {
100
+ return JSON.parse(slice);
101
+ } catch {
102
+ return void 0;
103
+ }
104
+ }
105
+ function findValidationInParsed(parsed, depth = 0) {
106
+ if (depth > 3 || !isRecord(parsed)) return {};
107
+ const err = isRecord(parsed.error) ? parsed.error : parsed;
108
+ const fromDetails = scanValidationDetails(isRecord(err) ? err.details : void 0);
109
+ if (fromDetails.url) return fromDetails;
110
+ const nested = isRecord(err) ? err.message : void 0;
111
+ if (typeof nested === "string" && nested.trim().startsWith("{")) {
112
+ try {
113
+ const reparsed = findValidationInParsed(JSON.parse(nested), depth + 1);
114
+ if (reparsed.url) return reparsed;
115
+ } catch {
116
+ }
117
+ }
118
+ return {};
119
+ }
120
+ function stripTerminalControlChars(raw) {
121
+ return raw.replace(/[\u0000-\u001f\u007f]/g, "");
122
+ }
123
+ function regexValidationFallback(text) {
124
+ const urlMatch = text.match(
125
+ /validation_url[^h]{0,10}(https?:\/\/[^\s"\\]+)/i
126
+ );
127
+ if (!urlMatch) return {};
128
+ const textMatch = text.match(
129
+ /validation_url_link_text[^A-Za-z]{0,10}([^"\\\n]{1,60})/i
130
+ );
131
+ return {
132
+ // safeUrl first (normalizes C0 into %XX); fall back to stripping controls
133
+ // so a truncated-but-real link is still emitted rather than dropped.
134
+ url: safeUrl(urlMatch[1]) ?? stripTerminalControlChars(urlMatch[1]),
135
+ text: textMatch?.[1] ? stripTerminalControlChars(textMatch[1].trim()) || void 0 : void 0
136
+ };
137
+ }
138
+ function extractGoogleValidationLink(errorText) {
139
+ for (const candidate of [
140
+ parseBalancedJson(errorText),
141
+ parseBalancedJson(unescapeJsonString(errorText))
142
+ ]) {
143
+ if (candidate === void 0) continue;
144
+ const found = findValidationInParsed(candidate);
145
+ if (found.url) return found;
146
+ }
147
+ return regexValidationFallback(errorText);
148
+ }
149
+
150
+ export {
151
+ scanValidationDetails,
152
+ extractGoogleValidationLink
153
+ };
@@ -21,6 +21,8 @@ var createEmptyDialogRuntimeState = () => ({
21
21
  activeControllers: {},
22
22
  pendingRawData: {},
23
23
  loopStopReason: null,
24
+ turnPhase: null,
25
+ turnPhaseTurnId: null,
24
26
  pendingUserInputQueue: []
25
27
  });
26
28
  var activeDialogKey = null;
@@ -67,6 +69,8 @@ function resetDialogRuntimeSessionState(dialogKey) {
67
69
  const runtime = ensureDialogRuntimeState(dialogKey);
68
70
  runtime.tokens = createEmptyTokenStats();
69
71
  runtime.loopStopReason = null;
72
+ runtime.turnPhase = null;
73
+ runtime.turnPhaseTurnId = null;
70
74
  runtime.pendingUserInputQueue = [];
71
75
  notify();
72
76
  }
@@ -114,6 +118,26 @@ function setLoopStopReason(payload) {
114
118
  notify();
115
119
  return action("dialogRuntime/setLoopStopReason", payload);
116
120
  }
121
+ function claimDialogTurnPhase(payload) {
122
+ const runtime = ensureDialogRuntimeState(payload.dialogKey);
123
+ runtime.turnPhaseTurnId = payload.turnId;
124
+ runtime.turnPhase = null;
125
+ notify();
126
+ return action("dialogRuntime/claimDialogTurnPhase", payload);
127
+ }
128
+ function setDialogTurnPhase(payload) {
129
+ const runtime = ensureDialogRuntimeState(payload.dialogKey);
130
+ if (typeof payload.turnId === "string" && runtime.turnPhaseTurnId !== null && runtime.turnPhaseTurnId !== payload.turnId) {
131
+ return action("dialogRuntime/setDialogTurnPhase:rejected", payload);
132
+ }
133
+ runtime.turnPhase = payload.phase;
134
+ runtime.turnPhaseTurnId = payload.phase === null ? null : payload.turnId ?? null;
135
+ notify();
136
+ return action("dialogRuntime/setDialogTurnPhase", payload);
137
+ }
138
+ function clearDialogTurnPhase(payload = {}) {
139
+ return setDialogTurnPhase({ phase: null, dialogKey: payload.dialogKey, turnId: payload.turnId });
140
+ }
117
141
  function clearDialogRuntimeState(payload) {
118
142
  delete runtimeByKey[payload.dialogKey];
119
143
  notify();
@@ -258,6 +282,9 @@ function getPendingUserInputQueue(dialogKey) {
258
282
  function getLoopStopReason(dialogKey) {
259
283
  return getDialogRuntimeState(dialogKey).loopStopReason;
260
284
  }
285
+ function getDialogTurnPhase(dialogKey) {
286
+ return getDialogRuntimeState(dialogKey).turnPhase;
287
+ }
261
288
  var selectDialogRuntimeByKey = (_state, dialogKey) => getDialogRuntimeState(dialogKey);
262
289
  var selectPendingFiles = (_state, dialogKey) => getPendingFiles(dialogKey);
263
290
  var selectActiveControllers = (_state, dialogKey) => getActiveControllers(dialogKey);
@@ -293,6 +320,10 @@ function useLoopStopReason(dialogKey) {
293
320
  (0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
294
321
  return getLoopStopReason(dialogKey);
295
322
  }
323
+ function useDialogTurnPhase(dialogKey) {
324
+ (0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
325
+ return getDialogTurnPhase(dialogKey);
326
+ }
296
327
  function useDialogRuntimeTokens(dialogKey) {
297
328
  (0, import_react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
298
329
  return getDialogRuntimeTokens(dialogKey);
@@ -316,6 +347,9 @@ export {
316
347
  removePendingFile,
317
348
  clearPendingAttachments,
318
349
  setLoopStopReason,
350
+ claimDialogTurnPhase,
351
+ setDialogTurnPhase,
352
+ clearDialogTurnPhase,
319
353
  clearDialogRuntimeState,
320
354
  addActiveController,
321
355
  removeActiveController,
@@ -330,8 +364,6 @@ export {
330
364
  deleteDialogRuntime,
331
365
  abortActiveControllers,
332
366
  getDialogRuntimeTokens,
333
- getPendingUserInputQueue,
334
- getLoopStopReason,
335
367
  selectDialogRuntimeByKey,
336
368
  selectPendingFiles,
337
369
  selectActiveControllers,
@@ -346,6 +378,7 @@ export {
346
378
  useActiveControllers,
347
379
  usePendingUserInputQueue,
348
380
  useLoopStopReason,
381
+ useDialogTurnPhase,
349
382
  useDialogRuntimeTokens,
350
383
  useCurrentDialogKey,
351
384
  useDialogConfigError
@@ -0,0 +1,78 @@
1
+ import {
2
+ clipCompactText
3
+ } from "./chunk-5MMAK75Q.js";
4
+ import {
5
+ asRecordOrEmpty
6
+ } from "./chunk-KX6YBIHG.js";
7
+ import {
8
+ asOptionalTrimmedString
9
+ } from "./chunk-G3SUCT4W.js";
10
+
11
+ // packages/agent-runtime/fileWritePolicy.ts
12
+ function evaluateFileWritePolicy(args) {
13
+ if (args.sessionApproved) return { permissionDecision: "allow" };
14
+ return {
15
+ permissionDecision: "ask",
16
+ permissionRequest: {
17
+ id: "permission-file-write-session",
18
+ tool: args.tool,
19
+ action: "file_write",
20
+ title: "\u786E\u8BA4\u5199\u5165\u6587\u4EF6",
21
+ body: `\u672C\u4F1A\u8BDD\u9996\u6B21\u5199\u5165\u6587\u4EF6\uFF1A${args.path}\u3002\u6279\u51C6\u540E\u672C\u4F1A\u8BDD\u540E\u7EED\u5199\u5165\u4E0D\u518D\u9010\u6B21\u786E\u8BA4\u3002`,
22
+ command: args.path,
23
+ suggestedRule: {
24
+ scope: "session",
25
+ pattern: { capability: "file_write", target: "session" }
26
+ }
27
+ }
28
+ };
29
+ }
30
+
31
+ // packages/agent-runtime/parseToolArguments.ts
32
+ function parseToolArgumentsJson(raw) {
33
+ if (!raw?.trim()) return {};
34
+ try {
35
+ return asRecordOrEmpty(JSON.parse(raw));
36
+ } catch {
37
+ return {};
38
+ }
39
+ }
40
+
41
+ // packages/agent-runtime/summarizeToolArguments.ts
42
+ function clip(value, max = 240) {
43
+ return clipCompactText(value, max);
44
+ }
45
+ function summarizeToolArguments(toolName, rawArgs) {
46
+ const args = parseToolArgumentsJson(rawArgs);
47
+ const pick = (...keys2) => {
48
+ for (const key of keys2) {
49
+ const value = asOptionalTrimmedString(args[key]);
50
+ if (value) return value;
51
+ }
52
+ return "";
53
+ };
54
+ const command = pick("command", "cmd", "runCommand", "executeCommand", "bash");
55
+ if (command) return clip(command);
56
+ const query = pick("query", "pattern", "search", "q");
57
+ if (query) return clip(query);
58
+ const filePath = pick("filePath", "file_path", "path", "filename", "file");
59
+ if (filePath) return clip(filePath);
60
+ const keys = Object.keys(args);
61
+ if (keys.length === 0) return "";
62
+ return clip(
63
+ keys.slice(0, 6).map((key) => {
64
+ const value = args[key];
65
+ if (typeof value === "string") return `${key}=${clip(value, 80)}`;
66
+ if (typeof value === "number" || typeof value === "boolean") {
67
+ return `${key}=${String(value)}`;
68
+ }
69
+ if (Array.isArray(value)) return `${key}[${value.length}]`;
70
+ return `${key}=${value === null ? "null" : typeof value}`;
71
+ }).join(" ")
72
+ );
73
+ }
74
+
75
+ export {
76
+ evaluateFileWritePolicy,
77
+ summarizeToolArguments
78
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageKey
3
- } from "./chunk-VMFTFOWF.js";
3
+ } from "./chunk-ODAPITXL.js";
4
4
  import {
5
5
  asOptionalFiniteNumber
6
6
  } from "./chunk-WWC7I6TA.js";
@@ -4,7 +4,7 @@ import {
4
4
  openrouterModels,
5
5
  platformHostedModels,
6
6
  zaiModels
7
- } from "./chunk-Q67DOFOO.js";
7
+ } from "./chunk-Y3PMXGLH.js";
8
8
 
9
9
  // packages/ai/llm/modelAbility.ts
10
10
  var MODEL_ABILITY_TABLE = {
@@ -1,6 +1,3 @@
1
- import {
2
- BUILTIN_PLATFORM_AGENT_KEYS
3
- } from "./chunk-BNGW5ASC.js";
4
1
  import {
5
2
  getRuntimeServerContext,
6
3
  partitionReadServers,
@@ -10,17 +7,20 @@ import {
10
7
  scheduleExistingRecordReplication,
11
8
  shouldReplaceLocalWithRemoteRecord,
12
9
  shouldReplicateLocalRecord
13
- } from "./chunk-UKWGR5SS.js";
10
+ } from "./chunk-O7SVKKLY.js";
11
+ import {
12
+ shouldReplaceWithNextRecord
13
+ } from "./chunk-D2MDMY2M.js";
14
+ import {
15
+ BUILTIN_PLATFORM_AGENT_KEYS
16
+ } from "./chunk-BNGW5ASC.js";
14
17
  import {
15
18
  fetchFromClientDb,
16
19
  fetchFromServer,
17
20
  isAbortError,
18
21
  isReadTimeoutError,
19
22
  logger
20
- } from "./chunk-QOKAKDPE.js";
21
- import {
22
- shouldReplaceWithNextRecord
23
- } from "./chunk-GBRG75BQ.js";
23
+ } from "./chunk-HIM3FCLF.js";
24
24
  import {
25
25
  NOLO_CLUSTER_SERVERS,
26
26
  normalizeKnownServerOrigin
@@ -80,6 +80,7 @@ var buildTombstoneRecord = (record, nowIso) => {
80
80
 
81
81
  export {
82
82
  getRecordTimestamp,
83
+ getTombstoneTimestamp,
83
84
  isTombstoneRecord,
84
85
  shouldReplaceWithNextRecord,
85
86
  buildTombstoneRecord
@@ -0,0 +1,164 @@
1
+ import {
2
+ noloAgentId
3
+ } from "./chunk-A4SQRTZ6.js";
4
+ import {
5
+ asTrimmedLowercaseString
6
+ } from "./chunk-QSJ3HFEF.js";
7
+ import {
8
+ normalizeServerOrigin
9
+ } from "./chunk-CF7PE763.js";
10
+
11
+ // packages/app/theme/fontPreference.ts
12
+ var FONT_PRESET_ALIASES = {
13
+ system: "system",
14
+ default: "system",
15
+ hei: "hei",
16
+ heiti: "hei",
17
+ sans: "hei",
18
+ song: "song",
19
+ songti: "song",
20
+ serif: "song",
21
+ kai: "kai",
22
+ kaiti: "kai",
23
+ "kai-ti": "kai",
24
+ "fang-song": "fang-song",
25
+ fangsong: "fang-song",
26
+ "fang song": "fang-song"
27
+ };
28
+ var normalizeFontPreset = (value) => {
29
+ const normalized = asTrimmedLowercaseString(value);
30
+ return FONT_PRESET_ALIASES[normalized];
31
+ };
32
+
33
+ // packages/ai/policy/types.ts
34
+ var DEFAULT_AGENT_BASE_POLICY = {
35
+ version: 1,
36
+ tone: {
37
+ preset: "default",
38
+ resolutionMode: "blend"
39
+ },
40
+ knowledgeCaptureMaxLevel: 4,
41
+ spaceContextMaxLevel: 4,
42
+ selfEvolutionMode: "knowledge_only"
43
+ };
44
+ var DEFAULT_USER_PREFERENCE_PROFILE = {
45
+ version: 1,
46
+ tone: {
47
+ preset: "default"
48
+ },
49
+ knowledgeCaptureLevel: 2,
50
+ spaceContextLevel: 3
51
+ };
52
+
53
+ // packages/app/settings/settingTypes.ts
54
+ var SYSTEM_DEFAULT_AGENT_ID = "system-default";
55
+
56
+ // packages/app/settings/settingNormalizers.ts
57
+ var hasOwn = (target, key) => Object.prototype.hasOwnProperty.call(target, key);
58
+ var normalizeDefaultAgentIdSetting = (value) => {
59
+ if (typeof value !== "string" || value.trim() === "") {
60
+ return void 0;
61
+ }
62
+ return value === noloAgentId || value === SYSTEM_DEFAULT_AGENT_ID ? SYSTEM_DEFAULT_AGENT_ID : value;
63
+ };
64
+ var normalizeAuthorityHomeServerSetting = (value) => {
65
+ const normalized = normalizeServerOrigin(value);
66
+ return /^https?:\/\//i.test(normalized) ? normalized : null;
67
+ };
68
+ var normalizeTonePresetSetting = (value) => {
69
+ switch (value) {
70
+ case "professional":
71
+ case "friendly":
72
+ case "direct":
73
+ case "pragmatic":
74
+ case "default":
75
+ return value;
76
+ default:
77
+ return DEFAULT_USER_PREFERENCE_PROFILE.tone?.preset ?? "default";
78
+ }
79
+ };
80
+ var normalizePolicyLevelSetting = (value, fallback) => {
81
+ const n = Number(value);
82
+ if (n === 1 || n === 2 || n === 3 || n === 4) {
83
+ return n;
84
+ }
85
+ return fallback;
86
+ };
87
+ var resolveDefaultAgentIdSetting = (value) => normalizeDefaultAgentIdSetting(value) ?? SYSTEM_DEFAULT_AGENT_ID;
88
+ var omitKeys = (record, keys) => {
89
+ const next = { ...record };
90
+ keys.forEach((key) => {
91
+ delete next[key];
92
+ });
93
+ return next;
94
+ };
95
+ var isRecordLike = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
96
+ var normalizeSystemBuiltinSkills = (value, defaults) => {
97
+ const base = isRecordLike(value) ? value : {};
98
+ const result = { ...defaults };
99
+ for (const key of Object.keys(base)) {
100
+ result[key] = Boolean(base[key]);
101
+ }
102
+ return result;
103
+ };
104
+
105
+ // packages/ai/policy/selfUpdateFields.ts
106
+ var AGENT_UPDATE_FIELD_NAMES = [
107
+ "name",
108
+ "handle",
109
+ "model",
110
+ "provider",
111
+ "prompt",
112
+ "introduction",
113
+ "greeting",
114
+ "isPublic",
115
+ "tags",
116
+ "tools",
117
+ "references",
118
+ "temperature",
119
+ "top_p",
120
+ "frequency_penalty",
121
+ "presence_penalty",
122
+ "max_tokens",
123
+ "reasoning_effort"
124
+ ];
125
+ var PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS = [
126
+ "greeting",
127
+ "introduction",
128
+ "tags"
129
+ ];
130
+ var DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS = [
131
+ ...PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS
132
+ ];
133
+ var VALID_AGENT_UPDATE_FIELDS = new Set(AGENT_UPDATE_FIELD_NAMES);
134
+ var normalizeAgentUpdateFieldList = (value, fallback = DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS) => {
135
+ if (!Array.isArray(value)) {
136
+ return [...fallback];
137
+ }
138
+ const normalized = Array.from(
139
+ new Set(
140
+ value.filter(
141
+ (item) => typeof item === "string" && VALID_AGENT_UPDATE_FIELDS.has(item)
142
+ )
143
+ )
144
+ );
145
+ return normalized;
146
+ };
147
+
148
+ export {
149
+ normalizeFontPreset,
150
+ DEFAULT_AGENT_BASE_POLICY,
151
+ DEFAULT_USER_PREFERENCE_PROFILE,
152
+ AGENT_UPDATE_FIELD_NAMES,
153
+ DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
154
+ normalizeAgentUpdateFieldList,
155
+ SYSTEM_DEFAULT_AGENT_ID,
156
+ hasOwn,
157
+ normalizeDefaultAgentIdSetting,
158
+ normalizeAuthorityHomeServerSetting,
159
+ normalizeTonePresetSetting,
160
+ normalizePolicyLevelSetting,
161
+ resolveDefaultAgentIdSetting,
162
+ omitKeys,
163
+ normalizeSystemBuiltinSkills
164
+ };
@@ -100,7 +100,17 @@ var DEFAULT_LABELS = {
100
100
  runStopped: "Run stopped",
101
101
  runFinished: "Run finished",
102
102
  logTail: "Log tail:",
103
- runs: (count) => `Runs (${count})`
103
+ runs: (count) => `Runs (${count})`,
104
+ toolCount: (count) => `${count} tools`,
105
+ statusWord: (status) => status,
106
+ rows: {
107
+ agent: "agent ",
108
+ status: "status ",
109
+ tools: "tools ",
110
+ note: "note ",
111
+ error: "error ",
112
+ task: "task "
113
+ }
104
114
  };
105
115
  function resolveLabels(labels) {
106
116
  return {
@@ -109,7 +119,10 @@ function resolveLabels(labels) {
109
119
  runStopped: labels?.runStopped ?? DEFAULT_LABELS.runStopped,
110
120
  runFinished: labels?.runFinished ?? DEFAULT_LABELS.runFinished,
111
121
  logTail: labels?.logTail ?? DEFAULT_LABELS.logTail,
112
- runs: labels?.runs ?? DEFAULT_LABELS.runs
122
+ runs: labels?.runs ?? DEFAULT_LABELS.runs,
123
+ toolCount: labels?.toolCount ?? DEFAULT_LABELS.toolCount,
124
+ statusWord: labels?.statusWord ?? DEFAULT_LABELS.statusWord,
125
+ rows: { ...DEFAULT_LABELS.rows, ...labels?.rows ?? {} }
113
126
  };
114
127
  }
115
128
  function shortRunId(runId) {
@@ -165,21 +178,21 @@ function formatStartRunCard(agentName, status = "running", opts) {
165
178
  const lines = [L.runStarted];
166
179
  const identity = formatIdentityRow(agentName, opts?.runId);
167
180
  if (identity) {
168
- lines.push(` agent ${identity}`);
181
+ lines.push(` ${L.rows.agent}${identity}`);
169
182
  }
170
- lines.push(` status ${icon} ${status}`);
183
+ lines.push(` ${L.rows.status}${icon} ${L.statusWord(status)}`);
171
184
  const task = opts?.task?.trim();
172
185
  if (task) {
173
- lines.push(` task ${clipText(task, TASK_PREVIEW_MAX)}`);
186
+ lines.push(` ${L.rows.task}${clipText(task, TASK_PREVIEW_MAX)}`);
174
187
  }
175
188
  return lines.join("\n");
176
189
  }
177
190
  var TASK_PREVIEW_MAX = 72;
178
191
  var NOTE_PREVIEW_MAX = 72;
179
- function formatProgressRow(toolCallCount, lastToolNames) {
192
+ function formatProgressRow(toolCallCount, lastToolNames, labels = DEFAULT_LABELS) {
180
193
  const parts = [];
181
194
  if (typeof toolCallCount === "number" && Number.isFinite(toolCallCount)) {
182
- parts.push(`${toolCallCount} tools`);
195
+ parts.push(labels.toolCount(toolCallCount));
183
196
  }
184
197
  if (lastToolNames && lastToolNames.length > 0) {
185
198
  parts.push(lastToolNames.join(", "));
@@ -190,21 +203,21 @@ function formatStatusRunCard(agentName, status = "running", opts) {
190
203
  const L = resolveLabels(opts?.labels);
191
204
  const icon = getAgentRunStatusIcon(status);
192
205
  const age = formatRunAge(opts?.timing, opts?.now);
193
- const lines = [L.runStatus, ` ${icon} ${status}${age ? ` ${age}` : ""}`];
206
+ const lines = [L.runStatus, ` ${icon} ${L.statusWord(status)}${age ? ` ${age}` : ""}`];
194
207
  const identity = formatIdentityRow(agentName, opts?.runId);
195
208
  if (identity) {
196
- lines.push(` agent ${identity}`);
209
+ lines.push(` ${L.rows.agent}${identity}`);
197
210
  }
198
- const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames);
211
+ const progress = formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L);
199
212
  if (progress) {
200
- lines.push(` tools ${progress}`);
213
+ lines.push(` ${L.rows.tools}${progress}`);
201
214
  }
202
215
  const note = opts?.lastAssistantText?.trim();
203
216
  if (note) {
204
- lines.push(` note ${clipText(note, NOTE_PREVIEW_MAX)}`);
217
+ lines.push(` ${L.rows.note}${clipText(note, NOTE_PREVIEW_MAX)}`);
205
218
  }
206
219
  if (opts?.errorMessage?.trim()) {
207
- lines.push(` error ${opts.errorMessage.trim()}`);
220
+ lines.push(` ${L.rows.error}${opts.errorMessage.trim()}`);
208
221
  }
209
222
  if (shouldShowLogTail(status, opts?.includeLogTail, opts?.logLines)) {
210
223
  lines.push("", L.logTail, ...opts.logLines.map((l) => ` ${l}`));
@@ -223,11 +236,11 @@ function formatFinishedRunCard(agentName, status, opts) {
223
236
  const L = resolveLabels(opts?.labels);
224
237
  const icon = getAgentRunStatusIcon(status);
225
238
  const age = formatRunAge(opts?.timing, opts?.now);
226
- const summary = [status, age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames)].filter(Boolean).join(" \xB7 ");
239
+ const summary = [L.statusWord(status), age, formatProgressRow(opts?.toolCallCount, opts?.lastToolNames, L)].filter(Boolean).join(" \xB7 ");
227
240
  const lines = [L.runFinished, ` ${icon} ${summary}`];
228
241
  const identity = formatIdentityRow(agentName, opts?.runId);
229
242
  if (identity) {
230
- lines.push(` agent ${identity}`);
243
+ lines.push(` ${L.rows.agent}${identity}`);
231
244
  }
232
245
  const note = opts?.lastAssistantText?.trim();
233
246
  if (note) {
@@ -245,7 +258,7 @@ function formatStopRunCard(status = "killed", labels) {
245
258
  const L = resolveLabels(labels);
246
259
  const icon = getAgentRunStatusIcon(status);
247
260
  return `${L.runStopped}
248
- ${icon} ${status}`;
261
+ ${icon} ${L.statusWord(status)}`;
249
262
  }
250
263
  function formatListRunsCard(runs, labels) {
251
264
  const L = resolveLabels(labels);
@@ -260,7 +273,7 @@ function formatListRunsCard(runs, labels) {
260
273
  function formatNotFoundRunCard(labels) {
261
274
  const L = resolveLabels(labels);
262
275
  return `${L.runStatus}
263
- ? not_found`;
276
+ ? ${L.statusWord("not_found")}`;
264
277
  }
265
278
  var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
266
279
  "done",
@@ -276,6 +289,24 @@ var AGENT_RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
276
289
  function isAgentRunTerminalStatus(status) {
277
290
  return typeof status === "string" && AGENT_RUN_TERMINAL_STATUSES.has(status);
278
291
  }
292
+ function formatAgentListCard(agents, maxDisplay = 8) {
293
+ const total = agents.length;
294
+ const lines = [`Agents (${total})`];
295
+ const visible = agents.slice(0, maxDisplay);
296
+ for (const agent of visible) {
297
+ const star = agent.isFavorite ? "\u2605" : " ";
298
+ const own = agent.isOwned ? "\u25CE" : " ";
299
+ const name = agent.name || "(unnamed)";
300
+ const model = agent.model || "\u2014";
301
+ const source = agent.apiSource || agent.provider || agent.cliProvider || "\u2014";
302
+ const key = agent.agentKey || "(agentKey unavailable)";
303
+ lines.push(`${star}${own} ${name} ${model} ${source} ${key}`);
304
+ }
305
+ if (total > maxDisplay) {
306
+ lines.push(`\u2026 +${total - maxDisplay} more`);
307
+ }
308
+ return lines.join("\n");
309
+ }
279
310
 
280
311
  export {
281
312
  buildDelegatedTaskContent,
@@ -295,5 +326,6 @@ export {
295
326
  formatStopRunCard,
296
327
  formatListRunsCard,
297
328
  formatNotFoundRunCard,
298
- isAgentRunTerminalStatus
329
+ isAgentRunTerminalStatus,
330
+ formatAgentListCard
299
331
  };