nolo-cli 0.156.0-alpha.2 → 0.156.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 (164) hide show
  1. package/{_executeModel-5WS2PA62.js → _executeModel-3FMHTHSS.js} +55 -55
  2. package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
  3. package/{action-ZJYUBXFC.js → action-GPPJC5TI.js} +5 -5
  4. package/{addContentAction-TVHB4526.js → addContentAction-XJQEJ4XW.js} +8 -8
  5. package/{addDialogAgentAction-FDPBU6K6.js → addDialogAgentAction-5WZX5CAY.js} +7 -7
  6. package/{agentDeleteCommand-MDC7OS3I.js → agentDeleteCommand-VRHLJZKX.js} +75 -76
  7. package/{agentEmailCommands-WN4EOPKQ.js → agentEmailCommands-YGBQXOL3.js} +78 -79
  8. package/{agentListCommands-G36AMSBR.js → agentListCommands-GOCGOQUB.js} +36 -36
  9. package/{agentMachineCommands-63GXO27A.js → agentMachineCommands-FBAWZYHI.js} +35 -32
  10. package/{agentProviderCommands-X2HQE6HY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-X4WJRHDW.js → agentRecordCommands-KAK2G56H.js} +72 -73
  13. package/{agentRunCommand-4YMIVVHF.js → agentRunCommand-62P3AGJA.js} +75 -75
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-Q7ZOMZC7.js → agentRuntimeLocal-J6I63NZC.js} +21 -19
  16. package/{agentSlice-E3XS5FTQ.js → agentSlice-IZFU3WWH.js} +8 -8
  17. package/{appDeleteCommands-MMWT54BR.js → appDeleteCommands-KKLAK2UR.js} +31 -29
  18. package/{appDeployCommands-OIFXVDOF.js → appDeployCommands-PXWK4FAX.js} +31 -29
  19. package/{appDeployStatusCommands-OTXMSDFB.js → appDeployStatusCommands-3NGWDZTX.js} +31 -29
  20. package/{appGetCommands-JPY36ANL.js → appGetCommands-APWYPEO3.js} +31 -29
  21. package/{appListCommands-IHJGN36O.js → appListCommands-OP7IRALO.js} +31 -29
  22. package/{authCommand-J3XILHWW.js → authCommand-3Z52KJID.js} +22 -302
  23. package/{authCommands-77CHYBGF.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-A6VSPJEJ.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
  26. package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
  27. package/{chunk-H4KACZMG.js → chunk-2QQ7D3P5.js} +271 -138
  28. package/{chunk-C5VPAHIU.js → chunk-32ZKZET7.js} +1 -1
  29. package/{chunk-FPWT3RH2.js → chunk-36IWXF25.js} +22 -22
  30. package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
  31. package/{chunk-3XZKV7QQ.js → chunk-3L5MSPWX.js} +1 -1
  32. package/{chunk-QLQ573SU.js → chunk-3M52COK5.js} +120 -0
  33. package/{chunk-Z6KQDSZW.js → chunk-43OFVLWJ.js} +6 -6
  34. package/{chunk-7A4LJCDR.js → chunk-4FDDVVCE.js} +5 -5
  35. package/{chunk-TJ2VPCBE.js → chunk-4JCAW7TO.js} +2 -2
  36. package/{chunk-6TF64IF2.js → chunk-4L4K6YR7.js} +16 -2
  37. package/{chunk-ZG73GDYU.js → chunk-5E5VB7PS.js} +332 -59
  38. package/{chunk-HKT6QXP3.js → chunk-5IKRTRRR.js} +5 -5
  39. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  40. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  41. package/{chunk-RUNKPFM5.js → chunk-6QIBWOPT.js} +12 -8
  42. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  43. package/{chunk-7GC3EKUG.js → chunk-7PDNSQZC.js} +3 -3
  44. package/{chunk-DW7MGLMG.js → chunk-7YQQXP42.js} +35 -207
  45. package/{chunk-WZ6OU4NX.js → chunk-BAWAKW7X.js} +2 -2
  46. package/{chunk-UUPR3TD7.js → chunk-BL4HFN6L.js} +2 -4
  47. package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
  48. package/{chunk-HP6O6LTV.js → chunk-CDLP56BS.js} +9 -9
  49. package/{chunk-4LRK5Q2Z.js → chunk-CI6YDDL2.js} +18 -17
  50. package/{chunk-5MM7NNO6.js → chunk-CNWKLQRL.js} +8 -3
  51. package/{chunk-UTIMX333.js → chunk-DJ2BOPJY.js} +1 -1
  52. package/{chunk-36OMEXXR.js → chunk-DLV3H464.js} +8 -8
  53. package/{chunk-X5SUT4CN.js → chunk-EDJND3FK.js} +6 -6
  54. package/{chunk-CE7PIHQD.js → chunk-ESMZW5PE.js} +3 -3
  55. package/{chunk-PSJWPSKS.js → chunk-EWO77ZGF.js} +9 -43
  56. package/{chunk-ZWG3C7VI.js → chunk-F3SOW2EU.js} +81 -1
  57. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  58. package/chunk-FTHF2P2I.js +2685 -0
  59. package/{chunk-7KYVUFDG.js → chunk-G3VYRPTV.js} +5 -267
  60. package/{chunk-NQ64VVAI.js → chunk-GXZZOTDM.js} +826 -689
  61. package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
  62. package/{chunk-6KVZAZJA.js → chunk-HRZW3SQN.js} +7 -7
  63. package/{chunk-B2EGWZJG.js → chunk-I7S63QUU.js} +1 -1
  64. package/{chunk-ROPSATAB.js → chunk-IF7V3CBU.js} +1 -1
  65. package/{chunk-T6CBQ6BN.js → chunk-INFHX73M.js} +1 -1
  66. package/{chunk-YBNHPX4S.js → chunk-IW64YHXL.js} +155 -31
  67. package/{chunk-VSOWPETY.js → chunk-JIAZK434.js} +10 -10
  68. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  69. package/{chunk-TZTWMGE3.js → chunk-JWEXJ573.js} +3 -3
  70. package/{chunk-OH2M7WEU.js → chunk-K3N2DWLT.js} +3 -3
  71. package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
  72. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  73. package/{chunk-EM3YOZJ4.js → chunk-L2JMH4I5.js} +3 -3
  74. package/{chunk-D4OWHT5Y.js → chunk-MAYW6V3E.js} +2 -2
  75. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  76. package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
  77. package/{chunk-6MPAEODB.js → chunk-NHEWV5FD.js} +17 -3
  78. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  79. package/{chunk-WP6RXNE6.js → chunk-PNACBSRF.js} +134 -126
  80. package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
  81. package/{chunk-SKPPKHD3.js → chunk-Q5LVXPGT.js} +2 -2
  82. package/{chunk-2MTE2PEH.js → chunk-QA2C5NKI.js} +5 -739
  83. package/{chunk-XFKZ3MCV.js → chunk-QFL42TMV.js} +251 -77
  84. package/{chunk-L6EQV5OC.js → chunk-QXZH5UDF.js} +3 -3
  85. package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
  86. package/{chunk-4Z245KOA.js → chunk-SH3XD4E2.js} +8 -4
  87. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  88. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  89. package/chunk-TT644UJD.js +188 -0
  90. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  91. package/{chunk-KOB75UNU.js → chunk-U5U4WAFS.js} +19 -3
  92. package/{chunk-ANJTRG52.js → chunk-ULQAD7ZY.js} +18 -43
  93. package/{chunk-FDT27L7S.js → chunk-UUPXTEZA.js} +19 -17
  94. package/{chunk-QDA4Y5O6.js → chunk-V67W64OY.js} +21 -17
  95. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  96. package/{chunk-HXHSTRGH.js → chunk-VYNMQ6HW.js} +0 -27
  97. package/{chunk-G47IPDOK.js → chunk-W7FGZRLK.js} +1 -1
  98. package/{chunk-7BSQK2UC.js → chunk-WRCZXJ4N.js} +2 -2
  99. package/{chunk-KX6LPG7W.js → chunk-WYJTNSVL.js} +9 -9
  100. package/chunk-Y5GCAMGP.js +9 -0
  101. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  102. package/{chunk-SCJD2PNK.js → chunk-YPG7TUQD.js} +3 -3
  103. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  104. package/{chunk-TYND6RDQ.js → chunk-ZZDVBZOP.js} +74 -3
  105. package/{commandRegistry-NE2JOCQT.js → commandRegistry-2DDDET7G.js} +88 -96
  106. package/{contentThunks-B3FRQGP7.js → contentThunks-5DNEHJ2Z.js} +21 -21
  107. package/{createAgentAutomationAction-T2YFJ6MY.js → createAgentAutomationAction-4SUS2EFX.js} +21 -21
  108. package/{createDialogAction-2NFGFBXW.js → createDialogAction-JSFXX6JE.js} +25 -25
  109. package/{createPageAction-LDAVZDN7.js → createPageAction-37HHOXZ2.js} +24 -25
  110. package/{dbSlice-5QGKMQLO.js → dbSlice-6PVPY44C.js} +7 -7
  111. package/{deleteFile-EW6QNRRT.js → deleteFile-YM6NDPAR.js} +5 -5
  112. package/{dialogCommands-H3K7PTF6.js → dialogCommands-ZJRMCP4S.js} +35 -32
  113. package/{dialogSlice-64S3J6CP.js → dialogSlice-2Z66AWEW.js} +20 -20
  114. package/{dist-NJC2W7I4.js → dist-Q2JSMAKA.js} +7 -361
  115. package/{docCreateCommands-KP64KMVL.js → docCreateCommands-KQHQNLRX.js} +32 -30
  116. package/{docDeleteCommands-C3F4SZSR.js → docDeleteCommands-O3DWFX2W.js} +33 -31
  117. package/{docReadCommands-7H6BDOUR.js → docReadCommands-2U2BUONC.js} +32 -30
  118. package/{docStore-NIP7OO4I.js → docStore-XMTUF3GX.js} +8 -8
  119. package/{docUpdateCommands-JDW4BRBH.js → docUpdateCommands-MF3C52XI.js} +32 -30
  120. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  121. package/{handleSendMessageAction-TOKA7ED7.js → handleSendMessageAction-4VFVXTF2.js} +43 -39
  122. package/index.js +8 -8
  123. package/{localRuntimeAdapter-OPPDLUG3.js → localRuntimeAdapter-KKIVRYVN.js} +70 -69
  124. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  125. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  126. package/{machineCommands-OPLQR7XY.js → machineCommands-UHQVCOD3.js} +80 -79
  127. package/{machineWsRunDispatch-PTS42QDK.js → machineWsRunDispatch-TX4X7TOJ.js} +70 -71
  128. package/{memberThunks-KRV5YXOB.js → memberThunks-AZINUM4S.js} +10 -10
  129. package/package.json +6 -2
  130. package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
  131. package/{providerPresetApply-CRZFMQD5.js → providerPresetApply-PKUOHQJT.js} +5 -5
  132. package/{providerRegistry-7IS43D3X.js → providerRegistry-HNQLIFN2.js} +5 -5
  133. package/{read-5KAZHHDM.js → read-7JPIWRBQ.js} +5 -5
  134. package/{readDocTool-5QO34OSX.js → readDocTool-AAQTB2Y3.js} +1 -1
  135. package/{readlineWorkspace-3XC7SEMZ.js → readlineWorkspace-BFVB2ON5.js} +375 -200
  136. package/{removeDialogAgentAction-6X63HMI3.js → removeDialogAgentAction-RMVRILLK.js} +9 -9
  137. package/{runAgentClientLoop-5QIGEALK.js → runAgentClientLoop-HHLHNMBE.js} +59 -54
  138. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  139. package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
  140. package/{setDialogExtraReferencesAction-4MAYKKYW.js → setDialogExtraReferencesAction-L3V7JTMG.js} +8 -8
  141. package/{setPrimaryDialogAgentAction-EGBAMREH.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +9 -9
  142. package/settingThunks-N6XFWPOU.js +923 -0
  143. package/{spaceCommands-JQN7D4FE.js → spaceCommands-NDPGHDMD.js} +29 -27
  144. package/{streamAgentChatTurn-456DWXNY.js → streamAgentChatTurn-KNPOLET7.js} +154 -95
  145. package/{switchDialogAgentAction-YBKTD6DO.js → switchDialogAgentAction-ZJ5CGU7J.js} +7 -7
  146. package/{tableCommands-U3QDY4L6.js → tableCommands-IVC5S7Y3.js} +11 -11
  147. package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
  148. package/{tools-IWNXKK4Y.js → tools-ULA7XJQT.js} +43 -44
  149. package/{tuiSummaryLlmCaller-KLK6K3Q3.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  150. package/{updateCommands-NQXAGFM7.js → updateCommands-FJHGWD3Q.js} +5 -3
  151. package/{updateDialogTitleAction-SX53FZWO.js → updateDialogTitleAction-VUIVBDAS.js} +21 -21
  152. package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
  153. package/chunk-IA7TRNNR.js +0 -11
  154. package/chunk-UKZX3NHN.js +0 -48
  155. package/chunk-VAZHH6FO.js +0 -7012
  156. package/chunk-W4S6OTSC.js +0 -35
  157. package/clipboardy-GCO3GT3I.js +0 -11793
  158. package/settingThunks-FTDRZNSJ.js +0 -1371
  159. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  160. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  161. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  162. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  163. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  164. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
@@ -1,7 +1,13 @@
1
+ import {
2
+ resolveAgentCallPlan
3
+ } from "./chunk-TT644UJD.js";
4
+ import {
5
+ SUBSCRIPTION_OAUTH_PROVIDERS
6
+ } from "./chunk-EWO77ZGF.js";
1
7
  import {
2
8
  findModelConfig,
3
9
  getProviderByModelName
4
- } from "./chunk-TRW43TSC.js";
10
+ } from "./chunk-6EQD4AQL.js";
5
11
  import {
6
12
  asOptionalTrimmedString
7
13
  } from "./chunk-G3SUCT4W.js";
@@ -90,16 +96,18 @@ var lookupKnownModelVision = (provider, model) => {
90
96
  if (provider && provider !== "custom") {
91
97
  const direct = findModelConfig(provider, candidate);
92
98
  if (direct && typeof direct.hasVision === "boolean") return direct.hasVision;
93
- }
94
- const detected = getProviderByModelName(candidate);
95
- if (detected) {
96
- const found = findModelConfig(detected, candidate)?.hasVision;
97
- if (found !== void 0) return found;
99
+ } else {
100
+ const detected = getProviderByModelName(candidate);
101
+ if (detected) {
102
+ const found = findModelConfig(detected, candidate)?.hasVision;
103
+ if (found !== void 0) return found;
104
+ }
98
105
  }
99
106
  if (candidate.includes("/")) {
100
107
  const slash = candidate.indexOf("/");
101
108
  const modelProvider = candidate.slice(0, slash).toLowerCase();
102
109
  const modelName = candidate.slice(slash + 1);
110
+ if (provider && provider !== "custom" && provider !== modelProvider) continue;
103
111
  const nested = findModelConfig(modelProvider, modelName);
104
112
  if (nested && typeof nested.hasVision === "boolean") return nested.hasVision;
105
113
  }
@@ -108,12 +116,22 @@ var lookupKnownModelVision = (provider, model) => {
108
116
  };
109
117
  var resolveAgentImageInputSupport = (agent) => {
110
118
  if (!agent) return true;
111
- const provider = asTrimmedLowercaseString(agent.provider) || null;
119
+ const provider = asTrimmedLowercaseString(agent.provider) || asTrimmedLowercaseString(agent.apiSource) || null;
112
120
  const model = asOptionalTrimmedString(agent.model) ?? "";
113
- const catalogHasVision = lookupKnownModelVision(
114
- provider,
115
- model
116
- );
121
+ const { authMethod } = resolveAgentCallPlan({
122
+ key: "",
123
+ provider: agent.provider ?? void 0,
124
+ apiSource: agent.apiSource ?? void 0,
125
+ cliProvider: agent.cliProvider ?? void 0,
126
+ model,
127
+ apiKeyRef: agent.apiKeyRef ?? void 0,
128
+ customProviderUrl: agent.customProviderUrl ?? void 0,
129
+ apiKey: agent.apiKey ?? void 0,
130
+ useServerProxy: agent.useServerProxy ?? void 0
131
+ });
132
+ const catalogHasVision = authMethod.kind === "oauth" ? SUBSCRIPTION_OAUTH_PROVIDERS.find((entry) => entry.apiKeyRef === authMethod.ref)?.modelOptions.find(
133
+ (entry) => [model, stripEffortSuffix(model), stripPreviewSuffix(model)].includes(entry.id)
134
+ )?.hasVision : lookupKnownModelVision(provider, model);
117
135
  if (catalogHasVision !== void 0) {
118
136
  return catalogHasVision;
119
137
  }
@@ -5,10 +5,10 @@ import {
5
5
  } from "./chunk-NBTY7YJF.js";
6
6
  import {
7
7
  resolveCliLocalRuntimeKeyCapability
8
- } from "./chunk-XFKZ3MCV.js";
8
+ } from "./chunk-QFL42TMV.js";
9
9
  import {
10
10
  HIGH_RISK_MUTATION_TOOL_NAMES
11
- } from "./chunk-QLQ573SU.js";
11
+ } from "./chunk-3M52COK5.js";
12
12
  import {
13
13
  DEFAULT_NOLO_SERVER_URL
14
14
  } from "./chunk-OLZBQWZU.js";
@@ -150,7 +150,7 @@ function writeUsage(output, commandPath) {
150
150
  return;
151
151
  }
152
152
  output.write(
153
- "Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
153
+ "Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
154
154
  );
155
155
  }
156
156
  function parseAgentRunArgs(args, options = {}) {
@@ -166,6 +166,21 @@ function parseAgentRunArgs(args, options = {}) {
166
166
  const message = rawMessage.trim();
167
167
  const rawRuntimeKey = readFlagValue(args, "--runtime-key");
168
168
  const runtimeKey = rawRuntimeKey?.trim();
169
+ const rawDockerWorkspaceMode = readFlagValue(args, "--docker-workspace-mode")?.trim();
170
+ if (args.includes("--docker-workspace-mode") && rawDockerWorkspaceMode !== "git" && rawDockerWorkspaceMode !== "empty") {
171
+ throw new Error("--docker-workspace-mode \u5FC5\u987B\u662F git \u6216 empty");
172
+ }
173
+ const dockerWorkspaceMode = rawDockerWorkspaceMode;
174
+ if (dockerWorkspaceMode && !/^docker(:.+)?$/.test(runtimeKey ?? "")) {
175
+ throw new Error("--docker-workspace-mode \u4EC5\u9002\u7528\u4E8E --runtime-key docker[:runtimeId]");
176
+ }
177
+ const dockerWorkspaceModeRuntimeMode = runtimeModeFromArgs(args);
178
+ const dockerWorkspaceModeImplicitLocal = !dockerWorkspaceModeRuntimeMode && (isFullstackCodingAgentRef(rawAgentKey, agentKey) || isLocalCliAgentKey(agentKey) || args.includes("--dangerously-allow-shell"));
179
+ if (dockerWorkspaceMode && dockerWorkspaceModeRuntimeMode !== "local" && !dockerWorkspaceModeImplicitLocal) {
180
+ throw new Error(
181
+ "--docker-workspace-mode \u9700\u8981\u672C\u673A\u6267\u884C\u8DEF\u5F84\uFF1A\u4E0D\u5E26 --local \u65F6 runtimeMode \u89E3\u6790\u4E3A auto\uFF0C\u8BE5\u53C2\u6570\u4F1A\u88AB\u9759\u9ED8\u4E22\u5F03\u5E76\u6539\u8D70\u670D\u52A1\u7AEF\u6D3E\u53D1\u3002\u8BF7\u52A0 --local\uFF1B\u9690\u5F0F local\uFF08fullstack / local-cli agent / --dangerously-allow-shell\uFF09\u540C\u6837\u88AB\u63A5\u53D7\u3002"
182
+ );
183
+ }
169
184
  if (args.includes("--runtime-key") && !runtimeKey) {
170
185
  throw new Error(
171
186
  "runtimeKey \u5FC5\u987B\u662F\u975E\u7A7A\u7684 listRuntimes key\uFF08local | server | machine:<machineId> | docker | docker:<runtimeId> | instabox | gcp\uFF09"
@@ -244,6 +259,7 @@ function parseAgentRunArgs(args, options = {}) {
244
259
  } : {},
245
260
  ...runtimeMode ? { runtimeMode } : !runtimeKey && (fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault || args.includes("--dangerously-allow-shell")) ? { runtimeMode: "local" } : {},
246
261
  ...runtimeKey ? { runtimeKey } : {},
262
+ ...dockerWorkspaceMode ? { dockerWorkspaceMode } : {},
247
263
  background: args.includes("--bg"),
248
264
  noStream: args.includes("--no-stream"),
249
265
  machineShell: args.includes("--machine-shell"),
@@ -1,12 +1,6 @@
1
- import {
2
- isDevinOAuthAgent
3
- } from "./chunk-5ZUL4CUO.js";
4
1
  import {
5
2
  resolveAgentImageInputSupport
6
- } from "./chunk-IYBIRCQV.js";
7
- import {
8
- getModelContextWindow
9
- } from "./chunk-2MTE2PEH.js";
3
+ } from "./chunk-U34KT53V.js";
10
4
  import {
11
5
  asOptionalFiniteNumber
12
6
  } from "./chunk-WWC7I6TA.js";
@@ -39,9 +33,13 @@ function hasImageInRuntimeMessages(messages) {
39
33
  var IMAGE_OMITTED_PLACEHOLDER = "[Image content omitted: model does not support image input]";
40
34
  function stripImagePartsFromContent(content) {
41
35
  if (!Array.isArray(content)) return content;
42
- const filtered = content.filter((part) => part?.type !== "image_url");
43
- if (filtered.length === 0) return IMAGE_OMITTED_PLACEHOLDER;
44
- return filtered;
36
+ const hasImage = content.some((part) => part && typeof part === "object" && part.type === "image_url");
37
+ if (!hasImage) return content;
38
+ const hasNonImage = content.some((part) => part && typeof part === "object" && part.type !== "image_url");
39
+ if (!hasNonImage) return IMAGE_OMITTED_PLACEHOLDER;
40
+ return content.map(
41
+ (part) => part && typeof part === "object" && part.type === "image_url" ? { type: "text", text: IMAGE_OMITTED_PLACEHOLDER } : part
42
+ );
45
43
  }
46
44
  function stripImagePartsFromMessages(messages) {
47
45
  return messages.map((msg) => ({
@@ -51,39 +49,17 @@ function stripImagePartsFromMessages(messages) {
51
49
  }
52
50
  async function stripImagePartsForTextOnlyAgent(messages, agentConfig) {
53
51
  const supportsVision = resolveAgentImageInputSupport(agentConfig);
54
- const hasImages = hasImageInRuntimeMessages(messages);
55
- return { messages: !supportsVision && hasImages ? stripImagePartsFromMessages(messages) : messages };
52
+ const runtimeMessages = messages;
53
+ const hasImages = hasImageInRuntimeMessages(runtimeMessages);
54
+ const shouldStrip = !supportsVision && hasImages;
55
+ const omittedImageCount = shouldStrip ? extractImageUrlsFromMessages(runtimeMessages).length : 0;
56
+ return {
57
+ messages: shouldStrip ? stripImagePartsFromMessages(messages) : messages,
58
+ downgraded: shouldStrip,
59
+ omittedImageCount
60
+ };
56
61
  }
57
62
 
58
- // packages/agent-runtime/devin/devinChannelWindows.ts
59
- var DEVIN_CHANNEL_CONTEXT_WINDOWS = {
60
- // SWE-2 家族(catalog 无裸 swe-2 selector;旧点号/裸写法如 swe-2、
61
- // swe-1.7 实测均 permission_denied,已不是可用 selector)。
62
- "swe-2-max": 262e3,
63
- "swe-2-high": 262e3,
64
- "swe-2-medium": 262e3,
65
- // SWE-1.7 家族。
66
- "swe-1-7": 262e3,
67
- "swe-1-7-medium": 262e3,
68
- "swe-1-7-lightning": 202752,
69
- // SWE-1.6 家族(免费档默认)。
70
- "swe-1-6": 2e5,
71
- "swe-1-6-fast": 2e5,
72
- // 经 devin 通道转售、且与厂商原生窗口不同的模型(catalog 枚举型 selector)。
73
- "MODEL_GPT_5_2_LOW": 384e3,
74
- "MODEL_GPT_5_2_MEDIUM": 384e3,
75
- "MODEL_GPT_5_2_HIGH": 384e3,
76
- "MODEL_GPT_5_2_XHIGH": 384e3
77
- };
78
- var devinChannelContextWindow = (model) => {
79
- const raw = model?.trim();
80
- if (!raw) return void 0;
81
- return DEVIN_CHANNEL_CONTEXT_WINDOWS[raw];
82
- };
83
- var resolveAgentContextWindow = (agent) => (isDevinOAuthAgent(agent) ? devinChannelContextWindow(agent.model) : void 0) ?? // provider 透传给全局解析:平台托管通道(CF)与 Codex OAuth 等通道对同一 id
84
- // 窗口不同,按通道取真值,不做全局取大/取小。
85
- getModelContextWindow(agent.model ?? "", agent.provider);
86
-
87
63
  // packages/agent-runtime/agentRecordConfig.ts
88
64
  function stringField(record, key) {
89
65
  const value = record[key];
@@ -449,11 +425,10 @@ function assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets(body) {
449
425
  }
450
426
 
451
427
  export {
428
+ extractImageUrlsFromMessages,
452
429
  hasImageInRuntimeMessages,
453
430
  stripImagePartsFromMessages,
454
431
  stripImagePartsForTextOnlyAgent,
455
- devinChannelContextWindow,
456
- resolveAgentContextWindow,
457
432
  resolveAgentRuntimeConfigFromRecord,
458
433
  buildDesktopAgentRuntimeAgentConfigSnapshot,
459
434
  buildDesktopAgentRuntimeDialogHistorySnapshot,
@@ -7,15 +7,17 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-G47IPDOK.js";
10
+ } from "./chunk-W7FGZRLK.js";
11
+ import {
12
+ parsePositiveFiniteNumberOrFallback
13
+ } from "./chunk-Y5GCAMGP.js";
11
14
  import {
12
15
  fetchWithTransientRetry
13
- } from "./chunk-I2ZMGXXF.js";
16
+ } from "./chunk-KFHREHUQ.js";
14
17
  import {
15
18
  DRAIN_EXHAUSTED_USER_MESSAGE,
16
- isDrainExhaustedResponse,
17
- parsePositiveFiniteNumberOrFallback
18
- } from "./chunk-XPWGOTBQ.js";
19
+ isDrainExhaustedResponse
20
+ } from "./chunk-3L2WKC3W.js";
19
21
  import {
20
22
  buildDialogAttachmentPlan,
21
23
  extractFileContentIds
@@ -30,7 +32,7 @@ import {
30
32
  boundSummaryText,
31
33
  buildDialogReadEnvelope,
32
34
  projectDialogReadForAgent
33
- } from "./chunk-QLQ573SU.js";
35
+ } from "./chunk-3M52COK5.js";
34
36
  import {
35
37
  asRecordOrEmpty
36
38
  } from "./chunk-KX6YBIHG.js";
@@ -40,22 +42,13 @@ import {
40
42
  } from "./chunk-I42VC5KR.js";
41
43
  import {
42
44
  resolveRunsDir
43
- } from "./chunk-MM3662RS.js";
44
- import {
45
- isRecord
46
- } from "./chunk-KUG52IAP.js";
47
- import {
48
- asTrimmedString
49
- } from "./chunk-3EUW3WEO.js";
45
+ } from "./chunk-SNAWGDXT.js";
50
46
  import {
51
47
  getDefaultCliLocalRuntimeDb
52
- } from "./chunk-2IXDJNZI.js";
48
+ } from "./chunk-GAGGEA7D.js";
53
49
  import {
54
50
  isLevelLockError
55
51
  } from "./chunk-AWVFQMOV.js";
56
- import {
57
- toErrorMessage
58
- } from "./chunk-HNMXYYJR.js";
59
52
  import {
60
53
  resolveLocalDialogDbCandidates,
61
54
  resolveNoloHome,
@@ -69,6 +62,15 @@ import {
69
62
  resolveServerCandidates,
70
63
  resolveServerUrl
71
64
  } from "./chunk-A7GB5UGH.js";
65
+ import {
66
+ isRecord
67
+ } from "./chunk-KUG52IAP.js";
68
+ import {
69
+ asTrimmedString
70
+ } from "./chunk-3EUW3WEO.js";
71
+ import {
72
+ toErrorMessage
73
+ } from "./chunk-HNMXYYJR.js";
72
74
  import {
73
75
  DEFAULT_LOCAL_API_ORIGIN
74
76
  } from "./chunk-4SN6J65J.js";
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-SKPPKHD3.js";
8
+ } from "./chunk-Q5LVXPGT.js";
9
9
  import {
10
10
  CONFIRMATION_INPUT_KEYS,
11
11
  INVALID_TOOL_ARGS_REPLACEMENT,
@@ -14,16 +14,16 @@ import {
14
14
  performFetchRequest,
15
15
  sanitizeOutboundMessages,
16
16
  stripModelToolArgs
17
- } from "./chunk-DW7MGLMG.js";
17
+ } from "./chunk-7YQQXP42.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-XFKZ3MCV.js";
21
+ } from "./chunk-QFL42TMV.js";
22
22
  import {
23
23
  classifyApiError,
24
24
  classifyGenerationError,
25
25
  extractErrorDiagnostics
26
- } from "./chunk-VSOWPETY.js";
26
+ } from "./chunk-JIAZK434.js";
27
27
  import {
28
28
  createSSEParser,
29
29
  createToolRunId,
@@ -32,7 +32,7 @@ import {
32
32
  toolRunSetPending,
33
33
  toolRunStarted,
34
34
  toolRunSucceeded
35
- } from "./chunk-RUNKPFM5.js";
35
+ } from "./chunk-6QIBWOPT.js";
36
36
  import {
37
37
  getPublicImageAgentMode
38
38
  } from "./chunk-VIDPVFP3.js";
@@ -42,10 +42,10 @@ import {
42
42
  messageStreaming,
43
43
  toolResultNeedsUserConfirmation,
44
44
  updateToolMessage
45
- } from "./chunk-H4KACZMG.js";
45
+ } from "./chunk-2QQ7D3P5.js";
46
46
  import {
47
47
  streamAgentChatTurn
48
- } from "./chunk-X5SUT4CN.js";
48
+ } from "./chunk-EDJND3FK.js";
49
49
  import {
50
50
  getCurrentSpaceId
51
51
  } from "./chunk-ZJ7UHBJS.js";
@@ -56,16 +56,16 @@ import {
56
56
  } from "./chunk-OWYYDMGJ.js";
57
57
  import {
58
58
  selectCurrentServer
59
- } from "./chunk-C5VPAHIU.js";
59
+ } from "./chunk-32ZKZET7.js";
60
60
  import {
61
61
  write
62
- } from "./chunk-HP6O6LTV.js";
62
+ } from "./chunk-CDLP56BS.js";
63
63
  import {
64
64
  createAsyncThunk
65
- } from "./chunk-7BSQK2UC.js";
65
+ } from "./chunk-WRCZXJ4N.js";
66
66
  import {
67
67
  selectIdentityToken
68
- } from "./chunk-SEJ5OS6F.js";
68
+ } from "./chunk-PXYBUFDB.js";
69
69
  import {
70
70
  classifyOutboundErrorCategory,
71
71
  createOutboundDiagnosticCall,
@@ -85,13 +85,13 @@ import {
85
85
  } from "./chunk-56GBUMO5.js";
86
86
  import {
87
87
  normalizeChatCompletionsBodyForProvider
88
- } from "./chunk-6TF64IF2.js";
88
+ } from "./chunk-4L4K6YR7.js";
89
89
  import {
90
90
  EMPTY_ASSISTANT_REPAIR_PROMPT
91
- } from "./chunk-ZWG3C7VI.js";
91
+ } from "./chunk-F3SOW2EU.js";
92
92
  import {
93
93
  getModelInfo
94
- } from "./chunk-2MTE2PEH.js";
94
+ } from "./chunk-QA2C5NKI.js";
95
95
  import {
96
96
  isAbortError
97
97
  } from "./chunk-7DPNBQSV.js";
