nolo-cli 0.250.0-alpha.1 → 0.252.0-alpha.1

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 (186) hide show
  1. package/{_executeModel-F4MT6OPO.js → _executeModel-D6G3B45S.js} +51 -51
  2. package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
  3. package/{addContentAction-MLI6GOBV.js → addContentAction-MB22YIDV.js} +6 -6
  4. package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
  5. package/{agentDeleteCommand-DBCRHB4S.js → agentDeleteCommand-YCWDGJSF.js} +87 -82
  6. package/{agentEmailCommands-T4PAJ4KG.js → agentEmailCommands-DTWD5FWC.js} +87 -82
  7. package/{agentListCommands-5ULWKQ3E.js → agentListCommands-JTOONLYL.js} +233 -46
  8. package/{agentMachineCommands-65QUOCEY.js → agentMachineCommands-25X7OTLQ.js} +38 -36
  9. package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
  10. package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-6OCNLVGC.js} +1 -1
  11. package/{agentRecordCommands-EKANS3A5.js → agentRecordCommands-SXE3WV2X.js} +86 -81
  12. package/{agentRunCommand-336PXBRJ.js → agentRunCommand-QSIED54S.js} +87 -82
  13. package/{agentRunControl-QMWTWV7C.js → agentRunControl-KNNDEEDI.js} +8 -6
  14. package/{agentRuntimeLocal-KKXJOBD3.js → agentRuntimeLocal-HVJJMB4W.js} +32 -31
  15. package/{agentSlice-FWYXP332.js → agentSlice-NBUJJVRI.js} +7 -7
  16. package/{appDeleteCommands-ERJK367V.js → appDeleteCommands-YU6TT6VN.js} +39 -37
  17. package/{appDeployCommands-LUV6QKQJ.js → appDeployCommands-4DEIX7YP.js} +39 -37
  18. package/{appDeployStatusCommands-WW7IYQD4.js → appDeployStatusCommands-3VKS6GBQ.js} +39 -37
  19. package/{appGetCommands-G7XYYSFO.js → appGetCommands-22FNNROT.js} +39 -37
  20. package/{appListCommands-4RXCIDNI.js → appListCommands-FVGMLHVU.js} +39 -37
  21. package/{authCommand-3C3RN4OU.js → authCommand-5DC3ES4Q.js} +15 -15
  22. package/{authCommands-ZMVEDCQD.js → authCommands-BLXNAUF4.js} +2 -2
  23. package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-AA555ANS.js} +1 -1
  24. package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
  25. package/chunk-2GAUJDA5.js +594 -0
  26. package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
  27. package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
  28. package/{chunk-W4G25PVP.js → chunk-2PB653F5.js} +196 -253
  29. package/{chunk-UF6J7NXV.js → chunk-3272HU62.js} +1 -1
  30. package/chunk-3A5NNQCN.js +64 -0
  31. package/{chunk-7IQA2VJF.js → chunk-3N3JPQBQ.js} +210 -56
  32. package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
  33. package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
  34. package/{chunk-ADOOL3PG.js → chunk-52M4RYVP.js} +1 -1
  35. package/{chunk-U7OMQLRE.js → chunk-5IN2NBDX.js} +9 -9
  36. package/{chunk-BAH3BAUZ.js → chunk-5QEOTC35.js} +5 -5
  37. package/{chunk-E5RYFR7E.js → chunk-5UYDG6HP.js} +19 -0
  38. package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
  39. package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
  40. package/{chunk-BFKJ2RS3.js → chunk-7RYODZDD.js} +1 -1
  41. package/{chunk-YWNCRUBZ.js → chunk-7XO73H5X.js} +116 -6
  42. package/{chunk-SMEX763N.js → chunk-7ZOVFB2H.js} +100 -43
  43. package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
  44. package/{chunk-ZKMS73DK.js → chunk-A6VIMCWI.js} +3 -3
  45. package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
  46. package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
  47. package/{chunk-HZDK56EK.js → chunk-CO2NXG2J.js} +32 -10
  48. package/{chunk-OHUYN3YU.js → chunk-CYGFNMCH.js} +1 -1
  49. package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
  50. package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
  51. package/{chunk-VV5IS3ES.js → chunk-DU3DJYVA.js} +5 -5
  52. package/{chunk-SPU3L3OR.js → chunk-EFM2IPZR.js} +3 -3
  53. package/{chunk-73PZD7JZ.js → chunk-EG3JTV7H.js} +2 -2
  54. package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
  55. package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
  56. package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
  57. package/{chunk-TMRJGSK2.js → chunk-FRC2DNTN.js} +1 -1
  58. package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
  59. package/{chunk-I3J7HO3U.js → chunk-FZI2P64R.js} +137 -53
  60. package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
  61. package/{chunk-XHG7QROB.js → chunk-GO7UC5VH.js} +5 -5
  62. package/{chunk-RDBDHGU7.js → chunk-GVH2IP2M.js} +5 -5
  63. package/{chunk-AXZ5DDLB.js → chunk-GWS2X7TX.js} +235 -120
  64. package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
  65. package/{chunk-ATRU65OK.js → chunk-HMREADP6.js} +21 -19
  66. package/chunk-HZD5HXUO.js +405 -0
  67. package/{chunk-VHMPJGT4.js → chunk-ITCOQAHS.js} +3 -3
  68. package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
  69. package/chunk-IVK2KT3H.js +209 -0
  70. package/{chunk-FFFKAOJN.js → chunk-JAYPSNGR.js} +1 -1
  71. package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
  72. package/{chunk-3IVFGQIM.js → chunk-JF5QT3YY.js} +2 -2
  73. package/{chunk-V4IYI3SB.js → chunk-JKALGWDL.js} +2 -2
  74. package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
  75. package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
  76. package/{chunk-HEIIOJGN.js → chunk-LAQC5FAP.js} +4 -4
  77. package/{chunk-I3OW5RAX.js → chunk-LNIA5JVX.js} +8 -8
  78. package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
  79. package/{chunk-W6T4FNZP.js → chunk-LUPZLKXL.js} +192 -352
  80. package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
  81. package/{chunk-SHDJLJWV.js → chunk-N2ZAY2DK.js} +1 -1
  82. package/{chunk-WEZ27JA7.js → chunk-NMXGIRSG.js} +1 -1
  83. package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
  84. package/{chunk-ARFCL53U.js → chunk-NPUHKEOB.js} +4 -4
  85. package/{chunk-32WTED6G.js → chunk-O6LPLIRS.js} +94 -83
  86. package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
  87. package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
  88. package/{chunk-UPOW5HTG.js → chunk-OMIXG25B.js} +2 -2
  89. package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
  90. package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
  91. package/{chunk-OKKA4BCM.js → chunk-P6HMEKLL.js} +114 -56
  92. package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
  93. package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
  94. package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
  95. package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
  96. package/{chunk-6TVYUQRM.js → chunk-QV32GSVO.js} +2 -2
  97. package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
  98. package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
  99. package/{chunk-JFRJEPFI.js → chunk-SMZFWEMX.js} +1 -1
  100. package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
  101. package/{chunk-D25ONVOH.js → chunk-SSZHE2RK.js} +1 -1
  102. package/{chunk-OLGFIQN2.js → chunk-T4VVQHSE.js} +1 -1
  103. package/{chunk-6QL3SUEK.js → chunk-TDI7ARZO.js} +3 -3
  104. package/{chunk-X6LYQDN5.js → chunk-TDLZA6LJ.js} +13 -10
  105. package/chunk-TRRXYFTR.js +46 -0
  106. package/{chunk-WMKA2DPK.js → chunk-TTUIM3PJ.js} +4 -4
  107. package/{chunk-RHBD22LV.js → chunk-TTWNTFTO.js} +39 -4
  108. package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
  109. package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
  110. package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
  111. package/{chunk-BVEDT6DM.js → chunk-VH7AQEEF.js} +3 -3
  112. package/{chunk-PGDM7AM2.js → chunk-WAOHK3NJ.js} +9 -9
  113. package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
  114. package/{chunk-ZTWDSOXD.js → chunk-WNIBQBOR.js} +1 -1
  115. package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
  116. package/chunk-XRGBJHZX.js +136 -0
  117. package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
  118. package/{chunk-AKWA6PCE.js → chunk-YQYYYATY.js} +45 -27
  119. package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
  120. package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
  121. package/{chunk-YQO5UKHP.js → chunk-ZNOXY73P.js} +632 -124
  122. package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-FKBPFPKR.js} +7 -7
  123. package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
  124. package/cliAuthorityBrokerProcess-IUCB4XA6.js +22 -0
  125. package/{cliLocalAgentRecordReader-R4CLUHYO.js → cliLocalAgentRecordReader-DWU3LBO2.js} +36 -35
  126. package/{commandRegistry-UIZRI4JV.js → commandRegistry-7FVATZS2.js} +74 -74
  127. package/{contentThunks-ZQSZA4GH.js → contentThunks-25XCB7VY.js} +20 -20
  128. package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-PT5L4LNB.js} +3 -3
  129. package/{createAgentAutomationAction-RQE4F6PR.js → createAgentAutomationAction-FC5RI2LW.js} +20 -20
  130. package/{createDialogAction-JDSMQ34U.js → createDialogAction-IL3ISSQQ.js} +21 -21
  131. package/{createPageAction-VLF6XCYO.js → createPageAction-RVYBEYZV.js} +23 -23
  132. package/{db-CMUTP3W5.js → db-JMGVD4TB.js} +4 -2
  133. package/{dbSlice-656PMWR2.js → dbSlice-WG3ZG6PZ.js} +5 -5
  134. package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
  135. package/{dialogCommands-PLM7ZFWH.js → dialogCommands-VUJISJZF.js} +48 -42
  136. package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-JKYVSR6K.js} +8 -8
  137. package/{dialogSlice-63DD2ER2.js → dialogSlice-UMP55UAW.js} +18 -18
  138. package/{dialogUsageCommand-6RW2FY6K.js → dialogUsageCommand-IHAXS7DW.js} +5 -5
  139. package/{docCreateCommands-BST5DO7L.js → docCreateCommands-S46F6GKP.js} +38 -36
  140. package/{docDeleteCommands-YE6G2SO4.js → docDeleteCommands-LJG4NK6J.js} +39 -37
  141. package/{docReadCommands-M6T35U3G.js → docReadCommands-YPAYGHNM.js} +38 -36
  142. package/{docStore-7QNJWRJ2.js → docStore-VK3MVJ5Q.js} +6 -6
  143. package/{docUpdateCommands-6DFWGPVG.js → docUpdateCommands-MPTM6267.js} +38 -36
  144. package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
  145. package/{handleSendMessageAction-FCEFFAV4.js → handleSendMessageAction-VPKVNKBU.js} +83 -41
  146. package/{hostCredentialCreate-YEWCAMZN.js → hostCredentialCreate-K56HWPNY.js} +86 -81
  147. package/index.js +23 -11
  148. package/{localDialogRead-CIOTQM5T.js → localDialogRead-NXILOV3T.js} +1 -1
  149. package/{localRuntimeAdapter-Z22ZOZRY.js → localRuntimeAdapter-KVU72FWT.js} +84 -79
  150. package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-QKWTPBQQ.js} +13 -3
  151. package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-3CIC4SKC.js} +1 -1
  152. package/{machineCommands-PT5OJ36V.js → machineCommands-C3O5RKNJ.js} +85 -80
  153. package/{machineWsRunDispatch-DQVNBSVE.js → machineWsRunDispatch-ZLART7ZA.js} +85 -80
  154. package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
  155. package/{mcpLocalAuthorizeCommand-GO6AYT63.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +15 -11
  156. package/{memberThunks-JFYC4Z5L.js → memberThunks-7DNR6DRD.js} +7 -7
  157. package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
  158. package/package.json +2 -1
  159. package/{projectArchive-4XUC5SLF.js → projectArchive-UBJFYRL7.js} +23 -23
  160. package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
  161. package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
  162. package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
  163. package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
  164. package/{readlineWorkspace-7U5QM3OM.js → readlineWorkspace-TSIYF7C6.js} +655 -248
  165. package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
  166. package/{runAgentClientLoop-7D7UCAS2.js → runAgentClientLoop-YAHGOWXN.js} +48 -48
  167. package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-QGZSKNSE.js} +14 -11
  168. package/{secretCommands-2FEMRUFM.js → secretCommands-BXAQEOES.js} +2 -2
  169. package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
  170. package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
  171. package/{settingThunks-IHXUF276.js → settingThunks-YQNG5L6K.js} +5 -5
  172. package/{spaceCommands-WCLD36WH.js → spaceCommands-P644AAZZ.js} +37 -35
  173. package/{streamAgentChatTurn-DVTOINT3.js → streamAgentChatTurn-5CSYAUAY.js} +81 -77
  174. package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
  175. package/{tools-BOPINT5S.js → tools-UZ3CDIR2.js} +38 -38
  176. package/{tuiRestart-5F2APN66.js → tuiRestart-GF4DGAAN.js} +7 -7
  177. package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +13 -13
  178. package/{updateCommands-FBYA5WVG.js → updateCommands-BZ4YDHNM.js} +3 -3
  179. package/{updateDialogTitleAction-S76PUCLQ.js → updateDialogTitleAction-53XCCDK2.js} +20 -20
  180. package/{usageCommand-L4OFWXEU.js → usageCommand-XVJ7ZUTM.js} +2 -2
  181. package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-NK6S3D4J.js} +3 -3
  182. package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
  183. package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
  184. package/chunk-FGHEF6WI.js +0 -34
  185. package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
  186. package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  resolveRuntimeAuthToken,
