nolo-cli 0.32.0 → 0.33.0-alpha.3

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 (170) hide show
  1. package/README.md +6 -12
  2. package/{_executeModel-LTMSIBS4.js → _executeModel-RWPVI3YV.js} +76 -67
  3. package/{action-HI3VRQLP.js → action-SMLG6OTB.js} +17 -15
  4. package/{addContentAction-NCURJ6PK.js → addContentAction-SFO244QN.js} +14 -13
  5. package/{addDialogAgentAction-RCY4ECF4.js → addDialogAgentAction-W44ZCEHB.js} +14 -13
  6. package/{agentDeleteCommand-D3MYZK6E.js → agentDeleteCommand-KU2RXQPP.js} +42 -59
  7. package/{agentEmailCommands-6BXS574I.js → agentEmailCommands-MPCMDENS.js} +89 -80
  8. package/{agentGrantCommands-E7ZZFRHK.js → agentGrantCommands-2LEZDADN.js} +2 -2
  9. package/{agentListCommands-SF3HEUTT.js → agentListCommands-EPD4N6FX.js} +73 -78
  10. package/{agentMachineCommands-YARVXRR6.js → agentMachineCommands-AF7C3YRT.js} +40 -57
  11. package/{agentPullCommand-ARSIDNVC.js → agentPullCommand-YH5GEBK4.js} +5 -5
  12. package/agentRecordCommands-EYE6MZZG.js +112 -0
  13. package/agentRunCommand-LL22SGTN.js +130 -0
  14. package/{agentRuntimeLocal-ATGJY6WC.js → agentRuntimeLocal-JX34G47Z.js} +35 -50
  15. package/{agentSlice-4XWW344Y.js → agentSlice-TNMFQQOV.js} +15 -13
  16. package/{appDeleteCommands-63JO7RXS.js → appDeleteCommands-43K5VXQB.js} +38 -55
  17. package/{appDeployCommands-Y7EWYUGM.js → appDeployCommands-FEEJSVDZ.js} +38 -55
  18. package/{appDeployStatusCommands-ZBEY3DWB.js → appDeployStatusCommands-H76CG45R.js} +38 -55
  19. package/{appGetCommands-QSSOSEYL.js → appGetCommands-MDZYFTYZ.js} +38 -55
  20. package/{appListCommands-PH3XWNDX.js → appListCommands-TUJJXPWG.js} +38 -55
  21. package/{authCommand-BBDHMSO6.js → authCommand-T7UK4CWS.js} +18 -18
  22. package/{authCommands-4UDEKRE6.js → authCommands-EAPFGNHN.js} +8 -8
  23. package/chatQueueReduxAdapter-LVQXC4ZY.js +180 -0
  24. package/chunk-2H3XIBY4.js +239 -0
  25. package/{chunk-TEYN42N3.js → chunk-2IVEXF7P.js} +11 -4
  26. package/{chunk-WTGCTVJG.js → chunk-2QTEYCR7.js} +3 -6
  27. package/{chunk-DOISARTV.js → chunk-2UECQ7RE.js} +1 -1
  28. package/{chunk-SWYMCHM7.js → chunk-37V5LNEQ.js} +69 -1
  29. package/{chunk-E3APEOIM.js → chunk-3GZXL6FM.js} +4 -19
  30. package/{chunk-O3JR45Q2.js → chunk-3VAQHAXT.js} +44 -44
  31. package/{chunk-O5OMJPPF.js → chunk-3WXRAHCG.js} +6 -5
  32. package/{chunk-LAXMH7JY.js → chunk-57QJXIB6.js} +18 -15
  33. package/chunk-5CS33IBL.js +301 -0
  34. package/{chunk-3UGKATZQ.js → chunk-5SBK2MTI.js} +8 -369
  35. package/chunk-6PO2SYCS.js +1800 -0
  36. package/{chunk-TA6EA2A3.js → chunk-6SXC35F4.js} +182 -20
  37. package/{chunk-MXFQHRSS.js → chunk-6XIE5ZGI.js} +1 -1
  38. package/{chunk-3GZT3L6F.js → chunk-73GINUCW.js} +326 -481
  39. package/{chunk-VMWR7VNI.js → chunk-7E72JMBB.js} +7 -7
  40. package/{chunk-4PNU7W7K.js → chunk-AAGCMVFT.js} +106 -124
  41. package/chunk-ADLYMQB6.js +642 -0
  42. package/{chunk-ZWJOGMKH.js → chunk-AETZ7AD6.js} +1 -1
  43. package/{chunk-UDA3ZYLW.js → chunk-AFV4FOT2.js} +70 -24
  44. package/{chunk-BGTUGS3T.js → chunk-AOXVOC6D.js} +4 -30
  45. package/{chunk-2ZRP5RUG.js → chunk-B2BSG6QQ.js} +12 -11
  46. package/{chunk-44HACRCK.js → chunk-BANYWEYY.js} +4 -4
  47. package/{chunk-TOW4E763.js → chunk-BJIRLHJR.js} +2 -0
  48. package/{chunk-ZJ2WITOO.js → chunk-BQXOGBFN.js} +2 -2
  49. package/{chunk-G5GVZAXF.js → chunk-CLP2K7U4.js} +15 -19
  50. package/{chunk-2K4NDPT5.js → chunk-DFUPZE6V.js} +20 -12
  51. package/{chunk-YHGHADBQ.js → chunk-DPMBNHOJ.js} +4 -4
  52. package/chunk-EGRJC4ZN.js +91 -0
  53. package/{chunk-K6QEHQZ3.js → chunk-EKLRRZIN.js} +1 -1
  54. package/{chunk-XFG3BAKN.js → chunk-FMEVI5TG.js} +65 -0
  55. package/{chunk-RH53LMEJ.js → chunk-FSSX3XRY.js} +2 -4
  56. package/{chunk-VP4WJWKW.js → chunk-GM6PU7B6.js} +431 -345
  57. package/{chunk-EEF23OOK.js → chunk-GMXWYXAF.js} +7 -7
  58. package/{chunk-SFWZUTCI.js → chunk-GTYM4HKV.js} +1 -1
  59. package/{chunk-MITD7CON.js → chunk-HDKRSRYU.js} +1461 -301
  60. package/chunk-HS7MLR74.js +38 -0
  61. package/{chunk-3AUWC6EM.js → chunk-HUCT7HID.js} +5 -84
  62. package/{chunk-PTHDLIRB.js → chunk-I6N2UVVY.js} +1 -1
  63. package/chunk-IDAU4UFS.js +437 -0
  64. package/{chunk-Q76I4SXI.js → chunk-IHEC7VBF.js} +1 -1
  65. package/{chunk-OWHNFZNW.js → chunk-IL545V3E.js} +4 -4
  66. package/{chunk-3LY4F7SV.js → chunk-INZZJSQF.js} +348 -331
  67. package/{chunk-CF2WZF4N.js → chunk-J6WH4PYZ.js} +0 -8
  68. package/{chunk-2HXKAPH7.js → chunk-JMPYDFHY.js} +6 -6
  69. package/{chunk-V54H24CQ.js → chunk-JTSGWTYZ.js} +3 -3
  70. package/{chunk-ATK5WJOA.js → chunk-JZ5AMMXU.js} +4 -4
  71. package/chunk-KHCLMKZZ.js +3062 -0
  72. package/{chunk-WHLVPK32.js → chunk-KMSZPTM6.js} +27 -3
  73. package/{chunk-L3GCUVOH.js → chunk-KSRFVP36.js} +1 -1
  74. package/{chunk-DLWCWUNW.js → chunk-LOD75GOS.js} +336 -32
  75. package/{chunk-UOJRKY5J.js → chunk-M2YMQOLC.js} +44 -53
  76. package/chunk-M3JEW6N6.js +193 -0
  77. package/{chunk-XDHHF73Q.js → chunk-M4NC7NF6.js} +95 -95
  78. package/{chunk-3FCNXC2J.js → chunk-MPZJVZDC.js} +3735 -1394
  79. package/{chunk-IXZX5CJK.js → chunk-MQRZ5QUH.js} +1 -1
  80. package/{chunk-3ASDTTEI.js → chunk-MRWGHF56.js} +2 -0
  81. package/{chunk-D34RI6NI.js → chunk-NNWHHCVP.js} +75 -1
  82. package/{chunk-6YABCOFU.js → chunk-NUO3QFWD.js} +1 -1
  83. package/{chunk-GAF5X6B7.js → chunk-O6GEBMIY.js} +269 -309
  84. package/{chunk-CAENRKNJ.js → chunk-OR2HNLVO.js} +126 -88
  85. package/chunk-OW765XBU.js +10 -0
  86. package/chunk-PREQU5QV.js +231 -0
  87. package/{chunk-Q3CSL43H.js → chunk-Q5ITEGIN.js} +1 -1
  88. package/{chunk-7S54ZGF6.js → chunk-RAZOLMJR.js} +256 -12
  89. package/chunk-RCFIB45Q.js +28 -0
  90. package/chunk-RY57GLGW.js +188 -0
  91. package/{chunk-KGEVMUMI.js → chunk-TFPUAELY.js} +11 -11
  92. package/{chunk-ZJH3LKEW.js → chunk-UK5JGQVU.js} +94 -15
  93. package/chunk-URMS4XY2.js +10 -0
  94. package/{chunk-RXVX5LFR.js → chunk-VH2F7ZB6.js} +1 -1
  95. package/chunk-VIDPVFP3.js +20 -0
  96. package/{chunk-W367V5CH.js → chunk-WHD6BG7M.js} +400 -115
  97. package/{chunk-5RDLGLAP.js → chunk-WJSW43QZ.js} +4 -7
  98. package/{chunk-CF7S2RYZ.js → chunk-WLH5BAKX.js} +6 -6
  99. package/{chunk-VVEH6XUE.js → chunk-X2DAEZ3X.js} +1 -1
  100. package/{chunk-2IJAKBK2.js → chunk-X664KVEV.js} +426 -246
  101. package/{chunk-43EPBPZ2.js → chunk-XCCGU6QB.js} +2 -2
  102. package/chunk-Y5GCAMGP.js +9 -0
  103. package/{chunk-V42OE5HT.js → chunk-YDTYDA5W.js} +3 -3
  104. package/chunk-YYLHWIW6.js +48 -0
  105. package/{chunk-AOS5IN2I.js → chunk-ZHYK3N56.js} +1 -1
  106. package/{chunk-ODS2MVMU.js → chunk-ZJMME4DS.js} +19 -303
  107. package/{chunk-PJ2DDQQM.js → chunk-ZURFOV5J.js} +2 -2
  108. package/chunk-ZZ2MH7LE.js +84 -0
  109. package/{cliExecutor-BBUVQU4L.js → cliExecutor-DW3PHGEL.js} +2 -2
  110. package/{clipboardy-BVE3LVEH.js → clipboardy-MMBYVRLF.js} +166 -372
  111. package/{codingSkills-V35TRR4Y.js → codingSkills-DY5MINPG.js} +5 -4
  112. package/{createAgentAutomationAction-WLRNE7C4.js → createAgentAutomationAction-INQT23LX.js} +40 -31
  113. package/createDialogAction-LDCPDI73.js +60 -0
  114. package/{createPageAction-7YROVZ3W.js → createPageAction-5YXOG2M4.js} +56 -47
  115. package/{db-6DPSJ6WT.js → db-3H3JECGY.js} +45 -5
  116. package/{dbSlice-BBL3PEVW.js → dbSlice-3SD5L5H2.js} +13 -12
  117. package/{deleteFile-RJTEPOT4.js → deleteFile-XQXPBFFB.js} +7 -6
  118. package/dialogCommands-CHJO47AX.js +81 -0
  119. package/{dialogSlice-N4HPG6HM.js → dialogSlice-DOWKOILN.js} +36 -29
  120. package/{docCreateCommands-GRA5BHSA.js → docCreateCommands-OVZARUFX.js} +40 -55
  121. package/{docDeleteCommands-ONIJM5MD.js → docDeleteCommands-E2XJ62LD.js} +42 -57
  122. package/{docReadCommands-H55VQ2US.js → docReadCommands-I7OSREPJ.js} +40 -55
  123. package/{docStore-B5AHDNW5.js → docStore-UAWSKZ2Y.js} +39 -30
  124. package/{docUpdateCommands-ZQIQVGC2.js → docUpdateCommands-X4Z26VJM.js} +43 -58
  125. package/{fetchMessages-VPPQDDZ4.js → fetchMessages-7QRCCRYK.js} +3 -3
  126. package/{getPricing-QO5TYNCK.js → getPricing-L2ENXWHV.js} +7 -6
  127. package/{handleSendMessageAction-IN5XX5U7.js → handleSendMessageAction-C3TSDWKH.js} +38 -31
  128. package/index.js +67 -67
  129. package/{lib-FYYBQIXS.js → lib-2ZTNRXR4.js} +432 -183
  130. package/{localDialogRead-3DBXVYXS.js → localDialogRead-SLMPV5SK.js} +2 -2
  131. package/{localRuntimeAuthority-NDUA2D7Y.js → localRuntimeAuthority-E3R24J4T.js} +4 -2
  132. package/{localRuntimeDb-GKYRBWLQ.js → localRuntimeDb-DDZCJFQZ.js} +1 -1
  133. package/{machineCommands-H3UMKE76.js → machineCommands-BUOIYJAD.js} +93 -84
  134. package/{machineWsRunDispatch-HONRUK3R.js → machineWsRunDispatch-7CRWAA6O.js} +83 -74
  135. package/{models-WDUTTYFS.js → models-OX2S5C6Q.js} +2 -2
  136. package/{offlineMarxistsAgentCommand-E6LUG63A.js → offlineMarxistsAgentCommand-GEH6SNNA.js} +1 -1
  137. package/package.json +1 -4
  138. package/{read-64OQDO3I.js → read-6G73BMEY.js} +8 -7
  139. package/{readDocTool-MXM3T6PE.js → readDocTool-DK4EI2GA.js} +1 -2
  140. package/{readlineWorkspace-XVJZDCSC.js → readlineWorkspace-ZDWEASJV.js} +265 -428
  141. package/{removeDialogAgentAction-NEKVAMSH.js → removeDialogAgentAction-E7H557UO.js} +19 -17
  142. package/{runAgentClientLoop-H7U53QB6.js → runAgentClientLoop-U7HYA3O5.js} +72 -64
  143. package/{runtimeDoctorCommands-WI2YZUSJ.js → runtimeDoctorCommands-KIKM6BIO.js} +5 -5
  144. package/{setDialogExtraReferencesAction-WTOHQDIV.js → setDialogExtraReferencesAction-RMMGBR5F.js} +15 -14
  145. package/{setPrimaryDialogAgentAction-LDJOYC4F.js → setPrimaryDialogAgentAction-FWBKKLVA.js} +19 -17
  146. package/{settingSlice-4M37TN7V.js → settingSlice-73PV4KG4.js} +16 -14
  147. package/{skillDiscovery-5U6RYAHN.js → skillDiscovery-KLLKXPUO.js} +4 -4
  148. package/{slateUtils-2M7MUTWX.js → slateUtils-VO2FU36K.js} +1 -1
  149. package/{spaceCommands-7VVKJBDV.js → spaceCommands-GEWZXGHM.js} +43 -240
  150. package/{spaceSlice-T6YK6D34.js → spaceSlice-B6MOVY4N.js} +38 -61
  151. package/{streamAgentChatTurn-RQ63QFQ7.js → streamAgentChatTurn-T527EQTT.js} +1261 -150
  152. package/{switchDialogAgentAction-XVWGKR2Z.js → switchDialogAgentAction-US6QNL3N.js} +14 -13
  153. package/syncMapping-RK2MANUX.js +43 -0
  154. package/{tableCommands-RJZ3V4TF.js → tableCommands-QE47K72R.js} +8 -7
  155. package/{toolApiClient-ARGFDJAG.js → toolApiClient-B2MFXMEG.js} +3 -3
  156. package/tools-XMWCVMPM.js +98 -0
  157. package/{tuiSummaryLlmCaller-SRZ4QQUP.js → tuiSummaryLlmCaller-NCAJSVSD.js} +24 -21
  158. package/{updateDialogTitleAction-BBDSWHNG.js → updateDialogTitleAction-XPJZRJEL.js} +48 -38
  159. package/agentRecordCommands-JFZRQJQ4.js +0 -103
  160. package/agentRunCommand-NOX5FLKO.js +0 -121
  161. package/chunk-AYMOSAHE.js +0 -3158
  162. package/chunk-D2BPX6DQ.js +0 -1707
  163. package/chunk-DCDL3GC4.js +0 -171
  164. package/chunk-F3MP7CP6.js +0 -73
  165. package/chunk-WZSRQNQG.js +0 -2587
  166. package/createDialogAction-Y6YV64QB.js +0 -52
  167. package/dialogCommands-XLO5CAHZ.js +0 -95
  168. package/tools-KYZX3BGO.js +0 -90
  169. package/{chunk-Z5MXSEOJ.js → chunk-RQSOAMPJ.js} +2 -2
  170. package/{chunk-JDSUTNYY.js → chunk-SAQQLJZ5.js} +3 -3
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  asOptionalFiniteNumber
3
3
  } from "./chunk-WWC7I6TA.js";
