nolo-cli 0.172.0-alpha.2 → 0.173.0-alpha.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 (91) hide show
  1. package/{_executeModel-IABRBGAE.js → _executeModel-KT7NUYZC.js} +22 -21
  2. package/{accountResolver-JS7QDNNL.js → accountResolver-YGMLY3WW.js} +2 -1
  3. package/{agentDeleteCommand-ATU2HZT2.js → agentDeleteCommand-SVGYPFU5.js} +30 -28
  4. package/{agentEmailCommands-YTKUTNLR.js → agentEmailCommands-TBZJC37X.js} +32 -30
  5. package/{agentListCommands-ZBA5JTWP.js → agentListCommands-CD7CLGH4.js} +20 -18
  6. package/{agentMachineCommands-ZSKWBVPO.js → agentMachineCommands-DQBUP3I5.js} +18 -16
  7. package/{agentProviderCommands-TWVILNAN.js → agentProviderCommands-FXEMNSZ2.js} +2 -2
  8. package/{agentRecordCommands-KVN6OF4P.js → agentRecordCommands-4PY33TAJ.js} +30 -28
  9. package/{agentRunCommand-CC6JZOGT.js → agentRunCommand-P7BC5M3Z.js} +31 -29
  10. package/{agentRuntimeLocal-JA2Q6UBJ.js → agentRuntimeLocal-XGBQ7JK2.js} +15 -13
  11. package/{agentSlice-RVJDFNRB.js → agentSlice-NL7LRTLO.js} +1 -1
  12. package/{appDeleteCommands-4XONJLO7.js → appDeleteCommands-VBH3YLIO.js} +19 -17
  13. package/{appDeployCommands-SDGJMAUG.js → appDeployCommands-3MZXLEKN.js} +19 -17
  14. package/{appDeployStatusCommands-A6O3FEEW.js → appDeployStatusCommands-FAWWEEOT.js} +19 -17
  15. package/{appGetCommands-U4Z5HSNF.js → appGetCommands-VMMCATHU.js} +19 -17
  16. package/{appListCommands-T4HVTIUC.js → appListCommands-NHM6PAIX.js} +19 -17
  17. package/{authCommand-BSOLJFPV.js → authCommand-KQ7GWCXK.js} +8 -4
  18. package/{chromeCommands-IY4NVSXZ.js → chromeCommands-Z5LDHMYN.js} +2 -1
  19. package/{chromeOpsCommands-6JHNTKXU.js → chromeOpsCommands-CHBIUDJD.js} +2 -1
  20. package/{chunk-ZB4JKLJM.js → chunk-25A6K2YP.js} +3 -3
  21. package/{chunk-6J227QXV.js → chunk-2GRXE3YJ.js} +21 -0
  22. package/{chunk-74PQM3XI.js → chunk-3TAVX6CD.js} +75 -39
  23. package/{chunk-BW3LCST7.js → chunk-4RYUMDOM.js} +2 -2
  24. package/{chunk-MYZHJKLG.js → chunk-64MLOS7B.js} +1 -1
  25. package/{chunk-CZLO63PE.js → chunk-73NYJAJS.js} +10 -10
  26. package/{chunk-I33CJERI.js → chunk-7QQOOHDG.js} +2 -2
  27. package/{chunk-BKCR2JHG.js → chunk-7ZGMQZ5D.js} +0 -45
  28. package/{chunk-X7KVZ2OK.js → chunk-AFFHPBEU.js} +7 -7
  29. package/{chunk-AKXKBNLQ.js → chunk-ASGIXFB6.js} +2 -2
  30. package/{chunk-UG3UI4Z7.js → chunk-AV67EUU4.js} +13 -13
  31. package/{chunk-EWLPIR2S.js → chunk-BAXCQF6H.js} +1 -1
  32. package/{chunk-FZSVCJUU.js → chunk-BGQZLBMJ.js} +4 -101
  33. package/{chunk-2EC6FNS4.js → chunk-BYNWE72R.js} +29 -91
  34. package/{chunk-WKF6C3X5.js → chunk-CLY56QIC.js} +3 -3
  35. package/{chunk-AJ52EA72.js → chunk-D2J22QSE.js} +1 -1
  36. package/{chunk-BU2YQBV4.js → chunk-DPQYIS6D.js} +41 -1
  37. package/{chunk-TYQZRSL6.js → chunk-ENIQIEAF.js} +1 -1
  38. package/{chunk-TCWK2EQX.js → chunk-FJ76E5ZM.js} +2 -2
  39. package/chunk-FX33MFLW.js +103 -0
  40. package/{chunk-UA4VAUQL.js → chunk-GXFAZGZ6.js} +2 -2
  41. package/{chunk-5WOL7BUP.js → chunk-J33JIJK7.js} +2 -2
  42. package/{chunk-WW5MNBTZ.js → chunk-JDWJ64VG.js} +5 -5
  43. package/{chunk-OQ3DOBYB.js → chunk-JOUFPRE4.js} +178 -2
  44. package/{chunk-6BDTSKUT.js → chunk-KBGWPSY6.js} +4 -4
  45. package/{chunk-BE42X662.js → chunk-KPSNHLFI.js} +4 -6
  46. package/{chunk-O4H4HD4X.js → chunk-N2N63HTQ.js} +2 -2
  47. package/{chunk-R2RDXNEE.js → chunk-O2LB346J.js} +3 -3
  48. package/{chunk-XWX5ZGWR.js → chunk-O3OJRN5Z.js} +89 -24
  49. package/{chunk-OPNHKULV.js → chunk-P34IX26T.js} +2 -2
  50. package/{chunk-ISMHFI2Y.js → chunk-QWNMFO5E.js} +3 -3
  51. package/{chunk-PJVGNB4L.js → chunk-RPZNVBA5.js} +1 -1
  52. package/{chunk-SUBKVXFM.js → chunk-RUKAOMXD.js} +1 -1
  53. package/chunk-SRZ6BQIP.js +68 -0
  54. package/{chunk-7TBARDLF.js → chunk-T7HBI3WZ.js} +1 -1
  55. package/{chunk-SDAIVJZG.js → chunk-TLBTPKDD.js} +11 -11
  56. package/chunk-UKZX3NHN.js +48 -0
  57. package/{chunk-ULE7ABRN.js → chunk-VETQRONK.js} +13 -11
  58. package/{chunk-ORKQ3T5D.js → chunk-W7S5CUGI.js} +3 -3
  59. package/{chunk-F3F3ARBN.js → chunk-WBA4HAFS.js} +2 -2
  60. package/{chunk-XBJIESNS.js → chunk-XAFCJN32.js} +2 -2
  61. package/{chunk-CAAH5LNN.js → chunk-Y3BUTWUJ.js} +2 -2
  62. package/{chunk-KNDA4K34.js → chunk-YBTP3PUM.js} +1 -1
  63. package/{chunk-RATR6VCP.js → chunk-ZEOR6XPJ.js} +1 -1
  64. package/{commandRegistry-ICL67WF7.js → commandRegistry-UVXIFHUI.js} +53 -53
  65. package/{contentThunks-SM5FP7FM.js → contentThunks-I4HNLTQY.js} +6 -5
  66. package/{createAgentAutomationAction-ECWLREQU.js → createAgentAutomationAction-GS5LQ52L.js} +6 -5
  67. package/{createDialogAction-LROHLFQ2.js → createDialogAction-5WNACKWC.js} +7 -6
  68. package/{createPageAction-KUQVLZMZ.js → createPageAction-S7MGYSMU.js} +6 -5
  69. package/{dialogCommands-T5JYBPS6.js → dialogCommands-OK3L6SAI.js} +19 -17
  70. package/{dialogSlice-2FWQCZDB.js → dialogSlice-R62QV2OE.js} +5 -4
  71. package/{docCreateCommands-7F4ICTJQ.js → docCreateCommands-NMCMJPQX.js} +18 -16
  72. package/{docDeleteCommands-4INN7EWS.js → docDeleteCommands-46FMFRZU.js} +19 -17
  73. package/{docReadCommands-7PZZR3C3.js → docReadCommands-6NPY5P67.js} +18 -16
  74. package/{docStore-WUR5MNKF.js → docStore-X5P4UGTZ.js} +1 -1
  75. package/{docUpdateCommands-H2YXAGOV.js → docUpdateCommands-UDT4QLPL.js} +18 -16
  76. package/{handleSendMessageAction-DVXNAQ2V.js → handleSendMessageAction-IVQMBROO.js} +13 -13
  77. package/index.js +4 -4
  78. package/{localRuntimeAdapter-M64P55I7.js → localRuntimeAdapter-LY5MOJN4.js} +28 -26
  79. package/{machineCommands-2H7QW35Q.js → machineCommands-KYTNSAIN.js} +29 -27
  80. package/{machineWsRunDispatch-4L2DSIMF.js → machineWsRunDispatch-ZR3GCQMH.js} +29 -27
  81. package/package.json +1 -1
  82. package/{providerPresetApply-5K4PBX4J.js → providerPresetApply-MBMGCNKZ.js} +1 -2
  83. package/{providerRegistry-K5MSZ3Y5.js → providerRegistry-P4KYS6SE.js} +1 -2
  84. package/{readlineWorkspace-KNE2THUN.js → readlineWorkspace-SNA6I5UK.js} +34 -32
  85. package/{runAgentClientLoop-34ME2HDT.js → runAgentClientLoop-6G7JORHJ.js} +20 -19
  86. package/{spaceCommands-HAVZ3PQN.js → spaceCommands-SEWFBY53.js} +18 -16
  87. package/{streamAgentChatTurn-YXFJ3UWD.js → streamAgentChatTurn-EJDRXKAQ.js} +26 -24
  88. package/{tools-M7H7Z44Z.js → tools-K3IZ7U5G.js} +13 -13
  89. package/{tuiSummaryLlmCaller-KVAXEH7O.js → tuiSummaryLlmCaller-2MC6SXZT.js} +8 -7
  90. package/{updateDialogTitleAction-YXQ2AJVK.js → updateDialogTitleAction-YO67K72J.js} +6 -5
  91. package/chunk-TSCI6X6C.js +0 -185
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-6J227QXV.js";
4
+ } from "./chunk-2GRXE3YJ.js";
5
5
 