14
14
  resolveRuntimeServerUrl
15
- } from "./chunk-GX6DITLQ.js";
15
+ } from "./chunk-UUCYUN6Y.js";
16
16
  import {
17
17
  AGENT_RUN_PROTOCOL,
18
18
  HOST_RUNTIME_CONTENT_IDENTITY,
@@ -528,6 +528,37 @@ function createShellApprovalChild(channel, timeoutMs = TTL2) {
528
528
  };
529
529
  }
530
530
 
531
+ // packages/cli/client/reviewVerdict.ts
532
+ var SEVERITIES = ["CRITICAL", "HIGH", "MEDIUM", "LOW"];
533
+ var BLOCKERS = ["CRITICAL", "HIGH"];
534
+ function stripFrontmatter(markdown) {
535
+ return markdown.replace(/^---[\r\n]+[\s\S]*?[\r\n]+---(?:\r?\n|$)/, "");
536
+ }
537
+ function parseStructuredReview(text) {
538
+ const body = stripFrontmatter(text).trim();
539
+ if (!body.startsWith("{")) return { kind: "legacy" };
540
+ const nonempty = (v) => typeof v === "string" && v.trim().length > 0;
541
+ try {
542
+ const value = JSON.parse(body);
543
+ const keys = ["schemaVersion", "revision", "status", "reason", "findings"];
544
+ if (!value || value.schemaVersion !== 1 || Object.keys(value).some((k) => !keys.includes(k)) || !["completed", "incomplete"].includes(value.status) || !nonempty(value.revision) || !Array.isArray(value.findings) || value.reason !== void 0 && (value.status !== "incomplete" || !nonempty(value.reason)) || value.status === "incomplete" && !nonempty(value.reason))
545
+ return { kind: "invalid", reason: "\u7ED3\u6784\u5316\u5BA1\u67E5\u5B57\u6BB5\u65E0\u6548\u6216\u672A\u5B8C\u6210\u539F\u56E0\u7F3A\u5931" };
546
+ const ids = /* @__PURE__ */ new Set();
547
+ const findingKeys = ["id", "severity", "file", "line", "evidence", "impact"];
548
+ for (const f of value.findings) {
549
+ if (!f || Object.keys(f).some((k) => !findingKeys.includes(k)) || !nonempty(f.id) || ids.has(f.id.trim()) || !SEVERITIES.includes(f.severity) || !nonempty(f.file) || !Number.isSafeInteger(f.line) || f.line < 1 || !nonempty(f.evidence) || !nonempty(f.impact))
550
+ return { kind: "invalid", reason: "\u7ED3\u6784\u5316 finding \u65E0\u6548\u6216 id \u91CD\u590D" };
551
+ ids.add(f.id.trim());
552
+ }
553
+ return { kind: "structured", review: value };
554
+ } catch {
555
+ return { kind: "invalid", reason: "\u7ED3\u6784\u5316\u5BA1\u67E5 JSON \u65E0\u6548" };
556
+ }
557
+ }
558
+ function structuredReviewVerdict(review) {
559
+ return review.status === "completed" && !review.findings.some((f) => BLOCKERS.includes(f.severity)) ? "APPROVE" : "BLOCK";
560
+ }
561
+
531
562
  // packages/core/redactLogLines.ts
