@peasant-labs/fairtrade 0.0.1 → 0.0.3
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/base.css +54 -0
- package/dist/lib/components.css +2 -0
- package/dist/lib/fonts.css +28 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/tokens.css +184 -0
- package/dist/lib/tokens.json +768 -0
- package/dist/lib/types/Accordion.d.ts +47 -0
- package/dist/lib/types/Avatar.d.ts +94 -0
- package/dist/lib/types/BrandMark.d.ts +25 -0
- package/dist/lib/types/Breadcrumb.d.ts +66 -0
- package/dist/lib/types/Button.d.ts +86 -0
- package/dist/lib/types/Card.d.ts +145 -0
- package/dist/lib/types/ChartBar.d.ts +51 -0
- package/dist/lib/types/ChartLine.d.ts +54 -0
- package/dist/lib/types/Checkbox.d.ts +132 -0
- package/dist/lib/types/Chip.d.ts +85 -0
- package/dist/lib/types/CliOnboard.d.ts +68 -0
- package/dist/lib/types/CommandPalette.d.ts +6 -0
- package/dist/lib/types/CommitGraph.d.ts +71 -0
- package/dist/lib/types/ConnectionState.d.ts +82 -0
- package/dist/lib/types/ConsentDialog.d.ts +97 -0
- package/dist/lib/types/DataTable.d.ts +116 -0
- package/dist/lib/types/DateRange.d.ts +242 -0
- package/dist/lib/types/Dialog.d.ts +9 -0
- package/dist/lib/types/DiffView.d.ts +39 -0
- package/dist/lib/types/EmptyState.d.ts +28 -0
- package/dist/lib/types/EvidenceCaption.d.ts +39 -0
- package/dist/lib/types/Explainer.d.ts +82 -0
- package/dist/lib/types/FacetRail.d.ts +13 -0
- package/dist/lib/types/Feedback.d.ts +222 -0
- package/dist/lib/types/GroupedMultiSelect.d.ts +67 -0
- package/dist/lib/types/Input.d.ts +158 -0
- package/dist/lib/types/Intensity.d.ts +55 -0
- package/dist/lib/types/MapCanvas.d.ts +89 -0
- package/dist/lib/types/Menu.d.ts +62 -0
- package/dist/lib/types/ModerationQueue.d.ts +135 -0
- package/dist/lib/types/Pager.d.ts +47 -0
- package/dist/lib/types/Pagination.d.ts +50 -0
- package/dist/lib/types/PolicySelect.d.ts +80 -0
- package/dist/lib/types/ProviderIcon.d.ts +84 -0
- package/dist/lib/types/RailShell.d.ts +199 -0
- package/dist/lib/types/Redaction.d.ts +53 -0
- package/dist/lib/types/RoleRoster.d.ts +97 -0
- package/dist/lib/types/SignIn.d.ts +78 -0
- package/dist/lib/types/Sparkline.d.ts +19 -0
- package/dist/lib/types/StatTiles.d.ts +118 -0
- package/dist/lib/types/StepWizard.d.ts +92 -0
- package/dist/lib/types/StepsWaterfall.d.ts +67 -0
- package/dist/lib/types/Switch.d.ts +63 -0
- package/dist/lib/types/Tabs.d.ts +48 -0
- package/dist/lib/types/TimeStrip.d.ts +12 -0
- package/dist/lib/types/Timeline.d.ts +192 -0
- package/dist/lib/types/ToastHost.d.ts +70 -0
- package/dist/lib/types/ToolRenderers.d.ts +24 -0
- package/dist/lib/types/Tooltip.d.ts +80 -0
- package/dist/lib/types/Tour.d.ts +37 -0
- package/dist/lib/types/TranscriptMarkers.d.ts +50 -0
- package/dist/lib/types/Treemap.d.ts +77 -0
- package/dist/lib/types/VisibilityControl.d.ts +54 -0
- package/dist/lib/types/chart-shared.d.ts +63 -0
- package/dist/lib/types/icons.d.ts +1 -0
- package/dist/lib/types/index.d.ts +55 -0
- package/dist/lib/types/transcript/CheckRow.d.ts +15 -0
- package/dist/lib/types/transcript/DiffEntryCard.d.ts +27 -0
- package/dist/lib/types/transcript/FilterSection.d.ts +11 -0
- package/dist/lib/types/transcript/FiltersRail.d.ts +41 -0
- package/dist/lib/types/transcript/LabelPopover.d.ts +14 -0
- package/dist/lib/types/transcript/Markdown.d.ts +7 -0
- package/dist/lib/types/transcript/OutlineRail.d.ts +13 -0
- package/dist/lib/types/transcript/Scorecard.d.ts +8 -0
- package/dist/lib/types/transcript/Scrubber.d.ts +17 -0
- package/dist/lib/types/transcript/TaskBody.d.ts +8 -0
- package/dist/lib/types/transcript/Thinking.d.ts +9 -0
- package/dist/lib/types/transcript/ToolBody.d.ts +8 -0
- package/dist/lib/types/transcript/ToolCall.d.ts +12 -0
- package/dist/lib/types/transcript/TranscriptViewer.d.ts +6 -0
- package/dist/lib/types/transcript/TurnCard.d.ts +31 -0
- package/dist/lib/types/transcript/ViewSwitch.d.ts +11 -0
- package/dist/lib/types/transcript/adapter.d.ts +90 -0
- package/dist/lib/types/transcript/adapter.parse.d.ts +75 -0
- package/dist/lib/types/transcript/analytics.d.ts +216 -0
- package/dist/lib/types/transcript/graph/GraphLegend.d.ts +49 -0
- package/dist/lib/types/transcript/graph/GraphSubagentBranch.d.ts +24 -0
- package/dist/lib/types/transcript/graph/GraphToolNode.d.ts +56 -0
- package/dist/lib/types/transcript/graph/GraphTurnNode.d.ts +76 -0
- package/dist/lib/types/transcript/graph/index.d.ts +10 -0
- package/dist/lib/types/transcript/index.d.ts +69 -0
- package/dist/lib/types/transcript/state-capabilities.d.ts +161 -0
- package/dist/lib/types/transcript/view-model.d.ts +563 -0
- package/dist/lib/types/transcript/wire-types.d.ts +325 -0
- package/dist/lib/ui.js +12693 -0
- package/package.json +11 -5
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export { TOOL_GROUPS } from "./view-model.js";
|
|
2
|
+
export { default as TranscriptTurnCard } from "./TurnCard.jsx";
|
|
3
|
+
export { default as TranscriptThinking } from "./Thinking.jsx";
|
|
4
|
+
export { default as TranscriptMarkdown } from "./Markdown.jsx";
|
|
5
|
+
export { default as TranscriptToolCall } from "./ToolCall.jsx";
|
|
6
|
+
export { default as TranscriptToolBody } from "./ToolBody.jsx";
|
|
7
|
+
export { default as TranscriptTaskBody } from "./TaskBody.jsx";
|
|
8
|
+
export { default as TranscriptViewer } from "./TranscriptViewer.jsx";
|
|
9
|
+
export { default as TranscriptOutlineRail } from "./OutlineRail.jsx";
|
|
10
|
+
export { default as TranscriptFiltersRail } from "./FiltersRail.jsx";
|
|
11
|
+
export { default as TranscriptFilterSection } from "./FilterSection.jsx";
|
|
12
|
+
export { default as TranscriptCheckRow } from "./CheckRow.jsx";
|
|
13
|
+
export { default as TranscriptViewSwitch } from "./ViewSwitch.jsx";
|
|
14
|
+
export { default as TranscriptScrubber } from "./Scrubber.jsx";
|
|
15
|
+
export { default as TranscriptScorecard } from "./Scorecard.jsx";
|
|
16
|
+
export { default as TranscriptLabelPopover } from "./LabelPopover.jsx";
|
|
17
|
+
export type TaskGroup = import("./analytics.js").TaskGroup;
|
|
18
|
+
export type WaterfallSegment = import("./analytics.js").WaterfallSegment;
|
|
19
|
+
export type TranscriptAnnotation = import("./analytics.js").TranscriptAnnotation;
|
|
20
|
+
export type PersonalMedians = import("./analytics.js").PersonalMedians;
|
|
21
|
+
export type PersonalMedianSession = import("./analytics.js").PersonalMedianSession;
|
|
22
|
+
export type PhaseType = import("./analytics.js").PhaseType;
|
|
23
|
+
export type Role = import("./wire-types.js").Role;
|
|
24
|
+
export type EntryType = import("./wire-types.js").EntryType;
|
|
25
|
+
export type ToolCallKind = import("./wire-types.js").ToolCallKind;
|
|
26
|
+
export type StopReason = import("./wire-types.js").StopReason;
|
|
27
|
+
export type SessionOutcome = import("./wire-types.js").SessionOutcome;
|
|
28
|
+
export type Harness = import("./wire-types.js").Harness;
|
|
29
|
+
export type ToolCallDetail = import("./wire-types.js").ToolCallDetail;
|
|
30
|
+
export type TurnDetail = import("./wire-types.js").TurnDetail;
|
|
31
|
+
export type ChildSessionRef = import("./wire-types.js").ChildSessionRef;
|
|
32
|
+
export type SessionScorecard = import("./wire-types.js").SessionScorecard;
|
|
33
|
+
export type CommitInfo = import("./wire-types.js").CommitInfo;
|
|
34
|
+
export type GitContext = import("./wire-types.js").GitContext;
|
|
35
|
+
export type AnnotationSummary = import("./wire-types.js").AnnotationSummary;
|
|
36
|
+
export type SessionDetailPayload = import("./wire-types.js").SessionDetailPayload;
|
|
37
|
+
export type TranscriptWireInput = import("./wire-types.js").TranscriptWireInput;
|
|
38
|
+
export type TranscriptViewerProps = import("./state-capabilities.js").TranscriptViewerProps;
|
|
39
|
+
export type ViewerCapabilities = import("./state-capabilities.js").ViewerCapabilities;
|
|
40
|
+
export type ViewerCallbacks = import("./state-capabilities.js").ViewerCallbacks;
|
|
41
|
+
export type GraphSlotContext = import("./state-capabilities.js").GraphSlotContext;
|
|
42
|
+
export type TranscriptFilters = import("./state-capabilities.js").TranscriptFilters;
|
|
43
|
+
export type SavedLabel = import("./state-capabilities.js").SavedLabel;
|
|
44
|
+
export type Theme = import("./state-capabilities.js").Theme;
|
|
45
|
+
export type TranscriptTab = import("./state-capabilities.js").TranscriptTab;
|
|
46
|
+
export type ViewMode = import("./state-capabilities.js").ViewMode;
|
|
47
|
+
export type TranscriptViewModel = import("./view-model.js").TranscriptViewModel;
|
|
48
|
+
export type SessionVM = import("./view-model.js").SessionVM;
|
|
49
|
+
export type SessionGitVM = import("./view-model.js").SessionGitVM;
|
|
50
|
+
export type CommitVM = import("./view-model.js").CommitVM;
|
|
51
|
+
export type TurnVM = import("./view-model.js").TurnVM;
|
|
52
|
+
export type ThinkingVM = import("./view-model.js").ThinkingVM;
|
|
53
|
+
export type ToolCallVM = import("./view-model.js").ToolCallVM;
|
|
54
|
+
export type ToolGroup = import("./view-model.js").ToolGroup;
|
|
55
|
+
export type DiffLineVM = import("./view-model.js").DiffLineVM;
|
|
56
|
+
export type DiffHunkVM = import("./view-model.js").DiffHunkVM;
|
|
57
|
+
export type DiffEntryVM = import("./view-model.js").DiffEntryVM;
|
|
58
|
+
export type FileEntryVM = import("./view-model.js").FileEntryVM;
|
|
59
|
+
export type TaskGroupVM = import("./view-model.js").TaskGroupVM;
|
|
60
|
+
export type HighlightVM = import("./view-model.js").HighlightVM;
|
|
61
|
+
export type AnnotationVM = import("./view-model.js").AnnotationVM;
|
|
62
|
+
export type FilterIndexVM = import("./view-model.js").FilterIndexVM;
|
|
63
|
+
export type PhaseVM = import("./view-model.js").PhaseVM;
|
|
64
|
+
export type ScorecardBandVM = import("./view-model.js").ScorecardBandVM;
|
|
65
|
+
export type TranscriptAnalyticsVM = import("./view-model.js").TranscriptAnalyticsVM;
|
|
66
|
+
export { ROLES, ENTRY_TYPES, TOOL_CALL_KINDS, STOP_REASONS, SESSION_OUTCOMES, HARNESSES } from "./wire-types.js";
|
|
67
|
+
export { adaptTranscript, prefilterTurns, diffLines } from "./adapter.js";
|
|
68
|
+
export { computeTasks, computeTurnLabels, buildTaskWaterfall, annotateTranscript, computePersonalMedians, detectPhases, assessScorecard, computeAnalytics, computeTaskGroups, phaseLabel } from "./analytics.js";
|
|
69
|
+
export { default as TranscriptDiffEntryCard, DiffHunks as TranscriptDiffHunks } from "./DiffEntryCard.jsx";
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The five session views. `highlights` is backed by `vm.highlights`; the rest
|
|
3
|
+
* read their cooked slices off the same `TranscriptViewModel`.
|
|
4
|
+
*/
|
|
5
|
+
export type TranscriptTab = "highlights" | "trace" | "diffs" | "files" | "annotations";
|
|
6
|
+
/**
|
|
7
|
+
* The trace canvas render mode: the lifted turn-card list, or the graph slot.
|
|
8
|
+
*/
|
|
9
|
+
export type ViewMode = "list" | "graph";
|
|
10
|
+
/**
|
|
11
|
+
* The optional theme; defaults to `dark` when unset.
|
|
12
|
+
*/
|
|
13
|
+
export type Theme = "dark" | "light";
|
|
14
|
+
/**
|
|
15
|
+
* A per-turn saved label (the LabelPopover's output). `outcome` is the verdict
|
|
16
|
+
* band; `flag` is an optional friction tag. Keyed by turn index in `savedLabels`.
|
|
17
|
+
*/
|
|
18
|
+
export type SavedLabel = {
|
|
19
|
+
outcome: "good" | "neutral" | "bad";
|
|
20
|
+
flag?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* The cooked filter state the FiltersRail drives. Categories gate turn KINDS;
|
|
24
|
+
* `toolGroups` gate tool-call groups (keyed by the cooked `ToolGroup` ids);
|
|
25
|
+
* `tags` gate semantic friction tags; `views` are display toggles; `checkpoint`
|
|
26
|
+
* scopes the trace to a commit (`'all'` = unscoped).
|
|
27
|
+
*/
|
|
28
|
+
export type TranscriptFilters = {
|
|
29
|
+
categories: {
|
|
30
|
+
prompts: boolean;
|
|
31
|
+
responses: boolean;
|
|
32
|
+
thinking: boolean;
|
|
33
|
+
toolcalls: boolean;
|
|
34
|
+
};
|
|
35
|
+
toolGroups: Partial<Record<import("./view-model.js").ToolGroup, boolean>>;
|
|
36
|
+
tags: {
|
|
37
|
+
errors: boolean;
|
|
38
|
+
retries: boolean;
|
|
39
|
+
revert: boolean;
|
|
40
|
+
};
|
|
41
|
+
views: {
|
|
42
|
+
hidden: boolean;
|
|
43
|
+
expandAll: boolean;
|
|
44
|
+
compact: boolean;
|
|
45
|
+
};
|
|
46
|
+
checkpoint: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The consumer/auth-derived permission surface — REQUIRED on TranscriptViewer
|
|
50
|
+
* (no default). Every flag is required (not optional) so a consumer cannot pass
|
|
51
|
+
* a partial surface and silently leave a permission unset; the host decides each
|
|
52
|
+
* one explicitly. The composite gates each capability's affordance + callback on
|
|
53
|
+
* its flag, so a `false` capability removes the affordance entirely.
|
|
54
|
+
*/
|
|
55
|
+
export type ViewerCapabilities = {
|
|
56
|
+
/**
|
|
57
|
+
* show the "edit" action + wire `onEdit`
|
|
58
|
+
*/
|
|
59
|
+
canEdit: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* show the per-turn "label" affordance + the LabelPopover
|
|
62
|
+
*/
|
|
63
|
+
canLabel: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* show the "contribute" share action + wire `onContribute`
|
|
66
|
+
*/
|
|
67
|
+
canContribute: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* show the visibility control + wire `onChangeVisibility`
|
|
70
|
+
*/
|
|
71
|
+
canChangeVisibility: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* show the download (json/jsonl/markdown) actions + wire `onExport`
|
|
74
|
+
*/
|
|
75
|
+
canExport: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* The host callbacks. All optional; each is wired ONLY when its matching
|
|
79
|
+
* capability is true (see ViewerCapabilities). `onLabel` carries the popover's
|
|
80
|
+
* cooked result; `onExport` carries the requested format. The viewer never
|
|
81
|
+
* mutates the host's data — it reports intent through these.
|
|
82
|
+
*/
|
|
83
|
+
export type ViewerCallbacks = {
|
|
84
|
+
onEdit?: () => void;
|
|
85
|
+
onLabel?: (turnIndex: number, label: SavedLabel) => void;
|
|
86
|
+
onContribute?: () => void;
|
|
87
|
+
onCopyLink?: () => void;
|
|
88
|
+
onChangeVisibility?: () => void;
|
|
89
|
+
onExport?: (format: "json" | "jsonl" | "markdown") => void;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* What the `graphSlot` render-prop receives. The composite owns NO graph engine
|
|
93
|
+
* (no `@xyflow` dependency); in `viewMode: 'graph'` it hands the consumer this
|
|
94
|
+
* cooked context and renders whatever the consumer returns (TB plugs its
|
|
95
|
+
*/
|
|
96
|
+
export type GraphSlotContext = {
|
|
97
|
+
viewModel: import("./view-model.js").TranscriptViewModel;
|
|
98
|
+
activeTurn: number;
|
|
99
|
+
onSelectTurn: (turnIndex: number) => void;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Every TranscriptViewer prop. `viewModel` + `capabilities` are the only required
|
|
103
|
+
* props; everything else is optional with a sane internal default, so
|
|
104
|
+
* `<TranscriptViewer viewModel={vm} capabilities={caps} />` renders the whole
|
|
105
|
+
* surface unmanaged. Each view-state prop is the `value?` half of a controllable
|
|
106
|
+
* pair whose `onChange?` half sits beside it (React's controlled-component
|
|
107
|
+
* convention): pass neither ⇒ internal default; pass both ⇒ fully controlled.
|
|
108
|
+
*/
|
|
109
|
+
export type TranscriptViewerProps = {
|
|
110
|
+
/**
|
|
111
|
+
* the cooked VM (the adapter's output)
|
|
112
|
+
*/
|
|
113
|
+
viewModel: import("./view-model.js").TranscriptViewModel;
|
|
114
|
+
/**
|
|
115
|
+
* REQUIRED — no default
|
|
116
|
+
*/
|
|
117
|
+
capabilities: ViewerCapabilities;
|
|
118
|
+
callbacks?: ViewerCallbacks;
|
|
119
|
+
/**
|
|
120
|
+
* optional; defaults to 'dark'
|
|
121
|
+
*/
|
|
122
|
+
theme?: Theme;
|
|
123
|
+
/**
|
|
124
|
+
* render-prop for the graph engine
|
|
125
|
+
*/
|
|
126
|
+
graphSlot?: (ctx: GraphSlotContext) => unknown;
|
|
127
|
+
activeTab?: TranscriptTab;
|
|
128
|
+
onTabChange?: (tab: TranscriptTab) => void;
|
|
129
|
+
viewMode?: ViewMode;
|
|
130
|
+
onViewModeChange?: (mode: ViewMode) => void;
|
|
131
|
+
leftRailOpen?: boolean;
|
|
132
|
+
onLeftRailOpenChange?: (open: boolean) => void;
|
|
133
|
+
rightRailOpen?: boolean;
|
|
134
|
+
onRightRailOpenChange?: (open: boolean) => void;
|
|
135
|
+
/**
|
|
136
|
+
* tool id → open?
|
|
137
|
+
*/
|
|
138
|
+
openTools?: Record<string, boolean>;
|
|
139
|
+
onOpenToolsChange?: (openTools: Record<string, boolean>) => void;
|
|
140
|
+
activeTurn?: number;
|
|
141
|
+
onActiveTurnChange?: (turnIndex: number) => void;
|
|
142
|
+
search?: string;
|
|
143
|
+
onSearchChange?: (query: string) => void;
|
|
144
|
+
filters?: TranscriptFilters;
|
|
145
|
+
onFiltersChange?: (filters: TranscriptFilters) => void;
|
|
146
|
+
/**
|
|
147
|
+
* turn index → saved label
|
|
148
|
+
*/
|
|
149
|
+
savedLabels?: Record<number, SavedLabel>;
|
|
150
|
+
onSavedLabelsChange?: (savedLabels: Record<number, SavedLabel>) => void;
|
|
151
|
+
/**
|
|
152
|
+
* share action-menu disclosure (default closed)
|
|
153
|
+
*/
|
|
154
|
+
shareOpen?: boolean;
|
|
155
|
+
onShareOpenChange?: (open: boolean) => void;
|
|
156
|
+
/**
|
|
157
|
+
* more action-menu disclosure (default closed)
|
|
158
|
+
*/
|
|
159
|
+
moreOpen?: boolean;
|
|
160
|
+
onMoreOpenChange?: (open: boolean) => void;
|
|
161
|
+
};
|