@peasant-labs/fairtrade 0.0.47 → 0.0.49
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.
- package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
- package/dist/lib/{adapter-Dulh38C2.js → adapter-CVKibszh.js} +209 -186
- package/dist/lib/arc-1xTxsoRi.js +80 -0
- package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
- package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
- package/dist/lib/array-CApNbSU9.js +6 -0
- package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
- package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
- package/dist/lib/channel-DagAO2vE.js +5 -0
- package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
- package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
- package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
- package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
- package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
- package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
- package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
- package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
- package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
- package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
- package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
- package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
- package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
- package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
- package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
- package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
- package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
- package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
- package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
- package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
- package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
- package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
- package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
- package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
- package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
- package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
- package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
- package/dist/lib/commons.js +729 -729
- package/dist/lib/components.css +1 -1
- package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
- package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
- package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
- package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
- package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
- package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
- package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
- package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
- package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
- package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
- package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
- package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
- package/dist/lib/dist-AMlsjiDX.js +59 -0
- package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
- package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
- package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
- package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
- package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
- package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
- package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
- package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
- package/dist/lib/graphlib-Dndp26xU.js +1267 -0
- package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
- package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
- package/dist/lib/init-Bwwdo3M6.js +15 -0
- package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
- package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
- package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
- package/dist/lib/katex-Dw0PnoPU.js +21850 -0
- package/dist/lib/line-C9krU3Sv.js +34 -0
- package/dist/lib/linear-Cvilv3OA.js +289 -0
- package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
- package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
- package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
- package/dist/lib/ordinal-C55HfHHp.js +65 -0
- package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
- package/dist/lib/path-DNvJyUE8.js +85 -0
- package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
- package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
- package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
- package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
- package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
- package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
- package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
- package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
- package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
- package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
- package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
- package/dist/lib/rough.esm-a8mysczE.js +1352 -0
- package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
- package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
- package/dist/lib/share.js +1 -1
- package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
- package/dist/lib/src-Dcy0zUZH.js +2153 -0
- package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
- package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
- package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
- package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
- package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
- package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
- package/dist/lib/types/AppSidebar.d.ts +14 -1
- package/dist/lib/types/transcript/Collapsible.d.ts +10 -0
- package/dist/lib/types/transcript/FiltersRail.d.ts +1 -0
- package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
- package/dist/lib/types/transcript/Thinking.d.ts +1 -1
- package/dist/lib/types/transcript/ToolCall.d.ts +1 -1
- package/dist/lib/types/transcript/TranscriptViewer.d.ts +2 -2
- package/dist/lib/types/transcript/TurnCard.d.ts +3 -1
- package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
- package/dist/lib/types/transcript/WorkGroup.d.ts +9 -0
- package/dist/lib/types/transcript/action-groups.d.ts +9 -0
- package/dist/lib/types/transcript/adapter.d.ts +12 -0
- package/dist/lib/types/transcript/filters.d.ts +5 -5
- package/dist/lib/types/transcript/index.d.ts +2 -1
- package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
- package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
- package/dist/lib/types/transcript/state-capabilities.d.ts +38 -11
- package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
- package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
- package/dist/lib/types/transcript/view-model.d.ts +19 -0
- package/dist/lib/types/transcript/work-summary.d.ts +8 -0
- package/dist/lib/types/ui/transcript/adapter.d.ts +12 -0
- package/dist/lib/types/ui/transcript/view-model.d.ts +19 -0
- package/dist/lib/{ui-CrH0SVd_.js → ui-Beoq-HpN.js} +5345 -4232
- package/dist/lib/ui.js +6 -6
- package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
- package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
- package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
- package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
- package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
- package/package.json +3 -2
|
@@ -12,7 +12,7 @@ export default function AppSidebar({ app, apps, groups, currentId, homeHref, bra
|
|
|
12
12
|
* (min-width 0, so wide content stays contained). One column below 768px, the top bar above the page.
|
|
13
13
|
* @param {AppSidebarLayoutProps} props
|
|
14
14
|
*/
|
|
15
|
-
export function AppSidebarLayout({ sidebar, children, className }: AppSidebarLayoutProps): import("react").JSX.Element;
|
|
15
|
+
export function AppSidebarLayout({ sidebar, children, className, viewport, topBar, notice, mainAs: Main, mainId }: AppSidebarLayoutProps): import("react").JSX.Element;
|
|
16
16
|
/**
|
|
17
17
|
* The frame for one app page inside AppSidebarLayout: the full width of the main column with the
|
|
18
18
|
* same padding on the left and the right, so a page is never a capped column with an uneven gap
|
|
@@ -105,6 +105,11 @@ export function AppPage({ children, as: Tag, className, ...rest }: AppPageProps)
|
|
|
105
105
|
* @property {import('react').ReactNode} sidebar an <AppSidebar>.
|
|
106
106
|
* @property {import('react').ReactNode} children the page body.
|
|
107
107
|
* @property {string} [className]
|
|
108
|
+
* @property {boolean} [viewport] bound the frame to the viewport rather than document flow.
|
|
109
|
+
* @property {import('react').ReactNode} [topBar]
|
|
110
|
+
* @property {import('react').ReactNode} [notice]
|
|
111
|
+
* @property {'div' | 'main'} [mainAs]
|
|
112
|
+
* @property {string} [mainId]
|
|
108
113
|
*/
|
|
109
114
|
/**
|
|
110
115
|
* @typedef {Object} AppPageProps
|
|
@@ -326,6 +331,14 @@ export type AppSidebarLayoutProps = {
|
|
|
326
331
|
*/
|
|
327
332
|
children: import("react").ReactNode;
|
|
328
333
|
className?: string;
|
|
334
|
+
/**
|
|
335
|
+
* bound the frame to the viewport rather than document flow.
|
|
336
|
+
*/
|
|
337
|
+
viewport?: boolean;
|
|
338
|
+
topBar?: import("react").ReactNode;
|
|
339
|
+
notice?: import("react").ReactNode;
|
|
340
|
+
mainAs?: "div" | "main";
|
|
341
|
+
mainId?: string;
|
|
329
342
|
};
|
|
330
343
|
export type AppPageProps = {
|
|
331
344
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function Collapsible({ open, children, className, id, keepMounted, animateSize, as: Tag, "aria-label": ariaLabel }: {
|
|
2
|
+
open: any;
|
|
3
|
+
children: any;
|
|
4
|
+
className?: string;
|
|
5
|
+
id: any;
|
|
6
|
+
keepMounted?: boolean;
|
|
7
|
+
animateSize?: boolean;
|
|
8
|
+
as?: string;
|
|
9
|
+
"aria-label": any;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param {object} props
|
|
4
4
|
* @param {ThinkingVM} [props.block] cooked thinking (e.g. `TurnVM.thinking`)
|
|
5
5
|
*/
|
|
6
|
-
export default function Thinking({ block }: {
|
|
6
|
+
export default function Thinking({ block, actionRef, revealRequest }: {
|
|
7
7
|
block?: ThinkingVM;
|
|
8
8
|
}): import("react").JSX.Element;
|
|
9
9
|
export type ThinkingVM = import("./view-model.js").ThinkingVM;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @param {boolean} [props.open]
|
|
5
5
|
* @param {() => void} [props.onToggle]
|
|
6
6
|
*/
|
|
7
|
-
export default function ToolCall({ tool, open, onToggle, showChevron }: {
|
|
7
|
+
export default function ToolCall({ tool, open, onToggle, showChevron, actionRef }: {
|
|
8
8
|
tool?: ToolCallVM;
|
|
9
9
|
open?: boolean;
|
|
10
10
|
onToggle?: () => void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {TranscriptViewerProps} props
|
|
3
3
|
*/
|
|
4
|
-
export default function TranscriptViewer({ viewModel, capabilities, callbacks, theme: themeProp, onThemeChange, graphSlot, activeTab: activeTabProp, onTabChange, viewMode: viewModeProp, onViewModeChange, sidebarLayout: sidebarLayoutProp, onSidebarLayoutChange, zen: zenProp, onZenChange, readerWidth: readerWidthProp, onReaderWidthChange, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, earlierHistoryOpen: earlierHistoryOpenProp, onEarlierHistoryOpenChange, initialPosition: initialPositionProp, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, breadcrumb, LinkComponent, renderTurnPanel, renderTurnActions, anchorHref, headerActions, streamPrelude, showTail, showOutcome, showSearchTrigger, footer, presentation, subtitle, pullRequests, headingLevel, }: TranscriptViewerProps): import("react").JSX.Element;
|
|
5
|
-
export const
|
|
4
|
+
export default function TranscriptViewer({ viewModel, capabilities, callbacks, theme: themeProp, onThemeChange, graphSlot, activeTab: activeTabProp, onTabChange, viewMode: viewModeProp, onViewModeChange, sidebarLayout: sidebarLayoutProp, onSidebarLayoutChange, zen: zenProp, onZenChange, readerWidth: readerWidthProp, onReaderWidthChange, leftRailOpen: leftRailOpenProp, onLeftRailOpenChange, rightRailOpen: rightRailOpenProp, onRightRailOpenChange, openTools: openToolsProp, onOpenToolsChange, earlierHistoryOpen: earlierHistoryOpenProp, onEarlierHistoryOpenChange, initialPosition: initialPositionProp, activeTurn: activeTurnProp, onActiveTurnChange, search: searchProp, onSearchChange, filters: filtersProp, onFiltersChange, savedLabels: savedLabelsProp, onSavedLabelsChange, shareOpen: shareOpenProp, onShareOpenChange, moreOpen: moreOpenProp, onMoreOpenChange, breadcrumb, breadcrumbContext, beforeHeader, LinkComponent, renderTurnPanel, renderTurnActions, anchorHref, headerActions, utilityActions, streamPrelude, showTail, showOutcome, showSearchTrigger, footer, presentation, subtitle, pullRequests, headingLevel, }: TranscriptViewerProps): import("react").JSX.Element;
|
|
5
|
+
export const READER_FULL: "full";
|
|
6
6
|
export type TranscriptViewerProps = import("./state-capabilities.js").TranscriptViewerProps;
|
|
7
7
|
export type TranscriptFilters = import("./state-capabilities.js").TranscriptFilters;
|
|
8
8
|
export type TraceReadingSnapshot = {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @param {object} props
|
|
3
3
|
* @param {TurnVM} [props.turn]
|
|
4
4
|
* @param {boolean} [props.active]
|
|
5
|
+
* @param {(turnIndex: number) => void} [props.onSelect] select the prose card without scrolling
|
|
5
6
|
* @param {Record<string, boolean>} [props.openTools] tool id → open?
|
|
6
7
|
* @param {(id: string) => void} [props.toggleTool]
|
|
7
8
|
* @param {(turnIndex: number) => void} [props.onCopyAnchor]
|
|
@@ -24,9 +25,10 @@
|
|
|
24
25
|
* `renderActions` and `renderTurnPanel` keep rendering on every role, so a host extension is never
|
|
25
26
|
* dropped by the presentation switch.
|
|
26
27
|
*/
|
|
27
|
-
export default function TurnCard({ turn, active, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, renderActions, savedLabel, compact, expandAll, revealRequest, headingLevel, presentation, }: {
|
|
28
|
+
export default function TurnCard({ turn, active, onSelect, openTools, toggleTool, onCopyAnchor, copied, registerRef, onLabel, renderActions, savedLabel, compact, expandAll, revealRequest, headingLevel, modelActions, actionReveal, registerActionRef, suppressWork, presentation, }: {
|
|
28
29
|
turn?: TurnVM;
|
|
29
30
|
active?: boolean;
|
|
31
|
+
onSelect?: (turnIndex: number) => void;
|
|
30
32
|
openTools?: Record<string, boolean>;
|
|
31
33
|
toggleTool?: (id: string) => void;
|
|
32
34
|
onCopyAnchor?: (turnIndex: number) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @typedef {import('@peasant-labs/schema').UnverifiedPullRequest} UnverifiedPullRequest */
|
|
2
|
+
/** @typedef {import('@peasant-labs/schema').UnverifiedPullRequestSource} UnverifiedPullRequestSource */
|
|
3
|
+
/**
|
|
4
|
+
* Recorded command evidence, not an attached or independently verified pull request.
|
|
5
|
+
* @param {{pullRequests: readonly UnverifiedPullRequest[], onSourceSelect: (source: UnverifiedPullRequestSource) => void}} props
|
|
6
|
+
*/
|
|
7
|
+
export default function UnverifiedPullRequests({ pullRequests, onSourceSelect }: {
|
|
8
|
+
pullRequests: readonly UnverifiedPullRequest[];
|
|
9
|
+
onSourceSelect: (source: UnverifiedPullRequestSource) => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export type UnverifiedPullRequest = import("@peasant-labs/schema").UnverifiedPullRequest;
|
|
12
|
+
export type UnverifiedPullRequestSource = import("@peasant-labs/schema").UnverifiedPullRequestSource;
|
|
@@ -12,4 +12,13 @@ export default function TranscriptWorkGroup({ tools, thinking, openTools, onTogg
|
|
|
12
12
|
onToggle?: (id: string) => void;
|
|
13
13
|
expandAll?: boolean;
|
|
14
14
|
}): import("react").JSX.Element;
|
|
15
|
+
export function ModelActions({ turns, openTools, onToggle, expandAll, compact, reveal, registerActionRef }: {
|
|
16
|
+
turns?: any[];
|
|
17
|
+
openTools?: {};
|
|
18
|
+
onToggle?: () => void;
|
|
19
|
+
expandAll?: boolean;
|
|
20
|
+
compact?: boolean;
|
|
21
|
+
reveal: any;
|
|
22
|
+
registerActionRef?: () => void;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
15
24
|
export type ToolCallVM = import("./view-model.js").ToolCallVM;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Stable source user boundaries, followed by visibility projection. No hidden part is restored.
|
|
2
|
+
* @param {import('./view-model.js').TurnVM[]} turns
|
|
3
|
+
* @param {import('./view-model.js').TurnVM[]} visibleTurns
|
|
4
|
+
*/
|
|
5
|
+
export function actionGroups(turns: import("./view-model.js").TurnVM[], visibleTurns: import("./view-model.js").TurnVM[]): {
|
|
6
|
+
groups: Map<any, any>;
|
|
7
|
+
folded: Set<any>;
|
|
8
|
+
locations: Map<any, any>;
|
|
9
|
+
};
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The time a standalone thinking entry took. A harness records a thinking entry when the thinking
|
|
3
|
+
* ends, so it is the gap from the end of the event before it: the previous turn at the same depth,
|
|
4
|
+
* plus the tools that turn ran, whose results come back after it. The wire records each tool's
|
|
5
|
+
* duration but not when it started, so the tools' durations are summed: when they ran in parallel
|
|
6
|
+
* this undercounts the thinking or leaves it out, and never reports more time than it took.
|
|
7
|
+
* Undefined when either time is unknown or the gap is not positive.
|
|
8
|
+
* @param {TurnDetail | undefined} previous
|
|
9
|
+
* @param {TurnDetail} turn
|
|
10
|
+
* @returns {number | undefined}
|
|
11
|
+
*/
|
|
12
|
+
export function thinkingDurationMs(previous: TurnDetail | undefined, turn: TurnDetail): number | undefined;
|
|
1
13
|
/**
|
|
2
14
|
* Is this wire turn one of Claude Code's session metadata records rather than conversation?
|
|
3
15
|
* @param {TurnDetail} turn
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @typedef {import('./view-model.js').TurnVM} TurnVM */
|
|
2
2
|
/** @typedef {import('./view-model.js').ToolGroup} ToolGroup */
|
|
3
3
|
/** @typedef {import('./state-capabilities.js').TranscriptFilters} TranscriptFilters */
|
|
4
|
-
/** @typedef {'prompts' | 'responses' | 'thinking' | 'toolcalls'} Category */
|
|
4
|
+
/** @typedef {'prompts' | 'responses' | 'thinking' | 'toolcalls' | 'system'} Category */
|
|
5
5
|
/**
|
|
6
6
|
* Every part kind a cooked turn carries, in rail order. Empty for turns no
|
|
7
|
-
* category governs
|
|
7
|
+
* category governs. A turn with text and tool calls reports
|
|
8
8
|
* both; the rail badges count turns per kind from this.
|
|
9
9
|
*
|
|
10
10
|
* @param {TurnVM} turn
|
|
@@ -31,8 +31,8 @@ export function passesTags(turn: TurnVM, tags: {
|
|
|
31
31
|
* The per-turn projection: the turn with every hidden part removed, or `null`
|
|
32
32
|
* when nothing would be left to render. Tags narrow at the turn level, the
|
|
33
33
|
* checkpoint anchor scopes to a prefix, and then each part is kept or dropped
|
|
34
|
-
* by its own category (tool calls also by their group). System turns
|
|
35
|
-
*
|
|
34
|
+
* by its own category (tool calls also by their group). System turns are governed
|
|
35
|
+
* by their own category, enabled unless explicitly false.
|
|
36
36
|
*
|
|
37
37
|
* The returned object keeps `index`, `role`, labels and annotations, so
|
|
38
38
|
* anchors, jumps and the outline resolve against it exactly as against the
|
|
@@ -124,4 +124,4 @@ export function setToolCalls(filters: TranscriptFilters, next: boolean): Transcr
|
|
|
124
124
|
export type TurnVM = import("./view-model.js").TurnVM;
|
|
125
125
|
export type ToolGroup = import("./view-model.js").ToolGroup;
|
|
126
126
|
export type TranscriptFilters = import("./state-capabilities.js").TranscriptFilters;
|
|
127
|
-
export type Category = "prompts" | "responses" | "thinking" | "toolcalls";
|
|
127
|
+
export type Category = "prompts" | "responses" | "thinking" | "toolcalls" | "system";
|
|
@@ -6,6 +6,7 @@ export { default as TranscriptThinking } from "./Thinking.jsx";
|
|
|
6
6
|
export { default as TranscriptMarkdown } from "./Markdown.jsx";
|
|
7
7
|
export { default as TranscriptToolCall } from "./ToolCall.jsx";
|
|
8
8
|
export { default as TranscriptWorkGroup } from "./WorkGroup.jsx";
|
|
9
|
+
export { default as UnverifiedPullRequests } from "./UnverifiedPullRequests.jsx";
|
|
9
10
|
export { default as TranscriptSystemRow } from "./SystemRow.jsx";
|
|
10
11
|
export { default as TranscriptToolBody } from "./ToolBody.jsx";
|
|
11
12
|
export { default as TranscriptTaskBody } from "./TaskBody.jsx";
|
|
@@ -82,5 +83,5 @@ export { computeTasks, computeTurnLabels, buildTaskWaterfall, annotateTranscript
|
|
|
82
83
|
export { formatRelative, formatDurationMins, formatDurationMs, formatDurationSeconds, formatDateLong, isKnownTime } from "./time.js";
|
|
83
84
|
export { summarizePrompt, composeSessionTitle, projectLabel, cleanSessionTitle, unwrapUserQuery } from "./title.js";
|
|
84
85
|
export { default as TranscriptDiffEntryCard, DiffHunks as TranscriptDiffHunks } from "./DiffEntryCard.jsx";
|
|
85
|
-
export { default as TranscriptViewer,
|
|
86
|
+
export { default as TranscriptViewer, READER_FULL } from "./TranscriptViewer.jsx";
|
|
86
87
|
export { advanceTranscriptInitialPositionConsumption, normalizeTranscriptInitialPosition, resolveTranscriptInitialPosition, shouldApplyTranscriptInitialPosition, transcriptInitialPositionReadiness, transcriptInitialPositionToken } from "./initial-position.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function mermaidSvg(svg: any, prefix: any): any;
|
|
@@ -12,8 +12,8 @@ export type ViewMode = "list" | "graph";
|
|
|
12
12
|
*/
|
|
13
13
|
export type Theme = "dark" | "light";
|
|
14
14
|
/**
|
|
15
|
-
* How the composite presents: `classic` (the
|
|
16
|
-
* `ledger` (the
|
|
15
|
+
* How the composite presents: `classic` (the bordered-turn reading surface) or
|
|
16
|
+
* `ledger` (the default reading-first surface: role-led turns with one grouped work panel,
|
|
17
17
|
* system turns as single rows, and the ledger chrome).
|
|
18
18
|
*/
|
|
19
19
|
export type Presentation = "classic" | "ledger";
|
|
@@ -55,11 +55,15 @@ export type TranscriptSidebarLayout = {
|
|
|
55
55
|
* scopes the trace to a commit (`'all'` = unscoped).
|
|
56
56
|
*/
|
|
57
57
|
export type TranscriptFilters = {
|
|
58
|
+
/**
|
|
59
|
+
* system defaults to true when absent from saved or host-controlled state
|
|
60
|
+
*/
|
|
58
61
|
categories: {
|
|
59
62
|
prompts: boolean;
|
|
60
63
|
responses: boolean;
|
|
61
64
|
thinking: boolean;
|
|
62
65
|
toolcalls: boolean;
|
|
66
|
+
system?: boolean;
|
|
63
67
|
};
|
|
64
68
|
toolGroups: Partial<Record<import("./view-model.js").ToolGroup, boolean>>;
|
|
65
69
|
tags: {
|
|
@@ -146,6 +150,12 @@ export type TranscriptInitialPosition = {
|
|
|
146
150
|
kind: "turn";
|
|
147
151
|
turnIndex: number;
|
|
148
152
|
requestKey?: string;
|
|
153
|
+
} | {
|
|
154
|
+
kind: "tool-call";
|
|
155
|
+
turnIndex: number;
|
|
156
|
+
toolCallIndex: number;
|
|
157
|
+
toolCallId?: string;
|
|
158
|
+
requestKey?: string;
|
|
149
159
|
};
|
|
150
160
|
/**
|
|
151
161
|
* Every TranscriptViewer prop. `viewModel` + `capabilities` are the only required
|
|
@@ -155,7 +165,7 @@ export type TranscriptInitialPosition = {
|
|
|
155
165
|
* pair whose `onChange?` half sits beside it (React's controlled-component
|
|
156
166
|
* convention): pass neither ⇒ internal default; pass both ⇒ fully controlled.
|
|
157
167
|
*/
|
|
158
|
-
export type
|
|
168
|
+
export type TranscriptViewerBaseProps = {
|
|
159
169
|
/**
|
|
160
170
|
* the cooked VM (the adapter's output)
|
|
161
171
|
*/
|
|
@@ -191,10 +201,13 @@ export type TranscriptViewerProps = {
|
|
|
191
201
|
zen?: boolean;
|
|
192
202
|
onZenChange?: (zen: boolean) => void;
|
|
193
203
|
/**
|
|
194
|
-
* ledger only: the reader column width in CSS pixels
|
|
204
|
+
* ledger only: the reader column width in CSS pixels, or `'full'` (exported as `READER_FULL`), the stream's whole measured content width, which follows the space as it changes. There are no snaps: a supplied number renders clamped to 600..full, so the column and `aria-valuenow` always report a width the column can draw; defaults 840
|
|
195
205
|
*/
|
|
196
|
-
readerWidth?: number;
|
|
197
|
-
|
|
206
|
+
readerWidth?: number | "full";
|
|
207
|
+
/**
|
|
208
|
+
* a drag or a key reports pixel widths, and `'full'` once the column reaches the end
|
|
209
|
+
*/
|
|
210
|
+
onReaderWidthChange?: (width: number | "full") => void;
|
|
198
211
|
/**
|
|
199
212
|
* alias for `sidebarLayout.outline`; when supplied it wins for that rail and still calls `onLeftRailOpenChange`
|
|
200
213
|
*/
|
|
@@ -243,14 +256,14 @@ export type TranscriptViewerProps = {
|
|
|
243
256
|
*/
|
|
244
257
|
moreOpen?: boolean;
|
|
245
258
|
onMoreOpenChange?: (open: boolean) => void;
|
|
246
|
-
/**
|
|
247
|
-
* host-routable trail; omit for the demo's static crumb
|
|
248
|
-
*/
|
|
249
|
-
breadcrumb?: BreadcrumbItem[];
|
|
250
259
|
/**
|
|
251
260
|
* router link for crumb items (e.g. next/link); defaults to 'a'
|
|
252
261
|
*/
|
|
253
262
|
LinkComponent?: import("react").ElementType;
|
|
263
|
+
/**
|
|
264
|
+
* in-flow content before the session header
|
|
265
|
+
*/
|
|
266
|
+
beforeHeader?: import("react").ReactNode;
|
|
254
267
|
/**
|
|
255
268
|
* host per-turn extension rendered under each turn card
|
|
256
269
|
*/
|
|
@@ -267,6 +280,10 @@ export type TranscriptViewerProps = {
|
|
|
267
280
|
* host session-level actions rendered at the head of the hero action row (attest etc.); the composite's own actions stay the shared tail
|
|
268
281
|
*/
|
|
269
282
|
headerActions?: unknown;
|
|
283
|
+
/**
|
|
284
|
+
* host secondary actions, in the header on desktop and the bottom bar on phones
|
|
285
|
+
*/
|
|
286
|
+
utilityActions?: import("react").ReactNode;
|
|
270
287
|
/**
|
|
271
288
|
* host controls or context rendered at the start of the list-mode transcript scroller; omitted in graph mode
|
|
272
289
|
*/
|
|
@@ -295,7 +312,7 @@ export type TranscriptViewerProps = {
|
|
|
295
312
|
*/
|
|
296
313
|
headingLevel?: 1 | 2;
|
|
297
314
|
/**
|
|
298
|
-
* chrome presentation; defaults to '
|
|
315
|
+
* chrome presentation; defaults to 'ledger'. `classic` retains the report-style surface. An unrecognized runtime value fails closed to classic.
|
|
299
316
|
*/
|
|
300
317
|
presentation?: Presentation;
|
|
301
318
|
/**
|
|
@@ -307,6 +324,16 @@ export type TranscriptViewerProps = {
|
|
|
307
324
|
*/
|
|
308
325
|
pullRequests?: unknown;
|
|
309
326
|
};
|
|
327
|
+
/**
|
|
328
|
+
* The full legacy trail and the ancestor-only context are alternative contracts.
|
|
329
|
+
*/
|
|
330
|
+
export type TranscriptViewerProps = TranscriptViewerBaseProps & ({
|
|
331
|
+
breadcrumb?: BreadcrumbItem[];
|
|
332
|
+
breadcrumbContext?: never;
|
|
333
|
+
} | {
|
|
334
|
+
breadcrumb?: never;
|
|
335
|
+
breadcrumbContext?: BreadcrumbItem[];
|
|
336
|
+
});
|
|
310
337
|
/**
|
|
311
338
|
* One breadcrumb segment. The last item renders as the current page (no link).
|
|
312
339
|
*/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default function useReaderWidthAnchor({ readerPx, scrollRef, activeTurnRef, turnRefs, actionRefs, actionLayout, visibleTurns, ledger, sessionId, tab, viewMode, onSettle }: {
|
|
2
|
+
readerPx: any;
|
|
3
|
+
scrollRef: any;
|
|
4
|
+
activeTurnRef: any;
|
|
5
|
+
turnRefs: any;
|
|
6
|
+
actionRefs: any;
|
|
7
|
+
actionLayout: any;
|
|
8
|
+
visibleTurns: any;
|
|
9
|
+
ledger: any;
|
|
10
|
+
sessionId: any;
|
|
11
|
+
tab: any;
|
|
12
|
+
viewMode: any;
|
|
13
|
+
onSettle: any;
|
|
14
|
+
}): {
|
|
15
|
+
begin: () => void;
|
|
16
|
+
ensure: () => void;
|
|
17
|
+
finish: () => void;
|
|
18
|
+
clear: () => void;
|
|
19
|
+
skipScroll: (stream: any) => boolean;
|
|
20
|
+
};
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
*
|
|
44
44
|
* @typedef {object} SessionVM
|
|
45
45
|
* @property {string} id
|
|
46
|
+
* @property {number} [sourceIndex] original index in the source turn's tool calls
|
|
47
|
+
* @property {boolean} [sourceIdUnique] whether a nonempty ID is unambiguous in its partition
|
|
46
48
|
* @property {import('./wire-types.js').Harness} harness
|
|
47
49
|
* @property {string} startTime
|
|
48
50
|
* @property {string} endTime
|
|
@@ -144,6 +146,14 @@ export type CommitVM = {
|
|
|
144
146
|
*/
|
|
145
147
|
export type SessionVM = {
|
|
146
148
|
id: string;
|
|
149
|
+
/**
|
|
150
|
+
* original index in the source turn's tool calls
|
|
151
|
+
*/
|
|
152
|
+
sourceIndex?: number;
|
|
153
|
+
/**
|
|
154
|
+
* whether a nonempty ID is unambiguous in its partition
|
|
155
|
+
*/
|
|
156
|
+
sourceIdUnique?: boolean;
|
|
147
157
|
harness: import("./wire-types.js").Harness;
|
|
148
158
|
startTime: string;
|
|
149
159
|
endTime: string;
|
|
@@ -285,6 +295,11 @@ export type ThinkingVM = {
|
|
|
285
295
|
* precomputed word count for the toggle badge
|
|
286
296
|
*/
|
|
287
297
|
words?: number;
|
|
298
|
+
/**
|
|
299
|
+
* time spent thinking, derived from the turn timestamps
|
|
300
|
+
* (absent when it cannot be derived)
|
|
301
|
+
*/
|
|
302
|
+
durationMs?: number;
|
|
288
303
|
};
|
|
289
304
|
/**
|
|
290
305
|
* One cooked turn. `toolCalls` here are the same `ToolCallVM` objects indexed in
|
|
@@ -292,6 +307,10 @@ export type ThinkingVM = {
|
|
|
292
307
|
*/
|
|
293
308
|
export type TurnVM = {
|
|
294
309
|
index: number;
|
|
310
|
+
/**
|
|
311
|
+
* whether this index is unambiguous in its partition
|
|
312
|
+
*/
|
|
313
|
+
sourceIndexUnique?: boolean;
|
|
295
314
|
/**
|
|
296
315
|
* partition-scoped stable rendering key
|
|
297
316
|
*/
|
|
@@ -11,6 +11,14 @@ export function workSummary(tools?: ToolCallVM[]): WorkSummary;
|
|
|
11
11
|
* @returns {string}
|
|
12
12
|
*/
|
|
13
13
|
export function workCountLabel(summary?: Partial<WorkSummary>): string;
|
|
14
|
+
/**
|
|
15
|
+
* The ledger action block's header: "6 actions: 4 commands, 3 files, 1 edit, 29s". It counts the
|
|
16
|
+
* block's tool runs as actions, then the counted parts and the recorded duration; zero parts and
|
|
17
|
+
* an unrecorded duration are left out, so a block of searches reads "2 actions, 1.2s".
|
|
18
|
+
* @param {Partial<WorkSummary>} [summary]
|
|
19
|
+
* @returns {string}
|
|
20
|
+
*/
|
|
21
|
+
export function workActionsLabel(summary?: Partial<WorkSummary>): string;
|
|
14
22
|
/**
|
|
15
23
|
* The panel's trailing meta: "8 calls, 1 failed, 29s". The failure count is omitted when zero and
|
|
16
24
|
* the duration is omitted when nothing was recorded. The leading call count is omitted when the
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The time a standalone thinking entry took. A harness records a thinking entry when the thinking
|
|
3
|
+
* ends, so it is the gap from the end of the event before it: the previous turn at the same depth,
|
|
4
|
+
* plus the tools that turn ran, whose results come back after it. The wire records each tool's
|
|
5
|
+
* duration but not when it started, so the tools' durations are summed: when they ran in parallel
|
|
6
|
+
* this undercounts the thinking or leaves it out, and never reports more time than it took.
|
|
7
|
+
* Undefined when either time is unknown or the gap is not positive.
|
|
8
|
+
* @param {TurnDetail | undefined} previous
|
|
9
|
+
* @param {TurnDetail} turn
|
|
10
|
+
* @returns {number | undefined}
|
|
11
|
+
*/
|
|
12
|
+
export function thinkingDurationMs(previous: TurnDetail | undefined, turn: TurnDetail): number | undefined;
|
|
1
13
|
/**
|
|
2
14
|
* Is this wire turn one of Claude Code's session metadata records rather than conversation?
|
|
3
15
|
* @param {TurnDetail} turn
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
*
|
|
44
44
|
* @typedef {object} SessionVM
|
|
45
45
|
* @property {string} id
|
|
46
|
+
* @property {number} [sourceIndex] original index in the source turn's tool calls
|
|
47
|
+
* @property {boolean} [sourceIdUnique] whether a nonempty ID is unambiguous in its partition
|
|
46
48
|
* @property {import('./wire-types.js').Harness} harness
|
|
47
49
|
* @property {string} startTime
|
|
48
50
|
* @property {string} endTime
|
|
@@ -144,6 +146,14 @@ export type CommitVM = {
|
|
|
144
146
|
*/
|
|
145
147
|
export type SessionVM = {
|
|
146
148
|
id: string;
|
|
149
|
+
/**
|
|
150
|
+
* original index in the source turn's tool calls
|
|
151
|
+
*/
|
|
152
|
+
sourceIndex?: number;
|
|
153
|
+
/**
|
|
154
|
+
* whether a nonempty ID is unambiguous in its partition
|
|
155
|
+
*/
|
|
156
|
+
sourceIdUnique?: boolean;
|
|
147
157
|
harness: import("./wire-types.js").Harness;
|
|
148
158
|
startTime: string;
|
|
149
159
|
endTime: string;
|
|
@@ -285,6 +295,11 @@ export type ThinkingVM = {
|
|
|
285
295
|
* precomputed word count for the toggle badge
|
|
286
296
|
*/
|
|
287
297
|
words?: number;
|
|
298
|
+
/**
|
|
299
|
+
* time spent thinking, derived from the turn timestamps
|
|
300
|
+
* (absent when it cannot be derived)
|
|
301
|
+
*/
|
|
302
|
+
durationMs?: number;
|
|
288
303
|
};
|
|
289
304
|
/**
|
|
290
305
|
* One cooked turn. `toolCalls` here are the same `ToolCallVM` objects indexed in
|
|
@@ -292,6 +307,10 @@ export type ThinkingVM = {
|
|
|
292
307
|
*/
|
|
293
308
|
export type TurnVM = {
|
|
294
309
|
index: number;
|
|
310
|
+
/**
|
|
311
|
+
* whether this index is unambiguous in its partition
|
|
312
|
+
*/
|
|
313
|
+
sourceIndexUnique?: boolean;
|
|
295
314
|
/**
|
|
296
315
|
* partition-scoped stable rendering key
|
|
297
316
|
*/
|