532
563
  var TAIL_LINES_MAX = 500;
533
564
  var REDACTED_TOKEN = "[REDACTED_TOKEN]";
@@ -1423,6 +1454,77 @@ function classifyRunFailure(input) {
1423
1454
  }
1424
1455
 
1425
1456
  // packages/cli/agentRunControl.ts
1457
+ var STANDALONE_VERDICT_RE = /^(APPROVE|WARNING|BLOCK)$/i;
1458
+ var LABELED_VERDICT_RE = /^(?:结论|判定|VERDICT)\s*[::]\s*(APPROVE|WARNING|BLOCK)$/i;
1459
+ var STANDALONE_ESCALATION_RE = /^need_escalation$/i;
1460
+ var ESCALATION_WITH_DETAIL_RE = /^need_escalation\s*[::]\s*\S/i;
1461
+ var LABELED_ESCALATION_RE = /^(?:状态|结论|判定|status|escalation|escalated)\s*[::]\s*need_escalation\b/i;
1462
+ function stripVerdictDecoration(line) {
1463
+ return line.replace(/^\s*(?:[-*+>]|\d+[.)])\s*/, "").replace(/[*`"']/g, "").replace(/^_+|_+$/g, "").trim();
1464
+ }
1465
+ function leadingColumns(line) {
1466
+ let col = 0;
1467
+ for (const ch of line) {
1468
+ if (ch === " ") col += 1;
1469
+ else if (ch === " ") col += 4 - col % 4;
1470
+ else break;
1471
+ }
1472
+ return col;
1473
+ }
1474
+ function assertionLines(text) {
1475
+ const kept = [];
1476
+ let fence = null;
1477
+ for (const rawLine of text.split(/\r?\n/)) {
1478
+ const indent = leadingColumns(rawLine);
1479
+ const content = rawLine.replace(/^[ \t]*/, "");
1480
+ if (fence) {
1481
+ if (indent >= 4) continue;
1482
+ if (new RegExp(`^\\${fence.char}{${fence.length},}\\s*$`).test(content)) fence = null;
1483
+ continue;
1484
+ }
1485
+ if (indent >= 4) continue;
1486
+ const open = /^(`{3,}|~{3,})/.exec(content);
1487
+ if (open) {
1488
+ fence = { char: open[1][0], length: open[1].length };
1489
+ continue;
1490
+ }
1491
+ if (/^>/.test(content)) continue;
1492
+ kept.push(rawLine);
1493
+ }
1494
+ return kept;
1495
+ }
1496
+ function parseWholeTextJson(text) {
1497
+ const trimmed = text.trim();
1498
+ if (!trimmed) return void 0;
1499
+ try {
1500
+ return { value: JSON.parse(trimmed) };
1501
+ } catch {
1502
+ return void 0;
1503
+ }
1504
+ }
1505
+ function deriveRunFinalObservation(text) {
1506
+ if (typeof text !== "string" || !text.trim()) return { escalated: false };
1507
+ const lines = assertionLines(text);
1508
+ const wholeJson = parseWholeTextJson(text);
1509
+ const escalated = wholeJson ? typeof wholeJson.value === "object" && wholeJson.value !== null && !Array.isArray(wholeJson.value) && wholeJson.value.status === "need_escalation" : lines.some((line) => {
1510
+ const bare = stripVerdictDecoration(line);
1511
+ return STANDALONE_ESCALATION_RE.test(bare) || ESCALATION_WITH_DETAIL_RE.test(bare) || LABELED_ESCALATION_RE.test(bare);
1512
+ });
1513
+ const structured = parseStructuredReview(text);
1514
+ if (structured.kind === "structured") {
1515
+ return { escalated, reviewVerdict: structuredReviewVerdict(structured.review) };
1516
+ }
1517
+ if (structured.kind === "invalid" || wholeJson) return { escalated };
1518
+ const found = /* @__PURE__ */ new Set();
1519
+ for (const line of lines) {
1520
+ const bare = stripVerdictDecoration(line);
1521
+ const hit = LABELED_VERDICT_RE.exec(bare) ?? STANDALONE_VERDICT_RE.exec(bare);
1522
+ if (!hit) continue;
1523
+ found.add(hit[1].toUpperCase());
1524
+ }
1525
+ if (found.size !== 1) return { escalated };
1526
+ return { escalated, reviewVerdict: [...found][0] };
1527
+ }
1426
1528
  var RUN_TERMINAL_STATUSES = /* @__PURE__ */ new Set([
1427
1529
  "done",
1428
1530
  "failed",
@@ -2657,11 +2759,12 @@ function validateLocalWriterChild(runId, cwd, policy, deps = {}) {
2657
2759
  if (!r || r.runId !== runId || r.pid !== process.pid || r.status !== "running" || e?.state !== "known" || e.kind !== "host-local" || e.runtimeKey !== "local" || e.device.kind !== "localhost" || e.device.hostname !== nodeHostname() || e.device.platform !== process.platform || !["cli-command-authorized", "cli-tool-dispatch-authorized"].includes(e.provenance) || e.owner.state !== "verified" || native.state !== "verified" || e.owner.pid !== process.pid || e.owner.startedAt !== native.startedAt || (e.owner.linux?.bootId !== native.linux?.bootId || e.owner.linux?.startTicks !== native.linux?.startTicks) || r.processIdentity !== "verified" || r.processStartedAt !== e.owner.startedAt || e.canonicalCwd !== real || r.cwd !== real || e.permissions.hostWritesAuthorized !== policy.hostWritesAuthorized || e.permissions.readOnly !== policy.readOnly) fail("native identity/authorization");
2658
2760
  if (e?.state !== "known") return fail();
2659
2761
  const set = (v) => JSON.stringify(v === void 0 ? null : [...new Set(v)].sort());
2660
- if (set(e.permissions.allowedToolNames) !== set(policy.allowedToolNames) || set(e.permissions.blockedToolNames) !== set(policy.blockedToolNames) || JSON.stringify(e.worktree) !== JSON.stringify(trustedLocalWorktree(real, deps))) fail("scope/worktree");
2762
+ if (set(e.permissions.allowedToolNames) !== set(policy.allowedToolNames) || !policy.readOnly && set(e.permissions.blockedToolNames) !== set(policy.blockedToolNames) || JSON.stringify(e.worktree) !== JSON.stringify(trustedLocalWorktree(real, deps))) fail("scope/worktree");
2661
2763
  if (!policy.readOnly && (!policy.hostWritesAuthorized || r?.localWriterClaim?.state !== "held" || r.localWriterClaim.cwd !== real || e.worktree && (r.localWriterClaim.worktree?.root !== e.worktree.root || r.localWriterClaim.worktree.gitDir !== e.worktree.gitDir))) fail();
2662
- return true;
2764
+ const blockedToolNames = policy.readOnly ? [.../* @__PURE__ */ new Set([...e.permissions.blockedToolNames ?? [], ...policy.blockedToolNames ?? []])] : policy.blockedToolNames;
2765
+ return { blockedToolNames };
2663
2766
  }, { strict: true, requireDeadOwner: true });
2664
- if (!validated) fail("registry lock busy");
2767
+ return validated ?? fail("registry lock busy");
2665
2768
  }