6
6
  // packages/agent-runtime/oauthProviderRefs.ts
7
7
  var OAUTH_PROVIDER_REFS = [
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-OPNHKULV.js";
5
+ } from "./chunk-P34IX26T.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-OXME3PEE.js";
@@ -0,0 +1,68 @@
1
+ // packages/agent-runtime/readImage.ts
2
+ import { readFile } from "node:fs/promises";
3
+ import { extname } from "node:path";
4
+ var MAX_IMAGE_BASE64_BYTES = 2 * 1024 * 1024;
5
+ var MAX_IMAGE_EDGE = 1568;
6
+ var MIME_BY_EXTENSION = {
7
+ ".png": "image/png",
8
+ ".jpg": "image/jpeg",
9
+ ".jpeg": "image/jpeg",
10
+ ".webp": "image/webp",
11
+ ".gif": "image/gif"
12
+ };
13
+ function detectMime(bytes) {
14
+ if (bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]))) return "image/png";
15
+ if (bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255) return "image/jpeg";
16
+ if (["GIF87a", "GIF89a"].includes(bytes.toString("ascii", 0, 6))) return "image/gif";
17
+ if (bytes.toString("ascii", 0, 4) === "RIFF" && bytes.toString("ascii", 8, 12) === "WEBP") return "image/webp";
18
+ }
19
+ async function readLocalImage(path, options) {
20
+ const limit = options?.maxBase64Bytes ?? MAX_IMAGE_BASE64_BYTES;
21
+ const expected = MIME_BY_EXTENSION[extname(path).toLowerCase()];
22
+ if (!expected) throw new Error("read_image: unsupported image extension (PNG/JPEG/WebP/GIF only)");
23
+ const bytes = await readFile(path);
24
+ if (detectMime(bytes) !== expected) throw new Error("read_image: image extension and magic bytes do not match");
25
+ const { default: sharp } = await import("./dist-Q2JSMAKA.js");
26
+ const image = sharp(bytes, { limitInputPixels: 4e7, animated: false });
27
+ const meta = await image.metadata();
28
+ if (!meta.width || !meta.height) throw new Error("read_image: invalid image dimensions");
29
+ const encoded = (length) => 4 * Math.ceil(length / 3);
30
+ let output = bytes;
31
+ let mimeType = expected;
32
+ let width = meta.width;
33
+ let height = meta.height;
34
+ if (Math.max(width, height) > MAX_IMAGE_EDGE || encoded(output.length) > limit) {
35
+ const resized = await image.rotate().resize({ width: MAX_IMAGE_EDGE, height: MAX_IMAGE_EDGE, fit: "inside", withoutEnlargement: true }).jpeg({ quality: 80 }).toBuffer({ resolveWithObject: true });
36
+ output = resized.data;
37
+ width = resized.info.width;
38
+ height = resized.info.height;
39
+ mimeType = "image/jpeg";
40
+ }
41
+ while (encoded(output.length) > limit) {
42
+ const current = encoded(output.length);
43
+ if (width === 1 && height === 1) {
44
+ throw new Error(
45
+ `read_image: compressed image ${width}x${height}, ${output.length} bytes (${current} base64 bytes) still exceeds ${limit} base64 bytes`
46
+ );
47
+ }
48
+ const scale = Math.min(0.9, Math.sqrt(limit / current) * 0.95);
49
+ const resized = await image.clone().rotate().resize({
50
+ width: Math.max(1, Math.floor(width * scale)),
51
+ height: Math.max(1, Math.floor(height * scale)),
52
+ fit: "inside",
53
+ withoutEnlargement: true
54
+ }).jpeg({ quality: 80 }).toBuffer({ resolveWithObject: true });
55
+ output = resized.data;
56
+ width = resized.info.width;
57
+ height = resized.info.height;
58
+ mimeType = "image/jpeg";
59
+ }
60
+ return {
61
+ content: `[image ${width}x${height} ${output.length} bytes \u2192 ${path}]`,
62
+ images: [{ mimeType, dataBase64: output.toString("base64") }]
63
+ };
64
+ }
65
+
66
+ export {
67
+ readLocalImage
68
+ };
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  getModelContextWindow,
6
6
  normalizeTimingMs
