nolo-cli 0.33.0-alpha.2 → 0.33.0-alpha.21

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 (118) hide show
  1. package/{_executeModel-RWPVI3YV.js → _executeModel-XKWVTZAY.js} +35 -34
  2. package/{action-SMLG6OTB.js → action-Q4KO7DDW.js} +4 -4
  3. package/{addContentAction-SFO244QN.js → addContentAction-FRXDZKSI.js} +3 -3
  4. package/{addDialogAgentAction-W44ZCEHB.js → addDialogAgentAction-XL5G3LPR.js} +2 -2
  5. package/{agentDeleteCommand-KU2RXQPP.js → agentDeleteCommand-ZU4H6F6M.js} +19 -18
  6. package/{agentEmailCommands-MPCMDENS.js → agentEmailCommands-6ULFXW4A.js} +41 -40
  7. package/{agentListCommands-EPD4N6FX.js → agentListCommands-VN7WCW7Z.js} +21 -20
  8. package/{agentMachineCommands-AF7C3YRT.js → agentMachineCommands-5PALVQBD.js} +21 -20
  9. package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
  10. package/{agentRecordCommands-EYE6MZZG.js → agentRecordCommands-XEB66KRX.js} +40 -39
  11. package/{agentRunCommand-LL22SGTN.js → agentRunCommand-OJX27NII.js} +42 -41
  12. package/{agentRuntimeLocal-JX34G47Z.js → agentRuntimeLocal-UWDOE55A.js} +20 -19
  13. package/{agentSlice-TNMFQQOV.js → agentSlice-SZRRJ3ZX.js} +5 -5
  14. package/{appDeleteCommands-43K5VXQB.js → appDeleteCommands-R63PZAY7.js} +20 -19
  15. package/{appDeployCommands-FEEJSVDZ.js → appDeployCommands-VNRT54YO.js} +20 -19
  16. package/{appDeployStatusCommands-H76CG45R.js → appDeployStatusCommands-6IPTKLEM.js} +20 -19
  17. package/{appGetCommands-MDZYFTYZ.js → appGetCommands-JPFVMVAI.js} +20 -19
  18. package/{appListCommands-TUJJXPWG.js → appListCommands-B3SLTPII.js} +20 -19
  19. package/{authCommand-T7UK4CWS.js → authCommand-EX5G5PF4.js} +12 -11
  20. package/{authCommands-EAPFGNHN.js → authCommands-VR6Q6GU2.js} +4 -4
  21. package/{chatQueueReduxAdapter-LVQXC4ZY.js → chatQueueReduxAdapter-IEX32ZVP.js} +15 -14
  22. package/{chunk-2H3XIBY4.js → chunk-2CNX3CJE.js} +4 -82
  23. package/{chunk-MPZJVZDC.js → chunk-2UDMTJOM.js} +9 -9
  24. package/{chunk-WHD6BG7M.js → chunk-37LDAHQN.js} +20 -18
  25. package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
  26. package/{chunk-HUCT7HID.js → chunk-42IF53CR.js} +1 -1
  27. package/{chunk-AAGCMVFT.js → chunk-46JSKTPF.js} +189 -38
  28. package/{chunk-3WXRAHCG.js → chunk-6MSSX7FI.js} +1 -1
  29. package/{chunk-57QJXIB6.js → chunk-6YH4UR3E.js} +3 -3
  30. package/{chunk-HDKRSRYU.js → chunk-7BNPRRDS.js} +150 -29
  31. package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
  32. package/{chunk-OR2HNLVO.js → chunk-7EPNNOL4.js} +6 -6
  33. package/{chunk-PREQU5QV.js → chunk-7OGIWPNK.js} +1 -1
  34. package/{chunk-DFUPZE6V.js → chunk-7SLMYTSF.js} +1 -1
  35. package/{chunk-3GZXL6FM.js → chunk-AOWETAXX.js} +1 -1
  36. package/{chunk-2IVEXF7P.js → chunk-BHILFABL.js} +1 -1
  37. package/{chunk-TFPUAELY.js → chunk-DDET6246.js} +1 -1
  38. package/{chunk-ZURFOV5J.js → chunk-DMT4NJXR.js} +1 -1
  39. package/{chunk-RAZOLMJR.js → chunk-EQ6HOWEJ.js} +2 -2
  40. package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
  41. package/{chunk-JZ5AMMXU.js → chunk-FH7VUJN5.js} +2 -2
  42. package/{chunk-I6N2UVVY.js → chunk-FV63ICZC.js} +1 -1
  43. package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
  44. package/{chunk-VH2F7ZB6.js → chunk-GTEHJWXU.js} +1 -1
  45. package/{chunk-AOXVOC6D.js → chunk-HCOIKLSH.js} +2 -2
  46. package/{chunk-GTYM4HKV.js → chunk-IEHZHWN7.js} +2 -2
  47. package/{chunk-2QTEYCR7.js → chunk-JFUW3UTO.js} +1 -1
  48. package/{chunk-73GINUCW.js → chunk-JL2PUYVS.js} +102 -23
  49. package/{chunk-37V5LNEQ.js → chunk-KIL7V27H.js} +1 -1
  50. package/{chunk-JTSGWTYZ.js → chunk-KMMQFY5O.js} +1 -1
  51. package/{chunk-UK5JGQVU.js → chunk-KZB5SNYH.js} +9 -14
  52. package/{chunk-XCCGU6QB.js → chunk-L5XKDBSH.js} +1 -1
  53. package/{chunk-DPMBNHOJ.js → chunk-LAZTMWIU.js} +1 -1
  54. package/{chunk-M4NC7NF6.js → chunk-LJGEEYGC.js} +2 -2
  55. package/{chunk-B2BSG6QQ.js → chunk-LLKHGZME.js} +4 -4
  56. package/{chunk-7E72JMBB.js → chunk-N2WDGMD5.js} +45 -4
  57. package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
  58. package/{chunk-AFV4FOT2.js → chunk-OQVRTSZ5.js} +4 -91
  59. package/{chunk-3VAQHAXT.js → chunk-PU47HKTF.js} +11 -11
  60. package/{chunk-CLP2K7U4.js → chunk-QKCMP3LU.js} +2 -2
  61. package/{chunk-JZPBVBIY.js → chunk-QTZD6HBK.js} +18 -8
  62. package/{chunk-LOD75GOS.js → chunk-REOW4YJX.js} +80 -1099
  63. package/{chunk-6SXC35F4.js → chunk-RO3AEN3L.js} +5 -5
  64. package/{chunk-5CS33IBL.js → chunk-RQFO3CAF.js} +8 -9
  65. package/{chunk-GMXWYXAF.js → chunk-SBPGB6TF.js} +3 -3
  66. package/{chunk-FSSX3XRY.js → chunk-U2FRXKC7.js} +1 -1
  67. package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
  68. package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
  69. package/{chunk-JMPYDFHY.js → chunk-V44VE7R4.js} +2 -2
  70. package/{chunk-IL545V3E.js → chunk-V4MT7AEN.js} +1 -1
  71. package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
  72. package/chunk-VIRTYWWE.js +97 -0
  73. package/{chunk-ZJMME4DS.js → chunk-XS543SNR.js} +5 -5
  74. package/{chunk-O6GEBMIY.js → chunk-XTSVOICC.js} +195 -47
  75. package/{chunk-6PO2SYCS.js → chunk-YH3FPBG6.js} +1569 -204
  76. package/{chunk-WLH5BAKX.js → chunk-YYTTDOWA.js} +2 -2
  77. package/{chunk-5SBK2MTI.js → chunk-ZKUATCEY.js} +20 -69
  78. package/{codingSkills-DY5MINPG.js → codingSkills-5VOV3JVB.js} +2 -2
  79. package/{createAgentAutomationAction-INQT23LX.js → createAgentAutomationAction-72NNXELT.js} +16 -15
  80. package/{createDialogAction-LDCPDI73.js → createDialogAction-3CJ2GXNO.js} +18 -17
  81. package/{createPageAction-5YXOG2M4.js → createPageAction-HZHQGQO6.js} +16 -15
  82. package/{dbSlice-3SD5L5H2.js → dbSlice-2YD2PZER.js} +2 -2
  83. package/{dialogCommands-CHJO47AX.js → dialogCommands-2BF4ZSWH.js} +18 -17
  84. package/{dialogSlice-DOWKOILN.js → dialogSlice-5R4O4377.js} +15 -14
  85. package/{docCreateCommands-OVZARUFX.js → docCreateCommands-HMZUBFGL.js} +19 -18
  86. package/{docDeleteCommands-E2XJ62LD.js → docDeleteCommands-DFR7GCOR.js} +19 -18
  87. package/{docReadCommands-I7OSREPJ.js → docReadCommands-YM7RDUAZ.js} +19 -18
  88. package/{docStore-UAWSKZ2Y.js → docStore-A4SRW2DJ.js} +17 -16
  89. package/{docUpdateCommands-X4Z26VJM.js → docUpdateCommands-TTQBD7IU.js} +19 -18
  90. package/{getPricing-L2ENXWHV.js → getPricing-J4VXWR5B.js} +3 -3
  91. package/{handleSendMessageAction-C3TSDWKH.js → handleSendMessageAction-CIFBZCI2.js} +15 -14
  92. package/index.js +70 -70
  93. package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
  94. package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
  95. package/{machineCommands-BUOIYJAD.js → machineCommands-QSW4JKR2.js} +40 -39
  96. package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
  97. package/{machineWsRunDispatch-7CRWAA6O.js → machineWsRunDispatch-X3ZC7DZJ.js} +39 -38
  98. package/{models-OX2S5C6Q.js → models-SQFOI4FI.js} +2 -2
  99. package/package.json +1 -1
  100. package/{read-6G73BMEY.js → read-526GJR3R.js} +1 -1
  101. package/{readDocTool-DK4EI2GA.js → readDocTool-JNEZUOSM.js} +1 -1
  102. package/{readlineWorkspace-ZDWEASJV.js → readlineWorkspace-J2ARMEUC.js} +2701 -2083
  103. package/{removeDialogAgentAction-E7H557UO.js → removeDialogAgentAction-NPMEFEJW.js} +4 -4
  104. package/{runAgentClientLoop-U7HYA3O5.js → runAgentClientLoop-5I2R74NR.js} +31 -30
  105. package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-KHGQKT3B.js} +3 -3
  106. package/{setDialogExtraReferencesAction-RMMGBR5F.js → setDialogExtraReferencesAction-ZZ6QWAG2.js} +3 -3
  107. package/{setPrimaryDialogAgentAction-FWBKKLVA.js → setPrimaryDialogAgentAction-BG72QA6S.js} +4 -4
  108. package/{settingSlice-73PV4KG4.js → settingSlice-JCCLCXZB.js} +3 -3
  109. package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-AYBKAG6X.js} +3 -3
  110. package/{spaceCommands-GEWZXGHM.js → spaceCommands-EZYMMJJH.js} +18 -17
  111. package/{spaceSlice-B6MOVY4N.js → spaceSlice-TL2FR4AF.js} +16 -15
  112. package/{streamAgentChatTurn-T527EQTT.js → streamAgentChatTurn-UDYSE2ES.js} +45 -54
  113. package/{switchDialogAgentAction-US6QNL3N.js → switchDialogAgentAction-YPGPM2LL.js} +2 -2
  114. package/{tableCommands-QE47K72R.js → tableCommands-64FZBAI3.js} +1 -1
  115. package/{tools-XMWCVMPM.js → tools-KWYWDJ77.js} +25 -24
  116. package/{tuiSummaryLlmCaller-NCAJSVSD.js → tuiSummaryLlmCaller-WUVAOIYU.js} +9 -8
  117. package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
  118. package/{updateDialogTitleAction-XPJZRJEL.js → updateDialogTitleAction-NQCOEOLF.js} +16 -15
