nolo-cli 0.32.0 → 0.33.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 (170) hide show
  1. package/README.md +6 -12
  2. package/{_executeModel-LTMSIBS4.js → _executeModel-RWPVI3YV.js} +76 -67
  3. package/{action-HI3VRQLP.js → action-SMLG6OTB.js} +17 -15
  4. package/{addContentAction-NCURJ6PK.js → addContentAction-SFO244QN.js} +14 -13
  5. package/{addDialogAgentAction-RCY4ECF4.js → addDialogAgentAction-W44ZCEHB.js} +14 -13
  6. package/{agentDeleteCommand-D3MYZK6E.js → agentDeleteCommand-KU2RXQPP.js} +42 -59
  7. package/{agentEmailCommands-6BXS574I.js → agentEmailCommands-MPCMDENS.js} +89 -80
  8. package/{agentGrantCommands-E7ZZFRHK.js → agentGrantCommands-2LEZDADN.js} +2 -2
  9. package/{agentListCommands-SF3HEUTT.js → agentListCommands-EPD4N6FX.js} +73 -78
  10. package/{agentMachineCommands-YARVXRR6.js → agentMachineCommands-AF7C3YRT.js} +40 -57
  11. package/{agentPullCommand-ARSIDNVC.js → agentPullCommand-YH5GEBK4.js} +5 -5
  12. package/agentRecordCommands-EYE6MZZG.js +112 -0
  13. package/agentRunCommand-LL22SGTN.js +130 -0
  14. package/{agentRuntimeLocal-ATGJY6WC.js → agentRuntimeLocal-JX34G47Z.js} +35 -50
  15. package/{agentSlice-4XWW344Y.js → agentSlice-TNMFQQOV.js} +15 -13
  16. package/{appDeleteCommands-63JO7RXS.js → appDeleteCommands-43K5VXQB.js} +38 -55
  17. package/{appDeployCommands-Y7EWYUGM.js → appDeployCommands-FEEJSVDZ.js} +38 -55
  18. package/{appDeployStatusCommands-ZBEY3DWB.js → appDeployStatusCommands-H76CG45R.js} +38 -55
  19. package/{appGetCommands-QSSOSEYL.js → appGetCommands-MDZYFTYZ.js} +38 -55
  20. package/{appListCommands-PH3XWNDX.js → appListCommands-TUJJXPWG.js} +38 -55
  21. package/{authCommand-BBDHMSO6.js → authCommand-T7UK4CWS.js} +18 -18
  22. package/{authCommands-4UDEKRE6.js → authCommands-EAPFGNHN.js} +8 -8
  23. package/chatQueueReduxAdapter-LVQXC4ZY.js +180 -0
  24. package/chunk-2H3XIBY4.js +239 -0
  25. package/{chunk-TEYN42N3.js → chunk-2IVEXF7P.js} +11 -4
  26. package/{chunk-WTGCTVJG.js → chunk-2QTEYCR7.js} +3 -6
  27. package/{chunk-DOISARTV.js → chunk-2UECQ7RE.js} +1 -1
  28. package/{chunk-SWYMCHM7.js → chunk-37V5LNEQ.js} +69 -1
  29. package/{chunk-E3APEOIM.js → chunk-3GZXL6FM.js} +4 -19
  30. package/{chunk-O3JR45Q2.js → chunk-3VAQHAXT.js} +44 -44
  31. package/{chunk-O5OMJPPF.js → chunk-3WXRAHCG.js} +6 -5
  32. package/{chunk-LAXMH7JY.js → chunk-57QJXIB6.js} +18 -15
  33. package/chunk-5CS33IBL.js +301 -0
  34. package/{chunk-3UGKATZQ.js → chunk-5SBK2MTI.js} +8 -369
  35. package/chunk-6PO2SYCS.js +1800 -0
  36. package/{chunk-TA6EA2A3.js → chunk-6SXC35F4.js} +182 -20
  37. package/{chunk-MXFQHRSS.js → chunk-6XIE5ZGI.js} +1 -1
  38. package/{chunk-3GZT3L6F.js → chunk-73GINUCW.js} +326 -481
  39. package/{chunk-VMWR7VNI.js → chunk-7E72JMBB.js} +7 -7
  40. package/{chunk-4PNU7W7K.js → chunk-AAGCMVFT.js} +106 -124
  41. package/chunk-ADLYMQB6.js +642 -0
  42. package/{chunk-ZWJOGMKH.js → chunk-AETZ7AD6.js} +1 -1
  43. package/{chunk-UDA3ZYLW.js → chunk-AFV4FOT2.js} +70 -24
  44. package/{chunk-BGTUGS3T.js → chunk-AOXVOC6D.js} +4 -30
  45. package/{chunk-2ZRP5RUG.js → chunk-B2BSG6QQ.js} +12 -11
  46. package/{chunk-44HACRCK.js → chunk-BANYWEYY.js} +4 -4
  47. package/{chunk-TOW4E763.js → chunk-BJIRLHJR.js} +2 -0
  48. package/{chunk-ZJ2WITOO.js → chunk-BQXOGBFN.js} +2 -2
  49. package/{chunk-G5GVZAXF.js → chunk-CLP2K7U4.js} +15 -19
  50. package/{chunk-2K4NDPT5.js → chunk-DFUPZE6V.js} +20 -12
  51. package/{chunk-YHGHADBQ.js → chunk-DPMBNHOJ.js} +4 -4
  52. package/chunk-EGRJC4ZN.js +91 -0
  53. package/{chunk-K6QEHQZ3.js → chunk-EKLRRZIN.js} +1 -1
  54. package/{chunk-XFG3BAKN.js → chunk-FMEVI5TG.js} +65 -0
  55. package/{chunk-RH53LMEJ.js → chunk-FSSX3XRY.js} +2 -4
  56. package/{chunk-VP4WJWKW.js → chunk-GM6PU7B6.js} +431 -345
  57. package/{chunk-EEF23OOK.js → chunk-GMXWYXAF.js} +7 -7
  58. package/{chunk-SFWZUTCI.js → chunk-GTYM4HKV.js} +1 -1
  59. package/{chunk-MITD7CON.js → chunk-HDKRSRYU.js} +1461 -301
  60. package/chunk-HS7MLR74.js +38 -0
  61. package/{chunk-3AUWC6EM.js → chunk-HUCT7HID.js} +5 -84
  62. package/{chunk-PTHDLIRB.js → chunk-I6N2UVVY.js} +1 -1
  63. package/chunk-IDAU4UFS.js +437 -0
  64. package/{chunk-Q76I4SXI.js → chunk-IHEC7VBF.js} +1 -1
  65. package/{chunk-OWHNFZNW.js → chunk-IL545V3E.js} +4 -4
  66. package/{chunk-3LY4F7SV.js → chunk-INZZJSQF.js} +348 -331
  67. package/{chunk-CF2WZF4N.js → chunk-J6WH4PYZ.js} +0 -8
  68. package/{chunk-2HXKAPH7.js → chunk-JMPYDFHY.js} +6 -6
  69. package/{chunk-V54H24CQ.js → chunk-JTSGWTYZ.js} +3 -3
  70. package/{chunk-ATK5WJOA.js → chunk-JZ5AMMXU.js} +4 -4
  71. package/chunk-KHCLMKZZ.js +3062 -0
  72. package/{chunk-WHLVPK32.js → chunk-KMSZPTM6.js} +27 -3
  73. package/{chunk-L3GCUVOH.js → chunk-KSRFVP36.js} +1 -1
  74. package/{chunk-DLWCWUNW.js → chunk-LOD75GOS.js} +336 -32
  75. package/{chunk-UOJRKY5J.js → chunk-M2YMQOLC.js} +44 -53
  76. package/chunk-M3JEW6N6.js +193 -0
  77. package/{chunk-XDHHF73Q.js → chunk-M4NC7NF6.js} +95 -95
  78. package/{chunk-3FCNXC2J.js → chunk-MPZJVZDC.js} +3735 -1394
  79. package/{chunk-IXZX5CJK.js → chunk-MQRZ5QUH.js} +1 -1
  80. package/{chunk-3ASDTTEI.js → chunk-MRWGHF56.js} +2 -0
  81. package/{chunk-D34RI6NI.js → chunk-NNWHHCVP.js} +75 -1
  82. package/{chunk-6YABCOFU.js → chunk-NUO3QFWD.js} +1 -1
  83. package/{chunk-GAF5X6B7.js → chunk-O6GEBMIY.js} +269 -309
  84. package/{chunk-CAENRKNJ.js → chunk-OR2HNLVO.js} +126 -88
  85. package/chunk-OW765XBU.js +10 -0
  86. package/chunk-PREQU5QV.js +231 -0
  87. package/{chunk-Q3CSL43H.js → chunk-Q5ITEGIN.js} +1 -1
  88. package/{chunk-7S54ZGF6.js → chunk-RAZOLMJR.js} +256 -12
  89. package/chunk-RCFIB45Q.js +28 -0
  90. package/chunk-RY57GLGW.js +188 -0
  91. package/{chunk-KGEVMUMI.js → chunk-TFPUAELY.js} +11 -11
  92. package/{chunk-ZJH3LKEW.js → chunk-UK5JGQVU.js} +94 -15
  93. package/chunk-URMS4XY2.js +10 -0
  94. package/{chunk-RXVX5LFR.js → chunk-VH2F7ZB6.js} +1 -1
  95. package/chunk-VIDPVFP3.js +20 -0
  96. package/{chunk-W367V5CH.js → chunk-WHD6BG7M.js} +400 -115
  97. package/{chunk-5RDLGLAP.js → chunk-WJSW43QZ.js} +4 -7
  98. package/{chunk-CF7S2RYZ.js → chunk-WLH5BAKX.js} +6 -6
  99. package/{chunk-VVEH6XUE.js → chunk-X2DAEZ3X.js} +1 -1
  100. package/{chunk-2IJAKBK2.js → chunk-X664KVEV.js} +426 -246
  101. package/{chunk-43EPBPZ2.js → chunk-XCCGU6QB.js} +2 -2
  102. package/chunk-Y5GCAMGP.js +9 -0
  103. package/{chunk-V42OE5HT.js → chunk-YDTYDA5W.js} +3 -3
  104. package/chunk-YYLHWIW6.js +48 -0
  105. package/{chunk-AOS5IN2I.js → chunk-ZHYK3N56.js} +1 -1
  106. package/{chunk-ODS2MVMU.js → chunk-ZJMME4DS.js} +19 -303
  107. package/{chunk-PJ2DDQQM.js → chunk-ZURFOV5J.js} +2 -2
  108. package/chunk-ZZ2MH7LE.js +84 -0
  109. package/{cliExecutor-BBUVQU4L.js → cliExecutor-DW3PHGEL.js} +2 -2
  110. package/{clipboardy-BVE3LVEH.js → clipboardy-MMBYVRLF.js} +166 -372
  111. package/{codingSkills-V35TRR4Y.js → codingSkills-DY5MINPG.js} +5 -4
  112. package/{createAgentAutomationAction-WLRNE7C4.js → createAgentAutomationAction-INQT23LX.js} +40 -31
  113. package/createDialogAction-LDCPDI73.js +60 -0
  114. package/{createPageAction-7YROVZ3W.js → createPageAction-5YXOG2M4.js} +56 -47
  115. package/{db-6DPSJ6WT.js → db-3H3JECGY.js} +45 -5
  116. package/{dbSlice-BBL3PEVW.js → dbSlice-3SD5L5H2.js} +13 -12
  117. package/{deleteFile-RJTEPOT4.js → deleteFile-XQXPBFFB.js} +7 -6
  118. package/dialogCommands-CHJO47AX.js +81 -0
  119. package/{dialogSlice-N4HPG6HM.js → dialogSlice-DOWKOILN.js} +36 -29
  120. package/{docCreateCommands-GRA5BHSA.js → docCreateCommands-OVZARUFX.js} +40 -55
  121. package/{docDeleteCommands-ONIJM5MD.js → docDeleteCommands-E2XJ62LD.js} +42 -57
  122. package/{docReadCommands-H55VQ2US.js → docReadCommands-I7OSREPJ.js} +40 -55
  123. package/{docStore-B5AHDNW5.js → docStore-UAWSKZ2Y.js} +39 -30
  124. package/{docUpdateCommands-ZQIQVGC2.js → docUpdateCommands-X4Z26VJM.js} +43 -58
  125. package/{fetchMessages-VPPQDDZ4.js → fetchMessages-7QRCCRYK.js} +3 -3
  126. package/{getPricing-QO5TYNCK.js → getPricing-L2ENXWHV.js} +7 -6
  127. package/{handleSendMessageAction-IN5XX5U7.js → handleSendMessageAction-C3TSDWKH.js} +38 -31
  128. package/index.js +67 -67
  129. package/{lib-FYYBQIXS.js → lib-2ZTNRXR4.js} +432 -183
  130. package/{localDialogRead-3DBXVYXS.js → localDialogRead-SLMPV5SK.js} +2 -2
  131. package/{localRuntimeAuthority-NDUA2D7Y.js → localRuntimeAuthority-E3R24J4T.js} +4 -2
  132. package/{localRuntimeDb-GKYRBWLQ.js → localRuntimeDb-DDZCJFQZ.js} +1 -1
  133. package/{machineCommands-H3UMKE76.js → machineCommands-BUOIYJAD.js} +93 -84
  134. package/{machineWsRunDispatch-HONRUK3R.js → machineWsRunDispatch-7CRWAA6O.js} +83 -74
  135. package/{models-WDUTTYFS.js → models-OX2S5C6Q.js} +2 -2
  136. package/{offlineMarxistsAgentCommand-E6LUG63A.js → offlineMarxistsAgentCommand-GEH6SNNA.js} +1 -1
  137. package/package.json +1 -4
  138. package/{read-64OQDO3I.js → read-6G73BMEY.js} +8 -7
  139. package/{readDocTool-MXM3T6PE.js → readDocTool-DK4EI2GA.js} +1 -2
  140. package/{readlineWorkspace-XVJZDCSC.js → readlineWorkspace-ZDWEASJV.js} +265 -428
  141. package/{removeDialogAgentAction-NEKVAMSH.js → removeDialogAgentAction-E7H557UO.js} +19 -17
  142. package/{runAgentClientLoop-H7U53QB6.js → runAgentClientLoop-U7HYA3O5.js} +72 -64
  143. package/{runtimeDoctorCommands-WI2YZUSJ.js → runtimeDoctorCommands-KIKM6BIO.js} +5 -5
  144. package/{setDialogExtraReferencesAction-WTOHQDIV.js → setDialogExtraReferencesAction-RMMGBR5F.js} +15 -14
  145. package/{setPrimaryDialogAgentAction-LDJOYC4F.js → setPrimaryDialogAgentAction-FWBKKLVA.js} +19 -17
  146. package/{settingSlice-4M37TN7V.js → settingSlice-73PV4KG4.js} +16 -14
  147. package/{skillDiscovery-5U6RYAHN.js → skillDiscovery-KLLKXPUO.js} +4 -4
  148. package/{slateUtils-2M7MUTWX.js → slateUtils-VO2FU36K.js} +1 -1
  149. package/{spaceCommands-7VVKJBDV.js → spaceCommands-GEWZXGHM.js} +43 -240
  150. package/{spaceSlice-T6YK6D34.js → spaceSlice-B6MOVY4N.js} +38 -61
  151. package/{streamAgentChatTurn-RQ63QFQ7.js → streamAgentChatTurn-T527EQTT.js} +1261 -150
  152. package/{switchDialogAgentAction-XVWGKR2Z.js → switchDialogAgentAction-US6QNL3N.js} +14 -13
  153. package/syncMapping-RK2MANUX.js +43 -0
  154. package/{tableCommands-RJZ3V4TF.js → tableCommands-QE47K72R.js} +8 -7
  155. package/{toolApiClient-ARGFDJAG.js → toolApiClient-B2MFXMEG.js} +3 -3
  156. package/tools-XMWCVMPM.js +98 -0
  157. package/{tuiSummaryLlmCaller-SRZ4QQUP.js → tuiSummaryLlmCaller-NCAJSVSD.js} +24 -21
  158. package/{updateDialogTitleAction-BBDSWHNG.js → updateDialogTitleAction-XPJZRJEL.js} +48 -38
  159. package/agentRecordCommands-JFZRQJQ4.js +0 -103
  160. package/agentRunCommand-NOX5FLKO.js +0 -121
  161. package/chunk-AYMOSAHE.js +0 -3158
  162. package/chunk-D2BPX6DQ.js +0 -1707
  163. package/chunk-DCDL3GC4.js +0 -171
  164. package/chunk-F3MP7CP6.js +0 -73
  165. package/chunk-WZSRQNQG.js +0 -2587
  166. package/createDialogAction-Y6YV64QB.js +0 -52
  167. package/dialogCommands-XLO5CAHZ.js +0 -95
  168. package/tools-KYZX3BGO.js +0 -90
  169. package/{chunk-Z5MXSEOJ.js → chunk-RQSOAMPJ.js} +2 -2
  170. package/{chunk-JDSUTNYY.js → chunk-SAQQLJZ5.js} +3 -3