7
- } from "./chunk-BKCR2JHG.js";
7
+ } from "./chunk-7ZGMQZ5D.js";
8
8
  import {
9
9
  BUILTIN_NOLO_AGENT_KEY
10
10
  } from "./chunk-LOEO7LRC.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  assembleAgentDiscoveryResult,
3
3
  resolveDiscoveryScope
4
- } from "./chunk-BE42X662.js";
4
+ } from "./chunk-KPSNHLFI.js";
5
5
  import {
6
6
  fetchWithTransientRetry
7
7
  } from "./chunk-KFHREHUQ.js";
@@ -20,7 +20,7 @@ import {
20
20
  toolRunUpdated,
21
21
  uiCardFallback,
22
22
  waitForAbortableDelay
23
- } from "./chunk-UA4VAUQL.js";
23
+ } from "./chunk-GXFAZGZ6.js";
24
24
  import {
25
25
  isGatewayHttpStatus
26
26
  } from "./chunk-NF64D32W.js";
@@ -64,7 +64,7 @@ import {
64
64
  } from "./chunk-VF4K2QE6.js";
65
65
  import {
66
66
  createDocState
67
- } from "./chunk-O4H4HD4X.js";
67
+ } from "./chunk-N2N63HTQ.js";
68
68
  import {
69
69
  addMemberSpace,
70
70
  fetchAuthoritativeRemoteSpace,
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-BAWAKW7X.js";
80
80
  import {
81
81
  createDialogAction
82
- } from "./chunk-F3F3ARBN.js";
82
+ } from "./chunk-WBA4HAFS.js";
83
83
  import {
84
84
  setDialogExtraReferencesAction
85
85
  } from "./chunk-IF7V3CBU.js";
