nolo-cli 0.33.0-alpha.8 → 0.34.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 (158) hide show
  1. package/{_executeModel-RI6DRQTP.js → _executeModel-BUYCXZCQ.js} +65 -65
  2. package/{action-SMLG6OTB.js → action-KMBZ3LCZ.js} +12 -12
  3. package/{addContentAction-SFO244QN.js → addContentAction-KQ44UT2U.js} +10 -10
  4. package/{addDialogAgentAction-W44ZCEHB.js → addDialogAgentAction-ILSDCMYL.js} +9 -9
  5. package/{agentDeleteCommand-F2P4PF6R.js → agentDeleteCommand-WSS2IJVM.js} +40 -39
  6. package/{agentEmailCommands-BW6ZDQ3C.js → agentEmailCommands-SHTPJTSX.js} +75 -75
  7. package/{agentListCommands-IC3GH45S.js → agentListCommands-GV6UYVAF.js} +47 -37
  8. package/{agentMachineCommands-LGYGQX75.js → agentMachineCommands-FLD7TAFH.js} +37 -36
  9. package/agentProviderCommands-65ZC2WB4.js +122 -0
  10. package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
  11. package/agentRecordCommands-57W6R7QW.js +113 -0
  12. package/{agentRunCommand-F5L6GPSK.js → agentRunCommand-HJGXSMDN.js} +78 -76
  13. package/{agentRunControl-SCIVRZWX.js → agentRunControl-GXOB47YI.js} +5 -1
  14. package/{agentRuntimeLocal-B7SHOEHJ.js → agentRuntimeLocal-G7ZV55I6.js} +33 -33
  15. package/{agentSlice-GMKJKCPY.js → agentSlice-HFR7SP3B.js} +12 -12
  16. package/agentSuperviseCommands-Q64S5SPG.js +640 -0
  17. package/{appDeleteCommands-63VCZ5CT.js → appDeleteCommands-SHHE56Y2.js} +35 -34
  18. package/{appDeployCommands-YFTG2P3K.js → appDeployCommands-WUMSO2VS.js} +35 -34
  19. package/{appDeployStatusCommands-R5ENU5CQ.js → appDeployStatusCommands-VZSVN6SR.js} +35 -34
  20. package/{appGetCommands-3CH3VMUB.js → appGetCommands-ZJ2C3A5Y.js} +35 -34
  21. package/{appListCommands-Q2HVYG7J.js → appListCommands-W33L6U5X.js} +35 -34
  22. package/{authCommand-6Y5LTMZB.js → authCommand-B2XRHNJH.js} +19 -19
  23. package/{authCommands-EAPFGNHN.js → authCommands-GWABTFMR.js} +6 -6
  24. package/{chatQueueReduxAdapter-ZRFKEKD3.js → chatQueueReduxAdapter-SYIX4ODY.js} +28 -28
  25. package/{chunk-57QJXIB6.js → chunk-23KKIMD5.js} +7 -7
  26. package/{chunk-HUCT7HID.js → chunk-2KO5QQFV.js} +2 -2
  27. package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
  28. package/{chunk-PVVAWIUN.js → chunk-3LWZNEGQ.js} +1 -1
  29. package/{chunk-2GKZGZBN.js → chunk-3XZUNRYF.js} +33 -158
  30. package/{chunk-M2YMQOLC.js → chunk-4APLX2RT.js} +75 -10
  31. package/{chunk-ZHYK3N56.js → chunk-4AWH4LQA.js} +3 -1
  32. package/{chunk-3GZXL6FM.js → chunk-4DMPISV6.js} +7 -3
  33. package/chunk-4HOXB6SY.js +297 -0
  34. package/{chunk-OIQPORYI.js → chunk-64KIQZA2.js} +175 -2
  35. package/{chunk-MUCM2MZB.js → chunk-6KYCG5GW.js} +1216 -690
  36. package/chunk-6XG52ZQ6.js +146 -0
  37. package/{chunk-XFV2VK7O.js → chunk-74IQ5RRO.js} +21 -8
  38. package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
  39. package/{chunk-6FNS3SQF.js → chunk-7YDKVLAE.js} +10 -10
  40. package/{chunk-LZC5YX6P.js → chunk-AUH2LTIY.js} +7 -7
  41. package/{chunk-CLP2K7U4.js → chunk-B6H5XCT2.js} +8 -8
  42. package/{chunk-NNWHHCVP.js → chunk-BMB563Y6.js} +10 -4
  43. package/{chunk-DFUPZE6V.js → chunk-C6ELZQ7H.js} +249 -34
  44. package/{chunk-XL7BR2GE.js → chunk-DX6BP4K7.js} +285 -251
  45. package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
  46. package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
  47. package/{chunk-W7J5HZI7.js → chunk-FDKEDU7R.js} +14 -14
  48. package/{chunk-AOXVOC6D.js → chunk-FGLKRJDI.js} +54 -3
  49. package/{chunk-2QTEYCR7.js → chunk-FTM4KUOZ.js} +17 -17
  50. package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
  51. package/{chunk-7YYHKBJP.js → chunk-GKHV4UH5.js} +1 -1
  52. package/{chunk-2IVEXF7P.js → chunk-GUYMR3JL.js} +6 -33
  53. package/{chunk-YDTYDA5W.js → chunk-GZRMWK5R.js} +6 -4
  54. package/{chunk-KBZCACG7.js → chunk-HDT2RB7T.js} +3 -3
  55. package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
  56. package/{chunk-37V5LNEQ.js → chunk-IFS5CUEH.js} +1 -1
  57. package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
  58. package/{chunk-ADLYMQB6.js → chunk-IZCHPD7T.js} +52 -3
  59. package/{chunk-ITIA6OAQ.js → chunk-IZNJDUJ4.js} +5 -5
  60. package/{chunk-X2DAEZ3X.js → chunk-J5NMOM35.js} +1 -1
  61. package/{chunk-PREQU5QV.js → chunk-JI2TIPLP.js} +1 -1
  62. package/{chunk-EGRJC4ZN.js → chunk-JIADXJYU.js} +1 -1
  63. package/{chunk-IHEC7VBF.js → chunk-K4KIFRIN.js} +1 -1
  64. package/{chunk-JCGIUBE3.js → chunk-KCBK4MDT.js} +294 -54
  65. package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
  66. package/{chunk-VOBUVWP5.js → chunk-LAUUAYLK.js} +39 -2672
  67. package/{chunk-TFPUAELY.js → chunk-LD6Y6RJY.js} +4 -4
  68. package/{chunk-NKFMFT4W.js → chunk-LQ6PUHW6.js} +4195 -2631
  69. package/chunk-M3JQWYBC.js +387 -0
  70. package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
  71. package/{chunk-JZ5AMMXU.js → chunk-MGIHZ5CJ.js} +4 -4
  72. package/chunk-MI2J67UU.js +43 -0
  73. package/{chunk-JTSGWTYZ.js → chunk-MJWX4JQO.js} +2 -2
  74. package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
  75. package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
  76. package/{chunk-ZZ2MH7LE.js → chunk-O6OSWFZQ.js} +0 -1
  77. package/{chunk-ZURFOV5J.js → chunk-OFZPJ3NT.js} +13 -4
  78. package/{chunk-CHYAYZJH.js → chunk-OSCSEJJR.js} +15 -8
  79. package/{chunk-SCUETSRP.js → chunk-PV734VZX.js} +1 -1
  80. package/{chunk-7E72JMBB.js → chunk-SMPAUSX5.js} +46 -5
  81. package/{chunk-XCCGU6QB.js → chunk-U6QQLXWI.js} +1 -1
  82. package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
  83. package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
  84. package/{chunk-CPYYM4RJ.js → chunk-V5GA74HI.js} +19 -5
  85. package/{chunk-O6W5PZXA.js → chunk-VBD7W4Q6.js} +2057 -212
  86. package/{chunk-RTJWH72P.js → chunk-VD2SO4RG.js} +4 -4
  87. package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
  88. package/{chunk-7KNERA53.js → chunk-VSA6QAGV.js} +47 -3
  89. package/{chunk-G7E4NWFE.js → chunk-W445DPVT.js} +1 -1
  90. package/{chunk-VH2F7ZB6.js → chunk-WN5AJG5I.js} +1 -1
  91. package/{chunk-KSRFVP36.js → chunk-WRN7L5CS.js} +1 -1
  92. package/{chunk-4C7K5NXX.js → chunk-WRP5TTM6.js} +4 -84
  93. package/chunk-X2K2JSO4.js +163 -0
  94. package/{chunk-OR2HNLVO.js → chunk-X6EN3KJX.js} +279 -477
  95. package/{chunk-IL545V3E.js → chunk-XQES6LXQ.js} +2 -2
  96. package/{chunk-UK5JGQVU.js → chunk-XT73C4VH.js} +26 -21
  97. package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
  98. package/{chunk-YBPAQV37.js → chunk-YRP7LG4R.js} +4527 -4080
  99. package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
  100. package/{chunk-3WXRAHCG.js → chunk-ZBB3MZR3.js} +3 -3
  101. package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
  102. package/{clipboardy-MMBYVRLF.js → clipboardy-PRUHGPGC.js} +4 -3
  103. package/{codingSkills-DY5MINPG.js → codingSkills-H6N5EKSX.js} +3 -3
  104. package/cooldownCommands-C2SZLEEO.js +90 -0
  105. package/{createAgentAutomationAction-6SE7CQ7F.js → createAgentAutomationAction-BH3D2L2H.js} +28 -30
  106. package/{createDialogAction-AROAXAPM.js → createDialogAction-U4LDV2RW.js} +31 -33
  107. package/{createPageAction-GCO3R6GR.js → createPageAction-Q2ANG535.js} +30 -32
  108. package/{dbSlice-3SD5L5H2.js → dbSlice-PIQGICNM.js} +9 -9
  109. package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +4 -4
  110. package/{dialogCommands-N26NNRRD.js → dialogCommands-C556D6WD.js} +37 -36
  111. package/{dialogSlice-JVPBOMFB.js → dialogSlice-P2VSKG2X.js} +27 -27
  112. package/dist-VODFSGNG.js +7442 -0
  113. package/{docCreateCommands-PON6FF4V.js → docCreateCommands-AAVGLQWE.js} +36 -35
  114. package/{docDeleteCommands-WWRFONDS.js → docDeleteCommands-PKMKSQD2.js} +37 -36
  115. package/{docReadCommands-S4Z275LB.js → docReadCommands-2WUH7UXC.js} +36 -35
  116. package/{docStore-WGDO3I76.js → docStore-J5UWRBB4.js} +29 -31
  117. package/{docUpdateCommands-TJQB4IJ7.js → docUpdateCommands-B2N4E5HQ.js} +38 -37
  118. package/{fetchMessages-7QRCCRYK.js → fetchMessages-CUEFN4GQ.js} +4 -4
  119. package/{getPricing-L2ENXWHV.js → getPricing-P3E2WRIH.js} +5 -5
  120. package/{handleSendMessageAction-T7AS7DDY.js → handleSendMessageAction-RRZ53YYH.js} +29 -29
  121. package/index.js +92 -77
  122. package/{localDialogRead-SLMPV5SK.js → localDialogRead-P7CHFMIC.js} +1 -1
  123. package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
  124. package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
  125. package/{machineCommands-C6CPXZRR.js → machineCommands-CWKMJG33.js} +77 -77
  126. package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
  127. package/{machineWsRunDispatch-27K2P4OP.js → machineWsRunDispatch-UYNVNX4A.js} +69 -69
  128. package/{models-OX2S5C6Q.js → models-L7S2EKPM.js} +2 -2
  129. package/package.json +1 -1
  130. package/{read-6G73BMEY.js → read-6C2XD3YZ.js} +5 -5
  131. package/{readDocTool-DK4EI2GA.js → readDocTool-Y7AB365O.js} +1 -1
  132. package/{readlineWorkspace-LBWKTPJE.js → readlineWorkspace-VYELP22P.js} +2851 -1515
  133. package/{removeDialogAgentAction-E7H557UO.js → removeDialogAgentAction-KG5WMJRZ.js} +13 -13
  134. package/{runAgentClientLoop-D2T2P36H.js → runAgentClientLoop-35GKZDOZ.js} +62 -61
  135. package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
  136. package/{setDialogExtraReferencesAction-RMMGBR5F.js → setDialogExtraReferencesAction-O2NLXMSM.js} +10 -10
  137. package/{setPrimaryDialogAgentAction-FWBKKLVA.js → setPrimaryDialogAgentAction-FYYUY7PB.js} +13 -13
  138. package/{settingSlice-73PV4KG4.js → settingSlice-GPLI6E3M.js} +11 -11
  139. package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-COX56OBO.js} +3 -3
  140. package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
  141. package/{spaceCommands-B6LO4U5R.js → spaceCommands-AAKQM2PM.js} +223 -37
  142. package/{spaceSlice-VUAEZVDS.js → spaceSlice-NSNGR4Y2.js} +28 -30
  143. package/{streamAgentChatTurn-BBPSFMTZ.js → streamAgentChatTurn-D5IDHXMV.js} +116 -129
  144. package/{switchDialogAgentAction-US6QNL3N.js → switchDialogAgentAction-GH5P6Q3Z.js} +9 -9
  145. package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
  146. package/{tableCommands-QE47K72R.js → tableCommands-PQUJ55AS.js} +3 -3
  147. package/{tools-NWA3J7KE.js → tools-JQOETZP5.js} +44 -45
  148. package/{tuiSummaryLlmCaller-KC7JCJBB.js → tuiSummaryLlmCaller-LH7F2SP7.js} +18 -18
  149. package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
  150. package/{updateDialogTitleAction-TDDQ4J4L.js → updateDialogTitleAction-WOTSDSFQ.js} +31 -33
  151. package/agentRecordCommands-FCQ7ZF6C.js +0 -113
  152. package/chunk-5SBK2MTI.js +0 -528
  153. package/chunk-M3JEW6N6.js +0 -193
  154. package/chunk-OOK2ZT5F.js +0 -1800
  155. package/syncMapping-RK2MANUX.js +0 -43
  156. package/{chunk-KMSZPTM6.js → chunk-2WKUUY2E.js} +3 -3
  157. package/{chunk-CWMSB67P.js → chunk-AGGIDPCZ.js} +0 -0
  158. package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
