nolo-cli 0.54.0-alpha.2 → 0.61.0-alpha.2

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 (172) hide show
  1. package/README.md +3 -3
  2. package/{_executeModel-ANY4SIAS.js → _executeModel-CKT6RGTL.js} +58 -49
  3. package/{action-Q4W5JPI5.js → action-76JX3JX3.js} +9 -8
  4. package/{addContentAction-O25HFR37.js → addContentAction-V3NAZRTJ.js} +9 -7
  5. package/{addDialogAgentAction-GH7AUPPB.js → addDialogAgentAction-RZOAF46K.js} +11 -9
  6. package/{agentDeleteCommand-JWIKNWWI.js → agentDeleteCommand-VN7NPXQ4.js} +37 -32
  7. package/{agentEmailCommands-PL22BEU5.js → agentEmailCommands-F2TNAV4A.js} +73 -65
  8. package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-R3VQEZJR.js} +1 -1
  9. package/{agentListCommands-6NR7AQEK.js → agentListCommands-OSM2ANI3.js} +78 -39
  10. package/{agentMachineCommands-TASPU6OA.js → agentMachineCommands-MTPWYVRV.js} +38 -33
  11. package/{agentPullCommand-M552CYSI.js → agentPullCommand-N7L2CT7L.js} +2 -2
  12. package/agentRecordCommands-VWAWTVVC.js +122 -0
  13. package/agentRunCommand-PLZOBNVK.js +149 -0
  14. package/{agentRunControl-4GHHSXFZ.js → agentRunControl-WECMOO6O.js} +13 -6
  15. package/{agentRuntimeLocal-PCJJ56J2.js → agentRuntimeLocal-XCJLRWQE.js} +35 -28
  16. package/{agentSlice-KYLDUSNN.js → agentSlice-F6DOP4IW.js} +10 -9
  17. package/{appDeleteCommands-WLHMJAVT.js → appDeleteCommands-3BCFTRFJ.js} +37 -32
  18. package/{appDeployCommands-CKON7N2E.js → appDeployCommands-B4GMHCYA.js} +37 -32
  19. package/{appDeployStatusCommands-PXRLDASH.js → appDeployStatusCommands-4MN36WIG.js} +37 -32
  20. package/{appGetCommands-RAB5RM4M.js → appGetCommands-4GJIEUAX.js} +37 -32
  21. package/{appListCommands-GU57FB62.js → appListCommands-CHU53GSX.js} +37 -32
  22. package/{authCommand-QOPOEYEK.js → authCommand-WOTWLJNF.js} +38 -32
  23. package/{authCommands-SBQVTD6V.js → authCommands-ILTBI6JV.js} +8 -6
  24. package/{chatQueueReduxAdapter-5O2WLITN.js → chatQueueReduxAdapter-HNSQXNIR.js} +29 -24
  25. package/{chunk-WL3UOGYO.js → chunk-22BTGNSP.js} +151 -155
  26. package/{chunk-7CH6U3FL.js → chunk-2GRGFCF6.js} +2 -4
  27. package/{chunk-V4KZGLOI.js → chunk-2HPRMEEZ.js} +3059 -1079
  28. package/{chunk-UNZDCI3O.js → chunk-2KDR4CWE.js} +35 -4
  29. package/{chunk-VRZIH5JO.js → chunk-2PGGC63K.js} +1 -1
  30. package/{chunk-T27IEBNQ.js → chunk-2QDDKFG5.js} +74 -1
  31. package/{chunk-7K5VMB4Q.js → chunk-37QVS7BU.js} +21 -8
  32. package/{chunk-UITMHBVK.js → chunk-37XDGCY7.js} +1 -1
  33. package/chunk-3BLB7QKO.js +433 -0
  34. package/{chunk-NQ4N4IGO.js → chunk-3JQ2NRYU.js} +33 -10
  35. package/{chunk-UW4INMD2.js → chunk-3JWKQDA4.js} +2 -2
  36. package/{chunk-IKTHA3JH.js → chunk-3QGUVVX5.js} +2 -2
  37. package/{chunk-WHVQA7PJ.js → chunk-45YO6H7P.js} +97 -35
  38. package/chunk-4C4ST2YE.js +20015 -0
  39. package/{chunk-32I5RVMY.js → chunk-4NJEIGBQ.js} +5 -5
  40. package/{chunk-KUUTWU4I.js → chunk-5ZYA4JJ3.js} +90 -22
  41. package/chunk-6YTOJY35.js +352 -0
  42. package/{chunk-INXBNYCG.js → chunk-7A3RRUCQ.js} +155 -12
  43. package/{chunk-GV35EHNA.js → chunk-7O7KH4X5.js} +1262 -971
  44. package/{chunk-Y7LNKP32.js → chunk-7UF7CQ6B.js} +4 -6
  45. package/{chunk-2BWU4ORW.js → chunk-AQMVUA7N.js} +2 -1
  46. package/{chunk-LA4IDAK7.js → chunk-AVE2YR4F.js} +1056 -3591
  47. package/{chunk-TI5BCZCH.js → chunk-B7DXRX7F.js} +59 -121
  48. package/chunk-BFU6C242.js +66 -0
  49. package/{chunk-FA4SY4F5.js → chunk-BYEJ7K2Z.js} +1 -1
  50. package/chunk-BYXBJQAS.js +0 -0
  51. package/{chunk-IA3A5373.js → chunk-C3FZR5EC.js} +1 -1
  52. package/{chunk-IWUMSAQF.js → chunk-CJCJF5XB.js} +26 -3
  53. package/{chunk-PAHILFNT.js → chunk-CP7VIDZ7.js} +4 -4
  54. package/{chunk-OYNDYVSE.js → chunk-CTCW7U7N.js} +1 -1
  55. package/{chunk-BJLYCOZK.js → chunk-D5XKNNUV.js} +135 -795
  56. package/{chunk-AV6KQCM5.js → chunk-DNNSCSA2.js} +19 -14
  57. package/{chunk-3AOLVADY.js → chunk-DVINR3PL.js} +1 -1
  58. package/{chunk-NI2BS6UD.js → chunk-DWUCB2A3.js} +1 -1
  59. package/{chunk-AA564GBL.js → chunk-DZZL7UBV.js} +1 -1
  60. package/{chunk-6FGXGFAH.js → chunk-E6RGHPDR.js} +6 -4
  61. package/chunk-EDKF7RX4.js +30 -0
  62. package/{chunk-6SZ52ORL.js → chunk-ES6CVKVD.js} +24 -30
  63. package/{chunk-DQLYEGP7.js → chunk-FHAGENAS.js} +3 -4
  64. package/{chunk-56W233KG.js → chunk-FKFMIBTT.js} +5 -1
  65. package/{chunk-INZZJSQF.js → chunk-FZGV4FGK.js} +24 -12
  66. package/{chunk-D3JQPONH.js → chunk-GAL47RNP.js} +1 -1
  67. package/{chunk-6FQ2552G.js → chunk-HBPV76EK.js} +1085 -1150
  68. package/{chunk-LN3OQJGG.js → chunk-HLU5Q2GV.js} +4 -4
  69. package/{chunk-U2A47SVI.js → chunk-HQP7HJDL.js} +7 -7
  70. package/{chunk-H2G6JXTR.js → chunk-HQUORJTM.js} +1 -1
  71. package/{chunk-3Z3DXZBD.js → chunk-IYCUMIYS.js} +24 -20
  72. package/{chunk-7APQB6R6.js → chunk-JX5PJCWS.js} +8 -6
  73. package/{chunk-LYGNQHUW.js → chunk-JYYZCK2Z.js} +2 -4
  74. package/{chunk-PYKV6FSC.js → chunk-KWSQR2KK.js} +16 -31
  75. package/{chunk-VULELK4T.js → chunk-L7B47JXR.js} +37 -64
  76. package/{chunk-4NN3EK7H.js → chunk-LAFC3B2I.js} +1 -1
  77. package/{chunk-VRJUIUIY.js → chunk-LJKICKVC.js} +2 -2
  78. package/chunk-M3JEW6N6.js +193 -0
  79. package/chunk-MBOEV4L2.js +301 -0
  80. package/{chunk-QDHZCAH3.js → chunk-MMZ6ZTVO.js} +229 -74
  81. package/{chunk-JDSUTNYY.js → chunk-MP64VFGD.js} +2 -2
  82. package/{chunk-U5Z7LFZF.js → chunk-MXUDQZXQ.js} +47 -8
  83. package/chunk-N4G4PKQ6.js +23 -0
  84. package/{chunk-SVEUG45B.js → chunk-NHRQCXIQ.js} +0 -24
  85. package/{chunk-KXKQO4Q6.js → chunk-NTW5GWDM.js} +58 -1
  86. package/chunk-ONXOABJR.js +215 -0
  87. package/{chunk-BANYWEYY.js → chunk-OZX2IPKM.js} +8 -3
  88. package/{chunk-Q24S4NDF.js → chunk-P7OOB7QP.js} +1 -1
  89. package/{chunk-GLGD2JGY.js → chunk-PEZJEQAO.js} +7 -7
  90. package/{chunk-GBADO3SM.js → chunk-PQDIDWGX.js} +1 -1
  91. package/chunk-PSCNXBYA.js +11 -0
  92. package/chunk-QEFJJS2I.js +508 -0
  93. package/{chunk-757BGY6Y.js → chunk-QEW2MFDQ.js} +1 -1
  94. package/{chunk-SP3DPVBH.js → chunk-RDBARW6T.js} +8 -3
  95. package/{chunk-TNPCQNGQ.js → chunk-RJ2SAFB5.js} +83 -41
  96. package/{chunk-FGEYVPPR.js → chunk-RVWRKFUB.js} +8 -65
  97. package/{chunk-43CXXVJD.js → chunk-RXX4GDIH.js} +1 -1
  98. package/chunk-SEJ5OS6F.js +49 -0
  99. package/{chunk-MFI4FGHX.js → chunk-SOJM57FX.js} +5 -2
  100. package/{chunk-EKLRRZIN.js → chunk-SPAQ4PVV.js} +0 -5
  101. package/{chunk-L7NG2M6H.js → chunk-TRV2MIDW.js} +89 -74
  102. package/chunk-UAD2WT54.js +64 -0
  103. package/{chunk-RTLJUGQH.js → chunk-UZPQSVM6.js} +2 -2
  104. package/{chunk-3QJTD6DO.js → chunk-VMWYBIXG.js} +9 -7
  105. package/{chunk-ZHXJ6M7T.js → chunk-W7XHHYWM.js} +4 -0
  106. package/{chunk-5WADL4O7.js → chunk-XAVSS3KE.js} +21 -3
  107. package/{chunk-CVT7L2WZ.js → chunk-XOKOSO35.js} +13 -22
  108. package/{chunk-6BYAXNH5.js → chunk-XTJTN3RW.js} +57 -4
  109. package/{chunk-T5HJEUQN.js → chunk-YCDWJX45.js} +1 -1
  110. package/{chunk-MRWGHF56.js → chunk-YDH3FDFQ.js} +12 -356
  111. package/{chunk-H4RYESI6.js → chunk-Z4QSJILV.js} +85 -13
  112. package/chunk-ZJ7UHBJS.js +89 -0
  113. package/{chunk-O5FLGN2L.js → chunk-ZRSJ3JEH.js} +6 -2
  114. package/{cliExecutor-BBUVQU4L.js → cliExecutor-HG3S345O.js} +1 -1
  115. package/{codingSkills-BCQXRZOI.js → codingSkills-VDXQYWX4.js} +2 -2
  116. package/contentThunks-7YG2ZYQC.js +73 -0
  117. package/{cooldownCommands-GI5NNWGL.js → cooldownCommands-BSCH2W7P.js} +2 -2
  118. package/{createAgentAutomationAction-UJLNFFFC.js → createAgentAutomationAction-PJQSCAIO.js} +32 -26
  119. package/createDialogAction-SFEJX6SP.js +64 -0
  120. package/{createPageAction-N3IYABHV.js → createPageAction-B7WRHOQO.js} +35 -28
  121. package/{dbSlice-D5CNGWPD.js → dbSlice-IBVOBVMS.js} +7 -6
  122. package/{deleteFile-44TUM34Y.js → deleteFile-FWP2PSBG.js} +4 -3
  123. package/{dialogCommands-35M6RBAC.js → dialogCommands-VL2X22QC.js} +38 -33
  124. package/{dialogSlice-KO7ADD7H.js → dialogSlice-ANMACABO.js} +29 -24
  125. package/{docCreateCommands-VXHZWQ3P.js → docCreateCommands-ITLGZ5YI.js} +40 -35
  126. package/{docDeleteCommands-4WFAJR6A.js → docDeleteCommands-LH3YNL4C.js} +37 -32
  127. package/{docReadCommands-OYREEFAR.js → docReadCommands-YAJ77F36.js} +36 -31
  128. package/{docStore-5BU76DFK.js → docStore-D4HGHPWI.js} +9 -33
  129. package/{docUpdateCommands-A7QERSME.js → docUpdateCommands-DQBOMH2G.js} +40 -35
  130. package/{fetchMessages-KZQVBXKY.js → fetchMessages-DRABNDPZ.js} +3 -3
  131. package/{getPricing-HAU62AFM.js → getPricing-NM3NUTAS.js} +5 -5
  132. package/handleSendMessageAction-DF2OABGW.js +675 -0
  133. package/index.js +79 -88
  134. package/{lib-2ZTNRXR4.js → lib-FRRS27KN.js} +63 -28
  135. package/{localDialogRead-NQ33HBSI.js → localDialogRead-PUQKFI73.js} +1 -1
  136. package/{localRuntimeAuthority-KQDAE64E.js → localRuntimeAuthority-R5UBODT3.js} +6 -4
  137. package/{localRuntimeDb-PF7CFKDL.js → localRuntimeDb-P37ZTX55.js} +1 -1
  138. package/{machineCommands-J43U3TX5.js → machineCommands-JXDYQ5LB.js} +309 -87
  139. package/{machineWsRunDispatch-Z2Z6STXZ.js → machineWsRunDispatch-3QHI7JX5.js} +67 -59
  140. package/memberThunks-VZI6G7YZ.js +640 -0
  141. package/{models-4QF4BJVY.js → models-FAMINFZ7.js} +2 -2
  142. package/package.json +3 -2
  143. package/{read-RGNPI5H2.js → read-2BYWW7AA.js} +4 -3
  144. package/{readDocTool-6ESWKTXD.js → readDocTool-LC3A7QTB.js} +1 -1
  145. package/{readlineWorkspace-YRPV6JPN.js → readlineWorkspace-KVZTEAHB.js} +4609 -2698
  146. package/{removeDialogAgentAction-JYT73FU2.js → removeDialogAgentAction-SFYZXHNK.js} +14 -12
  147. package/{runAgentClientLoop-5YM5WMAY.js → runAgentClientLoop-KGTEL7ZP.js} +60 -50
  148. package/{runtimeDoctorCommands-JKTTN723.js → runtimeDoctorCommands-CROTMULY.js} +7 -5
  149. package/{setDialogExtraReferencesAction-D564LMYQ.js → setDialogExtraReferencesAction-Q32RGFTA.js} +10 -8
  150. package/{setPrimaryDialogAgentAction-ACY3BLYA.js → setPrimaryDialogAgentAction-BFYJHUJS.js} +14 -12
  151. package/{settingSlice-MKI3MNZJ.js → settingSlice-IRUU4VFB.js} +8 -7
  152. package/{skillDiscovery-GPUDHDTZ.js → skillDiscovery-NTRLM6KP.js} +3 -3
  153. package/{spaceCommands-MY26V52L.js → spaceCommands-KNAYWMCZ.js} +40 -220
  154. package/{streamAgentChatTurn-XV5X5TNQ.js → streamAgentChatTurn-FLYPTXKZ.js} +140 -95
  155. package/{switchDialogAgentAction-CJ5H6SAR.js → switchDialogAgentAction-L2KOKCGG.js} +11 -9
  156. package/{tableCommands-R6WFRDYF.js → tableCommands-SUNTHAYX.js} +1 -1
  157. package/{toolApiClient-B2MFXMEG.js → toolApiClient-VGYUB4P5.js} +4 -2
  158. package/{tools-MIMELA2Y.js → tools-CVLUXK6P.js} +46 -38
  159. package/{tuiSummaryLlmCaller-XJ5BKNNS.js → tuiSummaryLlmCaller-F3DPFFZM.js} +20 -16
  160. package/{updateCommands-IYKLF3JX.js → updateCommands-AJYSD73Y.js} +2 -2
  161. package/{updateDialogTitleAction-EIZUSWHR.js → updateDialogTitleAction-HWJIZEIV.js} +33 -27
  162. package/agentRecordCommands-Z64TA63M.js +0 -114
  163. package/agentRunCommand-4QJQLPRW.js +0 -134
  164. package/agentSuperviseCommands-VB6BUS5H.js +0 -640
  165. package/chunk-6BGAQ3KR.js +0 -7081
  166. package/chunk-FD36SCCD.js +0 -105
  167. package/chunk-J3UALFHL.js +0 -370
  168. package/chunk-RU5D3B22.js +0 -230
  169. package/chunk-YBV6QJKM.js +0 -441
  170. package/createDialogAction-TJCX6GUE.js +0 -58
  171. package/handleSendMessageAction-OSGQJQ45.js +0 -406
  172. package/spaceSlice-JUIXC365.js +0 -127
