@peasant-labs/fairtrade 0.0.17 → 0.0.19

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 (35) hide show
  1. package/README.md +11 -2
  2. package/THIRD_PARTY_NOTICES.md +31 -0
  3. package/dist/lib/{InUseShell-CY5Acw6t.js → GraphLegend-BB0V2w59.js} +780 -558
  4. package/dist/lib/commons.js +139 -139
  5. package/dist/lib/components.css +1 -1
  6. package/dist/lib/graph.css +1 -1
  7. package/dist/lib/graph.js +921 -359
  8. package/dist/lib/types/BrandMark.d.ts +2 -2
  9. package/dist/lib/types/commons/providers.d.ts +1 -1
  10. package/dist/lib/types/graph/index.d.ts +16 -0
  11. package/dist/lib/types/provider-policy.d.ts +2 -2
  12. package/dist/lib/types/transcript/OutcomeChip.d.ts +18 -0
  13. package/dist/lib/types/transcript/UsageDisclosure.d.ts +8 -0
  14. package/dist/lib/types/transcript/analytics.d.ts +3 -6
  15. package/dist/lib/types/transcript/graph/engine/GraphControls.d.ts +13 -0
  16. package/dist/lib/types/transcript/graph/engine/TrajectoryGraph.d.ts +18 -0
  17. package/dist/lib/types/transcript/graph/engine/TrajectoryGraphLegend.d.ts +18 -0
  18. package/dist/lib/types/transcript/graph/engine/constants.d.ts +37 -0
  19. package/dist/lib/types/transcript/graph/engine/index.d.ts +23 -0
  20. package/dist/lib/types/transcript/graph/engine/nodes/SubagentBranchNode.d.ts +11 -0
  21. package/dist/lib/types/transcript/graph/engine/nodes/ToolPillNode.d.ts +11 -0
  22. package/dist/lib/types/transcript/graph/engine/nodes/TurnCardNode.d.ts +11 -0
  23. package/dist/lib/types/transcript/graph/engine/turnsToFlow.d.ts +47 -0
  24. package/dist/lib/types/transcript/graph/engine/types.d.ts +131 -0
  25. package/dist/lib/types/transcript/graph/engine/useCanvasSync.d.ts +17 -0
  26. package/dist/lib/types/transcript/index.d.ts +5 -0
  27. package/dist/lib/types/transcript/state-capabilities.d.ts +2 -1
  28. package/dist/lib/types/transcript/time.d.ts +22 -0
  29. package/dist/lib/types/transcript/title.d.ts +48 -0
  30. package/dist/lib/types/transcript/turnNav.d.ts +9 -0
  31. package/dist/lib/types/transcript/usage.d.ts +19 -0
  32. package/dist/lib/types/transcript/view-model.d.ts +61 -0
  33. package/dist/lib/{ui-yIg-1YXY.js → ui-DkPbLhcp.js} +2872 -2731
  34. package/dist/lib/ui.js +4 -4
  35. package/package.json +29 -8
@@ -206,6 +206,10 @@ export type ToolCallVM = {
206
206
  * display name (e.g. "Read", "Bash")
207
207
  */
208
208
  name: string;
209
+ /**
210
+ * separately recorded namespace; empty string remains present evidence
211
+ */
212
+ namespace?: string;
209
213
  kind: import("./wire-types.js").ToolCallKind;
210
214
  /**
211
215
  * filters-rail grouping
@@ -227,6 +231,18 @@ export type ToolCallVM = {
227
231
  durationMs?: number;
228
232
  exitCode?: number;
229
233
  isError?: boolean;
234
+ /**
235
+ * validated owner evidence; cost strings remain verbatim
236
+ */
237
+ usage?: import("@peasant-labs/schema").UsageDetail;
238
+ /**
239
+ * attached structured details, excluded from conversation/search
240
+ */
241
+ nativeMetadata?: import("@peasant-labs/schema").NativeMetadataRecord[];
242
+ /**
243
+ * no recorded result; never a fabricated success
244
+ */
245
+ pending?: boolean;
230
246
  /**
231
247
  * present for edit/write kinds
232
248
  */
@@ -284,6 +300,7 @@ export type TurnVM = {
284
300
  */
285
301
  agentName?: string;
286
302
  thinking?: ThinkingVM;
303
+ usage?: import("@peasant-labs/schema").UsageDetail;
287
304
  toolCalls: ToolCallVM[];
288
305
  entryType?: import("./wire-types.js").EntryType;
289
306
  stopReason?: import("./wire-types.js").StopReason | null;
@@ -328,6 +345,28 @@ export type AnnotationVM = {
328
345
  preview?: string;
329
346
  isPrimary?: boolean;
330
347
  };
348
+ /**
349
+ * A manual label applied to a single turn (entry), in the general host-defined
350
+ * taxonomy shape (arbitrary `typeId`/`typeName`/`value`) — distinct from the
351
+ * composite viewer's own `SavedLabel` (state-capabilities.js), which is the
352
+ * narrower fixed outcome/flag shape `LabelPopover` writes into `savedLabels`.
353
+ * `TurnLabel` is the framework-agnostic wire shape a host app's own annotation
354
+ * model maps to/from when it manages labelling outside the composite viewer.
355
+ * `id` is empty for an optimistic, not-yet-persisted label.
356
+ */
357
+ export type TurnLabel = {
358
+ /**
359
+ * the entry index this label targets (`turn.index`)
360
+ */
361
+ entryIndex: number;
362
+ typeId: string;
363
+ typeName: string;
364
+ value: string;
365
+ /**
366
+ * host-assigned id; empty string for an optimistic pre-save
367
+ */
368
+ id: string;
369
+ };
331
370
  /**
332
371
  * One file in the Files tab, with cooked churn. The adapter aggregates per-file
333
372
  * reads/writes/edits/deletes across all tool calls.
@@ -568,4 +607,26 @@ export type TranscriptViewModel = {
568
607
  * render-when-present
569
608
  */
570
609
  analytics?: TranscriptAnalyticsVM;
610
+ /**
611
+ * non-conversational, including unattached records
612
+ */
613
+ nativeMetadata?: import("@peasant-labs/schema").NativeMetadataRecord[];
614
+ /**
615
+ * complete owner universe, before visible-turn filtering
616
+ */
617
+ usageScopes?: UsageScopeVM[];
618
+ };
619
+ export type UsageFieldVM = {
620
+ label: string;
621
+ /**
622
+ * exact known sum or unknown
623
+ */
624
+ value: string;
625
+ completeness: import("@peasant-labs/schema").UsageCompleteness;
626
+ };
627
+ export type UsageScopeVM = {
628
+ scope: import("@peasant-labs/schema").UsageScope;
629
+ ownerCount: number;
630
+ tokens: UsageFieldVM[];
631
+ cost: UsageFieldVM[];
571
632
  };