6
  isAntigravityOAuthAgent
7
- } from "./chunk-SCUETSRP.js";
7
+ } from "./chunk-PV734VZX.js";
8
8
  import {
9
9
  clipMultilineText,
10
10
  fetchAndSerializeTable,
11
11
  resolveBuiltinSkillPage,
12
12
  waitForAbortableDelay
13
- } from "./chunk-MUCM2MZB.js";
13
+ } from "./chunk-6KYCG5GW.js";
14
14
  import {
15
15
  createDrainExhaustedResponse,
16
16
  isCoreDrainingBody,
@@ -20,19 +20,24 @@ import {
20
20
  } from "./chunk-RQSOAMPJ.js";
21
21
  import {
22
22
  slateToSimplifiedMarkdown
23
- } from "./chunk-37V5LNEQ.js";
23
+ } from "./chunk-IFS5CUEH.js";
24
24
  import {
25
25
  extractCategorizedMentions
26
- } from "./chunk-GM6PU7B6.js";
26
+ } from "./chunk-MEYIRKDN.js";
27
27
  import {
28
28
  fetchAndCacheMessages
29
- } from "./chunk-XL7BR2GE.js";
29
+ } from "./chunk-DX6BP4K7.js";
30
30
  import {
31
31
  shouldUseServerProxy
32
32
  } from "./chunk-YYLHWIW6.js";
