nolo-cli 0.97.0-alpha.2 → 0.97.1

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 (182) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-G2MRKK2K.js → _executeModel-DYHTQJZC.js} +68 -63
  3. package/{action-YVYQEAAV.js → action-GI44T4DR.js} +10 -10
  4. package/{addContentAction-O7R66HEX.js → addContentAction-B2DRF7P6.js} +9 -9
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-T3I7IXPK.js} +15 -17
  6. package/{agentDeleteCommand-4427YKQF.js → agentDeleteCommand-LLNNP3AM.js} +47 -43
  7. package/{agentEmailCommands-RNBKKO7Q.js → agentEmailCommands-MQOP76DK.js} +90 -82
  8. package/agentListCommands-J3MWAZWO.js +741 -0
  9. package/{agentMachineCommands-FOFX5S2Q.js → agentMachineCommands-EQIRKAZO.js} +42 -38
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-EMZCM6VA.js} +1 -1
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-HF4A42D4.js} +1 -1
  12. package/agentRecordCommands-7MQRBMWZ.js +136 -0
  13. package/{agentRunCommand-2W3Q3A7M.js → agentRunCommand-H6BYSTJ7.js} +90 -80
  14. package/{agentRunControl-WCTKX5VL.js → agentRunControl-2TTTUTSW.js} +2 -2
  15. package/{agentRuntimeLocal-IW3IM5P6.js → agentRuntimeLocal-AY6YNUAL.js} +44 -36
  16. package/{agentSlice-SK47GTN7.js → agentSlice-FOZUXW7X.js} +11 -11
  17. package/{appDeleteCommands-ZXLXNRHF.js → appDeleteCommands-QTTL3QF3.js} +42 -38
  18. package/{appDeployCommands-PWB4YERK.js → appDeployCommands-43LJECGV.js} +42 -38
  19. package/{appDeployStatusCommands-2EZKZP7Y.js → appDeployStatusCommands-L5BKOLYW.js} +42 -38
  20. package/{appGetCommands-JNUKOWHO.js → appGetCommands-HOFZKOPC.js} +42 -38
  21. package/{appListCommands-6X3H67SS.js → appListCommands-I7C3SJCE.js} +42 -38
  22. package/{authCommand-F4EFRRX6.js → authCommand-2YPMMIJN.js} +117 -23
  23. package/{authCommands-RGOGCPP6.js → authCommands-FFDS4FVX.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-CALVIJTX.js} +6 -5
  25. package/{chatQueueReduxAdapter-ZJ555AT2.js → chatQueueReduxAdapter-NMEZRYC2.js} +30 -29
  26. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  27. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  28. package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  29. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  30. package/{chunk-YQTQQX2H.js → chunk-2UV22D2F.js} +1 -1
  31. package/{chunk-7D6Z6AA4.js → chunk-3BFMH6GE.js} +6 -7
  32. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  33. package/{chunk-QIAVMDHY.js → chunk-3LX6YE3P.js} +4 -4
  34. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  35. package/chunk-4LCOCOR5.js +50 -0
  36. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  37. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  38. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  39. package/chunk-5J3PYNUP.js +255 -0
  40. package/chunk-5MMAK75Q.js +15 -0
  41. package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
  42. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  43. package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
  44. package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
  45. package/{chunk-IIVGDG4I.js → chunk-6PHKBY2Q.js} +10 -4
  46. package/{chunk-ASQYTZTR.js → chunk-6ZWMH6TJ.js} +69 -36
  47. package/{chunk-ABQYVJBJ.js → chunk-7CHC4W22.js} +1 -1
  48. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  49. package/{chunk-SDTTBMBU.js → chunk-7WCQEMPB.js} +888 -1079
  50. package/{chunk-BLJWCTRL.js → chunk-AOPCEXTB.js} +1 -1
  51. package/{chunk-WGR3J4Q6.js → chunk-APMUYAPK.js} +17 -4
  52. package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
  53. package/{chunk-RG6JBBX5.js → chunk-AWF3WO5R.js} +166 -13
  54. package/{chunk-GPCZ7UXG.js → chunk-AZRHIN5B.js} +1 -1
  55. package/chunk-BMQ2MJUK.js +153 -0
  56. package/{chunk-B4ZH7KVO.js → chunk-C3VLSD4K.js} +236 -36
  57. package/{chunk-4EZHSKTB.js → chunk-C53ZG23R.js} +2 -2
  58. package/chunk-CHOZJMJS.js +78 -0
  59. package/{chunk-HJUYAD4A.js → chunk-CPUFH46E.js} +8 -8
  60. package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
  61. package/{chunk-BP4XNZRM.js → chunk-CU3QB4HW.js} +3 -3
  62. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  63. package/{chunk-KQ4ONNQD.js → chunk-DAWDCRIG.js} +82 -8
  64. package/{chunk-VLTIYV3X.js → chunk-DCLMZ5TX.js} +4 -4
  65. package/{chunk-UKZDAFYT.js → chunk-DSSTTEKI.js} +6 -10
  66. package/{chunk-L7I247DF.js → chunk-EKS2APRJ.js} +21 -5
  67. package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
  68. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  69. package/chunk-GMZLP5DV.js +82 -0
  70. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  71. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  72. package/{chunk-OIMN34NA.js → chunk-HKTIX4ZE.js} +23 -76
  73. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  74. package/{chunk-H62HCIUP.js → chunk-HYZIYH2H.js} +11 -10
  75. package/{chunk-3VNWWVKB.js → chunk-I3QNET24.js} +30 -17
  76. package/{chunk-WV42OMV7.js → chunk-IAESIMK7.js} +4 -4
  77. package/chunk-JBOO3DKI.js +7808 -0
  78. package/{chunk-O35EJJVP.js → chunk-JJ7P5CIY.js} +56 -34
  79. package/{chunk-OZPMVBJI.js → chunk-JZ5II5UV.js} +15 -20
  80. package/{chunk-JRQFUXY7.js → chunk-KCDUTE5V.js} +96 -19
  81. package/{chunk-QLNJRTKI.js → chunk-KHVJXNRY.js} +100 -100
  82. package/{chunk-ADTY7BWR.js → chunk-L76GP4ER.js} +24 -5
  83. package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
  84. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  85. package/{chunk-53HEEOTT.js → chunk-O26PCYLS.js} +80 -13
  86. package/{chunk-3DII57IT.js → chunk-O2OWEFII.js} +1 -1
  87. package/{chunk-TDRTS7QW.js → chunk-O6JPWEEK.js} +77 -17
  88. package/chunk-OCZKATRC.js +129 -0
  89. package/{chunk-6D6VBVEW.js → chunk-OTEMQQZI.js} +80 -14
  90. package/chunk-P6GMCCAT.js +870 -0
  91. package/{chunk-3SK4LEIH.js → chunk-PLRLUZWS.js} +853 -209
  92. package/{chunk-DHDMC6FO.js → chunk-QKUMVP3O.js} +11 -6
  93. package/{chunk-X4QAVDFE.js → chunk-RMAWULCS.js} +498 -480
  94. package/{chunk-V4MJDUSR.js → chunk-RSEEDUMS.js} +2 -2
  95. package/{chunk-UZGQNTVW.js → chunk-S5XGT6GB.js} +5 -3
  96. package/{chunk-76WEAXJB.js → chunk-SACTCJAC.js} +18 -15
  97. package/{chunk-AFUORTY4.js → chunk-SONWNI3L.js} +21 -21
  98. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  99. package/{chunk-2YMRWISD.js → chunk-TU5NE4U3.js} +9 -84
  100. package/chunk-TY3TIUJK.js +89 -0
  101. package/chunk-UEGYKNHO.js +13349 -0
  102. package/chunk-UNYJU5L6.js +780 -0
  103. package/{chunk-J4MOO56S.js → chunk-UQNS32WZ.js} +10 -2
  104. package/chunk-VIWDGTDA.js +8 -0
  105. package/chunk-VJVNU77E.js +83 -0
  106. package/{chunk-EHKBVWKL.js → chunk-VYN7O3OY.js} +1 -1
  107. package/{chunk-NEDZDG3M.js → chunk-WILHZY7K.js} +45 -45
  108. package/{chunk-UKWGR5SS.js → chunk-WIWM4FE3.js} +187 -398
  109. package/{chunk-R7N5TMTV.js → chunk-X7YLNILS.js} +13 -13
  110. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  111. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  112. package/{chunk-SNPMM7H3.js → chunk-Y6AZRODX.js} +13 -13
  113. package/{chunk-RSJECD7I.js → chunk-YJKDTJ2X.js} +7 -7
  114. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  115. package/{chunk-TOP2VXOR.js → chunk-Z4CSIXYP.js} +2 -2
  116. package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
  117. package/chunk-ZRAU6T47.js +56 -0
  118. package/{chunk-Z77CRGTW.js → chunk-ZYWQNCBN.js} +1 -1
  119. package/commandRegistry-HUFXCF7Z.js +833 -0
  120. package/{contentThunks-YLWTUILV.js → contentThunks-TD5YOAQM.js} +32 -30
  121. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  122. package/{createAgentAutomationAction-HFLPOBWQ.js → createAgentAutomationAction-XUG62ANM.js} +32 -30
  123. package/{createDialogAction-4H52MURR.js → createDialogAction-L3CMZKNL.js} +36 -33
  124. package/{createPageAction-5YDRMJOS.js → createPageAction-WJ3MX6JS.js} +38 -36
  125. package/{chunk-NUVMWYJM.js → cursorProvider-YGGNMVWX.js} +2494 -9892
  126. package/{dbSlice-XVWBAGYN.js → dbSlice-DQ32LYTJ.js} +8 -8
  127. package/{deleteFile-YG6QMJLU.js → deleteFile-NX6QHCWZ.js} +3 -3
  128. package/{dialogCommands-KFK2FF5B.js → dialogCommands-VM3I4HBW.js} +45 -41
  129. package/{dialogSlice-TMSHUGEM.js → dialogSlice-DSHG3YUE.js} +36 -29
  130. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  131. package/{docCreateCommands-V777WOZ7.js → docCreateCommands-TYUJPCOP.js} +44 -40
  132. package/{docDeleteCommands-5KHT7Z5Q.js → docDeleteCommands-5XEG2LXO.js} +44 -40
  133. package/{docReadCommands-BLROGWP3.js → docReadCommands-M6RO6QHV.js} +43 -39
  134. package/{docStore-OBC5QOW7.js → docStore-RYOGMPEF.js} +11 -10
  135. package/{docUpdateCommands-QXOZHQ5H.js → docUpdateCommands-DKOFTZRX.js} +44 -40
  136. package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
  137. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +3 -3
  138. package/{handleSendMessageAction-4LGNXH6T.js → handleSendMessageAction-XH742B27.js} +91 -83
  139. package/index.js +87 -884
  140. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
  141. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
  142. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
  143. package/{machineCommands-SNLCRHQK.js → machineCommands-EY3SKJCP.js} +85 -77
  144. package/{machineWsRunDispatch-ZGZVDQSO.js → machineWsRunDispatch-OJ77YNRD.js} +82 -74
  145. package/{memberThunks-QGFLFVCI.js → memberThunks-5ZXPR63F.js} +9 -9
  146. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  147. package/oauthTokenStore-ITEB663N.js +23 -0
  148. package/package.json +1 -1
  149. package/pdf-U6KSUEZZ.js +26435 -0
  150. package/processSpawn-SOAV3FEV.js +11 -0
  151. package/profileConfig-ZGOFORWV.js +43 -0
  152. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-76AVU3HD.js} +7 -7
  153. package/{providerRegistry-757OWH3O.js → providerRegistry-Z62NC45X.js} +11 -7
  154. package/{read-COE3ZYR6.js → read-EPTJRAEF.js} +5 -5
  155. package/{readDocTool-5USN4A6V.js → readDocTool-W4NDXNEX.js} +5 -3
  156. package/{readlineWorkspace-OUL7ZN7D.js → readlineWorkspace-PMTHAVMB.js} +2447 -2022
  157. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-BVAWQKXE.js} +17 -19
  158. package/{runAgentClientLoop-GD3APV7V.js → runAgentClientLoop-7WXN6I7L.js} +62 -58
  159. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
  160. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  161. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-LYY45IAD.js} +12 -11
  162. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-73IL7DLU.js} +18 -20
  163. package/{settingSlice-ZQZVUPKK.js → settingSlice-Q6EKL7EQ.js} +9 -9
  164. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  165. package/{spaceCommands-TIDVUPDV.js → spaceCommands-QFP4ZXKG.js} +44 -40
  166. package/{streamAgentChatTurn-M73KWCCU.js → streamAgentChatTurn-B4PXPJJS.js} +184 -91
  167. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-UUXDSQ6X.js} +15 -17
  168. package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
  169. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-INIQCPGY.js} +3 -3
  170. package/{tools-DXXDQ2CP.js → tools-QFS2L7BU.js} +55 -51
  171. package/{tuiSummaryLlmCaller-VJY3YD2Q.js → tuiSummaryLlmCaller-74NRRLVW.js} +18 -16
  172. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  173. package/{updateDialogTitleAction-XI73NQMU.js → updateDialogTitleAction-HTDYCNNZ.js} +81 -43
  174. package/agentListCommands-O4AEMQVV.js +0 -406
  175. package/agentRecordCommands-6QK7AMXQ.js +0 -128
  176. package/chunk-M76ECQRD.js +0 -13658
  177. package/chunk-Q5FJJ6XI.js +0 -103
  178. package/chunk-S7Z2HMCN.js +0 -25
  179. package/chunk-WRFW73PB.js +0 -18881
  180. package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
  181. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  182. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-X4QAVDFE.js";
