nolo-cli 0.18.0 → 0.24.0-alpha.6

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 (133) hide show
  1. package/{_executeModel-X5PCIZN6.js → _executeModel-ARCMGGMY.js} +46 -44
  2. package/{action-LT7BRFLK.js → action-5MNAXR5B.js} +7 -6
  3. package/{addContentAction-PL3KKBDH.js → addContentAction-UNSYTVTB.js} +5 -5
  4. package/{addDialogAgentAction-FCMSKYAF.js → addDialogAgentAction-LJGNP2AO.js} +5 -5
  5. package/{agentDeleteCommand-2BZDQV36.js → agentDeleteCommand-C5PIEBMZ.js} +27 -26
  6. package/{agentEmailCommands-2QJDGRMB.js → agentEmailCommands-QTGQ3ZAD.js} +57 -55
  7. package/{agentListCommands-6VEPTKBI.js → agentListCommands-LRHBS3A5.js} +30 -26
  8. package/{agentMachineCommands-NVVHNWYI.js → agentMachineCommands-4PXIT4BP.js} +25 -24
  9. package/{agentRecordCommands-4GGRDMD4.js → agentRecordCommands-ZZPTYTYR.js} +52 -50
  10. package/{agentRunCommand-XOLQNKBZ.js → agentRunCommand-7ZTPZNUX.js} +55 -54
  11. package/{agentRunControl-Y5AFH5PQ.js → agentRunControl-SNUKXN6J.js} +6 -2
  12. package/{agentRuntimeLocal-7WYWCGL4.js → agentRuntimeLocal-QOYY5UV2.js} +19 -18
  13. package/{agentSlice-EAXPGEYV.js → agentSlice-J3W3RX2I.js} +5 -5
  14. package/{appDeleteCommands-77KR2RJ4.js → appDeleteCommands-7NS46XDH.js} +23 -22
  15. package/{appDeployCommands-K7CAHGBI.js → appDeployCommands-RSRNQ67U.js} +23 -22
  16. package/{appDeployStatusCommands-4OEKLTBT.js → appDeployStatusCommands-EF4RSGC6.js} +23 -22
  17. package/{appGetCommands-VM2WDLAZ.js → appGetCommands-YA7JWYUX.js} +23 -22
  18. package/{appListCommands-GX6BBA6U.js → appListCommands-WM2ON6JW.js} +23 -22
  19. package/{authCommand-DY6UUL6O.js → authCommand-HJP7FURK.js} +12 -13
  20. package/{authCommands-XTBV7OFZ.js → authCommands-NYZM2B2I.js} +4 -5
  21. package/{chunk-MKA6QE5E.js → chunk-2IPEVBUO.js} +126 -68
  22. package/{chunk-OWOHNGCN.js → chunk-2MBTWINN.js} +42 -3
  23. package/{chunk-K6EUAOW3.js → chunk-35RYGII3.js} +1 -1
  24. package/{chunk-TRT4I4UD.js → chunk-4POUK2BV.js} +2 -2
  25. package/{chunk-LLWKHDG4.js → chunk-4ULSC37S.js} +1 -3
  26. package/{chunk-EDV7EBOI.js → chunk-4ZH6GUJF.js} +2151 -1500
  27. package/{chunk-MVQ4TBSD.js → chunk-54VHTARN.js} +1 -1
  28. package/{chunk-L4F3I4SR.js → chunk-5HQQ4LUU.js} +4 -6
  29. package/{chunk-Z4NR32XR.js → chunk-5RGU3J7P.js} +13 -0
  30. package/{chunk-7BUYEZ6U.js → chunk-7H3UTGPM.js} +12 -72
  31. package/{chunk-RQN4SEKL.js → chunk-7W6GFNJL.js} +1 -1
  32. package/{chunk-HEGV7BH3.js → chunk-AQZCWJOG.js} +1 -1
  33. package/{chunk-3ND52WIL.js → chunk-ATWUOTJP.js} +180 -24
  34. package/chunk-CF7S2RYZ.js +376 -0
  35. package/{chunk-I2ZJKTG5.js → chunk-CGVRC2TB.js} +7 -7
  36. package/{chunk-UAIVG4J6.js → chunk-CHSCAUZN.js} +1 -8
  37. package/{chunk-KFEVY3ST.js → chunk-D34RI6NI.js} +18 -8
  38. package/{chunk-ROWQEJRP.js → chunk-DXJS7VSG.js} +3 -2
  39. package/{chunk-MHSGJW4Z.js → chunk-EHOYZRTI.js} +44 -14
  40. package/{chunk-XRZJGPFI.js → chunk-FON47ACC.js} +4 -4
  41. package/{chunk-SCTYAHYK.js → chunk-H2NAWOLH.js} +217 -141
  42. package/{chunk-MPVYDS7I.js → chunk-H6ODMJR3.js} +3 -3
  43. package/{chunk-R35XMF6F.js → chunk-H73ZV2GL.js} +352 -30
  44. package/{chunk-4T5F7YZQ.js → chunk-I6RJGORZ.js} +1 -1
  45. package/{chunk-OK6YSWLH.js → chunk-IICW77GI.js} +1 -1
  46. package/{chunk-VDXCXCXH.js → chunk-IUDMBCXC.js} +1 -1
  47. package/{chunk-AHCY2S2I.js → chunk-JADNODCQ.js} +1 -1
  48. package/{chunk-DFCFMCY6.js → chunk-JBLY6HQP.js} +2 -2
  49. package/{chunk-UGUW3FHG.js → chunk-JMSCXQUG.js} +2 -2
  50. package/{chunk-N54HIJVJ.js → chunk-KFUCLS7Z.js} +101 -9
  51. package/{chunk-FQZZLA3C.js → chunk-KXKQO4Q6.js} +17 -0
  52. package/{chunk-3Q7WHGCB.js → chunk-L65QKSVJ.js} +1 -1
  53. package/{chunk-3ZX7PERL.js → chunk-LALVWNE4.js} +20 -7
  54. package/{chunk-PJSV3IZ5.js → chunk-M3TMVJKG.js} +1 -1
  55. package/{chunk-REA4JLBH.js → chunk-M5OZCOBV.js} +7 -6
  56. package/{chunk-JLA4FXYC.js → chunk-MALVZUYL.js} +1 -1
  57. package/{chunk-GFUIQ4RY.js → chunk-MXFQHRSS.js} +1 -1
  58. package/{chunk-LSFAWXKC.js → chunk-N7J63Q6C.js} +1 -0
  59. package/{chunk-6Y7A3OQQ.js → chunk-NRY4GCKJ.js} +2 -0
  60. package/{chunk-G5U6LDLG.js → chunk-NVHPMDSZ.js} +6 -6
  61. package/{chunk-23FZYPLC.js → chunk-OJFYT3ZQ.js} +842 -1060
  62. package/{chunk-ELT65PZW.js → chunk-OXLLFZNF.js} +1 -1
  63. package/{chunk-CZ6NYQTV.js → chunk-P4QWLZGU.js} +2 -2
  64. package/{chunk-5MIDPSSK.js → chunk-PB7G5MAM.js} +3 -3
  65. package/{chunk-HWW2M4SN.js → chunk-QLVWFXZQ.js} +5 -4
  66. package/{chunk-VYHDJEQD.js → chunk-QNLLGS37.js} +136 -78
  67. package/{chunk-XHG22OEX.js → chunk-ROJI6DRT.js} +2 -2
  68. package/{chunk-BV4VEE3W.js → chunk-ROYOKSX4.js} +243 -354
  69. package/{chunk-VNAEBGDK.js → chunk-RZNYL4LW.js} +123 -26
  70. package/{chunk-RVOUXDFU.js → chunk-S6KVFOUG.js} +6 -34
  71. package/{chunk-V3ED5AWK.js → chunk-S77SCVBU.js} +27 -16
  72. package/{chunk-UBHAWFQ6.js → chunk-S7RWIPDI.js} +42 -19
  73. package/{chunk-B5TOXZAK.js → chunk-SIZQB7BD.js} +1 -1
  74. package/{chunk-DFFIZ25G.js → chunk-SLOGKB7M.js} +4 -1
  75. package/{chunk-FXUSIQC2.js → chunk-SROR5TSM.js} +1 -1
  76. package/{chunk-PIZYJVHQ.js → chunk-TN4YHAI3.js} +4 -4
  77. package/{chunk-IYEXFJPC.js → chunk-TW35GDNW.js} +64 -57
  78. package/chunk-UZ6XXCVR.js +50 -0
  79. package/{chunk-DKZFOK24.js → chunk-UZH44DWK.js} +7 -288
  80. package/{chunk-YGW4G5W5.js → chunk-X546QUDT.js} +61 -12
  81. package/chunk-YYLHWIW6.js +48 -0
  82. package/{chunk-SWDPIPOY.js → chunk-ZGVW7MSZ.js} +1 -1
  83. package/{chunk-34WPV75U.js → chunk-ZUXIXYJI.js} +1 -1
  84. package/{chunk-VC6OZXO5.js → chunk-ZWJOGMKH.js} +2 -26
  85. package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
  86. package/{codingSkills-36KN5NQT.js → codingSkills-EN6Z6G6U.js} +4 -4
  87. package/{createAgentAutomationAction-GNFF524X.js → createAgentAutomationAction-MKQWN4VQ.js} +19 -18
  88. package/{createDialogAction-RB55KCLO.js → createDialogAction-YWIZPLFS.js} +22 -20
  89. package/{createPageAction-Y7343GLU.js → createPageAction-74TTEIPC.js} +20 -19
  90. package/{db-W3O47YGF.js → db-W5UHK4P3.js} +150 -0
  91. package/{dbSlice-CGSRFJN3.js → dbSlice-5BKDURDL.js} +4 -4
  92. package/{dialogCommands-IAZK6YHQ.js → dialogCommands-MJIP32FL.js} +24 -23
  93. package/{dialogSlice-UQAXF23P.js → dialogSlice-KLLVH4WI.js} +24 -18
  94. package/{docCreateCommands-I2EWZGCI.js → docCreateCommands-5DN472U6.js} +24 -27
  95. package/{docDeleteCommands-IZ45UZKG.js → docDeleteCommands-HE76LBN4.js} +25 -24
  96. package/{docReadCommands-R6Z4QJYU.js → docReadCommands-XVGZSCBS.js} +24 -23
  97. package/{docStore-5HOJ4D7D.js → docStore-SPH3D6BT.js} +20 -19
  98. package/{docUpdateCommands-2LRBKQPY.js → docUpdateCommands-P7IAWUAD.js} +24 -27
  99. package/{fetchMessages-BMGVZVSE.js → fetchMessages-W4IKHPCS.js} +2 -3
  100. package/{getPricing-G7DLAST6.js → getPricing-WENPBVWH.js} +3 -3
  101. package/{handleSendMessageAction-Q4HY35WX.js → handleSendMessageAction-ZU6WJVL7.js} +23 -20
  102. package/index.js +74 -74
  103. package/{localDialogRead-4H3QJFLW.js → localDialogRead-JXTAHW2E.js} +2 -2
  104. package/{machineCommands-PKBPQKTY.js → machineCommands-NI76PVHK.js} +59 -57
  105. package/{machineWsRunDispatch-UZAW4OXJ.js → machineWsRunDispatch-W3G6NJVQ.js} +51 -49
  106. package/{models-DJFSJ7SW.js → models-DB27UAE3.js} +2 -2
  107. package/package.json +1 -1
  108. package/{read-3FMPZPER.js → read-F3L3T2WJ.js} +2 -1
  109. package/{readDocTool-VSYHKK3V.js → readDocTool-FOHWVA4R.js} +1 -1
  110. package/{readlineWorkspace-Y2RDOFZG.js → readlineWorkspace-BDH4G477.js} +880 -425
  111. package/{removeDialogAgentAction-OAGA2G3U.js → removeDialogAgentAction-QCFGIUIH.js} +8 -7
  112. package/{runAgentClientLoop-NBPIKJ6J.js → runAgentClientLoop-ZPKMXCM5.js} +45 -38
  113. package/{setDialogExtraReferencesAction-JZEXA5SL.js → setDialogExtraReferencesAction-DK4CKERU.js} +5 -5
  114. package/{setPrimaryDialogAgentAction-4ZUQQKDG.js → setPrimaryDialogAgentAction-SJSO6N27.js} +8 -7
  115. package/{settingSlice-7MNKHZ6R.js → settingSlice-XNM5AFPU.js} +6 -5
  116. package/{spaceCommands-DHCZ7J5I.js → spaceCommands-3GGBJRQR.js} +25 -24
  117. package/{spaceSlice-ZXLLG3CR.js → spaceSlice-47Z6XLFQ.js} +21 -18
  118. package/{streamAgentChatTurn-L3YW6LSB.js → streamAgentChatTurn-VT5K5JSD.js} +140 -98
  119. package/switchDialogAgentAction-4OAC6QRN.js +61 -0
  120. package/{tableCommands-BEQAGE4I.js → tableCommands-HEQYT2KP.js} +1 -1
  121. package/{toolApiClient-QI3YBNWB.js → toolApiClient-ISM4ZQX4.js} +2 -2
  122. package/{tools-ECGXR5QF.js → tools-L7RCHAPT.js} +36 -33
  123. package/{tuiSummaryLlmCaller-OMSCNHXA.js → tuiSummaryLlmCaller-3DYOLTVN.js} +6 -6
  124. package/{updateCommands-XTW55TOT.js → updateCommands-HTCOBXCA.js} +2 -2
  125. package/{updateDialogTitleAction-HQ2EUDFT.js → updateDialogTitleAction-KMPVPQ4A.js} +28 -27
  126. package/chunk-DL6EPNIK.js +0 -50
  127. package/chunk-V5R4NZP2.js +0 -78
  128. package/chunk-X4Q4UZEY.js +0 -26
  129. package/queryRunOverlay-O4LOMMPO.js +0 -161
  130. package/runOverlayPresentation-ZO4VCWEU.js +0 -11
  131. package/types-ZSTJ7MPR.js +0 -7
  132. package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
  133. package/{runtimeDoctorCommands-E2OUORHK.js → runtimeDoctorCommands-HSU632DY.js} +3 -3
