nolo-cli 0.155.0-alpha.1 → 0.155.0

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 (163) hide show
  1. package/{_executeModel-UWUM5QKW.js → _executeModel-3HHZYHHB.js} +54 -54
  2. package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
  3. package/{action-SXJD5N5R.js → action-GPPJC5TI.js} +5 -5
  4. package/{addContentAction-65ONHX2T.js → addContentAction-XJQEJ4XW.js} +8 -8
  5. package/{addDialogAgentAction-WOLK7RB4.js → addDialogAgentAction-5WZX5CAY.js} +7 -7
  6. package/{agentDeleteCommand-FRPRYY4N.js → agentDeleteCommand-74EL5T7G.js} +74 -75
  7. package/{agentEmailCommands-TMP7BKVS.js → agentEmailCommands-ST7HL3E7.js} +77 -78
  8. package/{agentListCommands-G36AMSBR.js → agentListCommands-L33M3I6V.js} +35 -35
  9. package/{agentMachineCommands-CAWH6B4N.js → agentMachineCommands-JSQPNSS5.js} +34 -31
  10. package/{agentProviderCommands-X2HQE6HY.js → agentProviderCommands-CXBHNONN.js} +5 -5
  11. package/{agentPullCommand-FA43RBRU.js → agentPullCommand-GXXEDOSA.js} +4 -4
  12. package/{agentRecordCommands-NRUEGQO6.js → agentRecordCommands-JWW5NQQ7.js} +71 -72
  13. package/{agentRunCommand-MTUMHPBF.js → agentRunCommand-UTBBUSHP.js} +74 -74
  14. package/{agentRunControl-2C5GM3BW.js → agentRunControl-XBSNHHZE.js} +7 -7
  15. package/{agentRuntimeLocal-Q7ZOMZC7.js → agentRuntimeLocal-XCKO5FVP.js} +20 -18
  16. package/{agentSlice-RKEZWJZL.js → agentSlice-YT3VCCEW.js} +8 -8
  17. package/{appDeleteCommands-MMWT54BR.js → appDeleteCommands-2PJFNLAJ.js} +30 -28
  18. package/{appDeployCommands-OIFXVDOF.js → appDeployCommands-AZCMCMK6.js} +30 -28
  19. package/{appDeployStatusCommands-OTXMSDFB.js → appDeployStatusCommands-HSIKPVJN.js} +30 -28
  20. package/{appGetCommands-JPY36ANL.js → appGetCommands-IUZCPAP7.js} +30 -28
  21. package/{appListCommands-IHJGN36O.js → appListCommands-JLFVS44M.js} +30 -28
  22. package/{authCommand-J3XILHWW.js → authCommand-3Z52KJID.js} +22 -302
  23. package/{authCommands-77CHYBGF.js → authCommands-QOCKVPX3.js} +5 -5
  24. package/{builtinSkillRegistry-A6VSPJEJ.js → builtinSkillRegistry-LJV7FHNI.js} +4 -4
  25. package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
  26. package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
  27. package/{chunk-FDT27L7S.js → chunk-2XDQAWBM.js} +18 -16
  28. package/{chunk-AHSHCC2V.js → chunk-2ZYCNT2O.js} +232 -76
  29. package/{chunk-QFEW2ULV.js → chunk-32ZKZET7.js} +1 -1
  30. package/{chunk-WHLTTNKZ.js → chunk-3GTVM7NJ.js} +22 -22
  31. package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
  32. package/{chunk-LGCICX53.js → chunk-3L5MSPWX.js} +1 -1
  33. package/{chunk-4YRTZIVN.js → chunk-43OFVLWJ.js} +6 -6
  34. package/{chunk-6TF64IF2.js → chunk-4L4K6YR7.js} +16 -2
  35. package/{chunk-P5QACQDK.js → chunk-62TBKWTV.js} +1 -1
  36. package/{chunk-TRW43TSC.js → chunk-6EQD4AQL.js} +41 -1
  37. package/{chunk-YLMMECCH.js → chunk-6XIE5ZGI.js} +1 -1
  38. package/{chunk-UUPR3TD7.js → chunk-7RF4O6AT.js} +1 -3
  39. package/{chunk-OGI4JKBD.js → chunk-BAWAKW7X.js} +2 -2
  40. package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
  41. package/{chunk-XZ6QGCBU.js → chunk-BMCPKNL2.js} +7 -7
  42. package/{chunk-RYCZTKFM.js → chunk-BO3ARJRK.js} +825 -688
  43. package/{chunk-A7HQF6YH.js → chunk-CDLP56BS.js} +9 -9
  44. package/{chunk-5MM7NNO6.js → chunk-CNWKLQRL.js} +8 -3
  45. package/{chunk-ITECOZFT.js → chunk-CXCMXNME.js} +134 -126
  46. package/{chunk-TJ2VPCBE.js → chunk-DD2EOI6S.js} +2 -2
  47. package/{chunk-36OMEXXR.js → chunk-DLV3H464.js} +8 -8
  48. package/{chunk-KO4VPOIN.js → chunk-DT7EWFTY.js} +6 -6
  49. package/{chunk-C5DLHL3R.js → chunk-ESMZW5PE.js} +3 -3
  50. package/{chunk-PSJWPSKS.js → chunk-EWO77ZGF.js} +9 -43
  51. package/{chunk-ZWG3C7VI.js → chunk-F3SOW2EU.js} +81 -1
  52. package/{chunk-ZJWUXAJ7.js → chunk-F5WASHQA.js} +271 -138
  53. package/{chunk-VOEJ7EMJ.js → chunk-FB5WLEOD.js} +21 -17
  54. package/{chunk-TENH5FPC.js → chunk-FCUKCVKN.js} +12 -8
  55. package/{chunk-FY4SDK2E.js → chunk-FDLDMJTM.js} +1 -1
  56. package/{chunk-EM3YOZJ4.js → chunk-FFHV45HO.js} +3 -3
  57. package/{chunk-D3AN5D3L.js → chunk-FZYKQFBQ.js} +3 -3
  58. package/{chunk-7KYVUFDG.js → chunk-G3VYRPTV.js} +5 -267
  59. package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
  60. package/{chunk-2KKTIPQ3.js → chunk-HW7EBEC5.js} +35 -207
  61. package/{chunk-B2EGWZJG.js → chunk-I7S63QUU.js} +1 -1
  62. package/{chunk-PDJ6ZODI.js → chunk-IF7V3CBU.js} +1 -1
  63. package/{chunk-T6CBQ6BN.js → chunk-INFHX73M.js} +1 -1
  64. package/{chunk-YBNHPX4S.js → chunk-IW64YHXL.js} +155 -31
  65. package/{chunk-RV3PVWWL.js → chunk-JDKSYQQN.js} +5 -5
  66. package/{chunk-K43ZF2C3.js → chunk-JPPQ3GUO.js} +1 -1
  67. package/{chunk-VEJFPTX7.js → chunk-JWEXJ573.js} +3 -3
  68. package/{chunk-ZG73GDYU.js → chunk-K25WQPP3.js} +253 -57
  69. package/{chunk-HKT6QXP3.js → chunk-KABQ74UQ.js} +5 -5
  70. package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
  71. package/{chunk-3C2QLERX.js → chunk-KMDDG73K.js} +1 -1
  72. package/{chunk-AIZE5TDM.js → chunk-MAYW6V3E.js} +2 -2
  73. package/{chunk-IPAW7XLD.js → chunk-MFVOJ6KF.js} +2 -2
  74. package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
  75. package/{chunk-TPG4CZHI.js → chunk-NHEWV5FD.js} +17 -3
  76. package/{chunk-G47IPDOK.js → chunk-O2IWR23M.js} +1 -1
  77. package/{chunk-H3KW6W64.js → chunk-OLVOR45M.js} +2 -2
  78. package/{chunk-OHUFHV3U.js → chunk-OWCHFPWR.js} +17 -16
  79. package/{chunk-SUKSWFLP.js → chunk-PIG2IUVZ.js} +1 -1
  80. package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
  81. package/{chunk-2MTE2PEH.js → chunk-QA2C5NKI.js} +5 -739
  82. package/{chunk-TYND6RDQ.js → chunk-QI2WVWXV.js} +73 -2
  83. package/{chunk-L6EQV5OC.js → chunk-QXZH5UDF.js} +3 -3
  84. package/{chunk-4ZSZP7PY.js → chunk-QZIOZDM6.js} +10 -10
  85. package/{chunk-K2XCMQMM.js → chunk-R2KWTENX.js} +3 -3
  86. package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
  87. package/{chunk-UTIMX333.js → chunk-RIHQGFFA.js} +1 -1
  88. package/{chunk-4Z245KOA.js → chunk-SH3XD4E2.js} +8 -4
  89. package/{chunk-MM3662RS.js → chunk-SNAWGDXT.js} +263 -4
  90. package/{chunk-JGRPBIZZ.js → chunk-SQX235S2.js} +1 -1
  91. package/chunk-TT644UJD.js +188 -0
  92. package/{chunk-IYBIRCQV.js → chunk-U34KT53V.js} +29 -11
  93. package/{chunk-ANJTRG52.js → chunk-ULQAD7ZY.js} +18 -43
  94. package/{chunk-I2RMFLLH.js → chunk-V7PCFWX3.js} +1 -1
  95. package/{chunk-KX6LPG7W.js → chunk-VXS4YYJ2.js} +8 -8
  96. package/{chunk-HXHSTRGH.js → chunk-VYNMQ6HW.js} +0 -27
  97. package/{chunk-IJERIUXS.js → chunk-WRCZXJ4N.js} +6 -3
  98. package/chunk-Y5GCAMGP.js +9 -0
  99. package/{chunk-JZX2XLKC.js → chunk-YCRROBDY.js} +1 -1
  100. package/{chunk-EYWJT7A2.js → chunk-YPG7TUQD.js} +3 -3
  101. package/chunk-YR47Y7CN.js +2685 -0
  102. package/{chunk-NS2WBMJT.js → chunk-ZAV4YVEA.js} +18 -2
  103. package/{chunk-YANF2RR4.js → chunk-ZPKUJROL.js} +1 -1
  104. package/{commandRegistry-O335ZA5D.js → commandRegistry-HPL2KOVB.js} +88 -96
  105. package/{contentThunks-6GWTLD5V.js → contentThunks-QBL5NK2W.js} +21 -21
  106. package/{createAgentAutomationAction-3WJWXWWA.js → createAgentAutomationAction-5UWBLR2N.js} +21 -21
  107. package/{createDialogAction-VEX236QX.js → createDialogAction-NJ2LE7KC.js} +25 -25
  108. package/{createPageAction-65CX7QH6.js → createPageAction-7T3RINS2.js} +24 -25
  109. package/{dbSlice-S2HYXURM.js → dbSlice-6PVPY44C.js} +7 -7
  110. package/{deleteFile-6JWDDRVP.js → deleteFile-YM6NDPAR.js} +5 -5
  111. package/{dialogCommands-H3K7PTF6.js → dialogCommands-KMECTGCW.js} +34 -31
  112. package/{dialogSlice-AHU5PNUQ.js → dialogSlice-GQMTD4HR.js} +20 -20
  113. package/{dist-NJC2W7I4.js → dist-Q2JSMAKA.js} +7 -361
  114. package/{docCreateCommands-KP64KMVL.js → docCreateCommands-4IT5PUAL.js} +31 -29
  115. package/{docDeleteCommands-C3F4SZSR.js → docDeleteCommands-QS66YNZV.js} +32 -30
  116. package/{docReadCommands-7H6BDOUR.js → docReadCommands-3SAI46YC.js} +31 -29
  117. package/{docStore-WROLAUBT.js → docStore-PM5PYKPZ.js} +8 -8
  118. package/{docUpdateCommands-JDW4BRBH.js → docUpdateCommands-OGYG5BRC.js} +31 -29
  119. package/{getPricing-TX35D7PI.js → getPricing-XQ3N3RBP.js} +2 -2
  120. package/{handleSendMessageAction-OK3GHWHR.js → handleSendMessageAction-EQ3U6K5N.js} +43 -39
  121. package/index.js +8 -8
  122. package/{localRuntimeAdapter-ARIAVQ4O.js → localRuntimeAdapter-74L7FLMW.js} +69 -68
  123. package/{localRuntimeAuthority-JDAD7CB6.js → localRuntimeAuthority-BPN5OAQG.js} +2 -2
  124. package/{localRuntimeDb-CVC62PM5.js → localRuntimeDb-QIVAXMUL.js} +1 -1
  125. package/{machineCommands-ZTAJYKQM.js → machineCommands-BUZTMLYD.js} +79 -78
  126. package/{machineWsRunDispatch-JIODLHZZ.js → machineWsRunDispatch-CCDVG5AO.js} +69 -70
  127. package/{memberThunks-VPTET5M2.js → memberThunks-AZINUM4S.js} +10 -10
  128. package/package.json +6 -2
  129. package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
  130. package/{providerPresetApply-CRZFMQD5.js → providerPresetApply-PKUOHQJT.js} +5 -5
  131. package/{providerRegistry-7IS43D3X.js → providerRegistry-HNQLIFN2.js} +5 -5
  132. package/{read-VMMIHEAK.js → read-7JPIWRBQ.js} +5 -5
  133. package/{readDocTool-4XSLKYSQ.js → readDocTool-AAQTB2Y3.js} +1 -1
  134. package/{readlineWorkspace-24O4OG6C.js → readlineWorkspace-MS2ZIQ2P.js} +374 -199
  135. package/{removeDialogAgentAction-YIV37ENV.js → removeDialogAgentAction-RMVRILLK.js} +9 -9
  136. package/{runAgentClientLoop-WWE753AB.js → runAgentClientLoop-EXIQDX7G.js} +58 -53
  137. package/{runtimeDoctorCommands-56NWKNON.js → runtimeDoctorCommands-MMCP4B4U.js} +12 -12
  138. package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
  139. package/{setDialogExtraReferencesAction-FWVD656I.js → setDialogExtraReferencesAction-L3V7JTMG.js} +8 -8
  140. package/{setPrimaryDialogAgentAction-HIPQTT6N.js → setPrimaryDialogAgentAction-X52JQGTJ.js} +9 -9
  141. package/settingThunks-N6XFWPOU.js +923 -0
  142. package/{spaceCommands-JQN7D4FE.js → spaceCommands-WQMUCGV7.js} +28 -26
  143. package/{streamAgentChatTurn-YD65RR4J.js → streamAgentChatTurn-DI2334G3.js} +153 -94
  144. package/{switchDialogAgentAction-SLTPB635.js → switchDialogAgentAction-ZJ5CGU7J.js} +7 -7
  145. package/{tableCommands-U3QDY4L6.js → tableCommands-IVC5S7Y3.js} +11 -11
  146. package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
  147. package/{tools-ZDLAPPTQ.js → tools-23VQGJOX.js} +42 -43
  148. package/{tuiSummaryLlmCaller-KLK6K3Q3.js → tuiSummaryLlmCaller-FESHBDTT.js} +7 -7
  149. package/{updateCommands-NQXAGFM7.js → updateCommands-FJHGWD3Q.js} +5 -3
  150. package/{updateDialogTitleAction-RQEO5PNQ.js → updateDialogTitleAction-AGAYHWS7.js} +21 -21
  151. package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
  152. package/chunk-GW7LIREE.js +0 -7012
  153. package/chunk-IA7TRNNR.js +0 -11
  154. package/chunk-UKZX3NHN.js +0 -48
  155. package/chunk-W4S6OTSC.js +0 -35
  156. package/clipboardy-GCO3GT3I.js +0 -11793
  157. package/settingThunks-SB37UY4C.js +0 -1371
  158. package/{agentGrantCommands-HOJ3JBBQ.js → agentGrantCommands-5DPHYEKP.js} +3 -3
  159. package/{chromeOpsCommands-3Z34RKSE.js → chromeOpsCommands-GZVVK7HU.js} +4 -4
  160. package/{chunk-XETG4RIX.js → chunk-AETZ7AD6.js} +4 -4
  161. package/{chunk-2IXDJNZI.js → chunk-GAGGEA7D.js} +3 -3
  162. package/{memoryCommands-CUNBFRVS.js → memoryCommands-ZS3VQJAL.js} +3 -3
  163. package/{offlineMarxistsAgentCommand-2QTHJCHV.js → offlineMarxistsAgentCommand-3GLX4QQY.js} +3 -3