@@ -4,7 +4,7 @@ import {
4
4
  refreshAntigravityOAuthToken,
5
5
  refreshOpenAiCodexToken,
6
6
  xaiRefresh
7
- } from "./chunk-GTYM4HKV.js";
7
+ } from "./chunk-IEHZHWN7.js";
8
8
  import {
9
9
  buildLocalAgentLookupKeys
10
10
  } from "./chunk-X2DAEZ3X.js";
@@ -16,11 +16,11 @@ import {
16
16
  } from "./chunk-EKLRRZIN.js";
17
17
  import {
18
18
  inferCaptureIntent
19
- } from "./chunk-PREQU5QV.js";
19
+ } from "./chunk-7OGIWPNK.js";
20
20
  import {
21
21
  inlineImageUrlsForCustomProvider,
22
22
  prepareTools
23
- } from "./chunk-M4NC7NF6.js";
23
+ } from "./chunk-LJGEEYGC.js";
24
24
  import {
25
25
  getServerProviderSecret
26
26
  } from "./chunk-HS7MLR74.js";
@@ -29,8 +29,9 @@ import {
29
29
  isAntigravityOAuthAgent,
30
30
  readAntigravityProjectId,
31
31
  resolveAntigravityCloudCodeBaseUrl
32
- } from "./chunk-DPMBNHOJ.js";
32
+ } from "./chunk-LAZTMWIU.js";
33
33
  import {
34
+ deleteMemoryFunctionSchema,
34
35
  readXPostFunc,
35
36
  readXPostFunctionSchema,
36
37
  readXhsProfileFunc,
@@ -38,7 +39,7 @@ import {
38
39
  rememberMemoryFunctionSchema,
39
40
  resolveAgentRequiredPackIds,
40
41
  setTodoListFunc
41
- } from "./chunk-HDKRSRYU.js";
42
+ } from "./chunk-7BNPRRDS.js";
42
43
  import {
43
44
  createDrainExhaustedResponse,
44
45
  isCoreDrainingBody,
@@ -47,18 +48,20 @@ import {
47
48
  } from "./chunk-RQSOAMPJ.js";
48
49
  import {
49
50
  getDefaultCliLocalRuntimeDb
50
- } from "./chunk-Q5ITEGIN.js";
51
+ } from "./chunk-N4XRDM26.js";
51
52
  import {
53
+ applyBuiltinAgentRuntimeOverride,
52
54
  applyTokenUsageToDayStats,
53
55
  prepareTokenUsageData,
56
+ resolveBuiltinPlatformAgentConfig,
54
57
  runKeyed
55
- } from "./chunk-73GINUCW.js";
58
+ } from "./chunk-JL2PUYVS.js";
56
59
  import {
57
60
  BUILTIN_TITLE_LLM_CONFIG
58
61
  } from "./chunk-RCFIB45Q.js";
