@flanksource/clicky-ui 0.3.83 → 0.3.84

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 (137) hide show
  1. package/dist/components/DateField.cjs.map +1 -1
  2. package/dist/components/DateField.d.ts +3 -2
  3. package/dist/components/DateField.d.ts.map +1 -1
  4. package/dist/components/DateField.js.map +1 -1
  5. package/dist/components/DatePicker.cjs +9 -61
  6. package/dist/components/DatePicker.cjs.map +1 -1
  7. package/dist/components/DatePicker.d.ts +5 -19
  8. package/dist/components/DatePicker.d.ts.map +1 -1
  9. package/dist/components/DatePicker.js +11 -63
  10. package/dist/components/DatePicker.js.map +1 -1
  11. package/dist/components/DateTimePicker.cjs +9 -78
  12. package/dist/components/DateTimePicker.cjs.map +1 -1
  13. package/dist/components/DateTimePicker.d.ts +5 -19
  14. package/dist/components/DateTimePicker.d.ts.map +1 -1
  15. package/dist/components/DateTimePicker.js +11 -80
  16. package/dist/components/DateTimePicker.js.map +1 -1
  17. package/dist/components/calendar-grid.cjs +83 -0
  18. package/dist/components/calendar-grid.cjs.map +1 -0
  19. package/dist/components/calendar-grid.d.ts +9 -0
  20. package/dist/components/calendar-grid.d.ts.map +1 -0
  21. package/dist/components/calendar-grid.js +83 -0
  22. package/dist/components/calendar-grid.js.map +1 -0
  23. package/dist/components/date-input-field.cjs +88 -0
  24. package/dist/components/date-input-field.cjs.map +1 -0
  25. package/dist/components/date-input-field.d.ts +37 -0
  26. package/dist/components/date-input-field.d.ts.map +1 -0
  27. package/dist/components/date-input-field.js +88 -0
  28. package/dist/components/date-input-field.js.map +1 -0
  29. package/dist/components/date-math.cjs +67 -0
  30. package/dist/components/date-math.cjs.map +1 -0
  31. package/dist/components/date-math.d.ts +33 -0
  32. package/dist/components/date-math.d.ts.map +1 -0
  33. package/dist/components/date-math.js +60 -0
  34. package/dist/components/date-math.js.map +1 -0
  35. package/dist/components/date-picker-menu.cjs +129 -0
  36. package/dist/components/date-picker-menu.cjs.map +1 -0
  37. package/dist/components/date-picker-menu.d.ts +18 -0
  38. package/dist/components/date-picker-menu.d.ts.map +1 -0
  39. package/dist/components/date-picker-menu.js +129 -0
  40. package/dist/components/date-picker-menu.js.map +1 -0
  41. package/dist/components/json-schema-form-date-math.cjs +15 -11
  42. package/dist/components/json-schema-form-date-math.cjs.map +1 -1
  43. package/dist/components/json-schema-form-date-math.d.ts +3 -0
  44. package/dist/components/json-schema-form-date-math.d.ts.map +1 -1
  45. package/dist/components/json-schema-form-date-math.js +15 -12
  46. package/dist/components/json-schema-form-date-math.js.map +1 -1
  47. package/dist/components.d.ts +1 -0
  48. package/dist/components.d.ts.map +1 -1
  49. package/dist/data/PromptDialog.cjs +19 -5
  50. package/dist/data/PromptDialog.cjs.map +1 -1
  51. package/dist/data/PromptDialog.d.ts +15 -1
  52. package/dist/data/PromptDialog.d.ts.map +1 -1
  53. package/dist/data/PromptDialog.js +19 -5
  54. package/dist/data/PromptDialog.js.map +1 -1
  55. package/dist/data/PromptIndicator.cjs +3 -2
  56. package/dist/data/PromptIndicator.cjs.map +1 -1
  57. package/dist/data/PromptIndicator.d.ts +4 -1
  58. package/dist/data/PromptIndicator.d.ts.map +1 -1
  59. package/dist/data/PromptIndicator.js +3 -2
  60. package/dist/data/PromptIndicator.js.map +1 -1
  61. package/dist/data/diagnostics/ErrorDetails.cjs +155 -110
  62. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  63. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  64. package/dist/data/diagnostics/ErrorDetails.js +155 -110
  65. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  66. package/dist/data/test-runner/TestDetailPanel.cjs +109 -46
  67. package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
  68. package/dist/data/test-runner/TestDetailPanel.d.ts.map +1 -1
  69. package/dist/data/test-runner/TestDetailPanel.js +110 -47
  70. package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
  71. package/dist/data/test-runner/TestTreeNode.cjs +84 -63
  72. package/dist/data/test-runner/TestTreeNode.cjs.map +1 -1
  73. package/dist/data/test-runner/TestTreeNode.d.ts.map +1 -1
  74. package/dist/data/test-runner/TestTreeNode.js +84 -63
  75. package/dist/data/test-runner/TestTreeNode.js.map +1 -1
  76. package/dist/data/test-runner/adapter.cjs.map +1 -1
  77. package/dist/data/test-runner/adapter.d.ts +2 -2
  78. package/dist/data/test-runner/adapter.d.ts.map +1 -1
  79. package/dist/data/test-runner/adapter.js.map +1 -1
  80. package/dist/data/test-runner/copy.cjs +62 -10
  81. package/dist/data/test-runner/copy.cjs.map +1 -1
  82. package/dist/data/test-runner/copy.d.ts +52 -9
  83. package/dist/data/test-runner/copy.d.ts.map +1 -1
  84. package/dist/data/test-runner/copy.js +60 -11
  85. package/dist/data/test-runner/copy.js.map +1 -1
  86. package/dist/data/test-runner/index.d.ts +1 -1
  87. package/dist/data/test-runner/index.d.ts.map +1 -1
  88. package/dist/data/verification/StepFilesView.cjs +90 -0
  89. package/dist/data/verification/StepFilesView.cjs.map +1 -0
  90. package/dist/data/verification/StepFilesView.d.ts +9 -0
  91. package/dist/data/verification/StepFilesView.d.ts.map +1 -0
  92. package/dist/data/verification/StepFilesView.js +90 -0
  93. package/dist/data/verification/StepFilesView.js.map +1 -0
  94. package/dist/data/verification/adapterViews.cjs +129 -69
  95. package/dist/data/verification/adapterViews.cjs.map +1 -1
  96. package/dist/data/verification/adapterViews.d.ts +3 -1
  97. package/dist/data/verification/adapterViews.d.ts.map +1 -1
  98. package/dist/data/verification/adapterViews.js +130 -70
  99. package/dist/data/verification/adapterViews.js.map +1 -1
  100. package/dist/data/verification/adapters.cjs +9 -0
  101. package/dist/data/verification/adapters.cjs.map +1 -1
  102. package/dist/data/verification/adapters.d.ts +2 -0
  103. package/dist/data/verification/adapters.d.ts.map +1 -1
  104. package/dist/data/verification/adapters.js +11 -2
  105. package/dist/data/verification/adapters.js.map +1 -1
  106. package/dist/data/verification/index.d.ts +2 -1
  107. package/dist/data/verification/index.d.ts.map +1 -1
  108. package/dist/data/verification/stepKind.cjs +63 -7
  109. package/dist/data/verification/stepKind.cjs.map +1 -1
  110. package/dist/data/verification/stepKind.d.ts +55 -6
  111. package/dist/data/verification/stepKind.d.ts.map +1 -1
  112. package/dist/data/verification/stepKind.js +62 -8
  113. package/dist/data/verification/stepKind.js.map +1 -1
  114. package/dist/data/verification/stepKindViews.cjs +318 -106
  115. package/dist/data/verification/stepKindViews.cjs.map +1 -1
  116. package/dist/data/verification/stepKindViews.d.ts +17 -6
  117. package/dist/data/verification/stepKindViews.d.ts.map +1 -1
  118. package/dist/data/verification/stepKindViews.js +319 -108
  119. package/dist/data/verification/stepKindViews.js.map +1 -1
  120. package/dist/data/version-info.cjs +3 -3
  121. package/dist/data/version-info.js +3 -3
  122. package/dist/data.cjs +4 -0
  123. package/dist/data.d.ts +1 -1
  124. package/dist/data.d.ts.map +1 -1
  125. package/dist/data.js +3 -2
  126. package/dist/hooks/use-prompts.cjs +52 -30
  127. package/dist/hooks/use-prompts.cjs.map +1 -1
  128. package/dist/hooks/use-prompts.d.ts +6 -0
  129. package/dist/hooks/use-prompts.d.ts.map +1 -1
  130. package/dist/hooks/use-prompts.js +52 -30
  131. package/dist/hooks/use-prompts.js.map +1 -1
  132. package/dist/index.cjs +5 -1
  133. package/dist/index.js +4 -3
  134. package/dist/runtime/barrels.json +5874 -5867
  135. package/dist/runtime/importmap.json +2175 -2170
  136. package/dist/styles.css +1 -1
  137. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Test } from './types.js';
3
3
  import { TestRunnerContext } from './context.js';