4
- import {
5
- asTrimmedString
6
- } from "./chunk-3EUW3WEO.js";
7
4
  import {
8
5
  asNonEmptyStringArray
9
6
  } from "./chunk-I42VC5KR.js";
7
+ import {
8
+ asTrimmedString
9
+ } from "./chunk-3EUW3WEO.js";
10
10
  import {
11
11
  asOptionalTrimmedString
12
12
  } from "./chunk-G3SUCT4W.js";
@@ -2393,6 +2393,29 @@ var require_rambda = __commonJS({
2393
2393
  }
2394
2394
  });
2395
2395
 
2396
+ // packages/create/types.ts
2397
+ var DataType = /* @__PURE__ */ ((DataType2) => {
2398
+ DataType2["AGENT"] = "agent";
2399
+ DataType2["DOC"] = "page";
2400
+ DataType2["DIALOG"] = "dialog";
2401
+ DataType2["NOTIFICATION"] = "notification";
2402
+ DataType2["MSG"] = "msg";
2403
+ DataType2["TOKEN"] = "token";
2404
+ DataType2["SPACE"] = "space";
2405
+ DataType2["TRANSACTION"] = "transaction";
2406
+ DataType2["SETTING"] = "setting";
2407
+ DataType2["TASK"] = "task";
2408
+ DataType2["AGENT_AUTOMATION"] = "agent-automation";
2409
+ DataType2["TABLE"] = "table";
2410
+ DataType2["TABLE_ROW"] = "table_row";
2411
+ DataType2["FILE"] = "file";
2412
+ DataType2["IMAGE"] = "image";
2413
+ DataType2["APP"] = "app";
2414
+ DataType2["EMAIL"] = "email";
2415
+ DataType2["Category"] = "category";
2416
+ return DataType2;
2417
+ })(DataType || {});
2418
+
2396
2419
  // packages/core/toTrimmedString.ts