59
62
  import {
60
63
  fetchServerSyncedCredential
61
- } from "./chunk-ZJMME4DS.js";
64
+ } from "./chunk-XS543SNR.js";
62
65
  import {
63
66
  require_date_fns
64
67
  } from "./chunk-M76ECQRD.js";
@@ -83,7 +86,7 @@ import {
83
86
  parseSyncServersEnv,
84
87
  resolveAgentNextAvailableAt,
85
88
  resolveOpenAiCompatibleProviderConfig
86
- } from "./chunk-LOD75GOS.js";
89
+ } from "./chunk-REOW4YJX.js";
87
90
  import {
88
91
  buildPlatformChatCompletionRequest,
89
92
  canUsePlatformChatProvider,
@@ -95,21 +98,21 @@ import {
95
98
  resolvePlatformChatProviderConfig,
96
99
  shouldUsePlatformChatProvider,
97
100
  streamSseDataValues
98
- } from "./chunk-RAZOLMJR.js";
101
+ } from "./chunk-EQ6HOWEJ.js";
99
102
  import {
100
103
  resolveAgentRuntimeConfigFromRecord
101
104
  } from "./chunk-OIQPORYI.js";
102
105
  import {
103
106
  resolveHistoricalToolContentCap,
104
107
  summarizeToolArguments
105
- } from "./chunk-6PO2SYCS.js";
108
+ } from "./chunk-YH3FPBG6.js";
106
109
  import {
107
110
  convertMessagesToResponsesInput,
108
111
  toResponsesTools
109
112
  } from "./chunk-NNWHHCVP.js";