33
33
  import {
34
34
  fetchServerSyncedCredential
35
- } from "./chunk-LZC5YX6P.js";
35
+ } from "./chunk-AUH2LTIY.js";
36
+ import {
37
+ buildSkillGuidancePromptBlock,
38
+ extractRuntimePageCapabilities,
39
+ resolveSkillGraphFromRoots
40
+ } from "./chunk-2KO5QQFV.js";
36
41
  import {
37
42
  buildCurrentTimeBlock,
38
43
  buildIdentityBlock,
@@ -40,73 +45,71 @@ import {
40
45
  requiresBareImageUrl,
41
46
  resolveToolGuidedSections,
42
47
  toBareImageUrlMessages
43
- } from "./chunk-5SBK2MTI.js";
48
+ } from "./chunk-M3JQWYBC.js";
44
49
  import {
45
50
  convertMessagesToResponsesInput,
46
51
  getUsageRequestOptions,
47
52
  preserveAgentStateFields
48
- } from "./chunk-NNWHHCVP.js";
53
+ } from "./chunk-BMB563Y6.js";
49
54
  import {
50
55
  buildProviderAuthHeaders
51
- } from "./chunk-7YYHKBJP.js";
56
+ } from "./chunk-GKHV4UH5.js";
52
57
  import {
53
58
  estimateTokenCount
54
- } from "./chunk-AOXVOC6D.js";
59
+ } from "./chunk-FGLKRJDI.js";
55
60
  import {
56
61
  isOpenAiResponsesModel,
57
62
  resolvePlatformChatCompletionsEndpoint,
58
63
  resolvePlatformResponsesEndpoint
59
- } from "./chunk-CPYYM4RJ.js";
64
+ } from "./chunk-V5GA74HI.js";
60
65
  import {
61
66
  clampReasoningEffort,
62
67
  getModelConfig,
63
68
  isModelSupportReasoningEffort
64
- } from "./chunk-DFUPZE6V.js";
69
+ } from "./chunk-C6ELZQ7H.js";
65
70
  import {
66
71
  createFileCredentialBroker
67
- } from "./chunk-5CS33IBL.js";
72
+ } from "./chunk-NQ4N4IGO.js";
73
+ import {
74
+ toErrorMessage
75
+ } from "./chunk-HNMXYYJR.js";
68
76
  import {
69
77
  MEMORY_USE_GUIDANCE,
70
78
  buildUserResponseLanguageContext,
71
79
  wrapHistoricalSummaryWithReplayGuard
72
- } from "./chunk-FMEVI5TG.js";
73
- import {
74
- buildSkillGuidancePromptBlock,
75
- extractRuntimePageCapabilities,
76
- resolveSkillGraphFromRoots
77
- } from "./chunk-HUCT7HID.js";
80
+ } from "./chunk-7CH6U3FL.js";
78
81
  import {
79
82
  canonicalizeToolNames
80
- } from "./chunk-ZZ2MH7LE.js";
81
- import {
82
- toErrorMessage
83
- } from "./chunk-HNMXYYJR.js";
83
+ } from "./chunk-O6OSWFZQ.js";
84
84
  import {
85
85
  isDeepInfraKimiModel,
86
86
  isFireworksKimiModel,
87
87
  resolveFireworksKimiModel
88
- } from "./chunk-OR2HNLVO.js";
88
+ } from "./chunk-X6EN3KJX.js";
89
89
  import {
90
90
  createSpaceKey
91
- } from "./chunk-JTSGWTYZ.js";
91
+ } from "./chunk-MJWX4JQO.js";
92
92
  import {
93
93
  read
94
- } from "./chunk-57QJXIB6.js";
94
+ } from "./chunk-23KKIMD5.js";
95
95
  import {
96
96
  asTrimmedLowercaseString
97
97
  } from "./chunk-QSJ3HFEF.js";