2397
2420
  function toTrimmedString(value) {
2398
2421
  return typeof value === "string" ? value.trim() : value == null ? "" : String(value).trim();
@@ -3167,6 +3190,7 @@ var sanitizeShareData = (data) => {
3167
3190
  };
3168
3191
 
3169
3192
  export {
3193
+ DataType,
3170
3194
  ulid,
3171
3195
  toTrimmedString,
3172
3196
  toNonEmptyString,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageRange
3
- } from "./chunk-WHLVPK32.js";
3
+ } from "./chunk-KMSZPTM6.js";
4
4
  import {
5
5
  isTombstoneRecord
6
6
  } from "./chunk-GBRG75BQ.js";
@@ -1,17 +1,20 @@
1
1
  import {
2
2
  applyChatCompletionDelta,
3
+ applyResponsesToolEvent,
4
+ createResponsesToolAccumulator,
5
+ finalizeResponsesToolCalls,
3
6
  flushChatCompletionStream,
4
7
  providerHttpFailure,
5
8
  readSseFrames,
6
9
  throwIfChatCompletionStreamFailed
7
- } from "./chunk-7S54ZGF6.js";
10
+ } from "./chunk-RAZOLMJR.js";
8
11
  import {
9
12
  sanitizeForOutbound
10
13
  } from "./chunk-T27IEBNQ.js";
