@qredence/fleet 0.5.0 → 0.5.5

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 (122) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +8 -1
  3. package/bin/fleet-prime.mjs +6 -0
  4. package/dist/web/client/assets/action-swap-roll-DX5o_33Q.js +1 -0
  5. package/dist/web/client/assets/artifacts-panel-C3yewUBP.js +1 -0
  6. package/dist/web/client/assets/artifacts-utils-N_kUFbz2.js +1 -0
  7. package/dist/web/client/assets/bot-Bs7QWJ2q.js +1 -0
  8. package/dist/web/client/assets/{chat-C64Sv6V-.js → chat-W-yOMyG_.js} +5 -5
  9. package/dist/web/client/assets/chat-command-palette-D0xDK1j4.js +1 -0
  10. package/dist/web/client/assets/command-CQzrtjyj.js +2 -0
  11. package/dist/web/client/assets/ease-vFBiNFNK.js +9 -0
  12. package/dist/web/client/assets/{fleet-pi-tool-renderer-ZKiX6Ob_.js → fleet-pi-tool-renderer-B0Y7ou0U.js} +28 -30
  13. package/dist/web/client/assets/generative-text-renderer-SS9c1kNX.js +6 -0
  14. package/dist/web/client/assets/globals-D_Hy9bT1.css +2 -0
  15. package/dist/web/client/assets/horizontal-resize-C1TpRLNC.js +1 -0
  16. package/dist/web/client/assets/index-C9FloFgj.js +12 -0
  17. package/dist/web/client/assets/{input-Clyn18XG.js → input-CqC82Agz.js} +1 -1
  18. package/dist/web/client/assets/{input-group-MxDAWX3j.js → input-group-H0TG-mkU.js} +1 -1
  19. package/dist/web/client/assets/ipython-tool-BrMePqD-.js +3 -0
  20. package/dist/web/client/assets/markdown-DG7pUdsX.js +2 -0
  21. package/dist/web/client/assets/{markdown-code-pIaEVDUU.js → markdown-code-BgMzpy7O.js} +1 -1
  22. package/dist/web/client/assets/notify-Duj26eeZ.js +1 -0
  23. package/dist/web/client/assets/{openui-renderer-NLUpAS3h.js → openui-renderer-CCfQqUfE.js} +5 -5
  24. package/dist/web/client/assets/openui-utils-DawGoQNp.js +1 -0
  25. package/dist/web/client/assets/prime-agent-artifacts-C-g1VPiW.js +5 -0
  26. package/dist/web/client/assets/{provider-catalog-Gx9qaHBM.js → provider-catalog-BZhZuKSz.js} +1 -1
  27. package/dist/web/client/assets/provider-label-jKm8v18u.js +1 -0
  28. package/dist/web/client/assets/range-65lubOFp.js +2 -0
  29. package/dist/web/client/assets/repl-panel-CCh4ly7J.js +1 -0
  30. package/dist/web/client/assets/resource-helpers-ULlyU8qK.js +2 -0
  31. package/dist/web/client/assets/resources-panel-DSU7VGX2.js +1 -0
  32. package/dist/web/client/assets/routes-DSTyx_J0.js +16 -0
  33. package/dist/web/client/assets/session-insights-panel-CQdT90Op.js +1 -0
  34. package/dist/web/client/assets/settings-dialog-CkfpTKfM.js +1 -0
  35. package/dist/web/client/assets/skeleton-loaders-fStjEeRP.js +1 -0
  36. package/dist/web/client/assets/square-terminal-BYTN_I86.js +1 -0
  37. package/dist/web/client/assets/subagent-chat-panel-D-qw4uWb.js +1 -0
  38. package/dist/web/client/assets/subagent-transcript-C7oRwEEP.js +1 -0
  39. package/dist/web/client/assets/subagents-panel-aSMWZP9p.js +1 -0
  40. package/dist/web/client/assets/{switch-ojzdMno9.js → switch-BFEBpUEU.js} +1 -1
  41. package/dist/web/client/assets/{tool-result-QvhjpNGX.js → tool-result-C2NvnN32.js} +3 -3
  42. package/dist/web/client/assets/ui-preferences-DUEFuJFj.js +1 -0
  43. package/dist/web/client/assets/workspace-panel-CjdXlEvd.js +1 -0
  44. package/dist/web/client/assets/workspace-path-nav-C0AQNZyy.js +1 -0
  45. package/dist/web/server/{_tanstack-start-manifest_v-uZddQetG-MNZGQOSA.js → _tanstack-start-manifest_v-DZc7dwm7-6ZQLGXB7.js} +23 -16
  46. package/dist/web/server/{artifacts-panel-knpQvJ-q-WJLZ76QB.js → artifacts-panel-Bt7YUzm4-NCBMXJ25.js} +39 -72
  47. package/dist/web/server/{chat-command-palette-CPv5GmGJ-22J32S6P.js → chat-command-palette-Co1L3rUY-RQLNME4T.js} +43 -20
  48. package/dist/web/server/{chunk-5277VI3D.js → chunk-2V6B62OF.js} +213 -275
  49. package/dist/web/server/{chunk-W7LNJCRJ.js → chunk-3HUI75QM.js} +75 -67
  50. package/dist/web/server/{chunk-I3FDTJFO.js → chunk-46VQY7SG.js} +6 -87
  51. package/dist/web/server/{chunk-PRT4QYOB.js → chunk-4UBOIY2S.js} +2 -35
  52. package/dist/web/server/{chunk-WTYNN6EV.js → chunk-54II5QXQ.js} +23 -1
  53. package/dist/web/server/chunk-56HSKUBD.js +1805 -0
  54. package/dist/web/server/{chunk-RPROZ2JC.js → chunk-5RQ6QAZX.js} +133 -133
  55. package/dist/web/server/{chunk-APN3LVRT.js → chunk-6D524OCJ.js} +201 -204
  56. package/dist/web/server/chunk-6GMKRR3C.js +161 -0
  57. package/dist/web/server/chunk-74QOI457.js +45 -0
  58. package/dist/web/server/{chunk-UBUXV2TW.js → chunk-AECEK3K7.js} +8 -8
  59. package/dist/web/server/chunk-AQ66E5OW.js +33 -0
  60. package/dist/web/server/{chunk-JD6EWZCU.js → chunk-AWFOBHH4.js} +50 -50
  61. package/dist/web/server/{chunk-MK3P3OBZ.js → chunk-BEMDNODD.js} +5 -5
  62. package/dist/web/server/{chunk-X2TUFLTP.js → chunk-BLVCDQ7E.js} +438 -438
  63. package/dist/web/server/chunk-FZRBAPUM.js +48 -0
  64. package/dist/web/server/chunk-G5BCQQ5N.js +34 -0
  65. package/dist/web/server/chunk-KOIPYBJF.js +3773 -0
  66. package/dist/web/server/{chunk-XYYNYFFD.js → chunk-LSIHVSUT.js} +2 -2
  67. package/dist/web/server/{chunk-KVHPE5XH.js → chunk-MDYA4NXK.js} +22 -8
  68. package/dist/web/server/chunk-NFRJDPB3.js +52 -0
  69. package/dist/web/server/chunk-P66QQWUM.js +67 -0
  70. package/dist/web/server/{chunk-4KFMONRT.js → chunk-PDRD2X5G.js} +9 -9
  71. package/dist/web/server/{chunk-XXNFEXDU.js → chunk-QJBEWT4E.js} +2 -70
  72. package/dist/web/server/{chunk-AQWTGP35.js → chunk-RX62LUDV.js} +8 -8
  73. package/dist/web/server/chunk-SR65ARVS.js +192 -0
  74. package/dist/web/server/{chunk-WK7CQS2N.js → chunk-SZ65K4CO.js} +48 -48
  75. package/dist/web/server/{chunk-C7EKOPZU.js → chunk-TO3YPLNZ.js} +89 -89
  76. package/dist/web/server/{chunk-IFV5M33X.js → chunk-UKINNXJY.js} +12 -26
  77. package/dist/web/server/chunk-VGDP4YDU.js +401 -0
  78. package/dist/web/server/{fleet-pi-tool-renderer-5vYFNeZS-IHKMLT7W.js → chunk-VRLTWOVJ.js} +46 -393
  79. package/dist/web/server/{chunk-KDSISV4P.js → chunk-WN77JNYY.js} +2 -50
  80. package/dist/web/server/{chunk-OADQILSQ.js → chunk-WZNZQNI4.js} +267 -3667
  81. package/dist/web/server/{chunk-KAWYGHDN.js → chunk-XFVL5ITL.js} +2354 -2314
  82. package/dist/web/server/{chunk-ZX3XOSYO.js → chunk-XLCTCC4W.js} +3 -3
  83. package/dist/web/server/{chunk-TTQ75CXC.js → chunk-Y4MHIA7B.js} +97 -40
  84. package/dist/web/server/fleet-pi-tool-renderer-CE45vM6T-2UQN6RJM.js +37 -0
  85. package/dist/web/server/{fork-picker-dialog-BZzfxdQd-C6SPHFAW.js → fork-picker-dialog-DCzuGelH-TN2Q5OXI.js} +5 -5
  86. package/dist/web/server/{markdown-Ct_q4D-z-VFWZRBTY.js → markdown-Boni3lHk-AZGKDNAR.js} +1 -1
  87. package/dist/web/server/{markdown-code-C_ih1bX1-5CIWT3CH.js → markdown-code-BrWukbg3-D2GN4Y77.js} +2 -2
  88. package/dist/web/server/{openui-renderer-BT5jL0Yf-XYLLN5U6.js → openui-renderer-c36_GYes-HX46N4M5.js} +14 -13
  89. package/dist/web/server/repl-panel-D9E8nkQy-L45ZNG2V.js +118 -0
  90. package/dist/web/server/{resources-panel-DNCVHTIg-PJYMXVGE.js → resources-panel-CwKh4U9f-D3VDEMDW.js} +6 -6
  91. package/dist/web/server/{router-DDxOMz3K-HRBXILHM.js → router-_ZpegqiQ-QIE44PIB.js} +1811 -1334
  92. package/dist/web/server/{routes-BX4Tv-6R-FHIZYUWW.js → routes-Ct81-8Tq-LHRMOS7R.js} +3958 -4534
  93. package/dist/web/server/server.js +3 -3
  94. package/dist/web/server/{session-insights-panel-gYkkAE8H-W4O74Z7H.js → session-insights-panel-BHZyKDTo-LRMAMA3O.js} +5 -3
  95. package/dist/web/server/{settings-dialog-BTBFLQ1P-ZENQ4KWK.js → settings-dialog-B4uUS6f--AZ4I4ZOT.js} +179 -193
  96. package/dist/web/server/{start-CLAD7RcD-56S4BWMM.js → start-BYVnok_H-IA6TWGA3.js} +1 -1
  97. package/dist/web/server/subagent-chat-panel-C97S3WID-DLOAD5TG.js +63 -0
  98. package/dist/web/server/subagents-panel-iHpvMIZy-LI6XK66M.js +181 -0
  99. package/dist/web/server/{chunk-5SZXUN3Y.js → workspace-panel-CHPoiXEo-YB4WS3MK.js} +29 -16
  100. package/package.json +15 -7
  101. package/dist/web/client/assets/artifacts-panel-8TyrNBM_.js +0 -1
  102. package/dist/web/client/assets/chat-command-palette-HpsmKfLO.js +0 -1
  103. package/dist/web/client/assets/collapsible-WCSnxhr2.js +0 -1
  104. package/dist/web/client/assets/command-DgfiCKcY.js +0 -2
  105. package/dist/web/client/assets/globals-BmxtUHFx.css +0 -2
  106. package/dist/web/client/assets/horizontal-resize-B76jjn5v.js +0 -1
  107. package/dist/web/client/assets/index-0pBr_bKy.js +0 -12
  108. package/dist/web/client/assets/markdown-BXWmNJo7.js +0 -2
  109. package/dist/web/client/assets/prime-agent-artifacts-k9JiTDZM.js +0 -5
  110. package/dist/web/client/assets/provider-brand-icon-VCebsuTD.js +0 -1
  111. package/dist/web/client/assets/range-KAaLzImH.js +0 -2
  112. package/dist/web/client/assets/resources-panel-BWuKeyrb.js +0 -1
  113. package/dist/web/client/assets/routes-BPRw0UzV.js +0 -20
  114. package/dist/web/client/assets/session-insights-panel-CPymkzZT.js +0 -1
  115. package/dist/web/client/assets/settings-dialog-6p8mjg8t.js +0 -1
  116. package/dist/web/client/assets/shared-DAI9OAw0.js +0 -2
  117. package/dist/web/client/assets/skeleton-loaders-qxIkJKCA.js +0 -1
  118. package/dist/web/client/assets/workspace-panel-C67-fqw4.js +0 -1
  119. package/dist/web/client/assets/workspace-path-nav-BrQHo6es.js +0 -9
  120. package/dist/web/server/chunk-KJ4UUAEU.js +0 -83
  121. package/dist/web/server/chunk-NGI44XRR.js +0 -334
  122. package/dist/web/server/workspace-panel-BNAXF57q-EQCBPEG4.js +0 -28