@@ -6,15 +6,15 @@ import {
6
6
  canUsePlatformChatProvider,
7
7
  parsePlatformChatCompletionResponse,
8
8
  resolvePlatformChatProviderConfig
9
- } from "./chunk-N54HIJVJ.js";
10
- import "./chunk-LSFAWXKC.js";
11
- import "./chunk-KFEVY3ST.js";
12
- import "./chunk-MHSGJW4Z.js";
9
+ } from "./chunk-KFUCLS7Z.js";
10
+ import "./chunk-N7J63Q6C.js";
11
+ import "./chunk-D34RI6NI.js";
12
+ import "./chunk-EHOYZRTI.js";
13
13
  import "./chunk-5MMAK75Q.js";
14
- import "./chunk-UAIVG4J6.js";
14
+ import "./chunk-CHSCAUZN.js";
15
15
  import "./chunk-ZHXJ6M7T.js";
16
16
  import "./chunk-DWLEOOGR.js";
17
- import "./chunk-MKA6QE5E.js";
17
+ import "./chunk-2IPEVBUO.js";
18
18
  import "./chunk-I42VC5KR.js";
19
19
  import "./chunk-QSJ3HFEF.js";
20
20
  import "./chunk-3EUW3WEO.js";
@@ -12,8 +12,8 @@ import {
12
12
  resolveStandaloneBundleRepoBase,
13
13
  runSelfUpdate,
14
14
  runStandaloneBundleUpdate
15
- } from "./chunk-K6EUAOW3.js";
16
- import "./chunk-ROWQEJRP.js";
15
+ } from "./chunk-35RYGII3.js";
16
+ import "./chunk-DXJS7VSG.js";
17
17
  import "./chunk-IDZTNRP2.js";