11
14
  import {
12
15
  parseToolArgumentsJson,
13
16
  resolveHistoricalToolContentCap
14
- } from "./chunk-AYMOSAHE.js";
17
+ } from "./chunk-6PO2SYCS.js";
15
18
  import {
16
19
  createThinkParserState,
17
20
  createToolCallAccumulator,
@@ -22,24 +25,35 @@ import {
22
25
  import {
23
26
  requiresBareImageUrl,
24
27
  toBareImageUrlMessages
25
- } from "./chunk-3UGKATZQ.js";
28
+ } from "./chunk-5SBK2MTI.js";
26
29
  import {
30
+ convertMessagesToResponsesInput,
31
+ extractReasoningFromResponseOutput,
32
+ extractTextFromResponseOutput,
33
+ extractToolCallsFromResponseOutput,
34
+ getUsageRequestOptions,
27
35
  shouldStripReasoningContentForOutbound,
28
- toOpenAiCompatibleMessages
29
- } from "./chunk-D34RI6NI.js";
36
+ toOpenAiCompatibleMessages,
37
+ toResponsesTools
38
+ } from "./chunk-NNWHHCVP.js";
30
39
  import {
31
40
  buildProviderAuthHeaders,
32
41
  buildProviderExecutionPlan
33
- } from "./chunk-UDA3ZYLW.js";
34
- import {
35
- buildDialogFallbackTitleFromUserInput
36
- } from "./chunk-2MBTWINN.js";
42
+ } from "./chunk-AFV4FOT2.js";
37
43
  import {
38
44
  NOLO_WORKSPACE_TOOL_NAMES,
39
45
  buildNoloWorkspaceCommandArgs,
46
+ noloPositiveIntegerString,
40
47
  noloStringArg,
41
- parseNoloWorkspaceToolArguments
42
- } from "./chunk-D2BPX6DQ.js";
48
+ parseNoloWorkspaceToolArguments,
49
+ resolveNoloDialogInput
50
+ } from "./chunk-ADLYMQB6.js";
51
+ import {
52
+ buildDialogFallbackTitleFromUserInput
53
+ } from "./chunk-2MBTWINN.js";
54
+ import {
55
+ canonicalizeToolName
56
+ } from "./chunk-ZZ2MH7LE.js";
43
57
  import {
44
58
  toErrorMessage
45
59
  } from "./chunk-HNMXYYJR.js";
@@ -47,17 +61,18 @@ import {
47
61
  asRecordOrEmpty
48
62
  } from "./chunk-KX6YBIHG.js";
