nolo-cli 0.8.0-alpha.23 → 0.8.0-alpha.25

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 (114) hide show
  1. package/{_executeModel-YXTTYRXS.js → _executeModel-IYPAOWQQ.js} +48 -48
  2. package/{action-QM2ONPYZ.js → action-UAHWPMZB.js} +7 -8
  3. package/{addContentAction-UXY3GM53.js → addContentAction-PFIP76LT.js} +6 -8
  4. package/{addDialogAgentAction-MUBYOG65.js → addDialogAgentAction-LWDAIDEU.js} +8 -9
  5. package/{agentDeleteCommand-4NO7Y6UI.js → agentDeleteCommand-M6KIV6ZZ.js} +36 -27
  6. package/{agentEmailCommands-NPP5TGZV.js → agentEmailCommands-JGAZ26N2.js} +60 -59
  7. package/{agentListCommands-IP5BNB5W.js → agentListCommands-3TQWUC4W.js} +120 -28
  8. package/{agentMachineCommands-24NFTIKY.js → agentMachineCommands-EBCDKO4T.js} +36 -26
  9. package/{agentRecordCommands-7AWSR46F.js → agentRecordCommands-ZKOLGEMX.js} +53 -52
  10. package/{agentRunCommand-P46WCJ6P.js → agentRunCommand-L6A3DKTB.js} +56 -57
  11. package/{agentRuntimeLocal-V5UV7S4R.js → agentRuntimeLocal-6Q4CEFXY.js} +27 -14
  12. package/{agentSlice-3CVAZZOP.js → agentSlice-XRG5ODYW.js} +7 -8
  13. package/{authCommand-B6P2XYLN.js → authCommand-ELPMOABY.js} +13 -13
  14. package/{authCommands-4YKA4GTU.js → authCommands-PUQRVHHW.js} +5 -5
  15. package/{chunk-AFON4QUU.js → chunk-3QKO4EHV.js} +3 -3
  16. package/{chunk-D55DXHXL.js → chunk-4GBNEA5B.js} +1 -1
  17. package/{chunk-PXZAAB4L.js → chunk-4LG74DRG.js} +4 -4
  18. package/{chunk-RBCNBU2A.js → chunk-524BDL33.js} +1 -0
  19. package/{chunk-HAC6GPRE.js → chunk-5EUAXXSV.js} +2 -2
  20. package/{chunk-P7GAHW32.js → chunk-5LDYVJXY.js} +191 -40
  21. package/{chunk-DSNLHTP3.js → chunk-66DXKPRS.js} +9 -2
  22. package/{chunk-5NYGMN4O.js → chunk-67Z375LK.js} +17 -17
  23. package/{chunk-6OHYC4BY.js → chunk-6PXKSN2M.js} +4 -3
  24. package/{chunk-LFFATN2M.js → chunk-ALEDPZVP.js} +94 -54
  25. package/{chunk-ZAUDEKML.js → chunk-DW75SYWV.js} +95 -2327
  26. package/{chunk-A4MYG3TR.js → chunk-EEUWELOX.js} +15 -15
  27. package/chunk-GVQT3FIB.js +2286 -0
  28. package/chunk-I2HCZWJU.js +144 -0
  29. package/{chunk-LBUTKV7S.js → chunk-IG2EZS3N.js} +67 -20
  30. package/chunk-IKXL2HZ3.js +70 -0
  31. package/{chunk-2CVZSC5L.js → chunk-IVAOVLM7.js} +1 -1
  32. package/{chunk-L3KWEH3V.js → chunk-KPFGD3YA.js} +43 -12
  33. package/{chunk-4VA3UQRF.js → chunk-KRMH46UV.js} +10 -10
  34. package/{chunk-MIQOUMSN.js → chunk-LFETMU66.js} +8 -8
  35. package/{chunk-RBB43B5W.js → chunk-LWYCA4ZT.js} +307 -43
  36. package/{chunk-EUN3SYY7.js → chunk-MMCDCZM4.js} +6 -6
  37. package/{chunk-YOCHZD7D.js → chunk-NCGFB7NN.js} +5 -3
  38. package/{chunk-KLOCUWKZ.js → chunk-OCDEWRE2.js} +1 -1
  39. package/{chunk-LJCH34R2.js → chunk-OOOKLEJ7.js} +6 -6
  40. package/{chunk-C4FTUXVF.js → chunk-QLUFR47U.js} +11 -1
  41. package/{chunk-RYMUT5JO.js → chunk-RB43SIIG.js} +32 -26
  42. package/{chunk-RQPZX6KP.js → chunk-S37OTGU7.js} +2 -2
  43. package/{chunk-AOKWJZ5N.js → chunk-S3UTETIC.js} +3 -2
  44. package/{chunk-ZJS64PZJ.js → chunk-SCBYSC74.js} +1 -1
  45. package/{chunk-AWY2AFHN.js → chunk-TSKWE74T.js} +53 -7
  46. package/{chunk-UBSKX3LP.js → chunk-UZZCXRHF.js} +6 -6
  47. package/{chunk-Q2WC4KGQ.js → chunk-V6ICY2YU.js} +5 -5
  48. package/{chunk-6KRA6AWI.js → chunk-VNGCTQ32.js} +1 -1
  49. package/{chunk-BB2PII22.js → chunk-WKWEV6K4.js} +1 -1
  50. package/{chunk-LW6FJFCT.js → chunk-WO6IG6YT.js} +146 -50
  51. package/{chunk-JTINRTBT.js → chunk-WPHL6ALY.js} +1 -1
  52. package/{chunk-KTHLAJEY.js → chunk-WZF7M6GX.js} +1 -1
  53. package/{chunk-LTH6AVG7.js → chunk-XDXO65DS.js} +3 -3
  54. package/{chunk-BFDWXLFF.js → chunk-XGMCGPEA.js} +64 -5
  55. package/{chunk-WESWWEVA.js → chunk-XGOTQ6ZG.js} +1 -1
  56. package/{chunk-VBKJTOAW.js → chunk-XHQWJUW4.js} +2 -2
  57. package/{chunk-O7VS7JLJ.js → chunk-XIZIRGXB.js} +15 -15
  58. package/{chunk-PTT6KSYQ.js → chunk-Y7QCVJ73.js} +239 -90
  59. package/{chunk-6UUD2WES.js → chunk-ZR4VHQ5D.js} +14 -13
  60. package/{createAgentAutomationAction-DYQOGAVE.js → createAgentAutomationAction-HZJ4LPCW.js} +23 -25
  61. package/{createDialogAction-ETB3KQQE.js → createDialogAction-KICYAHEQ.js} +25 -27
  62. package/{createPageAction-UF2RHA63.js → createPageAction-VWBZOQPP.js} +25 -27
  63. package/{dbSlice-R5EJKZBW.js → dbSlice-V4H2JFNB.js} +5 -6
  64. package/{deleteFile-WPWVZE4B.js → deleteFile-M7UNIUOO.js} +3 -3
  65. package/{dialogCommands-LYYC7XHF.js → dialogCommands-UMT7AOOR.js} +31 -22
  66. package/{dialogSlice-IFBZ4IT2.js → dialogSlice-G3WPGLY5.js} +23 -25
  67. package/{docCreateCommands-I66OI374.js → docCreateCommands-MAZSFQQ5.js} +34 -25
  68. package/{docDeleteCommands-OVRBCHMF.js → docDeleteCommands-DOTLD7HA.js} +34 -26
  69. package/{docReadCommands-YLWUMEH7.js → docReadCommands-PH255AKZ.js} +34 -25
  70. package/{docStore-65WO7U36.js → docStore-K7U47JYV.js} +22 -24
  71. package/{docUpdateCommands-NSICS4IN.js → docUpdateCommands-RLRID2K7.js} +34 -25
  72. package/fetchMessages-KTNM7QAR.js +1 -1
  73. package/{getPricing-7PUT44ZS.js → getPricing-6TOZXPAU.js} +4 -4
  74. package/{handleSendMessageAction-T76HEDOP.js → handleSendMessageAction-UAI2ZOGG.js} +27 -29
  75. package/index.js +62 -62
  76. package/{localDialogRead-YSKFFRTT.js → localDialogRead-2VRI24F4.js} +1 -1
  77. package/{machineCommands-4HQY6UVZ.js → machineCommands-FE5HOJWR.js} +58 -57
  78. package/{machineWsRunDispatch-7YW2M4FS.js → machineWsRunDispatch-J56M67NJ.js} +52 -51
  79. package/{models-MFXNI3TF.js → models-LSCRJJ6P.js} +2 -2
  80. package/package.json +1 -1
  81. package/{read-5ZMY7FKP.js → read-2MIMRBZ2.js} +3 -3
  82. package/{readDocTool-2NXDK32S.js → readDocTool-QHVGQHUJ.js} +1 -1
  83. package/{readlineWorkspace-FLQWOAUR.js → readlineWorkspace-GK33VXX2.js} +196 -123
  84. package/{removeDialogAgentAction-KOLQ2R5W.js → removeDialogAgentAction-7GO2PRVQ.js} +12 -13
  85. package/{runAgentClientLoop-IUV2TR3X.js → runAgentClientLoop-EEC3BHWI.js} +45 -46
  86. package/{setDialogExtraReferencesAction-OMTEO7X6.js → setDialogExtraReferencesAction-ZIDAVJSZ.js} +8 -9
  87. package/{setPrimaryDialogAgentAction-DOCIS6V4.js → setPrimaryDialogAgentAction-LK35C2D7.js} +12 -13
  88. package/{settingSlice-UWZJYDOA.js → settingSlice-PRRC6IJ7.js} +6 -7
  89. package/{skillDiscovery-UGSQGX2U.js → skillDiscovery-ZYHSX7VD.js} +3 -3
  90. package/{spaceCommands-BDDAT4VU.js → spaceCommands-XE4PS24W.js} +36 -29
  91. package/{spaceSlice-HH633ZA4.js → spaceSlice-OE57MB22.js} +21 -23
  92. package/{streamAgentChatTurn-UBZOVFKV.js → streamAgentChatTurn-CI6VMD2Y.js} +208 -101
  93. package/{toolApiClient-C7P7YSE4.js → toolApiClient-QI3YBNWB.js} +2 -2
  94. package/{tools-OQZ34KCU.js → tools-I5VPDJHG.js} +32 -33
  95. package/{tuiSummaryLlmCaller-42AEL3LL.js → tuiSummaryLlmCaller-TXLF4MEI.js} +5 -5
  96. package/{updateDialogTitleAction-A3OOMSDO.js → updateDialogTitleAction-BKXHTAYL.js} +27 -28
  97. package/chunk-5MMAK75Q.js +0 -15
  98. package/chunk-AZPCASRE.js +0 -36
  99. package/chunk-RBCENBG7.js +0 -36
  100. package/chunk-UAD2WT54.js +0 -64
  101. package/{agentPullCommand-N6UWRTVL.js → agentPullCommand-LHFBA5EI.js} +6 -6
  102. package/{chunk-JK7VW2FN.js → chunk-5MIDPSSK.js} +3 -3
  103. package/{chunk-VC6OZXO5.js → chunk-6WWHKODG.js} +4 -4
  104. package/{chunk-BT37DVDA.js → chunk-7VKWMOSI.js} +9 -9
  105. package/{chunk-3QAF2LTL.js → chunk-DZ3XJVET.js} +3 -3
  106. package/{chunk-5CS33IBL.js → chunk-PDL2AV3E.js} +3 -3
  107. package/{chunk-5MMZUWSG.js → chunk-TOILAPLH.js} +5 -5
  108. package/{chunk-DVRHHFEA.js → chunk-TSUJOM6N.js} +3 -3
  109. package/{db-6QED3ZVO.js → db-HCJ5PRB5.js} +3 -3
  110. package/{memoryCommands-HG4WKTU7.js → memoryCommands-HGNEENIN.js} +3 -3
  111. package/{offlineMarxistsAgentCommand-BCPJITJL.js → offlineMarxistsAgentCommand-5OOWZLJI.js} +3 -3
  112. package/{runtimeDoctorCommands-UWR5UDSM.js → runtimeDoctorCommands-4YVMXBQP.js} +5 -5
  113. package/{tableCommands-M3DJUETS.js → tableCommands-LV2PPHNY.js} +6 -6
  114. package/{understanding-ZOESBLF3.js → understanding-3CUQQ6SV.js} +3 -3
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  buildStaticUserPolicyContext,
6
6
  resolveSpaceContextPreloadPlan