98
+ import {
99
+ extractCustomId
100
+ } from "./chunk-BJIRLHJR.js";
98
101
  import {
99
102
  getRuntimeServerContext
100
- } from "./chunk-X664KVEV.js";
103
+ } from "./chunk-HHBXCRJS.js";
101
104
  import {
102
105
  isAbortError
103
- } from "./chunk-WJSW43QZ.js";
106
+ } from "./chunk-L3JWI7WX.js";
107
+ import {
108
+ isRecord
109
+ } from "./chunk-KUG52IAP.js";
104
110
  import {
105
111
  asTrimmedString
106
112
  } from "./chunk-3EUW3WEO.js";
107
- import {
108
- extractCustomId
109
- } from "./chunk-BJIRLHJR.js";
110
113
  import {
111
114
  API_ENDPOINTS
112
115
  } from "./chunk-LCBAMY2M.js";
@@ -557,16 +560,19 @@ ${description}
557
560
  ${content} ` : "";
558
561
  var buildResponseGuidelines = (isMobile) => {
559
562
  if (isMobile) {
560
- return `-- - \u54CD\u5E94\u5C55\u793A\u6307\u5357-- -
561
- \u8BF7\u4E3A\u79FB\u52A8\u7AEF\u8FDB\u884C\u4F18\u5316\uFF1A
562
- - \u4F7F\u7528\u66F4\u77ED\u7684\u6BB5\u843D\u548C\u7B80\u6D01\u7684\u9879\u76EE\u7B26\u53F7\u5217\u8868\u3002
563
- - \u907F\u514D\u8FC7\u5BBD\u7684\u8868\u683C\u6216\u4EE3\u7801\u5757\uFF0C\u4EE5\u514D\u4EA7\u751F\u6A2A\u5411\u6EDA\u52A8\u3002
564
- - \u4F18\u5148\u91C7\u7528\u5782\u76F4\u6392\u5E03\uFF0C\u800C\u4E0D\u662F\u5DE6\u53F3\u5E76\u6392\u7684\u5E03\u5C40\u3002`;
565
- }
566
- return `-- - \u54CD\u5E94\u5C55\u793A\u6307\u5357-- -
567
- \u4F60\u7684\u56DE\u590D\u5C06\u663E\u793A\u5728\u5927\u5C4F\u5E55\u4E0A\u3002\u4F60\u53EF\u4EE5\uFF1A
568
- - \u63D0\u4F9B\u66F4\u4E30\u5BCC\u7684\u63A8\u7406\u8FC7\u7A0B\u8BF4\u660E\u548C\u66F4\u6709\u5C42\u6B21\u7684\u7ED3\u6784\u3002
569
- - \u5728\u5408\u9002\u7684\u573A\u666F\u4E0B\u4F7F\u7528\u5BBD\u5C4F\u4F18\u52BF\uFF0C\u4F8B\u5982\u66F4\u5BBD\u7684\u8868\u683C\u3001\u5E76\u6392\u5BF9\u6BD4\u5C55\u793A\u3001\u66F4\u957F\u7684\u4EE3\u7801\u5757\u7B49\u3002`;
563
+ return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u7A84\u5C4F / TUI / \u79FB\u52A8\u7AEF\uFF09 ---
564
+ \u5F53\u524D\u5904\u4E8E\u7A84\u5C4F\u6216\u7EC8\u7AEF\u89C6\u56FE\uFF0C\u8BF7\u91C7\u7528\u7D27\u51D1\u3001\u9AD8\u626B\u63CF\u7387\u7684\u6392\u7248\uFF1A
565
+ - **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u7ED3\u8BBA\u6216\u5173\u952E\u72B6\u6001\u7F6E\u9876\uFF0C\u76F4\u5954\u4E3B\u9898\uFF1B\u77ED\u6BB5\u843D\uFF082-4 \u53E5\uFF09\u5E76\u4FDD\u6301\u7A7A\u884C\u547C\u5438\uFF0C\u62D2\u7EDD\u957F\u6BB5\u6587\u5B57\u5899\u3002
566
+ - **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF0C\u9632\u6B62\u7EC8\u7AEF\u4E0E\u79FB\u52A8\u7AEF\u6298\u884C\u9519\u4F4D\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
567
+ - **\u8868\u683C\u964D\u7EA7**\uFF1A\u4E25\u7981\u4F7F\u7528 \u22654 \u5217\u7684\u5927\u5BBD\u8868\uFF08\u7A84\u5C4F/\u7EC8\u7AEF\u4E0B\u6298\u884C\u4E25\u91CD\u9519\u4F4D\uFF09\uFF0C\u6539\u7528\u300C\u952E\u503C\u6E05\u5355\u300D\u6216\u7EB5\u5411\u5361\u7247\u3002
568
+ - **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u514B\u5236\u4F7F\u7528\u300C---\u300D\u5206\u5272\u7EBF\uFF08\u4EC5\u5927\u4E3B\u9898\u5207\u6362\u6216\u7ED3\u8BBA\u524D\uFF0C\u524D\u540E\u7559\u7A7A\u884C\uFF09\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u4E00\u5F8B\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF1B\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\u4E14\u907F\u514D\u6A2A\u5411\u8D85\u957F\u884C\uFF1B\u514B\u5236 Emoji\u3002`;
569
+ }
570
+ return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u5BBD\u5C4F / \u684C\u9762\u7AEF\uFF09 ---
571
+ \u5F53\u524D\u5904\u4E8E\u5927\u5C4F\u89C6\u56FE\uFF0C\u53EF\u5145\u5206\u53D1\u6325\u7A7A\u95F4\u4F18\u52BF\uFF1A
572
+ - **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u63D0\u4F9B\u5C42\u6B21\u6E05\u6670\u7684\u5168\u666F\u7ED3\u6784\uFF0C\u91CD\u8981\u6A21\u5757\u7528\u4E8C\u7EA7/\u4E09\u7EA7\u6807\u9898\u5212\u5206\uFF1B\u6BB5\u843D\u4FDD\u6301 2-4 \u53E5\u5E76\u7559\u7A7A\u884C\u547C\u5438\uFF0C\u76F4\u5954\u4E3B\u9898\u3002
573
+ - **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
574
+ - **\u8868\u683C\u4E0E\u5BF9\u6BD4**\uFF1A\u5BBD\u5C4F\u4E0B\u53EF\u9002\u5EA6\u4F7F\u7528 Markdown \u591A\u5217\u8868\u683C\u8FDB\u884C\u65B9\u6848\u6A2A\u5411\u5BF9\u6BD4\u3001\u53C2\u6570\u6C47\u603B\u6216\u77E9\u9635\u5206\u6790\u3002
575
+ - **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u53EF\u5C55\u793A\u66F4\u5B8C\u6574\u7684\u4EE3\u7801\u4E0A\u4E0B\u6587\u4E0E\u591A\u6B65\u6267\u884C\u793A\u4F8B\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF0C\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\uFF1B\u514B\u5236\u4F7F\u7528\u5206\u5272\u7EBF\u4E0E Emoji\u3002`;
570
576
  };
571
577
  var buildReferenceMaterialsBlock = (contexts) => {
572
578
  const sections = [
@@ -672,14 +678,13 @@ ${mainPrompt}` : "";
672
678
  const {
673
679
  startupProtocol,
674
680
  contextLayerContract,
675
- emailRegistrationWorkflow,
676
- webResearchToolPolicy
681
+ emailRegistrationWorkflow
677
682
  } = buildRuntimeGuidanceBlocks(agentTools);