3
+ } from "./chunk-RMAWULCS.js";
4
4
  import {
5
- i18n_default
6
- } from "./chunk-WRFW73PB.js";
5
+ runtime_default
6
+ } from "./chunk-UEGYKNHO.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
- } from "./chunk-O6OSWFZQ.js";
9
+ } from "./chunk-XUWRURDF.js";
10
10
  import {
11
11
  isNoloHostedProvider
12
- } from "./chunk-Q67DOFOO.js";
12
+ } from "./chunk-Y3PMXGLH.js";
13
13
  import {
14
14
  asTrimmedLowercaseString
15
15
  } from "./chunk-QSJ3HFEF.js";
@@ -17,94 +17,6 @@ import {
17
17
  isRecord
18
18
  } from "./chunk-KUG52IAP.js";
19
19
 
20
- // packages/ai/chat/inlineImageUrlsForCustomProvider.ts
21
- var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
22
- var shouldInlineImageUrlsForAgent = (agentConfig) => {
23
- const apiSource = agentConfig?.apiSource?.toLowerCase();
24
- const provider = agentConfig?.provider?.toLowerCase();
25
- const model = agentConfig?.model?.toLowerCase();
26
- if (apiSource === "custom" || provider === "custom") return true;
27
- if (isNoloHostedProvider(provider)) return true;
28
- return provider === "openrouter" && model === "minimax/minimax-m3";
29
- };
30
- var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
31
- var bytesToBase64 = (bytes) => {
32
- let binary = "";
33
- for (const byte of bytes) {
34
- binary += String.fromCharCode(byte);
35
- }
36
- return btoa(binary);
37
- };
38
- var defaultFetchImage = async (url) => {
39
- const response = await fetch(url);
40
- if (!response.ok) {
41
- return {
42
- ok: false,
43
- error: `HTTP ${response.status}`
44
- };
45
- }
46
- const bytes = new Uint8Array(await response.arrayBuffer());
47
- return {
48
- ok: true,
49
- mimeType: response.headers.get("content-type") ?? "application/octet-stream",
50
- bytes
51
- };
52
- };
53
- var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
54
- const url = part?.image_url?.url;
55
- if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
56
- return part;
57
- }
58
- const result = await fetchImage(url);
59
- if (!result.ok || !result.bytes) return part;
60
- const mimeType = result.mimeType || "application/octet-stream";
61
- return {
62
- ...part,
63
- image_url: {
64
- ...part.image_url,
65
- url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
66
- }
67
- };
68
- };
69
- var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
70
- if (!options.shouldInline) return bodyData;
71
- const body = bodyData;
72
- if (!Array.isArray(body?.messages)) return bodyData;
73
- const fetchImage = options.fetchImage ?? defaultFetchImage;
74
- let changed = false;
75
- const messages = [];
76
- for (const message of body.messages) {
77
- if (!Array.isArray(message?.content)) {
78
- messages.push(message);
79
- continue;
80
- }
81
- const content = await Promise.all(
82
- message.content.map(async (part) => {
83
- if (part?.type !== "image_url") return part;
84
- return cloneImagePartWithDataUrl(
85
- part,
86
- fetchImage,
87
- options.isAllowedImageUrl
88
- );
89
- })
90
- );
91
- let messageChanged = false;
92
- for (let i = 0; i < content.length; i++) {
93
- if (content[i] !== message.content[i]) {
94
- changed = true;
95
- messageChanged = true;
96
- break;
97
- }
98
- }
99
- messages.push(messageChanged ? { ...message, content } : message);
100
- }
101
- if (!changed) return bodyData;
102
- return {
103
- ...body,
104
- messages
105
- };
106
- };
107
-
108
20
  // packages/ai/tools/toolSchemaCompatibility.ts