@@ -102,7 +102,7 @@ import {
102
102
  updateContentCategory,
103
103
  updateContentTitle,
104
104
  writeStoredCollapsedCategories
105
- } from "./chunk-MYZHJKLG.js";
105
+ } from "./chunk-64MLOS7B.js";
106
106
  import {
107
107
  buildDatabaseFileContentUrl,
108
108
  deleteDialog,
@@ -115,7 +115,7 @@ import {
115
115
  selectMsgById,
116
116
  uiAskChoiceFunc,
117
117
  uiAskChoiceFunctionSchema
118
- } from "./chunk-ULE7ABRN.js";
118
+ } from "./chunk-VETQRONK.js";
119
119
  import {
120
120
  buildMediaToolConfirmation,
121
121
  normalizeMediaConfirmExecutionRevision
@@ -126,7 +126,7 @@ import {
126
126
  runLlm,
127
127
  streamAgentChatTurn,
128
128
  updateAgent
129
- } from "./chunk-ORKQ3T5D.js";
129
+ } from "./chunk-W7S5CUGI.js";
130
130
  import {
131
131
  getCurrentSpaceId,
132
132
  getCurrentSpaceIdRaw,
@@ -229,7 +229,7 @@ import {
229
229
  resolveNoloDialogInput,
230
230
  resolveReadOnlyToolConstraints,
231
231
  verifyNoloDialogSubjectRefQuery
232
- } from "./chunk-6J227QXV.js";
232
+ } from "./chunk-2GRXE3YJ.js";
233
233
  import {
234
234
  clipCompactText
235
235
  } from "./chunk-5MMAK75Q.js";