18
18
  import "./chunk-A7GB5UGH.js";
19
19
  import "./chunk-OLZBQWZU.js";
@@ -1,60 +1,58 @@
1
- import {
2
- buildDialogFallbackTitleFromMessages,
3
- resolveDialogTitle
4
- } from "./chunk-OWOHNGCN.js";
5
1
  import {
6
2
  isAssistantToolStub,
7
3
  selectAllMsgs,
8
4
  updateContentTitle
9
- } from "./chunk-SCTYAHYK.js";
5
+ } from "./chunk-H2NAWOLH.js";
10
6
  import {
11
7
  BUILTIN_TITLE_LLM_CONFIG
12
8
  } from "./chunk-XOIF2TNF.js";
13
- import "./chunk-B5TOXZAK.js";
14
9
  import "./chunk-MRC4Q34M.js";
10
+ import "./chunk-SIZQB7BD.js";
15
11
  import {
16
12
  runLlm
17
- } from "./chunk-REA4JLBH.js";
13
+ } from "./chunk-M5OZCOBV.js";
14
+ import "./chunk-YYLHWIW6.js";
18
15
  import "./chunk-CWMSB67P.js";
19
- import "./chunk-XHG22OEX.js";
20
- import "./chunk-Z4NR32XR.js";
16
+ import "./chunk-ROJI6DRT.js";
17
+ import "./chunk-5RGU3J7P.js";
21
18
  import {
22
19
  require_date_fns
23
20
  } from "./chunk-M76ECQRD.js";