7
- } from "./chunk-KTHLAJEY.js";
7
+ } from "./chunk-WZF7M6GX.js";
8
8
  import {
9
9
  buildCliPrompt
10
10
  } from "./chunk-ATNTHIZI.js";
@@ -20,29 +20,32 @@ import {
20
20
  sanitizeOutboundResponsesInput,
21
21
  sendOpenAICompletionsRequest,
22
22
  updateTotalUsage
23
- } from "./chunk-RYMUT5JO.js";
23
+ } from "./chunk-RB43SIIG.js";
24
24
  import "./chunk-JEXVIMYZ.js";
25
25
  import {
26
26
  prepareTools
27
- } from "./chunk-HAC6GPRE.js";
27
+ } from "./chunk-5EUAXXSV.js";
28
28
  import {
29
29
  fetchReferenceContents,
30
30
  generateRequestBody,
31
+ isResponsesConversationStateRejection,
31
32
  mergeReferences,
32
33
  performFetchRequest,
33
34
  performServerProxyFetchWithRetry,
34
35
  resolveAgentCallPlan,
35
36
  resolveClientWire,
36
37
  resolveReferenceAssets,
37
- resolveToolsFromKeys
38
- } from "./chunk-LW6FJFCT.js";
39
- import "./chunk-D55DXHXL.js";
38
+ resolveToolsFromKeys,
39
+ selectResponsesConversationState,
40
+ updateResponsesConversationState
41
+ } from "./chunk-WO6IG6YT.js";
42
+ import "./chunk-4GBNEA5B.js";
40
43
  import {
41
44
  getFinalPrice,
42
45
  getModelPricing,
43
46
  getPrices,
44
47
  hasExplicitAgentPricing
45
- } from "./chunk-KLOCUWKZ.js";
48
+ } from "./chunk-OCDEWRE2.js";
46
49
  import {
47
50
  getPublicImageAgentDefaultProfile,
48
51
  getPublicImageAgentMode
@@ -52,13 +55,15 @@ import {
52
55
  applyDefaultWebToolPacks,
53
56
  applyDisabledTools,
54
57
  createSSEParser,
58
+ expandEnabledPackPromptPatches,
55
59
  expandEnabledPacks,
56
60
  getAllToolRuns,
57
61
  shouldBlockForGptPro
58
- } from "./chunk-PTT6KSYQ.js";
62
+ } from "./chunk-Y7QCVJ73.js";
59
63
  import "./chunk-GAKEBQD6.js";