@@ -105,7 +105,7 @@ import {
105
105
  } from "./chunk-5EMSBTQ6.js";
106
106
  import {
107
107
  getApiEndpoint
108
- } from "./chunk-TRW43TSC.js";
108
+ } from "./chunk-6EQD4AQL.js";
109
109
  import {
110
110
  isRecord
111
111
  } from "./chunk-KUG52IAP.js";
@@ -573,7 +573,10 @@ var processToolData = createAsyncThunk(
573
573
  const toolResult = await found.executor(executionToolArgs, thunkApi, {
574
574
  parentMessageId,
575
575
  toolRunId,
576
- agentKey
576
+ agentKey,
577
+ // 定档信号:这里是前台对话流式路径,来源恒为 chat;对话 id 用于数历史搜索。
578
+ ...args.dialogId ? { dialogId: args.dialogId } : {},
579
+ origin: "chat"
577
580
  });
578
581
  const rawData = toolResult?.rawData ?? toolResult;
579
582
  const llmContext = asOptionalTrimmedString(toolResult?.llmContext);
@@ -750,7 +753,8 @@ var handleToolCalls = createAsyncThunk(
750
753
  toolCall: { ...toolCall, id: toolCallId },
751
754
  parentMessageId: messageId,
752
755
  toolRunId,
753
- agentKey: agentConfig.dbKey
756
+ agentKey: agentConfig.dbKey,
757
+ dialogId
754
758
  })
