nolo-cli 0.211.0 → 0.212.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-VVQEOY3D.js → _executeModel-KE6MBNUJ.js} +51 -48
  2. package/{action-U235TV4P.js → action-DF5UYSJF.js} +4 -4
  3. package/{addContentAction-7C76J7ST.js → addContentAction-N2YC5IL3.js} +8 -8
  4. package/{addDialogAgentAction-KTYANUEC.js → addDialogAgentAction-3NKVQCEC.js} +15 -12
  5. package/{agentDeleteCommand-WHRU6VDJ.js → agentDeleteCommand-NWK7VU4N.js} +71 -67
  6. package/{agentEmailCommands-ALLHXPW3.js → agentEmailCommands-UZ4DHEX2.js} +77 -72
  7. package/{agentListCommands-POKMEKMS.js → agentListCommands-HE7L2A6L.js} +190 -77
  8. package/{agentMachineCommands-WJLZLBPI.js → agentMachineCommands-6TE4MBMP.js} +30 -29
  9. package/{agentProviderCommands-MN3ABDME.js → agentProviderCommands-Q5O33MED.js} +33 -4
  10. package/{agentRecordCommands-OULZW3KM.js → agentRecordCommands-L3QQ7HZ4.js} +66 -61
  11. package/{agentRunCommand-ZNG4LGNQ.js → agentRunCommand-2IFGQHCO.js} +68 -64
  12. package/{agentRunControl-AF7BMR22.js → agentRunControl-OI3LOENH.js} +7 -6
  13. package/{agentRuntimeLocal-YMUHFV5M.js → agentRuntimeLocal-HL526DNQ.js} +28 -25
  14. package/{agentSlice-WNGUIMQZ.js → agentSlice-TMYP2UEA.js} +12 -12
  15. package/{appDeleteCommands-6MXPLAVF.js → appDeleteCommands-ZERW4AXY.js} +30 -29
  16. package/{appDeployCommands-ERRSVASW.js → appDeployCommands-DUWSMYHL.js} +30 -29
  17. package/{appDeployStatusCommands-ULICISLI.js → appDeployStatusCommands-N2KIE4BF.js} +30 -29
  18. package/{appGetCommands-WYYYWROF.js → appGetCommands-YVR4NPVY.js} +30 -29
  19. package/{appListCommands-DFCUCRCV.js → appListCommands-JS6HOHZS.js} +30 -29
  20. package/{authCommand-ZJMWXFMA.js → authCommand-FE2C3ZUM.js} +14 -14
  21. package/{authCommands-WK6E42L2.js → authCommands-HV3EAU3V.js} +2 -2
  22. package/{builtinSkillRegistry-HH75G5J3.js → builtinSkillRegistry-3YOIGEF6.js} +5 -4
  23. package/{chunk-JKW6LERJ.js → chunk-22CIEBYO.js} +14 -14
  24. package/{chunk-6HVBI6TI.js → chunk-25JZEIXN.js} +1 -218
  25. package/{chunk-TRZP7JZ7.js → chunk-2QHFH3DR.js} +1 -0
  26. package/{chunk-4LEGTOSR.js → chunk-3AKFVZ2I.js} +1 -1
  27. package/{chunk-XE4Q46FF.js → chunk-3CGG2PAL.js} +1 -1
  28. package/{chunk-25M2K6OA.js → chunk-3FOQHGHN.js} +3 -3
  29. package/{chunk-BSISWVB4.js → chunk-4I7ERB7F.js} +1 -1
  30. package/{chunk-TCTSYFDM.js → chunk-4KH4J3G5.js} +19 -6
  31. package/{chunk-NEZGPBL7.js → chunk-5AQR3DGV.js} +2 -2
  32. package/{chunk-YLTLB5A7.js → chunk-5RYBGBQH.js} +7 -6
  33. package/{chunk-RIALQUSF.js → chunk-6NSSLV67.js} +5 -5
  34. package/{chunk-RXCCWVA2.js → chunk-6OQUPIQF.js} +3 -3
  35. package/chunk-6VLJ6YA7.js +11751 -0
  36. package/{chunk-27E2CBBY.js → chunk-7OCO4TDT.js} +1 -1
  37. package/chunk-7RFNTILS.js +2213 -0
  38. package/{chunk-4WCEC56C.js → chunk-AVTVGMDY.js} +1 -1
  39. package/{chunk-3J3U3KXB.js → chunk-B7NJ3T4A.js} +4 -4
  40. package/{chunk-UMEGDH6A.js → chunk-BFM34N54.js} +7 -7
  41. package/chunk-CJEIOP3E.js +0 -0
  42. package/{chunk-YXOBCDNW.js → chunk-CJRONOYL.js} +5 -5
  43. package/{chunk-LT3EAHJY.js → chunk-CQ46IRNN.js} +38 -36
  44. package/{chunk-NTSRCTUX.js → chunk-CTPXME7U.js} +2 -2
  45. package/{chunk-M4NTDZG3.js → chunk-D5RCRX4A.js} +134 -141
  46. package/{chunk-25OB36GU.js → chunk-DM6UMOEL.js} +4 -4
  47. package/{chunk-TPCDYNJK.js → chunk-EYUBHHFB.js} +1 -1
  48. package/{chunk-Y6M7KJOA.js → chunk-EZFQ6XRV.js} +2 -2
  49. package/{chunk-ZOO3WJIE.js → chunk-FHU44LN3.js} +711 -40
  50. package/chunk-FY7F4Q6X.js +127 -0
  51. package/chunk-G7MLNNEX.js +84 -0
  52. package/{chunk-RYWO5AKN.js → chunk-GNDJKC4B.js} +10 -10
  53. package/{chunk-V3M6IXQI.js → chunk-GPO7FCEZ.js} +187 -36
  54. package/{chunk-RQ22OZD7.js → chunk-H2TJUNCH.js} +1 -1
  55. package/{chunk-C2XZM3K4.js → chunk-HIRC32DV.js} +5 -24
  56. package/{chunk-QQM464AL.js → chunk-HPFCI4SK.js} +3 -3
  57. package/chunk-HRMJUN5J.js +26 -0
  58. package/{chunk-HD3WR3TD.js → chunk-IAPCBNEE.js} +1 -1
  59. package/{chunk-XDMGY5IU.js → chunk-IF45XG7K.js} +220 -9
  60. package/{chunk-NLT32XBZ.js → chunk-IIQ6JGRI.js} +2 -2
  61. package/{chunk-OP7PTBAJ.js → chunk-IJXYFTV7.js} +8 -8
  62. package/{chunk-IIHY4ZAI.js → chunk-INSBKSBB.js} +8 -4
  63. package/{chunk-PAFTGNWA.js → chunk-JIT6FSXJ.js} +1 -1
  64. package/{chunk-WTKYP6QO.js → chunk-JTDORD5P.js} +5 -5
  65. package/{chunk-ECX3NKRD.js → chunk-JY5NGFFH.js} +11 -0
  66. package/chunk-KC4XDTT3.js +227 -0
  67. package/{chunk-PLYWH7XM.js → chunk-KIM6CLW5.js} +7 -7
  68. package/{chunk-SCYQJPGA.js → chunk-M6RL5JCD.js} +147 -20
  69. package/chunk-MMA3LZ3W.js +105 -0
  70. package/{chunk-I5PBXF7O.js → chunk-MMNYUVLW.js} +1 -1
  71. package/{chunk-NHQKWPLP.js → chunk-NJR3WKVP.js} +24 -22
  72. package/{chunk-W5VC7F7V.js → chunk-NOMIGOST.js} +59 -60
  73. package/{chunk-WI6OGHXJ.js → chunk-NRFKLKRU.js} +5 -5
  74. package/{chunk-NXCGNS4N.js → chunk-OHNELDTO.js} +1 -1
  75. package/{chunk-7IYBN7IA.js → chunk-OOF4UPC5.js} +22 -13
  76. package/{chunk-UIOEHFF6.js → chunk-OQHIVPG4.js} +1 -0
  77. package/{chunk-X4F26D5K.js → chunk-P5L7CXOC.js} +58 -33
  78. package/{chunk-5ORJGHTL.js → chunk-PDGKOTO7.js} +5 -5
  79. package/{chunk-UCPAVEQB.js → chunk-PYRUW7XN.js} +1 -1
  80. package/{chunk-SU3QL7YG.js → chunk-QT6PKHYJ.js} +1 -1
  81. package/{chunk-SN5XE6GQ.js → chunk-RPQXPZZF.js} +4 -4
  82. package/{chunk-ZN5AH4BY.js → chunk-RU4SD66C.js} +6 -6
  83. package/{chunk-YKFP6UGT.js → chunk-SOHTHFV2.js} +14 -14
  84. package/{chunk-CKOO42G5.js → chunk-UHJGXRJ4.js} +4 -4
  85. package/{chunk-CVCRAO6Q.js → chunk-UTV2AYEG.js} +9 -7
  86. package/{chunk-DQLB4NQ3.js → chunk-VPAZOH2D.js} +2 -2
  87. package/{chunk-MBS6CTZB.js → chunk-VZKUKCA6.js} +236 -1993
  88. package/{chunk-LNYHAKBP.js → chunk-W4S457LU.js} +1 -1
  89. package/chunk-WPORQFYN.js +74 -0
  90. package/{chunk-ET2CWLIJ.js → chunk-WXYLV624.js} +3 -3
  91. package/chunk-XFYFMTOM.js +92 -0
  92. package/{chunk-NV572QM3.js → chunk-YJMRHHGY.js} +15 -15
  93. package/{chunk-JBOUVTZX.js → chunk-YOIW77S2.js} +13 -2
  94. package/{chunk-ADBWFYJD.js → chunk-YPD3VJZW.js} +9 -9
  95. package/{chunk-DA7CTWT4.js → chunk-YWSEPJ7C.js} +5 -5
  96. package/{chunk-3V2QMRNN.js → chunk-ZL5RAEEB.js} +3 -3
  97. package/cliAgentConfigHelpers-WJBZQTLW.js +41 -0
  98. package/{commandRegistry-FI2IOQ3U.js → commandRegistry-VVMTPFAX.js} +85 -81
  99. package/{contentThunks-5LKNNDGY.js → contentThunks-N52O67MI.js} +25 -24
  100. package/{createAgentAutomationAction-TI4QG4CY.js → createAgentAutomationAction-ZC57YRSV.js} +25 -24
  101. package/{createDialogAction-TJ3JKLO4.js → createDialogAction-VQW5WDYX.js} +27 -26
  102. package/{createPageAction-GKXT6WEH.js → createPageAction-M5VDA7SC.js} +26 -25
  103. package/{dbSlice-LPMZ2DGJ.js → dbSlice-HP7G4LX3.js} +7 -7
  104. package/{deleteFile-EPUQHKPA.js → deleteFile-7VQGLK2V.js} +3 -3
  105. package/{dialogCommands-IWPXIZ5P.js → dialogCommands-JHMR2N2Y.js} +32 -30
  106. package/{dialogSlice-ZWNNS7GZ.js → dialogSlice-GRSVGDTF.js} +23 -22
  107. package/{dialogUsageCommand-ZCPPHPJ5.js → dialogUsageCommand-7KCPYGHG.js} +1 -1
  108. package/{docCreateCommands-HFSPKJSI.js → docCreateCommands-F2K3UPSQ.js} +28 -27
  109. package/{docDeleteCommands-CRL62POH.js → docDeleteCommands-XGXB5RFT.js} +29 -28
  110. package/{docReadCommands-QOTOX3XW.js → docReadCommands-7HWZZV6J.js} +28 -27
  111. package/{docStore-WYLRB7ED.js → docStore-KNZK6Y2G.js} +10 -10
  112. package/{docUpdateCommands-7BMH4MCA.js → docUpdateCommands-OZZ7NQII.js} +28 -27
  113. package/{fetchMessages-YY4SATNR.js → fetchMessages-M3QU7ZCQ.js} +1 -1
  114. package/{getPricing-OQXBJ6VZ.js → getPricing-2MNMXEVG.js} +3 -3
  115. package/{handleSendMessageAction-P27YP2DQ.js → handleSendMessageAction-SHIH74GJ.js} +46 -44
  116. package/hostCredentialCreate-X64WK4JD.js +357 -0
  117. package/index.js +5 -5
  118. package/{keys-P4ZDOVJW.js → keys-BEGDOTRL.js} +3 -1
  119. package/{localDialogRead-5VCMQQZF.js → localDialogRead-XRLAH4CZ.js} +1 -1
  120. package/{localRuntimeAdapter-GP6ZSSO3.js → localRuntimeAdapter-A7K3ABA6.js} +73 -66
  121. package/{machineCommands-6Z6H4BFX.js → machineCommands-DE3MR7CJ.js} +65 -60
  122. package/{machineWsRunDispatch-F2ZIXMYM.js → machineWsRunDispatch-R26P5V36.js} +65 -60
  123. package/{memberThunks-YSEFJF47.js → memberThunks-7WJAY5V6.js} +8 -8
  124. package/package.json +1 -1
  125. package/{projectArchive-PIGEOX3D.js → projectArchive-GGL5HLMD.js} +26 -25
  126. package/{providerPresetApply-ZYMLQA46.js → providerPresetApply-YXGV6NXB.js} +4 -4
  127. package/{providerRegistry-E34XWDLJ.js → providerRegistry-S6UL6UNA.js} +4 -4
  128. package/{read-DIIQBOOO.js → read-4VZQODSN.js} +3 -3
  129. package/{readDocTool-HXYGOEA7.js → readDocTool-AVD32RUJ.js} +1 -1
  130. package/{readlineWorkspace-UG25G7KC.js → readlineWorkspace-XKYKNL2I.js} +157 -100
  131. package/{removeDialogAgentAction-ALJDUJ2E.js → removeDialogAgentAction-FKL4BYMR.js} +17 -14
  132. package/{runAgentClientLoop-IO5F7TCZ.js → runAgentClientLoop-V7E2WBVM.js} +49 -46
  133. package/{runtimeDoctorCommands-PGAA47G5.js → runtimeDoctorCommands-QAI3MBKQ.js} +6 -6
  134. package/{secretCommands-ZCZ4KVET.js → secretCommands-4QS3HCA2.js} +3 -3
  135. package/{setDialogExtraReferencesAction-O3SVMD5A.js → setDialogExtraReferencesAction-TLIOLWWI.js} +10 -10
  136. package/{setPrimaryDialogAgentAction-HE7RVFFF.js → setPrimaryDialogAgentAction-2OLWRFYR.js} +18 -15
  137. package/{settingThunks-BWWJQG4L.js → settingThunks-UGBPCNYF.js} +12 -11
  138. package/{spaceCommands-UAELIFEI.js → spaceCommands-4KSLKVNF.js} +28 -27
  139. package/{streamAgentChatTurn-VUKZQYJR.js → streamAgentChatTurn-7FR7X2NU.js} +57 -54
  140. package/{switchDialogAgentAction-3VZS7SOS.js → switchDialogAgentAction-UZSAG2N5.js} +15 -12
  141. package/{tools-VRXJAVYI.js → tools-ZLKCC25W.js} +43 -40
  142. package/{tuiSummaryLlmCaller-TGCHZLSW.js → tuiSummaryLlmCaller-WC54MVGP.js} +10 -10
  143. package/{updateCommands-Q6CYAEYJ.js → updateCommands-4744PL3P.js} +3 -1
  144. package/{updateDialogTitleAction-MULWCJCW.js → updateDialogTitleAction-U53ZT7PJ.js} +38 -70
  145. package/usageCommand-F4IPVMIZ.js +32 -0
  146. package/usageRebuildCommand-HAW2AD5N.js +626 -0
  147. package/chunk-4LCOCOR5.js +0 -50
  148. package/chunk-7AUQ3WCW.js +0 -51
  149. package/chunk-ZRAU6T47.js +0 -56
  150. package/{agentFavoriteCommands-GAFEXKKP.js → agentFavoriteCommands-EDK743YA.js} +1 -1
  151. package/{agentGrantCommands-V5FOQKFD.js → agentGrantCommands-RQWK2TEV.js} +1 -1
  152. package/{agentPullCommand-2JMJP5BS.js → agentPullCommand-6EM3URVK.js} +1 -1
  153. package/{chunk-BTYQAODF.js → chunk-CZM5YTZ7.js} +3 -3
  154. package/{chunk-A2ZMIRLN.js → chunk-INN4LTAJ.js} +5 -5
  155. package/{chunk-XPHZK3PJ.js → chunk-JNKSDZFS.js} +3 -3
  156. package/{chunk-PV6JJAUB.js → chunk-TCZHTTUU.js} +8 -8
  157. package/{chunk-AKE53VMW.js → chunk-ZCWRMUWT.js} +0 -0
  158. package/{tableCommands-D7WR4QSM.js → tableCommands-MP6VFSVT.js} +3 -3