64
+ import "./chunk-I2HCZWJU.js";
60
65
  import "./chunk-KQHGZWSV.js";
61
- import "./chunk-2CVZSC5L.js";
66
+ import "./chunk-IVAOVLM7.js";
62
67
  import "./chunk-3LY4F7SV.js";
63
68
  import {
64
69
  extractCategorizedMentions
@@ -67,23 +72,19 @@ import "./chunk-63W5N6P3.js";
67
72
  import "./chunk-VF4K2QE6.js";
68
73
  import {
69
74
  getDocState
70
- } from "./chunk-LJCH34R2.js";
71
- import "./chunk-A4MYG3TR.js";
72
- import "./chunk-VC6OZXO5.js";
75
+ } from "./chunk-OOOKLEJ7.js";
76
+ import "./chunk-EEUWELOX.js";
77
+ import "./chunk-6WWHKODG.js";
73
78
  import {
74
79
  PERSONALIZATION_DIALOG_CATEGORY,
75
80
  addToolMessage,
76
81
  addUserMessage,
77
82
  buildPersonalizationDialogPolicyContext,
78
83
  estimateMissingUsage,
79
- estimateTokenCount,
80
84
  extractReferenceKeysFromMessage,
81
85
  finalizeTransientMessageOnError,
82
- getModelContextWindow,
83
- getModelInfo,
84
86
  messageStreamEnd,
85
87
  messageStreaming,
86
- planContextUsage,
87
88
  prepareAndPersistUserMessage,
88
89
  removeTransientMessage,
89
90
  selectAllMsgs,
@@ -95,95 +96,57 @@ import {
95
96
  selectTableRows,
96
97
  selectViewMode,
97
98
  updateTokens
98
- } from "./chunk-ZAUDEKML.js";
99
+ } from "./chunk-DW75SYWV.js";
99
100
  import "./chunk-V2J635L5.js";
100
101
  import "./chunk-MRC4Q34M.js";
101
102
  import "./chunk-MTU75CZ2.js";
102
103
  import "./chunk-CWMSB67P.js";
103
- import "./chunk-4VA3UQRF.js";
104
+ import "./chunk-KRMH46UV.js";
104
105
  import {
105
106
  createCliChatTurnStream,
106
107
  getCliChatSession,
107
108
  startCliChatSession
108
- } from "./chunk-LTH6AVG7.js";
109
+ } from "./chunk-XDXO65DS.js";
109
110
  import "./chunk-Z4NR32XR.js";