@@ -0,0 +1,239 @@
1
+ import {
2
+ MODEL_LOOKUP_MAP
3
+ } from "./chunk-DFUPZE6V.js";
4
+ import {
5
+ ALL_MODELS
6
+ } from "./chunk-2QTEYCR7.js";
7
+ import {
8
+ PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
9
+ builtinAgentCatalogEntryById,
10
+ builtinRuntimeFallbackEntries,
11
+ isBuiltinPlatformAgentKey
12
+ } from "./chunk-UK5JGQVU.js";
13
+ import {
14
+ parsePublicAgentId,
15
+ publicAgentKey
16
+ } from "./chunk-BJIRLHJR.js";
17
+
18
+ // packages/agent-runtime/builtinPlatformAgentConfigs.ts
19
+ function buildConfig(e) {
20
+ const key = publicAgentKey(e.id);
21
+ const rawRecord = {
22
+ dbKey: key,
23
+ isPublic: true,
24
+ provider: e.provider,
25
+ model: e.model,
26
+ apiSource: e.apiSource ?? "platform",
27
+ useServerProxy: e.useServerProxy ?? true
28
+ };
29
+ if (e.hasImageOutput) rawRecord.hasImageOutput = true;
30
+ if (e.imageModel) rawRecord.imageModel = e.imageModel;
31
+ if (e.imageWorkflow) rawRecord.imageWorkflow = e.imageWorkflow;
32
+ if (e.imageConfig) rawRecord.imageConfig = e.imageConfig;
33
+ return {
34
+ key,
35
+ name: e.name,
36
+ provider: e.provider,
37
+ model: e.model,
38
+ apiSource: e.apiSource ?? "platform",
39
+ useServerProxy: e.useServerProxy ?? true,
40
+ rawRecord
41
+ };
42
+ }
43
+ var BUILTIN_PLATFORM_AGENT_CONFIGS = Object.fromEntries(
44
+ builtinRuntimeFallbackEntries().map((e) => [publicAgentKey(e.id), buildConfig(e)])
45
+ );
46
+ function resolveBuiltinPlatformAgentConfig(agentRef) {
47
+ return BUILTIN_PLATFORM_AGENT_CONFIGS[agentRef] ?? null;
48
+ }
49
+ function resolveBuiltinPlatformAgentRecord(agentRef) {
50
+ const config = resolveBuiltinPlatformAgentConfig(agentRef);
51
+ if (!config) return null;
52
+ return {
53
+ ...config.rawRecord,
54
+ dbKey: agentRef,
55
+ ...config.name ? { name: config.name } : {}
56
+ };
57
+ }
58
+ function resolveBuiltinAgentRuntimeFields(agentKey) {
59
+ if (!isBuiltinPlatformAgentKey(agentKey)) return null;
60
+ const entry = builtinAgentCatalogEntryById(parsePublicAgentId(agentKey));
61
+ if (!entry) return null;
62
+ return { provider: entry.provider, model: entry.model };
63
+ }
64
+ function applyBuiltinAgentRuntimeOverride(agentKey, record) {
65
+ const fields = resolveBuiltinAgentRuntimeFields(agentKey);
66
+ if (!fields) return record;
67
+ const current = record;
68
+ const rawNeedsOverride = current.rawRecord != null && (current.rawRecord.provider !== fields.provider || current.rawRecord.model !== fields.model);
69
+ if (current.provider === fields.provider && current.model === fields.model && !rawNeedsOverride) {
70
+ return record;
71
+ }
72
+ return {
73
+ ...record,
74
+ provider: fields.provider,
75
+ model: fields.model,
76
+ ...current.rawRecord ? {
77
+ rawRecord: {
78
+ ...current.rawRecord,
79
+ provider: fields.provider,
80
+ model: fields.model
81
+ }
82
+ } : {}
83
+ };
84
+ }
85
+
86
+ // packages/ai/llm/getModelContextWindow.ts
87
+ var DEFAULT_CONTEXT_WINDOW = 256e3;
88
+ var QWEN_3_6_CONTEXT_WINDOW = 262144;
89
+ var GLM_5_2_CONTEXT_WINDOW = 1e6;
90
+ var ANTIGRAVITY_EFFORT_SUFFIXES = [
91
+ "-tiered",
92
+ "-extra-low",
93
+ "-low",
94
+ "-medium",
95
+ "-high"
96
+ ];
97
+ function stripEffortSuffix(model) {
98
+ for (const suffix of ANTIGRAVITY_EFFORT_SUFFIXES) {
99
+ if (model.endsWith(suffix) && model.length > suffix.length) {
100
+ return model.slice(0, -suffix.length);
101
+ }
102
+ }
103
+ return model;
104
+ }
105
+ function stripPreviewSuffix(model) {
106
+ const suffix = "-preview";
107
+ if (model.endsWith(suffix) && model.length > suffix.length) {
108
+ return model.slice(0, -suffix.length);
109
+ }
110
+ return model;
111
+ }
112
+ var fullModelMap = null;
113
+ var getFullModelMap = () => {
114
+ if (!fullModelMap) {
115
+ fullModelMap = /* @__PURE__ */ new Map();
116
+ for (const [provider, models] of Object.entries(MODEL_LOOKUP_MAP)) {
117
+ for (const model of models) {
118
+ const entry = { ...model, provider };
119
+ fullModelMap.set(model.name, entry);
120
+ if (model.displayName) {
121
+ fullModelMap.set(model.displayName.toLowerCase(), entry);
122
+ }
123
+ }
124
+ }
125
+ }
126
+ return fullModelMap;
127
+ };
128
+ var legacyModelMap = null;
129
+ var getLegacyModelMap = () => {
130
+ if (!legacyModelMap) {
131
+ legacyModelMap = /* @__PURE__ */ new Map();
132
+ for (const model of ALL_MODELS) {
133
+ legacyModelMap.set(model.name, model);
134
+ if (model.displayName) {
135
+ legacyModelMap.set(model.displayName.toLowerCase(), model);
136
+ }
137
+ }
138
+ }
139
+ return legacyModelMap;
140
+ };
141
+ function fuzzyContextWindow(normalizedName) {
142
+ if (normalizedName.includes("qwen-long") || normalizedName.includes("qwen3-long")) return 10485760;
143
+ if (normalizedName.includes("qwen-coder") || normalizedName.includes("qwen3-coder")) return 1048576;
144
+ if (normalizedName.includes("qwen3.8") || normalizedName.includes("qwen3p8")) return 1e6;
145
+ if (normalizedName.includes("minimax-m3") || normalizedName.includes("minimax_m3")) return 1e6;
146
+ if (normalizedName.includes("glm-5.3") || normalizedName.includes("glm5.3")) return 105e4;
147
+ if (normalizedName.includes("glm-5.2") || normalizedName.includes("glm5.2")) return GLM_5_2_CONTEXT_WINDOW;
148
+ if (normalizedName.includes("deepseek")) return 1e6;
149
+ if (normalizedName.includes("gpt-5") || normalizedName.includes("gpt-4.1")) return 1047576;
150
+ if (normalizedName.startsWith("cursor-grok-4.5")) return 1e6;
151
+ if (normalizedName.includes("claude-4.6")) return 1e6;
152
+ if (normalizedName.includes("gemini-3.1")) return 1e6;
153
+ if (normalizedName.includes("gemini")) return 1048576;
154
+ if (normalizedName.includes("qwen3.6") || normalizedName.includes("qwen3p6")) return QWEN_3_6_CONTEXT_WINDOW;
155
+ if (normalizedName.includes("qwen3.7") || normalizedName.includes("qwen3p7")) return 262144;
156
+ if (normalizedName.includes("minimax-m2") || normalizedName.includes("minimax_m2")) return 262144;
157
+ if (normalizedName.includes("claude")) return 2e5;
158
+ return void 0;
159
+ }
160
+ var getModelContextWindow = (modelName) => {
161
+ if (!modelName) return DEFAULT_CONTEXT_WINDOW;
162
+ const normalizedName = modelName.toLowerCase();
163
+ const map = getFullModelMap();
164
+ const candidates = [modelName, normalizedName];
165
+ const strippedEffort = stripEffortSuffix(modelName);
166
+ if (strippedEffort !== modelName) {
167
+ candidates.push(strippedEffort, strippedEffort.toLowerCase());
168
+ }
169
+ const strippedPreview = stripPreviewSuffix(modelName);
170
+ if (strippedPreview !== modelName) {
171
+ candidates.push(strippedPreview, strippedPreview.toLowerCase());
172
+ }
173
+ if (strippedEffort !== modelName) {
174
+ const strippedBoth = stripPreviewSuffix(strippedEffort);
175
+ if (strippedBoth !== strippedEffort) {
176
+ candidates.push(strippedBoth, strippedBoth.toLowerCase());
177
+ }
178
+ }
179
+ for (const candidate of candidates) {
180
+ const model = map.get(candidate);
181
+ if (model?.contextWindow) {
182
+ return typeof model.contextWindow === "number" ? model.contextWindow : DEFAULT_CONTEXT_WINDOW;
183
+ }
184
+ }
185
+ return fuzzyContextWindow(normalizedName) ?? DEFAULT_CONTEXT_WINDOW;
186
+ };
187
+ var getModelInfo = (modelName) => {
188
+ if (!modelName) return null;
189
+ const map = getLegacyModelMap();
190
+ return map.get(modelName) || map.get(modelName.toLowerCase()) || null;
191
+ };
192
+
193
+ // packages/agent-runtime/autoExecutionProfiles.ts
194
+ var createProfile = (input) => ({
195
+ id: input.id,
196
+ tier: input.tier,
197
+ legacyAgentKey: input.legacyAgentKey,
198
+ key: input.legacyAgentKey,
199
+ name: input.name,
200
+ provider: "nolo",
201
+ model: input.model,
202
+ apiSource: "platform",
203
+ useServerProxy: true,
204
+ rawRecord: {
205
+ dbKey: input.legacyAgentKey,
206
+ isPublic: true,
207
+ provider: "nolo",
208
+ model: input.model,
209
+ apiSource: "platform",
210
+ useServerProxy: true
211
+ }
212
+ });
213
+ var FLASH_PROFILE = createProfile({
214
+ id: "builtin:auto:deepseek-v4-flash",
215
+ tier: "flash",
216
+ legacyAgentKey: PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
217
+ name: "DeepSeek V4 Flash",
218
+ model: "deepseek-v4-flash"
219
+ });
220
+ var AUTO_EXECUTION_PROFILES = {
221
+ flash: FLASH_PROFILE,
222
+ balanced: { ...FLASH_PROFILE, tier: "balanced" },
223
+ quality: { ...FLASH_PROFILE, tier: "quality" },
224
+ image: { ...FLASH_PROFILE, tier: "image" }
225
+ };
226
+ var DEFAULT_AUTO_EXECUTION_TIER = "flash";
227
+ var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
228
+ var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
229
+
230
+ export {
231
+ resolveBuiltinPlatformAgentConfig,
232
+ resolveBuiltinPlatformAgentRecord,
233
+ applyBuiltinAgentRuntimeOverride,
234
+ DEFAULT_CONTEXT_WINDOW,
235
+ getModelContextWindow,
236
+ getModelInfo,
237
+ DEFAULT_AUTO_EXECUTION_PROFILE,
238
+ resolveAutoExecutionProfile
239
+ };
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  isOAuthApiKeyRef
3
- } from "./chunk-3GZT3L6F.js";
3
+ } from "./chunk-YYLHWIW6.js";
4
4
  import {
5
5
  getModelAbility
6
- } from "./chunk-WTGCTVJG.js";
6
+ } from "./chunk-2QTEYCR7.js";
7
7
  import {
8
8
  isOwnedAgentKey,
9
9
  ownedAgentKey,
10
10
  publicAgentKey
11
- } from "./chunk-TOW4E763.js";
11
+ } from "./chunk-BJIRLHJR.js";
12
12
 