2666
2769
  async function awaitLocalWriterChild(runId, cwd, policy, deps = {}) {
2667
2770
  if (!/^[A-Za-z0-9_-]+$/.test(runId)) throw new Error("[local-writer-resource] child binding invalid id");
@@ -2675,8 +2778,7 @@ async function awaitLocalWriterChild(runId, cwd, policy, deps = {}) {
2675
2778
  const native = publication ? nativeOwner(publication.parent.pid, deps) : { state: "unknown" };
2676
2779
  const parentLive = publication && native.state === "verified" && publication.parent.startedAt === native.startedAt && publication.parent.linux?.bootId === native.linux?.bootId && publication.parent.linux?.startTicks === native.linux?.startTicks;
2677
2780
  try {
2678
- validateLocalWriterChild(runId, cwd, policy, deps);
2679
- return;
2781
+ return validateLocalWriterChild(runId, cwd, policy, deps);
2680
2782
  } catch (error) {
2681
2783
  const lockBusy = String(error).includes("registry lock busy");
2682
2784
  const pending = publication?.state === "pending" && r?.execution?.state === "known" && r.execution.owner.state === "unknown";
@@ -2901,6 +3003,7 @@ async function spawnLocalBackgroundRun(input, deps = {}) {
2901
3003
  startup: { protocol: AGENT_RUN_PROTOCOL, phase: "spawn" },
2902
3004
  agentKey: input.agentKey,
2903
3005
  agentName: input.agentName?.trim() || shortAgentKey(input.agentKey),
3006
+ ...typeof input.callerAgentKey === "string" && input.callerAgentKey.trim() ? { callerAgentKey: input.callerAgentKey.trim() } : {},
2904
3007
  ...title ? { title } : {},
2905
3008
  cwd: canonicalCwd ?? input.cwd,
2906
3009
  execution,
@@ -3247,6 +3350,12 @@ function transitionRunToTerminal(runId, update, deps = {}, options = {}) {
3247
3350
  if (typeof update.lastAssistantText === "string" && update.lastAssistantText) {
3248
3351
  record2.lastAssistantText = update.lastAssistantText.slice(0, 2e3);
3249
3352
  }
3353
+ if (typeof update.model === "string" && update.model.trim()) {
3354
+ record2.model = update.model.trim();
3355
+ }
3356
+ const finalObservation = deriveRunFinalObservation(update.lastAssistantText);
3357
+ if (finalObservation.escalated) record2.escalated = true;
3358
+ if (finalObservation.reviewVerdict) record2.reviewVerdict = finalObservation.reviewVerdict;
3250
3359
  if (update.cacheUsage) {
3251
3360
  record2.cacheHitRatio = update.cacheUsage.cache_hit_ratio;
3252
3361
  record2.cacheCachedTokens = update.cacheUsage.cached_tokens;
@@ -3996,6 +4105,7 @@ export {
3996
4105
  getRunResultHeaderMeta,
3997
4106
  serverOriginForDialog,
3998
4107
  isHistoryIntegrityFailure,
4108
+ deriveRunFinalObservation,
3999
4109
  RUN_TERMINAL_STATUSES,
4000
4110
  isRunTerminalStatus,
4001
4111
  resolveNoloHome,
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-GAHJLSDO.js";
9
9
  import {
10
10
  getReadableCliDb
11
- } from "./chunk-D25ONVOH.js";
11
+ } from "./chunk-SSZHE2RK.js";
12
12
  import {
13
13
  INSTABOX_RUN_CONFIG_ENV,
14
14
  buildLocalRunEnv,
@@ -33,7 +33,7 @@ import {
33
33
  resolveServerUrl,
34
34
  validateInstaboxWorkspaceSelection,
35
35
  writeUsage
36
- } from "./chunk-AXZ5DDLB.js";
36
+ } from "./chunk-GWS2X7TX.js";
37
37
  import {
38
38
  boxGlyphs,
39
39
  displayWidth,
@@ -43,11 +43,11 @@ import {
43
43
  stripAnsi,
44
44
  tokenizeAnsiLine,
45
45
  visibleWidth
46
- } from "./chunk-6TVYUQRM.js";
46
+ } from "./chunk-QV32GSVO.js";
47
47
  import {
48
48
  clearCredentialAvailability,
49
49
  readEffectiveCredentialEntry
50
- } from "./chunk-WWTSEBDF.js";
50
+ } from "./chunk-GIXWVN2W.js";
51
51
  import {
52
52
  rankMemoryCandidates,
53
53
  recallMemoryVNextLocal
@@ -84,16 +84,16 @@ import {
84
84
  import {
85
85
  resolveMachineId
86
86
  } from "./chunk-S73EPYNC.js";
87
- import {
88
- resolveCliLocalRuntimeKeyCapability
89
- } from "./chunk-7IQA2VJF.js";
90
87
  import {
91
88
  extractGoogleValidationLink
92
89
  } from "./chunk-BMQ2MJUK.js";
90
+ import {
91
+ resolveCliLocalRuntimeKeyCapability
92
+ } from "./chunk-3N3JPQBQ.js";
93
93
  import {
94
94
  parseUiCard,
95
95
  uiCardFallback
96
- } from "./chunk-PGDM7AM2.js";
96
+ } from "./chunk-WAOHK3NJ.js";
97
97
  import {
98
98
  isGatewayHttpStatus
99
99
  } from "./chunk-NF64D32W.js";
@@ -104,7 +104,7 @@ import {
104
104
  loadOwnerItemsFromDb,
105
105
  parseUiAskChoiceContent,
106
106
  resolveAgentMemoryPolicy
107
- } from "./chunk-VHMPJGT4.js";
107
+ } from "./chunk-ITCOQAHS.js";
108
108
  import {
109
109
  API_REPORTED_COST_MULTIPLIER,
110
110
  estimateMessagesTokens,
@@ -113,14 +113,21 @@ import {
113
113
  resolveAgentContextWindow,
114
114
  resolveOccupancy,
115
115
  resolveOccupancyWindow
116
- } from "./chunk-YQO5UKHP.js";
116
+ } from "./chunk-ZNOXY73P.js";
117
+ import {
118
+ getDefaultCliLocalRuntimeDb
119
+ } from "./chunk-7RYODZDD.js";
117
120
  import {
118
121
  parsePositiveFiniteNumberOrFallback
119
122
  } from "./chunk-Y5GCAMGP.js";
120
123
  import {
121
124
  readDbRecord,
122
125
  resolveAgentRecordFromHybridStore
123
- } from "./chunk-KJDN2YRH.js";
126
+ } from "./chunk-QMKWSKWA.js";
127
+ import {
128
+ resolveEffectiveReasoningEffortOverride,
129
+ withReasoningEffortOverride
130
+ } from "./chunk-2GAUJDA5.js";
124
131
  import {
125
132
  isTransientFetchError
126
133
  } from "./chunk-DXWGFL2Z.js";
@@ -144,7 +151,7 @@ import {
144
151
  settleRunTerminalAuthoritatively,
145
152
  spawnLocalBackgroundRun,
146
153
  transitionRunToTerminal
147
- } from "./chunk-YWNCRUBZ.js";
154
+ } from "./chunk-7XO73H5X.js";
148
155
  import {
149
156
  formatAgentListCard,
150
157
  formatFinishedRunCard,
@@ -163,10 +170,7 @@ import {
163
170
  isCliAuthorityBrokerProtocolError,
164
171
  isCliAuthorityBrokerTimeoutError,
165
172
  isCliAuthorityBrokerUnavailableError
166
- } from "./chunk-KK3FCYZM.js";
167
- import {
168
- getDefaultCliLocalRuntimeDb
169
- } from "./chunk-BFKJ2RS3.js";
173
+ } from "./chunk-SQL7YNED.js";
170
174
  import {
171
175
  LOCAL_AGENT_CONFIG_MISSING_CODE,
172
176
  LOCAL_TURN_ABORTED_CODE,
@@ -178,10 +182,13 @@ import {
178
182
  readActionGate,
179
183
  readAgentsMdLayerFromDisk,
180
184
  registerDialogOwner
181
- } from "./chunk-W4G25PVP.js";
185
+ } from "./chunk-2PB653F5.js";
182
186
  import {
183
187
  resolveAgentRuntimeConfigFromRecord
184
- } from "./chunk-WMKA2DPK.js";
188
+ } from "./chunk-TTUIM3PJ.js";
189
+ import {
190
+ resolveAgentImageInputSupport
191
+ } from "./chunk-BZLGPM5B.js";
185
192
  import {
186
193
  createThinkParserState,
187
194
  flushThinkParser,
@@ -193,10 +200,7 @@ import {
193
200
  isQuotaExhaustedText,
194
201
  resolveAvailabilityAction,
195
202
  resolveCredentialKeyWithFallback
196
- } from "./chunk-QJTZ76CP.js";
197
- import {
198
- resolveAgentImageInputSupport
199
- } from "./chunk-SX6AWTNK.js";
203
+ } from "./chunk-LS5KAVFQ.js";
200
204
  import {
201
205
  isContextOverflowText
202
206
  } from "./chunk-TLE77UJ5.js";
@@ -205,12 +209,12 @@ import {
205
209
  ATTACHMENT_PART_VERSION,
206
210
  describeAttachmentForModel,
207
211
  normalizeAttachmentPart
208
- } from "./chunk-LTVEOOZL.js";
212
+ } from "./chunk-CIAV4WK2.js";
209
213
  import {
210
214
  findCodexOAuthPinnedContextWindow,
211
215
  normalizeUsage,
212
216
  readCacheReadInputTokensOrNull
213
- } from "./chunk-MAA42MMV.js";
217
+ } from "./chunk-2FZVXOFX.js";
214
218
  import {
215
219
  isOAuthApiKeyRef
216
220
  } from "./chunk-UKZX3NHN.js";