4
- import { CopySections } from './copy.js';
4
+ import { CopySections, MergedCopySections } from './copy.js';
5
5
  export type AdapterContext = {
6
6
  node: Test;
7
7
  runner: TestRunnerContext;
@@ -99,7 +99,7 @@ export declare class TestNodeAdapterRegistry {
99
99
  * Merge `copy` sections from every matching adapter, de-duplicated by fact
100
100
  * label, section title and item label — the first contributor wins.
101
101
  */
102
- resolveCopy(node: Test, runner: TestRunnerContext): Required<CopySections>;
102
+ resolveCopy(node: Test, runner: TestRunnerContext): MergedCopySections;
103
103
  /** True when the resolved detail adapter owns its own scroll region. */
104
104
  ownsScroll(node: Test, runner: TestRunnerContext): boolean;
105
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/data/test-runner/adapter.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG9D,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,SAAS,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG;IAC5B,gEAAgE;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC;IAC1D;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,EAAE,GAAG,SAAS,CAAC;IACzD;;;;OAIG;IACH,mBAAmB,CAAC,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,MAAM,EAAE,iBAAiB,GAAG,SAAS,EAAE;IAe/D;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,kBAAkB;IAOtE,wEAAwE;IACxE,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO;CAK3D;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,GAAE,eAAe,EAAO,GAC/B,uBAAuB,CAEzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.js","names":[],"sources":["../../../src/data/test-runner/adapter.ts"],"sourcesContent":["// Node adapters let a host plug domain-specific rendering into the test runner\n// without forking it. An adapter claims nodes via `match` and contributes how\n// they render in each surface (tree row, detail body, detail tabs, header\n// actions). The registry resolves the first matching adapter per surface;\n// surfaces with no match fall back to the runner's built-in default rendering.\n//\n// This formalizes the wrapper-with-an-if-chain pattern hosts use today (e.g.\n// a ResultDetailPane fall-through over domain panels + tab providers + per-step\n// actions) into a registered, composable contract.\n\nimport type { ReactNode } from \"react\";\nimport type { Test } from \"./types\";\nimport type { TestRunnerContext } from \"./context\";\nimport { mergeCopySections, type CopySections } from \"./copy\";\nimport { testAttemptViews } from \"./attempts\";\n\nexport type AdapterContext = {\n node: Test;\n runner: TestRunnerContext;\n};\n\nexport type DetailTab = {\n id: string;\n label: string;\n render: () => ReactNode;\n};\n\nexport type DetailAttempt = { id: number; status: string; durationMs?: number; node: Test };\n\nexport type TestNodeAdapter = {\n /** Stable identifier, used as a React key and for debugging. */\n id: string;\n /** Claim the node. The first registered adapter to return true wins per surface. */\n match: (node: Test, runner: TestRunnerContext) => boolean;\n /**\n * Children shown in the navigation tree; results and status rollups stay intact.\n * Return [] to render a node as a leaf. Without a matching hook, uses node.children.\n * @example { id: \"setup-leaf\", match: node => node.name === \"setup\", treeChildren: () => [] }\n */\n treeChildren?: (c: AdapterContext) => Test[] | undefined;\n /**\n * Replace the framework icon for the node — return any node, or null to fall\n * back to the built-in tool mark (`TEST_TOOLS`). For a tool the catalog\n * lacks, prefer adding it to `TEST_TOOLS` so every surface shows it.\n */\n renderFrameworkIcon?: (c: AdapterContext) => ReactNode;\n /** Extra decoration rendered between the framework icon and the node name. */\n renderRowLeading?: (c: AdapterContext) => ReactNode;\n /**\n * The tree row's text in place of the humanized node name, e.g. a step name\n * without the kind prefix a `renderRowLeading` icon already shows. Return\n * undefined to keep the default. The node's name is unchanged everywhere else.\n */\n rowLabel?: (c: AdapterContext) => string | undefined;\n /**\n * Extra content inside the detail header's framework badge, after the\n * framework name (e.g. how the node ran). Return null to show the name alone.\n */\n frameworkBadge?: (c: AdapterContext) => ReactNode;\n /** Primary detail body for the node, replacing the default panel body. */\n renderDetail?: (c: AdapterContext) => ReactNode;\n /** Extra detail tabs, merged (in registration order) across all matching adapters. */\n detailTabs?: (c: AdapterContext) => DetailTab[];\n /** Stored attempt views for the header chooser; tree and run totals remain step-level. */\n detailAttempts?: (c: AdapterContext) => DetailAttempt[];\n /** Node-scoped action buttons rendered in the detail header. */\n nodeActions?: (c: AdapterContext) => ReactNode;\n /**\n * Domain facts, brief sections and menu items for the header's \"Copy details\"\n * button, merged (in registration order) across all matching adapters on top\n * of the generic sections every node gets.\n */\n copy?: (c: AdapterContext) => CopySections;\n /**\n * Whether `renderDetail` owns its own full-height scroll container. When\n * false (the default for custom bodies), the panel wraps it in a scroll\n * region. The built-in default body owns its scroll.\n */\n ownsScroll?: (c: AdapterContext) => boolean;\n};\n\n/**\n * Ordered set of node adapters. First match wins per surface; `detailTabs` and\n * `copy` are the exceptions — they merge across every matching adapter so\n * independent adapters can each contribute a tab or a copy section.\n */\nexport class TestNodeAdapterRegistry {\n readonly adapters: TestNodeAdapter[];\n\n constructor(adapters: TestNodeAdapter[] = []) {\n this.adapters = adapters;\n }\n\n private firstWith(\n node: Test,\n runner: TestRunnerContext,\n has: (a: TestNodeAdapter) => boolean,\n ): TestNodeAdapter | null {\n for (const a of this.adapters) {\n if (has(a) && a.match(node, runner)) return a;\n }\n return null;\n }\n\n /** Adapter whose `renderDetail` should drive the body, or null for the default. */\n resolveDetail(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderDetail);\n }\n\n resolveRowLeading(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderRowLeading);\n }\n\n /** The first matching adapter's `rowLabel`, or undefined for the default name. */\n resolveRowLabel(node: Test, runner: TestRunnerContext): string | undefined {\n return this.firstWith(node, runner, (a) => !!a.rowLabel)?.rowLabel?.({ node, runner });\n }\n\n /** The first matching adapter's `frameworkBadge` content, or null for the name alone. */\n resolveFrameworkBadge(node: Test, runner: TestRunnerContext): ReactNode {\n return this.firstWith(node, runner, (a) => !!a.frameworkBadge)?.frameworkBadge?.({ node, runner }) ?? null;\n }\n\n resolveFrameworkIcon(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderFrameworkIcon);\n }\n\n resolveActions(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.nodeActions);\n }\n\n resolveTreeChildren(node: Test, runner: TestRunnerContext): Test[] | undefined {\n const adapter = this.firstWith(node, runner, (a) => !!a.treeChildren);\n return adapter?.treeChildren ? adapter.treeChildren({ node, runner }) : node.children;\n }\n\n /**\n * Attempts for the header chooser: the first matching adapter's\n * `detailAttempts`, else the node's own `attempts` (the built-in default,\n * which always sits behind the registered adapters).\n */\n resolveAttempts(node: Test, runner: TestRunnerContext): DetailAttempt[] {\n const adapted = this.firstWith(node, runner, (a) => !!a.detailAttempts)?.detailAttempts?.({ node, runner });\n if (adapted && adapted.length > 0) return adapted;\n return testAttemptViews(node);\n }\n\n /** Merge `detailTabs` from every matching adapter, de-duplicated by tab id. */\n resolveTabs(node: Test, runner: TestRunnerContext): DetailTab[] {\n const ctx: AdapterContext = { node, runner };\n const seen = new Set<string>();\n const tabs: DetailTab[] = [];\n for (const a of this.adapters) {\n if (!a.detailTabs || !a.match(node, runner)) continue;\n for (const tab of a.detailTabs(ctx)) {\n if (seen.has(tab.id)) continue;\n seen.add(tab.id);\n tabs.push(tab);\n }\n }\n return tabs;\n }\n\n /**\n * Merge `copy` sections from every matching adapter, de-duplicated by fact\n * label, section title and item label — the first contributor wins.\n */\n resolveCopy(node: Test, runner: TestRunnerContext): Required<CopySections> {\n const ctx: AdapterContext = { node, runner };\n return mergeCopySections(\n this.adapters.flatMap((a) => (a.copy && a.match(node, runner) ? [a.copy(ctx)] : [])),\n );\n }\n\n /** True when the resolved detail adapter owns its own scroll region. */\n ownsScroll(node: Test, runner: TestRunnerContext): boolean {\n const a = this.resolveDetail(node, runner);\n if (!a?.ownsScroll) return false;\n return a.ownsScroll({ node, runner });\n }\n}\n\nexport function createTestRunnerRegistry(\n adapters: TestNodeAdapter[] = [],\n): TestNodeAdapterRegistry {\n return new TestNodeAdapterRegistry(adapters);\n}\n"],"mappings":";;;;;;;;AAsFA,IAAa,0BAAb,MAAqC;CACnC;CAEA,YAAY,WAA8B,CAAC,GAAG;EAC5C,KAAK,WAAW;CAClB;CAEA,UACE,MACA,QACA,KACwB;EACxB,KAAK,MAAM,KAAK,KAAK,UACnB,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,MAAM,MAAM,GAAG,OAAO;EAE9C,OAAO;CACT;;CAGA,cAAc,MAAY,QAAmD;EAC3E,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,YAAY;CAC7D;CAEA,kBAAkB,MAAY,QAAmD;EAC/E,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,gBAAgB;CACjE;;CAGA,gBAAgB,MAAY,QAA+C;EACzE,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,WAAW;GAAE;GAAM;EAAO,CAAC;CACvF;;CAGA,sBAAsB,MAAY,QA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SAAS,SAAS,MAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,MAAM,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,CAAE,CACrF;CACF;;CAGA,WAAW,MAAY,QAAoC;EACzD,MAAM,IAAI,KAAK,cAAc,MAAM,MAAM;EACzC,IAAI,CAAC,GAAG,YAAY,OAAO;EAC3B,OAAO,EAAE,WAAW;GAAE;GAAM;EAAO,CAAC;CACtC;AACF;AAEA,SAAgB,yBACd,WAA8B,CAAC,GACN;CACzB,OAAO,IAAI,wBAAwB,QAAQ;AAC7C"}
1
+ {"version":3,"file":"adapter.js","names":[],"sources":["../../../src/data/test-runner/adapter.ts"],"sourcesContent":["// Node adapters let a host plug domain-specific rendering into the test runner\n// without forking it. An adapter claims nodes via `match` and contributes how\n// they render in each surface (tree row, detail body, detail tabs, header\n// actions). The registry resolves the first matching adapter per surface;\n// surfaces with no match fall back to the runner's built-in default rendering.\n//\n// This formalizes the wrapper-with-an-if-chain pattern hosts use today (e.g.\n// a ResultDetailPane fall-through over domain panels + tab providers + per-step\n// actions) into a registered, composable contract.\n\nimport type { ReactNode } from \"react\";\nimport type { Test } from \"./types\";\nimport type { TestRunnerContext } from \"./context\";\nimport { mergeCopySections, type CopySections, type MergedCopySections } from \"./copy\";\nimport { testAttemptViews } from \"./attempts\";\n\nexport type AdapterContext = {\n node: Test;\n runner: TestRunnerContext;\n};\n\nexport type DetailTab = {\n id: string;\n label: string;\n render: () => ReactNode;\n};\n\nexport type DetailAttempt = { id: number; status: string; durationMs?: number; node: Test };\n\nexport type TestNodeAdapter = {\n /** Stable identifier, used as a React key and for debugging. */\n id: string;\n /** Claim the node. The first registered adapter to return true wins per surface. */\n match: (node: Test, runner: TestRunnerContext) => boolean;\n /**\n * Children shown in the navigation tree; results and status rollups stay intact.\n * Return [] to render a node as a leaf. Without a matching hook, uses node.children.\n * @example { id: \"setup-leaf\", match: node => node.name === \"setup\", treeChildren: () => [] }\n */\n treeChildren?: (c: AdapterContext) => Test[] | undefined;\n /**\n * Replace the framework icon for the node — return any node, or null to fall\n * back to the built-in tool mark (`TEST_TOOLS`). For a tool the catalog\n * lacks, prefer adding it to `TEST_TOOLS` so every surface shows it.\n */\n renderFrameworkIcon?: (c: AdapterContext) => ReactNode;\n /** Extra decoration rendered between the framework icon and the node name. */\n renderRowLeading?: (c: AdapterContext) => ReactNode;\n /**\n * The tree row's text in place of the humanized node name, e.g. a step name\n * without the kind prefix a `renderRowLeading` icon already shows. Return\n * undefined to keep the default. The node's name is unchanged everywhere else.\n */\n rowLabel?: (c: AdapterContext) => string | undefined;\n /**\n * Extra content inside the detail header's framework badge, after the\n * framework name (e.g. how the node ran). Return null to show the name alone.\n */\n frameworkBadge?: (c: AdapterContext) => ReactNode;\n /** Primary detail body for the node, replacing the default panel body. */\n renderDetail?: (c: AdapterContext) => ReactNode;\n /** Extra detail tabs, merged (in registration order) across all matching adapters. */\n detailTabs?: (c: AdapterContext) => DetailTab[];\n /** Stored attempt views for the header chooser; tree and run totals remain step-level. */\n detailAttempts?: (c: AdapterContext) => DetailAttempt[];\n /** Node-scoped action buttons rendered in the detail header. */\n nodeActions?: (c: AdapterContext) => ReactNode;\n /**\n * Domain facts, brief sections and menu items for the header's \"Copy details\"\n * button, merged (in registration order) across all matching adapters on top\n * of the generic sections every node gets.\n */\n copy?: (c: AdapterContext) => CopySections;\n /**\n * Whether `renderDetail` owns its own full-height scroll container. When\n * false (the default for custom bodies), the panel wraps it in a scroll\n * region. The built-in default body owns its scroll.\n */\n ownsScroll?: (c: AdapterContext) => boolean;\n};\n\n/**\n * Ordered set of node adapters. First match wins per surface; `detailTabs` and\n * `copy` are the exceptions — they merge across every matching adapter so\n * independent adapters can each contribute a tab or a copy section.\n */\nexport class TestNodeAdapterRegistry {\n readonly adapters: TestNodeAdapter[];\n\n constructor(adapters: TestNodeAdapter[] = []) {\n this.adapters = adapters;\n }\n\n private firstWith(\n node: Test,\n runner: TestRunnerContext,\n has: (a: TestNodeAdapter) => boolean,\n ): TestNodeAdapter | null {\n for (const a of this.adapters) {\n if (has(a) && a.match(node, runner)) return a;\n }\n return null;\n }\n\n /** Adapter whose `renderDetail` should drive the body, or null for the default. */\n resolveDetail(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderDetail);\n }\n\n resolveRowLeading(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderRowLeading);\n }\n\n /** The first matching adapter's `rowLabel`, or undefined for the default name. */\n resolveRowLabel(node: Test, runner: TestRunnerContext): string | undefined {\n return this.firstWith(node, runner, (a) => !!a.rowLabel)?.rowLabel?.({ node, runner });\n }\n\n /** The first matching adapter's `frameworkBadge` content, or null for the name alone. */\n resolveFrameworkBadge(node: Test, runner: TestRunnerContext): ReactNode {\n return this.firstWith(node, runner, (a) => !!a.frameworkBadge)?.frameworkBadge?.({ node, runner }) ?? null;\n }\n\n resolveFrameworkIcon(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.renderFrameworkIcon);\n }\n\n resolveActions(node: Test, runner: TestRunnerContext): TestNodeAdapter | null {\n return this.firstWith(node, runner, (a) => !!a.nodeActions);\n }\n\n resolveTreeChildren(node: Test, runner: TestRunnerContext): Test[] | undefined {\n const adapter = this.firstWith(node, runner, (a) => !!a.treeChildren);\n return adapter?.treeChildren ? adapter.treeChildren({ node, runner }) : node.children;\n }\n\n /**\n * Attempts for the header chooser: the first matching adapter's\n * `detailAttempts`, else the node's own `attempts` (the built-in default,\n * which always sits behind the registered adapters).\n */\n resolveAttempts(node: Test, runner: TestRunnerContext): DetailAttempt[] {\n const adapted = this.firstWith(node, runner, (a) => !!a.detailAttempts)?.detailAttempts?.({ node, runner });\n if (adapted && adapted.length > 0) return adapted;\n return testAttemptViews(node);\n }\n\n /** Merge `detailTabs` from every matching adapter, de-duplicated by tab id. */\n resolveTabs(node: Test, runner: TestRunnerContext): DetailTab[] {\n const ctx: AdapterContext = { node, runner };\n const seen = new Set<string>();\n const tabs: DetailTab[] = [];\n for (const a of this.adapters) {\n if (!a.detailTabs || !a.match(node, runner)) continue;\n for (const tab of a.detailTabs(ctx)) {\n if (seen.has(tab.id)) continue;\n seen.add(tab.id);\n tabs.push(tab);\n }\n }\n return tabs;\n }\n\n /**\n * Merge `copy` sections from every matching adapter, de-duplicated by fact\n * label, section title and item label — the first contributor wins.\n */\n resolveCopy(node: Test, runner: TestRunnerContext): MergedCopySections {\n const ctx: AdapterContext = { node, runner };\n return mergeCopySections(\n this.adapters.flatMap((a) => (a.copy && a.match(node, runner) ? [a.copy(ctx)] : [])),\n );\n }\n\n /** True when the resolved detail adapter owns its own scroll region. */\n ownsScroll(node: Test, runner: TestRunnerContext): boolean {\n const a = this.resolveDetail(node, runner);\n if (!a?.ownsScroll) return false;\n return a.ownsScroll({ node, runner });\n }\n}\n\nexport function createTestRunnerRegistry(\n adapters: TestNodeAdapter[] = [],\n): TestNodeAdapterRegistry {\n return new TestNodeAdapterRegistry(adapters);\n}\n"],"mappings":";;;;;;;;AAsFA,IAAa,0BAAb,MAAqC;CACnC;CAEA,YAAY,WAA8B,CAAC,GAAG;EAC5C,KAAK,WAAW;CAClB;CAEA,UACE,MACA,QACA,KACwB;EACxB,KAAK,MAAM,KAAK,KAAK,UACnB,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,MAAM,MAAM,GAAG,OAAO;EAE9C,OAAO;CACT;;CAGA,cAAc,MAAY,QAAmD;EAC3E,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,YAAY;CAC7D;CAEA,kBAAkB,MAAY,QAAmD;EAC/E,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,gBAAgB;CACjE;;CAGA,gBAAgB,MAAY,QAA+C;EACzE,OAAO,KAAK,UAAU,MAAM,SAAS,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,WAAW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AAM,MAAsB;GAAE;GAAM;EAAO;EAC3C,OAAO,kBACL,KAAK,SAAS,SAAS,MAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,MAAM,IAAI,CAAC,EAAE,KAAK,GAAG,CAAC,IAAI,CAAC,CAAE,CACrF;CACF;;CAGA,WAAW,MAAY,QAAoC;EACzD,MAAM,IAAI,KAAK,cAAc,MAAM,MAAM;EACzC,IAAI,CAAC,GAAG,YAAY,OAAO;EAC3B,OAAO,EAAE,WAAW;GAAE;GAAM;EAAO,CAAC;CACtC;AACF;AAEA,SAAgB,yBACd,WAA8B,CAAC,GACN;CACzB,OAAO,IAAI,wBAAwB,QAAQ;AAC7C"}
@@ -1,7 +1,27 @@
1
1
  const require_status = require("./status.cjs");
2
2
  // src/data/test-runner/copy.ts
3
+ /** The copyable item a copy button defaults to, if an adapter marked one `primary`. */
4
+ function primaryCopyItem(items) {
5
+ return items.find((item) => "value" in item && item.primary === true);
6
+ }
7
+ /** Where a node's evidence lives on disk: its full results file, then the adapters' references. */
8
+ function copyReferences(sections) {
9
+ return [...sections.source ? [{
10
+ label: "Full results",
11
+ value: sections.source
12
+ }] : [], ...sections.references];
13
+ }
14
+ /** How much of each fenced section a summarized brief keeps, and how long a kept line may run. */
15
+ var BRIEF_LIMITS = {
16
+ lines: 20,
17
+ lineChars: 300
18
+ };
3
19
  /** Generic sections rendered after every adapter section, so evidence reads before raw output. */
4
- var OUTPUT_TITLES = /* @__PURE__ */ new Set(["stdout", "stderr"]);
20
+ var OUTPUT_TITLES = /* @__PURE__ */ new Set([
21
+ "stdout",
22
+ "stderr",
23
+ "output"
24
+ ]);
5
25
  function fact(label, value) {
6
26
  return value ? [{
7
27
  label,
@@ -45,6 +65,7 @@ function genericCopySections(node) {
45
65
  ...fact("Result", require_status.outcomeFor(node) ?? void 0),
46
66
  ...fact("Tool", node.framework),
47
67
  ...fact("Location", nodeLocation(node)),
68
+ ...fact("Work dir", node.work_dir),
48
69
  ...fact("Duration", duration)
49
70
  ],
50
71
  brief: [
@@ -65,20 +86,42 @@ function uniqueBy(values, key) {
65
86
  return true;
66
87
  });
67
88
  }
68
- /** Concatenates sections in order, keeping the first fact/section/item per label or title. */
89
+ /** Concatenates sections in order, keeping the first fact/section/item per label or title, and the first source. */
69
90
  function mergeCopySections(parts) {
91
+ const source = parts.find((p) => p.source)?.source;
70
92
  return {
93
+ ...source ? { source } : {},
71
94
  facts: uniqueBy(parts.flatMap((p) => p.facts ?? []), (f) => f.label),
72
95
  brief: uniqueBy(parts.flatMap((p) => p.brief ?? []), (s) => s.title),
73
- items: uniqueBy(parts.flatMap((p) => p.items ?? []), (i) => i.label)
96
+ items: uniqueBy(parts.flatMap((p) => p.items ?? []), (i) => i.label),
97
+ references: uniqueBy(parts.flatMap((p) => p.references ?? []), (r) => `${r.label}\u0000${r.value}`)
74
98
  };
75
99
  }
76
100
  function fence(body) {
77
101
  const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));
78
102
  return "`".repeat(Math.max(3, longest + 1));
79
103
  }
104
+ function clipLine(line) {
105
+ return line.length > BRIEF_LIMITS.lineChars ? `${line.slice(0, BRIEF_LIMITS.lineChars)}… (${line.length - BRIEF_LIMITS.lineChars} more chars)` : line;
106
+ }
107
+ /** The kept part of a fenced section's body, and a note naming what was cut and where the rest is. */
108
+ function summarize(s, source) {
109
+ const all = s.body.split("\n");
110
+ const keepTail = OUTPUT_TITLES.has(s.title);
111
+ const kept = all.length <= BRIEF_LIMITS.lines ? all : keepTail ? all.slice(-BRIEF_LIMITS.lines) : all.slice(0, BRIEF_LIMITS.lines);
112
+ const clipped = kept.map(clipLine);
113
+ const omitted = all.length - kept.length;
114
+ const shortened = clipped.some((line, i) => line !== kept[i]);
115
+ if (omitted === 0 && !shortened) return { body: s.body };
116
+ const what = omitted > 0 ? `${omitted} ${keepTail ? "earlier" : "more"} line${omitted === 1 ? "" : "s"} omitted` : "long lines shortened";
117
+ const where = s.source ?? source;
118
+ return {
119
+ body: clipped.join("\n"),
120
+ note: `_… ${what}; full text in ${where ? `\`${where}\`` : "Copy full details"}_`
121
+ };
122
+ }
80
123
  /** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */
81
- function buildBrief(node, sections, facts) {
124
+ function buildBrief(node, sections, facts, options = {}) {
82
125
  const lines = [`# ${node.name}`];
83
126
  if (facts.length > 0) lines.push("", ...facts.map((f) => `- **${f.label}:** ${f.value}`));
84
127
  for (const s of sections) {
@@ -88,16 +131,19 @@ function buildBrief(node, sections, facts) {
88
131
  lines.push(s.body);
89
132
  continue;
90
133
  }
91
- const marker = fence(s.body);
92
- lines.push(`${marker}${s.lang ?? ""}`, s.body, marker);
134
+ const { body, note } = options.full ? { body: s.body } : summarize(s, options.source);
135
+ const marker = fence(body);
136
+ lines.push(`${marker}${s.lang ?? ""}`, body, marker);
137
+ if (note) lines.push(note);
93
138
  }
94
139
  return lines.join("\n");
95
140
  }
96
141
  /**
97
- * The primary "Copy details" payload: generic facts and error/expectation
98
- * sections, then the adapters' sections, then the captured stdout/stderr.
142
+ * The "Copy details" payload: generic facts and error/expectation sections,
143
+ * then the adapters' sections, then the captured stdout/stderr. Summarized
144
+ * unless `full`; the facts carry where the node and its full results live on disk.
99
145
  */
100
- function buildNodeBrief(node, adapter) {
146
+ function buildNodeBrief(node, adapter, { full = false } = {}) {
101
147
  const generic = genericCopySections(node);
102
148
  const merged = mergeCopySections([
103
149
  {
@@ -107,17 +153,23 @@ function buildNodeBrief(node, adapter) {
107
153
  adapter,
108
154
  { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) }
109
155
  ]);
110
- return buildBrief(node, merged.brief, merged.facts);
156
+ return buildBrief(node, merged.brief, [...merged.facts, ...copyReferences(merged)], {
157
+ full,
158
+ ...merged.source ? { source: merged.source } : {}
159
+ });
111
160
  }
112
161
  /** "Copy as JSON": the node without its children subtree, 2-space indented. */
113
162
  function buildNodeJson(node) {
114
163
  const { children: _children, ...rest } = node;
115
164
  return JSON.stringify(rest, null, 2);
116
165
  }
166
+ exports.BRIEF_LIMITS = BRIEF_LIMITS;
117
167
  exports.buildBrief = buildBrief;
118
168
  exports.buildNodeBrief = buildNodeBrief;
119
169
  exports.buildNodeJson = buildNodeJson;
170
+ exports.copyReferences = copyReferences;
120
171
  exports.genericCopySections = genericCopySections;
121
172
  exports.mergeCopySections = mergeCopySections;
173
+ exports.primaryCopyItem = primaryCopyItem;
122
174
 
123
175
  //# sourceMappingURL=copy.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.cjs","names":["formatTestDuration","outcomeFor"],"sources":["../../../src/data/test-runner/copy.ts"],"sourcesContent":["// Clipboard payloads for the detail header's \"Copy details\" split button. The\n// primary payload is a Markdown brief: a `# name` heading, `- **Label:** value`\n// facts, then one fenced `## Title` section per piece of evidence. The generic\n// sections here read only common `Test` fields; node adapters contribute the\n// domain sections (a command, a CEL assertion, a recording) and extra menu items\n// through `TestNodeAdapter.copy`. Pure — no React, no clipboard — so every\n// payload is unit-testable as a string.\n\nimport type { StaticIconComponent } from \"../Icon\";\nimport type { Test } from \"./types\";\nimport { formatTestDuration, outcomeFor } from \"./status\";\n\n/** One `- **label:** value` line under the brief's heading. */\nexport type BriefFact = { label: string; value: string };\n\n/**\n * One `## title` block of the brief: fenced (tagged with `lang`) by default, or\n * inserted as-is when `markdown` — for lists and links that must stay live.\n */\nexport type BriefSection = { title: string; lang?: string; markdown?: boolean; body: string };\n\ntype CopyItemBase = { label: string; icon?: StaticIconComponent | string };\n\n/** A copy menu item: the text it copies, or why there is nothing to copy. */\nexport type CopyItem = (CopyItemBase & { value: string }) | (CopyItemBase & { reason: string });\n\nexport type CopySections = {\n facts?: BriefFact[];\n brief?: BriefSection[];\n items?: CopyItem[];\n};\n\n/** Generic sections rendered after every adapter section, so evidence reads before raw output. */\nconst OUTPUT_TITLES = new Set([\"stdout\", \"stderr\"]);\n\nfunction fact(label: string, value: string | undefined): BriefFact[] {\n return value ? [{ label, value }] : [];\n}\n\nfunction section(title: string, body: string | undefined, lang?: string): BriefSection[] {\n if (!body) return [];\n return [lang ? { title, lang, body } : { title, body }];\n}\n\nfunction nodeLocation(node: Test): string | undefined {\n if (!node.file) return undefined;\n return node.line ? `${node.file}:${node.line}` : node.file;\n}\n\nfunction errorBody(node: Test): string {\n const summary = node.failure_detail?.summary;\n const lines = [node.message, summary !== node.message ? summary : undefined];\n return lines.filter(Boolean).join(\"\\n\");\n}\n\nfunction expectationBody(node: Test): string {\n const failure = node.failure_detail;\n if (!failure) return \"\";\n return [\n failure.matcher && `matcher: ${failure.matcher}`,\n failure.expected && `expected: ${failure.expected}`,\n failure.actual && `actual: ${failure.actual}`,\n failure.location && `at: ${failure.location}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** Sections every node gets, read from the common `Test` fields only. */\nexport function genericCopySections(node: Test): Required<CopySections> {\n const duration = node.duration ? formatTestDuration(node.duration) : undefined;\n return {\n facts: [\n ...fact(\"Result\", outcomeFor(node) ?? undefined),\n ...fact(\"Tool\", node.framework),\n ...fact(\"Location\", nodeLocation(node)),\n ...fact(\"Duration\", duration),\n ],\n brief: [\n ...section(\"Error\", errorBody(node)),\n ...section(\"Expectation\", expectationBody(node)),\n ...section(\"Stack\", node.failure_detail?.stack),\n ...(node.log ? section(\"output\", node.log) : [...section(\"stdout\", node.stdout), ...section(\"stderr\", node.stderr)]),\n ],\n items: [],\n };\n}\n\nfunction uniqueBy<T>(values: T[], key: (value: T) => string): T[] {\n const seen = new Set<string>();\n return values.filter((value) => {\n const k = key(value);\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n}\n\n/** Concatenates sections in order, keeping the first fact/section/item per label or title. */\nexport function mergeCopySections(parts: CopySections[]): Required<CopySections> {\n return {\n facts: uniqueBy(\n parts.flatMap((p) => p.facts ?? []),\n (f) => f.label,\n ),\n brief: uniqueBy(\n parts.flatMap((p) => p.brief ?? []),\n (s) => s.title,\n ),\n items: uniqueBy(\n parts.flatMap((p) => p.items ?? []),\n (i) => i.label,\n ),\n };\n}\n\n// A fence one backtick longer than any run in the body, so captured output that\n// itself contains ``` cannot close the block early (CommonMark).\nfunction fence(body: string): string {\n const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));\n return \"`\".repeat(Math.max(3, longest + 1));\n}\n\n/** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */\nexport function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[]): string {\n const lines = [`# ${node.name}`];\n if (facts.length > 0) lines.push(\"\", ...facts.map((f) => `- **${f.label}:** ${f.value}`));\n for (const s of sections) {\n if (!s.body) continue;\n lines.push(\"\", `## ${s.title}`, \"\");\n if (s.markdown) {\n lines.push(s.body);\n continue;\n }\n const marker = fence(s.body);\n lines.push(`${marker}${s.lang ?? \"\"}`, s.body, marker);\n }\n return lines.join(\"\\n\");\n}\n\n/**\n * The primary \"Copy details\" payload: generic facts and error/expectation\n * sections, then the adapters' sections, then the captured stdout/stderr.\n */\nexport function buildNodeBrief(node: Test, adapter: CopySections): string {\n const generic = genericCopySections(node);\n const merged = mergeCopySections([\n { facts: generic.facts, brief: generic.brief.filter((s) => !OUTPUT_TITLES.has(s.title)) },\n adapter,\n { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) },\n ]);\n return buildBrief(node, merged.brief, merged.facts);\n}\n\n/** \"Copy as JSON\": the node without its children subtree, 2-space indented. */\nexport function buildNodeJson(node: Test): string {\n const { children: _children, ...rest } = node;\n return JSON.stringify(rest, null, 2);\n}\n"],"mappings":";;;AAiCA,IAAM,gCAAgB,IAAI,IAAI,CAAC,UAAU,QAAQ,CAAC;AAElD,SAAS,KAAK,OAAe,OAAwC;CACnE,OAAO,QAAQ,CAAC;EAAE;EAAO;CAAM,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,QAAQ,OAAe,MAA0B,MAA+B;CACvF,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,OAAO,CAAC,OAAO;EAAE;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M,MAAM;CACvD;CACA,OAAO,MAAM,KAAK,IAAI;AACxB;;;;;AAMA,SAAgB,eAAe,MAAY,SAA+B;CACxE,MAAM,UAAU,oBAAoB,IAAI;CACxC,MAAM,SAAS,kBAAkB;EAC/B;GAAE,OAAO,QAAQ;GAAO,OAAO,QAAQ,MAAM,QAAQ,MAAM,CAAC,cAAc,IAAI,EAAE,KAAK,CAAC;EAAE;EACxF;EACA,EAAE,OAAO,QAAQ,MAAM,QAAQ,MAAM,cAAc,IAAI,EAAE,KAAK,CAAC,EAAE;CACnE,CAAC;CACD,OAAO,WAAW,MAAM,OAAO,OAAO,OAAO,KAAK;AACpD;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AACrC"}
1
+ {"version":3,"file":"copy.cjs","names":["formatTestDuration","outcomeFor"],"sources":["../../../src/data/test-runner/copy.ts"],"sourcesContent":["// Clipboard payloads for the detail header's \"Copy details\" split button. The\n// primary payload is a Markdown brief: a `# name` heading, `- **Label:** value`\n// facts, then one fenced `## Title` section per piece of evidence. The generic\n// sections here read only common `Test` fields; node adapters contribute the\n// domain sections (a command, a CEL assertion, a recording) and extra menu items\n// through `TestNodeAdapter.copy`. Pure — no React, no clipboard — so every\n// payload is unit-testable as a string.\n\nimport type { StaticIconComponent } from \"../Icon\";\nimport type { Test } from \"./types\";\nimport { formatTestDuration, outcomeFor } from \"./status\";\n\n/** One `- **label:** value` line under the brief's heading. */\nexport type BriefFact = { label: string; value: string };\n\n/**\n * One `## title` block of the brief: fenced (tagged with `lang`) by default, or\n * inserted as-is when `markdown` — for lists and links that must stay live.\n * `source` is the file on disk holding the section's full text, which a\n * summarized brief points to when it cuts the section short.\n */\nexport type BriefSection = { title: string; lang?: string; markdown?: boolean; body: string; source?: string };\n\ntype CopyItemBase = { label: string; icon?: StaticIconComponent | string };\n\n/**\n * A copy menu item: the text it copies (or a loader for text that has to be\n * fetched), or why there is nothing to copy. A `primary` item becomes the\n * button's default action in place of the brief, which moves into the menu as\n * \"Copy details\"; the first primary item across the adapters wins.\n */\nexport type CopyItem =\n | (CopyItemBase & { value: string | (() => Promise<string>); primary?: boolean })\n | (CopyItemBase & { reason: string });\n\n/** The copyable item a copy button defaults to, if an adapter marked one `primary`. */\nexport function primaryCopyItem(items: CopyItem[]): Extract<CopyItem, { value: unknown }> | undefined {\n return items.find((item): item is Extract<CopyItem, { value: unknown }> => \"value\" in item && item.primary === true);\n}\n\nexport type CopySections = {\n facts?: BriefFact[];\n brief?: BriefSection[];\n items?: CopyItem[];\n /** The file on disk with the node's full results, which a summarized brief cites for whatever it cut. */\n source?: string;\n /**\n * Other places on disk that hold the node's evidence — a record store's\n * database, a trace store — listed under the brief's facts and in the\n * copied failure details, so a reader can open them.\n */\n references?: BriefFact[];\n};\n\n/** Every part of `CopySections` present, except `source`, which only some nodes have. */\nexport type MergedCopySections = Required<Omit<CopySections, \"source\">> & Pick<CopySections, \"source\">;\n\n/** Where a node's evidence lives on disk: its full results file, then the adapters' references. */\nexport function copyReferences(sections: Pick<MergedCopySections, \"source\" | \"references\">): BriefFact[] {\n return [...(sections.source ? [{ label: \"Full results\", value: sections.source }] : []), ...sections.references];\n}\n\n/** How much of each fenced section a summarized brief keeps, and how long a kept line may run. */\nexport const BRIEF_LIMITS = { lines: 20, lineChars: 300 } as const;\n\n/** Generic sections rendered after every adapter section, so evidence reads before raw output. */\nconst OUTPUT_TITLES = new Set([\"stdout\", \"stderr\", \"output\"]);\n\nfunction fact(label: string, value: string | undefined): BriefFact[] {\n return value ? [{ label, value }] : [];\n}\n\nfunction section(title: string, body: string | undefined, lang?: string): BriefSection[] {\n if (!body) return [];\n return [lang ? { title, lang, body } : { title, body }];\n}\n\nfunction nodeLocation(node: Test): string | undefined {\n if (!node.file) return undefined;\n return node.line ? `${node.file}:${node.line}` : node.file;\n}\n\nfunction errorBody(node: Test): string {\n const summary = node.failure_detail?.summary;\n const lines = [node.message, summary !== node.message ? summary : undefined];\n return lines.filter(Boolean).join(\"\\n\");\n}\n\nfunction expectationBody(node: Test): string {\n const failure = node.failure_detail;\n if (!failure) return \"\";\n return [\n failure.matcher && `matcher: ${failure.matcher}`,\n failure.expected && `expected: ${failure.expected}`,\n failure.actual && `actual: ${failure.actual}`,\n failure.location && `at: ${failure.location}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** Sections every node gets, read from the common `Test` fields only. */\nexport function genericCopySections(node: Test): Required<Omit<CopySections, \"source\" | \"references\">> {\n const duration = node.duration ? formatTestDuration(node.duration) : undefined;\n return {\n facts: [\n ...fact(\"Result\", outcomeFor(node) ?? undefined),\n ...fact(\"Tool\", node.framework),\n ...fact(\"Location\", nodeLocation(node)),\n ...fact(\"Work dir\", node.work_dir),\n ...fact(\"Duration\", duration),\n ],\n brief: [\n ...section(\"Error\", errorBody(node)),\n ...section(\"Expectation\", expectationBody(node)),\n ...section(\"Stack\", node.failure_detail?.stack),\n ...(node.log ? section(\"output\", node.log) : [...section(\"stdout\", node.stdout), ...section(\"stderr\", node.stderr)]),\n ],\n items: [],\n };\n}\n\nfunction uniqueBy<T>(values: T[], key: (value: T) => string): T[] {\n const seen = new Set<string>();\n return values.filter((value) => {\n const k = key(value);\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n}\n\n/** Concatenates sections in order, keeping the first fact/section/item per label or title, and the first source. */\nexport function mergeCopySections(parts: CopySections[]): MergedCopySections {\n const source = parts.find((p) => p.source)?.source;\n return {\n ...(source ? { source } : {}),\n facts: uniqueBy(\n parts.flatMap((p) => p.facts ?? []),\n (f) => f.label,\n ),\n brief: uniqueBy(\n parts.flatMap((p) => p.brief ?? []),\n (s) => s.title,\n ),\n items: uniqueBy(\n parts.flatMap((p) => p.items ?? []),\n (i) => i.label,\n ),\n references: uniqueBy(\n parts.flatMap((p) => p.references ?? []),\n (r) => `${r.label}\\u0000${r.value}`,\n ),\n };\n}\n\n// A fence one backtick longer than any run in the body, so captured output that\n// itself contains ``` cannot close the block early (CommonMark).\nfunction fence(body: string): string {\n const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));\n return \"`\".repeat(Math.max(3, longest + 1));\n}\n\n/**\n * Options of a brief. A summarized brief (the default) keeps the first\n * `BRIEF_LIMITS.lines` lines of each fenced section — the last ones of captured\n * output, where a failure shows — and cuts long lines, noting what it dropped\n * and the file on disk that has it. `full` keeps every section whole.\n */\nexport type BriefOptions = { full?: boolean; source?: string };\n\nfunction clipLine(line: string): string {\n return line.length > BRIEF_LIMITS.lineChars ? `${line.slice(0, BRIEF_LIMITS.lineChars)}… (${line.length - BRIEF_LIMITS.lineChars} more chars)` : line;\n}\n\n/** The kept part of a fenced section's body, and a note naming what was cut and where the rest is. */\nfunction summarize(s: BriefSection, source: string | undefined): { body: string; note?: string } {\n const all = s.body.split(\"\\n\");\n const keepTail = OUTPUT_TITLES.has(s.title);\n const kept = all.length <= BRIEF_LIMITS.lines ? all : keepTail ? all.slice(-BRIEF_LIMITS.lines) : all.slice(0, BRIEF_LIMITS.lines);\n const clipped = kept.map(clipLine);\n const omitted = all.length - kept.length;\n const shortened = clipped.some((line, i) => line !== kept[i]);\n if (omitted === 0 && !shortened) return { body: s.body };\n const what = omitted > 0 ? `${omitted} ${keepTail ? \"earlier\" : \"more\"} line${omitted === 1 ? \"\" : \"s\"} omitted` : \"long lines shortened\";\n const where = s.source ?? source;\n return { body: clipped.join(\"\\n\"), note: `_… ${what}; full text in ${where ? `\\`${where}\\`` : \"Copy full details\"}_` };\n}\n\n/** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */\nexport function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[], options: BriefOptions = {}): string {\n const lines = [`# ${node.name}`];\n if (facts.length > 0) lines.push(\"\", ...facts.map((f) => `- **${f.label}:** ${f.value}`));\n for (const s of sections) {\n if (!s.body) continue;\n lines.push(\"\", `## ${s.title}`, \"\");\n if (s.markdown) {\n lines.push(s.body);\n continue;\n }\n const { body, note } = options.full ? { body: s.body } : summarize(s, options.source);\n const marker = fence(body);\n lines.push(`${marker}${s.lang ?? \"\"}`, body, marker);\n if (note) lines.push(note);\n }\n return lines.join(\"\\n\");\n}\n\n/**\n * The \"Copy details\" payload: generic facts and error/expectation sections,\n * then the adapters' sections, then the captured stdout/stderr. Summarized\n * unless `full`; the facts carry where the node and its full results live on disk.\n */\nexport function buildNodeBrief(node: Test, adapter: CopySections, { full = false }: { full?: boolean } = {}): string {\n const generic = genericCopySections(node);\n const merged = mergeCopySections([\n { facts: generic.facts, brief: generic.brief.filter((s) => !OUTPUT_TITLES.has(s.title)) },\n adapter,\n { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) },\n ]);\n return buildBrief(node, merged.brief, [...merged.facts, ...copyReferences(merged)], { full, ...(merged.source ? { source: merged.source } : {}) });\n}\n\n/** \"Copy as JSON\": the node without its children subtree, 2-space indented. */\nexport function buildNodeJson(node: Test): string {\n const { children: _children, ...rest } = node;\n return JSON.stringify(rest, null, 2);\n}\n"],"mappings":";;;AAoCA,SAAgB,gBAAgB,OAAsE;CACpG,OAAO,MAAM,MAAM,SAAwD,WAAW,QAAQ,KAAK,YAAY,IAAI;AACrH;;AAoBA,SAAgB,eAAe,UAA0E;CACvG,OAAO,CAAC,GAAI,SAAS,SAAS,CAAC;EAAE,OAAO;EAAgB,OAAO,SAAS;CAAO,CAAC,IAAI,CAAC,GAAI,GAAG,SAAS,UAAU;AACjH;;AAGA,IAAa,eAAe;CAAE,OAAO;CAAI,WAAW;AAAI;;AAGxD,IAAM,gCAAgB,IAAI,IAAI;CAAC;CAAU;CAAU;AAAQ,CAAC;AAE5D,SAAS,KAAK,OAAe,OAAwC;CACnE,OAAO,QAAQ,CAAC;EAAE;EAAO;CAAM,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,QAAQ,OAAe,MAA0B,MAA+B;CACvF,IAAI,CAAC,MAAM,OAAO,CAA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M,MAAM,MAAM;EACnD,IAAI,MAAM,MAAM,KAAK,IAAI;CAC3B;CACA,OAAO,MAAM,KAAK,IAAI;AACxB;;;;;;AAOA,SAAgB,eAAe,MAAY,SAAuB,EAAE,OAAO,UAA8B,CAAC,GAAW;CACnH,MAAM,UAAU,oBAAoB,IAAI;CACxC,MAAM,SAAS,kBAAkB;EAC/B;GAAE,OAAO,QAAQ;GAAO,OAAO,QAAQ,MAAM,QAAQ,MAAM,CAAC,cAAc,IAAI,EAAE,KAAK,CAAC;EAAE;EACxF;EACA,EAAE,OAAO,QAAQ,MAAM,QAAQ,MAAM,cAAc,IAAI,EAAE,KAAK,CAAC,EAAE;CACnE,CAAC;CACD,OAAO,WAAW,MAAM,OAAO,OAAO,CAAC,GAAG,OAAO,OAAO,GAAG,eAAe,MAAM,CAAC,GAAG;EAAE;EAAM,GAAI,OAAO,SAAS,EAAE,QAAQ,OAAO,OAAO,IAAI,CAAC;CAAG,CAAC;AACnJ;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AACrC"}
@@ -8,39 +8,82 @@ export type BriefFact = {
8
8
  /**
9
9
  * One `## title` block of the brief: fenced (tagged with `lang`) by default, or
10
10
  * inserted as-is when `markdown` — for lists and links that must stay live.
11
+ * `source` is the file on disk holding the section's full text, which a
12
+ * summarized brief points to when it cuts the section short.
11
13
  */
12
14
  export type BriefSection = {
13
15
  title: string;
14
16
  lang?: string;
15
17
  markdown?: boolean;
16
18
  body: string;
19
+ source?: string;
17
20
  };
18
21
  type CopyItemBase = {
19
22
  label: string;
20
23
  icon?: StaticIconComponent | string;
21
24
  };
22
- /** A copy menu item: the text it copies, or why there is nothing to copy. */
25
+ /**
26
+ * A copy menu item: the text it copies (or a loader for text that has to be
27
+ * fetched), or why there is nothing to copy. A `primary` item becomes the
28
+ * button's default action in place of the brief, which moves into the menu as
29
+ * "Copy details"; the first primary item across the adapters wins.
30
+ */
23
31
  export type CopyItem = (CopyItemBase & {
24
- value: string;
32
+ value: string | (() => Promise<string>);
33
+ primary?: boolean;
25
34
  }) | (CopyItemBase & {
26
35
  reason: string;
27
36
  });
37
+ /** The copyable item a copy button defaults to, if an adapter marked one `primary`. */
38
+ export declare function primaryCopyItem(items: CopyItem[]): Extract<CopyItem, {
39
+ value: unknown;
40
+ }> | undefined;
28
41
  export type CopySections = {
29
42
  facts?: BriefFact[];
30
43
  brief?: BriefSection[];
31
44
  items?: CopyItem[];
45
+ /** The file on disk with the node's full results, which a summarized brief cites for whatever it cut. */
46
+ source?: string;
47
+ /**
48
+ * Other places on disk that hold the node's evidence — a record store's
49
+ * database, a trace store — listed under the brief's facts and in the
50
+ * copied failure details, so a reader can open them.
51
+ */
52
+ references?: BriefFact[];
53
+ };
54
+ /** Every part of `CopySections` present, except `source`, which only some nodes have. */
55
+ export type MergedCopySections = Required<Omit<CopySections, "source">> & Pick<CopySections, "source">;
56
+ /** Where a node's evidence lives on disk: its full results file, then the adapters' references. */
57
+ export declare function copyReferences(sections: Pick<MergedCopySections, "source" | "references">): BriefFact[];
58
+ /** How much of each fenced section a summarized brief keeps, and how long a kept line may run. */
59
+ export declare const BRIEF_LIMITS: {
60
+ readonly lines: 20;
61
+ readonly lineChars: 300;
32
62
  };
33
63
  /** Sections every node gets, read from the common `Test` fields only. */
34
- export declare function genericCopySections(node: Test): Required<CopySections>;
35
- /** Concatenates sections in order, keeping the first fact/section/item per label or title. */
36
- export declare function mergeCopySections(parts: CopySections[]): Required<CopySections>;
64
+ export declare function genericCopySections(node: Test): Required<Omit<CopySections, "source" | "references">>;
65
+ /** Concatenates sections in order, keeping the first fact/section/item per label or title, and the first source. */
66
+ export declare function mergeCopySections(parts: CopySections[]): MergedCopySections;
67
+ /**
68
+ * Options of a brief. A summarized brief (the default) keeps the first
69
+ * `BRIEF_LIMITS.lines` lines of each fenced section — the last ones of captured
70
+ * output, where a failure shows — and cuts long lines, noting what it dropped
71
+ * and the file on disk that has it. `full` keeps every section whole.
72
+ */
73
+ export type BriefOptions = {
74
+ full?: boolean;
75
+ source?: string;
76
+ };
37
77
  /** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */
38
- export declare function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[]): string;
78
+ export declare function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[], options?: BriefOptions): string;
39
79
  /**
40
- * The primary "Copy details" payload: generic facts and error/expectation
41
- * sections, then the adapters' sections, then the captured stdout/stderr.
80
+ * The "Copy details" payload: generic facts and error/expectation sections,
81
+ * then the adapters' sections, then the captured stdout/stderr. Summarized
82
+ * unless `full`; the facts carry where the node and its full results live on disk.
42
83
  */
43
- export declare function buildNodeBrief(node: Test, adapter: CopySections): string;
84
+ export declare function buildNodeBrief(node: Test, adapter: CopySections, { full }?: {
85
+ full?: boolean;
86
+ }): string;
44
87
  /** "Copy as JSON": the node without its children subtree, 2-space indented. */
45
88
  export declare function buildNodeJson(node: Test): string;
46
89
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../../src/data/test-runner/copy.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC,+DAA+D;AAC/D,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9F,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAA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BAAgB,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,YAAY,CAAC,GAAG,SAAS,EAAE,CAEvG;AAED,kGAAkG;AAClG,eAAO,MAAM,YAAY;;;CAAyC,CAAC;AAsCnE,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,YAAY,CAAC,CAAC,CAkBrG;AAYD,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,kBAAkB,CAqB3E;AASD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAoB/D,kHAAkH;AAClH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,GAAE,YAAiB,GAAG,MAAM,CAgBvH;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,IAAY,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAQnH;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAGhD"}
@@ -1,7 +1,27 @@
1
1
  import { formatTestDuration, outcomeFor } from "./status.js";
2
2
  // src/data/test-runner/copy.ts
3
+ /** The copyable item a copy button defaults to, if an adapter marked one `primary`. */
4
+ function primaryCopyItem(items) {
5
+ return items.find((item) => "value" in item && item.primary === true);
6
+ }
7
+ /** Where a node's evidence lives on disk: its full results file, then the adapters' references. */
8
+ function copyReferences(sections) {
9
+ return [...sections.source ? [{
10
+ label: "Full results",
11
+ value: sections.source
12
+ }] : [], ...sections.references];
13
+ }
14
+ /** How much of each fenced section a summarized brief keeps, and how long a kept line may run. */
15
+ var BRIEF_LIMITS = {
16
+ lines: 20,
17
+ lineChars: 300
18
+ };
3
19
  /** Generic sections rendered after every adapter section, so evidence reads before raw output. */
4
- var OUTPUT_TITLES = /* @__PURE__ */ new Set(["stdout", "stderr"]);
20
+ var OUTPUT_TITLES = /* @__PURE__ */ new Set([
21
+ "stdout",
22
+ "stderr",
23
+ "output"
24
+ ]);
5
25
  function fact(label, value) {
6
26
  return value ? [{
7
27
  label,
@@ -45,6 +65,7 @@ function genericCopySections(node) {
45
65
  ...fact("Result", outcomeFor(node) ?? void 0),
46
66
  ...fact("Tool", node.framework),
47
67
  ...fact("Location", nodeLocation(node)),
68
+ ...fact("Work dir", node.work_dir),
48
69
  ...fact("Duration", duration)
49
70
  ],
50
71
  brief: [
@@ -65,20 +86,42 @@ function uniqueBy(values, key) {
65
86
  return true;
66
87
  });
67
88
  }
68
- /** Concatenates sections in order, keeping the first fact/section/item per label or title. */
89
+ /** Concatenates sections in order, keeping the first fact/section/item per label or title, and the first source. */
69
90
  function mergeCopySections(parts) {
91
+ const source = parts.find((p) => p.source)?.source;
70
92
  return {
93
+ ...source ? { source } : {},
71
94
  facts: uniqueBy(parts.flatMap((p) => p.facts ?? []), (f) => f.label),
72
95
  brief: uniqueBy(parts.flatMap((p) => p.brief ?? []), (s) => s.title),
73
- items: uniqueBy(parts.flatMap((p) => p.items ?? []), (i) => i.label)
96
+ items: uniqueBy(parts.flatMap((p) => p.items ?? []), (i) => i.label),
97
+ references: uniqueBy(parts.flatMap((p) => p.references ?? []), (r) => `${r.label}\u0000${r.value}`)
74
98
  };
75
99
  }
76
100
  function fence(body) {
77
101
  const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));
78
102
  return "`".repeat(Math.max(3, longest + 1));
79
103
  }
104
+ function clipLine(line) {
105
+ return line.length > BRIEF_LIMITS.lineChars ? `${line.slice(0, BRIEF_LIMITS.lineChars)}… (${line.length - BRIEF_LIMITS.lineChars} more chars)` : line;
106
+ }
107
+ /** The kept part of a fenced section's body, and a note naming what was cut and where the rest is. */
108
+ function summarize(s, source) {
109
+ const all = s.body.split("\n");
110
+ const keepTail = OUTPUT_TITLES.has(s.title);
111
+ const kept = all.length <= BRIEF_LIMITS.lines ? all : keepTail ? all.slice(-BRIEF_LIMITS.lines) : all.slice(0, BRIEF_LIMITS.lines);
112
+ const clipped = kept.map(clipLine);
113
+ const omitted = all.length - kept.length;
114
+ const shortened = clipped.some((line, i) => line !== kept[i]);
115
+ if (omitted === 0 && !shortened) return { body: s.body };
116
+ const what = omitted > 0 ? `${omitted} ${keepTail ? "earlier" : "more"} line${omitted === 1 ? "" : "s"} omitted` : "long lines shortened";
117
+ const where = s.source ?? source;
118
+ return {
119
+ body: clipped.join("\n"),
120
+ note: `_… ${what}; full text in ${where ? `\`${where}\`` : "Copy full details"}_`
121
+ };
122
+ }
80
123
  /** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */
81
- function buildBrief(node, sections, facts) {
124
+ function buildBrief(node, sections, facts, options = {}) {
82
125
  const lines = [`# ${node.name}`];
83
126
  if (facts.length > 0) lines.push("", ...facts.map((f) => `- **${f.label}:** ${f.value}`));
84
127
  for (const s of sections) {
@@ -88,16 +131,19 @@ function buildBrief(node, sections, facts) {
88
131
  lines.push(s.body);
89
132
  continue;
90
133
  }
91
- const marker = fence(s.body);
92
- lines.push(`${marker}${s.lang ?? ""}`, s.body, marker);
134
+ const { body, note } = options.full ? { body: s.body } : summarize(s, options.source);
135
+ const marker = fence(body);
136
+ lines.push(`${marker}${s.lang ?? ""}`, body, marker);
137
+ if (note) lines.push(note);
93
138
  }
94
139
  return lines.join("\n");
95
140
  }
96
141
  /**
97
- * The primary "Copy details" payload: generic facts and error/expectation
98
- * sections, then the adapters' sections, then the captured stdout/stderr.
142
+ * The "Copy details" payload: generic facts and error/expectation sections,
143
+ * then the adapters' sections, then the captured stdout/stderr. Summarized
144
+ * unless `full`; the facts carry where the node and its full results live on disk.
99
145
  */
100
- function buildNodeBrief(node, adapter) {
146
+ function buildNodeBrief(node, adapter, { full = false } = {}) {
101
147
  const generic = genericCopySections(node);
102
148
  const merged = mergeCopySections([
103
149
  {
@@ -107,13 +153,16 @@ function buildNodeBrief(node, adapter) {
107
153
  adapter,
108
154
  { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) }
109
155
  ]);
110
- return buildBrief(node, merged.brief, merged.facts);
156
+ return buildBrief(node, merged.brief, [...merged.facts, ...copyReferences(merged)], {
157
+ full,
158
+ ...merged.source ? { source: merged.source } : {}
159
+ });
111
160
  }
112
161
  /** "Copy as JSON": the node without its children subtree, 2-space indented. */
113
162
  function buildNodeJson(node) {
114
163
  const { children: _children, ...rest } = node;
115
164
  return JSON.stringify(rest, null, 2);
116
165
  }
117
- export { buildBrief, buildNodeBrief, buildNodeJson, genericCopySections, mergeCopySections };
166
+ export { BRIEF_LIMITS, buildBrief, buildNodeBrief, buildNodeJson, copyReferences, genericCopySections, mergeCopySections, primaryCopyItem };
118
167
 
119
168
  //# sourceMappingURL=copy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.js","names":[],"sources":["../../../src/data/test-runner/copy.ts"],"sourcesContent":["// Clipboard payloads for the detail header's \"Copy details\" split button. The\n// primary payload is a Markdown brief: a `# name` heading, `- **Label:** value`\n// facts, then one fenced `## Title` section per piece of evidence. The generic\n// sections here read only common `Test` fields; node adapters contribute the\n// domain sections (a command, a CEL assertion, a recording) and extra menu items\n// through `TestNodeAdapter.copy`. Pure — no React, no clipboard — so every\n// payload is unit-testable as a string.\n\nimport type { StaticIconComponent } from \"../Icon\";\nimport type { Test } from \"./types\";\nimport { formatTestDuration, outcomeFor } from \"./status\";\n\n/** One `- **label:** value` line under the brief's heading. */\nexport type BriefFact = { label: string; value: string };\n\n/**\n * One `## title` block of the brief: fenced (tagged with `lang`) by default, or\n * inserted as-is when `markdown` — for lists and links that must stay live.\n */\nexport type BriefSection = { title: string; lang?: string; markdown?: boolean; body: string };\n\ntype CopyItemBase = { label: string; icon?: StaticIconComponent | string };\n\n/** A copy menu item: the text it copies, or why there is nothing to copy. */\nexport type CopyItem = (CopyItemBase & { value: string }) | (CopyItemBase & { reason: string });\n\nexport type CopySections = {\n facts?: BriefFact[];\n brief?: BriefSection[];\n items?: CopyItem[];\n};\n\n/** Generic sections rendered after every adapter section, so evidence reads before raw output. */\nconst OUTPUT_TITLES = new Set([\"stdout\", \"stderr\"]);\n\nfunction fact(label: string, value: string | undefined): BriefFact[] {\n return value ? [{ label, value }] : [];\n}\n\nfunction section(title: string, body: string | undefined, lang?: string): BriefSection[] {\n if (!body) return [];\n return [lang ? { title, lang, body } : { title, body }];\n}\n\nfunction nodeLocation(node: Test): string | undefined {\n if (!node.file) return undefined;\n return node.line ? `${node.file}:${node.line}` : node.file;\n}\n\nfunction errorBody(node: Test): string {\n const summary = node.failure_detail?.summary;\n const lines = [node.message, summary !== node.message ? summary : undefined];\n return lines.filter(Boolean).join(\"\\n\");\n}\n\nfunction expectationBody(node: Test): string {\n const failure = node.failure_detail;\n if (!failure) return \"\";\n return [\n failure.matcher && `matcher: ${failure.matcher}`,\n failure.expected && `expected: ${failure.expected}`,\n failure.actual && `actual: ${failure.actual}`,\n failure.location && `at: ${failure.location}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** Sections every node gets, read from the common `Test` fields only. */\nexport function genericCopySections(node: Test): Required<CopySections> {\n const duration = node.duration ? formatTestDuration(node.duration) : undefined;\n return {\n facts: [\n ...fact(\"Result\", outcomeFor(node) ?? undefined),\n ...fact(\"Tool\", node.framework),\n ...fact(\"Location\", nodeLocation(node)),\n ...fact(\"Duration\", duration),\n ],\n brief: [\n ...section(\"Error\", errorBody(node)),\n ...section(\"Expectation\", expectationBody(node)),\n ...section(\"Stack\", node.failure_detail?.stack),\n ...(node.log ? section(\"output\", node.log) : [...section(\"stdout\", node.stdout), ...section(\"stderr\", node.stderr)]),\n ],\n items: [],\n };\n}\n\nfunction uniqueBy<T>(values: T[], key: (value: T) => string): T[] {\n const seen = new Set<string>();\n return values.filter((value) => {\n const k = key(value);\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n}\n\n/** Concatenates sections in order, keeping the first fact/section/item per label or title. */\nexport function mergeCopySections(parts: CopySections[]): Required<CopySections> {\n return {\n facts: uniqueBy(\n parts.flatMap((p) => p.facts ?? []),\n (f) => f.label,\n ),\n brief: uniqueBy(\n parts.flatMap((p) => p.brief ?? []),\n (s) => s.title,\n ),\n items: uniqueBy(\n parts.flatMap((p) => p.items ?? []),\n (i) => i.label,\n ),\n };\n}\n\n// A fence one backtick longer than any run in the body, so captured output that\n// itself contains ``` cannot close the block early (CommonMark).\nfunction fence(body: string): string {\n const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));\n return \"`\".repeat(Math.max(3, longest + 1));\n}\n\n/** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */\nexport function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[]): string {\n const lines = [`# ${node.name}`];\n if (facts.length > 0) lines.push(\"\", ...facts.map((f) => `- **${f.label}:** ${f.value}`));\n for (const s of sections) {\n if (!s.body) continue;\n lines.push(\"\", `## ${s.title}`, \"\");\n if (s.markdown) {\n lines.push(s.body);\n continue;\n }\n const marker = fence(s.body);\n lines.push(`${marker}${s.lang ?? \"\"}`, s.body, marker);\n }\n return lines.join(\"\\n\");\n}\n\n/**\n * The primary \"Copy details\" payload: generic facts and error/expectation\n * sections, then the adapters' sections, then the captured stdout/stderr.\n */\nexport function buildNodeBrief(node: Test, adapter: CopySections): string {\n const generic = genericCopySections(node);\n const merged = mergeCopySections([\n { facts: generic.facts, brief: generic.brief.filter((s) => !OUTPUT_TITLES.has(s.title)) },\n adapter,\n { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) },\n ]);\n return buildBrief(node, merged.brief, merged.facts);\n}\n\n/** \"Copy as JSON\": the node without its children subtree, 2-space indented. */\nexport function buildNodeJson(node: Test): string {\n const { children: _children, ...rest } = node;\n return JSON.stringify(rest, null, 2);\n}\n"],"mappings":";;;AAiCA,IAAM,gCAAgB,IAAI,IAAI,CAAC,UAAU,QAAQ,CAAC;AAElD,SAAS,KAAK,OAAe,OAAwC;CACnE,OAAO,QAAQ,CAAC;EAAE;EAAO;CAAM,CAAC,IAAI,CAAC;AACvC;AAEA,SAAS,QAAQ,OAAe,MAA0B,MAA+B;CACvF,IAAI,CAAC,MAAM,OAAO,CAAC;CACnB,OAAO,CAAC,OAAO;EAAE;EAAO;EAAM;CAAK,IAAI;EAAE;EAAO;CAAK,CAAC;AACxD;AAEA,SAAS,aAAa,MAAgC;CACpD,IAAI,CAAC,KAAK,MAAM,OAAO,KAAA;CACvB,OAAO,KAAK,OAAO,GAAG,KAAK,KAAK,GAAG,KAAK,SAAS,KAAK;AACxD;AAEA,SAAS,UAAU,MAAoB;CACrC,MAAM,UAAU,KAAK,gBAAgB;CAErC,OAAO,CADQ,KAAK,SAAS,YAAY,KAAK,UAAU,UAAU,KAAA,CAC3D,CAAA,CAAM,OAAO,OAAO,CAAC,CAAC,KAAK,IAAI;AACxC;AAEA,SAAS,gBAAgB,MAAoB;CAC3C,MAAM,UAAU,KAAK;CACrB,IAAI,CAAC,SAAS,OAAO;CACrB,OAAO;EACL,QAAQ,WAAW,YAAY,QAAQ;EACvC,QAAQ,YAAY,aAAa,QAAQ;EACzC,QAAQ,UAAU,WAAW,QAAQ;EACrC,QAAQ,YAAY,OAAO,QAAQ;CACrC,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,IAAI;AACd;;AAGA,SAAgB,oBAAoB,MAAoC;CACtE,MAAM,WAAW,KAAK,WAAW,mBAAmB,KAAK,QAAQ,IAAI,KAAA;CACrE,OAAO;EACL,OAAO;GACL,GAAG,KAAK,UAAU,WAAW,IAAI,KAAK,KAAA,C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AK,KAAK,MAAM;CAC/B,IAAI,MAAM,SAAS,GAAG,MAAM,KAAK,IAAI,GAAG,MAAM,KAAK,MAAM,OAAO,EAAE,MAAM,MAAM,EAAE,OAAO,CAAC;CACxF,KAAK,MAAM,KAAK,UAAU;EACxB,IAAI,CAAC,EAAE,MAAM;EACb,MAAM,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE;EAClC,IAAI,EAAE,UAAU;GACd,MAAM,KAAK,EAAE,IAAI;GACjB;EACF;EACA,MAAM,SAAS,MAAM,EAAE,IAAI;EAC3B,MAAM,KAAK,GAAG,SAAS,EAAE,QAAQ,MAAM,EAAE,MAAM,MAAM;CACvD;CACA,OAAO,MAAM,KAAK,IAAI;AACxB;;;;;AAMA,SAAgB,eAAe,MAAY,SAA+B;CACxE,MAAM,UAAU,oBAAoB,IAAI;CACxC,MAAM,SAAS,kBAAkB;EAC/B;GAAE,OAAO,QAAQ;GAAO,OAAO,QAAQ,MAAM,QAAQ,MAAM,CAAC,cAAc,IAAI,EAAE,KAAK,CAAC;EAAE;EACxF;EACA,EAAE,OAAO,QAAQ,MAAM,QAAQ,MAAM,cAAc,IAAI,EAAE,KAAK,CAAC,EAAE;CACnE,CAAC;CACD,OAAO,WAAW,MAAM,OAAO,OAAO,OAAO,KAAK;AACpD;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AACrC"}
1
+ {"version":3,"file":"copy.js","names":[],"sources":["../../../src/data/test-runner/copy.ts"],"sourcesContent":["// Clipboard payloads for the detail header's \"Copy details\" split button. The\n// primary payload is a Markdown brief: a `# name` heading, `- **Label:** value`\n// facts, then one fenced `## Title` section per piece of evidence. The generic\n// sections here read only common `Test` fields; node adapters contribute the\n// domain sections (a command, a CEL assertion, a recording) and extra menu items\n// through `TestNodeAdapter.copy`. Pure — no React, no clipboard — so every\n// payload is unit-testable as a string.\n\nimport type { StaticIconComponent } from \"../Icon\";\nimport type { Test } from \"./types\";\nimport { formatTestDuration, outcomeFor } from \"./status\";\n\n/** One `- **label:** value` line under the brief's heading. */\nexport type BriefFact = { label: string; value: string };\n\n/**\n * One `## title` block of the brief: fenced (tagged with `lang`) by default, or\n * inserted as-is when `markdown` — for lists and links that must stay live.\n * `source` is the file on disk holding the section's full text, which a\n * summarized brief points to when it cuts the section short.\n */\nexport type BriefSection = { title: string; lang?: string; markdown?: boolean; body: string; source?: string };\n\ntype CopyItemBase = { label: string; icon?: StaticIconComponent | string };\n\n/**\n * A copy menu item: the text it copies (or a loader for text that has to be\n * fetched), or why there is nothing to copy. A `primary` item becomes the\n * button's default action in place of the brief, which moves into the menu as\n * \"Copy details\"; the first primary item across the adapters wins.\n */\nexport type CopyItem =\n | (CopyItemBase & { value: string | (() => Promise<string>); primary?: boolean })\n | (CopyItemBase & { reason: string });\n\n/** The copyable item a copy button defaults to, if an adapter marked one `primary`. */\nexport function primaryCopyItem(items: CopyItem[]): Extract<CopyItem, { value: unknown }> | undefined {\n return items.find((item): item is Extract<CopyItem, { value: unknown }> => \"value\" in item && item.primary === true);\n}\n\nexport type CopySections = {\n facts?: BriefFact[];\n brief?: BriefSection[];\n items?: CopyItem[];\n /** The file on disk with the node's full results, which a summarized brief cites for whatever it cut. */\n source?: string;\n /**\n * Other places on disk that hold the node's evidence — a record store's\n * database, a trace store — listed under the brief's facts and in the\n * copied failure details, so a reader can open them.\n */\n references?: BriefFact[];\n};\n\n/** Every part of `CopySections` present, except `source`, which only some nodes have. */\nexport type MergedCopySections = Required<Omit<CopySections, \"source\">> & Pick<CopySections, \"source\">;\n\n/** Where a node's evidence lives on disk: its full results file, then the adapters' references. */\nexport function copyReferences(sections: Pick<MergedCopySections, \"source\" | \"references\">): BriefFact[] {\n return [...(sections.source ? [{ label: \"Full results\", value: sections.source }] : []), ...sections.references];\n}\n\n/** How much of each fenced section a summarized brief keeps, and how long a kept line may run. */\nexport const BRIEF_LIMITS = { lines: 20, lineChars: 300 } as const;\n\n/** Generic sections rendered after every adapter section, so evidence reads before raw output. */\nconst OUTPUT_TITLES = new Set([\"stdout\", \"stderr\", \"output\"]);\n\nfunction fact(label: string, value: string | undefined): BriefFact[] {\n return value ? [{ label, value }] : [];\n}\n\nfunction section(title: string, body: string | undefined, lang?: string): BriefSection[] {\n if (!body) return [];\n return [lang ? { title, lang, body } : { title, body }];\n}\n\nfunction nodeLocation(node: Test): string | undefined {\n if (!node.file) return undefined;\n return node.line ? `${node.file}:${node.line}` : node.file;\n}\n\nfunction errorBody(node: Test): string {\n const summary = node.failure_detail?.summary;\n const lines = [node.message, summary !== node.message ? summary : undefined];\n return lines.filter(Boolean).join(\"\\n\");\n}\n\nfunction expectationBody(node: Test): string {\n const failure = node.failure_detail;\n if (!failure) return \"\";\n return [\n failure.matcher && `matcher: ${failure.matcher}`,\n failure.expected && `expected: ${failure.expected}`,\n failure.actual && `actual: ${failure.actual}`,\n failure.location && `at: ${failure.location}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** Sections every node gets, read from the common `Test` fields only. */\nexport function genericCopySections(node: Test): Required<Omit<CopySections, \"source\" | \"references\">> {\n const duration = node.duration ? formatTestDuration(node.duration) : undefined;\n return {\n facts: [\n ...fact(\"Result\", outcomeFor(node) ?? undefined),\n ...fact(\"Tool\", node.framework),\n ...fact(\"Location\", nodeLocation(node)),\n ...fact(\"Work dir\", node.work_dir),\n ...fact(\"Duration\", duration),\n ],\n brief: [\n ...section(\"Error\", errorBody(node)),\n ...section(\"Expectation\", expectationBody(node)),\n ...section(\"Stack\", node.failure_detail?.stack),\n ...(node.log ? section(\"output\", node.log) : [...section(\"stdout\", node.stdout), ...section(\"stderr\", node.stderr)]),\n ],\n items: [],\n };\n}\n\nfunction uniqueBy<T>(values: T[], key: (value: T) => string): T[] {\n const seen = new Set<string>();\n return values.filter((value) => {\n const k = key(value);\n if (seen.has(k)) return false;\n seen.add(k);\n return true;\n });\n}\n\n/** Concatenates sections in order, keeping the first fact/section/item per label or title, and the first source. */\nexport function mergeCopySections(parts: CopySections[]): MergedCopySections {\n const source = parts.find((p) => p.source)?.source;\n return {\n ...(source ? { source } : {}),\n facts: uniqueBy(\n parts.flatMap((p) => p.facts ?? []),\n (f) => f.label,\n ),\n brief: uniqueBy(\n parts.flatMap((p) => p.brief ?? []),\n (s) => s.title,\n ),\n items: uniqueBy(\n parts.flatMap((p) => p.items ?? []),\n (i) => i.label,\n ),\n references: uniqueBy(\n parts.flatMap((p) => p.references ?? []),\n (r) => `${r.label}\\u0000${r.value}`,\n ),\n };\n}\n\n// A fence one backtick longer than any run in the body, so captured output that\n// itself contains ``` cannot close the block early (CommonMark).\nfunction fence(body: string): string {\n const longest = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));\n return \"`\".repeat(Math.max(3, longest + 1));\n}\n\n/**\n * Options of a brief. A summarized brief (the default) keeps the first\n * `BRIEF_LIMITS.lines` lines of each fenced section — the last ones of captured\n * output, where a failure shows — and cuts long lines, noting what it dropped\n * and the file on disk that has it. `full` keeps every section whole.\n */\nexport type BriefOptions = { full?: boolean; source?: string };\n\nfunction clipLine(line: string): string {\n return line.length > BRIEF_LIMITS.lineChars ? `${line.slice(0, BRIEF_LIMITS.lineChars)}… (${line.length - BRIEF_LIMITS.lineChars} more chars)` : line;\n}\n\n/** The kept part of a fenced section's body, and a note naming what was cut and where the rest is. */\nfunction summarize(s: BriefSection, source: string | undefined): { body: string; note?: string } {\n const all = s.body.split(\"\\n\");\n const keepTail = OUTPUT_TITLES.has(s.title);\n const kept = all.length <= BRIEF_LIMITS.lines ? all : keepTail ? all.slice(-BRIEF_LIMITS.lines) : all.slice(0, BRIEF_LIMITS.lines);\n const clipped = kept.map(clipLine);\n const omitted = all.length - kept.length;\n const shortened = clipped.some((line, i) => line !== kept[i]);\n if (omitted === 0 && !shortened) return { body: s.body };\n const what = omitted > 0 ? `${omitted} ${keepTail ? \"earlier\" : \"more\"} line${omitted === 1 ? \"\" : \"s\"} omitted` : \"long lines shortened\";\n const where = s.source ?? source;\n return { body: clipped.join(\"\\n\"), note: `_… ${what}; full text in ${where ? `\\`${where}\\`` : \"Copy full details\"}_` };\n}\n\n/** The Markdown brief: `# name`, the facts as bullets, then each non-empty section (fenced unless `markdown`). */\nexport function buildBrief(node: Test, sections: BriefSection[], facts: BriefFact[], options: BriefOptions = {}): string {\n const lines = [`# ${node.name}`];\n if (facts.length > 0) lines.push(\"\", ...facts.map((f) => `- **${f.label}:** ${f.value}`));\n for (const s of sections) {\n if (!s.body) continue;\n lines.push(\"\", `## ${s.title}`, \"\");\n if (s.markdown) {\n lines.push(s.body);\n continue;\n }\n const { body, note } = options.full ? { body: s.body } : summarize(s, options.source);\n const marker = fence(body);\n lines.push(`${marker}${s.lang ?? \"\"}`, body, marker);\n if (note) lines.push(note);\n }\n return lines.join(\"\\n\");\n}\n\n/**\n * The \"Copy details\" payload: generic facts and error/expectation sections,\n * then the adapters' sections, then the captured stdout/stderr. Summarized\n * unless `full`; the facts carry where the node and its full results live on disk.\n */\nexport function buildNodeBrief(node: Test, adapter: CopySections, { full = false }: { full?: boolean } = {}): string {\n const generic = genericCopySections(node);\n const merged = mergeCopySections([\n { facts: generic.facts, brief: generic.brief.filter((s) => !OUTPUT_TITLES.has(s.title)) },\n adapter,\n { brief: generic.brief.filter((s) => OUTPUT_TITLES.has(s.title)) },\n ]);\n return buildBrief(node, merged.brief, [...merged.facts, ...copyReferences(merged)], { full, ...(merged.source ? { source: merged.source } : {}) });\n}\n\n/** \"Copy as JSON\": the node without its children subtree, 2-space indented. */\nexport function buildNodeJson(node: Test): string {\n const { children: _children, ...rest } = node;\n return JSON.stringify(rest, null, 2);\n}\n"],"mappings":";;;AAoCA,SAAgB,gBAAgB,OAAsE;CACpG,OAAO,MAAM,MAAM,SAAwD,WAAW,QAAQ,KAAK,YAAY,IAAI;AACrH;;AAoBA,SAAgB,eAAe,UAA0E;CACvG,OAAO,CAAC,GAAI,SAAS,SAAS,CAA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E,OAAO,CAAC;CACxF,KAAK,MAAM,KAAK,UAAU;EACxB,IAAI,CAAC,EAAE,MAAM;EACb,MAAM,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE;EAClC,IAAI,EAAE,UAAU;GACd,MAAM,KAAK,EAAE,IAAI;GACjB;EACF;EACA,MAAM,EAAE,MAAM,SAAS,QAAQ,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,UAAU,GAAG,QAAQ,MAAM;EACpF,MAAM,SAAS,MAAM,IAAI;EACzB,MAAM,KAAK,GAAG,SAAS,EAAE,QAAQ,MAAM,MAAM,MAAM;EACnD,IAAI,MAAM,MAAM,KAAK,IAAI;CAC3B;CACA,OAAO,MAAM,KAAK,IAAI;AACxB;;;;;;AAOA,SAAgB,eAAe,MAAY,SAAuB,EAAE,OAAO,UAA8B,CAAC,GAAW;CACnH,MAAM,UAAU,oBAAoB,IAAI;CACxC,MAAM,SAAS,kBAAkB;EAC/B;GAAE,OAAO,QAAQ;GAAO,OAAO,QAAQ,MAAM,QAAQ,MAAM,CAAC,cAAc,IAAI,EAAE,KAAK,CAAC;EAAE;EACxF;EACA,EAAE,OAAO,QAAQ,MAAM,QAAQ,MAAM,cAAc,IAAI,EAAE,KAAK,CAAC,EAAE;CACnE,CAAC;CACD,OAAO,WAAW,MAAM,OAAO,OAAO,CAAC,GAAG,OAAO,OAAO,GAAG,eAAe,MAAM,CAAC,GAAG;EAAE;EAAM,GAAI,OAAO,SAAS,EAAE,QAAQ,OAAO,OAAO,IAAI,CAAC;CAAG,CAAC;AACnJ;;AAGA,SAAgB,cAAc,MAAoB;CAChD,MAAM,EAAE,UAAU,WAAW,GAAG,SAAS;CACzC,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC;AACrC"}
@@ -16,7 +16,7 @@ export { TestFilterBar, type TestFilterBarProps } from './TestFilterBar.js';
16
16
  export { TestRunnerProvider, useTestRunner, type TestRunnerContext, } from './context.js';
17
17
  export { DetailTabSelectProvider, useSelectDetailTab } from './detailTabContext.js';
18
18
  export { TestNodeAdapterRegistry, createTestRunnerRegistry, type TestNodeAdapter, type AdapterContext, type DetailTab, type DetailAttempt, } from './adapter.js';
19
- export { genericCopySections, mergeCopySections, buildBrief, buildNodeBrief, buildNodeJson, type BriefFact, type BriefSection, type CopyItem, type CopySections, } from './copy.js';
19
+ export { genericCopySections, mergeCopySections, buildBrief, buildNodeBrief, buildNodeJson, copyReferences, primaryCopyItem, type BriefFact, type BriefSection, type CopyItem, type CopySections, type MergedCopySections, } from './copy.js';
20
20
  export { type StatusCounts, type TestStatus, sum, sumNonTaskTests, aggregateStatusCounts, STATUS_LABELS, hasFailed, hasPending, testStatus, totalDuration, outcomeFor, type TestOutcome, statusToneFor, formatTestDuration, formatCount, humanizeName, collectFrameworks, collapseSingleChildChains, filterTests, } from './status.js';
21
21
  export { TEST_OUTCOMES, LINT_SEVERITIES, TEST_TOOLS, toolMark, toolKeyFor, type ResultMark, type LintSeverity, type ToolKind, type ToolMark, } from './marks.js';
22
22
  export { OutcomeIcon, LintSeverityIcon, ToolIcon } from './MarkIcons.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/test-runner/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,iBAAi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