@@ -1,32 +1,29 @@
1
- import {
2
- buildResponseGuidelines
3
- } from "./chunk-W4S6OTSC.js";
4
1
  import {
5
2
  getLocalProviderSecret
6
3
  } from "./chunk-HS7MLR74.js";
7
4
  import {
8
5
  performServerProxyFetchWithRetry
9
- } from "./chunk-4ZSZP7PY.js";
10
- import {
11
- shouldUseServerProxy
12
- } from "./chunk-UKZX3NHN.js";
6
+ } from "./chunk-QZIOZDM6.js";
13
7
  import {
14
8
  fetchServerSyncedCredential
15
- } from "./chunk-KO4VPOIN.js";
9
+ } from "./chunk-DT7EWFTY.js";
16
10
  import {
17
11
  buildSkillGuidancePromptBlock
18
- } from "./chunk-4Z245KOA.js";
12
+ } from "./chunk-SH3XD4E2.js";
19
13
  import {
14
+ CREDENTIAL_HYGIENE_RULE,
20
15
  DELETE_SAFETY_RED_LINE,
16
+ DISPATCH_BACKEND_POLICY,
21
17
  PARALLEL_DISPATCH_DEFAULT_RULE,
22
18
  PLATFORM_RISK_CONTROL_RULE,
23
19
  buildConsultationModeBlock,
24
20
  buildIdentityBlock,
21
+ buildResponseGuidelines,
25
22
  buildRuntimeGuidanceBlocks,
26
23
  compileContextLayers,
27
24
  detectDispatchIntentFromMessages,
28
25
  resolveToolGuidedSections
29
- } from "./chunk-TYND6RDQ.js";
26
+ } from "./chunk-QI2WVWXV.js";
30
27
  import {
31
28
  convertMessagesToResponsesInput,
32
29
  getUsageRequestOptions,
@@ -35,32 +32,33 @@ import {
35
32
  resolveReasoningReplayOptions,
36
33
  shouldStripReasoningContentForOutbound,
37
34
  stablePromptCacheKey
38
- } from "./chunk-6TF64IF2.js";
35
+ } from "./chunk-4L4K6YR7.js";
36
+ import {
37
+ resolveAgentCallPlan,
38
+ resolveClientWire
39
+ } from "./chunk-TT644UJD.js";
39
40
  import {
40
41
  createFileCredentialBroker
41
42
  } from "./chunk-UHTDNB5Y.js";
