@inflexa-ai/harness 0.31.1 → 0.32.0

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 (56) hide show
  1. package/dist/agents/conversation-agent.d.ts +7 -0
  2. package/dist/agents/conversation-agent.js +1 -0
  3. package/dist/agents/report-session-agent.d.ts +9 -0
  4. package/dist/agents/report-session-agent.js +10 -2
  5. package/dist/app/chat-turn.d.ts +11 -0
  6. package/dist/app/chat-turn.js +17 -1
  7. package/dist/app/spawn-report-session.d.ts +12 -0
  8. package/dist/app/spawn-report-session.js +21 -1
  9. package/dist/contracts/report-blocks.d.ts +8 -8
  10. package/dist/contracts/schemas/chat-parts.d.ts +6 -6
  11. package/dist/index.d.ts +4 -1
  12. package/dist/index.js +8 -0
  13. package/dist/provenance/seam.d.ts +203 -0
  14. package/dist/provenance/seam.js +71 -0
  15. package/dist/report-model/authoring-grammar.d.ts +2 -2
  16. package/dist/report-render/assets.d.ts +10 -0
  17. package/dist/report-render/assets.js +14 -0
  18. package/dist/report-render/design.js +256 -0
  19. package/dist/report-render/page.d.ts +75 -0
  20. package/dist/report-render/page.js +793 -1
  21. package/dist/report-render/provenance-data.d.ts +42 -0
  22. package/dist/report-render/provenance-data.js +62 -0
  23. package/dist/report-render/render.d.ts +20 -1
  24. package/dist/report-render/render.js +23 -10
  25. package/dist/report-render/types.d.ts +3 -0
  26. package/dist/report-render/views/chart-view.d.ts +5 -1
  27. package/dist/report-render/views/chart-view.js +6 -2
  28. package/dist/report-render/views/lineage.d.ts +93 -0
  29. package/dist/report-render/views/lineage.js +86 -0
  30. package/dist/report-render/views/page-view.d.ts +22 -1
  31. package/dist/report-render/views/page-view.js +12 -3
  32. package/dist/report-render/views/prose.d.ts +7 -1
  33. package/dist/report-render/views/prose.js +10 -6
  34. package/dist/report-render/views/references-view.d.ts +17 -1
  35. package/dist/report-render/views/references-view.js +12 -4
  36. package/dist/report-render/views/values.d.ts +17 -4
  37. package/dist/report-render/views/values.js +21 -8
  38. package/dist/runtime/assemble.d.ts +22 -0
  39. package/dist/runtime/assemble.js +4 -0
  40. package/dist/sandbox/k8s-client.d.ts +0 -5
  41. package/dist/sandbox/k8s-client.js +9 -115
  42. package/dist/schemas/artifact-manifest.d.ts +4 -4
  43. package/dist/tools/display/show-user.d.ts +1 -1
  44. package/dist/tools/report-authoring/authoring-tools.d.ts +16 -1
  45. package/dist/tools/report-authoring/authoring-tools.js +58 -16
  46. package/dist/tools/report-session/derive-table.d.ts +3 -0
  47. package/dist/tools/report-session/derive-table.js +15 -0
  48. package/dist/tools/report-session/preview-report.d.ts +13 -4
  49. package/dist/tools/report-session/preview-report.js +23 -6
  50. package/dist/tools/report-session/record-version.d.ts +3 -0
  51. package/dist/tools/report-session/record-version.js +7 -3
  52. package/dist/tools/start-report-session.d.ts +7 -0
  53. package/dist/tools/start-report-session.js +1 -0
  54. package/dist/workflows/execute-analysis.d.ts +15 -69
  55. package/dist/workflows/execute-analysis.js +5 -4
  56. package/package.json +2 -1