678
683
  const clarifyingSection = !mainPrompt ? CLARIFICATION_MODE_INSTRUCTIONS : "";
679
684
  const userGlobalPromptSection = contexts.userGlobalPrompt?.trim() ? `-- - \u7528\u6237\u5168\u5C40\u504F\u597D-- -
680
685
  ${contexts.userGlobalPrompt.trim()} ` : "";
681
- const fallbackViewportWidth = isBrowser && typeof window !== "undefined" ? window.innerWidth : 1440;
682
- const isMobile = (viewport?.width ?? fallbackViewportWidth) < mobileBreakpoint;
686
+ const effectiveViewport = viewport ?? contexts.viewport;
687
+ const isMobile = effectiveViewport !== void 0 ? effectiveViewport.width < mobileBreakpoint : typeof contexts.isMobile === "boolean" ? contexts.isMobile : isBrowser && typeof window !== "undefined" ? window.innerWidth < mobileBreakpoint : false;
683
688
  const responseGuidelinesSection = buildResponseGuidelines(isMobile);
684
689
  const editingContextSection = buildEditingContextBlock(contexts);
685
690
  const appWorkingMemorySection = buildAppWorkingMemoryBlock(contexts);
@@ -715,12 +720,6 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
715
720
  cacheScope: "static",
