@aui.io/apollo 0.1.7 → 0.1.10

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 (155) hide show
  1. package/node_modules/@aui.io/apollo-cli/bin/apollo.js +8 -5
  2. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js +3 -10
  3. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
  4. package/node_modules/@aui.io/apollo-cli/package.json +3 -3
  5. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +13 -0
  6. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +17 -0
  7. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js.map +1 -1
  8. package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js +7 -1
  9. package/node_modules/@aui.io/apollo-core/dist/src/services/hierarchy.js.map +1 -1
  10. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.d.ts +17 -0
  11. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js +27 -0
  12. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js.map +1 -1
  13. package/node_modules/@aui.io/apollo-core/package.json +1 -1
  14. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.d.ts +13 -0
  15. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js +47 -0
  16. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js.map +1 -0
  17. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.d.ts +28 -0
  18. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js +219 -0
  19. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js.map +1 -0
  20. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.d.ts +8 -0
  21. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js +43 -0
  22. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js.map +1 -0
  23. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.d.ts +5 -0
  24. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js +26 -0
  25. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js.map +1 -0
  26. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.d.ts +67 -0
  27. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js +138 -0
  28. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js.map +1 -0
  29. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.d.ts +27 -0
  30. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js +92 -0
  31. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js.map +1 -0
  32. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.d.ts +46 -0
  33. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js +87 -0
  34. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js.map +1 -0
  35. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.d.ts +15 -0
  36. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js +38 -0
  37. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js.map +1 -0
  38. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.d.ts +11 -0
  39. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js +34 -0
  40. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js.map +1 -0
  41. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.d.ts +9 -0
  42. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js +31 -0
  43. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js.map +1 -0
  44. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.d.ts +23 -0
  45. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js +293 -0
  46. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js.map +1 -0
  47. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.d.ts +4 -0
  48. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js +13 -0
  49. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js.map +1 -0
  50. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.d.ts +3 -0
  51. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js +36 -0
  52. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js.map +1 -0
  53. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.d.ts +85 -0
  54. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js +11 -0
  55. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js.map +1 -0
  56. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.d.ts +78 -0
  57. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js +279 -0
  58. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js.map +1 -0
  59. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.d.ts +64 -0
  60. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js +319 -0
  61. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js.map +1 -0
  62. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.d.ts +25 -0
  63. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js +69 -0
  64. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js.map +1 -0
  65. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.d.ts +23 -0
  66. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js +60 -0
  67. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js.map +1 -0
  68. package/node_modules/@aui.io/apollo-tui/dist/src/index.d.ts +19 -2
  69. package/node_modules/@aui.io/apollo-tui/dist/src/index.js +24 -2
  70. package/node_modules/@aui.io/apollo-tui/dist/src/index.js.map +1 -1
  71. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.d.ts +1 -0
  72. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js +51 -0
  73. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js.map +1 -0
  74. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.d.ts +56 -0
  75. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +1019 -0
  76. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -0
  77. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.d.ts +7 -0
  78. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js +33 -0
  79. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js.map +1 -0
  80. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.d.ts +10 -4
  81. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +444 -23
  82. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
  83. package/node_modules/@aui.io/apollo-tui/dist/src/lib/confirm.d.ts +10 -0
  84. package/node_modules/@aui.io/apollo-tui/dist/src/lib/confirm.js +12 -0
  85. package/node_modules/@aui.io/apollo-tui/dist/src/lib/confirm.js.map +1 -0
  86. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.d.ts +16 -0
  87. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js +39 -0
  88. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js.map +1 -0
  89. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.d.ts +17 -0
  90. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js +76 -0
  91. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js.map +1 -0
  92. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.d.ts +64 -0
  93. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js +105 -0
  94. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js.map +1 -0
  95. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.d.ts +18 -0
  96. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js +24 -0
  97. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js.map +1 -0
  98. package/node_modules/@aui.io/apollo-tui/dist/src/lib/picker.d.ts +28 -0
  99. package/node_modules/@aui.io/apollo-tui/dist/src/lib/picker.js +72 -0
  100. package/node_modules/@aui.io/apollo-tui/dist/src/lib/picker.js.map +1 -0
  101. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.d.ts +26 -0
  102. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js +32 -0
  103. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js.map +1 -0
  104. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.d.ts +29 -6
  105. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js +112 -13
  106. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js.map +1 -1
  107. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.d.ts +5 -10
  108. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js +2 -1
  109. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js.map +1 -1
  110. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +2106 -273
  111. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
  112. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.d.ts +15 -0
  113. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js +22 -0
  114. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js.map +1 -0
  115. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.d.ts +8 -0
  116. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js +23 -0
  117. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js.map +1 -0
  118. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.d.ts +4 -0
  119. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js +7 -0
  120. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js.map +1 -0
  121. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.d.ts +20 -0
  122. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js +29 -0
  123. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js.map +1 -0
  124. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.d.ts +15 -0
  125. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js +27 -0
  126. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js.map +1 -0
  127. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.d.ts +30 -0
  128. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js +60 -0
  129. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js.map +1 -0
  130. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.d.ts +17 -0
  131. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js +61 -0
  132. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js.map +1 -0
  133. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.d.ts +107 -0
  134. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js +235 -0
  135. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js.map +1 -0
  136. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.d.ts +8 -0
  137. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js +9 -0
  138. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js.map +1 -0
  139. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.d.ts +4 -0
  140. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js +15 -0
  141. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js.map +1 -0
  142. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.d.ts +5 -0
  143. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js +16 -0
  144. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js.map +1 -0
  145. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.d.ts +10 -0
  146. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js +29 -0
  147. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js.map +1 -0
  148. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.d.ts +4 -0
  149. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js +22 -0
  150. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js.map +1 -0
  151. package/node_modules/@aui.io/apollo-tui/package.json +2 -2
  152. package/package.json +4 -4
  153. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.d.ts +0 -10
  154. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js +0 -19
  155. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js.map +0 -1
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { homeishPath } from "../lib/scope.js";
3
+ import { changeEntries, changesSummary, relativeTime } from "./data.js";
4
+ import { OutputPane } from "../ui/OutputPane.js";
5
+ import { SessionPane } from "./SessionPane.js";
6
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
7
+ const PREVIEW_LIMIT = 6;
8
+ const STATUS_COLOR = {
9
+ A: TEAL,
10
+ M: AMBER,
11
+ D: RED,
12
+ };
13
+ /**
14
+ * Author mode home — program cockpit beside the IDE (TUI_DESIGN §8).
15
+ * Local card (baseline, changes, validation health) vs remote target card,
16
+ * plus a changes preview. d/v open the full diff / validation subviews.
17
+ */
18
+ export function AuthorHome({ scope, snapshot, validation, frame, working, version, paneTitle, paneLines, session, sessionRows, sessionCursor, sessionScrollRef, backendLabel, backendDetection, }) {
19
+ const hasAgent = scope.agent !== "—";
20
+ // Empty states host the brand glyph (setup screens are not day-to-day).
21
+ if (!scope.loggedIn || !hasAgent) {
22
+ return (_jsxs("box", { style: {
23
+ flexDirection: "column",
24
+ alignItems: "center",
25
+ flexGrow: 1,
26
+ minHeight: 0,
27
+ width: "100%",
28
+ }, children: [_jsxs("box", { style: {
29
+ border: true,
30
+ borderStyle: "rounded",
31
+ borderColor: TEAL_DIM,
32
+ flexDirection: "column",
33
+ alignItems: "center",
34
+ flexShrink: 0,
35
+ width: 44,
36
+ paddingTop: 1,
37
+ paddingBottom: 1,
38
+ }, children: [frame.map((line, i) => (_jsx("text", { fg: working ? AMBER : TEAL, children: line }, i))), _jsxs("text", { fg: FG, children: [_jsx("b", { children: "apollo" }), " ", _jsxs("span", { fg: DIM, children: ["v", version] })] }), _jsx("text", { fg: DIM, children: "Author \u00B7 program workbench" })] }), _jsx("text", { children: " " }), !scope.loggedIn ? (_jsx("text", { fg: AMBER, children: "Log in to begin \u2014 ^K then \u201Clogin\u201D" })) : (_jsx("text", { fg: DIM, children: "No active agent \u2014 ^G to pick one, or ^K \u201Cimport\u201D / \u201Ccreate\u201D" })), _jsx(OutputPane, { paneTitle: paneTitle, paneLines: paneLines })] }));
39
+ }
40
+ const entries = changeEntries(snapshot?.diff);
41
+ const preview = entries.slice(0, PREVIEW_LIMIT);
42
+ return (_jsxs("box", { style: { flexDirection: "column", flexGrow: 1, minHeight: 0, width: "100%" }, children: [_jsxs("box", { style: { flexDirection: "row", flexShrink: 0, width: "100%" }, children: [_jsxs("box", { title: " local program ", style: {
43
+ border: true,
44
+ borderStyle: "rounded",
45
+ borderColor: TEAL_DIM,
46
+ flexDirection: "column",
47
+ flexGrow: 1,
48
+ flexBasis: 0,
49
+ paddingLeft: 1,
50
+ paddingRight: 1,
51
+ }, children: [_jsx("text", { fg: DIM, children: scope.agentPath ? homeishPath(scope.agentPath) : "bundle/src" }), _jsxs("text", { fg: DIM, children: ["baseline", " ", _jsx("span", { fg: snapshot?.baselineTag ? FG : AMBER, children: snapshot?.baselineTag ?? "none" }), snapshot?.baselineAt ? (_jsxs("span", { fg: FAINT, children: [" ", "\u00B7 synced ", relativeTime(Date.parse(snapshot.baselineAt))] })) : null] }), _jsx(ChangesLine, { snapshot: snapshot }), _jsx(ValidationLine, { validation: validation })] }), _jsxs("box", { title: " remote target ", style: {
52
+ border: true,
53
+ borderStyle: "rounded",
54
+ borderColor: TEAL_DIM,
55
+ flexDirection: "column",
56
+ flexGrow: 1,
57
+ flexBasis: 0,
58
+ paddingLeft: 1,
59
+ paddingRight: 1,
60
+ }, children: [_jsxs("text", { fg: DIM, children: ["project ", _jsx("span", { fg: FG, children: scope.project })] }), scope.org !== "—" && scope.org !== scope.orgId?.slice(0, 12) ? (_jsxs("text", { fg: DIM, children: ["org ", scope.org] })) : null, _jsxs("text", { fg: FAINT, children: ["push \u2192 ", scope.env, scope.version !== "—"
61
+ ? ` · draft revision from ${scope.version}`
62
+ : " · creates the first draft"] })] })] }), preview.length > 0 ? (_jsxs("box", { style: { flexDirection: "column", flexShrink: 0, paddingLeft: 1 }, children: [preview.map((entry) => (_jsxs("text", { fg: DIM, children: [" ", _jsx("span", { fg: STATUS_COLOR[entry.status], children: entry.status }), " ", entry.path] }, entry.path))), entries.length > preview.length ? (_jsxs("text", { fg: FAINT, children: [" ", "\u2026 ", entries.length - preview.length, " more \u2014 d for the full diff"] })) : null] })) : null, _jsxs("text", { fg: FG, style: { flexShrink: 0 }, children: [" ", _jsx("span", { fg: TEAL, children: "[v]" }), " validate ", _jsx("span", { fg: TEAL, children: "[d]" }), " diff", " ", _jsx("span", { fg: TEAL, children: "[p]" }), " push ", _jsx("span", { fg: TEAL, children: "[l]" }), " pull", " ", _jsx("span", { fg: TEAL, children: "[r]" }), " versions ", _jsx("span", { fg: TEAL, children: "[o]" }), " IDE"] }), _jsx(CopilotLine, { backendLabel: backendLabel, detection: backendDetection }), paneLines.length === 0 && entries.length === 0 && !session ? (_jsxs("text", { fg: FAINT, style: { flexShrink: 0 }, children: [" ", "edit in your IDE \u2014 changes appear here as you save"] })) : null, session ? (_jsx(SessionPane, { session: session, rows: sessionRows, cursor: sessionCursor, scrollRef: sessionScrollRef })) : (_jsx(OutputPane, { paneTitle: paneTitle, paneLines: paneLines }))] }));
63
+ }
64
+ /** One honest line about the copilot backend: detected, missing, or probing. */
65
+ function CopilotLine({ backendLabel, detection, }) {
66
+ if (!detection) {
67
+ return (_jsxs("text", { fg: FAINT, style: { flexShrink: 0 }, children: [" ", "copilot: checking for ", backendLabel, "\u2026"] }));
68
+ }
69
+ if (!detection.available) {
70
+ return (_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [" ", "copilot: ", _jsx("span", { fg: AMBER, children: detection.reason ?? "not available" })] }));
71
+ }
72
+ return (_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [" ", "copilot: ", _jsxs("span", { fg: TEAL, children: [backendLabel, " \u2713"] }), detection.version ? _jsxs("span", { fg: FAINT, children: [" ", detection.version] }) : null, _jsx("span", { fg: FAINT, children: " \u2014 type below to author" })] }));
73
+ }
74
+ function ChangesLine({ snapshot }) {
75
+ if (!snapshot) {
76
+ return _jsx("text", { fg: FAINT, children: "changes \u2026" });
77
+ }
78
+ if (snapshot.unavailable) {
79
+ return _jsxs("text", { fg: AMBER, children: ["changes unavailable \u2014 ", snapshot.unavailable] });
80
+ }
81
+ const summary = changesSummary(snapshot.diff);
82
+ return (_jsxs("text", { fg: DIM, children: ["changes", " ", summary === "clean" ? (_jsx("span", { fg: TEAL, children: "clean \u2713" })) : (_jsx("span", { fg: AMBER, children: summary }))] }));
83
+ }
84
+ function ValidationLine({ validation, }) {
85
+ if (!validation) {
86
+ return _jsx("text", { fg: FAINT, children: "validation not run \u2014 v to check" });
87
+ }
88
+ const errors = validation.result.findings.filter((f) => f.level !== "warning").length;
89
+ const ok = validation.result.valid && errors === 0;
90
+ return (_jsxs("text", { fg: DIM, children: ["validation", " ", _jsx("span", { fg: ok ? TEAL : RED, children: ok ? "✓" : `✕ ${errors} error(s)` }), _jsxs("span", { fg: FAINT, children: [" \u00B7 ", relativeTime(validation.at)] }), validation.stale ? _jsx("span", { fg: AMBER, children: " \u00B7 stale" }) : null] }));
91
+ }
92
+ //# sourceMappingURL=AuthorHome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorHome.js","sourceRoot":"","sources":["../../../src/author/AuthorHome.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,YAAY,GAAoC;IACpD,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,GAAG;CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GAgBjB;I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E,EAAE,KAAK,YAAG,OAAO,GAAQ,CAClC,IACI,CACR,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,UAAU,GAGX;IACC,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,eAAM,EAAE,EAAE,KAAK,qDAAwC,CAAC;IACjE,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAC9C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAC7B,CAAC,MAAM,CAAC;IACT,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,KAAK,CAAC,CAAC;IACnD,OAAO,CACL,gBAAM,EAAE,EAAE,GAAG,2BACA,GAAG,EACd,eAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,WAAW,GAAQ,EACrE,gBAAM,EAAE,EAAE,KAAK,yBAAM,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,IAAQ,EACvD,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,KAAK,8BAAiB,CAAC,CAAC,CAAC,IAAI,IACtD,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { type RefObject } from "react";
2
+ import type { ScrollBoxRenderable } from "@opentui/core";
3
+ import { type DiffLine, type DiffStyle } from "./data.js";
4
+ import type { TreeRow } from "./tree.js";
5
+ /** What the preview pane should show for the selected tree row. */
6
+ export type PreviewModel = {
7
+ kind: "none";
8
+ hint?: string;
9
+ } | {
10
+ kind: "loading";
11
+ path: string;
12
+ } | {
13
+ kind: "error";
14
+ path: string;
15
+ message: string;
16
+ } | {
17
+ kind: "diff";
18
+ path: string;
19
+ lines: DiffLine[];
20
+ note?: string;
21
+ } | {
22
+ kind: "file";
23
+ path: string;
24
+ lines: string[];
25
+ note?: string;
26
+ };
27
+ /**
28
+ * Diff/browse subview (TUI_DESIGN §8.3) — a persistent file-tree sidebar with
29
+ * a live preview pane. With an agent, changed files diff against the bound
30
+ * remote tag (split or unified, `s` toggles — the GitHub/Bitbucket options);
31
+ * at workspace level it browses files read-only. Enter expands the preview
32
+ * full-width; Esc collapses. Panes scroll via the shared ref and mouse.
33
+ */
34
+ export declare function DiffView({ rows, cursor, treeTitle, preview, style, remoteTag, expanded, sidebarWidth, pageSize, scrollRef, }: {
35
+ rows: TreeRow[];
36
+ cursor: number;
37
+ treeTitle: string;
38
+ preview: PreviewModel;
39
+ style: DiffStyle;
40
+ remoteTag: string;
41
+ /** Full-width preview (Enter on a file); the tree hides until Esc. */
42
+ expanded: boolean;
43
+ sidebarWidth: number;
44
+ pageSize: number;
45
+ scrollRef: RefObject<ScrollBoxRenderable | null>;
46
+ }): import("react").ReactNode;
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
2
+ import { memo, useEffect, useMemo } from "react";
3
+ import { splitRows } from "./data.js";
4
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
5
+ const STATUS_COLOR = {
6
+ A: TEAL,
7
+ M: AMBER,
8
+ D: RED,
9
+ };
10
+ /** Rendering caps — panes scroll, but huge nodes still cost render time. */
11
+ const MAX_UNIFIED_LINES = 1500;
12
+ const MAX_SPLIT_ROWS = 800;
13
+ /**
14
+ * Diff/browse subview (TUI_DESIGN §8.3) — a persistent file-tree sidebar with
15
+ * a live preview pane. With an agent, changed files diff against the bound
16
+ * remote tag (split or unified, `s` toggles — the GitHub/Bitbucket options);
17
+ * at workspace level it browses files read-only. Enter expands the preview
18
+ * full-width; Esc collapses. Panes scroll via the shared ref and mouse.
19
+ */
20
+ export function DiffView({ rows, cursor, treeTitle, preview, style, remoteTag, expanded, sidebarWidth, pageSize, scrollRef, }) {
21
+ if (expanded) {
22
+ return (_jsx(PreviewPane, { preview: preview, style: style, remoteTag: remoteTag, scrollRef: scrollRef }));
23
+ }
24
+ return (_jsxs("box", { style: { flexDirection: "row", flexGrow: 1, minHeight: 0, width: "100%" }, children: [_jsx("box", { style: {
25
+ width: sidebarWidth,
26
+ flexShrink: 0,
27
+ minHeight: 0,
28
+ flexDirection: "column",
29
+ }, children: _jsx(TreePane, { rows: rows, cursor: cursor, title: treeTitle, pageSize: pageSize }) }), _jsx(PreviewPane, { preview: preview, style: style, remoteTag: remoteTag, scrollRef: scrollRef })] }));
30
+ }
31
+ const TreePane = memo(function TreePane({ rows, cursor, title, pageSize, }) {
32
+ const start = rows.length <= pageSize
33
+ ? 0
34
+ : Math.max(0, Math.min(cursor - Math.floor(pageSize / 3), rows.length - pageSize));
35
+ const window = rows.slice(start, start + pageSize);
36
+ return (_jsx("box", { title: ` ${title} `, style: {
37
+ border: true,
38
+ borderStyle: "rounded",
39
+ borderColor: TEAL_DIM,
40
+ flexDirection: "column",
41
+ flexGrow: 1,
42
+ minHeight: 0,
43
+ overflow: "hidden",
44
+ paddingLeft: 1,
45
+ paddingRight: 1,
46
+ }, children: rows.length === 0 ? (_jsx("text", { fg: DIM, children: "(no files)" })) : (_jsxs(_Fragment, { children: [start > 0 ? _jsxs("text", { fg: FAINT, children: ["\u2026 ", start, " above"] }) : null, window.map((row, i) => {
47
+ const index = start + i;
48
+ const active = index === cursor;
49
+ const indent = " ".repeat(row.depth);
50
+ return (_jsxs("text", { fg: active ? FG : DIM, children: [active ? "❯ " : " ", indent, row.kind === "dir" ? (_jsxs("span", { fg: active ? FG : DIM, children: [row.expanded ? "▾ " : "▸ ", row.label, "/"] })) : (_jsxs(_Fragment, { children: [_jsx("span", { fg: row.status ? STATUS_COLOR[row.status] : FAINT, children: row.status ?? "·" }), " ", row.label] }))] }, `${row.kind}:${row.path}`));
51
+ }), start + window.length < rows.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", rows.length - start - window.length, " below"] })) : null] })) }));
52
+ });
53
+ const PreviewPane = memo(function PreviewPane({ preview, style, remoteTag, scrollRef, }) {
54
+ const pathKey = "path" in preview ? preview.path : "";
55
+ // Same scrollbox across file switches (no remount flash) — just rewind.
56
+ useEffect(() => {
57
+ scrollRef.current?.scrollTo({ x: 0, y: 0 });
58
+ }, [pathKey, scrollRef]);
59
+ const title = "path" in preview && preview.path ? ` ${preview.path} ` : " preview ";
60
+ return (_jsxs("box", { title: title, style: {
61
+ border: true,
62
+ borderStyle: "rounded",
63
+ borderColor: TEAL_DIM,
64
+ flexDirection: "column",
65
+ flexGrow: 1,
66
+ flexBasis: 0,
67
+ minHeight: 0,
68
+ paddingLeft: 1,
69
+ paddingRight: 1,
70
+ }, children: [_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [preview.kind === "diff"
71
+ ? `remote ${remoteTag} → local · ${style}`
72
+ : "read-only", " · ", _jsx("span", { fg: FAINT, children: "\u2191\u2193/PgUp/PgDn or mouse to scroll" })] }), "note" in preview && preview.note ? (_jsx("text", { fg: AMBER, children: preview.note })) : null, preview.kind === "none" ? (_jsx("text", { fg: FAINT, children: preview.hint ?? "(select a file in the tree)" })) : preview.kind === "loading" ? (_jsx("text", { fg: FAINT, children: "loading\u2026" })) : preview.kind === "error" ? (_jsx("text", { fg: AMBER, children: preview.message })) : preview.kind === "diff" && style === "split" ? (_jsx(SplitBody, { lines: preview.lines, scrollRef: scrollRef })) : preview.kind === "diff" ? (_jsx(UnifiedBody, { lines: preview.lines, scrollRef: scrollRef })) : (_jsx(FileBody, { lines: preview.lines, scrollRef: scrollRef }))] }));
73
+ });
74
+ function UnifiedBody({ lines, scrollRef, }) {
75
+ const rendered = lines.slice(0, MAX_UNIFIED_LINES);
76
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((line, i) => (_jsxs("text", { style: { wrapMode: "word" }, fg: line.tag === "+" ? TEAL : line.tag === "-" ? RED : DIM, children: [line.tag, " ", line.text] }, i))), lines.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", lines.length - rendered.length, " more line(s)"] })) : null] }));
77
+ }
78
+ function SplitBody({ lines, scrollRef, }) {
79
+ const rows = useMemo(() => splitRows(lines), [lines]);
80
+ const rendered = rows.slice(0, MAX_SPLIT_ROWS);
81
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((row, i) => (_jsxs("box", { style: { flexDirection: "row" }, children: [_jsx("text", { style: { flexGrow: 1, flexBasis: 0 }, fg: row.left?.tag === "-" ? RED : DIM, children: row.left ? `${row.left.tag} ${row.left.text}` : "" }), _jsx("text", { fg: FAINT, children: "\u2502" }), _jsx("text", { style: { flexGrow: 1, flexBasis: 0 }, fg: row.right?.tag === "+" ? TEAL : DIM, children: row.right ? `${row.right.tag} ${row.right.text}` : "" })] }, i))), rows.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", rows.length - rendered.length, " more row(s)"] })) : null] }));
82
+ }
83
+ function FileBody({ lines, scrollRef, }) {
84
+ const rendered = lines.slice(0, MAX_UNIFIED_LINES);
85
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((line, i) => (_jsx("text", { style: { wrapMode: "word" }, fg: DIM, children: line || " " }, i))), lines.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", lines.length - rendered.length, " more line(s)"] })) : null] }));
86
+ }
87
+ //# sourceMappingURL=DiffView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffView.js","sourceRoot":"","sources":["../../../src/author/DiffView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;A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AM,GAAG,QAAQ,CAAC,MAAM,qBAAqB,CACxE,CAAC,CAAC,CAAC,IAAI,IACE,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copilot session pane — the multi-turn transcript rendered as a stream of
3
+ * work units inside a scrollbox. Rows arrive pre-wrapped (`sessionRows`),
4
+ * so heights and scroll offsets are exact; the cursor row carries a ▸
5
+ * gutter, and expanded action units show their input/result body indented.
6
+ */
7
+ import type { RefObject } from "react";
8
+ import type { ScrollBoxRenderable } from "@opentui/core";
9
+ import type { SessionRow, SessionState } from "./session.js";
10
+ export declare function SessionPane({ session, rows, cursor, scrollRef, }: {
11
+ session: SessionState;
12
+ rows: SessionRow[];
13
+ cursor: number;
14
+ scrollRef: RefObject<ScrollBoxRenderable | null>;
15
+ }): import("react").ReactNode;
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "@opentui/react/jsx-runtime";
2
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
3
+ const TONE_COLOR = {
4
+ prompt: FG,
5
+ prose: DIM,
6
+ thinking: FAINT,
7
+ action: DIM,
8
+ "action-running": AMBER,
9
+ "action-error": RED,
10
+ body: FAINT,
11
+ "outcome-ok": TEAL,
12
+ "outcome-error": RED,
13
+ "outcome-cancelled": DIM,
14
+ hint: TEAL,
15
+ queued: FAINT,
16
+ spacer: FAINT,
17
+ };
18
+ export function SessionPane({ session, rows, cursor, scrollRef, }) {
19
+ return (_jsx("box", { title: ` ${session.backend} session · turn ${session.turn}${session.running ? " · running" : ""} `, style: {
20
+ border: true,
21
+ borderStyle: "rounded",
22
+ borderColor: session.running ? AMBER : TEAL_DIM,
23
+ flexDirection: "column",
24
+ // The transcript is the flexible region: flexBasis 0 keeps its
25
+ // content height from inflating the layout (the scrollbox clips).
26
+ flexGrow: 1,
27
+ flexShrink: 1,
28
+ flexBasis: 0,
29
+ minHeight: 4,
30
+ width: "100%",
31
+ paddingLeft: 1,
32
+ paddingRight: 1,
33
+ }, children: _jsx("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexDirection: "column" }, children: rows.map((row, i) => {
34
+ const selected = row.isLabel && row.unit === cursor;
35
+ return (_jsx("text", { fg: selected ? FG : TONE_COLOR[row.tone], children: (selected ? "▸ " : " ") + (row.text || " ") }, i));
36
+ }) }) }));
37
+ }
38
+ //# sourceMappingURL=SessionPane.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionPane.js","sourceRoot":"","sources":["../../../src/author/SessionPane.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,UAAU,GAA4B;IAC1C,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,GAAG;IACV,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,GAAG;IACX,gBAAgB,EAAE,KAAK;IACvB,cAAc,EAAE,GAAG;IACnB,IAAI,EAAE,KAAK;IACX,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,GAAG;IACpB,mBAAmB,EAAE,GAAG;IACxB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,EAC1B,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,GAMV;IACC,OAAO,CACL,cACE,KAAK,EAAE,IAAI,OAAO,CAAC,OAAO,mBAAmB,OAAO,CAAC,IAAI,GACvD,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EACnC,GAAG,EACH,KAAK,EAAE;YACL,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ;YAC/C,aAAa,EAAE,QAAQ;YACvB,+DAA+D;YAC/D,kEAAkE;YAClE,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,YAED,oBACE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,YAE7D,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;gBACnB,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;gBACpD,OAAO,CACL,eAAc,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,YACnD,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IADpC,CAAC,CAEL,CACR,CAAC;YACJ,CAAC,CAAC,GACQ,GACR,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { RefObject } from "react";
2
+ import type { ScrollBoxRenderable } from "@opentui/core";
3
+ import type { ValidationRecord } from "./data.js";
4
+ /**
5
+ * Structured validation results (TUI_DESIGN §8.4) — severity, location,
6
+ * message. Staleness is flagged when files changed after the run.
7
+ */
8
+ export declare function ValidationViewPane({ record, scrollRef, }: {
9
+ record?: ValidationRecord | undefined;
10
+ scrollRef?: RefObject<ScrollBoxRenderable | null> | undefined;
11
+ }): import("react").ReactNode;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
2
+ import { relativeTime } from "./data.js";
3
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
4
+ /**
5
+ * Structured validation results (TUI_DESIGN §8.4) — severity, location,
6
+ * message. Staleness is flagged when files changed after the run.
7
+ */
8
+ export function ValidationViewPane({ record, scrollRef, }) {
9
+ return (_jsx("box", { title: " validation ", style: {
10
+ border: true,
11
+ borderStyle: "rounded",
12
+ borderColor: TEAL_DIM,
13
+ flexDirection: "column",
14
+ flexGrow: 1,
15
+ minHeight: 0,
16
+ width: "100%",
17
+ paddingLeft: 1,
18
+ paddingRight: 1,
19
+ }, children: !record ? (_jsx("text", { fg: DIM, children: "Not run yet \u2014 press v to validate the local program." })) : (_jsxs(_Fragment, { children: [_jsx(ValidationHeader, { record: record }), _jsx("text", { children: " " }), record.result.findings.length === 0 ? (_jsx("text", { fg: DIM, children: "No findings." })) : (_jsx("scrollbox", { ref: scrollRef, style: {
20
+ flexGrow: 1,
21
+ flexShrink: 1,
22
+ flexBasis: 0,
23
+ minHeight: 2,
24
+ flexDirection: "column",
25
+ }, children: record.result.findings.map((finding, i) => (_jsxs("text", { children: [_jsx("span", { fg: finding.level === "warning" ? AMBER : RED, children: (finding.level ?? "error").toUpperCase().padEnd(8) }), _jsx("span", { fg: FAINT, children: finding.file || finding.code || finding.path }), " ", _jsx("span", { fg: FG, children: finding.message })] }, i))) })), _jsx("text", { fg: FAINT, style: { flexShrink: 0 }, children: "v re-run \u00B7 Esc back" })] })) }));
26
+ }
27
+ function ValidationHeader({ record }) {
28
+ const errors = record.result.findings.filter((f) => f.level !== "warning").length;
29
+ const warnings = record.result.findings.filter((f) => f.level === "warning").length;
30
+ const ok = record.result.valid && errors === 0;
31
+ const program = record.result.program;
32
+ return (_jsxs("text", { children: [_jsx("span", { fg: ok ? TEAL : RED, children: ok ? "✓ program valid" : `✕ ${errors} error(s)` }), warnings > 0 ? _jsxs("span", { fg: AMBER, children: [" \u00B7 ", warnings, " warning(s)"] }) : null, program?.id ? (_jsxs("span", { fg: DIM, children: [" ", "\u00B7 ", program.id, program.version ? `@${program.version}` : ""] })) : null, _jsxs("span", { fg: FAINT, children: [" \u00B7 ", relativeTime(record.at)] }), record.stale ? _jsx("span", { fg: AMBER, children: " \u00B7 stale \u2014 files changed since" }) : null] }));
33
+ }
34
+ //# sourceMappingURL=ValidationView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ValidationView.js","sourceRoot":"","sources":["../../../src/author/ValidationView.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhF;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,GAIV;IACC,OAAO,CACL,cACE,KAAK,EAAC,cAAc,EACpB,KAAK,EAAE;YACL,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,QAAQ;YACrB,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;YACZ,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,YAEA,CAAC,MAAM,CAAC,CAAC,CAAC,CACT,eAAM,EAAE,EAAE,GAAG,0EAA6D,CAC3E,CAAC,CAAC,CAAC,CACF,8BACE,KAAC,gBAAgB,IAAC,MAAM,EAAE,MAAM,GAAI,EACpC,+BAAc,EACb,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,eAAM,EAAE,EAAE,GAAG,6BAAqB,CACnC,CAAC,CAAC,CAAC,CACF,oBACE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;wBACL,QAAQ,EAAE,CAAC;wBACX,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AAC,MAAM,CAAC,OAAO,CAAC;IACtC,OAAO,CACL,2BACE,eAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YACtB,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,MAAM,WAAW,GAC3C,EACN,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAM,EAAE,EAAE,KAAK,yBAAM,QAAQ,mBAAmB,CAAC,CAAC,CAAC,IAAI,EACtE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CACb,gBAAM,EAAE,EAAE,GAAG,aACV,GAAG,aACD,OAAO,CAAC,EAAE,EACZ,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,IACxC,CACR,CAAC,CAAC,CAAC,IAAI,EACR,gBAAM,EAAE,EAAE,KAAK,yBAAM,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,IAAQ,EACnD,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,KAAK,yDAAuC,CAAC,CAAC,CAAC,IAAI,IACxE,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { RefObject } from "react";
2
+ import type { AgentVersion } from "@aui.io/apollo-core/api/management.js";
3
+ import type { ScrollBoxRenderable } from "@opentui/core";
4
+ /** Version history subview — read-only; publish/archive live in ^K. */
5
+ export declare function VersionsViewPane({ versions, currentTag, scrollRef, }: {
6
+ versions: AgentVersion[];
7
+ currentTag: string;
8
+ scrollRef?: RefObject<ScrollBoxRenderable | null> | undefined;
9
+ }): import("react").ReactNode;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { AMBER, DIM, FAINT, FG, TEAL, TEAL_DIM } from "../theme/tokens.js";
3
+ const STATUS_COLOR = {
4
+ published: TEAL,
5
+ draft: AMBER,
6
+ archived: FAINT,
7
+ };
8
+ /** Version history subview — read-only; publish/archive live in ^K. */
9
+ export function VersionsViewPane({ versions, currentTag, scrollRef, }) {
10
+ return (_jsxs("box", { title: " versions ", style: {
11
+ border: true,
12
+ borderStyle: "rounded",
13
+ borderColor: TEAL_DIM,
14
+ flexDirection: "column",
15
+ flexGrow: 1,
16
+ minHeight: 0,
17
+ width: "100%",
18
+ paddingLeft: 1,
19
+ paddingRight: 1,
20
+ }, children: [versions.length === 0 ? (_jsx("text", { fg: DIM, children: "No versions yet \u2014 push to create the first draft." })) : (_jsx("scrollbox", { ref: scrollRef, style: {
21
+ flexGrow: 1,
22
+ flexShrink: 1,
23
+ flexBasis: 0,
24
+ minHeight: 2,
25
+ flexDirection: "column",
26
+ }, children: versions.map((version) => {
27
+ const bound = version.version_tag === currentTag;
28
+ return (_jsxs("text", { children: [_jsx("span", { fg: bound ? TEAL : FAINT, children: bound ? "● " : " " }), _jsx("span", { fg: bound ? FG : DIM, children: version.version_tag.padEnd(10) }), _jsx("span", { fg: STATUS_COLOR[version.status] ?? DIM, children: version.status.padEnd(11) }), _jsx("span", { fg: DIM, children: version.label ?? "" }), _jsx("span", { fg: FAINT, children: version.created_at ? ` ${version.created_at.slice(0, 10)}` : "" })] }, version.id));
29
+ }) })), _jsx("text", { fg: FAINT, style: { flexShrink: 0 }, children: "\u25CF bound tag \u00B7 publish/archive via ^K \u00B7 Esc back" })] }));
30
+ }
31
+ //# sourceMappingURL=VersionsView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VersionsView.js","sourceRoot":"","sources":["../../../src/author/VersionsView.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,YAAY,GAA2B;IAC3C,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,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B,EACP,eAAM,EAAE,EAAE,GAAG,YAAG,OAAO,CAAC,KAAK,IAAI,EAAE,GAAQ,EAC3C,eAAM,EAAE,EAAE,KAAK,YACZ,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAC5D,KAXE,OAAO,CAAC,EAAE,CAYd,CACR,CAAC;gBACJ,CAAC,CAAC,GACQ,CACb,EACD,eAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,+EAElC,IACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { AuthorBackend, BackendEvent } from "./types.js";
2
+ /** File-work tools only — documented policy, revisit with Level 2 prompts. */
3
+ export declare const CLAUDE_ALLOWED_TOOLS: string[];
4
+ export declare function claudeArgs(text: string, sessionId?: string): string[];
5
+ export interface StreamParseState {
6
+ sessionId?: string;
7
+ }
8
+ /** Short human label for a tool call: "Edit — bundle/src/program.yaml". */
9
+ export declare function summarizeToolUse(name: string, input: Record<string, unknown> | undefined): {
10
+ label: string;
11
+ detail?: string;
12
+ };
13
+ /**
14
+ * Map one stream-json line to normalized events. Tolerant: unknown or
15
+ * malformed lines yield nothing (vendor formats evolve).
16
+ */
17
+ export declare function parseClaudeLine(line: string, state: StreamParseState): BackendEvent[];
18
+ /**
19
+ * `claude --version` prints "2.1.220 (Claude Code)" — the UI already labels
20
+ * the backend, so the parenthetical would just repeat it.
21
+ */
22
+ export declare function cleanVersionOutput(out: string): string | undefined;
23
+ export declare const claudeCodeBackend: AuthorBackend;