@@ -398,15 +398,15 @@ declare const AUTHORING_ATOM_SCHEMAS: readonly [z.ZodObject<{
398
398
  x: z.ZodOptional<z.ZodObject<{
399
399
  title: z.ZodOptional<z.ZodString>;
400
400
  scale: z.ZodOptional<z.ZodEnum<{
401
- log: "log";
402
401
  linear: "linear";
402
+ log: "log";
403
403
  }>>;
404
404
  }, z.core.$strict>>;
405
405
  y: z.ZodOptional<z.ZodObject<{
406
406
  title: z.ZodOptional<z.ZodString>;
407
407
  scale: z.ZodOptional<z.ZodEnum<{
408
- log: "log";
409
408
  linear: "linear";
409
+ log: "log";
410
410
  }>>;
411
411
  }, z.core.$strict>>;
412
412
  }, z.core.$strict>>;
@@ -66,6 +66,16 @@ export declare const ECHARTS_ASSET: PageAsset;
66
66
  * entries alone, thus this specifier resolves as a path under the installed package directory.
67
67
  */
68
68
  export declare const AG_GRID_ASSET: PageAsset;
69
+ /**
70
+ * The provenance library. The page-side popover reads the `tsprov` global that this file declares.
71
+ *
72
+ * The entry names the browser bundle of the package. The package `exports` map publishes the module entries
73
+ * alone, thus this specifier resolves as a path under the installed package directory.
74
+ *
75
+ * The harness imports no API of the library. It stages these bytes and nothing more, thus the walk of a
76
+ * chain belongs to the page and the renderer stays free of every provenance API.
77
+ */
78
+ export declare const TSPROV_ASSET: PageAsset;
69
79
  /** The sans font. The file is the latin subset of the variable font, thus one file carries each weight. */
70
80
  export declare const SANS_FONT_ASSET: PageAsset;
71
81
  /**
@@ -77,6 +77,19 @@ export const AG_GRID_ASSET = {
77
77
  file: `${DEPS_DIR}/ag-grid-community.min.js`,
78
78
  specifier: "ag-grid-community/dist/ag-grid-community.min.js",
79
79
  };
80
+ /**
81
+ * The provenance library. The page-side popover reads the `tsprov` global that this file declares.
82
+ *
83
+ * The entry names the browser bundle of the package. The package `exports` map publishes the module entries
84
+ * alone, thus this specifier resolves as a path under the installed package directory.
85
+ *
86
+ * The harness imports no API of the library. It stages these bytes and nothing more, thus the walk of a
87
+ * chain belongs to the page and the renderer stays free of every provenance API.
88
+ */
89
+ export const TSPROV_ASSET = {
90
+ file: `${DEPS_DIR}/tsprov.min.js`,
91
+ specifier: "@inflexa-ai/tsprov/dist/browser/tsprov.min.js",
92
+ };
80
93
  /** The sans font. The file is the latin subset of the variable font, thus one file carries each weight. */
81
94
  export const SANS_FONT_ASSET = {
82
95
  file: `${DEPS_DIR}/space-grotesk-latin-wght-normal.woff2`,
@@ -112,6 +125,7 @@ export const MONO_FONT_700_ASSET = {
112
125
  export const PAGE_ASSETS = [
113
126
  ECHARTS_ASSET,
114
127
  AG_GRID_ASSET,
128
+ TSPROV_ASSET,
115
129
  SANS_FONT_ASSET,
116
130
  MONO_FONT_400_ASSET,
117
131
  MONO_FONT_500_ASSET,
@@ -116,6 +116,7 @@ export const DESIGN_CSS = `${FONT_FACES}
116
116
 
117
117
  /* Semantic tags */
118
118
  --color-high-bg: #f0fdf4;
119
+ --color-high-border: #bbf7d0;
119
120
  --color-high-text: #15803d;
120
121
  --color-medium-bg: #fffbeb;
121
122
  --color-medium-text: #b45309;
@@ -378,6 +379,251 @@ img {
378
379
  text-decoration: underline;
379
380
  }
380
381
 
382
+ /* ── Lineage control and popover ──────────────────────── */
383
+ /* The control sits beside the bracket marker. It reads as a quiet branch glyph and never as a second
384
+ marker, thus it takes the muted color until a hover. The button carries no browser chrome, because a
385
+ chrome box inside a line of prose would break the line. */
386
+ .report-lineage {
387
+ display: inline-flex;
388
+ align-items: center;
389
+ margin-left: 2px;
390
+ padding: 0;
391
+ line-height: 0;
392
+ vertical-align: -2px;
393
+ color: var(--color-text-muted);
394
+ background: none;
395
+ border: 0;
396
+ cursor: pointer;
397
+ }
398
+ .report-lineage:hover {
399
+ color: var(--color-primary-500);
400
+ }
401
+ /* The drawing strokes in the current color, thus the two color rules above reach it and the sheet holds one
402
+ color for the two states. */
403
+ .report-lineage-glyph {
404
+ display: block;
405
+ }
406
+ /* The panel floats over the page. A data card clips its own overflow, thus the page script places the panel
407
+ against the document and no card cuts it. The panel takes the width of its longest row, thus a name reads
408
+ whole and a cut is the exception. The cap bounds it against the design and against the viewport, and the
409
+ viewport half holds the same margin at each side as the clamp of the script. Thus a narrow window shows
410
+ the panel between the two margins. */
411
+ .report-lineage-popover {
412
+ position: absolute;
413
+ z-index: 50;
414
+ width: max-content;
415
+ max-width: min(48rem, calc(100vw - 24px));
416
+ background: var(--color-card);
417
+ border: 1px solid var(--color-border);
418
+ box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
419
+ animation: report-lineage-open 0.12s ease-out;
420
+ }
421
+ .report-lineage-header {
422
+ display: flex;
423
+ align-items: center;
424
+ gap: 10px;
425
+ padding: 12px 16px;
426
+ border-bottom: 1px solid var(--color-border-subtle);
427
+ }
428
+ .report-lineage-title {
429
+ font-family: var(--font-mono);
430
+ font-size: 10px;
431
+ font-weight: 600;
432
+ letter-spacing: 0.08em;
433
+ text-transform: uppercase;
434
+ color: var(--color-text-muted);
435
+ }
436
+ /* The header names the marker that opened the panel and the depth of the chain under it. Thus the reader
437
+ reads the size of the chain before the body scrolls. */
438
+ .report-lineage-count {
439
+ font-family: var(--font-mono);
440
+ font-size: 11px;
441
+ color: var(--color-text-secondary);
442
+ }
443
+ .report-lineage-close {
444
+ margin-left: auto;
445
+ padding: 0;
446
+ font-family: var(--font-mono);
447
+ font-size: 14px;
448
+ line-height: 1;
449
+ color: var(--color-text-muted);
450
+ background: none;
451
+ border: 0;
452
+ cursor: pointer;
453
+ }
454
+ .report-lineage-close:hover {
455
+ color: var(--color-heading);
456
+ }
457
+ /* A deep pipeline builds more rows than a window holds. The cap reads against the viewport, thus the body
458
+ scrolls inside the panel and the panel never grows the page. */
459
+ .report-lineage-body {
460
+ max-height: 60vh;
461
+ overflow-y: auto;
462
+ padding: 16px 16px 8px;
463
+ }
464
+ /* One base row carries each file of the rail. A modifier marks the pinned artifact and a raw input, and a
465
+ row with no modifier is an artifact that the rail continues past. */
466
+ .report-lineage-row {
467
+ display: flex;
468
+ align-items: center;
469
+ gap: 8px;
470
+ padding: 6px 10px;
471
+ background: var(--color-bg-alt);
472
+ border: 1px solid var(--color-border-subtle);
473
+ }
474
+ .report-lineage-row + .report-lineage-row {
475
+ margin-top: 4px;
476
+ }
477
+ .report-lineage-row-pin {
478
+ padding: 8px 10px;
479
+ background: var(--color-primary-50);
480
+ border-color: var(--color-primary-100);
481
+ }
482
+ .report-lineage-row-producer {
483
+ padding: 8px 10px;
484
+ background: var(--color-card);
485
+ border-color: var(--color-border);
486
+ }
487
+ /* The terminal tint marks a file that no command of this analysis made. It is where a branch ends, thus the
488
+ tint and the tag of the row state the same fact. */
489
+ .report-lineage-row-raw {
490
+ background: var(--color-high-bg);
491
+ border-color: var(--color-high-border);
492
+ }
493
+ .report-lineage-tag {
494
+ flex-shrink: 0;
495
+ padding: 2px 6px;
496
+ font-family: var(--font-mono);
497
+ font-size: 9px;
498
+ letter-spacing: 0.06em;
499
+ color: var(--color-text-secondary);
500
+ background: var(--color-border);
501
+ }
502
+ .report-lineage-tag-pin {
503
+ font-weight: 600;
504
+ color: var(--color-card);
505
+ background: var(--color-primary-500);
506
+ }
507
+ .report-lineage-tag-raw {
508
+ font-weight: 600;
509
+ color: var(--color-card);
510
+ background: var(--color-high-text);
511
+ }
512
+ /* The path takes the whole free width of the row, and it never wraps the row into two lines. The panel grows
513
+ to the longest path, thus a window that gives the panel its cap needs no cut. In a narrow window the page
514
+ script cuts a long path at its start, and it cuts an over-long file name in the middle of that name. Thus
515
+ the ellipsis of this rule is the last guard, for a row too narrow to hold even a cut name. */
516
+ .report-lineage-path {
517
+ flex: 1;
518
+ overflow: hidden;
519
+ font-family: var(--font-mono);
520
+ font-size: 12px;
521
+ color: var(--color-text);
522
+ text-overflow: ellipsis;
523
+ white-space: nowrap;
524
+ }
525
+ .report-lineage-row-pin .report-lineage-path,
526
+ .report-lineage-row-raw .report-lineage-path {
527
+ color: var(--color-text-strong);
528
+ }
529
+ /* The directory prefix dims, thus the file name reads first inside a long path. */
530
+ .report-lineage-dir {
531
+ color: var(--color-text-muted);
532
+ }
533
+ .report-lineage-hash {
534
+ flex-shrink: 0;
535
+ margin-left: auto;
536
+ font-family: var(--font-mono);
537
+ font-size: 10px;
538
+ color: var(--color-text-muted);
539
+ }
540
+ .report-lineage-prompt {
541
+ flex-shrink: 0;
542
+ color: var(--color-text-secondary);
543
+ }
544
+ .report-lineage-script {
545
+ overflow: hidden;
546
+ font-family: var(--font-mono);
547
+ font-size: 12px;
548
+ color: var(--color-text-strong);
549
+ text-overflow: ellipsis;
550
+ white-space: nowrap;
551
+ }
552
+ .report-lineage-meta {
553
+ flex-shrink: 0;
554
+ margin-left: auto;
555
+ font-family: var(--font-mono);
556
+ font-size: 10px;
557
+ color: var(--color-text-muted);
558
+ }
559
+ /* The connector sits between two levels of the rail. The page script gives it the indent of its level, thus
560
+ one rule serves each depth. */
561
+ .report-lineage-link {
562
+ display: flex;
563
+ gap: 10px;
564
+ padding: 2px 0;
565
+ }
566
+ .report-lineage-rail {
567
+ width: 1px;
568
+ background: var(--color-border);
569
+ }
570
+ .report-lineage-rail-pin {
571
+ background: var(--color-primary-100);
572
+ }
573
+ .report-lineage-link-label {
574
+ padding: 6px 0;
575
+ font-family: var(--font-mono);
576
+ font-size: 9px;
577
+ letter-spacing: 0.08em;
578
+ color: var(--color-text-muted);
579
+ }
580
+ /* The dashed edge marks a row that names files and shows none of them. Thus a count row never reads as one
581
+ more hop of the chain. */
582
+ .report-lineage-more {
583
+ margin-top: 4px;
584
+ padding: 5px 10px;
585
+ font-family: var(--font-mono);
586
+ font-size: 11px;
587
+ color: var(--color-text-muted);
588
+ /* One line always: a wrapped count row breaks the rail rhythm in a narrow
589
+ window, and a cut count loses nothing that the rows above do not show. */
590
+ white-space: nowrap;
591
+ overflow: hidden;
592
+ text-overflow: ellipsis;
593
+ border: 1px dashed var(--color-border);
594
+ }
595
+ .report-lineage-footer {
596
+ display: flex;
597
+ align-items: center;
598
+ gap: 8px;
599
+ padding: 10px 16px;
600
+ background: var(--color-bg-alt);
601
+ border-top: 1px solid var(--color-border-subtle);
602
+ }
603
+ .report-lineage-check {
604
+ flex-shrink: 0;
605
+ color: var(--color-high-text);
606
+ }
607
+ /* The footer states that the chain is complete, or it states the absence or the truncation that stopped it.
608
+ A reader must read the rail against what it does not hold, thus the note sits under the rail and never
609
+ beside one row of it. */
610
+ .report-lineage-note {
611
+ font-family: var(--font-mono);
612
+ font-size: 10px;
613
+ line-height: 1.5;
614
+ color: var(--color-text-secondary);
615
+ }
616
+ @keyframes report-lineage-open {
617
+ from {
618
+ opacity: 0;
619
+ transform: translateY(-4px);
620
+ }
621
+ to {
622
+ opacity: 1;
623
+ transform: translateY(0);
624
+ }
625
+ }
626
+
381
627
  /* ── Corner-accent card ───────────────────────────────── */
382
628
  /* The data cards keep square corners. The L-shaped accents grow on hover. */
383
629
  .corner-accents {
@@ -789,6 +1035,10 @@ a.report-citation-source:hover {
789
1035
  opacity: 1;
790
1036
  transform: none;
791
1037
  }
1038
+ /* The panel stands at once, thus the open costs no motion. */
1039
+ .report-lineage-popover {
1040
+ animation: none;
1041
+ }
792
1042
  }
793
1043
 
794
1044
  /* ── Print ────────────────────────────────────────────── */
@@ -796,6 +1046,12 @@ a.report-citation-source:hover {
796
1046
  .report-nav {
797
1047
  display: none;
798
1048
  }
1049
+ /* The control opens a panel, and paper opens nothing. The appendix carries the same references, thus the
1050
+ printed page loses no evidence. */
1051
+ .report-lineage,
1052
+ .report-lineage-popover {
1053
+ display: none;
1054
+ }
799
1055
  /* The printer gives the page margin. Thus the screen padding of the container drops out. */
800
1056
  body:has(#report-sidebar) {
801
1057
  padding-left: 0;
@@ -22,6 +22,14 @@ export declare const ASSET_HEAD: string;
22
22
  * whole directory.
23
23
  */
24
24
  export declare const GRID_ASSET_HEAD: string;
25
+ /**
26
+ * The head reference of the provenance library.
27
+ *
28
+ * The library walks the chain of one pin, and a page with no provenance document holds no pin to walk.
29
+ * Thus the skeleton writes this tag only for a page that carries the document, and the manifest still
30
+ * stages the file for the whole directory.
31
+ */
32
+ export declare const LINEAGE_ASSET_HEAD: string;
25
33
  /**
26
34
  * The name of the readiness event, and the name of the window sentinel that guards a late listener. The
27
35
  * bootstrap below emits both names, thus this module owns them. A capture that waits for the page reads the
@@ -181,3 +189,70 @@ export declare const TABLE_CELL_FORMATTER = "function formatCell(cell, kind, bou
181
189
  * it must never stop a sibling grid and it must never throw out of the page.
182
190
  */
183
191
  export declare const GRID_BOOTSTRAP: string;
192
+ /**
193
+ * The name of the provenance library on the page.
194
+ *
195
+ * The browser bundle of the package declares this one global, and the page and the library meet there and
196
+ * nowhere else. The renderer imports no API of the library, thus the two ship apart.
197
+ *
198
+ * A page whose staged libraries were stripped registers no such global. That absence is a normal
199
+ * condition: the popover still opens, and it shows the pin as the last hop under an explicit note.
200
+ */
201
+ export declare const TSPROV_GLOBAL = "tsprov";
202
+ /** The note of a page that carries no lineage library. The chain then stops at the pin of the block. */
203
+ export declare const LINEAGE_NO_LIBRARY_NOTE = "The lineage library is not on this page. Thus the chain stops at this pin.";
204
+ /** The note of a library call that gave no answer. The pin stays the last hop that the page knows. */
205
+ export declare const LINEAGE_NO_ANSWER_NOTE = "The lineage library gave no answer for this pin. Thus the chain stops here.";
206
+ /** The note of a pin that the document holds no node for. */
207
+ export declare const LINEAGE_NO_NODE_NOTE = "The document holds no node for this pin. Thus the chain stops here.";
208
+ /** The note of a chain that the library cut at its own depth bound. */
209
+ export declare const LINEAGE_TRUNCATED_NOTE = "The library cut this chain at its depth bound. Thus the chain continues past the last hop.";
210
+ /** The note of an external record. A paper is no artifact, thus no data chain reaches it. */
211
+ export declare const LINEAGE_RECORD_NOTE = "An external record has no data chain. Thus this reference ends at the record.";
212
+ /**
213
+ * The footer note of a chain that reached the raw data.
214
+ *
215
+ * The signed form states the attestation, and the page carries one only where the source held one. Thus
216
+ * the footer never claims a signature that the page does not hold.
217
+ */
218
+ export declare const LINEAGE_COMPLETE_NOTE = "The chain is complete \u00B7 each hop is content-addressed";
219
+ export declare const LINEAGE_SIGNED_NOTE = "The chain is complete \u00B7 each hop is content-addressed \u00B7 an attestation covers it";
220
+ /**
221
+ * The page-side script of the lineage popover.
222
+ *
223
+ * A grounded block stamps its block id and its keys. A control beside a marker names the place of its key
224
+ * in that stamp. Thus the script reads the markup for everything that it shows, and it holds no copy of the
225
+ * document model.
226
+ *
227
+ * One delegated listener serves the whole page. It opens the panel of the clicked control, it closes the
228
+ * open panel when a second control opens its own, and it closes on a click outside the panel and on the
229
+ * `Escape` key. As a result at most one panel stands at one time, and the page needs no listener for each
230
+ * control.
231
+ *
232
+ * The panel is a child of the body, positioned against the document. A card clips its own overflow, thus a
233
+ * panel inside a card would show as a strip. The position reads the box of the control, and it holds the
234
+ * panel inside the viewport on each side. The panel opens under the control, and it opens over the control
235
+ * where the space under it is short. It never covers the control that opened it: where neither side holds
236
+ * the whole panel, the body shrinks instead. A resize invalidates the measure, thus a resize places the
237
+ * open panel again.
238
+ *
239
+ * The rail comes from the edges of the walk and never from its node set. A `generated` edge binds an
240
+ * artifact to the command that made it, and a `used` edge binds that command to a file that it read. Each
241
+ * input file continues the rail with its own producer, down to a file that no command made. Thus the panel
242
+ * shows the chain and it shows nothing else: a sibling output collapses behind one count row, and a step,
243
+ * a run, and an agent never become a row.
244
+ *
245
+ * The panel takes the width of its longest row, up to the cap of the sheet. Thus a normal window shows each
246
+ * name whole, and the cut answers a window too narrow for the row. The fit measures against the width of the
247
+ * laid-out panel, which the open pins before the first cut. Without the pin a cut would shrink the panel and
248
+ * the next measure would read a narrower box, thus the rows would cut each other down.
249
+ *
250
+ * The hover of a row gives the whole path, and it answers for the run prefix and for a cut alike.
251
+ *
252
+ * The script builds each node and it writes each string as text. Thus a hostile path, a hostile command,
253
+ * and a hostile step of the document reach the panel as text and never as markup.
254
+ *
255
+ * The page makes no request. The document rides the page already, and the library reads it in memory. The
256
+ * graph builds one time, on the first click, thus a reader who opens no panel pays nothing for the parse.
257
+ */
258
+ export declare const LINEAGE_POPOVER: string;