@@ -1,16 +1,14 @@
1
+ import {
2
+ buildResponseGuidelines
3
+ } from "./chunk-EDKF7RX4.js";
1
4
  import {
2
5
  getLocalProviderSecret
3
6
  } from "./chunk-HS7MLR74.js";
4
- import {
5
- ANTIGRAVITY_CLOUD_CODE_BASE_URL,
6
- isAntigravityOAuthAgent
7
- } from "./chunk-757BGY6Y.js";
8
7
  import {
9
8
  clipMultilineText,
10
9
  fetchAndSerializeTable,
11
- resolveBuiltinSkillPage,
12
- waitForAbortableDelay
13
- } from "./chunk-V4KZGLOI.js";
10
+ resolveBuiltinSkillPage
11
+ } from "./chunk-2HPRMEEZ.js";
14
12
  import {
15
13
  isGatewayHttpStatus
16
14
  } from "./chunk-NF64D32W.js";
@@ -22,55 +20,63 @@ import {
22
20
  } from "./chunk-3L2WKC3W.js";
23
21
  import {
24
22
  slateToSimplifiedMarkdown
25
- } from "./chunk-VRZIH5JO.js";
23
+ } from "./chunk-2PGGC63K.js";
24
+ import {
25
+ waitForAbortableDelay
26
+ } from "./chunk-N4G4PKQ6.js";
26
27
  import {
27
28
  extractCategorizedMentions
28
29
  } from "./chunk-MEYIRKDN.js";