43
+ import {
44
+ MEMORY_USE_GUIDANCE,
45
+ buildUserResponseLanguageContext,
46
+ wrapHistoricalSummaryWithReplayGuard
47
+ } from "./chunk-4VJAC32I.js";
42
48
  import {
43
49
  canonicalizeToolNames
44
50
  } from "./chunk-5EBLANFT.js";
45
51
  import {
46
- ANTIGRAVITY_CLOUD_CODE_BASE_URL,
47
- isAntigravityCloudCodeBaseUrl,
48
- isAntigravityOAuthAgent
49
- } from "./chunk-JGRPBIZZ.js";
52
+ API_ENDPOINTS
53
+ } from "./chunk-LCBAMY2M.js";
50
54
  import {
51
55
  buildProviderAuthHeaders
52
- } from "./chunk-SUKSWFLP.js";
53
- import {
54
- isOpenAiResponsesModel,
55
- resolvePlatformChatCompletionsEndpoint,
56
- resolvePlatformResponsesEndpoint
57
- } from "./chunk-I2RMFLLH.js";
56
+ } from "./chunk-PIG2IUVZ.js";
58
57
  import {
59
58
  clampReasoningEffort,
60
- findModelConfig,
61
59
  getModelConfig,
62
60
  isModelSupportReasoningEffort
63
- } from "./chunk-TRW43TSC.js";
61
+ } from "./chunk-6EQD4AQL.js";
64
62
  import {
65
63
  isRecord
66
64
  } from "./chunk-KUG52IAP.js";