@@ -0,0 +1,127 @@
1
+ import {
2
+ require_interopRequireDefault,
3
+ require_requiredArgs,
4
+ require_toDate
5
+ } from "./chunk-MMA3LZ3W.js";
6
+ import {
7
+ __commonJS
8
+ } from "./chunk-4VNS5WPM.js";
9
+
10
+ // node_modules/date-fns/constants/index.js
11
+ var require_constants = __commonJS({
12
+ "node_modules/date-fns/constants/index.js"(exports) {
13
+ "use strict";
14
+ Object.defineProperty(exports, "__esModule", {
15
+ value: true
16
+ });
17
+ exports.secondsInYear = exports.secondsInWeek = exports.secondsInQuarter = exports.secondsInMonth = exports.secondsInMinute = exports.secondsInHour = exports.secondsInDay = exports.quartersInYear = exports.monthsInYear = exports.monthsInQuarter = exports.minutesInHour = exports.minTime = exports.millisecondsInSecond = exports.millisecondsInMinute = exports.millisecondsInHour = exports.maxTime = exports.daysInYear = exports.daysInWeek = void 0;
18
+ var daysInWeek = 7;
19
+ exports.daysInWeek = daysInWeek;
20
+ var daysInYear = 365.2425;
21
+ exports.daysInYear = daysInYear;
22
+ var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
23
+ exports.maxTime = maxTime;
24
+ var millisecondsInMinute = 6e4;
25
+ exports.millisecondsInMinute = millisecondsInMinute;
26
+ var millisecondsInHour = 36e5;
27
+ exports.millisecondsInHour = millisecondsInHour;
28
+ var millisecondsInSecond = 1e3;
29
+ exports.millisecondsInSecond = millisecondsInSecond;
30
+ var minTime = -maxTime;
31
+ exports.minTime = minTime;
32
+ var minutesInHour = 60;
33
+ exports.minutesInHour = minutesInHour;
34
+ var monthsInQuarter = 3;
35
+ exports.monthsInQuarter = monthsInQuarter;
36
+ var monthsInYear = 12;
37
+ exports.monthsInYear = monthsInYear;
38
+ var quartersInYear = 4;
39
+ exports.quartersInYear = quartersInYear;
40
+ var secondsInHour = 3600;
41
+ exports.secondsInHour = secondsInHour;
42
+ var secondsInMinute = 60;
43
+ exports.secondsInMinute = secondsInMinute;
44
+ var secondsInDay = secondsInHour * 24;
45
+ exports.secondsInDay = secondsInDay;
46
+ var secondsInWeek = secondsInDay * 7;
47
+ exports.secondsInWeek = secondsInWeek;
48
+ var secondsInYear = secondsInDay * daysInYear;
49
+ exports.secondsInYear = secondsInYear;
50
+ var secondsInMonth = secondsInYear / 12;
51
+ exports.secondsInMonth = secondsInMonth;
52
+ var secondsInQuarter = secondsInMonth * 3;
53
+ exports.secondsInQuarter = secondsInQuarter;
54
+ }
55
+ });
56
+
57
+ // node_modules/date-fns/differenceInMilliseconds/index.js
58
+ var require_differenceInMilliseconds = __commonJS({
59
+ "node_modules/date-fns/differenceInMilliseconds/index.js"(exports, module) {
60
+ "use strict";
61
+ var _interopRequireDefault = require_interopRequireDefault().default;
62
+ Object.defineProperty(exports, "__esModule", {
63
+ value: true
64
+ });
65
+ exports.default = differenceInMilliseconds;
66
+ var _index = _interopRequireDefault(require_toDate());
67
+ var _index2 = _interopRequireDefault(require_requiredArgs());
68
+ function differenceInMilliseconds(dateLeft, dateRight) {
69
+ (0, _index2.default)(2, arguments);
70
+ return (0, _index.default)(dateLeft).getTime() - (0, _index.default)(dateRight).getTime();
71
+ }
72
+ module.exports = exports.default;
73
+ }
74
+ });
75
+
76
+ // node_modules/date-fns/_lib/roundingMethods/index.js
77
+ var require_roundingMethods = __commonJS({
78
+ "node_modules/date-fns/_lib/roundingMethods/index.js"(exports) {
79
+ "use strict";
80
+ Object.defineProperty(exports, "__esModule", {
81
+ value: true
82
+ });
83
+ exports.getRoundingMethod = getRoundingMethod;
84
+ var roundingMap = {
85
+ ceil: Math.ceil,
86
+ round: Math.round,
87
+ floor: Math.floor,
88
+ trunc: function trunc(value) {
89
+ return value < 0 ? Math.ceil(value) : Math.floor(value);
90
+ }
91
+ // Math.trunc is not supported by IE
92
+ };
93
+ var defaultRoundingMethod = "trunc";
94
+ function getRoundingMethod(method) {
95
+ return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
96
+ }
97
+ }
98
+ });
99
+
100
+ // node_modules/date-fns/differenceInMinutes/index.js
101
+ var require_differenceInMinutes = __commonJS({
102
+ "node_modules/date-fns/differenceInMinutes/index.js"(exports, module) {
103
+ "use strict";
104
+ var _interopRequireDefault = require_interopRequireDefault().default;
105
+ Object.defineProperty(exports, "__esModule", {
106
+ value: true
107
+ });
108
+ exports.default = differenceInMinutes;
109
+ var _index = require_constants();
110
+ var _index2 = _interopRequireDefault(require_differenceInMilliseconds());
111
+ var _index3 = _interopRequireDefault(require_requiredArgs());
112
+ var _index4 = require_roundingMethods();
113
+ function differenceInMinutes(dateLeft, dateRight, options) {
114
+ (0, _index3.default)(2, arguments);
115
+ var diff = (0, _index2.default)(dateLeft, dateRight) / _index.millisecondsInMinute;
116
+ return (0, _index4.getRoundingMethod)(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
117
+ }
118
+ module.exports = exports.default;
119
+ }
120
+ });
121
+
122
+ export {
123
+ require_constants,
124
+ require_differenceInMilliseconds,
125
+ require_roundingMethods,
126
+ require_differenceInMinutes
127
+ };
@@ -0,0 +1,84 @@
1
+ import {
2
+ NOLO_DEFAULT_AGENT_ID,
3
+ NOLO_DEFAULT_AGENT_KEY
4
+ } from "./chunk-NBTY7YJF.js";
5
+ import {
6
+ resolveRuntimeToolSurfaceForAgent
7
+ } from "./chunk-KC4XDTT3.js";
8
+ import {
9
+ isSystemBuiltinTrustedAgentKey
10
+ } from "./chunk-LOEO7LRC.js";
11
+ import {
12
+ resolveRuntimeAuthToken
13
+ } from "./chunk-HRMJUN5J.js";
14
+ import {
15
+ parseUserIdFromAuthToken
16
+ } from "./chunk-WACI5I6V.js";
17
+ import {
18
+ asOptionalTrimmedString
19
+ } from "./chunk-G3SUCT4W.js";
20
+
21
+ // packages/cli/client/cliAgentConfigHelpers.ts
22
+ var BUILTIN_NOLO_AGENT_KEY = NOLO_DEFAULT_AGENT_KEY;
23
+ var BUILTIN_NOLO_AGENT_ID = NOLO_DEFAULT_AGENT_ID;
24
+ function resolveLocalUserId(env) {
25
+ const explicitUserId = env.NOLO_LOCAL_USER_ID || env.NOLO_USER_ID;
26
+ if (explicitUserId) return explicitUserId;
27
+ const tokenUserId = parseUserIdFromAuthToken(resolveRuntimeAuthToken(env));
28
+ return tokenUserId || "local";
29
+ }
30
+ function isBuiltinNoloAgentRef(ref) {
31
+ if (typeof ref !== "string") return false;
32
+ const normalized = ref.trim();
33
+ return normalized === BUILTIN_NOLO_AGENT_KEY || normalized === BUILTIN_NOLO_AGENT_ID || normalized.endsWith(`-${BUILTIN_NOLO_AGENT_ID}`);
34
+ }
35
+ function isBuiltinNoloAgentConfig(agentConfig) {
36
+ const key = agentConfig?.key || agentConfig?.rawRecord?.dbKey || agentConfig?.rawRecord?.agentKey;
37
+ const id = agentConfig?.rawRecord?.id;
38
+ return isBuiltinNoloAgentRef(key) || isBuiltinNoloAgentRef(id);
39
+ }
40
+ function withResolvedRuntimeToolSurface(agentConfig, env) {
41
+ if (!agentConfig) return agentConfig;
42
+ const currentUserId = resolveLocalUserId(env);
43
+ const rawRecord = agentConfig.rawRecord ?? {};
44
+ const ownerId = asOptionalTrimmedString(rawRecord.userId) ?? null;
45
+ const agentKey = rawRecord.dbKey ?? agentConfig.key;
46
+ const toolSurface = resolveRuntimeToolSurfaceForAgent({
47
+ explicitToolNames: agentConfig.toolNames,
48
+ currentUserId,
49
+ agentOwnerId: ownerId,
50
+ agentKey,
51
+ isPublic: !isBuiltinNoloAgentConfig(agentConfig) && rawRecord.isPublic === true,
52
+ sharingLevel: typeof rawRecord.sharingLevel === "string" ? rawRecord.sharingLevel : null,
53
+ trustedPrivateInvocation: isBuiltinNoloAgentConfig(agentConfig) || isSystemBuiltinTrustedAgentKey(agentKey),
54
+ runtimeHost: "cli"
55
+ });
56
+ return {
57
+ ...agentConfig,
58
+ toolNames: toolSurface.finalToolNames,
59
+ toolSurface,
60
+ prompt: agentConfig.prompt
61
+ };
62
+ }
63
+ function extractLastUserText(messages) {
64
+ const lastUser = [...messages].reverse().find((m) => m.role === "user");
65
+ if (!lastUser) return "";
66
+ if (typeof lastUser.content === "string") return lastUser.content;
67
+ if (Array.isArray(lastUser.content)) {
68
+ return lastUser.content.filter((part) => part?.type === "text").map((part) => part.text ?? "").join(" ");
69
+ }
70
+ return "";
71
+ }
72
+ function localTurnHasSubjectRefs(input) {
73
+ return Array.isArray(input.runtimeContext?.subjectRefs) && input.runtimeContext.subjectRefs.length > 0;
74
+ }
75
+
76
+ export {
77
+ BUILTIN_NOLO_AGENT_KEY,
78
+ resolveLocalUserId,
79
+ isBuiltinNoloAgentRef,
80
+ isBuiltinNoloAgentConfig,
81
+ withResolvedRuntimeToolSurface,
82
+ extractLastUserText,
83
+ localTurnHasSubjectRefs
84
+ };
@@ -7,16 +7,16 @@ import {
7
7
  normalizeSystemBuiltinSkills,
8
8
  normalizeTonePresetSetting,
9
9
  resolveUserEnabledSkills
10
- } from "./chunk-I5PBXF7O.js";
10
+ } from "./chunk-MMNYUVLW.js";
11
11
  import {
12
12
  isSkillSummaryMarker
13
13
  } from "./chunk-VF4K2QE6.js";