29
30
  import {
30
31
  fetchAndCacheMessages
31
- } from "./chunk-BJLYCOZK.js";
32
+ } from "./chunk-D5XKNNUV.js";
32
33
  import {
33
34
  shouldUseServerProxy
34
35
  } from "./chunk-YYLHWIW6.js";
35
36
  import {
36
37
  fetchServerSyncedCredential
37
- } from "./chunk-U2A47SVI.js";
38
+ } from "./chunk-HQP7HJDL.js";
38
39
  import {
39
40
  buildSkillGuidancePromptBlock,
40
41
  extractRuntimePageCapabilities,
41
42
  resolveSkillGraphFromRoots
42
- } from "./chunk-AA564GBL.js";
43
+ } from "./chunk-DZZL7UBV.js";
43
44
  import {
44
- buildCurrentTimeBlock,
45
45
  buildIdentityBlock,
46
46
  buildRuntimeGuidanceBlocks,
47
+ compileContextLayers,
47
48
  normalizeChatCompletionsBodyForProvider,
48
49
  resolveToolGuidedSections
49
- } from "./chunk-YBV6QJKM.js";
50
+ } from "./chunk-QEFJJS2I.js";
50
51
  import {
51
52
  convertMessagesToResponsesInput,
52
53
  getUsageRequestOptions,
53
- preserveAgentStateFields
54
- } from "./chunk-6BYAXNH5.js";
54
+ preserveAgentStateFields,
55
+ stablePromptCacheKey
56
+ } from "./chunk-XTJTN3RW.js";
55
57
  import {
56
- buildProviderAuthHeaders
57
- } from "./chunk-SP3DPVBH.js";
58
+ ANTIGRAVITY_CLOUD_CODE_BASE_URL,
59
+ isAntigravityOAuthAgent
60
+ } from "./chunk-QEW2MFDQ.js";
58
61
  import {
59
- estimateTokenCount
60
- } from "./chunk-H4RYESI6.js";
62
+ buildProviderAuthHeaders
63
+ } from "./chunk-RDBARW6T.js";
61
64
  import {
62
65
  isOpenAiResponsesModel,
63
66
  resolvePlatformChatCompletionsEndpoint,
64
67
  resolvePlatformResponsesEndpoint
65
- } from "./chunk-VRJUIUIY.js";
68
+ } from "./chunk-LJKICKVC.js";
66
69
  import {
67
- createFileCredentialBroker
68
- } from "./chunk-NQ4N4IGO.js";
70
+ estimateTokenCount
71
+ } from "./chunk-PSCNXBYA.js";
69
72
  import {
70
73
  clampReasoningEffort,
71
74
  getModelConfig,
72
75
  isModelSupportReasoningEffort
73
- } from "./chunk-QDHZCAH3.js";
76
+ } from "./chunk-MMZ6ZTVO.js";
77
+ import {
78
+ createFileCredentialBroker
79
+ } from "./chunk-3JQ2NRYU.js";
74
80
  import {
75
81
  toErrorMessage
76
82
  } from "./chunk-HNMXYYJR.js";