13
13
  // packages/ai/agent/safeAgentSummary.ts
14
14
  function parseTimestamp(val) {
@@ -178,7 +178,14 @@ function sortSafeAgentSummaries(agents) {
178
178
  });
179
179
  }
180
180
 
181
+ // packages/ai/agent/agentAvailabilityShared.ts
182
+ function isAgentUnavailableNow(agent, now = Date.now()) {
183
+ const at = agent?.nextAvailableAt;
184
+ return typeof at === "number" && Number.isFinite(at) && at > now;
185
+ }
186
+
181
187
  export {
182
188
  toSafeAgentSummary,
183
- sortSafeAgentSummaries
189
+ sortSafeAgentSummaries,
190
+ isAgentUnavailableNow
184
191
  };
@@ -9,7 +9,7 @@ import {
9
9
  platformHostedModels,
10
10
  xaiModels,
11
11
  zaiModels
12
- } from "./chunk-CAENRKNJ.js";
12
+ } from "./chunk-OR2HNLVO.js";
13
13
 
14
14
  // packages/ai/llm/modelAbility.ts
15
15
  var MODEL_ABILITY_TABLE = {
@@ -22,7 +22,6 @@ var MODEL_ABILITY_TABLE = {
22
22
  "gpt-5.6-luna": { passAt1: 67, benchmarkScore: 51 },
23
23
  "grok-4.6": { passAt1: 67 },
24
24
  "deepseek-v4-pro": { passAt1: 63 },
25
- "claude-opus-4.8": { passAt1: 59 },
26
25
  "qwen3.8-max": { passAt1: 57 },
27
26
  "muse-spark-1.2": { passAt1: 55 },
28
27
  "grok-4.5": { passAt1: 54, benchmarkScore: 54 },
@@ -31,6 +30,7 @@ var MODEL_ABILITY_TABLE = {
31
30
  "muse-spark-1.1": { passAt1: 53 },
32
31
  "gpt-5.4": { passAt1: 52 },
33
32
  "gemini-3.6-flash": { passAt1: 49, benchmarkScore: 50 },
33
+ "glm-5.3": { passAt1: 52, benchmarkScore: 60 },
34
34
  "glm-5.2": { passAt1: 44, benchmarkScore: 51 }
35
35
  };
36
36
  var EFFORT_SUFFIXES = ["-extra-low", "-low", "-medium", "-high"];
@@ -51,13 +51,10 @@ function getModelAbility(modelName) {
51
51
  return entry ? { ...entry } : void 0;
52
52
  }
53
53
 
54
- // packages/ai/llm/ollamaCloud.ts
55
- var ollamaCloudModels = platformHostedModels;
56
-
57
54
  // packages/ai/llm/models.ts
58
55
  var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
59
56
  var ALL_MODELS = [
60
- ...withProvider("nolo")(ollamaCloudModels),
57
+ ...withProvider("nolo")(platformHostedModels),
61
58
  ...withProvider("google")(googleModels),
62
59
  ...withProvider("openai")(openAIModels),
63
60
  ...withProvider("openrouter")(openrouterModels),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MEMORY_USE_GUIDANCE,
3
3
  wrapHistoricalSummaryWithReplayGuard
4
- } from "./chunk-XFG3BAKN.js";
4
+ } from "./chunk-FMEVI5TG.js";
5
5
 
6
6
  // packages/agent-runtime/turnContext.ts
7
7
  var DEFAULT_RECENT_CONTENT_LIMIT = 10;
@@ -1,3 +1,7 @@
1
+ import {
2
+ toErrorMessage
3
+ } from "./chunk-HNMXYYJR.js";
4
+
1
5
  // packages/create/editor/transforms/slateToSimplifiedMarkdown.ts
2
6
  function renderTextNode(node) {
3
7
  if (!node || typeof node.text !== "string") return "";
@@ -148,6 +152,70 @@ function slateToSimplifiedMarkdown(nodes, options = {}) {
148
152
  return nodes.map((node) => renderNode(node, 0, options)).join("").trim() + "\n";
149
153
  }
150
154
 
155
+ // packages/ai/tools/readDocTool.ts
156
+ var readDocFunctionSchema = {
157
+ name: "readDoc",
158
+ description: [
159
+ "\u8BFB\u53D6\u6307\u5B9A\u9875\u9762\u7684\u5185\u5BB9\uFF0C\u5E76\u5C06\u7ED3\u6784\u5316\u7684\u6570\u636E\u8F6C\u6362\u4E3A Markdown \u683C\u5F0F\u8FD4\u56DE\u3002",
160
+ "\u5982\u679C\u4F60\u62FF\u5230\u4E86\u9875\u9762\u7684 dbKey\uFF08\u5982 page-xxx\uFF09\uFF0C\u8BF7\u4F7F\u7528\u6B64\u5DE5\u5177\u67E5\u770B\u9875\u9762\u5185\u5BB9\u3002"
161
+ ].join("\n"),
162
+ parameters: {
163
+ type: "object",
164
+ properties: {
165
+ id: {
166
+ type: "string",
167
+ description: "\u9875\u9762/\u6587\u6863\u7684\u6570\u636E\u5E93\u952E\uFF08dbKey\uFF09\uFF0C\u4F8B\u5982 page-xxx\u3002"
168
+ }
169
+ },
170
+ required: ["id"]
171
+ }
172
+ };
173
+ var readPageFunctionSchema = {
174
+ ...readDocFunctionSchema,
175
+ name: "readPage"
176
+ };
177
+ var buildReadDocResult = (pageData) => {
178
+ const markdownContent = slateToSimplifiedMarkdown(pageData.slateData || []);
179
+ const rawData = {
180
+ success: true,
181
+ id: pageData.dbKey,
182
+ title: pageData.title,
183
+ content: markdownContent,
184
+ metadata: {
185
+ spaceId: pageData.spaceId,
186
+ created: pageData.created
187
+ }
188
+ };
189
+ const displayData = `\u5DF2\u6210\u529F\u8BFB\u53D6\u9875\u9762\u300A${pageData.title}\u300B\u3002
190
+
191
+ \u5185\u5BB9\u5982\u4E0B\uFF1A
192
+
193
+ ${markdownContent}`;
194
+ return { rawData, displayData };
195
+ };
196
+ async function readDocFunc(args, thunkApi) {
197
+ const id = args.id ?? args.doc ?? args.docKey ?? args.pageKey ?? args.key;
198
+ if (!id || !id.toLowerCase().startsWith("page-")) {
199
+ throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
200
+ }
201
+ try {
202
+ const { readAction } = await import("./read-6G73BMEY.js");
203
+ const pageData = await readAction({ dbKey: id }, thunkApi);
204
+ if (!pageData) {
205
+ throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
206
+ }
207
+ return buildReadDocResult(pageData);
208
+ } catch (error) {
209
+ throw new Error(`\u8BFB\u53D6\u9875\u9762\u65F6\u51FA\u9519: ${toErrorMessage(error)}`);
210
+ }
211
+ }
212
+ var readPageFunc = readDocFunc;
213
+
151
214
  export {
152
- slateToSimplifiedMarkdown
215
+ slateToSimplifiedMarkdown,
216
+ readDocFunctionSchema,
217
+ readPageFunctionSchema,
218
+ buildReadDocResult,
219
+ readDocFunc,
220
+ readPageFunc
153
221
  };
@@ -1,9 +1,12 @@
1
+ import {
2
+ getPublicImageAgentDefaultProfile
3
+ } from "./chunk-VIDPVFP3.js";
1
4
  import {
2
5
  getApproxPricePerImage
3
6
  } from "./chunk-CWMSB67P.js";
4
7
  import {
5
8
  getModelConfig
6
- } from "./chunk-2K4NDPT5.js";
9
+ } from "./chunk-DFUPZE6V.js";
7
10
  import {
8
11
  asOptionalFiniteNumber
9
12
  } from "./chunk-WWC7I6TA.js";
@@ -11,22 +14,6 @@ import {
11
14
  asOptionalPositiveFiniteNumber
12
15
  } from "./chunk-U6VC4MU4.js";
13
16
 
14
- // packages/ai/agent/utils/publicImageAgentMode.ts
15
- var getPublicImageAgentMode = (agent) => {
16
- if (!agent) return null;
17
- if (agent.imageWorkflow) return agent.imageWorkflow;
18
- return null;
19
- };
20
- var getPublicImageAgentDefaultProfile = (mode) => {
21
- if (mode === "generate") {
22
- return { quality: "medium", size: "1024x1024", outputFormat: "png" };
23
- }
24
- if (mode === "edit") {
25
- return { quality: "medium", size: "auto", outputFormat: "png" };
26
- }
27
- return { quality: "low", size: "auto", outputFormat: "png" };
28
- };
29
-
30
17
  // packages/ai/llm/getPricing.ts
31
18
  var MAX_OUTPUT_TOKENS = 8192;
32
19
  var getModelPricing = (provider, modelName, _requestedServiceTier) => {
@@ -149,8 +136,6 @@ var formatCompactTurnPrice = (amount) => {
149
136
  };
150
137
 
151
138
  export {
152
- getPublicImageAgentMode,
153
- getPublicImageAgentDefaultProfile,
154
139
  getModelPricing,
155
140
  getModelPricingForModel,
156
141
  hasExplicitAgentPricing,
@@ -1,3 +1,6 @@
1
+ import {
2
+ getPublicImageAgentMode
3
+ } from "./chunk-VIDPVFP3.js";
1
4
  import {
2
5
  clipHeadAndTail
3
6
  } from "./chunk-JEXVIMYZ.js";
@@ -5,86 +8,83 @@ import {
5
8
  inlineImageUrlsForCustomProvider,
6
9
  prepareTools,
7
10
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-XDHHF73Q.js";
9
- import {
10
- EMPTY_ASSISTANT_REPAIR_PROMPT
11
- } from "./chunk-AYMOSAHE.js";
12
- import {
13
- accumulateToolCallDelta,
14
- createThinkParserState,
15
- createToolCallTextParserState,
16
- flushThinkParser,
17
- flushToolCallTextParserIntoCallback,
18
- processContentChunkWithToolCallStripping,
19
- processThinkChunk
20
- } from "./chunk-N7J63Q6C.js";
11
+ } from "./chunk-M4NC7NF6.js";
21
12
  import {
22
13
  performFetchRequest
23
- } from "./chunk-W367V5CH.js";
14
+ } from "./chunk-WHD6BG7M.js";
24
15
  import {
25
16
  createSSEParser,
26
- findToolExecutor,
27
- toolDefinitionsByName
28
- } from "./chunk-MITD7CON.js";
29
- import {
30
17
  createToolRunId,
18
+ findToolExecutor,
31
19
  getToolResultErrorData,
20
+ toolDefinitionsByName,
32
21
  toolRunFailed,
33
22
  toolRunSetPending,
34
23
  toolRunStarted,
35
24
  toolRunSucceeded
36
- } from "./chunk-D2BPX6DQ.js";
37
- import {
38
- getPublicImageAgentMode
39
- } from "./chunk-E3APEOIM.js";
25
+ } from "./chunk-HDKRSRYU.js";
40
26
  import {
41
- selectCurrentSpaceId
42
- } from "./chunk-3FCNXC2J.js";
27
+ getCurrentSpaceId
28
+ } from "./chunk-MPZJVZDC.js";
43
29
  import {
44
30
  addToolMessage,
45
- getModelInfo,
46
31
  messageStreamEnd,
47
32
  messageStreaming,
48
33
  updateToolMessage
49
- } from "./chunk-3GZT3L6F.js";
34
+ } from "./chunk-73GINUCW.js";
50
35
  import {
51
36
  streamAgentChatTurn
52
- } from "./chunk-ODS2MVMU.js";
37
+ } from "./chunk-ZJMME4DS.js";
53
38
  import {
54
- toErrorMessage
55
- } from "./chunk-HNMXYYJR.js";
39
+ EMPTY_ASSISTANT_REPAIR_PROMPT
40
+ } from "./chunk-6PO2SYCS.js";
41
+ import {
42
+ accumulateToolCallDelta,
43
+ createThinkParserState,
44
+ createToolCallTextParserState,
45
+ flushThinkParser,
46
+ flushToolCallTextParserIntoCallback,
47
+ processContentChunkWithToolCallStripping,
48
+ processThinkChunk
49
+ } from "./chunk-N7J63Q6C.js";
50
+ import {
51
+ getModelInfo
52
+ } from "./chunk-2H3XIBY4.js";
53
+ import {
54
+ getApiEndpoint
55
+ } from "./chunk-DFUPZE6V.js";
56
56
  import {
57
57
  addActiveController,
58
58
  removeActiveController,
59
59
  tokenUsageLiveUpdate
60
- } from "./chunk-3ASDTTEI.js";
60
+ } from "./chunk-MRWGHF56.js";
61
61
  import {
62
- getApiEndpoint
63
- } from "./chunk-2K4NDPT5.js";
62
+ toErrorMessage
63
+ } from "./chunk-HNMXYYJR.js";
64
64
  import {
65
65
  selectCurrentServer
66
- } from "./chunk-G5GVZAXF.js";
66
+ } from "./chunk-CLP2K7U4.js";
67
67
  import {
68
68
  write
69
- } from "./chunk-LAXMH7JY.js";
69
+ } from "./chunk-57QJXIB6.js";
70
70
  import {
71
- extractCustomId
72
- } from "./chunk-TOW4E763.js";
71
+ createDialogMessageKeyAndId,
72
+ dialogMessageKey,
73
+ toTrimmedString
74
+ } from "./chunk-KMSZPTM6.js";
73
75
  import {
74
76
  createAsyncThunk,
75
77
  selectIdentityToken
76
- } from "./chunk-2IJAKBK2.js";
78
+ } from "./chunk-X664KVEV.js";
77
79
  import {
78
80
  isAbortError
79
- } from "./chunk-5RDLGLAP.js";
80
- import {
81
- createDialogMessageKeyAndId,
82
- dialogMessageKey,
83
- toTrimmedString
84
- } from "./chunk-WHLVPK32.js";
81
+ } from "./chunk-WJSW43QZ.js";
85
82
  import {
86
83
  asTrimmedString
87
84
  } from "./chunk-3EUW3WEO.js";