716
721
  content: emailRegistrationWorkflow
717
722
  },
718
- {
719
- id: "web-research-tool-policy",
720
- owner: "platform",
721
- cacheScope: "static",
722
- content: webResearchToolPolicy
723
- },
724
723
  { id: "user-global-prompt", owner: "user", cacheScope: "session", content: userGlobalPromptSection },
725
724
  { id: "response-guidelines", owner: "platform", cacheScope: "session", content: responseGuidelinesSection },
726
725
  { id: "skill-guidance", owner: "runtime", cacheScope: "session", content: skillGuidanceSection },
@@ -1376,6 +1375,241 @@ var performFetchRequest = async (params) => {
1376
1375
  }
1377
1376
  };
1378
1377
 
1378
+ // packages/ai/chat/toolCallArgumentGuard.ts
1379
+ var INVALID_TOOL_ARGS_REPLACEMENT = '{"_invalid":true,"_reason":"arguments truncated or malformed"}';
1380
+ var INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT = '{"_invalid":true}';
1381
+ var INVALID_TOOL_RESULT_HINT = "\u5DE5\u5177\u53C2\u6570 JSON \u88AB\u622A\u65AD\uFF08\u5927\u6982\u7387\u8D85\u51FA\u8F93\u51FA\u957F\u5EA6\uFF09\u3002\u4E0D\u8981\u628A\u5B8C\u6574\u6E90\u7801\u585E\u8FDB\u4E00\u6B21\u5DE5\u5177\u8C03\u7528\uFF1A\u5148\u7528 appFileWrite \u5206\u6587\u4EF6\u591A\u6B21\u5199\u5165\uFF0C\u518D\u8C03\u7528\u4E0D\u5E26\u5185\u8054\u5927\u53C2\u6570\u7684 appPreflight/appDeploy\u3002";
1382
+ var ORPHAN_TOOL_RESULT_PLACEHOLDER = '{"error":"tool call was interrupted"}';
1383
+ function parseToolCallArguments(args) {
1384
+ if (isRecord(args)) {
1385
+ return { valid: true, parsed: args };
1386
+ }
1387
+ if (typeof args !== "string") return { valid: false };
1388
+ const trimmed = args.trim();
1389
+ if (!trimmed) return { valid: false };
1390
+ try {
1391
+ const parsed = JSON.parse(trimmed);
1392
+ if (!isRecord(parsed)) {
1393
+ return { valid: false };
1394
+ }
1395
+ return { valid: true, parsed };
1396
+ } catch {
1397
+ return { valid: false };
1398
+ }
1399
+ }
1400
+ function buildInvalidToolCallSelfHealResult(callId, toolName) {
1401
+ return JSON.stringify({
1402
+ error: true,
1403
+ toolCallId: callId,
1404
+ ...toolName ? { toolName } : {},
1405
+ message: INVALID_TOOL_RESULT_HINT
1406
+ });
1407
+ }
1408
+ function isHexDigit(ch) {
1409
+ return ch >= "0" && ch <= "9" || ch >= "a" && ch <= "f" || ch >= "A" && ch <= "F";
1410
+ }
1411
+ function sanitizeTextContent(text) {
1412
+ if (typeof text !== "string") return text;
1413
+ let out = "";
1414
+ let i = 0;
1415
+ const n = text.length;
1416
+ while (i < n) {
1417
+ const code = text.charCodeAt(i);
1418
+ if (code >= 55296 && code <= 56319) {
1419
+ const next = i + 1 < n ? text.charCodeAt(i + 1) : -1;
1420
+ if (next >= 56320 && next <= 57343) {
1421
+ out += text[i] + text[i + 1];
1422
+ i += 2;
1423
+ continue;
1424
+ }
1425
+ out += "\uFFFD";
1426
+ i += 1;
1427
+ continue;
1428
+ }
1429
+ if (code >= 56320 && code <= 57343) {
1430
+ out += "\uFFFD";
1431
+ i += 1;
1432
+ continue;
1433
+ }
1434
+ if (code === 92) {
1435
+ let backslashRun = 0;
1436
+ let k = i;
1437
+ while (k >= 0 && text.charCodeAt(k) === 92) {
1438
+ backslashRun++;
1439
+ k--;
1440
+ }
1441
+ const alreadyEscaped = backslashRun % 2 === 0;
1442
+ const nextCh = i + 1 < n ? text[i + 1] : "";
1443
+ if (!alreadyEscaped && (nextCh === "x" || nextCh === "u")) {
1444
+ const hexLen = nextCh === "x" ? 2 : 4;
1445
+ let hexCount = 0;
1446
+ let j = i + 2;
1447
+ while (j < n && hexCount < hexLen && isHexDigit(text[j])) {
1448
+ hexCount++;
1449
+ j++;
1450
+ }
1451
+ if (hexCount < hexLen) {
1452
+ out += "\\\\";
1453
+ i += 1;
1454
+ continue;
1455
+ }
1456
+ out += text[i];
1457
+ i += 1;
1458
+ continue;
1459
+ }
1460
+ }
1461
+ out += text[i];
1462
+ i += 1;
1463
+ }
1464
+ return out;
1465
+ }
1466
+ function sanitizeContentText(content) {
1467
+ if (typeof content === "string") {
1468
+ return sanitizeTextContent(content);
1469
+ }
1470
+ if (Array.isArray(content)) {
1471
+ return content.map((part) => {
1472
+ if (part && typeof part === "object") {
1473
+ const p = part;
1474
+ if (typeof p.text === "string") {
1475
+ return { ...p, text: sanitizeTextContent(p.text) };
1476
+ }
1477
+ }
1478
+ return part;
1479
+ });
1480
+ }
1481
+ return content;
1482
+ }
1483
+ function sanitizeResponsesItemText(item) {
1484
+ if (!item || typeof item !== "object") return item;
1485
+ const type = item.type;
1486
+ if (type === "input_text" || type === "output_text") {
1487
+ if (typeof item.text === "string") {
1488
+ return { ...item, text: sanitizeTextContent(item.text) };
1489
+ }
1490
+ return item;
1491
+ }
1492
+ if (type === "function_call_output") {
1493
+ if (typeof item.output === "string") {
1494
+ return { ...item, output: sanitizeTextContent(item.output) };
1495
+ }
1496
+ if (Array.isArray(item.output)) {
1497
+ return { ...item, output: sanitizeContentText(item.output) };
1498
+ }
1499
+ return item;
1500
+ }
1501
+ if (type === "message" && "content" in item) {
1502
+ return { ...item, content: sanitizeContentText(item.content) };
1503
+ }
1504
+ return item;
1505
+ }
1506
+ function normalizeToolCallArgumentsInPlace(call, replacement) {
1507
+ if (!call || typeof call !== "object") return;
1508
+ const fn = call.function;
1509
+ if (!fn || typeof fn !== "object") return;
1510
+ const { valid } = parseToolCallArguments(fn.arguments);
1511
+ if (!valid) {
1512
+ fn.arguments = replacement;
1513
+ } else if (typeof fn.arguments !== "string") {
1514
+ try {
1515
+ fn.arguments = JSON.stringify(fn.arguments);
1516
+ } catch {
1517
+ fn.arguments = replacement;
1518
+ }
1519
+ }
1520
+ }
1521
+ function sanitizeOutboundMessages(messages, opts = {}) {
1522
+ if (!Array.isArray(messages) || messages.length === 0) return messages ?? [];
1523
+ const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
1524
+ const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
1525
+ const cloned = messages.map((msg) => ({ ...msg }));
1526
+ const answeredCallIds = /* @__PURE__ */ new Set();
1527
+ for (const msg of cloned) {
1528
+ if (msg?.role === "tool" && typeof msg.tool_call_id === "string") {
1529
+ answeredCallIds.add(msg.tool_call_id);
1530
+ }
1531
+ }
1532
+ const result = [];
1533
+ for (const msg of cloned) {
1534
+ if (msg && typeof msg === "object" && "content" in msg) {
1535
+ msg.content = sanitizeContentText(msg.content);
1536
+ }
1537
+ if (msg?.role === "assistant" && Array.isArray(msg.tool_calls)) {
1538
+ msg.tool_calls = msg.tool_calls.map((call) => ({
1539
+ ...call,
1540
+ function: { ...call?.function ?? {} }
1541
+ }));
1542
+ for (const call of msg.tool_calls) {
1543
+ normalizeToolCallArgumentsInPlace(call, argsReplacement);
1544
+ }
1545
+ result.push(msg);
1546
+ for (const call of msg.tool_calls) {
1547
+ const callId = typeof call?.id === "string" ? call.id : void 0;
1548
+ if (!callId) continue;
1549
+ if (answeredCallIds.has(callId)) continue;
1550
+ answeredCallIds.add(callId);
1551
+ result.push({
1552
+ role: "tool",
1553
+ tool_call_id: callId,
1554
+ content: orphanReplacement
1555
+ });
1556
+ }
1557
+ continue;
1558
+ }
1559
+ result.push(msg);
1560
+ }
1561
+ return result;
1562
+ }
1563
+ function sanitizeOutboundResponsesInput(input, opts = {}) {
1564
+ if (!Array.isArray(input) || input.length === 0) return input ?? [];
1565
+ const argsReplacement = opts.argsReplacement ?? INVALID_TOOL_ARGS_OUTBOUND_REPLACEMENT;
1566
+ const orphanReplacement = opts.orphanReplacement ?? ORPHAN_TOOL_RESULT_PLACEHOLDER;
1567
+ const answeredCallIds = /* @__PURE__ */ new Set();
1568
+ for (const item of input) {
1569
+ if (item?.type === "function_call_output" && typeof item.call_id === "string") {
1570
+ answeredCallIds.add(item.call_id);
1571
+ }
1572
+ }
1573
+ const result = [];
1574
+ for (const item of input) {
1575
+ if (item?.type === "function_call") {
1576
+ const cloned = { ...item };
1577
+ const { valid } = parseToolCallArguments(cloned.arguments);
1578
+ if (!valid) {
1579
+ cloned.arguments = argsReplacement;
1580
+ } else if (typeof cloned.arguments !== "string") {
1581
+ try {
1582
+ cloned.arguments = JSON.stringify(cloned.arguments);
1583
+ } catch {
1584
+ cloned.arguments = argsReplacement;
1585
+ }
1586
+ }
1587
+ result.push(cloned);
1588
+ const callId = typeof cloned.call_id === "string" ? cloned.call_id : void 0;
1589
+ if (callId && !answeredCallIds.has(callId)) {
1590
+ answeredCallIds.add(callId);
1591
+ result.push({
1592
+ type: "function_call_output",
1593
+ call_id: callId,
1594
+ output: orphanReplacement
1595
+ });
1596
+ }
1597
+ continue;
1598
+ }
1599
+ result.push(sanitizeResponsesItemText(item));
1600
+ }
1601
+ return result;
1602
+ }
1603
+ function sanitizeOutboundBody(body) {
1604
+ const next = { ...body };
1605
+ if (Array.isArray(body.messages)) {
1606
+ next.messages = sanitizeOutboundMessages(body.messages);
1607
+ } else if (Array.isArray(body.input)) {
1608
+ next.input = sanitizeOutboundResponsesInput(body.input);
1609
+ }
1610
+ return next;
1611
+ }
1612
+
1379
1613
  // packages/create/editor/transforms/slateToText.ts