@@ -78,7 +84,7 @@ import {
78
84
  MEMORY_USE_GUIDANCE,
79
85
  buildUserResponseLanguageContext,
80
86
  wrapHistoricalSummaryWithReplayGuard
81
- } from "./chunk-7CH6U3FL.js";
87
+ } from "./chunk-2GRGFCF6.js";
82
88
  import {
83
89
  canonicalizeToolNames
84
90
  } from "./chunk-O6OSWFZQ.js";
@@ -86,13 +92,13 @@ import {
86
92
  isDeepInfraKimiModel,
87
93
  isFireworksKimiModel,
88
94
  resolveFireworksKimiModel
89
- } from "./chunk-WL3UOGYO.js";
95
+ } from "./chunk-22BTGNSP.js";
90
96
  import {
91
97
  createSpaceKey
92
- } from "./chunk-FGEYVPPR.js";
98
+ } from "./chunk-UAD2WT54.js";
93
99
  import {
94
100
  read
95
- } from "./chunk-AV6KQCM5.js";
101
+ } from "./chunk-DNNSCSA2.js";
96
102
  import {
97
103
  asTrimmedLowercaseString
98
104
  } from "./chunk-QSJ3HFEF.js";
@@ -101,16 +107,16 @@ import {
101
107
  } from "./chunk-BJIRLHJR.js";