24
- import "./chunk-3Q7WHGCB.js";
21
+ import "./chunk-L65QKSVJ.js";
22
+ import {
23
+ buildDialogFallbackTitleFromMessages,
24
+ resolveDialogTitle
25
+ } from "./chunk-2MBTWINN.js";
25
26
  import {
26
27
  serializeMessageContent
27
- } from "./chunk-I2ZJKTG5.js";
28
+ } from "./chunk-CGVRC2TB.js";
28
29
  import "./chunk-5MMAK75Q.js";
29
30
  import "./chunk-5CS33IBL.js";
30
31
  import "./chunk-JZPBVBIY.js";
31
- import "./chunk-UAIVG4J6.js";
32
+ import "./chunk-CHSCAUZN.js";
32
33
  import "./chunk-ZHXJ6M7T.js";
33
- import "./chunk-HNMXYYJR.js";
34
- import {
35
- normalizeSpaceId
36
- } from "./chunk-ELT65PZW.js";
37
- import {
38
- extractCustomId
39
- } from "./chunk-DFFIZ25G.js";
40
34
  import "./chunk-3ASDTTEI.js";
41
35
  import "./chunk-DWLEOOGR.js";
42
- import "./chunk-LLWKHDG4.js";
43
- import "./chunk-MKA6QE5E.js";
44
- import "./chunk-RVOUXDFU.js";
36
+ import "./chunk-HNMXYYJR.js";
37
+ import "./chunk-4ULSC37S.js";
38
+ import "./chunk-2IPEVBUO.js";
39
+ import "./chunk-S6KVFOUG.js";
45
40
  import "./chunk-Y5GCAMGP.js";