49
63
  import {
50
- asTrimmedLowercaseString
51
- } from "./chunk-QSJ3HFEF.js";
52
- import {
53
- normalizeServerOrigin
54
- } from "./chunk-CF7PE763.js";
55
- import {
56
- dialogMessageKey
57
- } from "./chunk-WHLVPK32.js";
64
+ dialogMessageKey,
65
+ dialogMessageRange
66
+ } from "./chunk-KMSZPTM6.js";
58
67
  import {
59
68
  asOptionalFiniteNumber
60
69
  } from "./chunk-WWC7I6TA.js";
70
+ import {
71
+ asTrimmedNonEmptyStringArray
72
+ } from "./chunk-I42VC5KR.js";
73
+ import {
74
+ asTrimmedLowercaseString
75
+ } from "./chunk-QSJ3HFEF.js";
61
76
  import {
62
77
  asTrimmedString
63
78
  } from "./chunk-3EUW3WEO.js";
@@ -68,11 +83,8 @@ import {
68
83
  isRecord
69
84
  } from "./chunk-KUG52IAP.js";
70
85
  import {
71
- canonicalizeToolName
72
- } from "./chunk-3AUWC6EM.js";
73
- import {
74
- asTrimmedNonEmptyStringArray
75
- } from "./chunk-I42VC5KR.js";
86
+ normalizeServerOrigin
87
+ } from "./chunk-CF7PE763.js";
76
88
  import {
77
89
  asOptionalTrimmedString
78
90
  } from "./chunk-G3SUCT4W.js";
@@ -142,8 +154,173 @@ function parseSseDataLineObject(line) {
142
154
  return parsed && typeof parsed === "object" ? parsed : null;
143
155
  }
144
156
 
157
+ // packages/integrations/openai/responsesRequestBody.ts
158
+ function buildResponsesRequestBody(body, model) {
159
+ const tools = Array.isArray(body.tools) ? toResponsesTools(body.tools) : void 0;
160
+ const reasoningEffort = body.reasoning && typeof body.reasoning === "object" ? void 0 : typeof body.reasoning_effort === "string" && body.reasoning_effort.trim() ? body.reasoning_effort : void 0;
161
+ return {
162
+ ...body,
163
+ model,
164
+ input: Array.isArray(body.input) && body.input.length > 0 ? body.input : convertMessagesToResponsesInput(body.messages ?? []),
165
+ ...Array.isArray(body.tools) ? { tools: tools ?? void 0 } : {},
166
+ ...typeof body.max_tokens === "number" ? { max_output_tokens: body.max_tokens } : {},
167
+ ...reasoningEffort ? { reasoning: { effort: reasoningEffort } } : {},
168
+ messages: void 0,
169
+ max_tokens: void 0,
170
+ reasoning_effort: void 0,
171
+ tool_choice: void 0
172
+ };
173
+ }
174
+
175
+ // packages/agent-runtime/responsesSseStream.ts
176
+ function toResponsesStreamFailure(raw, fallbackPrefix = "Responses") {
177
+ if (!raw || typeof raw !== "object") return void 0;
178
+ const err = raw;
179
+ const reason = typeof err.reason === "string" ? err.reason : void 0;
180
+ const message = typeof err.message === "string" && err.message ? err.message : reason ? `${fallbackPrefix} upstream ended incomplete: ${reason}.` : "";
181
+ if (!message) return void 0;
182
+ const code = typeof err.code === "string" ? err.code : reason;
183
+ return {
184
+ ...code ? { code } : {},
185
+ ...typeof err.type === "string" ? { type: err.type } : {},
186
+ message
187
+ };
188
+ }
189
+ function responsesStreamFailureStatus(failure) {
190
+ const marker = `${failure.code ?? ""} ${failure.type ?? ""}`.toLowerCase();
191
+ if (marker.includes("overload") || marker.includes("service_unavailable")) return 503;
192
+ if (marker.includes("rate_limit") || marker.includes("usage_limit")) return 429;
193
+ return 502;
194
+ }
195
+ var codexStreamFailureStatus = responsesStreamFailureStatus;
196
+ function createResponsesStreamCollector(callbacks) {
197
+ let content = "";
198
+ let reasoning = "";
199
+ const toolCallsAcc = createResponsesToolAccumulator();
200
+ let usage;
201
+ let failure;
202
+ let completedResponse;
203
+ const processEvent = (ev) => {
204
+ const type = String(ev.type ?? "");
205
+ if (type === "error") {
206
+ failure = failure ?? toResponsesStreamFailure(ev.error, callbacks?.fallbackPrefix);
207
+ return;
208
+ }
209
+ if (type === "response.failed" || type === "response.incomplete") {
210
+ const response = ev.response;
211
+ failure = failure ?? toResponsesStreamFailure(response?.error, callbacks?.fallbackPrefix) ?? toResponsesStreamFailure(response?.incomplete_details, callbacks?.fallbackPrefix) ?? {
212
+ code: type === "response.incomplete" ? "response_incomplete" : "response_failed",
213
+ message: `${callbacks?.fallbackPrefix ?? "Responses"} upstream ended with ${type}.`
214
+ };
215
+ return;
216
+ }
217
+ if (type === "response.output_text.delta" && typeof ev.delta === "string") {
218
+ content += ev.delta;
219
+ callbacks?.onTextDelta?.(ev.delta);
220
+ return;
221
+ }
222
+ if ((type === "response.reasoning_text.delta" || type === "response.reasoning.delta") && typeof ev.delta === "string") {
223
+ reasoning += ev.delta;
224
+ callbacks?.onReasoningDelta?.(ev.delta);
225
+ return;
226
+ }
227
+ if (type === "response.output_item.added" || type === "response.output_item.done" || type === "response.function_call_arguments.delta" || type === "response.function_call_arguments.done") {
228
+ applyResponsesToolEvent(toolCallsAcc, ev);
229
+ return;
230
+ }
231
+ if (type === "response.completed") {
232
+ const response = ev.response;
233
+ if (response) {
234
+ completedResponse = response;
235
+ const u = response.usage;
236
+ if (u) {
237
+ const prompt = typeof u.input_tokens === "number" ? u.input_tokens : typeof u.prompt_tokens === "number" ? u.prompt_tokens : 0;
238
+ const completion = typeof u.output_tokens === "number" ? u.output_tokens : typeof u.completion_tokens === "number" ? u.completion_tokens : 0;
239
+ const total = typeof u.total_tokens === "number" ? u.total_tokens : prompt + completion;
240
+ usage = {
241
+ prompt_tokens: prompt,
242
+ completion_tokens: completion,
243
+ total_tokens: total
244
+ };
245
+ }
246
+ }
247
+ }
248
+ };
249
+ const finalize = () => {
250
+ let finalToolCalls = finalizeResponsesToolCalls(toolCallsAcc);
251
+ if (finalToolCalls.length === 0 && completedResponse) {
252
+ finalToolCalls = extractToolCallsFromResponseOutput(completedResponse);
253
+ }
254
+ if (!content && completedResponse) {
255
+ content = extractTextFromResponseOutput(completedResponse);
256
+ }
257
+ if (!reasoning && completedResponse) {
258
+ reasoning = extractReasoningFromResponseOutput(completedResponse);
259
+ }
260
+ return {
261
+ content,
262
+ ...reasoning ? { reasoning_content: reasoning } : {},
263
+ ...finalToolCalls.length > 0 ? { tool_calls: finalToolCalls } : {},
264
+ ...usage ? { usage } : {},
265
+ finish_reason: finalToolCalls.length > 0 ? "tool_calls" : "stop",
266
+ stream_complete: true,
267
+ ...failure ? { failure } : {}
268
+ };
269
+ };
270
+ return {
271
+ processEvent,
272
+ finalize
273
+ };
274
+ }
275
+ function aggregateResponsesStream(events, options) {
276
+ const collector = createResponsesStreamCollector({ fallbackPrefix: options?.fallbackPrefix ?? "Codex" });
277
+ for (const ev of events) {
278
+ collector.processEvent(ev);
279
+ }
280
+ const finalized = collector.finalize();
281
+ return {
282
+ text: finalized.content,
283
+ toolCalls: finalized.tool_calls ?? [],
284
+ usage: finalized.usage,
285
+ failure: finalized.failure
286
+ };
287
+ }
288
+ async function readResponsesSseCompletion(args) {
289
+ const collector = createResponsesStreamCollector({
290
+ onTextDelta: args.onTextDelta,
291
+ onReasoningDelta: args.onReasoningDelta,
292
+ fallbackPrefix: args.fallbackPrefix ?? "Responses"
293
+ });
294
+ for await (const frame of readSseFrames(args.response)) {
295
+ for (const line of frame.split("\n")) {
296
+ const parsed = parseSseDataLineObject(line);
297
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
298
+ collector.processEvent(parsed);
299
+ }
300
+ }
301
+ }
302
+ const result = collector.finalize();
303
+ if (result.failure) {
304
+ const status = responsesStreamFailureStatus(result.failure);
305
+ const err = new Error(result.failure.message);
306
+ err.status = status;
307
+ err.code = result.failure.code;
308
+ err.type = result.failure.type;
309
+ throw err;
310
+ }
311
+ return result;
312
+ }
313
+
145
314
  // packages/agent-runtime/openAiCompatibleProvider.ts