102
108
  import {
103
109
  getRuntimeServerContext
104
- } from "./chunk-PYKV6FSC.js";
110
+ } from "./chunk-KWSQR2KK.js";
105
111
  import {
106
112
  isAbortError
107
113
  } from "./chunk-QOKAKDPE.js";
108
- import {
109
- isRecord
110
- } from "./chunk-KUG52IAP.js";
111
114
  import {
112
115
  asTrimmedString
113
116
  } from "./chunk-3EUW3WEO.js";
117
+ import {
118
+ isRecord
119
+ } from "./chunk-KUG52IAP.js";
114
120
  import {
115
121
  API_ENDPOINTS
116
122
  } from "./chunk-LCBAMY2M.js";
@@ -473,8 +479,8 @@ function resolveAgentCallPlan(agentConfig, _env) {
473
479
  model: agentConfig.model,
474
480
  endpointKey: agentConfig.endpointKey
475
481
  });
476
- const upstreamWire = provider === "nolo" && agentConfig.model === "deepseek-v4-pro" ? "chat.completions" : useResponses ? "responses" : "chat.completions";
477
- const endpoint = upstreamWire === "responses" ? resolvePlatformResponsesEndpoint(provider) ?? "" : resolvePlatformChatCompletionsEndpoint(provider, agentConfig.model) ?? "";
482
+ const upstreamWire = useResponses ? "responses" : "chat.completions";
483
+ const endpoint = upstreamWire === "responses" ? resolvePlatformResponsesEndpoint(provider, agentConfig.model) ?? "" : resolvePlatformChatCompletionsEndpoint(provider, agentConfig.model) ?? "";
478
484
  return {
479
485
  authMethod: { kind: "platform-key" },
480
486
  transport,
@@ -485,66 +491,6 @@ function resolveAgentCallPlan(agentConfig, _env) {
485
491
  };
486
492
  }
487
493
 
488
- // packages/ai/agent/contextCompiler.ts
489
- function createHash(_algo) {
490
- let buf = "";
491
- return {
492
- update(s) {
493
- buf += s;
494
- return this;
495
- },
496
- digest(_enc) {
497
- let h = 2166136261;
498
- for (let i = 0; i < buf.length; i++) {
499
- h ^= buf.charCodeAt(i);
500
- h = h * 16777619 >>> 0;
501
- }
502
- return h.toString(16).padStart(8, "0");
503
- }
504
- };
505
- }
506
- var hasLayerContent = (layer) => Boolean(layer.content);
507
- var estimateContextTokens = (content) => estimateTokenCount(content);
508
- var compileContextLayers = (layers) => {
509
- const compiledLayers = [];
510
- for (const layer of layers) {
511
- if (!hasLayerContent(layer)) continue;
512
- const estimatedTokens = estimateContextTokens(layer.content);
513
- compiledLayers.push({
514
- id: layer.id,
515
- owner: layer.owner,
516
- content: layer.content,
517
- cacheScope: layer.cacheScope ?? "turn",
518
- charCount: layer.content.length,
519
- estimatedTokens,
520
- tokenBudget: layer.tokenBudget,
521
- budgetStatus: typeof layer.tokenBudget === "number" ? estimatedTokens <= layer.tokenBudget ? "within-budget" : "over-budget" : void 0
522
- });
523
- }
524
- const stablePrefixLayers = [];
525
- for (const layer of compiledLayers) {
526
- if (layer.cacheScope === "turn") break;
527
- stablePrefixLayers.push(layer);
528
- }
529
- const stablePrefixContent = stablePrefixLayers.map((layer) => layer.content).join("\n\n");
530
- const dynamicLayers = compiledLayers.slice(stablePrefixLayers.length);
531
- const dynamicContent = dynamicLayers.map((layer) => layer.content).join("\n\n");
532
- const misorderedLayerIds = dynamicLayers.filter((layer) => layer.cacheScope !== "turn").map((layer) => layer.id);
533
- return {
534
- content: compiledLayers.map((layer) => layer.content).join("\n\n"),
535
- stablePrefixContent,
536
- dynamicContent,
537
- layers: compiledLayers,
538
- cacheProfile: {
539
- stablePrefixHash: createHash("sha256").update(stablePrefixContent).digest("hex"),
540
- stablePrefixLayerIds: stablePrefixLayers.map((layer) => layer.id),
541
- stablePrefixCharCount: stablePrefixContent.length,
542
- stablePrefixEstimatedTokens: estimateContextTokens(stablePrefixContent),
543
- misorderedLayerIds
544
- }
545
- };
546
- };
547
-
548
494
  // packages/ai/agent/buildSystemPrompt.ts
549
495
  var CLARIFICATION_MODE_INSTRUCTIONS = `\u5728\u4F60\u8FD8\u4E0D\u4E86\u89E3\u7528\u6237\u610F\u56FE\u65F6\uFF0C\u901A\u8FC7\u63D0\u95EE\u6765\u6F84\u6E05\u9700\u6C42\uFF0C\u800C\u4E0D\u662F\u4ED3\u4FC3\u7ED9\u51FA\u7B54\u6848\u3002`;
550
496
  var isBrowser = typeof window !== "undefined";
@@ -559,22 +505,6 @@ var createContextSection = (title, description, content) => content ? `### ${tit
559
505
  ${description}
560
506
 
561
507
  ${content} ` : "";