14
14
  import {
15
15
  setDialogExtraReferencesAction
16
- } from "./chunk-IIHY4ZAI.js";
16
+ } from "./chunk-INSBKSBB.js";
17
17
  import {
18
18
  fetchAndCacheTableRows
19
- } from "./chunk-NHQKWPLP.js";
19
+ } from "./chunk-NJR3WKVP.js";
20
20
  import {
21
21
  createSpaceKey
22
22
  } from "./chunk-UAD2WT54.js";
@@ -28,24 +28,24 @@ import {
28
28
  } from "./chunk-YDH3FDFQ.js";
29
29
  import {
30
30
  selectById
31
- } from "./chunk-UMEGDH6A.js";
31
+ } from "./chunk-BFM34N54.js";
32
32
  import {
33
33
  selectRuntimeSnapshot
34
- } from "./chunk-UCPAVEQB.js";
34
+ } from "./chunk-PYRUW7XN.js";
35
35
  import {
36
36
  createAsyncThunk,
37
37
  createSelector
38
- } from "./chunk-X4F26D5K.js";
38
+ } from "./chunk-P5L7CXOC.js";
39
39
  import {
40
40
  selectIdentityUserId
41
41
  } from "./chunk-PXYBUFDB.js";
42
42
  import {
43
43
  listBuiltinSkills,
44
44
  resolveBuiltinSkillByName
45
- } from "./chunk-Y6M7KJOA.js";
45
+ } from "./chunk-EZFQ6XRV.js";
46
46
  import {
47
47
  DEFAULT_SYSTEM_AGENT_CAPABILITIES
48
- } from "./chunk-TPCDYNJK.js";
48
+ } from "./chunk-EYUBHHFB.js";
49
49
  import {
50
50
  parseSkillDocProtocol
51
51
  } from "./chunk-AETZ7AD6.js";