85
+ import {
86
+ extractCustomId
87
+ } from "./chunk-BJIRLHJR.js";
88
88
  import {
89
89
  isRecord
90
90
  } from "./chunk-KUG52IAP.js";
@@ -1597,7 +1597,7 @@ var sendOpenAICompletionsRequest = async ({
1597
1597
  const controller = new AbortController();
1598
1598
  thunkSignal.addEventListener("abort", () => controller.abort());
1599
1599
  const signal = controller.signal;
1600
- const streamSpaceId = selectCurrentSpaceId(getState()) || void 0;
1600
+ const streamSpaceId = getCurrentSpaceId() || void 0;
1601
1601
  let messageId;
1602
1602
  let msgKey;
1603
1603
  if (parentMessageId) {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-Q76I4SXI.js";
4
+ } from "./chunk-IHEC7VBF.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-V42OE5HT.js";
7
+ } from "./chunk-YDTYDA5W.js";
8
8
  import {
9
9
  toSafeAgentSummary
10
- } from "./chunk-TEYN42N3.js";
10
+ } from "./chunk-2IVEXF7P.js";
11
11
  import {
12
12
  PUBLIC_AGENT_KEY_PREFIX,
13
13
  isOwnedAgentKey,
14
14
  ownedAgentKey,
15
15
  parseOwnedAgentId,
16
16
  publicAgentKey
17
- } from "./chunk-TOW4E763.js";
17
+ } from "./chunk-BJIRLHJR.js";
18
18
 
19
19
  // packages/cli/agentListHelpers.ts
20
20
  function parseAgentRecordId(privateKey, explicitId) {
@@ -82,7 +82,8 @@ function parseAgentListArgs(args) {
82
82
  wantJson: args.includes("--json"),
83
83
  wantSafe: args.includes("--safe"),
84
84
  publicOnly: args.includes("--public-only"),
85
- idsOnly: args.includes("--ids-only")
85
+ idsOnly: args.includes("--ids-only"),
86
+ showUnavailable: args.includes("--show-unavailable")
86
87
  };
87
88
  }
88
89
  async function listLocalCachedAgents(args) {