755
759
  ).unwrap();
756
760
  const toolName = result.toolName;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-TRW43TSC.js";
3
+ } from "./chunk-6EQD4AQL.js";
4
4
  import {
5
5
  isPlatformHostedDeepseekModel,
6
6
  isPlatformHostedOpenAIImageModel,
@@ -4,32 +4,6 @@ import {
4
4
  import {
5
5
  normalizeServerOrigin
6
6
  } from "./chunk-CF7PE763.js";
7
- import {
8
- asTrimmedLowercaseString
9
- } from "./chunk-QSJ3HFEF.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
- if (!Object.hasOwn(FONT_PRESET_ALIASES, normalized)) return void 0;
31
- return FONT_PRESET_ALIASES[normalized];
32
- };
33
7
 
34
8
  // packages/ai/policy/types.ts
35
9
  var DEFAULT_AGENT_BASE_POLICY = {
@@ -147,7 +121,6 @@ var normalizeAgentUpdateFieldList = (value, fallback = DEFAULT_AUTO_APPROVED_SEL
147
121
  };
148
122
 
149
123
  export {
150
- normalizeFontPreset,
151
124
  DEFAULT_AGENT_BASE_POLICY,
152
125
  DEFAULT_USER_PREFERENCE_PROFILE,
153
126
  AGENT_UPDATE_FIELD_NAMES,
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-HKT6QXP3.js";
5
+ } from "./chunk-5IKRTRRR.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-OXME3PEE.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  selectIdentityToken
3
- } from "./chunk-SEJ5OS6F.js";
3
+ } from "./chunk-PXYBUFDB.js";
4
4
  import {
5
5
  isAbortError
6
6
  } from "./chunk-7DPNBQSV.js";