110
111
  import "./chunk-M76ECQRD.js";
111
- import "./chunk-RQPZX6KP.js";
112
- import {
113
- selectAiRecentContentLimit,
114
- selectCurrentServer,
115
- selectGlobalPrompt,
116
- selectKnowledgeCaptureLevel,
117
- selectMaxExecutionTime,
118
- selectSpaceContextLevel,
119
- selectUserTonePreset
120
- } from "./chunk-UBSKX3LP.js";
121
- import "./chunk-Y5GCAMGP.js";
122
- import "./chunk-SOTZ6RDN.js";
123
- import "./chunk-BFDWXLFF.js";
124
- import "./chunk-UAD2WT54.js";
125
- import {
126
- patch,
127
- read,
128
- selectById,
129
- write
130
- } from "./chunk-L3KWEH3V.js";
131
- import "./chunk-AZPCASRE.js";
132
- import "./chunk-RBCENBG7.js";
133
- import "./chunk-XENYHRUE.js";
134
- import "./chunk-JTINRTBT.js";
135
- import {
136
- buildLinkedSpacesSection,
137
- buildSpaceContextLayer
138
- } from "./chunk-C4FTUXVF.js";
139
- import "./chunk-KKY4B2Q2.js";
140
- import "./chunk-WZSRQNQG.js";
141
112
  import {
142
113
  assertDesktopAgentRuntimeTurnBodyHasNoRawSecrets,
143
114
  buildDesktopAgentRuntimeAgentConfigSnapshot,
144
115
  buildDesktopAgentRuntimeDialogHistorySnapshot
145
- } from "./chunk-YOCHZD7D.js";
116
+ } from "./chunk-NCGFB7NN.js";
146
117
  import {
118
+ projectToolMessageContent,
147
119
  resolveAgentImageInputSupport
148
- } from "./chunk-RBB43B5W.js";
120
+ } from "./chunk-LWYCA4ZT.js";
149
121
  import "./chunk-OPZYGHUC.js";
150
- import "./chunk-6KRA6AWI.js";
122
+ import "./chunk-VNGCTQ32.js";
151
123
  import {
152
124
  extractImagePartsFromResponseOutput,
153
125
  extractTextFromResponseOutput,
154
126
  toResponsesTools
155
- } from "./chunk-AWY2AFHN.js";
127
+ } from "./chunk-TSKWE74T.js";
156
128
  import {
157
129
  canonicalizeToolNames,
158
130
  prioritizeToolNames,
159
131
  resolveRuntimeToolSurfaceForAgent
160
- } from "./chunk-6OHYC4BY.js";
161
- import "./chunk-5MMAK75Q.js";
132
+ } from "./chunk-6PXKSN2M.js";
133
+ import {
134
+ estimateTokenCount,
135
+ getModelContextWindow,
136
+ getModelInfo,
137
+ planContextUsage
138
+ } from "./chunk-GVQT3FIB.js";
162
139
  import {
163
140
  getApiEndpoint,
164
141
  getModelConfig,
165
142
  getProviderByModelName
166
- } from "./chunk-AOKWJZ5N.js";
167
- import "./chunk-5CS33IBL.js";
143
+ } from "./chunk-S3UTETIC.js";
144
+ import "./chunk-PDL2AV3E.js";
168
145
  import "./chunk-JZPBVBIY.js";
169
146
  import "./chunk-BYXBJQAS.js";
170
- import {
171
- asRecordOrEmpty
172
- } from "./chunk-KX6YBIHG.js";
173
- import "./chunk-RBCNBU2A.js";
174
- import {
175
- createDialogMessageKeyAndId,
176
- dialogMessageKey
177
- } from "./chunk-O4BU24WZ.js";
178
- import {
179
- asNonEmptyStringArray
180
- } from "./chunk-I42VC5KR.js";
181
- import {
182
- asOptionalFiniteNumber
183
- } from "./chunk-WWC7I6TA.js";
184
147
  import {
185
148
  resolveToolBaseUrl
186
- } from "./chunk-JK7VW2FN.js";
149
+ } from "./chunk-5MIDPSSK.js";
187
150
  import {
188
151
  extractCustomId
189
152
  } from "./chunk-DFFIZ25G.js";
@@ -197,36 +160,78 @@ import {
197
160
  selectPendingUserInputQueue,
198
161
  tokenUsageLiveUpdate
199
162
  } from "./chunk-3ASDTTEI.js";
200
- import "./chunk-QSJ3HFEF.js";
201
- import "./chunk-DWLEOOGR.js";
202
163
  import {
203
164
  toErrorMessage
204
165
  } from "./chunk-HNMXYYJR.js";
205
- import "./chunk-VBKJTOAW.js";
166
+ import "./chunk-SOTZ6RDN.js";
167
+ import "./chunk-XENYHRUE.js";
168
+ import "./chunk-DWLEOOGR.js";
169
+ import "./chunk-IKXL2HZ3.js";
170
+ import "./chunk-524BDL33.js";
171
+ import "./chunk-S37OTGU7.js";
172
+ import {
173
+ selectAiRecentContentLimit,
174
+ selectCurrentServer,
175
+ selectGlobalPrompt,
176
+ selectKnowledgeCaptureLevel,
177
+ selectMaxExecutionTime,
178
+ selectSpaceContextLevel,
179
+ selectUserTonePreset
180
+ } from "./chunk-UZZCXRHF.js";
181
+ import "./chunk-Y5GCAMGP.js";
182
+ import {
183
+ asRecordOrEmpty
184
+ } from "./chunk-KX6YBIHG.js";
185
+ import "./chunk-XGMCGPEA.js";
186
+ import {
187
+ patch,
188
+ read,
189
+ selectById,
190
+ write
191
+ } from "./chunk-KPFGD3YA.js";
192
+ import {
193
+ createDialogMessageKeyAndId,
194
+ dialogMessageKey
195
+ } from "./chunk-O4BU24WZ.js";
196
+ import {
197
+ asNonEmptyStringArray
198
+ } from "./chunk-I42VC5KR.js";
199
+ import {
200
+ asOptionalFiniteNumber
201
+ } from "./chunk-WWC7I6TA.js";
202
+ import "./chunk-WPHL6ALY.js";
203
+ import "./chunk-QSJ3HFEF.js";
204
+ import "./chunk-XHQWJUW4.js";
206
205
  import {
207
206
  selectIdentityToken,
208
207
  selectIdentityUser,
209
208
  selectIdentityUserId,
210
209
  selectRuntimeCurrentServer
211
- } from "./chunk-DVRHHFEA.js";
210
+ } from "./chunk-TSUJOM6N.js";
212
211
  import {
213
212
  getIsDesktopApp,
214
213
  isAbortError
215
214
  } from "./chunk-OOSFSFMA.js";