@@ -70,9 +68,6 @@ import {
70
68
  import {
71
69
  toErrorMessage
72
70
  } from "./chunk-HNMXYYJR.js";
73
- import {
74
- API_ENDPOINTS
75
- } from "./chunk-LCBAMY2M.js";
76
71
  import {
77
72
  isLoopbackUrl
78
73
  } from "./chunk-4SN6J65J.js";
@@ -85,14 +80,6 @@ import {
85
80
  isPlatformMimoProviderModel,
86
81
  resolveFireworksKimiModel
87
82
  } from "./chunk-CGFNDIKK.js";
88
- import {
89
- asTrimmedLowercaseString
90
- } from "./chunk-QSJ3HFEF.js";
91
- import {
92
- MEMORY_USE_GUIDANCE,
93
- buildUserResponseLanguageContext,
94
- wrapHistoricalSummaryWithReplayGuard
95
- } from "./chunk-4VJAC32I.js";
96
83
 
97
84
  // packages/agent-runtime/responsesConversationState.ts
98
85
  function supportsResponsesConversationState(agent) {
@@ -133,177 +120,6 @@ function isResponsesConversationStateRejection(status, responseBody) {
133
120
  return mentionsResponseState && rejectsState;
134
121
  }
135
122
 
136
- // packages/agent-runtime/agentCallPlan.ts
137
- var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
138
- var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
139
- var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
140
- function resolveClientWire(plan) {
141
- if (plan.upstreamWire === "gemini-cca") return "chat.completions";
142
- if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
143
- if (plan.upstreamWire === "cursor-connect") return "chat.completions";
144
- if (plan.upstreamWire === "devin-connect") return "chat.completions";
145
- if (plan.upstreamWire === "custom-gemini") return "chat.completions";
146
- if (plan.upstreamWire === "custom-openai-responses") return "chat.completions";
147
- if (plan.upstreamWire === "custom-anthropic-messages") return "chat.completions";
148
- if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
149
- return "chat.completions";
150
- }
151
- return plan.upstreamWire;
152
- }
153
- var XAI_CHAT_COMPLETIONS_URL = "https://api.x.ai/v1/chat/completions";
154
- var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
155
- var CODEX_REQUIRED_HEADERS = [
156
- "chatgpt-account-id",
157
- "OpenAI-Beta",
158
- "originator",
159
- "version"
160
- ];
161
- var ANTIGRAVITY_REQUIRED_HEADERS = [
162
- "User-Agent"
163
- // antigravity-specific UA (matches getAntigravityUserAgent)
164
- ];
165
- function agentShouldUseServerProxy(agentConfig) {
166
- return shouldUseServerProxy(agentConfig);
167
- }
168
- function resolveCustomUpstreamWire(endpoint, nativeProtocol) {
169
- const responsesEndpoint = endpoint.includes("/responses");
170
- if (nativeProtocol === "openai-responses" && responsesEndpoint) return "responses";
171
- if (nativeProtocol === "gemini") return "custom-gemini";
172
- if (nativeProtocol === "openai-responses") return "custom-openai-responses";
173
- if (nativeProtocol === "anthropic-messages") return "custom-anthropic-messages";
174
- return responsesEndpoint ? "responses" : "chat.completions";
175
- }
176
- function hasOwnCustomProviderKey(agentConfig) {
177
- const endpoint = asOptionalTrimmedString(agentConfig.customProviderUrl);
178
- if (!endpoint) return false;
179
- if (isAntigravityCloudCodeBaseUrl(endpoint)) return false;
180
- return Boolean(asOptionalTrimmedString(agentConfig.apiKey));
181
- }
182
- function resolveAgentCallPlan(agentConfig, _env) {
183
- const apiKeyRef = asTrimmedLowercaseString(agentConfig.apiKeyRef);
184
- const provider = asTrimmedLowercaseString(
185
- agentConfig.provider ?? agentConfig.apiSource
186
- );
187
- const ownCustomKeyWins = hasOwnCustomProviderKey(agentConfig);
188
- const oauthApiKeyRef = ownCustomKeyWins ? "" : apiKeyRef;
189
- if (!ownCustomKeyWins && isAntigravityOAuthAgent(agentConfig)) {
190
- return {
191
- authMethod: { kind: "oauth", ref: "antigravity" },
192
- transport: "server-proxy",
193
- upstreamWire: "gemini-cca",
194
- endpoint: ANTIGRAVITY_CLOUD_CODE_BASE_URL,
195
- requiredHeaders: [...ANTIGRAVITY_REQUIRED_HEADERS],
196
- vendor: provider || "google-antigravity"
197
- };
198
- }
199
- if (oauthApiKeyRef === "chatgpt") {
200
- return {
201
- authMethod: { kind: "oauth", ref: "chatgpt" },
202
- transport: "server-proxy",
203
- upstreamWire: "responses",
204
- endpoint: CODEX_RESPONSES_URL,
205
- requiredHeaders: [...CODEX_REQUIRED_HEADERS],
206
- vendor: provider || "openai"
207
- };
208
- }
209
- if (oauthApiKeyRef === "claude") {
210
- return {
211
- authMethod: { kind: "oauth", ref: "claude" },
212
- transport: "server-proxy",
213
- upstreamWire: "anthropic-messages",
214
- endpoint: ANTHROPIC_MESSAGES_URL,
215
- requiredHeaders: ["anthropic-version", "anthropic-beta"],
216
- vendor: provider || "anthropic"
217
- };
218
- }
219
- if (oauthApiKeyRef === "workbuddy" || oauthApiKeyRef === "workbuddy-ai") {
220
- return {
221
- authMethod: { kind: "oauth", ref: oauthApiKeyRef },
222
- transport: "server-proxy",
223
- upstreamWire: "chat.completions",
224
- endpoint: oauthApiKeyRef === "workbuddy" ? "https://copilot.tencent.com/v2/chat/completions" : "https://www.workbuddy.ai/v2/chat/completions",
225
- requiredHeaders: [],
226
- vendor: oauthApiKeyRef
227
- };
228
- }
229
- if (oauthApiKeyRef === "xai") {
230
- return {
231
- authMethod: { kind: "oauth", ref: "xai" },
232
- transport: "server-proxy",
233
- upstreamWire: "chat.completions",
234
- endpoint: XAI_CHAT_COMPLETIONS_URL,
235
- requiredHeaders: [],
236
- vendor: provider || "xai"
237
- };
238
- }
239
- if (oauthApiKeyRef === "cursor") {
240
- return {
241
- authMethod: { kind: "oauth", ref: "cursor" },
242
- transport: "server-proxy",
243
- upstreamWire: "cursor-connect",
244
- endpoint: CURSOR_AGENT_URL,
245
- requiredHeaders: [
246
- "x-cursor-client-version",
247
- "x-cursor-client-type",
248
- "x-ghost-mode"
249
- ],
250
- vendor: provider || "cursor"
251
- };
252
- }
253
- if (oauthApiKeyRef === "devin" || !ownCustomKeyWins && provider === "devin") {
254
- return {
255
- authMethod: { kind: "oauth", ref: "devin" },
256
- transport: "server-proxy",
257
- upstreamWire: "devin-connect",
258
- endpoint: DEVIN_CONNECT_URL,
259
- requiredHeaders: ["connect-protocol-version"],
260
- vendor: provider || "devin"
261
- };
262
- }
263
- if (agentConfig.cliProvider || agentConfig.apiSource === "cli" || provider === "cli") {
264
- return {
265
- authMethod: { kind: "cli", provider: agentConfig.cliProvider || provider || "codex" },
266
- transport: "direct",
267
- upstreamWire: "cli",
268
- endpoint: "",
269
- requiredHeaders: [],
270
- vendor: provider || "cli"
271
- };
272
- }
273
- if (agentConfig.customProviderUrl || agentConfig.apiSource === "custom") {
274
- const transport2 = agentShouldUseServerProxy(agentConfig) ? "server-proxy" : "direct";
275
- const endpoint2 = asOptionalTrimmedString(agentConfig.customProviderUrl) ?? "";
276
- const upstreamWire2 = resolveCustomUpstreamWire(
277
- endpoint2,
278
- findModelConfig(provider, agentConfig.model ?? "")?.nativeProtocol
279
- );
280
- return {
281
- authMethod: { kind: "custom-key" },
282
- transport: transport2,
283
- upstreamWire: upstreamWire2,
284
- endpoint: endpoint2,
285
- requiredHeaders: [],
286
- vendor: provider || "custom"
287
- };
288
- }
289
- const transport = agentShouldUseServerProxy(agentConfig) ? "server-proxy" : "direct";
290
- const useResponses = isOpenAiResponsesModel({
291
- provider,
292
- model: agentConfig.model,
293
- endpointKey: agentConfig.endpointKey
294
- });
295
- const upstreamWire = useResponses ? "responses" : "chat.completions";
296
- const endpoint = upstreamWire === "responses" ? resolvePlatformResponsesEndpoint(provider, agentConfig.model) ?? "" : resolvePlatformChatCompletionsEndpoint(provider, agentConfig.model) ?? "";
297
- return {
298
- authMethod: { kind: "platform-key" },
299
- transport,
300
- upstreamWire,
301
- endpoint,
302
- requiredHeaders: [],
303
- vendor: provider || "openai"
304
- };
305
- }
306
-
307
123
  // packages/ai/agent/buildSystemPrompt.ts
308
124
  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`;
309
125
  var isBrowser = typeof window !== "undefined";
@@ -455,6 +271,13 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
455
271
  cacheScope: "static",
456
272
  content: DELETE_SAFETY_RED_LINE
457
273
  },
274
+ // 凭据纪律:与红线同为无条件系统层块,四条装配线同源。
275
+ {
276
+ id: "credential-hygiene",
277
+ owner: "platform",
278
+ cacheScope: "static",
279
+ content: CREDENTIAL_HYGIENE_RULE
280
+ },
458
281
  // 并行是默认:系统层固定块,紧随红线(同为无条件前缀,不随工具/轮次变化)。
459
282
  {
460
283
  id: "parallel-dispatch-default",
@@ -462,6 +285,13 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
462
285
  cacheScope: "static",
463
286
  content: PARALLEL_DISPATCH_DEFAULT_RULE
464
287
  },
288
+ // 派发落点:并行派发纪律的下一层(派到哪个执行后端),紧随并行块。
289
+ {
290
+ id: "dispatch-backend-policy",
291
+ owner: "platform",
292
+ cacheScope: "static",
293
+ content: DISPATCH_BACKEND_POLICY
294
+ },
465
295
  // 平台风控纪律:无条件静态前缀,紧随并行派发块。
466
296
  {
467
297
  id: "platform-risk-control",
@@ -1397,8 +1227,6 @@ export {
1397
1227
  selectResponsesConversationState,
1398
1228
  updateResponsesConversationState,
1399
1229
  isResponsesConversationStateRejection,
1400
- resolveClientWire,
1401
- resolveAgentCallPlan,
1402
1230
  generateRequestBody,
1403
1231
  CONFIRMATION_INPUT_KEYS,
1404
1232
  stripModelToolArgs,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generatePkcePair,
3
3
  startCallbackServer
4
- } from "./chunk-7KYVUFDG.js";
4
+ } from "./chunk-G3VYRPTV.js";
5
5
  import {
6
6
  asOptionalFiniteNumber
7
7
  } from "./chunk-WWC7I6TA.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-A7HQF6YH.js";
10
+ } from "./chunk-CDLP56BS.js";
11
11
 
12
12
  // packages/chat/dialog/actions/setDialogExtraReferencesAction.ts
13
13
  var setDialogExtraReferencesAction = async (extraReferences, thunkApi) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-HXHSTRGH.js";
4
+ } from "./chunk-VYNMQ6HW.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  DEFAULT_NOLO_SERVER_URL
6
6
  } from "./chunk-OLZBQWZU.js";
7
- import {
8
- normalizeServerOrigin
9
- } from "./chunk-CF7PE763.js";
10
7
  import {
11
8
  loadProfileConfig
12
- } from "./chunk-TNIX77YM.js";
9
+ } from "./chunk-R5GO3YZP.js";
13
10
  import {
14
11
  resolveDefaultSpawn
15
12
  } from "./chunk-Y6ROFCZO.js";
13
+ import {
14
+ normalizeServerOrigin
15
+ } from "./chunk-CF7PE763.js";
16
16
 
17
17
  // packages/cli/updateCommands.ts
18
18
  import { existsSync as existsSync2, readFileSync as readFileSync2, accessSync, constants } from "node:fs";
@@ -912,6 +912,144 @@ async function runShellScript(script, {
912
912
  ]);
913
913
  return exitCode;
914
914
  }
915
+ function shellQuote(value) {
916
+ return "'" + value.replace(/'/g, "'\\''") + "'";
917
+ }
918
+ function buildStandaloneUpdateScript(args) {
919
+ const curl = "curl -fL --progress-bar --connect-timeout 20 --max-time 600 --speed-limit 1 --speed-time 60";
920
+ return `set -eu
921
+ EXTRACT_DIR=${shellQuote(args.extractDir)}
922
+ ENTRY=${shellQuote(args.symlinkPath)}
923
+ CURRENT_VERSION=${shellQuote(args.currentVersion)}
924
+ STAGING="$EXTRACT_DIR.new.$$"
925
+ BACKUP="$EXTRACT_DIR.old.$$"
926
+ LINK="$ENTRY.new.$$"
927
+ old_moved=0
928
+ new_moved=0
929
+ committed=0
930
+ cleanup() {
931
+ status=$?
932
+ trap - 0 HUP INT TERM
933
+ if [ "$committed" = 0 ]; then
934
+ if [ "$new_moved" = 1 ] && [ -d "$EXTRACT_DIR" ]; then
935
+ mv "$EXTRACT_DIR" "$STAGING" || exit 1
936
+ fi
937
+ if [ "$old_moved" = 1 ] && [ -d "$BACKUP" ]; then
938
+ mv "$BACKUP" "$EXTRACT_DIR" || exit 1
939
+ fi
940
+ fi
941
+ rm -rf "$STAGING" || true
942
+ rm -f "$LINK" || true
943
+ exit "$status"
944
+ }
945
+ # Refuse collisions before installing cleanup: never remove somebody else's path.
946
+ if [ -e "$STAGING" ] || [ -L "$STAGING" ] ||
947
+ [ -e "$BACKUP" ] || [ -L "$BACKUP" ] ||
948
+ [ -e "$LINK" ] || [ -L "$LINK" ]; then
949
+ echo "Error: update staging path already exists" >&2
950
+ exit 1
951
+ fi
952
+ mkdir -p "\${EXTRACT_DIR%/*}"
953
+ mkdir "$STAGING"
954
+ trap cleanup 0
955
+ trap 'exit 1' HUP INT TERM
956
+
957
+ echo ${shellQuote(`Downloading nolo from ${args.tarballUrl}...`)}
958
+ if ! ${curl} ${shellQuote(args.tarballUrl)} -o "$STAGING/bundle.tar.gz"; then
959
+ ${args.tarballUrl !== args.fallbackUrl ? `echo ${shellQuote(`Primary source unavailable, trying ${args.fallbackUrl}...`)}
960
+ if ! ${curl} ${shellQuote(args.fallbackUrl)} -o "$STAGING/bundle.tar.gz"; then
961
+ echo "Error: download failed" >&2
962
+ exit 1
963
+ fi` : `echo "Error: download failed" >&2
964
+ exit 1`}
965
+ fi
966
+ tar -xzf "$STAGING/bundle.tar.gz" -C "$STAGING"
967
+ rm -f "$STAGING/bundle.tar.gz"
968
+ chmod +x "$STAGING/nolo"
969
+ # A failing, empty or malformed version response must not touch the live install.
970
+ VERSION_TEXT=$("$STAGING/nolo" -v)
971
+ case "$VERSION_TEXT" in
972
+ "nolo-cli "*) VERSION=\${VERSION_TEXT#nolo-cli } ;;
973
+ *) VERSION=$VERSION_TEXT ;;
974
+ esac
975
+ CORE=\${VERSION%%[-+]*}
976
+ MAJOR=\${CORE%%.*}
977
+ REST=\${CORE#*.}
978
+ MINOR=\${REST%%.*}
979
+ PATCH=\${REST#*.}
980
+ case "$MAJOR:$MINOR:$PATCH" in
981
+ *[!0-9:]*|:*|*::*|*:) echo "Error: invalid bundle version" >&2; exit 1 ;;
982
+ esac
983
+ if [ "$CORE" != "$MAJOR.$MINOR.$PATCH" ]; then
984
+ echo "Error: invalid bundle version" >&2
985
+ exit 1
986
+ fi
987
+ case "$VERSION" in
988
+ *[!0-9A-Za-z.+-]*) echo "Error: invalid bundle version" >&2; exit 1 ;;
989
+ esac
990
+ case "$CURRENT_VERSION" in
991
+ "nolo-cli "*) CUR_VER=\${CURRENT_VERSION#nolo-cli } ;;
992
+ *) CUR_VER=$CURRENT_VERSION ;;
993
+ esac
994
+ CUR_CORE=\${CUR_VER%%[-+]*}
995
+ CUR_MAJOR=\${CUR_CORE%%.*}
996
+ CUR_REST=\${CUR_CORE#*.}
997
+ CUR_MINOR=\${CUR_REST%%.*}
998
+ CUR_PATCH=\${CUR_REST#*.}
999
+ if [ -n "$CUR_MAJOR" ] && [ -n "$CUR_MINOR" ] && [ -n "$CUR_PATCH" ]; then
1000
+ case "$CUR_MAJOR:$CUR_MINOR:$CUR_PATCH" in
1001
+ *[!0-9:]*|:*|*::*|*:) ;;
1002
+ *)
1003
+ if [ "$CUR_CORE" = "$CUR_MAJOR.$CUR_MINOR.$CUR_PATCH" ]; then
1004
+ is_downgrade=0
1005
+ if [ "$MAJOR" -lt "$CUR_MAJOR" ]; then
1006
+ is_downgrade=1
1007
+ elif [ "$MAJOR" -eq "$CUR_MAJOR" ]; then
1008
+ if [ "$MINOR" -lt "$CUR_MINOR" ]; then
1009
+ is_downgrade=1
1010
+ elif [ "$MINOR" -eq "$CUR_MINOR" ]; then
1011
+ if [ "$PATCH" -lt "$CUR_PATCH" ]; then
1012
+ is_downgrade=1
1013
+ fi
1014
+ fi
1015
+ fi
1016
+ if [ "$is_downgrade" = 1 ]; then
1017
+ echo "Error: refusing downgrade from $CURRENT_VERSION to $VERSION" >&2
1018
+ exit 11
1019
+ fi
1020
+ fi
1021
+ ;;
1022
+ esac
1023
+ fi
1024
+ if [ "$VERSION" = "$CURRENT_VERSION" ]; then
1025
+ echo "\u2713 Already up to date (nolo-cli $VERSION)."
1026
+ exit 10
1027
+ fi
1028
+ mkdir -p "\${ENTRY%/*}"
1029
+ # mv without -T is portable only when the destination is not a directory.
1030
+ if [ -d "$ENTRY" ] || [ -L "$EXTRACT_DIR" ]; then
1031
+ echo "Error: refusing directory entrypoint or symlink bundle directory" >&2
1032
+ exit 1
1033
+ fi
1034
+ ln -s "$EXTRACT_DIR/nolo" "$LINK"
1035
+ if [ -e "$EXTRACT_DIR" ]; then
1036
+ old_moved=1
1037
+ mv "$EXTRACT_DIR" "$BACKUP"
1038
+ fi
1039
+ new_moved=1
1040
+ mv "$STAGING" "$EXTRACT_DIR"
1041
+ mv -f "$LINK" "$ENTRY"
1042
+ committed=1
1043
+ # Retain only the newest recovery copy from this run; prune older backups.
1044
+ for old_copy in "$EXTRACT_DIR.old."*; do
1045
+ if [ -d "$old_copy" ] && [ ! -L "$old_copy" ] && [ "$old_copy" != "$BACKUP" ]; then
1046
+ rm -rf "$old_copy" || true
1047
+ fi
1048
+ done
1049
+ # Retain the previous bundle as a recovery copy; never unlink the live entry.
1050
+ echo "nolo updated to $ENTRY"
1051
+ `;
1052
+ }
915
1053
  async function runStandaloneBundleUpdate(options) {
916
1054
  const output = options.output ?? process.stdout;
917
1055
  const spawn2 = options.spawn ?? resolveDefaultSpawn();
@@ -937,33 +1075,13 @@ async function runStandaloneBundleUpdate(options) {
937
1075
  const extractDir = join2(homedir2(), ".nolo", extractSubdir);
938
1076
  const installDir = resolveStandaloneInstallDir();
939
1077
  const symlinkPath = join2(installDir, "nolo");
940
- const script = `set -euo pipefail
941
- TEMP_DIR=$(mktemp -d)
942
- trap 'rm -rf "$TEMP_DIR"' EXIT
943
-
944
- echo "Downloading nolo from ${tarballUrl}..."
945
- if ! curl -fL --progress-bar "${tarballUrl}" -o "$TEMP_DIR/${tarballName}"; then
946
- ${tarballUrl !== fallbackUrl ? `echo "Primary source unavailable, trying ${fallbackUrl}..."
947
- if ! curl -fL --progress-bar "${fallbackUrl}" -o "$TEMP_DIR/${tarballName}"; then
948
- echo "Error: download failed from ${fallbackUrl}" >&2
949
- exit 1
950
- fi` : `echo "Error: download failed from ${tarballUrl}" >&2
951
- exit 1`}
952
- fi
953
-
954
- mkdir -p "${extractDir}"
955
- tar -xzf "$TEMP_DIR/${tarballName}" -C "${extractDir}"
956
- chmod +x "${extractDir}/nolo"
957
-
958
- mkdir -p "${installDir}"
959
- if [ -e "${symlinkPath}" ] || [ -L "${symlinkPath}" ]; then
960
- rm -f "${symlinkPath}"
961
- fi
962
- ln -s "${extractDir}/nolo" "${symlinkPath}"
963
- trap - EXIT
964
-
965
- echo "nolo updated to ${installDir}/nolo"
966
- `;
1078
+ const script = buildStandaloneUpdateScript({
1079
+ tarballUrl,
1080
+ fallbackUrl,
1081
+ extractDir,
1082
+ symlinkPath,
1083
+ currentVersion: readPackageInfo().version
1084
+ });
967
1085
  output.write(`