1380
1614
  function getNodeText(node) {
1381
1615
  if (node.text) {
@@ -1556,8 +1790,8 @@ var fetchDialogReference = async (dbKey, refContent, dispatch) => {
1556
1790
  if (Array.isArray(checkpoint.lastToolNames) && checkpoint.lastToolNames.length) {
1557
1791
  checkpointLines.push(`- lastToolNames: ${checkpoint.lastToolNames.join(", ")}`);
1558
1792
  }
1559
- if (Array.isArray(checkpoint.availableToolNames) && checkpoint.availableToolNames.length) {
1560
- checkpointLines.push(`- availableToolNames: ${checkpoint.availableToolNames.join(", ")}`);
1793
+ if (Array.isArray(checkpoint.toolSurface?.finalToolNames) && checkpoint.toolSurface.finalToolNames.length) {
1794
+ checkpointLines.push(`- availableToolNames: ${checkpoint.toolSurface.finalToolNames.join(", ")}`);
1561
1795
  }
1562
1796
  }
1563
1797
  const recentToolEvidence = sortedMessages.filter((msg) => msg.role === "tool" || msg.toolName).slice(-3).map((msg) => {
@@ -1716,5 +1950,11 @@ export {
1716
1950
  resolveAgentCallPlan,
1717
1951
  generateRequestBody,
1718
1952
  performServerProxyFetchWithRetry,
1719
- performFetchRequest
1953
+ performFetchRequest,
1954
+ INVALID_TOOL_ARGS_REPLACEMENT,
1955
+ parseToolCallArguments,
1956
+ buildInvalidToolCallSelfHealResult,
1957
+ sanitizeOutboundMessages,
1958
+ sanitizeOutboundResponsesInput,
1959
+ sanitizeOutboundBody
1720
1960
  };
@@ -259,7 +259,6 @@ export {
259
259
  getIsDesktopApp,
260
260
  createClientLogger,
261
261
  isAbortError,
262
- fetchWithTransientReadRetry,
263
262
  logger,
264
263
  getAllServers,
265
264
  fetchFromClientDb,