109
21
  var COMPOSITION_KEYS = ["anyOf", "oneOf", "allOf"];
110
22
  var LIMITED_JSON_SCHEMA_PROVIDERS = /* @__PURE__ */ new Set([
@@ -151,12 +63,12 @@ var PREPARE_TOOLS_CACHE_LIMIT = 128;
151
63
  var warnedUnknownToolNames = /* @__PURE__ */ new Set();
152
64
  function getTranslation(keys, defaultVal) {
153
65
  for (const key of keys) {
154
- if (i18n_default.exists(key)) {
155
- return i18n_default.t(key);
66
+ if (runtime_default.exists(key)) {
67
+ return runtime_default.t(key);
156
68
  }
157
69
  const aiKey = key.startsWith("ai:") ? key : `ai:${key}`;
158
- if (i18n_default.exists(aiKey)) {
159
- return i18n_default.t(aiKey);
70
+ if (runtime_default.exists(aiKey)) {
71
+ return runtime_default.t(aiKey);
160
72
  }
161
73
  }
162
74
  return defaultVal;
@@ -203,7 +115,7 @@ function translateSchema(schema) {
203
115
  return nextSchema;
204
116
  }
205
117
  function currentI18nLanguage() {
206
- return typeof i18n_default.language === "string" ? i18n_default.language : "";
118
+ return typeof runtime_default.language === "string" ? runtime_default.language : "";
207
119
  }
208
120
  function translateSchemaCached(schema) {
209
121
  if (!schema || typeof schema !== "object") return schema;
@@ -268,8 +180,96 @@ var prepareTools = (toolNames, options) => {
268
180
  return prepared.slice();
269
181
  };
270
182
 
183
+ // packages/ai/chat/inlineImageUrlsForCustomProvider.ts
184
+ var FILE_CONTENT_PATH = "/api/v1/db/file/content/";
185
+ var shouldInlineImageUrlsForAgent = (agentConfig) => {
186
+ const apiSource = agentConfig?.apiSource?.toLowerCase();
187
+ const provider = agentConfig?.provider?.toLowerCase();
188
+ const model = agentConfig?.model?.toLowerCase();
189
+ if (apiSource === "custom" || provider === "custom") return true;
190
+ if (isNoloHostedProvider(provider)) return true;
191
+ return provider === "openrouter" && model === "minimax/minimax-m3";
192
+ };
193
+ var isInlineCandidate = (url) => /^https?:\/\//i.test(url) && url.includes(FILE_CONTENT_PATH);
194
+ var bytesToBase64 = (bytes) => {
195
+ let binary = "";
196
+ for (const byte of bytes) {
197
+ binary += String.fromCharCode(byte);
198
+ }
199
+ return btoa(binary);
200
+ };
201
+ var defaultFetchImage = async (url) => {
202
+ const response = await fetch(url);
203
+ if (!response.ok) {
204
+ return {
205
+ ok: false,
206
+ error: `HTTP ${response.status}`
207
+ };
208
+ }
209
+ const bytes = new Uint8Array(await response.arrayBuffer());
210
+ return {
211
+ ok: true,
212
+ mimeType: response.headers.get("content-type") ?? "application/octet-stream",
213
+ bytes
214
+ };
215
+ };
216
+ var cloneImagePartWithDataUrl = async (part, fetchImage, isAllowedImageUrl) => {
217
+ const url = part?.image_url?.url;
218
+ if (typeof url !== "string" || !isInlineCandidate(url) || isAllowedImageUrl && !isAllowedImageUrl(url)) {
219
+ return part;
220
+ }
221
+ const result = await fetchImage(url);
222
+ if (!result.ok || !result.bytes) return part;
223
+ const mimeType = result.mimeType || "application/octet-stream";
224
+ return {
225
+ ...part,
226
+ image_url: {
227
+ ...part.image_url,
228
+ url: `data:${mimeType};base64,${bytesToBase64(result.bytes)}`
229
+ }
230
+ };
231
+ };
232
+ var inlineImageUrlsForCustomProvider = async (bodyData, options) => {
233
+ if (!options.shouldInline) return bodyData;
234
+ const body = bodyData;
235
+ if (!Array.isArray(body?.messages)) return bodyData;
236
+ const fetchImage = options.fetchImage ?? defaultFetchImage;
237
+ let changed = false;
238
+ const messages = [];
239
+ for (const message of body.messages) {
240
+ if (!Array.isArray(message?.content)) {
241
+ messages.push(message);
242
+ continue;
243
+ }
244
+ const content = await Promise.all(
245
+ message.content.map(async (part) => {
246
+ if (part?.type !== "image_url") return part;
247
+ return cloneImagePartWithDataUrl(
248
+ part,
249
+ fetchImage,
250
+ options.isAllowedImageUrl
251
+ );
252
+ })
253
+ );
254
+ let messageChanged = false;
255
+ for (let i = 0; i < content.length; i++) {
256
+ if (content[i] !== message.content[i]) {
257
+ changed = true;
258
+ messageChanged = true;
259
+ break;
260
+ }
261
+ }
262
+ messages.push(messageChanged ? { ...message, content } : message);
263
+ }
264
+ if (!changed) return bodyData;
265
+ return {
266
+ ...body,
267
+ messages
268
+ };
269
+ };
270
+
271
271
  export {
272
+ prepareTools,
272
273
  shouldInlineImageUrlsForAgent,
273
- inlineImageUrlsForCustomProvider,
274
- prepareTools
274
+ inlineImageUrlsForCustomProvider
275
275
  };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-NUVMWYJM.js";
3
+ } from "./chunk-JBOO3DKI.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-LS2ZANRJ.js";
6
+ } from "./chunk-CTUQJVQM.js";
7
7
  import {
8
8
  buildCreatedAgentRecord,
9
9
  buildUpdatedAgentRecord,
@@ -12,7 +12,7 @@ import {
12
12
  resolveAgentRecordFromHybridStore,
13
13
  sanitizeAgentRecordForCliOutput,
14
14
  writeAgentRecord
15
- } from "./chunk-76WEAXJB.js";
15
+ } from "./chunk-SACTCJAC.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-SV5IJK6K.js";
@@ -212,7 +212,7 @@ async function runAgentCreateCommand(args, deps = {}) {
212
212
  clearCliLocalRuntimePreparedAgentCache();
213
213
  let verifyResult;
214
214
  if (parsed.verify) {
215
- const { verifyCustomProvider } = await import("./agentProviderCommands-GNPTL5XR.js");
215
+ const { verifyCustomProvider } = await import("./agentProviderCommands-EMZCM6VA.js");
216
216
  const rec = built.nextRecord;
217
217
  verifyResult = await verifyCustomProvider({
218
218
  providerUrl: rec.customProviderUrl,
@@ -222,15 +222,34 @@ async function runAgentCreateCommand(args, deps = {}) {
222
222
  fetchImpl
223
223
  });
224
224
  }
225
+ const apiKeyRef = String(built.updates?.apiKeyRef || "").trim();
226
+ let authHint;
227
+ const OAUTH_REFS = /* @__PURE__ */ new Set(["claude", "chatgpt", "xai", "antigravity", "cloudflare"]);
228
+ if (apiKeyRef && OAUTH_REFS.has(apiKeyRef)) {
229
+ try {
230
+ const { createOAuthTokenStore } = await import("./oauthTokenStore-ITEB663N.js");
231
+ const store = createOAuthTokenStore();
232
+ if (!store.read(apiKeyRef)) {
233
+ authHint = `Subscription "${apiKeyRef}" is not authorized yet. Run \`nolo auth ${apiKeyRef}\` to log in.`;
234
+ }
235
+ } catch {
236
+ }
237
+ }
225
238
  output.write(JSON.stringify({
226
239
  ok: true,
227
240
  agentKey: built.agentKey,
228
241
  baseUrl: built.serverUrl,
229
242
  updates: sanitizeAgentRecordForCliOutput(built.updates),
230
243
  record: sanitizeAgentRecordForCliOutput(built.nextRecord),
231
- ...verifyResult ? { verify: verifyResult } : {}
244
+ ...verifyResult ? { verify: verifyResult } : {},
245
+ ...authHint ? { hint: authHint } : {}
232
246
  }, null, 2));
233
247
  output.write("\n");
248
+ if (authHint) {
249
+ const errorOutput = deps.error ?? process.stderr;
250
+ errorOutput.write(`[nolo] Hint: ${authHint}
251
+ `);
252
+ }
234
253
  return 0;
235
254
  } catch (error) {
236
255
  output.write(
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageRange
3
- } from "./chunk-VMFTFOWF.js";
3
+ } from "./chunk-3AH7LNUB.js";
4
4
  import {
5
5
  isTombstoneRecord
6
6
  } from "./chunk-GBRG75BQ.js";