@@ -996,7 +996,7 @@ function peek(draft, prop) {
996
996
  return source[prop];
997
997
  }
998
998
  function isRelocatedBaseRef(state, prop, value) {
999
- if (state.type_ !== 1 || !state.allIndicesReassigned_ || state.assigned_?.get(prop) || !isDraftable(value) || value[DRAFT_STATE]) {
999
+ if (state.type_ !== 1 || !state.allIndicesReassigned_ || !isDraftable(value) || value[DRAFT_STATE]) {
1000
1000
  return false;
1001
1001
  }
1002
1002
  return state.baseRefs_.has(value);
@@ -1,30 +1,30 @@
1
- import {
2
- isOAuthApiKeyRef
3
- } from "./chunk-UKZX3NHN.js";
4
1
  import {
5
2
  fnv1a32Hex
6
3
  } from "./chunk-UEILX4EV.js";
7
4
  import {
8
5
  compareAgentSelection
9
- } from "./chunk-QLQ573SU.js";
6
+ } from "./chunk-3M52COK5.js";
10
7
  import {
11
8
  isAgentUnavailableNow
12
9
  } from "./chunk-3MZAGMYY.js";
10
+ import {
11
+ isOAuthApiKeyRef
12
+ } from "./chunk-F3SOW2EU.js";
13
13
  import {
14
14
  isOwnedAgentKey,
15
15
  ownedAgentKey,
16
16
  publicAgentKey
17
17
  } from "./chunk-M2EJHDJP.js";
18
+ import {
19
+ getModelAbility
20
+ } from "./chunk-FYYSDHVQ.js";
18
21
  import {
19
22
  isSubscriptionEndpoint,
20
23
  isSubscriptionOAuthCredential
21
- } from "./chunk-PSJWPSKS.js";
24
+ } from "./chunk-EWO77ZGF.js";
22
25
  import {
23
26
  isAntigravityOAuthAgent
24
- } from "./chunk-JGRPBIZZ.js";
25
- import {
26
- getModelAbility
27
- } from "./chunk-FYYSDHVQ.js";
27
+ } from "./chunk-SQX235S2.js";
28
28
 