41
+ import "./chunk-UZ6XXCVR.js";
46
42
  import "./chunk-KX6YBIHG.js";
43
+ import {
44
+ normalizeSpaceId
45
+ } from "./chunk-OXLLFZNF.js";
47
46
  import {
48
47
  patch,
49
48
  selectById
50
- } from "./chunk-XRZJGPFI.js";
51
- import "./chunk-6Y7A3OQQ.js";
49
+ } from "./chunk-FON47ACC.js";
50
+ import "./chunk-NRY4GCKJ.js";
52
51
  import "./chunk-WWC7I6TA.js";
53
52
  import "./chunk-SKDNBYZK.js";
54
53
  import "./chunk-I42VC5KR.js";
55
54
  import "./chunk-QSJ3HFEF.js";
56
- import "./chunk-X4Q4UZEY.js";
57
- import "./chunk-3ND52WIL.js";
55
+ import "./chunk-ATWUOTJP.js";
58
56
  import {
59
57
  selectIdentityUserId
60
58
  } from "./chunk-XMLRJUU5.js";
@@ -64,6 +62,9 @@ import {
64
62
  asTrimmedString
65
63
  } from "./chunk-3EUW3WEO.js";
66
64
  import "./chunk-U6VC4MU4.js";
65
+ import {
66
+ extractCustomId
67
+ } from "./chunk-SLOGKB7M.js";
67
68
  import "./chunk-KUG52IAP.js";
68
69
  import "./chunk-LCBAMY2M.js";
69
70
  import "./chunk-4SN6J65J.js";
@@ -108,7 +109,7 @@ var getMessageContextForTitle = (state, dialogKey, selectAllMessages = selectAll
108
109
  []
109
110
  ) : [];