315
+ function isOpenAiResponsesEndpoint(endpoint) {
316
+ return endpoint.includes("/responses");
317
+ }
318
+ function resolveOpenAiCompatibleWire(config) {
319
+ if (config.wire) return config.wire;
320
+ return isOpenAiResponsesEndpoint(config.endpoint) ? "responses" : "chat.completions";
321
+ }
146
322
  function buildOpenAiCompatibleChatCompletionRequest(args) {
323
+ const isResponses = resolveOpenAiCompatibleWire(args.providerConfig) === "responses";
147
324
  const shouldStripReasoning = shouldStripReasoningContentForOutbound(
148
325
  args.providerConfig.provider,
149
326
  args.providerConfig.model
@@ -152,7 +329,7 @@ function buildOpenAiCompatibleChatCompletionRequest(args) {
152
329
  const messages = toOpenAiCompatibleMessages(sanitizedMessages, {
153
330
  stripReasoningContent: shouldStripReasoning
154
331
  });
155
- const body = {
332
+ const rawBody = {
156
333
  model: args.providerConfig.model,
157
334
  messages: requiresBareImageUrl({
158
335
  endpoint: args.providerConfig.endpoint,
@@ -162,8 +339,9 @@ function buildOpenAiCompatibleChatCompletionRequest(args) {
162
339
  stream: args.stream ?? false,
163
340
  ...args.providerConfig.requestOptions,
164
341
  ...args.tools && args.tools.length > 0 ? { tools: args.tools } : {},
165
- ...args.stream ? { stream_options: { include_usage: true } } : {}
342
+ ...!isResponses && args.stream ? getUsageRequestOptions(args.providerConfig.provider, { api: "chat-completions" }) : {}
166
343
  };
344
+ const body = isResponses ? buildResponsesRequestBody(rawBody, args.providerConfig.model) : rawBody;
167
345
  const endpoint = args.providerConfig.endpoint;
168
346
  const headers = {
169
347
  "Content-Type": "application/json",
@@ -183,6 +361,28 @@ function buildOpenAiCompatibleChatCompletionRequest(args) {
183
361
  }
184
362
  };
185
363
  }
364
+ function parseOpenAiCompatibleResponsesResponse(args) {
365
+ const content = extractTextFromResponseOutput(args.data);
366
+ const reasoning = extractReasoningFromResponseOutput(args.data);
367
+ const tool_calls = extractToolCallsFromResponseOutput(args.data);
368
+ const u = args.data?.usage;
369
+ const usage = u && typeof u === "object" ? {
370
+ prompt_tokens: typeof u.input_tokens === "number" ? u.input_tokens : typeof u.prompt_tokens === "number" ? u.prompt_tokens : 0,
371
+ completion_tokens: typeof u.output_tokens === "number" ? u.output_tokens : typeof u.completion_tokens === "number" ? u.completion_tokens : 0,
372
+ total_tokens: typeof u.total_tokens === "number" ? u.total_tokens : (u.input_tokens ?? 0) + (u.output_tokens ?? 0)
373
+ } : void 0;
374
+ return {
375
+ content,
376
+ model: args.providerConfig.model,
377
+ provider: args.providerConfig.provider,
378
+ ...tool_calls.length > 0 ? { tool_calls } : {},
379
+ ...reasoning ? { reasoning_content: reasoning } : {},
380
+ finish_reason: tool_calls.length > 0 ? "tool_calls" : "stop",
381
+ stream_complete: true,
382
+ ...usage ? { usage } : {},
383
+ trace: args.trace
384
+ };
385
+ }
186
386
  function parseOpenAiCompatibleChatCompletionResponse(args) {
187
387
  const choiceMessage = args.data?.choices?.[0]?.message ?? {};
188
388
  const rawContent = String(choiceMessage?.content ?? "");
@@ -236,6 +436,7 @@ async function readOpenAiCompatibleSseCompletion(args) {
236
436
  };
237
437
  }
238
438
  async function executeOpenAiCompatibleChatCompletion(args) {
439
+ const isResponses = resolveOpenAiCompatibleWire(args.providerConfig) === "responses";
239
440
  const send = async (apiKey2) => {
240
441
  const request = buildOpenAiCompatibleChatCompletionRequest({
241
442
  providerConfig: apiKey2 === args.providerConfig.apiKey ? args.providerConfig : { ...args.providerConfig, apiKey: apiKey2 },
@@ -272,6 +473,24 @@ async function executeOpenAiCompatibleChatCompletion(args) {
272
473
  const contentType = res.headers.get("content-type") ?? "";
273
474
  const isEventStream = contentType.includes("text/event-stream");
274
475
  if (isEventStream) {
476
+ if (isResponses) {
477
+ const streamed2 = await readResponsesSseCompletion({
478
+ response: res,
479
+ ...args.onTextDelta ? { onTextDelta: args.onTextDelta } : {},
480
+ ...args.onReasoningDelta ? { onReasoningDelta: args.onReasoningDelta } : {}
481
+ });
482
+ return {
483
+ content: streamed2.content,
484
+ model: args.providerConfig.model,
485
+ provider: args.providerConfig.provider,
486
+ ...streamed2.tool_calls ? { tool_calls: streamed2.tool_calls } : {},
487
+ ...streamed2.reasoning_content ? { reasoning_content: streamed2.reasoning_content } : {},
488
+ ...streamed2.usage ? { usage: streamed2.usage } : {},
489
+ ...streamed2.stream_complete ? { stream_complete: true } : {},
490
+ ...streamed2.finish_reason ? { finish_reason: streamed2.finish_reason } : {},
491
+ trace: args.messages
492
+ };
493
+ }
275
494
  const streamed = await readOpenAiCompatibleSseCompletion({
276
495
  response: res,
277
496
  ...args.onTextDelta ? { onTextDelta: args.onTextDelta } : {},
@@ -296,6 +515,13 @@ async function executeOpenAiCompatibleChatCompletion(args) {
296
515
  } catch {
297
516
  data = {};
298
517
  }
518
+ if (isResponses) {
519
+ return parseOpenAiCompatibleResponsesResponse({
520
+ providerConfig: args.providerConfig,
521
+ data,
522
+ trace: args.messages
523
+ });
524
+ }
299
525
  return parseOpenAiCompatibleChatCompletionResponse({
300
526
  providerConfig: args.providerConfig,
301
527
  data,
@@ -1887,13 +2113,13 @@ function buildExecShellTool(toolName) {
1887
2113
  parameters: {
1888
2114
  type: "object",
1889
2115
  properties: {
1890
- cmd: {
2116
+ command: {
1891
2117
  type: "string",
1892
2118
  description: "Shell command to run (non-empty)."
1893
2119
  },
1894
- command: {
2120
+ cmd: {
1895
2121
  type: "string",
1896
- description: "Compatibility alias for cmd."
2122
+ description: "Compatibility alias for command."
1897
2123
  }
1898
2124
  }
1899
2125
  }
@@ -4029,6 +4255,23 @@ function createLocalWorkspaceToolExecutors(args) {
4029
4255
  };
4030
4256
  }
4031
4257
 
4258
+ // packages/cli/client/localDialogRecords.ts
4259
+ var localDialogMessageRecordToRuntimeMessage = dialogMessageRecordToAgentRuntimeMessage;
4260
+ function buildLocalDialogWritePlan(args) {
4261
+ return buildAgentRuntimeDialogWritePlan({
4262
+ input: args.input,
4263
+ userId: args.userId,
4264
+ now: args.now,
4265
+ createId: args.createId,
4266
+ existingDialog: args.existingDialog,
4267
+ runtimeHost: "cli",
4268
+ runtimeMetadata: {
4269
+ ...args.cwd ? { worktreePath: args.cwd } : {}
4270
+ },
4271
+ ...args.titleOverride ? { titleOverride: args.titleOverride } : {}
4272
+ });
4273
+ }
4274
+
4032
4275
  // packages/agent-runtime/noloWorkspaceTools.node.ts
4033
4276
  async function readNoloProcessStream(readable) {
4034
4277
  if (!readable) return "";
@@ -4065,10 +4308,67 @@ async function runNoloWorkspaceCliTool(call, args) {
4065
4308
  }
4066
4309
  };
4067
4310
  }
4311
+ async function readDialogInProcess(call, store, env) {
4312
+ const args = parseNoloWorkspaceToolArguments(call.arguments);
4313
+ const dialogInput = noloStringArg(args.dialog ?? args.dialogId ?? args.id);
4314
+ if (!dialogInput) throw new Error("readDialog requires dialog.");
4315
+ const mode = noloStringArg(args.mode);
4316
+ if (mode && mode !== "full" && mode !== "status") {
4317
+ throw new Error(`readDialog mode must be "full" or "status", got "${mode}".`);
4318
+ }
4319
+ const userId = noloStringArg(args.user ?? args.userId ?? args.owner) || env?.NOLO_LOCAL_USER_ID || env?.NOLO_USER_ID || "";
4320
+ const { dbKey: dialogKey, dialogId } = resolveNoloDialogInput(dialogInput, userId);
4321
+ const meta = await store.read(dialogKey, { remote: false });
4322
+ if (mode === "status") {
4323
+ const result2 = {
4324
+ dialogId,
4325
+ dialogKey,
4326
+ meta,
4327
+ status: meta?.status ?? null,
4328
+ runtimeCheckpoint: meta?.runtimeCheckpoint ?? null,
4329
+ source: "in-process"
4330
+ };
4331
+ return {
4332
+ content: JSON.stringify(result2, null, 2),
4333
+ metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true, mode: "status" }
4334
+ };
4335
+ }
4336
+ const limitNum = noloPositiveIntegerString(args.limit);
4337
+ const limit = limitNum ? Number(limitNum) : void 0;
4338
+ const rawMessages = [];
4339
+ if (store.iterator) {
4340
+ const { start, end } = dialogMessageRange(dialogId);
4341
+ for await (const [, value] of store.iterator({ gte: start, lte: end })) {
4342
+ const message = localDialogMessageRecordToRuntimeMessage(value);
4343
+ if (message) {
4344
+ rawMessages.push(message);
4345
+ } else if (value) {
4346
+ rawMessages.push(value);
4347
+ }
4348
+ }
4349
+ }
4350
+ const messages = limit !== void 0 && rawMessages.length > limit ? rawMessages.slice(rawMessages.length - limit) : rawMessages;
4351
+ const result = {
4352
+ dialogId,
4353
+ dialogKey,
4354
+ meta,
4355
+ messages,
4356
+ messagesCount: messages.length,
4357
+ source: "in-process"
4358
+ };
4359
+ return {
4360
+ content: JSON.stringify(result, null, 2),
4361
+ metadata: { noloWorkspaceTool: true, readDialog: true, inProcess: true }
4362
+ };
4363
+ }
4068
4364
  function buildNoloWorkspaceCliToolExecutors(args) {
4069
4365
  const executors = {};
4070
4366
  for (const toolName of NOLO_WORKSPACE_TOOL_NAMES) {
4071
4367
  if (toolName === "loadSkill") continue;
4368
+ if (toolName === "readDialog" && args.store) {
4369
+ executors[toolName] = (call) => readDialogInProcess(call, args.store, args.env);
4370
+ continue;
4371
+ }
4072
4372
  executors[toolName] = (call) => runNoloWorkspaceCliTool(call, args);
4073
4373
  }
4074
4374
  return executors;
@@ -4086,10 +4386,10 @@ function buildLoadSkillExecutor(args) {
4086
4386
  metadata: { loadSkill: true, resolved: false }
4087
4387
  };
4088
4388
  }
4089
- const { resolveSkillByName } = await import("./skillDiscovery-5U6RYAHN.js");
4389
+ const { resolveSkillByName } = await import("./skillDiscovery-KLLKXPUO.js");
4090
4390
  const resolved = resolveSkillByName(args.cwd, name);
4091
4391
  if (!resolved) {
4092
- const { resolveCodingBuiltinSlug, buildCodingSkillContentBySlug } = await import("./codingSkills-V35TRR4Y.js");
4392
+ const { resolveCodingBuiltinSlug, buildCodingSkillContentBySlug } = await import("./codingSkills-DY5MINPG.js");
4093
4393
  const builtinSlug = resolveCodingBuiltinSlug(name);
4094
4394
  if (builtinSlug) {
4095
4395
  const body = buildCodingSkillContentBySlug(builtinSlug);
@@ -4124,7 +4424,7 @@ ${body}`,
4124
4424
  };
4125
4425
  }
4126
4426
  async function formatUnknownSkillMessage(cwd, requestedName) {
4127
- const { discoverSkills } = await import("./skillDiscovery-5U6RYAHN.js");
4427
+ const { discoverSkills } = await import("./skillDiscovery-KLLKXPUO.js");
4128
4428
  let available = [];
4129
4429
  try {
4130
4430
  available = discoverSkills(cwd).map((s) => s.name);
@@ -4144,6 +4444,8 @@ export {
4144
4444
  isAgentCoolingDown,
4145
4445
  parseSseDataLineJson,
4146
4446
  parseSseDataLineObject,
4447
+ codexStreamFailureStatus,
4448
+ aggregateResponsesStream,
4147
4449
  buildOpenAiCompatibleChatCompletionRequest,
4148
4450
  parseOpenAiCompatibleChatCompletionResponse,
4149
4451
  readOpenAiCompatibleSseCompletion,
@@ -4165,6 +4467,8 @@ export {
4165
4467
  buildLocalWorkspacePolicyToolNames,
4166
4468
  buildLocalWorkspaceOpenAiTools,
4167
4469
  createLocalWorkspaceToolExecutors,
4470
+ localDialogMessageRecordToRuntimeMessage,
4471
+ buildLocalDialogWritePlan,
4168
4472
  buildNoloWorkspaceCliToolExecutors,
4169
4473
  buildLoadSkillExecutor
4170
4474
  };