@@ -3,9 +3,9 @@ import {
3
3
  useId$1,
4
4
  useIsoLayoutEffect,
5
5
  useRefWithInit
6
- } from "./chunk-X2TUFLTP.js";
6
+ } from "./chunk-BLVCDQ7E.js";
7
7
 
8
- // web/app/dist/server/assets/useBaseUiId-BJH6Ww_M.js
8
+ // web/app/dist/server/assets/useBaseUiId-CQSJHoz4.js
9
9
  import * as React$1 from "react";
10
10
  function useValueAsRef(value) {
11
11
  const latest = useRefWithInit(createLatestRef, value).current;
@@ -8,8 +8,8 @@ import {
8
8
  __exportAll
9
9
  } from "./chunk-L547YHC4.js";
10
10
 
11
- // web/app/dist/server/assets/markdown-Ct_q4D-z.js
12
- import { Suspense, lazy } from "react";
11
+ // web/app/dist/server/assets/markdown-Boni3lHk.js
12
+ import { Fragment, Suspense, isValidElement, lazy } from "react";
13
13
  import { jsx } from "react/jsx-runtime";
14
14
  var markdown_exports = /* @__PURE__ */ __exportAll({
15
15
  Markdown: () => Markdown,
@@ -18,7 +18,7 @@ var markdown_exports = /* @__PURE__ */ __exportAll({
18
18
  markdownComponents: () => markdownComponents,
19
19
  normalizeCodeFenceLanguages: () => normalizeCodeFenceLanguages
20
20
  });
21
- var LazyHighlightedMarkdown = lazy(() => import("./markdown-code-C_ih1bX1-5CIWT3CH.js").then(({ HighlightedMarkdown }) => ({ default: HighlightedMarkdown })));
21
+ var LazyHighlightedMarkdown = lazy(() => import("./markdown-code-BrWukbg3-D2GN4Y77.js").then(({ HighlightedMarkdown }) => ({ default: HighlightedMarkdown })));
22
22
  function fixNumberedListBreaks(text) {
23
23
  return text.replace(/^(\d+)\.\s*\n+\s*\n*/gm, "$1. ");
24
24
  }
@@ -48,6 +48,16 @@ function normalizeCodeFenceLanguages(text) {
48
48
  });
49
49
  }
50
50
  var SAFE_HREF_PATTERN = /^(https?:|mailto:)/i;
51
+ function containsBlockMarkdownChild(value, imageIsSoleChild) {
52
+ if (!isValidElement(value)) return false;
53
+ const props = value.props;
54
+ if (typeof props !== "object" || props === null) return false;
55
+ const node = "node" in props ? props.node : void 0;
56
+ const tagName = typeof node === "object" && node !== null && "tagName" in node ? node.tagName : void 0;
57
+ if (tagName === "img") return imageIsSoleChild;
58
+ if (tagName === "code" && "data-block" in props) return true;
59
+ return "children" in props && containsBlockMarkdownChild(props.children, imageIsSoleChild);
60
+ }
51
61
  var markdownComponents = {
52
62
  h1: ({ children, ...props }) => /* @__PURE__ */ jsx("h1", {
53
63
  className: "an-md-h1 mt-3 mb-1.5 text-base font-semibold",
@@ -69,11 +79,15 @@ var markdownComponents = {
69
79
  ...props,
70
80
  children
71
81
  }),
72
- p: ({ children, ...props }) => /* @__PURE__ */ jsx("p", {
73
- className: "an-md-p text-sm leading-relaxed text-an-foreground/80",
74
- ...props,
75
- children
76
- }),
82
+ p: ({ children, node, ...props }) => {
83
+ const child = (Array.isArray(children) ? children : [children]).filter((value) => value != null && value !== "");
84
+ if (child.some((value) => containsBlockMarkdownChild(value, child.length === 1))) return /* @__PURE__ */ jsx(Fragment, { children });
85
+ return /* @__PURE__ */ jsx("p", {
86
+ className: "an-md-p text-sm leading-relaxed text-an-foreground/80",
87
+ ...props,
88
+ children
89
+ });
90
+ },
77
91
  ul: ({ children, ...props }) => /* @__PURE__ */ jsx("ul", {
78
92
  className: "an-md-ul mb-2 flex list-outside list-disc flex-col gap-0.5 pl-4 text-sm text-an-foreground/80",
79
93
  ...props,
@@ -0,0 +1,52 @@
1
+ // web/app/dist/server/assets/openui-utils-B007ClQb.js
2
+ var OPENUI_FENCE_PATTERN = /```(?:openui|openui-lang)(?:[ \t]*\r?\n|[ \t]+)([\s\S]*?)```/gi;
3
+ function appendSegment(segments, ordinals, type, content) {
4
+ const ordinal = ordinals[type];
5
+ ordinals[type] += 1;
6
+ segments.push({
7
+ content,
8
+ id: `${type}-${ordinal}`,
9
+ type
10
+ });
11
+ }
12
+ function stripOpenUIWrapper(content) {
13
+ const cleaned = content.trim();
14
+ const fences = Array.from(cleaned.matchAll(OPENUI_FENCE_PATTERN));
15
+ const onlyFence = fences[0];
16
+ if (fences.length === 1 && onlyFence?.index === 0 && onlyFence[0].length === cleaned.length) return onlyFence[1].trim();
17
+ return cleaned;
18
+ }
19
+ function isOpenUIProgram(content) {
20
+ return stripOpenUIWrapper(content).startsWith("root =");
21
+ }
22
+ function segmentOpenUIContent(content) {
23
+ const segments = [];
24
+ const ordinals = {
25
+ markdown: 0,
26
+ openui: 0
27
+ };
28
+ const stripped = stripOpenUIWrapper(content);
29
+ if (stripped.startsWith("root =")) {
30
+ appendSegment(segments, ordinals, "openui", stripped);
31
+ return segments;
32
+ }
33
+ let lastIndex = 0;
34
+ for (const match of content.matchAll(OPENUI_FENCE_PATTERN)) {
35
+ const index = match.index;
36
+ const markdown = content.slice(lastIndex, index);
37
+ if (markdown.trim()) appendSegment(segments, ordinals, "markdown", markdown);
38
+ const openUI = match[1].trim();
39
+ const isOpenUI = isOpenUIProgram(openUI);
40
+ appendSegment(segments, ordinals, isOpenUI ? "openui" : "markdown", isOpenUI ? openUI : match[0]);
41
+ lastIndex = index + match[0].length;
42
+ }
43
+ const trailingMarkdown = content.slice(lastIndex);
44
+ if (trailingMarkdown.trim()) appendSegment(segments, ordinals, "markdown", trailingMarkdown);
45
+ if (segments.length > 0) return segments;
46
+ appendSegment(segments, ordinals, "markdown", content);
47
+ return segments;
48
+ }
49
+
50
+ export {
51
+ segmentOpenUIContent
52
+ };
@@ -0,0 +1,67 @@
1
+ // web/app/dist/server/assets/workspace-path-nav-HpRcJQjc.js
2
+ var WORKSPACE_ROOT = "agent-workspace";
3
+ function collapseWorkspaceSegments(path) {
4
+ const stack = [];
5
+ for (const segment of path.split("/")) {
6
+ if (!segment || segment === ".") continue;
7
+ if (segment === "..") {
8
+ stack.pop();
9
+ continue;
10
+ }
11
+ stack.push(segment);
12
+ }
13
+ return stack.join("/");
14
+ }
15
+ function isPathWithinScope(path, scopePath) {
16
+ if (!scopePath) return true;
17
+ return path === scopePath || path.startsWith(`${scopePath}/`);
18
+ }
19
+ function stripSandboxPrefixes(filePath) {
20
+ for (const prefix of [
21
+ "/project/sandbox/repo/",
22
+ "/project/sandbox/",
23
+ "/project/",
24
+ "/workspace/"
25
+ ]) if (filePath.startsWith(prefix)) return filePath.slice(prefix.length);
26
+ const markerIndex = filePath.indexOf(".21st/worktrees/");
27
+ if (markerIndex !== -1) {
28
+ const segments = filePath.slice(markerIndex + 16).split("/");
29
+ if (segments.length >= 3 && segments[0] && segments[1]) return segments.slice(2).join("/");
30
+ }
31
+ return filePath;
32
+ }
33
+ function findWorkspaceRootIndex(segments) {
34
+ return segments.indexOf(WORKSPACE_ROOT);
35
+ }
36
+ function normalizeWorkspaceFilePath(raw) {
37
+ const trimmed = raw.trim();
38
+ if (!trimmed) return null;
39
+ const normalized = stripSandboxPrefixes(trimmed).replace(/\\/g, "/").replace(/\/+/g, "/");
40
+ if (normalized.startsWith(`${WORKSPACE_ROOT}/`)) {
41
+ const collapsed = collapseWorkspaceSegments(normalized);
42
+ return collapsed.startsWith(`${WORKSPACE_ROOT}/`) ? collapsed : null;
43
+ }
44
+ if (normalized === WORKSPACE_ROOT) return null;
45
+ if (normalized.startsWith("artifacts/")) return `${WORKSPACE_ROOT}/${normalized}`;
46
+ if (normalized.startsWith("/")) {
47
+ const segments = normalized.split("/").filter(Boolean);
48
+ const rootIndex = findWorkspaceRootIndex(segments);
49
+ if (rootIndex >= 0) return segments.slice(rootIndex).join("/");
50
+ return null;
51
+ }
52
+ return null;
53
+ }
54
+ function resolveWorkspacePanelTarget(rawPath) {
55
+ const path = normalizeWorkspaceFilePath(rawPath);
56
+ if (!path) return null;
57
+ return {
58
+ panel: "workspace",
59
+ path
60
+ };
61
+ }
62
+
63
+ export {
64
+ isPathWithinScope,
65
+ stripSandboxPrefixes,
66
+ resolveWorkspacePanelTarget
67
+ };
@@ -1,3 +1,10 @@
1
+ import {
2
+ LazyContext,
3
+ animations,
4
+ createDomVisualElement,
5
+ gestureAnimations,
6
+ loadFeatures
7
+ } from "./chunk-FAGDMGLK.js";
1
8
  import {
2
9
  ChatDeliveryModeSchema,
3
10
  ChatPackageSourceSchema,
@@ -7,16 +14,9 @@ import {
7
14
  nonEmptyStringSchema,
8
15
  nonNegativeIntSchema,
9
16
  positiveIntSchema
10
- } from "./chunk-KAWYGHDN.js";
11
- import {
12
- LazyContext,
13
- animations,
14
- createDomVisualElement,
15
- gestureAnimations,
16
- loadFeatures
17
- } from "./chunk-FAGDMGLK.js";
17
+ } from "./chunk-XFVL5ITL.js";
18
18
 
19
- // web/app/dist/server/assets/chat-protocol.zod-BBzdLgv_.js
19
+ // web/app/dist/server/assets/chat-protocol.zod-adEe9eKH.js
20
20
  import { useEffect, useRef, useState } from "react";
21
21
  import { jsx } from "react/jsx-runtime";
22
22
  function LazyMotion({ children, features, strict = false }) {
@@ -33,7 +33,7 @@ import {
33
33
  usePresence
34
34
  } from "./chunk-FAGDMGLK.js";
35
35
 
36
- // web/app/dist/server/assets/workspace-path-nav-BOYmkP8s.js
36
+ // web/app/dist/server/assets/ease-wRsoBG43.js
37
37
  import * as React$1 from "react";
38
38
  import { Children, Fragment, createContext, createElement, forwardRef, isValidElement, useCallback as useCallback2, useContext, useEffect as useEffect2, useId, useInsertionEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
39
39
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -739,71 +739,6 @@ var SPRING_GLIDE = {
739
739
  damping: 50,
740
740
  mass: 0.5
741
741
  };
742
- var WORKSPACE_ROOT = "agent-workspace";
743
- var ARTIFACTS_SEGMENT = `${WORKSPACE_ROOT}/artifacts`;
744
- function collapseWorkspaceSegments(path) {
745
- const stack = [];
746
- for (const segment of path.split("/")) {
747
- if (!segment || segment === ".") continue;
748
- if (segment === "..") {
749
- stack.pop();
750
- continue;
751
- }
752
- stack.push(segment);
753
- }
754
- return stack.join("/");
755
- }
756
- function isPathWithinScope(path, scopePath) {
757
- if (!scopePath) return true;
758
- return path === scopePath || path.startsWith(`${scopePath}/`);
759
- }
760
- function stripSandboxPrefixes(filePath) {
761
- for (const prefix of [
762
- "/project/sandbox/repo/",
763
- "/project/sandbox/",
764
- "/project/",
765
- "/workspace/"
766
- ]) if (filePath.startsWith(prefix)) return filePath.slice(prefix.length);
767
- const markerIndex = filePath.indexOf(".21st/worktrees/");
768
- if (markerIndex !== -1) {
769
- const segments = filePath.slice(markerIndex + 16).split("/");
770
- if (segments.length >= 3 && segments[0] && segments[1]) return segments.slice(2).join("/");
771
- }
772
- return filePath;
773
- }
774
- function findWorkspaceRootIndex(segments) {
775
- return segments.indexOf(WORKSPACE_ROOT);
776
- }
777
- function normalizeWorkspaceFilePath(raw) {
778
- const trimmed = raw.trim();
779
- if (!trimmed) return null;
780
- const normalized = stripSandboxPrefixes(trimmed).replace(/\\/g, "/").replace(/\/+/g, "/");
781
- if (normalized.startsWith(`${WORKSPACE_ROOT}/`)) {
782
- const collapsed = collapseWorkspaceSegments(normalized);
783
- return collapsed.startsWith(`${WORKSPACE_ROOT}/`) ? collapsed : null;
784
- }
785
- if (normalized === WORKSPACE_ROOT) return null;
786
- if (normalized.startsWith("artifacts/")) return `${WORKSPACE_ROOT}/${normalized}`;
787
- if (normalized.startsWith("/")) {
788
- const segments = normalized.split("/").filter(Boolean);
789
- const rootIndex = findWorkspaceRootIndex(segments);
790
- if (rootIndex >= 0) return segments.slice(rootIndex).join("/");
791
- return null;
792
- }
793
- return null;
794
- }
795
- function resolveWorkspacePanelTarget(rawPath) {
796
- const path = normalizeWorkspaceFilePath(rawPath);
797
- if (!path) return null;
798
- if (path.startsWith(`${ARTIFACTS_SEGMENT}/`) || path === ARTIFACTS_SEGMENT) return {
799
- panel: "artifacts",
800
- path
801
- };
802
- return {
803
- panel: "workspace",
804
- path
805
- };
806
- }
807
742
 
808
743
  export {
809
744
  useConstant,
@@ -822,8 +757,5 @@ export {
822
757
  SPRING_PANEL,
823
758
  SPRING_LAYOUT,
824
759
  SPRING_MOUSE,
825
- SPRING_GLIDE,
826
- isPathWithinScope,
827
- stripSandboxPrefixes,
828
- resolveWorkspacePanelTarget
760
+ SPRING_GLIDE
829
761
  };
@@ -1,8 +1,3 @@
1
- import {
2
- useBaseUiId,
3
- useTransitionStatus,
4
- useValueAsRef
5
- } from "./chunk-XYYNYFFD.js";
6
1
  import {
7
2
  Button,
8
3
  FOCUSABLE_ATTRIBUTE,
@@ -35,7 +30,12 @@ import {
35
30
  usePortalContext,
36
31
  useTimeout,
37
32
  webkit
38
- } from "./chunk-RPROZ2JC.js";
33
+ } from "./chunk-5RQ6QAZX.js";
34
+ import {
35
+ useBaseUiId,
36
+ useTransitionStatus,
37
+ useValueAsRef
38
+ } from "./chunk-LSIHVSUT.js";
39
39
  import {
40
40
  AnimationFrame,
41
41
  EMPTY_OBJECT,
@@ -73,12 +73,12 @@ import {
73
73
  useRefWithInit,
74
74
  useRenderElement,
75
75
  useStableCallback
76
- } from "./chunk-X2TUFLTP.js";
76
+ } from "./chunk-BLVCDQ7E.js";
77
77
  import {
78
78
  cn
79
79
  } from "./chunk-DJMHPJBP.js";
80
80
 
81
- // web/app/dist/server/assets/dialog-BP46mwfT.js
81
+ // web/app/dist/server/assets/dialog-kkjbxEm9.js
82
82
  import * as React$1 from "react";
83
83
  import { createContext as createContext2, useContext as useContext2 } from "react";
84
84
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -0,0 +1,192 @@
1
+ import {
2
+ FleetGenerativeTextRenderer,
3
+ FleetSubagentList,
4
+ FleetToolTimeline,
5
+ Message,
6
+ MessageBubble,
7
+ MessageBubbleContent,
8
+ MessageContent,
9
+ MessageScroller,
10
+ UserMessage,
11
+ buildAssistantElements,
12
+ groupMessages,
13
+ normalizeAssistantToolParts
14
+ } from "./chunk-56HSKUBD.js";
15
+ import {
16
+ FleetPiToolRenderer
17
+ } from "./chunk-VRLTWOVJ.js";
18
+ import {
19
+ PI_TOOL_RENDERERS
20
+ } from "./chunk-3HUI75QM.js";
21
+ import {
22
+ RefreshCw
23
+ } from "./chunk-FZRBAPUM.js";
24
+ import {
25
+ Bot
26
+ } from "./chunk-74QOI457.js";
27
+ import {
28
+ derivePrimeAgentArtifactRuns
29
+ } from "./chunk-4UBOIY2S.js";
30
+ import {
31
+ Button
32
+ } from "./chunk-5RQ6QAZX.js";
33
+ import {
34
+ CircleAlert
35
+ } from "./chunk-7APYEQIO.js";
36
+ import {
37
+ cn
38
+ } from "./chunk-DJMHPJBP.js";
39
+
40
+ // web/app/dist/server/assets/subagent-transcript-CDugT-kD.js
41
+ import { useMemo } from "react";
42
+ import { jsx, jsxs } from "react/jsx-runtime";
43
+ function transcriptStatus(child) {
44
+ if (child.status === "running" || child.status === "recovering") return "streaming";
45
+ if (child.status === "error" || child.status === "failed") return "error";
46
+ return "ready";
47
+ }
48
+ function SubagentTurnView({ turn, isLast, isStreaming, artifacts, presentation }) {
49
+ const assistantElements = useMemo(() => turn.assistants.flatMap((message, index) => buildAssistantElements(normalizeAssistantToolParts(message.parts ?? []), {
50
+ messageId: message.id,
51
+ isLast: isLast && index === turn.assistants.length - 1,
52
+ isStreaming,
53
+ suppressQuestionTool: true,
54
+ ToolRendererComponent: FleetPiToolRenderer,
55
+ TextRendererComponent: FleetGenerativeTextRenderer,
56
+ toolRenderers: PI_TOOL_RENDERERS
57
+ })), [
58
+ isLast,
59
+ isStreaming,
60
+ turn.assistants
61
+ ]);
62
+ return /* @__PURE__ */ jsxs("div", {
63
+ className: "flex flex-col gap-3",
64
+ children: [turn.user ? /* @__PURE__ */ jsx(Message, {
65
+ from: "user",
66
+ children: /* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(UserMessage, {
67
+ message: turn.user,
68
+ enableImagePreview: false
69
+ }) })
70
+ }) : null, turn.assistants.length > 0 ? /* @__PURE__ */ jsx(Message, {
71
+ from: "assistant",
72
+ children: /* @__PURE__ */ jsx(MessageContent, { children: /* @__PURE__ */ jsx(MessageBubble, {
73
+ variant: "ghost",
74
+ children: /* @__PURE__ */ jsxs(MessageBubbleContent, { children: [
75
+ isLast ? /* @__PURE__ */ jsx(FleetToolTimeline, {
76
+ messages: turn.assistants,
77
+ artifacts,
78
+ streaming: isStreaming
79
+ }) : null,
80
+ /* @__PURE__ */ jsx("div", {
81
+ className: "flex flex-col gap-3",
82
+ children: assistantElements
83
+ }),
84
+ isLast && presentation ? /* @__PURE__ */ jsx(FleetSubagentList, {
85
+ children: presentation.rlmChildren,
86
+ tree: presentation.rlmTree
87
+ }) : null
88
+ ] })
89
+ }) })
90
+ }) : null]
91
+ });
92
+ }
93
+ function SubagentTranscriptView({ child, parentSessionId, transcript, onRefresh, fullWidth = false, status: statusOverride }) {
94
+ const turns = useMemo(() => transcript?.status !== "loading" ? groupMessages(transcript?.messages ?? []) : [], [transcript]);
95
+ const childStatus = statusOverride ?? transcriptStatus(child);
96
+ const artifactRuns = useMemo(() => transcript?.status !== "loading" ? derivePrimeAgentArtifactRuns(transcript?.messages ?? [], transcript?.presentation, childStatus) : [], [childStatus, transcript]);
97
+ const artifacts = useMemo(() => artifactRuns.flatMap((run) => run.artifacts), [artifactRuns]);
98
+ const title = child.sessionName || child.label;
99
+ return /* @__PURE__ */ jsxs("section", {
100
+ "aria-label": `Subagent thread: ${child.label}`,
101
+ className: cn(fullWidth ? "flex min-h-0 min-w-0 flex-1 flex-col" : "space-y-2", "min-w-0"),
102
+ "data-testid": fullWidth ? "subagent-conversation-surface" : void 0,
103
+ children: [/* @__PURE__ */ jsxs("div", {
104
+ className: "flex min-w-0 items-start gap-2 rounded-md border border-border/60 bg-background px-2.5 py-2",
105
+ children: [
106
+ /* @__PURE__ */ jsx(Bot, { className: "mt-0.5 size-3.5 shrink-0 text-foreground/45" }),
107
+ /* @__PURE__ */ jsxs("div", {
108
+ className: "min-w-0 flex-1",
109
+ children: [
110
+ /* @__PURE__ */ jsxs("div", {
111
+ className: "flex min-w-0 items-center gap-2",
112
+ children: [/* @__PURE__ */ jsx("span", {
113
+ className: "min-w-0 flex-1 truncate text-xs font-medium text-foreground/80",
114
+ children: title
115
+ }), /* @__PURE__ */ jsx("span", {
116
+ className: "shrink-0 text-[10px] capitalize text-foreground/45",
117
+ children: child.status
118
+ })]
119
+ }),
120
+ child.model ? /* @__PURE__ */ jsx("p", {
121
+ className: "truncate font-mono text-[10px] text-foreground/40",
122
+ children: child.model
123
+ }) : null,
124
+ child.lastHeardFrom ? /* @__PURE__ */ jsxs("p", {
125
+ className: "truncate text-[10px] text-foreground/40",
126
+ children: ["Heartbeat: ", new Date(child.lastHeardFrom).toLocaleTimeString()]
127
+ }) : null,
128
+ child.answerPreview || child.recap ? /* @__PURE__ */ jsx("p", {
129
+ className: "mt-1 line-clamp-3 whitespace-pre-wrap text-[11px] leading-4 text-foreground/55",
130
+ children: child.answerPreview ?? child.recap
131
+ }) : null
132
+ ]
133
+ }),
134
+ onRefresh ? /* @__PURE__ */ jsx(Button, {
135
+ "aria-label": `Refresh ${child.label} thread`,
136
+ className: "shrink-0 text-foreground/40 hover:text-foreground/70",
137
+ onClick: onRefresh,
138
+ size: "icon-sm",
139
+ title: `Refresh ${child.label} thread`,
140
+ type: "button",
141
+ variant: "ghost",
142
+ children: /* @__PURE__ */ jsx(RefreshCw, { className: cn("size-3.5", transcript?.status === "loading" && "animate-spin") })
143
+ }) : null
144
+ ]
145
+ }), !parentSessionId ? /* @__PURE__ */ jsx("p", {
146
+ className: "rounded-md border border-dashed border-border/70 px-3 py-3 text-[11px] leading-4 text-foreground/45",
147
+ children: "This subagent thread is unavailable until the parent session is active."
148
+ }) : transcript?.status === "loading" ? /* @__PURE__ */ jsx("div", {
149
+ className: cn("flex items-center justify-center rounded-md border border-dashed border-border/70 text-[11px] text-foreground/45", fullWidth ? "min-h-32 flex-1" : "min-h-32"),
150
+ children: "Loading subagent thread\u2026"
151
+ }) : transcript?.status === "error" && turns.length === 0 ? /* @__PURE__ */ jsxs("div", {
152
+ role: "alert",
153
+ className: "flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] leading-4 text-destructive",
154
+ children: [/* @__PURE__ */ jsx(CircleAlert, { className: "mt-0.5 size-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", { children: transcript.error?.message ?? "Unable to load this subagent thread." })]
155
+ }) : turns.length === 0 ? /* @__PURE__ */ jsx("p", {
156
+ className: "rounded-md border border-dashed border-border/70 px-3 py-3 text-[11px] leading-4 text-foreground/45",
157
+ children: "This subagent thread has no messages yet."
158
+ }) : /* @__PURE__ */ jsxs("div", {
159
+ className: "flex min-h-0 flex-1 flex-col",
160
+ children: [transcript?.error ? /* @__PURE__ */ jsxs("div", {
161
+ role: "alert",
162
+ className: "mx-4 mt-2 flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] leading-4 text-destructive sm:mx-6",
163
+ children: [/* @__PURE__ */ jsx(CircleAlert, { className: "mt-0.5 size-3.5 shrink-0" }), /* @__PURE__ */ jsx("span", { children: transcript.error.message })]
164
+ }) : null, /* @__PURE__ */ jsx("div", {
165
+ className: cn("min-h-0 rounded-md border border-border/60 bg-background", fullWidth ? "flex min-h-0 flex-1 flex-col border-x-0 rounded-none border-b-0" : "h-96 max-h-[calc(100svh-18rem)]"),
166
+ children: /* @__PURE__ */ jsx(MessageScroller, {
167
+ busy: childStatus === "streaming",
168
+ className: fullWidth ? "min-h-0 flex-1" : void 0,
169
+ followOutput: childStatus === "streaming",
170
+ label: `Transcript for ${child.label}`,
171
+ smooth: childStatus === "streaming",
172
+ viewportClassName: fullWidth ? "px-0" : void 0,
173
+ contentClassName: cn("flex flex-col gap-4", fullWidth ? "mx-auto w-full max-w-3xl px-4 py-6 sm:px-6" : "px-2.5 py-3"),
174
+ children: turns.map((turn, index) => {
175
+ const isLast = index === turns.length - 1;
176
+ return /* @__PURE__ */ jsx(SubagentTurnView, {
177
+ turn,
178
+ isLast,
179
+ isStreaming: isLast && childStatus === "streaming",
180
+ artifacts: isLast ? artifacts : [],
181
+ presentation: isLast ? transcript?.presentation : void 0
182
+ }, turn.user?.id ?? `subagent-turn-${index}`);
183
+ })
184
+ })
185
+ })]
186
+ })]
187
+ });
188
+ }
189
+
190
+ export {
191
+ SubagentTranscriptView
192
+ };
@@ -19,7 +19,7 @@ import {
19
19
  useFloatingPortalNode,
20
20
  useTimeout,
21
21
  visuallyHidden
22
- } from "./chunk-RPROZ2JC.js";
22
+ } from "./chunk-5RQ6QAZX.js";
23
23
  import {
24
24
  X,
25
25
  addEventListener,
@@ -34,7 +34,7 @@ import {
34
34
  useRefWithInit,
35
35
  useRenderElement,
36
36
  useStableCallback
37
- } from "./chunk-X2TUFLTP.js";
37
+ } from "./chunk-BLVCDQ7E.js";
38
38
  import {
39
39
  createLucideIcon
40
40
  } from "./chunk-E26EAQIM.js";
@@ -42,10 +42,54 @@ import {
42
42
  cn
43
43
  } from "./chunk-DJMHPJBP.js";
44
44
 
45
- // web/app/dist/server/assets/toast-Df4ZMLHv.js
45
+ // web/app/dist/server/assets/toast-C6TTiY1y.js
46
46
  import * as React$1 from "react";
47
47
  import { jsx, jsxs } from "react/jsx-runtime";
48
48
  import * as ReactDOM from "react-dom";
49
+ var Info = createLucideIcon("info", [
50
+ ["circle", {
51
+ cx: "12",
52
+ cy: "12",
53
+ r: "10",
54
+ key: "1mglay"
55
+ }],
56
+ ["path", {
57
+ d: "M12 16v-4",
58
+ key: "1dtifu"
59
+ }],
60
+ ["path", {
61
+ d: "M12 8h.01",
62
+ key: "e9boi3"
63
+ }]
64
+ ]);
65
+ var OctagonX = createLucideIcon("octagon-x", [
66
+ ["path", {
67
+ d: "m15 9-6 6",
68
+ key: "1uzhvr"
69
+ }],
70
+ ["path", {
71
+ d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
72
+ key: "2d38gg"
73
+ }],
74
+ ["path", {
75
+ d: "m9 9 6 6",
76
+ key: "z0biqf"
77
+ }]
78
+ ]);
79
+ var TriangleAlert = createLucideIcon("triangle-alert", [
80
+ ["path", {
81
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
82
+ key: "wmoenq"
83
+ }],
84
+ ["path", {
85
+ d: "M12 9v4",
86
+ key: "juzpu7"
87
+ }],
88
+ ["path", {
89
+ d: "M12 17h.01",
90
+ key: "p32p05"
91
+ }]
92
+ ]);
49
93
  var ToastContext = /* @__PURE__ */ React$1.createContext(void 0);
50
94
  function useToastProviderContext() {
51
95
  const context = React$1.useContext(ToastContext);
@@ -1166,50 +1210,6 @@ function createToastManager$1() {
1166
1210
  }
1167
1211
  };
1168
1212
  }
1169
- var Info = createLucideIcon("info", [
1170
- ["circle", {
1171
- cx: "12",
1172
- cy: "12",
1173
- r: "10",
1174
- key: "1mglay"
1175
- }],
1176
- ["path", {
1177
- d: "M12 16v-4",
1178
- key: "1dtifu"
1179
- }],
1180
- ["path", {
1181
- d: "M12 8h.01",
1182
- key: "e9boi3"
1183
- }]
1184
- ]);
1185
- var OctagonX = createLucideIcon("octagon-x", [
1186
- ["path", {
1187
- d: "m15 9-6 6",
1188
- key: "1uzhvr"
1189
- }],
1190
- ["path", {
1191
- d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",
1192
- key: "2d38gg"
1193
- }],
1194
- ["path", {
1195
- d: "m9 9 6 6",
1196
- key: "z0biqf"
1197
- }]
1198
- ]);
1199
- var TriangleAlert = createLucideIcon("triangle-alert", [
1200
- ["path", {
1201
- d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
1202
- key: "wmoenq"
1203
- }],
1204
- ["path", {
1205
- d: "M12 9v4",
1206
- key: "juzpu7"
1207
- }],
1208
- ["path", {
1209
- d: "M12 17h.01",
1210
- key: "p32p05"
1211
- }]
1212
- ]);
1213
1213
  var toast = createToastManager$1();
1214
1214
  function ToastProvider2({ ...props }) {
1215
1215
  return /* @__PURE__ */ jsx(ToastProvider$1, { ...props });
@@ -1323,9 +1323,9 @@ function Toaster({ children, toastManager = toast, ...props }) {
1323
1323
  }
1324
1324
 
1325
1325
  export {
1326
- FloatingPortalLite,
1327
1326
  Info,
1328
1327
  TriangleAlert,
1328
+ FloatingPortalLite,
1329
1329
  toast,
1330
1330
  Toaster
1331
1331
  };