110
111
  const normalized = flattened.filter((msg) => msg?.role !== "tool" && !isAssistantToolStub(msg)).map((msg) => {
111
- const textContent = serializeMessageContent(msg?.content, "\u8FD9\u91CC\u662F\u4E00\u4E2A\u56FE\u7247");
112
+ const textContent = serializeMessageContent(msg?.content, "[\u56FE\u7247]");
112
113
  if (!textContent) return null;
113
114
  return {
114
115
  ...msg,
package/chunk-DL6EPNIK.js DELETED
@@ -1,50 +0,0 @@
1
- // packages/core/chat/runOverlayMachine.ts
2
- var initialRunOverlayState = {
3
- runs: /* @__PURE__ */ new Map()
4
- };
5
- function reduceRunOverlay(state, event) {
6
- switch (event.type) {
7
- case "run-state-chg": {
8
- const prev = state.runs.get(event.runId);
9
- const now = Date.now();
10
- const merged = prev ? { ...prev, ...event.info, runId: event.runId, updatedAt: now } : {
11
- runId: event.runId,
12
- name: event.info.name ?? "",
13
- status: event.info.status ?? "running",
14
- summary: event.info.summary,
15
- batchId: event.info.batchId,
16
- parentDialogId: event.info.parentDialogId,
17
- errorMessage: event.info.errorMessage,
18
- updatedAt: now
19
- };
20
- if (prev && shallowEqualRun(prev, merged)) {
21
- return state;
22
- }
23
- const runs = new Map(state.runs);
24
- runs.set(event.runId, merged);
25
- return { runs };
26
- }
27
- case "run-removed": {
28
- if (!state.runs.has(event.runId)) return state;
29
- const runs = new Map(state.runs);
30
- runs.delete(event.runId);
31
- return { runs };
32
- }
33
- case "clear-all": {
34
- if (state.runs.size === 0) return state;
35
- return { runs: /* @__PURE__ */ new Map() };
36
- }
37
- default: {
38
- const _exhaustive = event;
39
- return state;
40
- }
41
- }
42
- }
43
- function shallowEqualRun(a, b) {
44
- return a.runId === b.runId && a.name === b.name && a.status === b.status && a.summary === b.summary && a.batchId === b.batchId && a.parentDialogId === b.parentDialogId && a.errorMessage === b.errorMessage;
45
- }
46
-
47
- export {
48
- initialRunOverlayState,
49
- reduceRunOverlay
50
- };
package/chunk-V5R4NZP2.js DELETED
@@ -1,78 +0,0 @@
1
- // packages/core/chat/runOverlayPresentation.ts
2
- var STATUS_ORDER = [
3
- "running",
4
- "reviewing",
5
- "testing",
6
- "done",
7
- "failed",
8
- "cancelled",
9
- "orphaned"
10
- ];
11
- var STATUS_DISPLAY = {
12
- running: { icon: "\u25B6", label: "\u6B63\u5728\u8FD0\u884C" },
13
- reviewing: { icon: "\u{1F441}", label: "\u5F85 review" },
14
- testing: { icon: "\u{1F9EA}", label: "\u5728\u6D4B\u8BD5" },
15
- done: { icon: "\u2705", label: "\u5DF2\u5B8C\u6210" },
16
- failed: { icon: "\u274C", label: "\u5931\u8D25" },
17
- cancelled: { icon: "\u23F9", label: "\u5DF2\u53D6\u6D88" },
18
- orphaned: { icon: "\u{1F47B}", label: "\u5B64\u513F" }
19
- };
20
- function statusLabel(status) {
21
- return STATUS_DISPLAY[status]?.label ?? status;
22
- }
23
- function groupByStatus(runs) {
24
- const buckets = /* @__PURE__ */ new Map();
25
- for (const run of runs.values()) {
26
- const arr = buckets.get(run.status);
27
- if (arr) arr.push(run);
28
- else buckets.set(run.status, [run]);
29
- }
30
- const grouped = [];
31
- for (const status of STATUS_ORDER) {
32
- const arr = buckets.get(status);
33
- if (arr && arr.length > 0) grouped.push({ status, runs: arr });
34
- }
35
- return grouped;
36
- }
37
- function buildOverlayPresentation(state) {
38
- if (state.runs.size === 0) return null;
39
- const grouped = groupByStatus(state.runs);
40
- const lines = [];
41
- for (const { status, runs } of grouped) {
42
- const { icon, label } = STATUS_DISPLAY[status];
43
- lines.push(`${icon} ${runs.length} \u4E2A${label}`);
44
- }
45
- lines.push("");
46
- lines.push("--- \u8BE6\u60C5 ---");
47
- for (const { runs } of grouped) {
48
- for (const run of runs) {
49
- lines.push(detailLine(run));
50
- }
51
- }
52
- return lines.join("\n");
53
- }
54
- function detailLine(run) {
55
- const short = shortStatusLabel(run.status);
56
- let suffix = short;
57
- if (run.summary) suffix += ` \u2014 ${run.summary}`;
58
- else if (run.status === "failed" && run.errorMessage) suffix += ` \u2014 ${run.errorMessage}`;
59
- return `\u2022 ${run.runId} (${run.name}): ${suffix}`;
60
- }
61
- var SHORT_STATUS_LABEL = {
62
- running: "\u8FD0\u884C\u4E2D",
63
- reviewing: "\u5F85 review",
64
- testing: "\u6D4B\u8BD5\u4E2D",
65
- done: "\u5DF2\u5B8C\u6210",
66
- failed: "\u5931\u8D25",
67
- cancelled: "\u5DF2\u53D6\u6D88",
68
- orphaned: "\u5B64\u513F"
69
- };
70
- function shortStatusLabel(status) {
71
- return SHORT_STATUS_LABEL[status];
72
- }
73
-
74
- export {
75
- statusLabel,
76
- groupByStatus,
77
- buildOverlayPresentation
78
- };
package/chunk-X4Q4UZEY.js DELETED
@@ -1,26 +0,0 @@
1
- // packages/create/types.ts
2
- var DataType = /* @__PURE__ */ ((DataType2) => {
3
- DataType2["AGENT"] = "agent";
4
- DataType2["DOC"] = "page";
5
- DataType2["DIALOG"] = "dialog";
6
- DataType2["NOTIFICATION"] = "notification";
7
- DataType2["MSG"] = "msg";
8
- DataType2["TOKEN"] = "token";
9
- DataType2["SPACE"] = "space";
10
- DataType2["TRANSACTION"] = "transaction";
11
- DataType2["SETTING"] = "setting";
12
- DataType2["TASK"] = "task";
13
- DataType2["AGENT_AUTOMATION"] = "agent-automation";
14
- DataType2["TABLE"] = "table";
15
- DataType2["TABLE_ROW"] = "table_row";
16
- DataType2["FILE"] = "file";
17
- DataType2["IMAGE"] = "image";
18
- DataType2["APP"] = "app";
19
- DataType2["EMAIL"] = "email";
20
- DataType2["Category"] = "category";
21
- return DataType2;
22
- })(DataType || {});
23
-
24
- export {
25
- DataType
26
- };
@@ -1,161 +0,0 @@
1
- import {
2
- initialRunOverlayState,
3
- reduceRunOverlay
4
- } from "./chunk-DL6EPNIK.js";
5
- import {
6
- extractCustomId
7
- } from "./chunk-DFFIZ25G.js";
8
- import {
9
- selectCurrentServer
10
- } from "./chunk-RVOUXDFU.js";
11
- import "./chunk-Y5GCAMGP.js";
12
- import "./chunk-KX6YBIHG.js";
13
- import "./chunk-XRZJGPFI.js";
14
- import "./chunk-6Y7A3OQQ.js";
15
- import "./chunk-WWC7I6TA.js";
16
- import "./chunk-SKDNBYZK.js";
17
- import "./chunk-I42VC5KR.js";
18
- import "./chunk-QSJ3HFEF.js";
19
- import "./chunk-X4Q4UZEY.js";
20
- import "./chunk-3ND52WIL.js";
21
- import {
22
- selectIdentityToken
23
- } from "./chunk-XMLRJUU5.js";
24
- import "./chunk-R5V5G73M.js";
25
- import "./chunk-GBRG75BQ.js";
26
- import "./chunk-3EUW3WEO.js";
27
- import "./chunk-U6VC4MU4.js";
28
- import "./chunk-KUG52IAP.js";
29
- import "./chunk-LCBAMY2M.js";
30
- import "./chunk-4SN6J65J.js";
31
- import "./chunk-CF7PE763.js";
32
- import {
33
- asOptionalTrimmedString
34
- } from "./chunk-G3SUCT4W.js";
35
- import "./chunk-4VNS5WPM.js";
36
-
37
- // packages/chat/dialog/childRunObserverState.ts
38
- function normalizeServerOrigin(server) {
39
- const trimmed = asOptionalTrimmedString(server);
40
- if (!trimmed) return "";
41
- return trimmed.replace(/\/+$/, "");
42
- }
43
- function buildChildThreadsQueryUrl(args) {
44
- const origin = normalizeServerOrigin(args.serverOrigin);
45
- const parentThreadId = asOptionalTrimmedString(args.parentThreadId) ?? "";
46
- const params = new URLSearchParams({ parentThreadId });
47
- if (!origin) {
48
- return `/api/agent/threads?${params.toString()}`;
49
- }
50
- return `${origin}/api/agent/threads?${params.toString()}`;
51
- }
52
- function filterDirectChildRuns(threads, parentThreadId) {
53
- const parentId = asOptionalTrimmedString(parentThreadId);
54
- if (!parentId || !Array.isArray(threads)) return [];
55
- return threads.filter((thread) => {
56
- const threadParent = asOptionalTrimmedString(thread.parentThreadId);
57
- return threadParent === parentId;
58
- });
59
- }
60
- function sortChildRunsByUpdatedAtDesc(threads) {
61
- return [...threads].sort((a, b) => {
62
- const aUpdated = typeof a.updatedAt === "number" ? a.updatedAt : 0;
63
- const bUpdated = typeof b.updatedAt === "number" ? b.updatedAt : 0;
64
- if (bUpdated !== aUpdated) return bUpdated - aUpdated;
65
- const aCreated = typeof a.createdAt === "number" ? a.createdAt : 0;
66
- const bCreated = typeof b.createdAt === "number" ? b.createdAt : 0;
67
- return bCreated - aCreated;
68
- });
69
- }
70
- function parseChildThreadsResponse(payload, parentThreadId) {
71
- if (!payload || typeof payload !== "object") {
72
- return { ok: false, error: "Invalid response" };
73
- }
74
- const record = payload;
75
- if (record.ok !== true || !record.data || !Array.isArray(record.data.threads)) {
76
- const message = typeof record.error === "string" ? record.error : asOptionalTrimmedString(
77
- record.error && typeof record.error === "object" ? record.error.message : void 0
78
- ) ?? "Failed to load child runs";
79
- return { ok: false, error: message };
80
- }
81
- const filtered = sortChildRunsByUpdatedAtDesc(
82
- filterDirectChildRuns(record.data.threads, parentThreadId)
83
- );
84
- return { ok: true, threads: filtered };
85
- }
86
-
87
- // packages/ai/agent/queryRunOverlay.ts
88
- function toRunStatus(status) {
89
- if (status === "pending") return "running";
90
- if (status === "orphaned") return "orphaned";
91
- switch (status) {
92
- case "running":
93
- case "reviewing":
94
- case "testing":
95
- case "done":
96
- case "failed":
97
- case "cancelled":
98
- return status;
99
- default:
100
- return "running";
101
- }
102
- }
103
- function threadToRunInfo(thread) {
104
- const name = asOptionalTrimmedString(thread.title) ?? asOptionalTrimmedString(thread.primaryAgentKey) ?? asOptionalTrimmedString(thread.threadId) ?? "run";
105
- const summary = asOptionalTrimmedString(thread.summary) ?? void 0;
106
- const errorMessage = thread.runtimeEvidence?.errorMessage ? asOptionalTrimmedString(thread.runtimeEvidence.errorMessage) ?? void 0 : void 0;
107
- return {
108
- runId: thread.threadId,
109
- name,
110
- status: toRunStatus(thread.status),
111
- summary,
112
- parentDialogId: asOptionalTrimmedString(thread.parentThreadId) ?? void 0,
113
- errorMessage,
114
- updatedAt: typeof thread.updatedAt === "number" ? thread.updatedAt : Date.now()
115
- };
116
- }
117
- async function queryRunOverlay(state, dialogKey, deps = {}) {
118
- const dialogId = extractCustomId(dialogKey);
119
- if (!dialogId) return null;
120
- const server = selectCurrentServer(state);
121
- const token = selectIdentityToken(state);
122
- if (!token) return null;
123
- const url = buildChildThreadsQueryUrl({
124
- serverOrigin: String(server ?? ""),
125
- parentThreadId: dialogId
126
- });
127
- const fetchImpl = deps.fetchImpl ?? fetch;
128
- let response;
129
- try {
130
- response = await fetchImpl(url, {
131
- headers: { Authorization: `Bearer ${token}` }
132
- });
133
- } catch {
134
- return null;
135
- }
136
- if (!response.ok) return null;
137
- const payload = await response.json().catch(() => null);
138
- if (!payload) return null;
139
- const parsed = parseChildThreadsResponse(payload, dialogId);
140
- if (parsed.ok !== true) return null;
141
- const children = filterDirectChildRuns(parsed.threads, dialogId);
142
- if (children.length === 0) return null;
143
- let overlay = initialRunOverlayState;
144
- for (const thread of children) {
145
- overlay = reduceRunOverlay(overlay, {
146
- type: "run-state-chg",
147
- runId: thread.threadId,
148
- info: {
149
- name: threadToRunInfo(thread).name,
150
- status: threadToRunInfo(thread).status,
151
- summary: threadToRunInfo(thread).summary,
152
- parentDialogId: threadToRunInfo(thread).parentDialogId,
153
- errorMessage: threadToRunInfo(thread).errorMessage
154
- }
155
- });
156
- }
157
- return overlay;
158
- }
159
- export {
160
- queryRunOverlay
161
- };
@@ -1,11 +0,0 @@
1
- import {
2
- buildOverlayPresentation,
3
- groupByStatus,
4
- statusLabel
5
- } from "./chunk-V5R4NZP2.js";
6
- import "./chunk-4VNS5WPM.js";
7
- export {
8
- buildOverlayPresentation,
9
- groupByStatus,
10
- statusLabel
11
- };
package/types-ZSTJ7MPR.js DELETED
@@ -1,7 +0,0 @@
1
- import {
2
- DataType
3
- } from "./chunk-X4Q4UZEY.js";
4
- import "./chunk-4VNS5WPM.js";
5
- export {
6
- DataType
7
- };
@@ -1,9 +1,9 @@
1
- import {
2
- buildCliPrompt
3
- } from "./chunk-ATNTHIZI.js";
4
1
  import {
5
2
  resolveLaunchableCodexCommand
6
3
  } from "./chunk-JBTJAPUF.js";
4
+ import {
5
+ buildCliPrompt
6
+ } from "./chunk-ATNTHIZI.js";
7
7
 
8
8
  // packages/ai/agent/cliExecutor.ts
9
9
  import { exec, execSync, spawn } from "child_process";
@@ -1,3 +1,6 @@
1
+ import {
2
+ resolveAgentRuntimeDecision
3
+ } from "./chunk-ZNFJWEN4.js";
1
4
  import {
2
5
  createCliAuthorityBrokerClient,
3
6
  createCliAuthorityBrokerSocketInvoker,
@@ -7,9 +10,6 @@ import {
7
10
  resolveCliAuthorityStoreDriver
8
11
  } from "./chunk-U4TRT5V4.js";
9
12
  import "./chunk-LM6IYQ3F.js";
10
- import {
11
- resolveAgentRuntimeDecision
12
- } from "./chunk-ZNFJWEN4.js";
13
13
  import {
14
14
  toErrorMessage
15
15
  } from "./chunk-HNMXYYJR.js";