968
1086
  Nolo Agent CLI Installer & Updater
969
1087
  `);
@@ -980,6 +1098,11 @@ Nolo Agent CLI Installer & Updater
980
1098
  env,
981
1099
  useCustomSink
982
1100
  });
1101
+ if (exitCode === 10) {
1102
+ output.write(` ${renderProgressBar(100)}
1103
+ `);
1104
+ return 0;
1105
+ }
983
1106
  if (exitCode === 0) {
984
1107
  output.write(` ${renderProgressBar(100)}
985
1108
  `);
@@ -1167,6 +1290,7 @@ export {
1167
1290
  buildSelfUpdateCommand,
1168
1291
  resolveSelfUpdateServerUrl,
1169
1292
  buildCliDoctorText,
1293
+ buildStandaloneUpdateScript,
1170
1294
  runStandaloneBundleUpdate,
1171
1295
  NOLO_UPDATE_CHECK_KILL_SWITCH,
1172
1296
  compareCliVersions,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-GW7LIREE.js";
3
+ } from "./chunk-YR47Y7CN.js";
4
4
  import {
5
5
  format,
6
6
  prepareAndPersistMessage,
7
7
  uiAskChoiceFunc,
8
8
  uiAskChoiceFunctionSchema
9
- } from "./chunk-ZJWUXAJ7.js";
9
+ } from "./chunk-F5WASHQA.js";
10
10
  import {
11
11
  formatISO
12
12
  } from "./chunk-ZRAU6T47.js";
@@ -16,16 +16,16 @@ import {
16
16
  removeCachedEntity,
17
17
  upsertSSREntity,
18
18
  write
19
- } from "./chunk-A7HQF6YH.js";
19
+ } from "./chunk-CDLP56BS.js";
20
20
  import {
21
21
  isDevelopment
22
22
  } from "./chunk-6Q7UTJKR.js";
23
23
  import {
24
24
  selectIdentityUserId
25
- } from "./chunk-SEJ5OS6F.js";
25
+ } from "./chunk-PXYBUFDB.js";
26
26
  import {
27
27
  buildBuiltinObjectSkillReference
28
- } from "./chunk-JZX2XLKC.js";
28
+ } from "./chunk-YCRROBDY.js";
29
29
  import {
30
30
  extractCustomId
31
31
  } from "./chunk-M2EJHDJP.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolvePlatformAuthToken
3
- } from "./chunk-SUKSWFLP.js";
3
+ } from "./chunk-PIG2IUVZ.js";
4
4
  import {
5
5
  getCredentialsDir
6
6
  } from "./chunk-ZWQUWF6W.js";
@@ -4,14 +4,14 @@ import {
4
4
  import {
5
5
  patch,
6
6
  read
7
- } from "./chunk-A7HQF6YH.js";
7
+ } from "./chunk-CDLP56BS.js";
8
8
  import {
9
9
  DEVICE_LOCAL_OWNER_ID,
10
10
  isDeviceLocalSpaceBody
11
- } from "./chunk-4YRTZIVN.js";
11
+ } from "./chunk-43OFVLWJ.js";
12
12
  import {
13
13
  selectIdentityUserId
14
- } from "./chunk-SEJ5OS6F.js";
14
+ } from "./chunk-PXYBUFDB.js";
15
15
 
16
16
  // packages/create/space/utils/permissions.ts
17
17
  var checkSpaceMembership = (spaceData, userId) => {