110
113
  import {
111
114
  resolvePlatformAuthToken
112
- } from "./chunk-AFV4FOT2.js";
115
+ } from "./chunk-OQVRTSZ5.js";
113
116
  import {
114
117
  buildNoloWorkspaceOpenAiTools,
115
118
  parseNoloWorkspaceToolArguments,
@@ -119,28 +122,24 @@ import {
119
122
  buildDialogFallbackTitleFromUserInput,
120
123
  normalizeDialogTitle
121
124
  } from "./chunk-2MBTWINN.js";
122
- import {
123
- applyBuiltinAgentRuntimeOverride,
124
- resolveBuiltinPlatformAgentConfig
125
- } from "./chunk-2H3XIBY4.js";
126
125
  import {
127
126
  clipCompactText
128
- } from "./chunk-AOXVOC6D.js";
127
+ } from "./chunk-HCOIKLSH.js";
129
128
  import {
130
129
  isAdaptiveThinkingModelId
131
- } from "./chunk-DFUPZE6V.js";
130
+ } from "./chunk-7SLMYTSF.js";
132
131
  import {
133
132
  createFileCredentialBroker,
134
133
  resolveCurrentRunRuntimeToolPolicy,
135
134
  resolveLocalWorkspaceExecutorOptionsFromPolicy,
136
135
  resolveRequestedRuntimeToolNames
137
- } from "./chunk-5CS33IBL.js";
136
+ } from "./chunk-RQFO3CAF.js";
138
137
  import {
139
138
  createOAuthTokenStore,
140
139
  isTokenExpired,
141
140
  readOAuthCredential,
142
141
  resolveFreshAccessToken
143
- } from "./chunk-JZPBVBIY.js";
142
+ } from "./chunk-QTZD6HBK.js";
144
143
  import {
145
144
  FORCED_TOOLS,
146
145
  addDefaultLightWebToolsForConfiguredAgents,
@@ -150,7 +149,7 @@ import {
150
149
  applySystemBuiltinSkillFilter,
151
150
  expandEnabledPacks,
152
151
  resolveEffectiveEnabledPacks
153
- } from "./chunk-WLH5BAKX.js";
152
+ } from "./chunk-YYTTDOWA.js";
154
153
  import {
155
154
  canonicalizeToolNames
156
155
  } from "./chunk-ZZ2MH7LE.js";
@@ -213,7 +212,7 @@ import {
213
212
  } from "./chunk-QSJ3HFEF.js";
214
213
  import {
215
214
  isSystemBuiltinTrustedAgentKey
216
- } from "./chunk-UK5JGQVU.js";
215
+ } from "./chunk-KZB5SNYH.js";
217
216
  import {
218
217
  isRecord
219
218
  } from "./chunk-KUG52IAP.js";