@@ -255,7 +259,7 @@ import {
255
259
  import {
256
260
  isBuiltinNoloAgentRef,
257
261
  resolveLocalUserId
258
- } from "./chunk-UPOW5HTG.js";
262
+ } from "./chunk-OMIXG25B.js";
259
263
  import {
260
264
  isLocalCliAgentKey
261
265
  } from "./chunk-BR3GT6MR.js";
@@ -269,10 +273,12 @@ import {
269
273
  parsePublicAgentId
270
274
  } from "./chunk-M2EJHDJP.js";
271
275
  import {
272
- exitCliFromWatchdog,
276
+ exitCliFromWatchdog
277
+ } from "./chunk-XRGBJHZX.js";
278
+ import {
273
279
  getLogger,
274
280
  normalizeError
275
- } from "./chunk-6XRPBZRS.js";
281
+ } from "./chunk-EYLGAEB4.js";
276
282
  import {
277
283
  RuntimeProtocolMismatchError,
278
284
  RuntimeVersionMismatchError,
@@ -293,22 +299,22 @@ import {
293
299
  toolIcon,
294
300
  toolLabel,
295
301
  toolLabelVariants
296
- } from "./chunk-E5RYFR7E.js";
302
+ } from "./chunk-5UYDG6HP.js";
297
303
  import {
298
304
  isAntigravityOAuthAgent
299
- } from "./chunk-CTWCZKNS.js";
305
+ } from "./chunk-6SOWMEAY.js";
300
306
  import {
301
307
  toErrorMessage
302
308
  } from "./chunk-HNMXYYJR.js";