216
215
  import "./chunk-GBRG75BQ.js";
216
+ import {
217
+ isRecord
218
+ } from "./chunk-KUG52IAP.js";
217
219
  import {
218
220
  asTrimmedString
219
221
  } from "./chunk-3EUW3WEO.js";
220
222
  import "./chunk-U6VC4MU4.js";
221
- import {
222
- isRecord
223
- } from "./chunk-KUG52IAP.js";
224
223
  import "./chunk-LCBAMY2M.js";
225
224
  import "./chunk-4SN6J65J.js";
226
225
  import "./chunk-CF7PE763.js";
227
226
  import {
228
227
  asOptionalTrimmedString
229
228
  } from "./chunk-G3SUCT4W.js";
229
+ import "./chunk-WZSRQNQG.js";
230
+ import {
231
+ buildLinkedSpacesSection,
232
+ buildSpaceContextLayer
233
+ } from "./chunk-QLUFR47U.js";
234
+ import "./chunk-KKY4B2Q2.js";
230
235
  import "./chunk-4VNS5WPM.js";
231
236
 
232
237
  // packages/ai/agent/isVoiceModel.ts
@@ -619,7 +624,8 @@ var sendOpenAIResponseRequest = async ({
619
624
  dialogKey,
620
625
  parentMessageId,
621
626
  messageMetadata,
622
- quickChatPerfStartedAt
627
+ quickChatPerfStartedAt,
628
+ fallbackBodyData
623
629
  }) => {
624
630
  const { dispatch, getState, signal: thunkSignal } = thunkApi;
625
631
  const dialogId = extractCustomId(dialogKey);
@@ -653,7 +659,9 @@ var sendOpenAIResponseRequest = async ({
653
659
  hasHandedOff,
654
660
  finishReason,
655
661
  messageId,
656
- usage: state.usage ?? void 0
662
+ usage: state.usage ?? void 0,
663
+ responseId: typeof state.completedResponse?.id === "string" ? state.completedResponse.id : void 0,
664
+ ...state.responsesStateFallback ? { responsesStateFallback: true } : {}
657
665
  });
658
666
  const resetStateForRetry = () => {
659
667
  state.content = "";
@@ -847,6 +855,7 @@ var sendOpenAIResponseRequest = async ({
847
855
  return buildMeta(result.hasPendingInteraction, result.hasHandedOff, null);
848
856
  };
849
857
  let reader;
858
+ let responsesStateFallbackUsed = false;
850
859
  try {
851
860
  if (!parentMessageId) {
852
861
  dispatch(
@@ -879,13 +888,17 @@ var sendOpenAIResponseRequest = async ({
879
888
  }
880
889
  ] : []
881
890
  ];
882
- const sanitizedInput = Array.isArray(bodyData?.input) ? sanitizeOutboundResponsesInput(bodyData.input) : bodyData?.input;
883
- const baseBodyData = sanitizedInput !== bodyData?.input ? { ...bodyData, input: sanitizedInput } : bodyData;
884
- const requestBody = {
885
- ...baseBodyData,
886
- ...tools.length ? { tools, tool_choice: baseBodyData.tool_choice ?? "auto" } : {},
887
- stream: true
891
+ const buildRequestBody = (sourceBodyData) => {
892
+ const sanitizedInput = Array.isArray(sourceBodyData?.input) ? sanitizeOutboundResponsesInput(sourceBodyData.input) : sourceBodyData?.input;
893
+ const baseBodyData = sanitizedInput !== sourceBodyData?.input ? { ...sourceBodyData, input: sanitizedInput } : sourceBodyData;
894
+ return {
895
+ ...baseBodyData,
896
+ ...tools.length ? { tools, tool_choice: baseBodyData.tool_choice ?? "auto" } : {},
897
+ stream: true
898
+ };
888
899
  };
900
+ let requestBody = buildRequestBody(bodyData);
901
+ const fallbackRequestBody = fallbackBodyData ? buildRequestBody(fallbackBodyData) : null;
889
902
  const api = getApiEndpoint(agentConfig);
890
903
  const token = selectIdentityToken(getState());
891
904
  logQuickChatPerfStage(quickChatPerfStartedAt, "openai-response-fetch-starting", {
@@ -929,6 +942,17 @@ var sendOpenAIResponseRequest = async ({
929
942
  );
930
943
  }
931
944
  if (!response.ok) {
945
+ const rejectedStoredState = !!requestBody.previous_response_id && !!fallbackRequestBody && isResponsesConversationStateRejection(
946
+ response.status,
947
+ await response.clone().text().catch(() => "")
948
+ );
949
+ if (!responsesStateFallbackUsed && rejectedStoredState) {
950
+ responsesStateFallbackUsed = true;
951
+ state.responsesStateFallback = true;
952
+ requestBody = fallbackRequestBody;
953
+ resetStateForRetry();
954
+ continue attemptLoop;
955
+ }
932
956
  const errorMessage = await parseApiError(response);
933
957
  state.content = `[\u9519\u8BEF: ${errorMessage}]`;
934
958
  await finalize();
@@ -1026,6 +1050,12 @@ var sendOpenAIResponseRequest = async ({
1026
1050
  flush();
1027
1051
  }
1028
1052
  break;
1053
+ case "response.reasoning_text.delta":
1054
+ if (typeof event.delta === "string" && event.delta) {
1055
+ state.reasoning += event.delta;
1056
+ flush();
1057
+ }
1058
+ break;
1029
1059
  case "response.reasoning.done":
1030
1060
  if (event.text) {
1031
1061
  state.reasoning += event.text;
@@ -1084,6 +1114,9 @@ var sendOpenAIResponseRequest = async ({
1084
1114
  }
1085
1115
  case "response.completed":
1086
1116
  state.completedResponse = event.response ?? null;
1117
+ if (responsesStateFallbackUsed) {
1118
+ state.responsesStateFallback = true;
1119
+ }
1087
1120
  finishReason = event.response?.status === "completed" ? "stop" : event.response?.status ?? null;
1088
1121
  if (event.response?.usage) {
1089
1122
  state.usage = updateTotalUsage(state.usage, event.response.usage);
@@ -1667,14 +1700,15 @@ var compressOldToolResults = (messages, maxChars = 800) => {
1667
1700
  }
1668
1701
  return messages.map((msg, idx) => {
1669
1702
  if (msg.role !== "tool") return msg;
1670
- if (idx > lastToolCallAssistantIdx) return msg;
1671
1703
  const content = typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content);
1672
- if (content.length <= maxChars) return msg;
1673
- return {
1674
- ...msg,
1675
- content: content.slice(0, maxChars) + `
1676
- \u2026[\u622A\u65AD\uFF0C\u539F\u59CB\u957F\u5EA6 ${content.length} \u5B57\u7B26]`
1677
- };
1704
+ const projected = projectToolMessageContent({
1705
+ content,
1706
+ isFresh: idx > lastToolCallAssistantIdx,
1707
+ toolName: msg.name,
1708
+ historicalMaxChars: maxChars
1709
+ });
1710
+ if (projected === content) return msg;
1711
+ return { ...msg, content: projected };
1678
1712
  });
1679
1713
  };
1680
1714
  var trimMessagesWithSummary = (messages, contextWindow, summaryTokenCount) => {
@@ -1711,8 +1745,8 @@ var trimMessagesWithSummary = (messages, contextWindow, summaryTokenCount) => {
1711
1745
  }
1712
1746
  let cutIndex = messages.length - keepCount;
1713
1747
  if (cutIndex < 0) cutIndex = 0;
1714
- while (cutIndex < messages.length && messages[cutIndex].role === "tool") {
1715
- cutIndex++;
1748
+ while (cutIndex > 0 && messages[cutIndex]?.role === "tool") {
1749
+ cutIndex--;
1716
1750
  }
1717
1751
  return messages.slice(cutIndex);
1718
1752
  };
@@ -2019,7 +2053,7 @@ var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools,
2019
2053
  const rawBaseTools = Array.isArray(agentConfig.tools) ? agentConfig.tools : [];
2020
2054
  const agentEnabledPacks = agentConfig?.enabledPacks;
2021
2055
  const isInlineArtifact = isInlineVisualArtifactAgent(agentConfig);
2022
- const effectiveEnabledPacks = Array.isArray(agentEnabledPacks) && agentEnabledPacks.length > 0 ? agentEnabledPacks.includes("agent-orchestration") ? agentEnabledPacks : [...agentEnabledPacks, "agent-orchestration"] : isInlineArtifact ? agentEnabledPacks ?? [] : ["long-term-memory", "agent-orchestration"];
2056
+ const effectiveEnabledPacks = Array.isArray(agentEnabledPacks) && agentEnabledPacks.length > 0 ? agentEnabledPacks.includes("agent-orchestration") ? agentEnabledPacks : [...agentEnabledPacks, "agent-orchestration"] : isInlineArtifact ? agentEnabledPacks ?? [] : ["long-term-memory", "agent-orchestration", "skills"];
2023
2057
  const expandedPackTools = expandEnabledPacks(
2024
2058
  effectiveEnabledPacks,
2025
2059
  rawBaseTools
@@ -2035,7 +2069,13 @@ var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools,
2035
2069
  ...new Set(asNonEmptyStringArray(agentConfig.recommendedSkillHints))
2036
2070
  ];
2037
2071
  const skillPromptPatches = [
2038
- ...new Set(asNonEmptyStringArray(agentConfig.skillPromptPatches))
2072
+ .../* @__PURE__ */ new Set([
2073
+ ...asNonEmptyStringArray(agentConfig.skillPromptPatches),
2074
+ // 能力包的 promptPatch(方法论文档)与 skill reference 的 patch 走同一条
2075
+ // 注入链(buildSkillGuidanceBlock → buildSkillGuidancePromptBlock),
2076
+ // 让「工具 + 配套纪律」作为一个能力包整体注入 system prompt。
2077
+ ...expandEnabledPackPromptPatches(effectiveEnabledPacks)
2078
+ ])
2039
2079
  ];
2040
2080
  const webPadded = applyDefaultWebToolPacks({
2041
2081
  toolNames: baseTools,
@@ -2620,7 +2660,11 @@ async function consumeAgentRunStream(handlers) {
2620
2660
 
2621
2661
  // packages/ai/llm/isResponseAPIModel.ts
2622
2662
  var isResponseAPIModel = (agentConfig) => {
2623
- if (agentConfig.provider !== "openai") return false;
2663
+ const provider = agentConfig.provider?.trim().toLowerCase();
2664
+ if (provider === "deepseek") {
2665
+ return agentConfig.model?.trim().toLowerCase() === "deepseek-v4-flash";
2666
+ }
2667
+ if (provider !== "openai") return false;
2624
2668
  if (agentConfig.endpointKey === "responses") return true;
2625
2669
  if (!agentConfig.model) return false;
2626
2670
  try {
@@ -2921,6 +2965,12 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
2921
2965
  runtimeOptions.quickChatModelOverride
2922
2966
  );
2923
2967
  }
2968
+ if (runtimeOptions?.quickChatReasoningEffort && rawAgentConfig.model === "deepseek-v4-flash") {
2969
+ rawAgentConfig = {
2970
+ ...rawAgentConfig,
2971
+ reasoning_effort: runtimeOptions.quickChatReasoningEffort
2972
+ };
2973
+ }
2924
2974
  if (isLiveAudioOnlyAgent(rawAgentConfig)) {
2925
2975
  return rejectWithValue(
2926
2976
  "\u6B64 Agent \u4EC5\u652F\u6301\u5B9E\u65F6\u8BED\u97F3\u6A21\u5F0F\uFF0C\u8BF7\u4F7F\u7528\u8BED\u97F3\u9762\u677F\u8FDB\u884C\u5BF9\u8BDD\u3002"
@@ -3799,6 +3849,11 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
3799
3849
  entrypoint: "chat-dialog",
3800
3850
  capabilities: ["streaming", "dialog-ui", "tool-cards"]
3801
3851
  },
3852
+ ...runtimeOptions?.quickChatReasoningEffort ? {
3853
+ runtimeOptions: {
3854
+ quickChatReasoningEffort: runtimeOptions.quickChatReasoningEffort
3855
+ }
3856
+ } : {},
3802
3857
  ...currentDialog?.spaceId ? { spaceId: currentDialog.spaceId } : {}
3803
3858
  });
3804
3859
  const remoteRunUrl = `${explicitServerBase.replace(/\/+$/, "")}/api/agent/run`;
@@ -4020,6 +4075,19 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
4020
4075
  });
4021
4076
  let appendTempUserInput2 = true;
4022
4077
  let currentParentMessageId2 = parentMessageId ?? void 0;
4078
+ const storedResponsesState = currentDialog?.responsesState;
4079
+ let responsesState = selectResponsesConversationState(
4080
+ storedResponsesState,
4081
+ agentConfigForCall
4082
+ );
4083
+ if (storedResponsesState != null && !responsesState) {
4084
+ dispatch(
4085
+ patch({
4086
+ dbKey: dialogKey,
4087
+ changes: { responsesState: null }
4088
+ })
4089
+ );
4090
+ }
4023
4091
  const w2 = typeof globalThis !== "undefined" && globalThis.window ? globalThis.window : null;
4024
4092
  if (w2) w2.__LOOP_STOP_REASON__ = null;
4025
4093
  loopKey = `loop:${dialogId}`;
@@ -4164,8 +4232,17 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
4164
4232
  messages: dynamicMessages,
4165
4233
  stableMessages,
4166
4234
  userInput: userInputText,
4167
- contexts
4235
+ contexts,
4236
+ responsesState
4168
4237
  });
4238
+ const fallbackBodyData = responsesState ? generateRequestBody({
4239
+ agentConfig: effectiveAgentConfig,
4240
+ messages: dynamicMessages,
4241
+ stableMessages,
4242
+ userInput: userInputText,
4243
+ contexts,
4244
+ responsesState: null
4245
+ }) : void 0;
4169
4246
  logQuickChatPerfStage2(quickChatPerfStartedAt, "stream-agent-model-request-starting", {
4170
4247
  responseApi: true,
4171
4248
  dynamicMessageCount: dynamicMessages.length,
@@ -4179,7 +4256,8 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
4179
4256
  dialogKey,
4180
4257
  parentMessageId: currentParentMessageId2,
4181
4258
  messageMetadata: streamingMessageMetadata,
4182
- quickChatPerfStartedAt
4259
+ quickChatPerfStartedAt,
4260
+ fallbackBodyData
4183
4261
  });
4184
4262
  logQuickChatPerfStage2(quickChatPerfStartedAt, "stream-agent-model-request-finished", {
4185
4263
  responseApi: true,
@@ -4189,6 +4267,35 @@ var streamAgentChatTurnHandler = async (args, thunkApi) => {
4189
4267
  });
4190
4268
  appendTempUserInput2 = false;
4191
4269
  currentParentMessageId2 = void 0;
4270
+ if (meta.responseId) {
4271
+ responsesState = updateResponsesConversationState(
4272
+ agentConfigForCall,
4273
+ meta.responseId
4274
+ );
4275
+ if (responsesState) {
4276
+ dispatch(
4277
+ patch({
4278
+ dbKey: dialogKey,
4279
+ changes: { responsesState }
4280
+ })
4281
+ );
4282
+ } else if (meta.responsesStateFallback) {
4283
+ dispatch(
4284
+ patch({
4285
+ dbKey: dialogKey,
4286
+ changes: { responsesState: null }
4287
+ })
4288
+ );
4289
+ }
4290
+ } else if (meta.responsesStateFallback) {
4291
+ responsesState = null;
4292
+ dispatch(
4293
+ patch({
4294
+ dbKey: dialogKey,
4295
+ changes: { responsesState: null }
4296
+ })
4297
+ );
4298
+ }
4192
4299
  totalTurnUsage = updateTotalUsage(totalTurnUsage, meta.usage);
4193
4300
  if (meta.hasHandedOff) {
4194
4301
  if (!requestParentMessageId && meta.messageId) {
@@ -7,11 +7,11 @@ import {
7
7
  getToolRequestContext,
8
8
  resolveToolApiBaseUrl,
9
9
  resolveToolBaseUrl
10
- } from "./chunk-JK7VW2FN.js";
10
+ } from "./chunk-5MIDPSSK.js";
11
11
  import "./chunk-DFFIZ25G.js";
12
12
  import "./chunk-3ASDTTEI.js";
13
- import "./chunk-QSJ3HFEF.js";
14
13
  import "./chunk-DWLEOOGR.js";
14
+ import "./chunk-QSJ3HFEF.js";
15
15
  import "./chunk-KUG52IAP.js";
16
16
  import "./chunk-4VNS5WPM.js";
17
17
  export {
@@ -11,66 +11,65 @@ import {
11
11
  toolQueryFunc,
12
12
  toolQueryFunctionSchema,
13
13
  toolRegistry
14
- } from "./chunk-PTT6KSYQ.js";
14
+ } from "./chunk-Y7QCVJ73.js";
15
15
  import "./chunk-GAKEBQD6.js";
16
+ import "./chunk-I2HCZWJU.js";
16
17
  import "./chunk-KQHGZWSV.js";
17
- import "./chunk-2CVZSC5L.js";
18
+ import "./chunk-IVAOVLM7.js";
18
19
  import "./chunk-3LY4F7SV.js";
19
20
  import "./chunk-VP4WJWKW.js";
20
21
  import "./chunk-63W5N6P3.js";
21
22
  import "./chunk-VF4K2QE6.js";
22
- import "./chunk-LJCH34R2.js";
23
- import "./chunk-A4MYG3TR.js";
24
- import "./chunk-VC6OZXO5.js";
25
- import "./chunk-ZAUDEKML.js";
23
+ import "./chunk-OOOKLEJ7.js";
24
+ import "./chunk-EEUWELOX.js";
25
+ import "./chunk-6WWHKODG.js";
26
+ import "./chunk-DW75SYWV.js";
26
27
  import "./chunk-V2J635L5.js";
27
28
  import "./chunk-MRC4Q34M.js";
28
29
  import "./chunk-MTU75CZ2.js";
29
30
  import "./chunk-CWMSB67P.js";
30
- import "./chunk-4VA3UQRF.js";
31
- import "./chunk-LTH6AVG7.js";
31
+ import "./chunk-KRMH46UV.js";
32
+ import "./chunk-XDXO65DS.js";
32
33
  import "./chunk-Z4NR32XR.js";
33
34
  import "./chunk-M76ECQRD.js";
34
- import "./chunk-RQPZX6KP.js";
35
- import "./chunk-UBSKX3LP.js";
36
- import "./chunk-Y5GCAMGP.js";
37
- import "./chunk-SOTZ6RDN.js";
38
- import "./chunk-BFDWXLFF.js";
39
- import "./chunk-UAD2WT54.js";
40
- import "./chunk-L3KWEH3V.js";
41
- import "./chunk-AZPCASRE.js";
42
- import "./chunk-RBCENBG7.js";
43
- import "./chunk-XENYHRUE.js";
44
- import "./chunk-JTINRTBT.js";
45
- import "./chunk-WZSRQNQG.js";
46
- import "./chunk-6OHYC4BY.js";
47
- import "./chunk-5MMAK75Q.js";
48
- import "./chunk-AOKWJZ5N.js";
49
- import "./chunk-5CS33IBL.js";
35
+ import "./chunk-6PXKSN2M.js";
36
+ import "./chunk-GVQT3FIB.js";
37
+ import "./chunk-S3UTETIC.js";
38
+ import "./chunk-PDL2AV3E.js";
50
39
  import "./chunk-JZPBVBIY.js";
51
40
  import "./chunk-BYXBJQAS.js";
41
+ import "./chunk-5MIDPSSK.js";
42
+ import "./chunk-DFFIZ25G.js";
43
+ import "./chunk-3ASDTTEI.js";
44
+ import "./chunk-HNMXYYJR.js";
45
+ import "./chunk-SOTZ6RDN.js";
46
+ import "./chunk-XENYHRUE.js";
47
+ import "./chunk-DWLEOOGR.js";
48
+ import "./chunk-IKXL2HZ3.js";
49
+ import "./chunk-524BDL33.js";
50
+ import "./chunk-S37OTGU7.js";
51
+ import "./chunk-UZZCXRHF.js";
52
+ import "./chunk-Y5GCAMGP.js";
52
53
  import "./chunk-KX6YBIHG.js";
53
- import "./chunk-RBCNBU2A.js";
54
+ import "./chunk-XGMCGPEA.js";
55
+ import "./chunk-KPFGD3YA.js";
54
56
  import "./chunk-O4BU24WZ.js";
55
57
  import "./chunk-I42VC5KR.js";
56
58
  import "./chunk-WWC7I6TA.js";
57
- import "./chunk-JK7VW2FN.js";
58
- import "./chunk-DFFIZ25G.js";
59
- import "./chunk-3ASDTTEI.js";
59
+ import "./chunk-WPHL6ALY.js";
60
60
  import "./chunk-QSJ3HFEF.js";
61
- import "./chunk-DWLEOOGR.js";
62
- import "./chunk-HNMXYYJR.js";
63
- import "./chunk-VBKJTOAW.js";
64
- import "./chunk-DVRHHFEA.js";
61
+ import "./chunk-XHQWJUW4.js";
62
+ import "./chunk-TSUJOM6N.js";
65
63
  import "./chunk-OOSFSFMA.js";
66
64
  import "./chunk-GBRG75BQ.js";
65
+ import "./chunk-KUG52IAP.js";
67
66
  import "./chunk-3EUW3WEO.js";
68
67
  import "./chunk-U6VC4MU4.js";
69
- import "./chunk-KUG52IAP.js";
70
68
  import "./chunk-LCBAMY2M.js";
71
69
  import "./chunk-4SN6J65J.js";
72
70
  import "./chunk-CF7PE763.js";
73
71
  import "./chunk-G3SUCT4W.js";
72
+ import "./chunk-WZSRQNQG.js";
74
73
  import "./chunk-4VNS5WPM.js";
75
74
  export {
76
75
  TOOL_GROUP_META,