@@ -718,6 +717,7 @@ var STRINGS = {
718
717
  " /copy view Open native scrollback for partial selection (Ctrl+O)",
719
718
  " /mouse <on|off> Toggle mouse mode (off = drag to select text)",
720
719
  " /altscreen <on|off> Toggle the terminal alternate screen (default on; off shares shell scrollback)",
720
+ " Shift+drag Select text natively even while mouse mode is on (terminal bypass)",
721
721
  " /doc List attached docs",
722
722
  " /doc attach <doc> Attach a doc to this workspace",
723
723
  " /skill List attached skills",
@@ -754,6 +754,7 @@ var STRINGS = {
754
754
  " /copy view \u6253\u5F00\u539F\u751F\u56DE\u6EDA\u8FDB\u884C\u8DE8\u5C4F\u62D6\u9009\uFF08Ctrl+O\uFF09",
755
755
  " /mouse <on|off> \u5207\u6362\u9F20\u6807\u6A21\u5F0F\uFF08off \u540E\u53EF\u76F4\u63A5\u62D6\u9009\u6587\u672C\uFF09",
756
756
  " /altscreen <on|off> \u5207\u6362\u7EC8\u7AEF\u5907\u7528\u5C4F\uFF08\u9ED8\u8BA4 on\uFF1Boff \u6539\u4E3A\u4E0E shell \u5171\u7528\u56DE\u6EDA\uFF09",
757
+ " Shift+\u62D6\u62FD \u9F20\u6807\u6A21\u5F0F\u5F00\u542F\u65F6\u4E5F\u53EF\u539F\u751F\u9009\u4E2D\u6587\u672C\uFF08\u7EC8\u7AEF\u7ED5\u8FC7\u4FEE\u9970\u952E\uFF09",
757
758
  " /doc \u5217\u51FA\u5DF2\u6302\u8F7D\u7684\u6587\u6863",
758
759
  " /doc attach <doc> \u6302\u8F7D\u6587\u6863\u5230\u5F53\u524D\u5DE5\u4F5C\u533A",
759
760
  " /skill \u5217\u51FA\u5DF2\u6302\u8F7D\u7684\u6280\u80FD",
@@ -821,6 +822,18 @@ var STRINGS = {
821
822
  zh: "\u2713 \u5DF2\u5206\u53C9\u5BF9\u8BDD {0} \u2192 {1}\uFF0C\u8017\u65F6 {2}\uFF08\u65E0\u9700\u538B\u7F29\uFF09\u3002"
822
823
  },
823
824
  agentCurrent: { en: "Current agent: {0} ({1})", zh: "\u5F53\u524D agent\uFF1A{0}\uFF08{1}\uFF09" },
825
+ agentPinnedUnaudited: {
826
+ en: "No audit record for it \u2014 an older build wrote it; see agent-selection.log.",
827
+ zh: "\u8FD9\u6761\u8BB0\u5F55\u6CA1\u6709\u5BA1\u8BA1\u8BB0\u5F55\uFF0C\u662F\u65E7\u7248\u672C\u5199\u7684\uFF1B\u8BE6\u89C1 agent-selection.log\u3002"
828
+ },
829
+ agentPinnedAuditRotated: {
830
+ en: "The audit log has no entry for it \u2014 it aged out, or another session wrote it.",
831
+ zh: "\u5BA1\u8BA1\u65E5\u5FD7\u91CC\u6CA1\u6709\u5B83\u7684\u8BB0\u5F55\u2014\u2014\u53EF\u80FD\u5DF2\u88AB\u8F6E\u8F6C\uFF0C\u6216\u662F\u522B\u7684\u4F1A\u8BDD\u5199\u7684\u3002"
832
+ },
833
+ agentPinnedFromProfile: {
834
+ en: 'Agent "{0}" restored from {1} (saved selection). /switch nolo to go back to the default.',
835
+ zh: "agent\u201C{0}\u201D\u6765\u81EA {1} \u91CC\u4FDD\u5B58\u7684\u9009\u62E9\u3002/switch nolo \u53EF\u5207\u56DE\u9ED8\u8BA4\u6863\u3002"
836
+ },
824
837
  agentUnknown: {
825
838
  en: `I don't know agent "{0}" yet.
826
839
  Use /switch, /switch list, /switch minimax-m3, or a full agent key.`,
@@ -1094,19 +1107,6 @@ function summarizeEndpoint(value) {
1094
1107
  }
1095
1108
  }
1096
1109
 
1097
- // packages/cli/client/localRuntimeHelpers.ts
1098
- var REMOTE_DIALOG_SYNC_TIMEOUT_MS = 1e4;
1099
- var remoteDialogSyncTimeoutMsForTest;
1100
- function remoteDialogSyncTimeout() {
1101
- return remoteDialogSyncTimeoutMsForTest ?? REMOTE_DIALOG_SYNC_TIMEOUT_MS;
1102
- }
1103
- function resolveRuntimeServerUrl(env) {
1104
- return (env?.NOLO_SERVER_URL || env?.NOLO_SERVER || env?.BASE_URL || "").replace(/\/+$/, "");
1105
- }
1106
- function resolveRuntimeAuthToken(env) {
1107
- return resolvePlatformAuthToken(env ?? {});
1108
- }
1109
-
1110
1110
  // packages/cli/client/localRuntimeFetchRetry.ts
1111
1111
  import { request as httpRequest } from "node:http";
1112
1112
  import { request as httpsRequest } from "node:https";
@@ -1262,6 +1262,65 @@ async function fetchWithTransientRetry(fetchImpl, input, init, options = {}) {
1262
1262
  throw lastError;
1263
1263
  }
1264
1264
 
1265
+ // packages/cli/client/providerStreamRetry.ts
1266
+ var PROVIDER_STREAM_RETRY_MAX_ATTEMPTS = 2;
1267
+ var STREAM_RETRY_MARKER = "\n\n[nolo] \u4E0A\u6E38\u6D41\u4E2D\u65AD\uFF0C\u81EA\u52A8\u91CD\u8BD5\uFF08\u4EE5\u4E0B\u4E3A\u8BE5\u8F6E\u91CD\u65B0\u751F\u6210\u7684\u5185\u5BB9\uFF09\n\n";
1268
+ var UPSTREAM_STREAM_INTERRUPTED_RE = /UPSTREAM_STREAM_INTERRUPTED/i;
1269
+ function isRetryableProviderStreamError(error) {
1270
+ const message = toErrorMessage(error);
1271
+ return UPSTREAM_STREAM_INTERRUPTED_RE.test(message) || isTransientFetchError(message);
1272
+ }
1273
+ function withProviderStreamRetry(provider, deps) {
1274
+ return {
1275
+ model: provider.model,
1276
+ complete: async (messages, options) => {
1277
+ let streamedChars = 0;
1278
+ let sawToolEvent = false;
1279
+ for (let attempt = 1; ; attempt += 1) {
1280
+ try {
1281
+ return await provider.complete(messages, {
1282
+ ...options,
1283
+ ...options?.onTextDelta ? {
1284
+ onTextDelta: (chunk) => {
1285
+ streamedChars += chunk.length;
1286
+ options.onTextDelta(chunk);
1287
+ }
1288
+ } : {},
1289
+ ...options?.onToolEvent ? {
1290
+ onToolEvent: (event) => {
1291
+ sawToolEvent = true;
1292
+ options.onToolEvent(event);
1293
+ }
1294
+ } : {}
1295
+ });
1296
+ } catch (error) {
1297
+ if (options?.signal?.aborted) throw error;
1298
+ if (attempt >= PROVIDER_STREAM_RETRY_MAX_ATTEMPTS) throw error;
1299
+ if (!isRetryableProviderStreamError(error)) throw error;
1300
+ if (sawToolEvent) throw error;
1301
+ if (streamedChars > 0 && options?.onTextDelta) {
1302
+ options.onTextDelta(STREAM_RETRY_MARKER);
1303
+ }
1304
+ deps.activityReporter?.("\u4E0A\u6E38\u6D41\u4E2D\u65AD \xB7 \u81EA\u52A8\u91CD\u8BD5");
1305
+ }
1306
+ }
1307
+ }
1308
+ };
1309
+ }
1310
+
1311
+ // packages/cli/client/localRuntimeHelpers.ts
1312
+ var REMOTE_DIALOG_SYNC_TIMEOUT_MS = 1e4;
1313
+ var remoteDialogSyncTimeoutMsForTest;
1314
+ function remoteDialogSyncTimeout() {
1315
+ return remoteDialogSyncTimeoutMsForTest ?? REMOTE_DIALOG_SYNC_TIMEOUT_MS;
1316
+ }
1317
+ function resolveRuntimeServerUrl(env) {
1318
+ return (env?.NOLO_SERVER_URL || env?.NOLO_SERVER || env?.BASE_URL || "").replace(/\/+$/, "");
1319
+ }
1320
+ function resolveRuntimeAuthToken(env) {
1321
+ return resolvePlatformAuthToken(env ?? {});
1322
+ }
1323
+
1265
1324
  // packages/cli/client/cliRemoteDialogSync.ts
1266
1325
  function prepareRemoteDialogEvidenceRecord(key, value) {
1267
1326
  const record = isRecord(value) ? { ...value } : {};
@@ -1744,7 +1803,8 @@ var LOCAL_SERVER_WEB_TOOL_NAME_SET = new Set(
1744
1803
  );
1745
1804
  var LOCAL_SERVER_MEMORY_TOOL_NAMES = [
1746
1805
  "queryMemory",
1747
- "rememberMemory"
1806
+ "rememberMemory",
1807
+ "deleteMemory"
1748
1808
  ];
1749
1809
  var LOCAL_SERVER_MEMORY_TOOL_NAME_SET = new Set(
1750
1810
  LOCAL_SERVER_MEMORY_TOOL_NAMES
@@ -2022,7 +2082,51 @@ function buildServerPlatformToolExecutors(args) {
2022
2082
  metadata: { serverPlatformTool: true, memoryWrite: true }
2023
2083
  };
2024
2084
  };
2025
- return { ...tableExecutors, ...webExecutors, queryMemory, rememberMemory };
2085
+ const deleteMemory = async (call) => {
2086
+ const parsed = parseNoloWorkspaceToolArguments(call.arguments);
2087
+ const reason = typeof parsed.reason === "string" ? parsed.reason.trim() : "";
2088
+ if (!reason && !parsed.ids && !parsed.contentKeyword && !parsed.query) {
2089
+ return {
2090
+ content: JSON.stringify({
2091
+ error: "deleteMemory \u9700\u8981\u7528\u6237\u660E\u786E\u7684\u5220\u9664\u539F\u56E0\u6216\u8FC7\u6EE4\u6761\u4EF6\u3002"
2092
+ }),
2093
+ metadata: { serverPlatformTool: true, memoryDelete: false }
2094
+ };
2095
+ }
2096
+ const isConfirmed = parsed.confirmed === true;
2097
+ if (isConfirmed && !parsed.deletionToken?.trim()) {
2098
+ return {
2099
+ content: JSON.stringify({
2100
+ error: "deleteMemory \u5728\u786E\u8BA4\u5220\u9664\u9636\u6BB5\uFF08confirmed: true\uFF09\u5FC5\u987B\u63D0\u4F9B\u9884\u68C0\u9636\u6BB5\u83B7\u53D6\u7684 deletionToken\u3002\u8BF7\u5148\u8C03\u7528\u672C\u5DE5\u5177\u8FDB\u884C\u9884\u68C0\u9884\u89C8\u3002"
2101
+ }),
2102
+ metadata: { serverPlatformTool: true, memoryDelete: false }
2103
+ };
2104
+ }
2105
+ const body = {
2106
+ ids: parsed.ids,
2107
+ contentSubstring: parsed.contentKeyword ?? parsed.query,
2108
+ kinds: parsed.kinds,
2109
+ tags: parsed.tags,
2110
+ dryRun: !isConfirmed,
2111
+ deletionToken: parsed.deletionToken,
2112
+ reason
2113
+ };
2114
+ if (args.agentKey) body.agentKey = args.agentKey;
2115
+ const raw = await postServer("/api/memory/delete", body, {
2116
+ retryTransient: true
2117
+ });
2118
+ return {
2119
+ content: raw,
2120
+ metadata: { serverPlatformTool: true, memoryDelete: true }
2121
+ };
2122
+ };
2123
+ return {
2124
+ ...tableExecutors,
2125
+ ...webExecutors,
2126
+ queryMemory,
2127
+ rememberMemory,
2128
+ deleteMemory
2129
+ };
2026
2130
  }
2027
2131
 
2028
2132
  // packages/cli/client/cliAgentRunToolExecutors.ts
@@ -2261,6 +2365,8 @@ var nodeFs = {
2261
2365
  function resolveNoloHome(env, homedir) {
2262
2366
  const custom = env?.NOLO_HOME;
2263
2367
  if (custom && custom.trim()) return custom.trim();
2368
+ const ambient = process.env.NOLO_HOME?.trim();
2369
+ if (ambient) return ambient;
2264
2370
  return join(homedir(), ".nolo");
2265
2371
  }
2266
2372
  function ensureDir(dir, fs) {
@@ -10369,6 +10475,12 @@ function buildServerPlatformOpenAiTools(args) {
10369
10475
  function: rememberMemoryFunctionSchema
10370
10476
  }
10371
10477
  ] : [],
10478
+ ...toolNameSet.has("deleteMemory") ? [
10479
+ {
10480
+ type: "function",
10481
+ function: deleteMemoryFunctionSchema
10482
+ }
10483
+ ] : [],
10372
10484
  ...toolNameSet.has("read_xhs_profile") ? [
10373
10485
  {
10374
10486
  type: "function",
@@ -10927,7 +11039,7 @@ function createCliLocalRuntimeAdapter(deps) {
10927
11039
  ...deps.pastedTextStore ? { pastedTextStore: deps.pastedTextStore } : {},
10928
11040
  ...runtimeToolExecutionLimits
10929
11041
  });
10930
- return {
11042
+ const adapterBase = {
10931
11043
  host: "cli",
10932
11044
  capabilities: [
10933
11045
  "leveldb-agent-config",
@@ -11042,7 +11154,7 @@ function createCliLocalRuntimeAdapter(deps) {
11042
11154
  loopbackRequest
11043
11155
  })
11044
11156
  }),
11045
- resolveProvider: async (agentConfig) => {
11157
+ resolveProviderBase: async (agentConfig) => {
11046
11158
  if (isAgentCoolingDown(agentConfig, now())) {
11047
11159
  throw new Error(
11048
11160
  `agent temporarily unavailable until ${new Date(Number(agentConfig.nextAvailableAt)).toISOString()}`
@@ -11131,12 +11243,16 @@ function createCliLocalRuntimeAdapter(deps) {
11131
11243
  }
11132
11244
  } : void 0;
11133
11245
  if (isAntigravityOAuthAgent(agentConfig)) {
11134
- const accessToken = await apiKeyRefResolver("antigravity");
11135
- if (!accessToken) {
11136
- throw new Error(
11137
- 'OAuth credential for "antigravity" not found locally. Run `nolo auth antigravity`.'
11138
- );
11139
- }
11246
+ const resolveAccessToken = async () => {
11247
+ const accessToken = await apiKeyRefResolver("antigravity");
11248
+ if (!accessToken) {
11249
+ throw new Error(
11250
+ 'OAuth credential for "antigravity" not found locally. Run `nolo auth antigravity`.'
11251
+ );
11252
+ }
11253
+ return accessToken;
11254
+ };
11255
+ await resolveAccessToken();
11140
11256
  const credential = readOAuthCredential("antigravity");
11141
11257
  const { requestedToolNames: requestedToolNames2, tools: tools2 } = resolveProviderOpenAiToolBundle(
11142
11258
  agentConfig,
@@ -11172,9 +11288,10 @@ function createCliLocalRuntimeAdapter(deps) {
11172
11288
  requestedToolNames: requestedToolNames2,
11173
11289
  openAiToolNames: summarizeOpenAiToolNames(tools2)
11174
11290
  });
11175
- const result = await fetchAntigravityCloudCodeCompletion({
11291
+ const accessToken = await resolveAccessToken();
11292
+ const sendCcaRequest = (token) => fetchAntigravityCloudCodeCompletion({
11176
11293
  agentConfig,
11177
- accessToken,
11294
+ accessToken: token,
11178
11295
  metadata: credential?.metadata ?? null,
11179
11296
  openAiBody,
11180
11297
  signal: options?.signal,
@@ -11185,6 +11302,27 @@ function createCliLocalRuntimeAdapter(deps) {
11185
11302
  loopbackRequest
11186
11303
  })
11187
11304
  });
11305
+ let result = await sendCcaRequest(accessToken);
11306
+ if (result.status === 401) {
11307
+ try {
11308
+ const refreshed = await apiKeyRefResolver("antigravity", {
11309
+ force: true
11310
+ });
11311
+ if (refreshed && refreshed !== accessToken) {
11312
+ logLocalRuntimeDiagnostic("provider.request.auth_retry", {
11313
+ agentKey: agentConfig.key,
11314
+ transport: "antigravity-cloud-code"
11315
+ });
11316
+ result = await sendCcaRequest(refreshed);
11317
+ }
11318
+ } catch (error) {
11319
+ logLocalRuntimeDiagnostic("provider.request.auth_retry_failed", {
11320
+ agentKey: agentConfig.key,
11321
+ transport: "antigravity-cloud-code",
11322
+ error: toErrorMessage(error)
11323
+ });
11324
+ }
11325
+ }
11188
11326
  await recordLocalAvailability(result.status, result.body);
11189
11327
  if (result.status < 200 || result.status >= 300) {
11190
11328
  const errMsg = result.body && typeof result.body === "object" && result.body.error && typeof result.body.error.message === "string" ? result.body.error.message : JSON.stringify(result.body);
@@ -11797,10 +11935,20 @@ function createCliLocalRuntimeAdapter(deps) {
11797
11935
  };
11798
11936
  }
11799
11937
  };
11938
+ return {
11939
+ ...adapterBase,
11940
+ resolveProvider: async (agentConfig) => withProviderStreamRetry(
11941
+ await adapterBase.resolveProviderBase(
11942
+ agentConfig
11943
+ ),
11944
+ deps
11945
+ )
11946
+ };
11800
11947
  }
11801
11948
 
11802
11949
  export {
11803
11950
  summarizeEndpoint,
11951
+ isTransientFetchError,
11804
11952
  isBuiltinNoloAgentRef,
11805
11953
  readTimestamp,
11806
11954
  parseAgentRunEvent,