29
29
  // packages/ai/agent/agentBilling.ts
30
30
  function resolveBillingSource(candidate) {
@@ -0,0 +1,9 @@
1
+ // packages/core/positiveFiniteNumberOrFallback.ts
2
+ function parsePositiveFiniteNumberOrFallback(value, fallback) {
3
+ const parsed = Number(value);
4
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
5
+ }
6
+
7
+ export {
8
+ parsePositiveFiniteNumberOrFallback
9
+ };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-EUGTFFO6.js";
5
5
  import {
6
6
  buildSkillDocMarkdown
7
- } from "./chunk-XETG4RIX.js";
7
+ } from "./chunk-AETZ7AD6.js";
8
8
  import {
9
9
  CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES
10
10
  } from "./chunk-NYYFIKHI.js";
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  selectCurrentServer,
3
3
  selectRemoteServers
4
- } from "./chunk-C5VPAHIU.js";
4
+ } from "./chunk-32ZKZET7.js";
5
5
  import {
6
6
  noloDeleteRequest,
7
7
  noloWriteRequest
8
- } from "./chunk-7BSQK2UC.js";
8
+ } from "./chunk-WRCZXJ4N.js";
9
9
  import {
10
10
  normalizeTimeFields
11
11
  } from "./chunk-6Q7UTJKR.js";
12
12
  import {
13
13
  selectIdentityUser,
14
14
  selectIdentityUserId
15
- } from "./chunk-SEJ5OS6F.js";
15
+ } from "./chunk-PXYBUFDB.js";
16
16
  import {
17
17
  createUserKey,
18
18
  extractAgentInfo,
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-WWC7I6TA.js";
13
13
  import {
14
14
  getModelConfig
15
- } from "./chunk-TRW43TSC.js";
15
+ } from "./chunk-6EQD4AQL.js";
16
16
  import {
17
17
  isPlatformHostedImageModel,
18
18
  isPlatformManagedProvider,