303
309
  import {
304
310
  resolveClientVersion
305
- } from "./chunk-K26XPZRB.js";
311
+ } from "./chunk-LVZVSLKO.js";
306
312
  import {
307
313
  asTrimmedString
308
314
  } from "./chunk-3EUW3WEO.js";
309
315
  import {
310
316
  findModelConfig
311
- } from "./chunk-CD2DK5JA.js";
317
+ } from "./chunk-OKH74FML.js";
312
318
  import {
313
319
  asOptionalTrimmedString
314
320
  } from "./chunk-G3SUCT4W.js";
@@ -316,7 +322,7 @@ import {
316
322
  CLIENT_VERSION_TOO_OLD_CODE,
317
323
  NOLO_CLIENT_VERSION_HEADER,
318
324
  buildClientVersionUpgradeMessage
319
- } from "./chunk-PQ63BDV3.js";
325
+ } from "./chunk-JPXACKSW.js";
320
326
  import {
321
327
  asTrimmedLowercaseString
322
328
  } from "./chunk-QSJ3HFEF.js";
@@ -1621,6 +1627,7 @@ function setActiveThemeMode(mode, options) {
1621
1627
  activeThemeMode = mode;
1622
1628
  if (mode === "terminal") {
1623
1629
  resolvedBrightness = null;
1630
+ trustedCanvasBrightness = null;
1624
1631
  terminalModeExplicit = options?.explicit === true;
1625
1632
  } else {
1626
1633
  terminalModeExplicit = false;
@@ -1790,13 +1797,16 @@ function pushToContrast(rawHex, canvasHex, target, floor) {
1790
1797
  }
1791
1798
  return best;
1792
1799
  }
1800
+ function hasTrustedCanvasEvidence(env) {
1801
+ return activeTerminalBaseHex !== null || trustedCanvasBrightness !== null || detectColorFgBgBrightness(env) !== null;
1802
+ }
1793
1803
  function shouldUseTruecolorTokens(env) {
1794
1804
  if (!supportsTruecolor(env)) return false;
1795
1805
  const explicit = (env.NOLO_TUI_THEME ?? "").trim().toLowerCase();
1796
1806
  if (explicit === "terminal" || explicit === "ansi") return false;
1797
1807
  if (resolveTuiThemeMode(env) !== "terminal") return true;
1798
1808
  if (terminalModeExplicit) return false;
1799
- return activeTerminalBaseHex !== null || detectColorFgBgBrightness(env) !== null;
1809
+ return hasTrustedCanvasEvidence(env);
1800
1810
  }
1801
1811
  function themeSgrParams(token, env = process.env, brightness = resolveTuiBrightness(env)) {
1802
1812
  const palette = THEME_PALETTES[activeThemeName] ?? THEME_PALETTES.nature;
@@ -1824,7 +1834,9 @@ var TERMINAL_BASE = {
1824
1834
  light: "FFFFFF"
1825
1835
  };
1826
1836
  var activeTerminalBaseHex = null;
1837
+ var trustedCanvasBrightness = null;
1827
1838
  function setActiveTerminalBaseHex(hex) {
1839
+ trustedCanvasBrightness = null;
1828
1840
  if (hex === null) {
1829
1841
  activeTerminalBaseHex = null;
1830
1842
  return;
@@ -1838,10 +1850,14 @@ function resetWorkspaceThemeState() {
1838
1850
  }
1839
1851
  function applyDetectedBackground(detected) {
1840
1852
  const normalizedHex = detected.hex.replace(/^#/, "").toUpperCase();
1853
+ const validHex = Boolean(readHexChannels(normalizedHex));
1854
+ const nextTrustedCanvas = !validHex && detected.trustedCanvas === true ? detected.brightness : null;
1841
1855
  const hexChanged = normalizedHex !== "" && normalizedHex !== activeTerminalBaseHex;
1842
- const changed = detected.brightness !== resolvedBrightness || hexChanged;
1856
+ const trustedChanged = nextTrustedCanvas !== trustedCanvasBrightness;
1857
+ const changed = detected.brightness !== resolvedBrightness || hexChanged || trustedChanged;
1843
1858
  resolvedBrightness = detected.brightness;
1844
1859
  setActiveTerminalBaseHex(detected.hex);
1860
+ trustedCanvasBrightness = nextTrustedCanvas;
1845
1861
  return changed;
1846
1862
  }
1847
1863
  function resolveTerminalBaseHex(brightness) {
@@ -1961,12 +1977,12 @@ function surfaceBackgroundSequence(env = process.env, brightness = resolveTuiBri
1961
1977
  return hexToBgSgr((SURFACE_HEX[activeThemeName] ?? SURFACE_HEX.trail)[brightness]);
1962
1978
  }
1963
1979
  function resolveSurfaceWashFallback(env) {
1964
- if (!supportsTruecolor(env) || activeTerminalBaseHex === null && detectColorFgBgBrightness(env) === null && resolveTuiThemeMode(env) === "terminal") {
1980
+ if (!supportsTruecolor(env) || !hasTrustedCanvasEvidence(env) && resolveTuiThemeMode(env) === "terminal") {
1965
1981
  return "\x1B[100m";
1966
1982
  }
1967
1983
  return null;
1968
1984
  }
1969
- function composerSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
1985
+ function neutralSurfaceBackgroundSequence(env, brightness, darkWeight, lightWeight) {
1970
1986
  const fallback = resolveSurfaceWashFallback(env);
1971
1987
  if (fallback !== null) return fallback;
1972
1988
  const base = resolveTerminalBaseHex(brightness);
@@ -1974,9 +1990,15 @@ function composerSurfaceBackgroundSequence(env = process.env, brightness = resol
1974
1990
  const baseLuma = channels ? (0.299 * channels[0] + 0.587 * channels[1] + 0.114 * channels[2]) / 255 : null;
1975
1991
  const darkCanvas = baseLuma === null ? brightness === "dark" : baseLuma < 0.5;
1976
1992
  const tint = darkCanvas ? "FFFFFF" : "000000";
1977
- const weight = darkCanvas ? 0.1 : 0.07;
1993
+ const weight = darkCanvas ? darkWeight : lightWeight;
1978
1994
  return hexToBgSgr(blendHex(tint, base, weight));
1979
1995
  }
1996
+ function composerSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
1997
+ return neutralSurfaceBackgroundSequence(env, brightness, 0.1, 0.07);
1998
+ }
1999
+ function userBubbleSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
2000
+ return neutralSurfaceBackgroundSequence(env, brightness, 0.13, 0.08);
2001
+ }
1980
2002
  function userSurfaceBackgroundSequence(env = process.env, brightness = resolveTuiBrightness(env)) {
1981
2003
  const fallback = resolveSurfaceWashFallback(env);
1982
2004
  if (fallback !== null) return fallback;
@@ -1993,7 +2015,8 @@ function tuiRenderThemeFingerprint(colorEnabled, env = process.env) {
1993
2015
  const mode = resolveTuiThemeMode(env);
1994
2016
  const colorKind = !colorEnabled ? "plain" : shouldUseTruecolorTokens(env) ? "truecolor" : "ansi";
1995
2017
  const surface = colorEnabled ? userSurfaceBackgroundSequence(env) : "";
1996
- return `${activeThemeName}|${mode}|${colorKind}|${resolveTuiBrightness(env)}|${activeTerminalBaseHex ?? ""}|${env.COLORFGBG ?? ""}|${surface}`;
2018
+ const bubbleSurface = colorEnabled ? userBubbleSurfaceBackgroundSequence(env) : "";
2019
+ return `${activeThemeName}|${mode}|${colorKind}|${resolveTuiBrightness(env)}|${activeTerminalBaseHex ?? ""}|${env.COLORFGBG ?? ""}|${surface}|${bubbleSurface}`;
1997
2020
  }
1998
2021
  function classifyDiffLine(line) {
1999
2022
  if (line.startsWith("@@")) return "hunk";
@@ -13064,7 +13087,7 @@ function isBalanceExhaustedError(error) {
13064
13087
 
13065
13088
  // packages/cli/client/agentRun.ts
13066
13089
  async function loadRunLocalAgentTurn() {
13067
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-KKXJOBD3.js");
13090
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-HVJJMB4W.js");
13068
13091
  return runLocalAgentTurn;
13069
13092
  }
13070
13093
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -13203,6 +13226,22 @@ function wrapLoadAgentConfigWithModelOverride(adapter, targetAgentKey, override)
13203
13226
  }
13204
13227
  };
13205
13228
  }
13229
+ function wrapLoadAgentConfigWithReasoningEffortOverride(adapter, targetAgentKey, override) {
13230
+ return {
13231
+ ...adapter,
13232
+ loadAgentConfig: async (agentRef) => {
13233
+ const config = await adapter.loadAgentConfig(agentRef);
13234
+ if (!config || agentRef !== targetAgentKey) return config;
13235
+ const effective = resolveEffectiveReasoningEffortOverride({
13236
+ override,
13237
+ provider: config.provider,
13238
+ model: config.model,
13239
+ recordReasoningEffort: config.reasoning_effort
13240
+ });
13241
+ return withReasoningEffortOverride(config, effective);
13242
+ }
13243
+ };
13244
+ }
13206
13245
  var oauthChannelSkipReportedAgentKeys = /* @__PURE__ */ new Set();
13207
13246
  function resolveOAuthChannelOwnerSkip(agentConfig, options) {
13208
13247
  if (!agentConfig) return null;
@@ -13843,6 +13882,10 @@ function describeLocalRunFailure(message, rawError) {
13843
13882
  const details = parseContextLengthDetails(message);
13844
13883
  const shownMessage = details.requested && details.max ? t("contextLengthExceeded", details.requested, details.max) : details.max ? t("contextLengthExceededLimitOnly", details.max) : t("contextLengthExceededGeneric");
13845
13884
  return `[nolo] ${shownMessage}
13885
+ `;
13886
+ }
13887
+ if (/CLI authority broker upgrade requires exit/i.test(message)) {
13888
+ return `${RUN_UNAVAILABLE_PREFIX} (${stripDebugNoise(message)})
13846
13889
  `;
13847
13890
  }
13848
13891
  if (isCliAuthorityBrokerTimeoutError(rawError) || /CLI authority broker .* timed out/i.test(message)) {
@@ -14226,6 +14269,13 @@ async function executeLocalAgentTurnForCliWithAdapter(options, settings, resolve
14226
14269
  options.agentKey,
14227
14270
  options.modelOverride
14228
14271
  ) : resolvedBaseAdapter;
14272
+ if (adapter2 && options.reasoningEffortOverride) {
14273
+ adapter2 = wrapLoadAgentConfigWithReasoningEffortOverride(
14274
+ adapter2,
14275
+ options.agentKey,
14276
+ options.reasoningEffortOverride
14277
+ );
14278
+ }
14229
14279
  if (adapter2) adapter2 = applyEphemeralIfRequested(options, adapter2);
14230
14280
  if (adapter2 && options.imageUrls?.length) {
14231
14281
  const imageAdapter = adapter2;
@@ -17412,7 +17462,8 @@ async function runAgentRunCommandImpl(args, deps) {
17412
17462
  if (hasRegistry && (parsed.runtimeKey?.trim() === "local" || locatedExecution?.state === "known")) {
17413
17463
  const implicitReadonlyHost = !parsed.runtimeKey && args.includes("--read-only") && locatedExecution?.state === "known" && locatedExecution.runtimeKey === "local" && locatedExecution.permissions.readOnly;
17414
17464
  if (parsed.runtimeKey?.trim() !== "local" && !implicitReadonlyHost) throw new Error("[local-writer-resource] child binding runtime mismatch");
17415
- await awaitLocalWriterChild(childRunId, parsed.cwd ?? process.cwd(), hostPolicy(), { env, homedir: deps.homedir, fs: deps.fs });
17465
+ const { blockedToolNames } = await awaitLocalWriterChild(childRunId, parsed.cwd ?? process.cwd(), hostPolicy(), { env, homedir: deps.homedir, fs: deps.fs });
17466
+ parsed.blockedToolNames = blockedToolNames;
17416
17467
  }
17417
17468
  if (hasRegistry && parsed.runtimeKey?.trim() !== "local" && locatedExecution?.state !== "known") reportRunProcessIdentity(childRunId, { env, homedir: deps.homedir, fs: deps.fs, now: deps.now });
17418
17469
  const processExit = deps.processExit ?? ((code) => process.exit(code));
@@ -17746,7 +17797,8 @@ async function runAgentRunCommandImpl(args, deps) {
17746
17797
  if (hostRuntimeLocal && !parsed.background) {
17747
17798
  const policy = { ...hostPolicy(), ...skillAllowedToolOverride !== void 0 ? { allowedToolNames: skillAllowedToolOverride } : {} };
17748
17799
  if (hasRegistry) {
17749
- await awaitLocalWriterChild(childRunId, localRuntimeCwd, policy, { env, homedir: deps.homedir, fs: deps.fs });
17800
+ const { blockedToolNames } = await awaitLocalWriterChild(childRunId, localRuntimeCwd, policy, { env, homedir: deps.homedir, fs: deps.fs });
17801
+ parsed.blockedToolNames = blockedToolNames;
17750
17802
  } else if (!policy.readOnly) {
17751
17803
  childRunId = registerLocalForegroundWriter(localRuntimeCwd, policy, agentKey, { env, homedir: deps.homedir, fs: deps.fs, now: deps.now });
17752
17804
  hasRegistry = true;
@@ -17895,7 +17947,9 @@ async function runAgentRunCommandImpl(args, deps) {
17895
17947
  runner({
17896
17948
  ...buildRunOptions(effectiveAgentKey),
17897
17949
  ...parsed.freshDialog ? { freshDialog: true } : {},
17898
- ...modelOverride ? { modelOverride } : {}
17950
+ ...modelOverride ? { modelOverride } : {},
17951
+ // `--reasoning-effort`:本次 run 的有效推理档覆盖(内存生效,不写回记录)。
17952
+ ...parsed.reasoningEffort ? { reasoningEffortOverride: parsed.reasoningEffort } : {}
17899
17953
  })
17900
17954
  );
17901
17955
  clearWatchdogs();
@@ -17964,7 +18018,9 @@ async function runAgentRunCommandImpl(args, deps) {
17964
18018
  runner({
17965
18019
  ...buildRunOptions(effectiveAgentKey, nextEntry.text),
17966
18020
  continueDialogId: result.dialogId,
17967
- ...modelOverride ? { modelOverride } : {}
18021
+ ...modelOverride ? { modelOverride } : {},
18022
+ // `--reasoning-effort`:本次 run 的有效推理档覆盖(内存生效,不写回记录)。
18023
+ ...parsed.reasoningEffort ? { reasoningEffortOverride: parsed.reasoningEffort } : {}
17968
18024
  })
17969
18025
  );
17970
18026
  clearWatchdogs();
@@ -18184,6 +18240,7 @@ export {
18184
18240
  applyDetectedBackground,
18185
18241
  renderSurfaceLine,
18186
18242
  surfaceBackgroundSequence,
18243
+ userBubbleSurfaceBackgroundSequence,
18187
18244
  themeText,
18188
18245
  tuiRenderThemeFingerprint,
18189
18246
  MAX_URL_LENGTH,
@@ -7,7 +7,7 @@ import {
7
7
  describeAgentSkillModeValue,
8
8
  isAgentSkillDisabled,
9
9
  resolveAgentSkillConfig
10
- } from "./chunk-CDIRKCPD.js";
10
+ } from "./chunk-6HL6E7ZD.js";
11
11
  import {
12
12
  dedupeSkillPromptPatches,
13
13
  resolveBuiltinSkillEntry,
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  patch,
6
6
  readAndWait
7
- } from "./chunk-HZDK56EK.js";
7
+ } from "./chunk-CO2NXG2J.js";
8
8
  import {
9
9
  require_react
10
10
  } from "./chunk-RD3QLZQV.js";
@@ -335,7 +335,7 @@ async function saveDocState(arg, { dispatch, getState }) {
335
335
  ).unwrap();
336
336
  if (dbSpaceId) {
337
337
  try {
338
- const { updateContentTitle } = await import("./contentThunks-ZQSZA4GH.js");
338
+ const { updateContentTitle } = await import("./contentThunks-25XCB7VY.js");
339
339
  await dispatch(
340
340
  updateContentTitle({
341
341
  spaceId: dbSpaceId,
@@ -378,7 +378,7 @@ async function saveDocState(arg, { dispatch, getState }) {
378
378
  }
379
379
  }
380
380
  async function createDocState(args, thunkApi) {
381
- const { createPageAction } = await import("./createPageAction-VLF6XCYO.js");
381
+ const { createPageAction } = await import("./createPageAction-RVYBEYZV.js");
382
382
  return createPageAction(args, thunkApi);
383
383
  }
384
384
  function subscribe(listener) {
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  resolveAgentCallPlan
3
- } from "./chunk-VUHKG4KS.js";
3
+ } from "./chunk-DNNPARJK.js";
4
4
  import {
5
5
  CUSTOM_API_KEY_TEMPLATES,
6
6
  SUBSCRIPTION_OAUTH_PROVIDERS
7
- } from "./chunk-CTWCZKNS.js";
7
+ } from "./chunk-6SOWMEAY.js";
8
8
  import {
9
9
  findModelConfig,
10
10
  getProviderByModelName
11
- } from "./chunk-CD2DK5JA.js";
11
+ } from "./chunk-OKH74FML.js";
12
12
  import {
13
13
  asOptionalTrimmedString
14
14
  } from "./chunk-G3SUCT4W.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5ZUL4CUO.js";
4
4
  import {
5
5
  getModelContextWindow
6
- } from "./chunk-MAA42MMV.js";
6
+ } from "./chunk-2FZVXOFX.js";
7
7
  import {
8
8
  isPageKey,
9
9
  isTableMetaKey
@@ -23,6 +23,14 @@ import {
23
23
  import {
24
24
  asOptionalTrimmedString
25
25
  } from "./chunk-G3SUCT4W.js";
26
+ import {
27
+ asTrimmedLowercaseString
28
+ } from "./chunk-QSJ3HFEF.js";
29
+
30
+ // packages/integrations/openai/responsesPromptLayout.ts
31
+ function isGpt62DeveloperPrefixModel(model) {
32
+ return /^gpt-6\.2-(astra|sol)$/.test(model);
33
+ }
26
34
 
27
35
  // packages/agent-runtime/codexOAuthPure.ts
28
36
  function isCodexOAuthAgent(agent) {
@@ -30,6 +38,9 @@ function isCodexOAuthAgent(agent) {
30
38
  const ref = agent.apiKeyRef?.trim().toLowerCase();
31
39
  return ref === "chatgpt";
32
40
  }
41
+ function usesCodexDeveloperPrefix(agent, model) {
42
+ return !agent.customProviderUrl && isGpt62DeveloperPrefixModel(asTrimmedLowercaseString(model).replace(/^openai\//, ""));
43
+ }
33
44
 
34
45
  // packages/agent-runtime/codexOAuthModelAliases.ts
35
46
  var CODEX_OAUTH_MODEL_ALIASES = {
@@ -506,7 +517,9 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
506
517
  }
507
518
 
508
519
  export {
520
+ isGpt62DeveloperPrefixModel,
509
521
  isCodexOAuthAgent,
522
+ usesCodexDeveloperPrefix,
510
523
  resolveCodexOAuthEffectiveModel,
511
524
  CODEX_OAUTH_CATALOG_TTL_MS,
512
525
  CODEX_OAUTH_CATALOG_RETRY_FLOOR_MS,