@@ -3882,7 +3882,7 @@ async function deleteDialogsFunc(args, thunkApi) {
3882
3882
  const deletedDialogIds = [];
3883
3883
  const deletedDialogKeys = [];
3884
3884
  const failures = [];
3885
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-2FWQCZDB.js");
3885
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-R62QV2OE.js");
3886
3886
  for (const target of targets) {
3887
3887
  try {
3888
3888
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -14056,7 +14056,7 @@ function buildStartAgentRunFunctionSchema(opts) {
14056
14056
  const wakeEnabled = opts?.wakeEnabled === true;
14057
14057
  return {
14058
14058
  name: "startAgentRun",
14059
- description: "\u542F\u52A8\u4E00\u4E2A Agent \u6267\u884C\u5B50\u4EFB\u52A1\u3002\u9ED8\u8BA4\u5F02\u6B65\uFF08fork+exec\uFF09\uFF1A\u7ACB\u5373\u8FD4\u56DE runId \u4E0D\u963B\u585E\u5BF9\u8BDD\uFF0C\u6D3E\u53D1\u540E\u76F4\u63A5\u6536\u5C3E\u7B49\u7EC8\u6001\u901A\u77E5\uFF0C\u7981\u6B62\u8F6E\u8BE2\uFF1BcontrolAgentRun \u7528\u4E8E\u63A7\u5236\uFF08\u53EB\u505C/\u8FFD\u52A0\u6307\u4EE4\uFF09\u4E0E\u5F02\u5E38\u8BCA\u65AD\u3002\u3010\u6D3E\u53D1\u7EAA\u5F8B\u3011\u901A\u9053\u53EF\u7528\u6027\u4EC5\u5BF9\u5F53\u6B21\u6D3E\u53D1\u6709\u6548\uFF0C\u6D3E\u53D1\u524D\u52A1\u5FC5\u91CD\u65B0\u8BFB\u53D6\u53EF\u7528\u6027\uFF0C\u5207\u52FF\u590D\u7528\u6B64\u524D\u5931\u8D25\u7ED3\u8BBA\uFF1B\u9047\u5230 config_unresolved \u7C7B\u9519\u8BEF\u964D\u7EA7\u524D\u91CD\u8BD5\u4E00\u6B21\uFF1B\u540C\u4E00\u51ED\u8BC1\u9ED8\u8BA4\u5141\u8BB8\u5E76\u53D1\uFF08\u53D7\u670D\u52A1\u7AEF\u51C6\u5165\u9884\u7B97\u7EA6\u675F\uFF1B\u6CE8\u610F\u4E0A\u6E38 429 \u9650\u6D41\uFF0C\u5FC5\u8981\u65F6\u964D\u4F4E\u5E76\u53D1\u6216\u6362\u901A\u9053\uFF09\uFF0C\u672A\u77E5\u51ED\u8BC1\u9700\u4E32\u884C\u6216\u663E\u5F0F\u786E\u8BA4\u98CE\u9669\uFF1B\u6700\u5F3A\u79C1\u6709\u901A\u9053\u7559\u7ED9\u5BA1\u67E5\uFF0C\u6267\u884C\u4F18\u5148\u4F7F\u7528\u4F4E\u6210\u672C\u901A\u9053\u3002" + (supportsWait ? "\u8981\u540C\u6B65\u7ED3\u679C\u4F20 wait:true\uFF08\u4F1A\u51BB\u7ED3\u5BF9\u8BDD\uFF0C\u4EC5\u9650 \u2460 \u9884\u8BA1 <100s \u4E14\u9A6C\u4E0A\u8981\u7528\u7ED3\u679C \u2461 \u7528\u6237\u660E\u786E\u8981\u6C42\u540C\u6B65\u7B49\u5F85\u6216\u6B63\u5728\u4E0E\u8BE5\u5B50\u4EFB\u52A1\u5BF9\u8BDD \u2462 \u73AF\u5883\u4E0D\u652F\u6301\u7EC8\u6001\u5524\u9192\u4E14\u65E0\u5E76\u884C\u5DE5\u4F5C\uFF1B\u8BE6\u89C1 wait \u53C2\u6570\uFF09\u3002wait:true \u65F6\u53EF\u7528 resultMode \u63A7\u5236\u8FD4\u56DE\u5185\u5BB9\uFF1Afull=\u5B8C\u6574\u8F93\u51FA\uFF1Bsummary=\u53EA\u56DE\u5934\u5C3E\u603B\u7ED3\uFF08\u9632\u957F\u8F93\u51FA\u6491\u7206\u4E0A\u4E0B\u6587\uFF09\u3002" : wakeEnabled ? "\u53EA\u652F\u6301\u5F02\u6B65\u6D3E\u53D1\uFF1Brun \u5230\u7EC8\u6001\u4F1A\u81EA\u52A8\u901A\u8FC7 terminal wake \u628A\u7236\u5BF9\u8BDD\u63A5\u56DE\u6765\uFF1B\u6D3E\u53D1\u540E\u76F4\u63A5\u6536\u5C3E\uFF0C\u4E0D\u8981\u8F6E\u8BE2" : "\u53EA\u652F\u6301\u5F02\u6B65\u6D3E\u53D1\uFF0CstartAgentRun \u4E0D\u63D0\u4F9B\u540C\u6B65\u7B49\u5F85\uFF1B\u9700\u8981\u7B49\u7EC8\u6001\u65F6\u53EF\u7528 controlAgentRun(wait)\uFF08\u82E5\u8BE5 action \u53EF\u7528\uFF09\uFF1B\u4E0D\u8981\u5047\u8BBE\u4F1A\u81EA\u52A8 terminal wake"),
14059
+ description: "\u542F\u52A8\u4E00\u4E2A Agent \u6267\u884C\u5B50\u4EFB\u52A1\u3002\u9ED8\u8BA4\u5F02\u6B65\uFF08fork+exec\uFF09\uFF1A\u7ACB\u5373\u8FD4\u56DE runId \u4E0D\u963B\u585E\u5BF9\u8BDD\uFF1B\u6D3E\u53D1\u540E\u5148\u63A8\u8FDB\u5176\u5B83\u72EC\u7ACB\u5DE5\u4F5C\uFF0C\u518D\u6536\u5C3E\u7B49\u5F85\u7EC8\u6001\u901A\u77E5\uFF0C\u7981\u6B62\u8F6E\u8BE2\uFF1BcontrolAgentRun \u7528\u4E8E\u63A7\u5236\uFF08\u53EB\u505C/\u8FFD\u52A0\u6307\u4EE4\uFF09\u4E0E\u5F02\u5E38\u8BCA\u65AD\u3002\u3010\u6D3E\u53D1\u7EAA\u5F8B\u3011\u540C\u4E00\u8F6E\u5E94\u5E76\u53D1\u6D3E\u53D1\u65E0\u771F\u5B9E\u4F9D\u8D56\u7684\u591A\u4E2A run\uFF1B\u7B49\u5F85\u67D0\u4E2A run \u7684\u7ED3\u679C\u4E0D\u5F97\u963B\u585E\u5176\u5B83\u72EC\u7ACB\u5DE5\u4F5C\u7684\u63A8\u8FDB\u3002\u5F02\u6B65\u6D3E\u53D1\u540E\uFF0C\u5148\u7EE7\u7EED\u63A8\u8FDB\u672C\u8F6E\u53EF\u6267\u884C\u7684\u72EC\u7ACB\u5DE5\u4F5C\uFF0C\u518D\u6536\u5C3E\u7B49\u5F85\u7EC8\u6001\uFF1B\u7B26\u5408\u4E0B\u8FF0\u540C\u6B65\u7B49\u5F85\u6761\u4EF6\u65F6\u4ECD\u53EF\u4F7F\u7528 wait:true\u3002\u53EA\u6709\u771F\u5B9E\u6587\u4EF6\u51B2\u7A81/\u63A5\u53E3\u5951\u7EA6\u4F9D\u8D56/\u51ED\u8BC1\u6216\u914D\u989D\u51C6\u5165\u51B2\u7A81/\u4E0A\u6E38\u4EA7\u7269\u4F9D\u8D56\u624D\u53EF\u4E32\u884C\uFF08\u4E0E\u7CFB\u7EDF\u63D0\u793A\u300C\u5E76\u884C\u662F\u9ED8\u8BA4\u300D\u4E00\u81F4\uFF09\u3002\u901A\u9053\u53EF\u7528\u6027\u4EC5\u5BF9\u5F53\u6B21\u6D3E\u53D1\u6709\u6548\uFF0C\u6D3E\u53D1\u524D\u52A1\u5FC5\u91CD\u65B0\u8BFB\u53D6\u53EF\u7528\u6027\uFF0C\u5207\u52FF\u590D\u7528\u6B64\u524D\u5931\u8D25\u7ED3\u8BBA\uFF1B\u9047\u5230 config_unresolved \u7C7B\u9519\u8BEF\u964D\u7EA7\u524D\u91CD\u8BD5\u4E00\u6B21\uFF1B\u540C\u4E00\u51ED\u8BC1\u9ED8\u8BA4\u5141\u8BB8\u5E76\u53D1\uFF08\u53D7\u670D\u52A1\u7AEF\u51C6\u5165\u9884\u7B97\u7EA6\u675F\uFF1B\u6CE8\u610F\u4E0A\u6E38 429 \u9650\u6D41\uFF0C\u5FC5\u8981\u65F6\u964D\u4F4E\u5E76\u53D1\u6216\u6362\u901A\u9053\uFF09\uFF0C\u672A\u77E5\u51ED\u8BC1\u9700\u4E32\u884C\u6216\u663E\u5F0F\u786E\u8BA4\u98CE\u9669\uFF1B\u6700\u5F3A\u79C1\u6709\u901A\u9053\u7559\u7ED9\u5BA1\u67E5\uFF0C\u6267\u884C\u4F18\u5148\u4F7F\u7528\u4F4E\u6210\u672C\u901A\u9053\u3002" + (supportsWait ? "\u8981\u540C\u6B65\u7ED3\u679C\u4F20 wait:true\uFF08\u4F1A\u51BB\u7ED3\u5BF9\u8BDD\uFF0C\u4EC5\u9650 \u2460 \u9884\u8BA1 <100s \u4E14\u9A6C\u4E0A\u8981\u7528\u7ED3\u679C \u2461 \u7528\u6237\u660E\u786E\u8981\u6C42\u540C\u6B65\u7B49\u5F85\u6216\u6B63\u5728\u4E0E\u8BE5\u5B50\u4EFB\u52A1\u5BF9\u8BDD \u2462 \u73AF\u5883\u4E0D\u652F\u6301\u7EC8\u6001\u5524\u9192\u4E14\u65E0\u5E76\u884C\u5DE5\u4F5C\uFF1B\u8BE6\u89C1 wait \u53C2\u6570\uFF09\u3002wait:true \u65F6\u53EF\u7528 resultMode \u63A7\u5236\u8FD4\u56DE\u5185\u5BB9\uFF1Afull=\u5B8C\u6574\u8F93\u51FA\uFF1Bsummary=\u53EA\u56DE\u5934\u5C3E\u603B\u7ED3\uFF08\u9632\u957F\u8F93\u51FA\u6491\u7206\u4E0A\u4E0B\u6587\uFF09\u3002" : wakeEnabled ? "\u53EA\u652F\u6301\u5F02\u6B65\u6D3E\u53D1\uFF1Brun \u5230\u7EC8\u6001\u4F1A\u81EA\u52A8\u901A\u8FC7 terminal wake \u628A\u7236\u5BF9\u8BDD\u63A5\u56DE\u6765\uFF1B\u6D3E\u53D1\u540E\u5148\u63A8\u8FDB\u5176\u5B83\u72EC\u7ACB\u5DE5\u4F5C\uFF0C\u518D\u6536\u5C3E\u7B49\u5F85\u5524\u9192\uFF0C\u4E0D\u8981\u8F6E\u8BE2" : "\u53EA\u652F\u6301\u5F02\u6B65\u6D3E\u53D1\uFF0CstartAgentRun \u4E0D\u63D0\u4F9B\u540C\u6B65\u7B49\u5F85\uFF1B\u9700\u8981\u7B49\u7EC8\u6001\u65F6\u53EF\u7528 controlAgentRun(wait)\uFF08\u82E5\u8BE5 action \u53EF\u7528\uFF09\uFF1B\u4E0D\u8981\u5047\u8BBE\u4F1A\u81EA\u52A8 terminal wake"),
14060
14060
  parameters: {
14061
14061
  type: "object",
14062
14062
  properties: {
@@ -18563,7 +18563,7 @@ async function updateDocFunc(args, thunkApi) {
18563
18563
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
18564
18564
  };
18565
18565
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
18566
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-WUR5MNKF.js");
18566
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-X5P4UGTZ.js");
18567
18567
  if (getDocState().pageKey === id) {
18568
18568
  applyExternalDocUpdate({
18569
18569
  slateData: finalSlateData,
@@ -0,0 +1,48 @@
1
+ import {
2
+ asTrimmedLowercaseString
3
+ } from "./chunk-QSJ3HFEF.js";
4
+
5
+ // packages/agent-runtime/serverProxyPolicy.ts
6
+ var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
7
+ "antigravity",
8
+ "xai",
9
+ "chatgpt",
10
+ "claude",
11
+ "cursor"
12
+ ]);
13
+ function isGoogleFamilyProvider(provider) {
14
+ const normalized = asTrimmedLowercaseString(provider);
15
+ return normalized === "google" || normalized.startsWith("google-");
16
+ }
17
+ function isOAuthApiKeyRef(value) {
18
+ const ref = asTrimmedLowercaseString(value);
19
+ return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
20
+ }
21
+ function shouldUseServerProxy(agentConfig, requestProvider) {
22
+ const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
23
+ if (isGoogleFamilyProvider(effectiveProvider)) {
24
+ return true;
25
+ }
26
+ if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
27
+ return true;
28
+ }
29
+ if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
30
+ return true;
31
+ }
32
+ return !!agentConfig.useServerProxy;
33
+ }
34
+ var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
35
+ function isRemoteCustomEndpoint(url) {
36
+ if (typeof url !== "string") return false;
37
+ try {
38
+ const host = new URL(url).hostname.toLowerCase().replace(/^\[|\]$/g, "");
39
+ return !LOCAL_HOSTS.has(host);
40
+ } catch {
41
+ return false;
42
+ }
43
+ }
44
+
45
+ export {
46
+ isOAuthApiKeyRef,
47
+ shouldUseServerProxy
48
+ };
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-QYPE3TS3.js";
12
12
  import {
13
13
  runLlm
14
- } from "./chunk-ORKQ3T5D.js";
14
+ } from "./chunk-W7S5CUGI.js";
15
15
  import {
16
16
  getApproxPricePerImage
17
17
  } from "./chunk-4JH2UMJR.js";
@@ -103,7 +103,7 @@ import {
103
103
  extractReferenceKeysFromMessage,
104
104
  normalizeUsage,
105
105
  resolveAutoExecutionProfile
106
- } from "./chunk-7TBARDLF.js";
106
+ } from "./chunk-T7HBI3WZ.js";
107
107
  import {
108
108
  isDevinOAuthAgent
109
109
  } from "./chunk-5ZUL4CUO.js";
@@ -118,10 +118,12 @@ import {
118
118
  formatFileOperationsFromMessages,
119
119
  formatMessagesForSummaryWithTruncation,
120
120
  getModelInfo,
121
- isOAuthApiKeyRef,
122
121
  planCompression,
123
122
  serializeMessageContent
124
- } from "./chunk-BKCR2JHG.js";
123
+ } from "./chunk-7ZGMQZ5D.js";
124
+ import {
125
+ isOAuthApiKeyRef
126
+ } from "./chunk-UKZX3NHN.js";
125
127
  import {
126
128
  asRecordOrEmpty
127
129
  } from "./chunk-KX6YBIHG.js";
@@ -11062,7 +11064,7 @@ var messageSlice = createSliceWithThunks({
11062
11064
  runtimeOptions: args.runtimeOptions
11063
11065
  });
11064
11066
  if (agentKeyToUse) {
11065
- const { streamAgentChatTurn } = await import("./agentSlice-RVJDFNRB.js");
11067
+ const { streamAgentChatTurn } = await import("./agentSlice-NL7LRTLO.js");
11066
11068
  await dispatch(
11067
11069
  streamAgentChatTurn({
11068
11070
  agentKey: agentKeyToUse,
@@ -13879,7 +13881,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13879
13881
  }
13880
13882
  if (isCurrentDialog) {
13881
13883
  await thunkApi.dispatch(resetMsgs());
13882
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-2FWQCZDB.js");
13884
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-R62QV2OE.js");
13883
13885
  dispatch(clearPendingAttachments2());
13884
13886
  }
13885
13887
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13887,15 +13889,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13887
13889
 
13888
13890
  // packages/chat/dialog/dialogSlice.ts
13889
13891
  var runCreateDialogAction = async (args, thunkApi) => {
13890
- const { createDialogAction } = await import("./createDialogAction-LROHLFQ2.js");
13892
+ const { createDialogAction } = await import("./createDialogAction-5WNACKWC.js");
13891
13893
  return createDialogAction(args, thunkApi);
13892
13894
  };
13893
13895
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13894
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-ECWLREQU.js");
13896
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-GS5LQ52L.js");
13895
13897
  return createAgentAutomationAction(args, thunkApi);
13896
13898
  };
13897
13899
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13898
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-YXQ2AJVK.js");
13900
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-YO67K72J.js");
13899
13901
  return updateDialogTitleAction(args, thunkApi);
13900
13902
  };
13901
13903
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -13919,7 +13921,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13919
13921
  return setDialogExtraReferencesAction(args, thunkApi);
13920
13922
  };
13921
13923
  var runHandleSendMessageAction = async (args, thunkApi) => {
13922
- const { handleSendMessageAction } = await import("./handleSendMessageAction-DVXNAQ2V.js");
13924
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-IVQMBROO.js");
13923
13925
  return handleSendMessageAction(args, thunkApi);
13924
13926
  };
13925
13927
  function clearDialogState() {
@@ -13932,7 +13934,7 @@ var createPageAndAddReference = createAsyncThunk(
13932
13934
  async (payload, { dispatch, getState, rejectWithValue }) => {
13933
13935
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13934
13936
  try {
13935
- const { createDocState } = await import("./docStore-WUR5MNKF.js");
13937
+ const { createDocState } = await import("./docStore-X5P4UGTZ.js");
13936
13938
  const pageKey = await createDocState(
13937
13939
  { slateData, title },
13938
13940
  { dispatch, getState }
@@ -347,7 +347,7 @@ var slice = createSliceWithThunks({
347
347
  const overrides = {};
348
348
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
349
349
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
350
- const { _executeModel } = await import("./_executeModel-IABRBGAE.js");
350
+ const { _executeModel } = await import("./_executeModel-KT7NUYZC.js");
351
351
  return _executeModel(
352
352
  {
353
353
  isStreaming: args.isStreaming ?? false,
@@ -368,7 +368,7 @@ var slice = createSliceWithThunks({
368
368
  * - 循环直到无工具调用或触发其他运行时停止条件
369
369
  */
370
370
  runAgent: create.asyncThunk(async (args, thunkApi) => {
371
- const { runAgentClientLoop } = await import("./runAgentClientLoop-34ME2HDT.js");
371
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-6G7JORHJ.js");
372
372
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
373
373
  {
374
374
  agentKey: args.agentKey,
@@ -384,7 +384,7 @@ var slice = createSliceWithThunks({
384
384
  * 聊天轮次流式 Agent 调用
385
385
  */
386
386
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
387
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-YXFJ3UWD.js");
387
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-EJDRXKAQ.js");
388
388
  return streamAgentChatTurnHandler(args, thunkApi);
389
389
  }),
390
390
  /**
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-MYZHJKLG.js";
3
+ } from "./chunk-64MLOS7B.js";
4
4
  import {
5
5
  format,
6
6
  prepareAndPersistMessage,
7
7
  uiAskChoiceFunc,
8
8
  uiAskChoiceFunctionSchema
9
- } from "./chunk-ULE7ABRN.js";
9
+ } from "./chunk-VETQRONK.js";
10
10
  import {
11
11
  formatISO
12
12
  } from "./chunk-ZRAU6T47.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  shouldUseServerProxy
3
- } from "./chunk-BKCR2JHG.js";
3
+ } from "./chunk-UKZX3NHN.js";
4
4
  import {
5
5
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
6
  isAntigravityCloudCodeBaseUrl,
7
7
  isAntigravityOAuthAgent
8
- } from "./chunk-TSCI6X6C.js";
8
+ } from "./chunk-JOUFPRE4.js";
9
9
  import {
10
10
  isOpenAiResponsesModel,
11
11
  resolvePlatformChatCompletionsEndpoint,
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-SUBKVXFM.js";
10
+ } from "./chunk-RUKAOMXD.js";
11
11
  import {
12
12
  parsePositiveFiniteNumberOrFallback
13
13
  } from "./chunk-Y5GCAMGP.js";
@@ -32,7 +32,7 @@ import {
32
32
  boundSummaryText,
33
33
  buildDialogReadEnvelope,
34
34
  projectDialogReadForAgent
35
- } from "./chunk-6J227QXV.js";
35
+ } from "./chunk-2GRXE3YJ.js";
36
36
  import {
37
37
  asRecordOrEmpty
38
38
  } from "./chunk-KX6YBIHG.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-AJ52EA72.js";
4
+ } from "./chunk-D2J22QSE.js";
5
5
  import {
6
6
  asOptionalFiniteNumber
7
7
  } from "./chunk-WWC7I6TA.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AGENT_SELECTION_PRIORITY_INSTRUCTIONS
3
- } from "./chunk-6J227QXV.js";
3
+ } from "./chunk-2GRXE3YJ.js";
4
4
  import {
5
5
  canonicalizeToolNames
6
6
  } from "./chunk-5EBLANFT.js";