@@ -783,7 +783,7 @@ var executeToolRun = createAsyncThunk(
783
783
  if (!executionInput) {
784
784
  throw new Error(`ToolRun ${id} has no input to execute with.`);
785
785
  }
786
- const { findToolExecutor } = await import("./tools-VRXJAVYI.js");
786
+ const { findToolExecutor } = await import("./tools-ZLKCC25W.js");
787
787
  const { executor } = findToolExecutor(run.toolName);
788
788
  toolRunStarted({
789
789
  id: run.id,
@@ -807,7 +807,7 @@ var executeToolRun = createAsyncThunk(
807
807
  const latestState = thunkApi.getState();
808
808
  const userId = selectIdentityUserId(latestState);
809
809
  if (userId) {
810
- const { fetchUserSpaceMemberships } = await import("./memberThunks-YSEFJF47.js");
810
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-7WJAY5V6.js");
811
811
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
812
812
  }
813
813
  }
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  findPotentialSecrets
3
3
  } from "./chunk-6QDYSCPW.js";
4
+ import {
5
+ parsePositiveFiniteNumberOrFallback
6
+ } from "./chunk-Y5GCAMGP.js";
4
7
  import {
5
8
  buildLocalRunEnv,
6
9
  isFullstackCodingAgentRef,
@@ -9,7 +12,10 @@ import {
9
12
  resolveRawAgentInput,
10
13
  resolveServerUrl,
11
14
  writeUsage
12
- } from "./chunk-WI6OGHXJ.js";
15
+ } from "./chunk-NRFKLKRU.js";
16
+ import {
17
+ getReadableCliDb
18
+ } from "./chunk-J5JTMQIA.js";
13
19
  import {
14
20
  _appendEntityBatch,
15
21
  _appendEvidenceBatch,
@@ -24,16 +30,6 @@ import {
24
30
  loadMemoryVNextCatalog,
25
31
  putMemoryEvidenceVNext
26
32
  } from "./chunk-TY3TIUJK.js";
27
- import {
28
- parsePositiveFiniteNumberOrFallback
29
- } from "./chunk-Y5GCAMGP.js";
30
- import {
31
- getReadableCliDb
32
- } from "./chunk-J5JTMQIA.js";
33
- import {
34
- readDbRecord,
35
- resolveAgentRecordFromHybridStore
36
- } from "./chunk-XDMGY5IU.js";
37
33
  import {
38
34
  resolveMachineId
39
35
  } from "./chunk-S73EPYNC.js";
@@ -42,7 +38,6 @@ import {
42
38
  createCliLocalRuntimeAdapter,
43
39
  detectCurrentMachineId,
44
40
  hashInstaboxDeliveryManifest,
45
- isBuiltinNoloAgentRef,
46
41
  isCliProviderAgentConfig,
47
42
  isDockerRuntimeKey,
48
43
  isInstaboxBillingPolicy,
@@ -53,14 +48,21 @@ import {
53
48
  resolveAuthToken as resolveAuthToken2,
54
49
  resolveBoundMachineId,
55
50
  resolveFileWriteGateEnabled,
56
- resolveLocalUserId,
57
51
  validateInstaboxWorkspaceSelection
58
- } from "./chunk-M4NTDZG3.js";
52
+ } from "./chunk-D5RCRX4A.js";
59
53
  import {
60
54
  clearCredentialAvailability,
61
55
  readEffectiveCredentialEntry,
62
56
  recordCredentialProbe
63
57
  } from "./chunk-GSQNH63I.js";
58
+ import {
59
+ readDbRecord,
60
+ resolveAgentRecordFromHybridStore
61
+ } from "./chunk-IF45XG7K.js";
62
+ import {
63
+ isBuiltinNoloAgentRef,
64
+ resolveLocalUserId
65
+ } from "./chunk-G7MLNNEX.js";
64
66
  import {
65
67
  isLocalCliAgentKey
66
68
  } from "./chunk-NBTY7YJF.js";
@@ -69,7 +71,7 @@ import {
69
71
  } from "./chunk-VL5KOY2C.js";
70
72
  import {
71
73
  resolveCliLocalRuntimeKeyCapability
72
- } from "./chunk-LT3EAHJY.js";
74
+ } from "./chunk-CQ46IRNN.js";
73
75
  import {
74
76
  isTransientFetchError
75
77
  } from "./chunk-KFHREHUQ.js";
@@ -79,7 +81,7 @@ import {
79
81
  import {
80
82
  parseUiCard,
81
83
  uiCardFallback
82
- } from "./chunk-RYWO5AKN.js";
84
+ } from "./chunk-GNDJKC4B.js";
83
85
  import {
84
86
  isGatewayHttpStatus
85
87
  } from "./chunk-NF64D32W.js";
@@ -88,7 +90,7 @@ import {
88
90
  chooseMemoryOwners,
89
91
  loadMemoryCandidatesFromDb,
90
92
  resolveAgentMemoryPolicy
91
- } from "./chunk-7IYBN7IA.js";
93
+ } from "./chunk-OOF4UPC5.js";
92
94
  import {
93
95
  API_REPORTED_COST_MULTIPLIER,
94
96
  estimateMessagesTokens,
@@ -96,7 +98,7 @@ import {
96
98
  resolveAgentContextWindow,
97
99
  resolveOccupancy,
98
100
  resolveOccupancyWindow
99
- } from "./chunk-MBS6CTZB.js";
101
+ } from "./chunk-VZKUKCA6.js";
100
102
  import {
101
103
  isCliAuthorityBrokerProtocolError,
102
104
  isCliAuthorityBrokerTimeoutError,
@@ -116,10 +118,10 @@ import {
116
118
  LOCAL_AGENT_CONFIG_MISSING_CODE,
117
119
  LOCAL_TURN_ABORTED_CODE,
118
120
  readActionGate
119
- } from "./chunk-ZOO3WJIE.js";
121
+ } from "./chunk-FHU44LN3.js";
120
122
  import {
121
123
  resolveAgentRuntimeConfigFromRecord
122
- } from "./chunk-LNYHAKBP.js";
124
+ } from "./chunk-W4S457LU.js";
123
125
  import {
124
126
  createThinkParserState,
125
127
  flushThinkParser,
@@ -145,7 +147,7 @@ import {
145
147
  import {
146
148
  normalizeUsage,
147
149
  readCacheReadInputTokensOrNull
148
- } from "./chunk-WTKYP6QO.js";
150
+ } from "./chunk-JTDORD5P.js";
149
151
  import {
150
152
  isOAuthApiKeyRef
151
153
  } from "./chunk-UKZX3NHN.js";
@@ -155,7 +157,7 @@ import {
155
157
  import {
156
158
  normalizeRuntimeToolPolicyOverride,
157
159
  resolveEffectiveRuntimeToolPolicy
158
- } from "./chunk-TRZP7JZ7.js";
160
+ } from "./chunk-2QHFH3DR.js";
159
161
  import {
160
162
  compactWhitespace
161
163
  } from "./chunk-DWLEOOGR.js";
@@ -178,7 +180,7 @@ import {
178
180
  } from "./chunk-M2EJHDJP.js";
179
181
  import {
180
182
  isAntigravityOAuthAgent
181
- } from "./chunk-PLYWH7XM.js";
183
+ } from "./chunk-KIM6CLW5.js";
182
184
  import {
183
185
  createRunActivityTracker,
184
186
  createShellApprovalChild,
@@ -193,7 +195,7 @@ import {
193
195
  serverOriginForDialog,
194
196
  settleRunTerminalAuthoritatively,
195
197
  spawnLocalBackgroundRun
196
- } from "./chunk-C2XZM3K4.js";
198
+ } from "./chunk-HIRC32DV.js";
197
199
  import {
198
200
  formatAgentListCard,
199
201
  formatFinishedRunCard,
@@ -206,13 +208,21 @@ import {
206
208
  } from "./chunk-PJNFNEJE.js";
207
209
  import {
208
210
  resolveClientVersion
209
- } from "./chunk-PV6JJAUB.js";
211
+ } from "./chunk-TCZHTTUU.js";
210
212
  import {
211
213
  findModelConfig
212
214
  } from "./chunk-SM3NSZJV.js";