562
- var buildResponseGuidelines = (isMobile) => {
563
- if (isMobile) {
564
- return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u7A84\u5C4F / TUI / \u79FB\u52A8\u7AEF\uFF09 ---
565
- \u5F53\u524D\u5904\u4E8E\u7A84\u5C4F\u6216\u7EC8\u7AEF\u89C6\u56FE\uFF0C\u8BF7\u91C7\u7528\u7D27\u51D1\u3001\u9AD8\u626B\u63CF\u7387\u7684\u6392\u7248\uFF1A
566
- - **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u7ED3\u8BBA\u6216\u5173\u952E\u72B6\u6001\u7F6E\u9876\uFF0C\u76F4\u5954\u4E3B\u9898\uFF1B\u77ED\u6BB5\u843D\uFF082-4 \u53E5\uFF09\u5E76\u4FDD\u6301\u7A7A\u884C\u547C\u5438\uFF0C\u62D2\u7EDD\u957F\u6BB5\u6587\u5B57\u5899\u3002
567
- - **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF0C\u9632\u6B62\u7EC8\u7AEF\u4E0E\u79FB\u52A8\u7AEF\u6298\u884C\u9519\u4F4D\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
568
- - **\u8868\u683C\u964D\u7EA7**\uFF1A\u4E25\u7981\u4F7F\u7528 \u22654 \u5217\u7684\u5927\u5BBD\u8868\uFF08\u7A84\u5C4F/\u7EC8\u7AEF\u4E0B\u6298\u884C\u4E25\u91CD\u9519\u4F4D\uFF09\uFF0C\u6539\u7528\u300C\u952E\u503C\u6E05\u5355\u300D\u6216\u7EB5\u5411\u5361\u7247\u3002
569
- - **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u514B\u5236\u4F7F\u7528\u300C---\u300D\u5206\u5272\u7EBF\uFF08\u4EC5\u5927\u4E3B\u9898\u5207\u6362\u6216\u7ED3\u8BBA\u524D\uFF0C\u524D\u540E\u7559\u7A7A\u884C\uFF09\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u4E00\u5F8B\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF1B\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\u4E14\u907F\u514D\u6A2A\u5411\u8D85\u957F\u884C\uFF1B\u514B\u5236 Emoji\u3002`;
570
- }
571
- return `--- \u54CD\u5E94\u5C55\u793A\u6307\u5357\uFF08\u5BBD\u5C4F / \u684C\u9762\u7AEF\uFF09 ---
572
- \u5F53\u524D\u5904\u4E8E\u5927\u5C4F\u89C6\u56FE\uFF0C\u53EF\u5145\u5206\u53D1\u6325\u7A7A\u95F4\u4F18\u52BF\uFF1A
573
- - **\u7ED3\u6784\u4E0E\u7559\u767D**\uFF1A\u63D0\u4F9B\u5C42\u6B21\u6E05\u6670\u7684\u5168\u666F\u7ED3\u6784\uFF0C\u91CD\u8981\u6A21\u5757\u7528\u4E8C\u7EA7/\u4E09\u7EA7\u6807\u9898\u5212\u5206\uFF1B\u6BB5\u843D\u4FDD\u6301 2-4 \u53E5\u5E76\u7559\u7A7A\u884C\u547C\u5438\uFF0C\u76F4\u5954\u4E3B\u9898\u3002
574
- - **\u5217\u8868\u4E0E\u7F29\u8FDB**\uFF1A\u5217\u8868\u9879\u7528\u300C- **\u6838\u5FC3\u8BCD**\uFF1A\u8BF4\u660E\u300D\uFF1B\u5D4C\u5957\u6700\u591A 2 \u5C42\uFF0C\u5B50\u5217\u8868\u7F29\u8FDB 2 \u7A7A\u683C\uFF1B\u5E76\u5217\u7528\u65E0\u5E8F\u5217\u8868\uFF0C\u6B65\u9AA4\u7528\u6709\u5E8F\u5217\u8868\u3002
575
- - **\u8868\u683C\u4E0E\u5BF9\u6BD4**\uFF1A\u5BBD\u5C4F\u4E0B\u53EF\u9002\u5EA6\u4F7F\u7528 Markdown \u591A\u5217\u8868\u683C\u8FDB\u884C\u65B9\u6848\u6A2A\u5411\u5BF9\u6BD4\u3001\u53C2\u6570\u6C47\u603B\u6216\u77E9\u9635\u5206\u6790\u3002
576
- - **\u7B26\u53F7\u4E0E\u4EE3\u7801**\uFF1A\u53EF\u5C55\u793A\u66F4\u5B8C\u6574\u7684\u4EE3\u7801\u4E0A\u4E0B\u6587\u4E0E\u591A\u6B65\u6267\u884C\u793A\u4F8B\uFF1B\u8DEF\u5F84\u3001\u547D\u4EE4\u4E0E\u53C2\u6570\u7528\u53CD\u5F15\u53F7 \` \` \u5305\u88F9\uFF0C\u4EE3\u7801\u5757\u6807\u660E\u8BED\u8A00\uFF1B\u514B\u5236\u4F7F\u7528\u5206\u5272\u7EBF\u4E0E Emoji\u3002`;
577
- };
578
508
  var buildReferenceMaterialsBlock = (contexts) => {
579
509
  const sections = [
580
510
  createContextSection(
@@ -706,6 +636,8 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
706
636
  { id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
707
637
  { id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
708
638
  { id: "core-persona", owner: "agent", cacheScope: "session", content: corePersonaSection },
639
+ { id: "tool-round-economy", owner: "platform", cacheScope: "session", content: toolSections.toolRoundEconomy },
640
+ { id: "privilege-escalation", owner: "platform", cacheScope: "session", content: toolSections.privilegeEscalation },
709
641
  { id: "agent-orchestration", owner: "platform", cacheScope: "session", content: toolSections.agentOrchestration },
710
642
  { id: "agent-collaboration", owner: "platform", cacheScope: "session", content: toolSections.agentCollaboration },
711
643
  { id: "web-access", owner: "platform", cacheScope: "session", content: toolSections.webAccess },
@@ -713,8 +645,7 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
713
645
  { id: "clarification-mode", owner: "platform", cacheScope: "session", content: clarifyingSection },
714
646
  { id: "knowledge-management", owner: "platform", cacheScope: "session", content: toolSections.knowledgeManagement },
715
647
  { id: "memory-capture", owner: "platform", cacheScope: "session", content: toolSections.memoryCapture },
716
- { id: "self-update", owner: "platform", cacheScope: "session", content: toolSections.selfUpdate },
717
- { id: "generic-agent-update", owner: "platform", cacheScope: "session", content: toolSections.genericAgentUpdate },
648
+ { id: "agent-config-maintenance", owner: "platform", cacheScope: "session", content: toolSections.agentConfigMaintenance },
718
649
  { id: "context-layer-contract", owner: "platform", cacheScope: "static", content: contextLayerContract },
719
650
  {
720
651
  id: "email-registration-workflow",
@@ -731,13 +662,7 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
731
662
  { id: "memory-overlay", owner: "runtime", cacheScope: "turn", content: memoryOverlaySection },
732
663
  { id: "app-working-memory", owner: "runtime", cacheScope: "turn", content: appWorkingMemorySection },
733
664
  { id: "dialog-summary", owner: "runtime", cacheScope: "turn", content: dialogSummarySection },
734
- { id: "editing-context", owner: "runtime", cacheScope: "turn", content: editingContextSection },
735
- {
736
- id: "current-time",
737
- owner: "platform",
738
- cacheScope: "turn",
739
- content: buildCurrentTimeBlock(now, timeZone)
740
- }
665
+ { id: "editing-context", owner: "runtime", cacheScope: "turn", content: editingContextSection }
741
666
  ]);
742
667
  };
743
668
 
@@ -809,6 +734,7 @@ var buildRequestBody = (options) => {
809
734
  model,
810
735
  messages,
811
736
  providerName,
737
+ customProviderUrl,
812
738
  temperature,
813
739
  top_p,
814
740
  frequency_penalty,
@@ -825,7 +751,8 @@ var buildRequestBody = (options) => {
825
751
  stream: true
826
752
  };
827
753
  const usageRequestOptions = getUsageRequestOptions(providerName, {
828
- api: "chat-completions"
754
+ api: "chat-completions",
755
+ endpoint: customProviderUrl
829
756
  });
830
757
  Object.assign(bodyData, usageRequestOptions);
831
758
  if (reasoning_effort && isModelSupportReasoningEffort(model)) {
@@ -881,6 +808,7 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
881
808
  model: resolvedModel,
882
809
  messages: messagesWithPrompt,
883
810
  providerName,
811
+ customProviderUrl: agentConfig.customProviderUrl,
884
812
  temperature: agentConfig.temperature,
885
813
  top_p: agentConfig.top_p,
886
814
  frequency_penalty: agentConfig.frequency_penalty,
@@ -905,7 +833,8 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
905
833
  return normalizeChatCompletionsBodyForProvider({
906
834
  body: requestBody,
907
835
  provider: providerName,
908
- model: requestBody.model
836
+ model: requestBody.model,
837
+ endpoint: agentConfig.customProviderUrl
909
838
  });
910
839
  };
911
840
 
@@ -1077,13 +1006,22 @@ var generateRequestBody = ({
1077
1006
  resolveAgentCallPlan(agentConfigForRequest, {})
1078
1007
  );
1079
1008
  if (clientWire === "responses") {
1080
- return generateResponseRequestBody(
1009
+ const body = generateResponseRequestBody(
1081
1010
  agentConfigForRequest,
1082
1011
  [...stableMessages ?? [], ...messages],
1083
1012
  contexts,
1084
1013
  prependSystemPrompt,
1085
1014
  responsesState
1086
1015
  );
1016
+ body.prompt_cache_key ??= stablePromptCacheKey(
1017
+ [
1018
+ agentConfigForRequest.model,
1019
+ agentConfigForRequest.dbKey ?? "",
1020
+ agentConfigForRequest.prompt ?? ""
1021
+ ],
1022
+ "nolo-openai"
1023
+ );
1024
+ return body;
1087
1025
  }
1088
1026
  const baseBody = generateOpenAIRequestBody(
1089
1027
  agentConfigForRequest,
@@ -0,0 +1,66 @@
1
+ import {
2
+ resolveNoloHome
3
+ } from "./chunk-GLKOYSRU.js";
4
+
5
+ // packages/database-engine/cliAuthorityStoreDriver.ts
6
+ import path from "node:path";
7
+ function readCliAuthorityDriver(env) {
8
+ const value = env.NOLO_CLI_AUTHORITY_DRIVER?.trim();
9
+ if (value === "broker") {
10
+ return { driver: "broker", invalidDriver: null };
11
+ }
12
+ return {
13
+ driver: "broker",
14
+ invalidDriver: value ? value : null
15
+ };
16
+ }
17
+ function resolveCliAuthorityRunDir(options = {}) {
18
+ return path.join(resolveNoloHome({
19
+ ...options,
20
+ env: options.env ?? process.env
21
+ }), "run");
22
+ }
23
+ function hashString(value) {
24
+ let hash = 0;
25
+ for (let index = 0; index < value.length; index += 1) {
26
+ hash = (hash << 5) - hash + value.charCodeAt(index) | 0;
27
+ }
28
+ return Math.abs(hash);
29
+ }
30
+ function resolveCliAuthorityBrokerPort(options = {}) {
31
+ const envPort = options.env?.NOLO_CLI_AUTHORITY_BROKER_PORT?.trim();
32
+ if (envPort) {
33
+ const port = Number(envPort);
34
+ if (Number.isInteger(port) && port > 0 && port < 65536) return port;
35
+ }
36
+ const noloHome = resolveNoloHome({
37
+ ...options,
38
+ env: options.env ?? {}
39
+ });
40
+ return 47e3 + hashString(noloHome) % 2e3;
41
+ }
42
+ function resolveCliAuthorityStoreDriver(options = {}) {
43
+ return readCliAuthorityDriver(options.env ?? {}).driver;
44
+ }
45
+ function resolveCliAuthorityBrokerSocketPath(options) {
46
+ return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.sock");
47
+ }
48
+ function resolveCliAuthorityBrokerEndpoint(options) {
49
+ if (options.transport === "tcp") {
50
+ return `tcp://127.0.0.1:${resolveCliAuthorityBrokerPort(options)}`;
51
+ }
52
+ return `unix://${resolveCliAuthorityBrokerSocketPath(options)}`;
53
+ }
54
+ function resolveCliAuthorityBrokerMetadataPath(options) {
55
+ return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.json");
56
+ }
57
+ function resolveCliAuthorityBrokerHealthPath(options) {
58
+ return path.join(resolveCliAuthorityRunDir(options), "authority-store-broker.health.json");
59
+ }
60
+
61
+ export {
62
+ resolveCliAuthorityStoreDriver,
63
+ resolveCliAuthorityBrokerEndpoint,
64
+ resolveCliAuthorityBrokerMetadataPath,
65
+ resolveCliAuthorityBrokerHealthPath
66
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dialogMessageRange
3
- } from "./chunk-SVEUG45B.js";
3
+ } from "./chunk-NHRQCXIQ.js";
4
4
  import {
5
5
  isTombstoneRecord
6
6
  } from "./chunk-GBRG75BQ.js";
File without changes
@@ -14,7 +14,7 @@ function buildCliLocalRuntimeDbEnv(env = process.env) {
14
14
  };
15
15
  }
16
16
  async function getDefaultCliLocalRuntimeDb(options = {}) {
17
- const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-KQDAE64E.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-R5UBODT3.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -2,6 +2,8 @@
2
2
  var QUOTA_ERROR_PATTERNS = [
3
3
  /429/,
4
4
  /quota/i,
5
+ /access_terminated_error/i,
6
+ /(?:weekly|monthly)\s*(?:\([^)]*\)\s*)?usage\s+limit/i,
5
7
  /rate\s*limit/i,
6
8
  /too\s*many\s*requests/i,
7
9
  /额度/,
@@ -24,11 +26,24 @@ function isQuotaExhaustedError(error) {
24
26
  return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(error));
25
27
  }
26
28
  const maybeStatus = error.status;
27
- if (typeof maybeStatus === "number" && maybeStatus === 429) return true;
28
29
  const maybeStatusCode = error.statusCode;
29
- if (typeof maybeStatusCode === "number" && maybeStatusCode === 429) return true;
30
+ const status = typeof maybeStatus === "number" ? maybeStatus : maybeStatusCode;
31
+ if (status === 429) return true;
32
+ if (status === 403) {
33
+ const message = extractMessage(error);
34
+ return QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(message));
35
+ }
30
36
  return false;
31
37
  }
38
+ function extractMessage(error) {
39
+ if (typeof error === "string") return error;
40
+ if (error instanceof Error) return error.message;
41
+ if (error && typeof error === "object") {
42
+ const m = error.message;
43
+ return typeof m === "string" ? m : "";
44
+ }
45
+ return "";
46
+ }
32
47
  function parseResetsInMs(text) {
33
48
  if (!text) return void 0;
34
49
  const unitMs = (n, unit) => {
@@ -114,7 +129,11 @@ function parseResetAtText(value, now) {
114
129
  return Number.isFinite(parsed) && parsed > now ? parsed : void 0;
115
130
  }
116
131
  function matchesPeriodicUsageLimitText(text) {
117
- return /weekly usage limit|monthly usage limit/i.test(text);
132
+ return /(?:weekly|monthly)\s*(?:\([^)]*\)\s*)?usage\s+limit/i.test(text);
133
+ }
134
+ function isQuotaLimited403Body(body) {
135
+ const text = typeof body === "string" ? body : JSON.stringify(body ?? "");
136
+ return matchesPeriodicUsageLimitText(text) || /access_terminated_error/i.test(text) || /(?:quota|usage)\s+(?:is\s+)?(?:exhausted|depleted|used\s+up|reached)/i.test(text) || /(?:quota|usage).{0,40}\b(?:reset|resets)\s+at\b/i.test(text);
118
137
  }
119
138
  function resolveNextAvailableAt(body, now, headers) {
120
139
  const headerRetryAfter = headers && typeof headers.get === "function" ? headers.get("retry-after") : headers?.["retry-after"] ?? headers?.["Retry-After"];
@@ -132,6 +151,9 @@ function resolveNextAvailableAt(body, now, headers) {
132
151
  return clampCooldownDeadline(parsed, now);
133
152
  }
134
153
  function resolveAvailabilityAction(status, body, now, headers) {
154
+ if (status === 403 && isQuotaLimited403Body(body)) {
155
+ return { kind: "mark", nextAvailableAt: resolveNextAvailableAt(body, now, headers) };
156
+ }
135
157
  if (status >= 200 && status < 300) return { kind: "clear" };
136
158
  if (status === 429) {
137
159
  return { kind: "mark", nextAvailableAt: resolveNextAvailableAt(body, now, headers) };
@@ -161,6 +183,7 @@ export {
161
183
  QUOTA_ERROR_PATTERNS,
162
184
  isQuotaExhaustedError,
163
185
  isAgentUnavailableNow,
186
+ isQuotaLimited403Body,
164
187
  resolveAvailabilityAction,
165
188
  mergeAvailabilityDeadline,
166
189
  resolveCooldownGate
@@ -1,13 +1,13 @@
1
+ import {
2
+ getActiveDialogKey
3
+ } from "./chunk-6YTOJY35.js";
1
4
  import {
2
5
  require_date_fns
3
6
  } from "./chunk-M76ECQRD.js";
4
- import {
5
- getActiveDialogKey
6
- } from "./chunk-MRWGHF56.js";
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-AV6KQCM5.js";
10
+ } from "./chunk-DNNSCSA2.js";
11
11
  import {
12
12
  __toESM
13
13
  } from "./chunk-4VNS5WPM.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-TNPCQNGQ.js";
4
+ } from "./chunk-RJ2SAFB5.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;