213
215
  import {
214
216
  toErrorMessage
215
217
  } from "./chunk-HNMXYYJR.js";
218
+ import {
219
+ CLIENT_VERSION_TOO_OLD_CODE,
220
+ NOLO_CLIENT_VERSION_HEADER,
221
+ buildClientVersionUpgradeMessage
222
+ } from "./chunk-GOO6G4PY.js";
223
+ import {
224
+ asTrimmedLowercaseString
225
+ } from "./chunk-QSJ3HFEF.js";
216
226
  import {
217
227
  getLogger,
218
228
  normalizeError
@@ -233,7 +243,7 @@ import {
233
243
  } from "./chunk-3RQVYR4B.js";
234
244
  import {
235
245
  createMemoryKey
236
- } from "./chunk-ECX3NKRD.js";
246
+ } from "./chunk-JY5NGFFH.js";
237
247
  import {
238
248
  ulid
239
249
  } from "./chunk-XJWWBO34.js";
@@ -243,14 +253,6 @@ import {
243
253
  import {
244
254
  asOptionalTrimmedString
245
255
  } from "./chunk-G3SUCT4W.js";
246
- import {
247
- CLIENT_VERSION_TOO_OLD_CODE,
248
- NOLO_CLIENT_VERSION_HEADER,
249
- buildClientVersionUpgradeMessage
250
- } from "./chunk-GOO6G4PY.js";
251
- import {
252
- asTrimmedLowercaseString
253
- } from "./chunk-QSJ3HFEF.js";
254
256
 
255
257
  // packages/cli/client/instaboxRunConfigWrite.ts
256
258
  import { randomUUID } from "node:crypto";
@@ -11412,7 +11414,7 @@ function isBalanceExhaustedError(error) {
11412
11414
 
11413
11415
  // packages/cli/client/agentRun.ts
11414
11416
  async function loadRunLocalAgentTurn() {
11415
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-YMUHFV5M.js");
11417
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-HL526DNQ.js");
11416
11418
  return runLocalAgentTurn;
11417
11419
  }
11418
11420
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -11734,7 +11736,7 @@ function classifyLocalRunError(message) {
11734
11736
  return { kind: "generic" };
11735
11737
  }
11736
11738
  var HISTORY_REPLAY_REJECTION_RE = /invalid\s+tool\s+call\s+arguments?/i;
11737
- var REASONING_REPLAY_CONTRACT_RE = /reasoning_content[^.]*must be passed back/i;
11739
+ var REASONING_REPLAY_CONTRACT_RE = /reasoning_(?:content|text)[^.]*must be passed back/i;
11738
11740
  var RUN_UNAVAILABLE_PREFIX = "[nolo] auto runtime: local run unavailable";
11739
11741
  var NO_FALLBACK = "Not falling back to server.";
11740
11742
  var SERVER_FALLBACK_HINT = "or use --server to run on the server explicitly.";
@@ -13138,6 +13140,148 @@ function truncateAgentsMdContent(content, maxBytes = AGENTS_MD_MAX_BYTES) {
13138
13140
  }
13139
13141
  return boundarySlice.replace(/\r$/, "");
13140
13142
  }
13143
+ var AGENTS_MD_SUMMARY_MAX_BYTES = 3072;
13144
+ var AGENTS_MD_SUMMARY_ITEM_MAX_CHARS = 120;
13145
+ var AGENTS_MD_SUMMARY_PRIORITY_KEYWORDS = [
13146
+ "review",
13147
+ "\u8BC4\u5BA1",
13148
+ "commit",
13149
+ "\u63D0\u4EA4",
13150
+ "worktree",
13151
+ "\u6D4B\u8BD5",
13152
+ "typecheck",
13153
+ "\u7C7B\u578B\u68C0\u67E5",
13154
+ "push",
13155
+ "\u53D1\u5E03",
13156
+ "\u6587\u6863\u843D\u4F4D",
13157
+ "\u5220\u9664",
13158
+ "\u6D3E\u53D1"
13159
+ ];
13160
+ var AGENTS_MD_SUMMARY_POINTER_INSTRUCTION = "\u7528 readFile \u8BFB\u5168\u6587\uFF1A%REL%\uFF08cwd\uFF09/ %PATH%\n\u4EC5\u7D22\u5F15\uFF1A\u63D0\u4EA4/\u8BC4\u5BA1\u95E8\u7981\u3001worktree \u9694\u79BB\u3001\u6D4B\u8BD5/typecheck\u3001\u6587\u6863\u843D\u4F4D\u3001\u5220\u9664\u3001push/\u53D1\u5E03\u524D\uFF0C**\u5FC5\u987B\u5148 readFile \u8BFB\u5168\u6587\u518D\u6267\u884C**\u3002\n\u8DEF\u5F84\uFF1A%REL% \u76F8\u5BF9 cwd\uFF1Bmachine:<id>/\u6C99\u76D2\u6267\u884C\u9762 cwd \u7531\u5176\u51B3\u5B9A\uFF0C\u8BFB\u4E0D\u5230\u8BA9\u5BBF\u4E3B\u6CE8\u5165\u6216\u7528\u7EDD\u5BF9\u8DEF\u5F84\u3002";
13161
+ var AGENTS_MD_SUMMARY_DELETE_REFERENCE = "- \u5220\u9664/\u4E0D\u53EF\u9006\u64CD\u4F5C\uFF1A\u9075\u5B88\u7CFB\u7EDF\u63D0\u793A\u7684\u5220\u9664\u7EA2\u7EBF\uFF08\u5148\u5448\u73B0\u5B8C\u6574\u5F85\u5220\u6E05\u5355\u5E76\u83B7\u7528\u6237\u660E\u786E\u786E\u8BA4\uFF0C\u7981\u6B62\u5148\u5220\u540E\u62A5\u3001\u7981\u6B62\u6A21\u7CCA\u5B9A\u4F4D\uFF09\uFF0C\u4ED3\u5E93\u82E5\u6709\u9644\u52A0\u5220\u9664\u89C4\u5219\u89C1\u5B8C\u6574\u6587\u4EF6\u3002";
13162
+ var clipToChars = (text, maxChars) => text.length <= maxChars ? text : `${text.slice(0, maxChars).trimEnd()}\u2026`;
13163
+ var parseAgentsMdItem = (body) => {
13164
+ const bold = /^\*\*(.+?)\*\*/.exec(body);
13165
+ if (bold) {
13166
+ return {
13167
+ label: bold[1].trim().replace(/[::]$/, ""),
13168
+ rest: body.slice(bold[0].length).replace(/^[::\s]+/, "")
13169
+ };
13170
+ }
13171
+ const firstClause = body.split(/[::]/)[0];
13172
+ return {
13173
+ label: clipToChars(firstClause.trim(), 40),
13174
+ rest: body.slice(firstClause.length).replace(/^[::\s]+/, "")
13175
+ };
13176
+ };
13177
+ var priorityOf = (label) => {
13178
+ const lowered = label.toLowerCase();
13179
+ for (let i = 0; i < AGENTS_MD_SUMMARY_PRIORITY_KEYWORDS.length; i += 1) {
13180
+ if (lowered.includes(AGENTS_MD_SUMMARY_PRIORITY_KEYWORDS[i].toLowerCase())) {
13181
+ return i;
13182
+ }
13183
+ }
13184
+ return -1;
13185
+ };
13186
+ var collectAgentsMdSummaryItems = (content) => {
13187
+ const items = [];
13188
+ const seen = /* @__PURE__ */ new Set();
13189
+ let section = null;
13190
+ for (const rawLine of content.split(/\r?\n/)) {
13191
+ const line = rawLine.trim();
13192
+ if (!line) continue;
13193
+ const heading = /^#{2,3}\s+(.+)$/.exec(line);
13194
+ if (heading) {
13195
+ section = heading[1].trim();
13196
+ continue;
13197
+ }
13198
+ if (line.startsWith("#") || line.startsWith("<") || line.startsWith("<!--")) {
13199
+ continue;
13200
+ }
13201
+ const bullet = /^[-*]\s+(.+)$/.exec(line);
13202
+ if (!bullet) continue;
13203
+ const { label, rest } = parseAgentsMdItem(bullet[1]);
13204
+ if (!label || seen.has(label)) continue;
13205
+ seen.add(label);
13206
+ const firstSentence = rest.split("\u3002")[0].trim();
13207
+ items.push({
13208
+ section,
13209
+ label,
13210
+ gist: clipToChars(firstSentence, AGENTS_MD_SUMMARY_ITEM_MAX_CHARS),
13211
+ priority: priorityOf(label)
13212
+ });
13213
+ }
13214
+ return items;
13215
+ };
13216
+ function buildAgentsMdSummaryBody(content, filePath, options = {}) {
13217
+ const budgetBytes = options.budgetBytes ?? AGENTS_MD_SUMMARY_MAX_BYTES;
13218
+ const items = collectAgentsMdSummaryItems(content);
13219
+ if (items.length === 0) return null;
13220
+ const relativePath2 = options.fileName ?? "AGENTS.md";
13221
+ const pointer = AGENTS_MD_SUMMARY_POINTER_INSTRUCTION.replaceAll(
13222
+ "%REL%",
13223
+ relativePath2
13224
+ ).replaceAll("%PATH%", filePath);
13225
+ const head = `${pointer}
13226
+ ${AGENTS_MD_SUMMARY_DELETE_REFERENCE}
13227
+ `;
13228
+ if (Buffer.byteLength(head, "utf8") > budgetBytes) return null;
13229
+ const candidates = [
13230
+ ...items.filter((item) => item.priority >= 0).sort((a, b) => a.priority - b.priority),
13231
+ ...items.filter((item) => item.priority < 0)
13232
+ ];
13233
+ const note = "\u2026\uFF08\u7D22\u5F15\u5DF2\u622A\u65AD\uFF0C\u5176\u4F59\u951A\u70B9\u89C1\u5B8C\u6574\u6587\u4EF6\uFF09";
13234
+ const noteBytes = Buffer.byteLength(note, "utf8");
13235
+ let used = Buffer.byteLength(head, "utf8");
13236
+ const admitted = [];
13237
+ const seenSections = /* @__PURE__ */ new Set();
13238
+ let truncated = false;
13239
+ for (const item of candidates) {
13240
+ const line = item.gist ? `- ${item.label}\uFF1A${item.gist}` : `- ${item.label}`;
13241
+ const headingCost = item.section && !seenSections.has(item.section) ? Buffer.byteLength(`
13242
+ ## ${item.section}`, "utf8") : 0;
13243
+ const cost = headingCost + Buffer.byteLength(`
13244
+ ${line}`, "utf8");
13245
+ if (used + cost + noteBytes > budgetBytes) {
13246
+ truncated = true;
13247
+ continue;
13248
+ }
13249
+ used += cost;
13250
+ if (item.section) seenSections.add(item.section);
13251
+ admitted.push(item);
13252
+ }
13253
+ const groupOrder = [];
13254
+ for (const item of admitted) {
13255
+ if (!groupOrder.includes(item.section)) groupOrder.push(item.section);
13256
+ }
13257
+ const frozen = [];
13258
+ for (const section of groupOrder) {
13259
+ for (const item of admitted) {
13260
+ if (item.section !== section) continue;
13261
+ frozen.push({
13262
+ section,
13263
+ line: item.gist ? `- ${item.label}\uFF1A${item.gist}` : `- ${item.label}`
13264
+ });
13265
+ }
13266
+ }
13267
+ if (admitted.length === 0) return null;
13268
+ return `${head}${renderSummarySections(frozen)}${truncated ? `
13269
+ ${note}` : ""}`;
13270
+ }
13271
+ var renderSummarySections = (entries) => {
13272
+ let rendered = "";
13273
+ let currentSection = null;
13274
+ for (const entry of entries) {
13275
+ if (entry.section && entry.section !== currentSection) {
13276
+ rendered += `
13277
+ ## ${entry.section}`;
13278
+ currentSection = entry.section;
13279
+ }
13280
+ rendered += `
13281
+ ${entry.line}`;
13282
+ }
13283
+ return rendered;
13284
+ };
13141
13285
  function readAgentsMdLayerFromDisk(cwd) {
13142
13286
  for (const name of AGENTS_MD_CANDIDATES) {
13143
13287
  const filePath = resolve2(cwd, name);
@@ -13152,6 +13296,13 @@ function readAgentsMdLayerFromDisk(cwd) {
13152
13296
  if (headerBytes + trimmedBytes <= AGENTS_MD_MAX_BYTES) {
13153
13297
  return buildAgentsMdLayer(content, name);
13154
13298
  }
13299
+ const summaryBody = buildAgentsMdSummaryBody(content, filePath, {
13300
+ // 正文预算 = 摘要上限 − 块头部:buildAgentsMdLayer 会再拼一次头部,
13301
+ // 因此「头部 + 正文」才等于最终注入字节,不得超过摘要上限。
13302
+ budgetBytes: AGENTS_MD_SUMMARY_MAX_BYTES - headerBytes,
13303
+ fileName: name
13304
+ });
13305
+ if (summaryBody) return buildAgentsMdLayer(summaryBody, name);
13155
13306
  const buildMarker = (omitted2, withPath) => {
13156
13307
  const pathPart = withPath ? `\u5B8C\u6574\u6587\u4EF6\uFF1A${filePath}` : `\u5B8C\u6574\u6587\u4EF6\uFF1A\u5DE5\u4F5C\u533A\u6839\u76EE\u5F55\u7684 ${name}`;
13157
13308
  return `<!-- AGENTS.md truncated: \u539F\u6587\u4EF6 ${totalBytes} \u5B57\u8282\uFF0C\u6CE8\u5165\u9884\u7B97 ${AGENTS_MD_MAX_BYTES} \u5B57\u8282\uFF0C\u5DF2\u7701\u7565 ${omitted2} \u5B57\u8282\uFF08\u4E0A\u6587\u53EF\u80FD\u7F3A\u5C11\u6587\u4EF6\u672B\u5C3E\u7684 commit/review \u95E8\u7981\u7EC6\u5219\uFF0C\u63D0\u4EA4/\u8BC4\u5BA1\u524D\u8BF7\u8BFB\u5B8C\u6574\u6587\u4EF6\uFF09\u3002${pathPart} -->`;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelPricing
3
- } from "./chunk-A2ZMIRLN.js";
3
+ } from "./chunk-INN4LTAJ.js";
4
4
  import {
5
5
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
6
6
  PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,