@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,8 @@
1
1
  export { emptyVerifySummary, summarizeVerifyNodes, type VerifyChecklistItem, type VerifyNode, type VerifyNodeContext, type VerifyNodeProgress, type VerifyReport, type VerifyState, type VerifySummary, } from './verify-report.js';
2
2
  export { verifyNodeTest, verifyReportCounts, verifyReportTests } from './verifyReportTests.js';
3
3
  export { StepKindSections, StepOutputs, StepWait } from './stepKindViews.js';
4
- export { clockTime, formatDelay, formatExportValue, policySummary, readQuery, readStepDetail, readViolation, type StepQuery, type StepQueryBatch, type StepQueryConnection, type StepQueryResult, type StepQuerySample, type StepQuerySession, type ViolationDetail, type ViolationDetailResult, type StepAttempt, type StepDetail, type StepDetailResult, type StepExport, type WaitDetail, type WaitOutcome, type WaitPolicy, type WatcherEvent, } from './stepKind.js';
4
+ export { StepFilesView, type StepFilesViewProps } from './StepFilesView.js';
5
+ export { clockTime, formatDelay, formatExportValue, policySummary, readQuery, readStepDetail, readViolation, type StepQuery, type StepQueryBatch, type StepQueryConnection, type StepQueryResult, type StepQuerySample, type StepQuerySession, type ViolationDetail, type ViolationDetailResult, type StepAttempt, type StepDetail, type StepDetailResult, type StepExport, type StepFile, type WaitDetail, type WaitOutcome, type WaitPolicy, type WatcherEvent, } from './stepKind.js';
5
6
  export { verificationAdapters, type VerificationAdapterOptions } from './adapters.js';
6
7
  export { VerificationResults, type VerificationResultsProps } from './VerificationResults.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/verification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/verification/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -17,11 +17,24 @@ var STEP_FORM_STATES = [
17
17
  "supplied",
18
18
  "unanswered"
19
19
  ];
20
+ /** How a step file is previewed, decided by its mime type. */
21
+ function previewKind(mime) {
22
+ const type = mime.split(";", 1)[0].trim().toLowerCase();
23
+ if (type === "text/html") return "html";
24
+ if (type === "application/pdf") return "pdf";
25
+ if (type.startsWith("image/")) return "image";
26
+ return "none";
27
+ }
28
+ /** PDFs get their own detail tab; every other attached file previews in the step's detail. */
29
+ function isPdfFile(file) {
30
+ return previewKind(file.mime) === "pdf";
31
+ }
20
32
  var STEP_KEYS = /* @__PURE__ */ new Set([
21
33
  "step",
22
34
  "outputs",
23
35
  "view",
24
36
  "form",
37
+ "files",
25
38
  "exports",
26
39
  "wait",
27
40
  "attempts",
@@ -76,6 +89,19 @@ function readForm(value) {
76
89
  ...optional(form, "answeredAt", (v) => str(v, "detail.form.answeredAt"))
77
90
  };
78
91
  }
92
+ /** A step's `files`: what it attached through StepContext.AttachFile. */
93
+ function readFiles(value) {
94
+ return list(value, "detail.files").map((raw, index) => {
95
+ const path = `detail.files[${index}]`;
96
+ const file = record(raw, path);
97
+ return {
98
+ path: str(file.path, `${path}.path`),
99
+ name: str(file.name, `${path}.name`),
100
+ mime: str(file.mime, `${path}.mime`),
101
+ ...optional(file, "title", (v) => str(v, `${path}.title`))
102
+ };
103
+ });
104
+ }
79
105
  /** Durations arrive as Go-style strings ("15s"); a bare number is nanoseconds like every other duration on the wire. */
80
106
  function durationText(value, path) {
81
107
  if (typeof value === "string") return value;
@@ -202,6 +228,7 @@ function readStep(detail) {
202
228
  ...detail.outputs === void 0 ? {} : { outputs: detail.outputs },
203
229
  ...optional(detail, "view", readView),
204
230
  ...optional(detail, "form", readForm),
231
+ ...optional(detail, "files", readFiles),
205
232
  exports: detail.exports == null ? [] : readExports(detail.exports),
206
233
  ...optional(detail, "wait", readWait),
207
234
  attempts: readAttempts(detail.attempts ?? []),
@@ -368,7 +395,7 @@ function readQuerySession(value) {
368
395
  const s = record(value, path);
369
396
  return {
370
397
  engine: str(s.engine, `${path}.engine`),
371
- sessionId: num(s.sessionId, `${path}.sessionId`),
398
+ ...optional(s, "sessionId", (v) => num(v, `${path}.sessionId`)),
372
399
  ...optional(s, "queryId", (v) => str(v, `${path}.queryId`)),
373
400
  ...optional(s, "server", (v) => str(v, `${path}.server`)),
374
401
  ...optional(s, "database", (v) => str(v, `${path}.database`)),
@@ -388,9 +415,17 @@ var SAMPLE_STRINGS = [
388
415
  "startedAt",
389
416
  "transactionStartedAt",
390
417
  "queryId",
391
- "sql"
418
+ "sql",
419
+ "taskId",
420
+ "node",
421
+ "action",
422
+ "description",
423
+ "cluster",
424
+ "status",
425
+ "totalRelation"
392
426
  ];
393
427
  var SAMPLE_NUMBERS = [
428
+ "sessionId",
394
429
  "requestId",
395
430
  "blockedBy",
396
431
  "waitMs",
@@ -401,19 +436,37 @@ var SAMPLE_NUMBERS = [
401
436
  "reads",
402
437
  "writes",
403
438
  "memoryBytes",
404
- "openTransactions"
439
+ "openTransactions",
440
+ "percentComplete",
441
+ "estimatedRemainingMs",
442
+ "activeShardsPercent",
443
+ "unassignedShards",
444
+ "relocatingShards",
445
+ "pendingTasks",
446
+ "heapPercent",
447
+ "cpuPercent",
448
+ "searchActive",
449
+ "searchQueue",
450
+ "searchRejected",
451
+ "pages",
452
+ "rowsRead",
453
+ "totalHits"
454
+ ];
455
+ var SAMPLE_BOOLEANS = [
456
+ "blocked",
457
+ "cancellable",
458
+ "cancelled"
405
459
  ];
406
460
  function readQuerySample(value, index) {
407
461
  const path = `detail.query.diagnose[${index}]`;
408
462
  const s = record(value, path);
409
463
  const sample = {
410
464
  sampledAt: str(s.sampledAt, `${path}.sampledAt`),
411
- engine: str(s.engine, `${path}.engine`),
412
- sessionId: num(s.sessionId, `${path}.sessionId`),
413
- ...optional(s, "blocked", (v) => bool(v, `${path}.blocked`))
465
+ engine: str(s.engine, `${path}.engine`)
414
466
  };
415
467
  for (const key of SAMPLE_STRINGS) Object.assign(sample, optional(s, key, (v) => str(v, `${path}.${key}`)));
416
468
  for (const key of SAMPLE_NUMBERS) Object.assign(sample, optional(s, key, (v) => num(v, `${path}.${key}`)));
469
+ for (const key of SAMPLE_BOOLEANS) Object.assign(sample, optional(s, key, (v) => bool(v, `${path}.${key}`)));
417
470
  return sample;
418
471
  }
419
472
  function readQueryRecord(value) {
@@ -469,7 +522,8 @@ function stepQueryCopy(query) {
469
522
  {
470
523
  title: query.queryFile ? `Template (${query.queryFile})` : "Template",
471
524
  lang: "sql",
472
- body: query.template
525
+ body: query.template,
526
+ ...query.queryFile ? { source: query.queryFile } : {}
473
527
  },
474
528
  ...query.sql ? [{
475
529
  title: "SQL",
@@ -638,7 +692,9 @@ exports.clockTime = clockTime;
638
692
  exports.formatDelay = formatDelay;
639
693
  exports.formatExportValue = formatExportValue;
640
694
  exports.hasStepDetail = hasStepDetail;
695
+ exports.isPdfFile = isPdfFile;
641
696
  exports.policySummary = policySummary;
697
+ exports.previewKind = previewKind;
642
698
  exports.readQuery = readQuery;
643
699
  exports.readStepDetail = readStepDetail;
644
700
  exports.readViolation = readViolation;
@@ -1 +1 @@
1
- {"version":3,"file":"stepKind.cjs","names":["formatTestDuration"],"sources":["../../../src/data/verification/stepKind.ts"],"sourcesContent":["// The typed step-kind detail gavel's fixture verifier attaches to a node\n// (fixtures/verifier/report.go): `detail.step` names the kind and id, beside\n// the structured `wait`, `attempts`, `exports`, `outputs` and (for a\n// background Playwright watcher) `events`. Parsed here, once, so the detail\n// view and the copy brief read the same typed shape. A present-but-malformed\n// field is reported by path instead of being guessed at.\n\nimport type { BriefSection, Test } from \"../test-runner\";\nimport { formatTestDuration } from \"../test-runner\";\nimport type { VerifyNode } from \"./verify-report\";\nimport type { ClickyDocument } from \"../Clicky\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport type {\n LintSeverity,\n Violation,\n ViolationEntity,\n ViolationImageRegion,\n ViolationLocation,\n ViolationUrlTarget,\n} from \"../lint/types\";\n\nexport type StepRef = { id: string; kind: string };\n\nexport type WaitPolicy = {\n until?: string;\n failWhen?: string;\n interval?: string;\n backoff?: { factor?: number; max?: string };\n jitter?: string;\n timeout?: string;\n};\n\nexport const WAIT_OUTCOMES = [\"satisfied\", \"failed\", \"timeout\"] as const;\nexport type WaitOutcome = (typeof WAIT_OUTCOMES)[number];\n\nexport type WaitDetail = {\n policy: WaitPolicy;\n outcome: WaitOutcome;\n durationMs: number;\n /** The CEL expression that decided the outcome: policy.failWhen when it fired, else policy.until. */\n expression?: string;\n /** Domain reason the wait ended unsatisfied; may span several lines. */\n cause?: string;\n outputs?: unknown;\n error?: string;\n trace?: string;\n};\n\nexport type StepAttempt = { attempt: number; status: string; error?: string; durationMs?: number; result?: VerifyNode };\n\nexport type StepExport = { name: string; value: unknown; step: string };\n\nexport const WATCHER_EVENT_TYPES = [\"alert\", \"console\", \"pageerror\", \"response\"] as const;\nexport type WatcherEventType = (typeof WATCHER_EVENT_TYPES)[number];\n\nexport type WatcherEvent = {\n type: WatcherEventType;\n text?: string;\n url?: string;\n status?: number;\n detail?: string;\n};\n\nexport const STEP_FORM_STATES = [\"answered\", \"rejected\", \"supplied\", \"unanswered\"] as const;\nexport type StepFormState = (typeof STEP_FORM_STATES)[number];\n\nexport type StepForm = {\n title: string;\n description?: string;\n schema: JsonSchemaObject;\n values: Record<string, unknown>;\n state: StepFormState;\n answeredBy?: string;\n answeredAt?: string;\n};\n\nexport type StepDetail = {\n step: StepRef;\n outputs?: unknown;\n /** What the step returned, rendered by its kind as a clicky document (a query step's rows). */\n view?: ClickyDocument;\n /** The form a `form` step (or a fixture's `params:`) showed, and how it was answered. */\n form?: StepForm;\n exports: StepExport[];\n wait?: WaitDetail;\n attempts: StepAttempt[];\n events: WatcherEvent[];\n /** Whether the step runs in the background until teardown (a watcher). */\n background: boolean;\n /** Everything else in `node.detail` (cel_trace, run, recordings, …). */\n rest: Record<string, unknown>;\n};\n\nexport type StepDetailResult =\n | { kind: \"none\" }\n | { kind: \"step\"; step: StepDetail }\n | { kind: \"invalid\"; error: string };\n\nconst STEP_KEYS = new Set([\"step\", \"outputs\", \"view\", \"form\", \"exports\", \"wait\", \"attempts\", \"events\", \"background\"]);\n\nclass StepDetailError extends Error {}\n\nfunction fail(path: string, expectation: string): never {\n throw new StepDetailError(`${path} must be ${expectation}`);\n}\n\ntype Rec = Record<string, unknown>;\n\nconst isRecord = (value: unknown): value is Rec =>\n value !== null && typeof value === \"object\" && !Array.isArray(value);\n\nfunction record(value: unknown, path: string): Rec {\n return isRecord(value) ? value : fail(path, \"an object\");\n}\n\nfunction list(value: unknown, path: string): unknown[] {\n return Array.isArray(value) ? value : fail(path, \"an array\");\n}\n\nfunction str(value: unknown, path: string): string {\n return typeof value === \"string\" ? value : fail(path, \"a string\");\n}\n\nfunction num(value: unknown, path: string): number {\n return typeof value === \"number\" && Number.isFinite(value) ? value : fail(path, \"a number\");\n}\n\nfunction bool(value: unknown, path: string): boolean {\n return typeof value === \"boolean\" ? value : fail(path, \"a boolean\");\n}\n\nfunction oneOf<T extends string>(value: unknown, allowed: readonly T[], path: string): T {\n return allowed.includes(value as T)\n ? (value as T)\n : fail(path, `one of ${allowed.join(\", \")} (got ${JSON.stringify(value)})`);\n}\n\n/** `{ [key]: read(value) }` when the optional field is present, else `{}` — absent stays an absent key. */\nfunction optional<K extends string, T>(source: Rec, key: K, read: (value: unknown) => T): { [P in K]?: T } {\n return source[key] === undefined || source[key] === null ? {} : ({ [key]: read(source[key]) } as { [P in K]?: T });\n}\n\n/** A step's `view`: the clicky document (formatters.NewClickyDocument) its kind rendered. */\nfunction readView(value: unknown): ClickyDocument {\n const view = record(value, \"detail.view\");\n num(view.version, \"detail.view.version\");\n record(view.node, \"detail.view.node\");\n return view as unknown as ClickyDocument;\n}\n\n/** A step's `form`: the schema it showed, the values it ended with and how it was answered. */\nfunction readForm(value: unknown): StepForm {\n const form = record(value, \"detail.form\");\n const schema = record(form.schema, \"detail.form.schema\");\n return {\n title: str(form.title, \"detail.form.title\"),\n schema: schema as JsonSchemaObject,\n values: record(form.values, \"detail.form.values\"),\n state: oneOf(form.state, STEP_FORM_STATES, \"detail.form.state\"),\n ...optional(form, \"description\", (v) => str(v, \"detail.form.description\")),\n ...optional(form, \"answeredBy\", (v) => str(v, \"detail.form.answeredBy\")),\n ...optional(form, \"answeredAt\", (v) => str(v, \"detail.form.answeredAt\")),\n };\n}\n\n/** Durations arrive as Go-style strings (\"15s\"); a bare number is nanoseconds like every other duration on the wire. */\nfunction durationText(value: unknown, path: string): string {\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return formatTestDuration(value);\n return fail(path, \"a duration string or nanosecond number\");\n}\n\nfunction scalarText(value: unknown, path: string): string {\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n return fail(path, \"a string or number\");\n}\n\nfunction readPolicy(value: unknown): WaitPolicy {\n const path = \"detail.wait.policy\";\n const policy = record(value, path);\n const backoff = (raw: unknown) => {\n const b = record(raw, `${path}.backoff`);\n return {\n ...optional(b, \"factor\", (v) => num(v, `${path}.backoff.factor`)),\n ...optional(b, \"max\", (v) => durationText(v, `${path}.backoff.max`)),\n };\n };\n return {\n ...optional(policy, \"until\", (v) => str(v, `${path}.until`)),\n ...optional(policy, \"failWhen\", (v) => str(v, `${path}.failWhen`)),\n ...optional(policy, \"interval\", (v) => durationText(v, `${path}.interval`)),\n ...optional(policy, \"backoff\", backoff),\n ...optional(policy, \"jitter\", (v) => scalarText(v, `${path}.jitter`)),\n ...optional(policy, \"timeout\", (v) => durationText(v, `${path}.timeout`)),\n };\n}\n\nfunction readWait(value: unknown): WaitDetail {\n const wait = record(value, \"detail.wait\");\n return {\n policy: readPolicy(wait.policy ?? {}),\n outcome: oneOf(wait.outcome, WAIT_OUTCOMES, \"detail.wait.outcome\"),\n durationMs: nonnegative(wait.durationMs, \"detail.wait.durationMs\"),\n ...(wait.outputs === undefined ? {} : { outputs: wait.outputs }),\n ...optional(wait, \"expression\", (v) => str(v, \"detail.wait.expression\")),\n ...optional(wait, \"cause\", (v) => str(v, \"detail.wait.cause\")),\n ...optional(wait, \"error\", (v) => str(v, \"detail.wait.error\")),\n ...optional(wait, \"trace\", (v) => str(v, \"detail.wait.trace\")),\n };\n}\n\nfunction nonnegative(value: unknown, path: string): number {\n const result = num(value, path);\n return result >= 0 ? result : fail(path, \"non-negative\");\n}\n\nfunction readAttemptResult(value: unknown, path: string): VerifyNode {\n const node = record(value, path);\n str(node.name, `${path}.name`);\n for (const key of [\"framework\", \"message\", \"command\", \"work_dir\", \"stdout\", \"stderr\"]) {\n if (node[key] !== undefined) str(node[key], `${path}.${key}`);\n }\n for (const key of [\"passed\", \"failed\", \"timed_out\", \"warned\", \"skipped\", \"pending\", \"running\"]) {\n if (node[key] !== undefined) bool(node[key], `${path}.${key}`);\n }\n if (node.duration !== undefined) nonnegative(node.duration, `${path}.duration`);\n if (node.detail !== undefined) record(node.detail, `${path}.detail`);\n if (node.children !== undefined) list(node.children, `${path}.children`).forEach((child, i) => readAttemptResult(child, `${path}.children[${i}]`));\n return { ...node, name: str(node.name, `${path}.name`) } as VerifyNode;\n}\n\nfunction readAttempt(value: unknown, index: number): StepAttempt {\n const path = `detail.attempts[${index}]`;\n const a = record(value, path);\n return {\n attempt: num(a.attempt, `${path}.attempt`),\n status: str(a.status, `${path}.status`),\n ...optional(a, \"error\", (v) => str(v, `${path}.error`)),\n ...optional(a, \"durationMs\", (v) => nonnegative(v, `${path}.durationMs`)),\n ...optional(a, \"result\", (v) => readAttemptResult(v, `${path}.result`)),\n };\n}\n\nfunction readAttempts(value: unknown): StepAttempt[] {\n const attempts = list(value, \"detail.attempts\").map(readAttempt);\n attempts.forEach((attempt, index) => {\n if (attempt.attempt !== index + 1) fail(`detail.attempts[${index}].attempt`, `the sequence number ${index + 1}`);\n });\n return attempts;\n}\n\nfunction readExports(value: unknown): StepExport[] {\n return Object.entries(record(value, \"detail.exports\")).map(([name, raw]) => {\n const path = `detail.exports.${name}`;\n const entry = record(raw, path);\n return { name, value: entry.value, step: str(entry.step, `${path}.step`) };\n });\n}\n\nfunction readEvent(value: unknown, index: number): WatcherEvent {\n const path = `detail.events[${index}]`;\n const e = record(value, path);\n return {\n type: oneOf(e.type, WATCHER_EVENT_TYPES, `${path}.type`),\n ...optional(e, \"text\", (v) => str(v, `${path}.text`)),\n ...optional(e, \"url\", (v) => str(v, `${path}.url`)),\n ...optional(e, \"status\", (v) => num(v, `${path}.status`)),\n ...optional(e, \"detail\", (v) => str(v, `${path}.detail`)),\n };\n}\n\nfunction readStep(detail: Rec): StepDetail {\n const ref = record(detail.step, \"detail.step\");\n const rest = Object.fromEntries(Object.entries(detail).filter(([key]) => !STEP_KEYS.has(key)));\n return {\n step: { id: str(ref.id, \"detail.step.id\"), kind: str(ref.kind, \"detail.step.kind\") },\n ...(detail.outputs === undefined ? {} : { outputs: detail.outputs }),\n ...optional(detail, \"view\", readView),\n ...optional(detail, \"form\", readForm),\n exports: detail.exports == null ? [] : readExports(detail.exports),\n ...optional(detail, \"wait\", readWait),\n attempts: readAttempts(detail.attempts ?? []),\n events: list(detail.events ?? [], \"detail.events\").map(readEvent),\n background: bool(detail.background ?? false, \"detail.background\"),\n rest,\n };\n}\n\n/**\n * Whether `node.detail` carries a typed step (`detail.step`), and if so its\n * parsed contents. A node without `detail.step` is \"none\" whatever else its\n * detail holds; a `step` whose fields violate the contract is \"invalid\" with\n * the offending path, so the view can say so rather than render a guess.\n */\nexport function readStepDetail(detail: unknown): StepDetailResult {\n if (!isRecord(detail) || detail.step === undefined) return { kind: \"none\" };\n try {\n return { kind: \"step\", step: readStep(detail) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\nexport type ViolationDetail = Violation & { locations: ViolationLocation[] };\n\nexport type ViolationDetailResult =\n | { kind: \"none\" }\n | { kind: \"violation\"; violation: ViolationDetail }\n | { kind: \"invalid\"; error: string };\n\nconst SEVERITIES = [\"error\", \"warning\", \"info\"] as const satisfies readonly LintSeverity[];\n\nfunction readEntity(value: unknown, path: string): ViolationEntity {\n const entity = record(value, path);\n return {\n kind: str(entity.kind, `${path}.kind`),\n id: str(entity.id, `${path}.id`),\n ...optional(entity, \"name\", (v) => str(v, `${path}.name`)),\n };\n}\n\nconst URL_STRATEGIES = [\"css\", \"xpath\", \"testId\", \"role\", \"text\"] as const;\n\nfunction readUrlTarget(value: unknown, path: string): ViolationUrlTarget {\n const target = record(value, path);\n const read: ViolationUrlTarget = {\n url: str(target.url, `${path}.url`),\n ...Object.assign({}, ...[...URL_STRATEGIES, \"name\"].map((key) => optional(target, key, (v) => str(v, `${path}.${key}`)))),\n };\n const strategies = URL_STRATEGIES.filter((key) => read[key] !== undefined);\n if (strategies.length > 1) fail(path, `a target with at most one selector strategy (got ${strategies.join(\", \")})`);\n if (read.name !== undefined && read.role === undefined) fail(`${path}.name`, \"paired with a role\");\n return read;\n}\n\nfunction readImage(value: unknown, path: string): ViolationImageRegion {\n const image = record(value, path);\n return {\n src: str(image.src, `${path}.src`),\n x: num(image.x, `${path}.x`),\n y: num(image.y, `${path}.y`),\n width: num(image.width, `${path}.width`),\n height: num(image.height, `${path}.height`),\n };\n}\n\nfunction readLocation(value: unknown, index: number): ViolationLocation {\n const path = `detail.violation.locations[${index}]`;\n const l = record(value, path);\n const location: ViolationLocation = {\n ...optional(l, \"file\", (v) => str(v, `${path}.file`)),\n ...optional(l, \"line\", (v) => num(v, `${path}.line`)),\n ...optional(l, \"column\", (v) => num(v, `${path}.column`)),\n ...optional(l, \"end_line\", (v) => num(v, `${path}.end_line`)),\n ...optional(l, \"ref\", (v) => str(v, `${path}.ref`)),\n ...optional(l, \"entity\", (v) => readEntity(v, `${path}.entity`)),\n ...optional(l, \"url\", (v) => readUrlTarget(v, `${path}.url`)),\n ...optional(l, \"image\", (v) => readImage(v, `${path}.image`)),\n ...optional(l, \"message\", (v) => str(v, `${path}.message`)),\n };\n if (!(location.file || location.entity || location.url || location.image || location.message)) {\n fail(path, \"a location naming a file, entity, url, image or message\");\n }\n return location;\n}\n\nfunction readRule(value: unknown): NonNullable<Violation[\"rule\"]> {\n const path = \"detail.violation.rule\";\n const rule = record(value, path);\n return {\n ...optional(rule, \"method\", (v) => str(v, `${path}.method`)),\n ...optional(rule, \"description\", (v) => str(v, `${path}.description`)),\n ...optional(rule, \"pattern\", (v) => str(v, `${path}.pattern`)),\n ...optional(rule, \"package\", (v) => str(v, `${path}.package`)),\n };\n}\n\nfunction readViolationRecord(value: unknown): ViolationDetail {\n const path = \"detail.violation\";\n const v = record(value, path);\n return {\n ...optional(v, \"severity\", (s) => oneOf(s, SEVERITIES, `${path}.severity`)),\n ...optional(v, \"message\", (m) => str(m, `${path}.message`)),\n ...optional(v, \"rule\", readRule),\n ...optional(v, \"source\", (s) => str(s, `${path}.source`)),\n ...optional(v, \"file\", (f) => str(f, `${path}.file`)),\n ...optional(v, \"line\", (n) => num(n, `${path}.line`)),\n locations: list(v.locations ?? [], `${path}.locations`).map(readLocation),\n };\n}\n\n/**\n * The lint violation a finding node carries in `detail.violation` (gavel\n * models.Violation, published under fixtures.ViolationMetadataKey). Read apart\n * from the typed step: a finding has no `detail.step`. A violation whose fields\n * break the contract is \"invalid\" with the offending path.\n */\nexport function readViolation(detail: unknown): ViolationDetailResult {\n if (!isRecord(detail) || detail.violation === undefined) return { kind: \"none\" };\n try {\n return { kind: \"violation\", violation: readViolationRecord(detail.violation) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\nfunction withoutKey(detail: unknown, key: string): unknown {\n if (!isRecord(detail) || !(key in detail)) return detail;\n const rest = Object.fromEntries(Object.entries(detail).filter(([k]) => k !== key));\n return Object.keys(rest).length > 0 ? rest : undefined;\n}\n\n/** `detail` without its `violation`, which the Locations section shows instead of the raw block. */\nexport function withoutViolation(detail: unknown): unknown {\n return withoutKey(detail, \"violation\");\n}\n\n/**\n * What a query step ran (gavel fixtures.QueryMetadataKey): the query as authored,\n * its `$(.params.x)` / `{{.params.x}}` references intact; the statement\n * commons-db issued with them bound to driver placeholders; the bound values in\n * placeholder order; the step's params by name; and the file the template came from.\n */\nexport type StepQuery = {\n template: string;\n sql?: string;\n arguments?: unknown[];\n params?: Record<string, unknown>;\n queryFile?: string;\n /** The connection the query runs on and where it points; never its secrets. */\n connection?: StepQueryConnection;\n /** The batches of a SQL program that have ended, with the rows each changed where the driver reports it. */\n batches?: StepQueryBatch[];\n /** The server session the query ran on (SPID, backend PID, connection id or ClickHouse query id). */\n session?: StepQuerySession;\n /** AutoDiagnose samples of that session while the statement ran, oldest first (gavel keeps the last 100). */\n diagnose?: StepQuerySample[];\n /** How many older samples gavel dropped beyond the ones in `diagnose`. */\n diagnoseDropped?: number;\n /** Why sampling stopped (a missing grant, a read error); the query itself is unaffected. */\n diagnoseError?: string;\n};\n\n/** commons-db query.ServerSession. `engine` is postgres, sqlserver, mysql or clickhouse; `sessionId` is 0 for clickhouse, which uses `queryId`. */\nexport type StepQuerySession = {\n engine: string;\n sessionId: number;\n queryId?: string;\n server?: string;\n database?: string;\n user?: string;\n page?: number;\n};\n\n/**\n * commons-db sqlactivity.Sample as JSON. A zero metric means the engine does not\n * report it; `blockedBy` 0 means not blocked; `transactionStartedAt` may be the\n * zero time (\"0001-01-01T00:00:00Z\").\n */\nexport type StepQuerySample = {\n sampledAt: string;\n engine: string;\n sessionId: number;\n database?: string;\n requestId?: number;\n blockedBy?: number;\n blocked?: boolean;\n user?: string;\n application?: string;\n clientHost?: string;\n state?: string;\n command?: string;\n waitType?: string;\n waitResource?: string;\n waitMs?: number;\n startedAt?: string;\n transactionStartedAt?: string;\n elapsedMs?: number;\n transactionMs?: number;\n cpuMs?: number;\n logicalReads?: number;\n reads?: number;\n writes?: number;\n memoryBytes?: number;\n openTransactions?: number;\n queryId?: string;\n sql?: string;\n};\n\nexport type StepQueryConnection = {\n name: string;\n type: string;\n host?: string;\n port?: string;\n user?: string;\n database?: string;\n};\n\n/** `run` is the batch's repetition under `GO <count>`, 1 for a batch that runs once. */\nexport type StepQueryBatch = { batch: number; run: number; rowsAffected?: number };\n\nfunction readQueryConnection(value: unknown): StepQueryConnection {\n const path = \"detail.query.connection\";\n const c = record(value, path);\n return {\n name: str(c.name, `${path}.name`),\n type: str(c.type, `${path}.type`),\n ...optional(c, \"host\", (v) => str(v, `${path}.host`)),\n ...optional(c, \"port\", (v) => str(v, `${path}.port`)),\n ...optional(c, \"user\", (v) => str(v, `${path}.user`)),\n ...optional(c, \"database\", (v) => str(v, `${path}.database`)),\n };\n}\n\nfunction readQueryBatch(value: unknown, index: number): StepQueryBatch {\n const path = `detail.query.batches[${index}]`;\n const b = record(value, path);\n return {\n batch: num(b.batch, `${path}.batch`),\n run: num(b.run, `${path}.run`),\n ...optional(b, \"rowsAffected\", (v) => num(v, `${path}.rowsAffected`)),\n };\n}\n\nfunction readQuerySession(value: unknown): StepQuerySession {\n const path = \"detail.query.session\";\n const s = record(value, path);\n return {\n engine: str(s.engine, `${path}.engine`),\n sessionId: num(s.sessionId, `${path}.sessionId`),\n ...optional(s, \"queryId\", (v) => str(v, `${path}.queryId`)),\n ...optional(s, \"server\", (v) => str(v, `${path}.server`)),\n ...optional(s, \"database\", (v) => str(v, `${path}.database`)),\n ...optional(s, \"user\", (v) => str(v, `${path}.user`)),\n ...optional(s, \"page\", (v) => num(v, `${path}.page`)),\n };\n}\n\nconst SAMPLE_STRINGS = [\n \"database\", \"user\", \"application\", \"clientHost\", \"state\", \"command\", \"waitType\", \"waitResource\",\n \"startedAt\", \"transactionStartedAt\", \"queryId\", \"sql\",\n] as const;\nconst SAMPLE_NUMBERS = [\n \"requestId\", \"blockedBy\", \"waitMs\", \"elapsedMs\", \"transactionMs\", \"cpuMs\", \"logicalReads\", \"reads\", \"writes\",\n \"memoryBytes\", \"openTransactions\",\n] as const;\n\nfunction readQuerySample(value: unknown, index: number): StepQuerySample {\n const path = `detail.query.diagnose[${index}]`;\n const s = record(value, path);\n const sample: StepQuerySample = {\n sampledAt: str(s.sampledAt, `${path}.sampledAt`),\n engine: str(s.engine, `${path}.engine`),\n sessionId: num(s.sessionId, `${path}.sessionId`),\n ...optional(s, \"blocked\", (v) => bool(v, `${path}.blocked`)),\n };\n for (const key of SAMPLE_STRINGS) Object.assign(sample, optional(s, key, (v) => str(v, `${path}.${key}`)));\n for (const key of SAMPLE_NUMBERS) Object.assign(sample, optional(s, key, (v) => num(v, `${path}.${key}`)));\n return sample;\n}\n\nexport type StepQueryResult =\n | { kind: \"none\" }\n | { kind: \"query\"; query: StepQuery }\n | { kind: \"invalid\"; error: string };\n\nfunction readQueryRecord(value: unknown): StepQuery {\n const path = \"detail.query\";\n const q = record(value, path);\n return {\n template: str(q.template, `${path}.template`),\n ...optional(q, \"sql\", (v) => str(v, `${path}.sql`)),\n ...optional(q, \"arguments\", (v) => list(v, `${path}.arguments`)),\n ...optional(q, \"params\", (v) => record(v, `${path}.params`)),\n ...optional(q, \"queryFile\", (v) => str(v, `${path}.queryFile`)),\n ...optional(q, \"connection\", readQueryConnection),\n ...optional(q, \"batches\", (v) => list(v, `${path}.batches`).map(readQueryBatch)),\n ...optional(q, \"session\", readQuerySession),\n ...optional(q, \"diagnose\", (v) => list(v, `${path}.diagnose`).map(readQuerySample)),\n ...optional(q, \"diagnoseDropped\", (v) => num(v, `${path}.diagnoseDropped`)),\n ...optional(q, \"diagnoseError\", (v) => str(v, `${path}.diagnoseError`)),\n };\n}\n\n/**\n * The query a query step carries in `detail.query`, read apart from the typed\n * step like the violation (a markdown query row has no `detail.step`). A record\n * whose fields break the contract is \"invalid\" with the offending path.\n */\nexport function readQuery(detail: unknown): StepQueryResult {\n if (!isRecord(detail) || detail.query === undefined) return { kind: \"none\" };\n try {\n return { kind: \"query\", query: readQueryRecord(detail.query) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\n/** `detail` without its `query`, which the Query section shows instead of the raw block. */\nexport function withoutQuery(detail: unknown): unknown {\n return withoutKey(detail, \"query\");\n}\n\n/** Brief sections for the \"Copy details\" button: the template, the issued SQL and the params it bound. */\nexport function stepQueryCopy(query: StepQuery): BriefSection[] {\n const params = Object.entries(query.params ?? {});\n const connection = query.connection;\n return [\n ...(connection ? [{ title: \"Connection\", body: connectionCopy(connection) }] : []),\n { title: query.queryFile ? `Template (${query.queryFile})` : \"Template\", lang: \"sql\", body: query.template },\n ...(query.sql ? [{ title: \"SQL\", lang: \"sql\", body: query.sql }] : []),\n ...(params.length > 0 ? [{ title: \"Params\", body: params.map(([name, value]) => `${name}=${formatExportValue(value)}`).join(\"\\n\") }] : []),\n ...(query.arguments && query.arguments.length > 0\n ? [{ title: \"Arguments\", body: query.arguments.map((value, i) => `${i + 1}: ${formatExportValue(value)}`).join(\"\\n\") }]\n : []),\n ];\n}\n\n/** The connection as the badges show it: `name (type)`, then host:port, user and db where known. */\nfunction connectionCopy(connection: StepQueryConnection): string {\n const host = connection.host && (connection.port ? `${connection.host}:${connection.port}` : connection.host);\n return [\n `${connection.name} (${connection.type})`,\n host && `host: ${host}`,\n connection.user && `user: ${connection.user}`,\n connection.database && `db: ${connection.database}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** How a `form` step's form was answered, or undefined for a node that is no (valid) form step. */\nexport function stepFormState(node: Pick<Test, \"detail\">): StepFormState | undefined {\n const parsed = readStepDetail(node.detail);\n return parsed.kind === \"step\" ? parsed.step.form?.state : undefined;\n}\n\n/** The step detail when there is one, for matchers that only need to know. */\nexport function hasStepDetail(detail: unknown): boolean {\n return readStepDetail(detail).kind !== \"none\";\n}\n\n/** The fixtures.ExecutionNode fields gavel puts at the top of `node.detail`, shown as a header instead of raw JSON. */\nexport type ExecutionHeader = {\n kind?: string;\n state?: string;\n file?: string;\n sectionPath?: string;\n /** Zero-based row of the step within its section. */\n rowIndex?: number;\n line?: number;\n startedAt?: string;\n finishedAt?: string;\n /** Nanoseconds. */\n durationNs?: number;\n error?: string;\n};\n\nconst isString = (value: unknown): value is string => typeof value === \"string\";\nconst isNumber = (value: unknown): value is number => typeof value === \"number\" && Number.isFinite(value);\n\n/**\n * Splits the ExecutionNode fields (name, kind, state, origin, started_at,\n * finished_at, duration, error) off `detail` into a header, dropping the\n * internal `key`. A field of an unexpected type is not consumed — it stays in\n * `rest`, so it is visible in the raw block rather than silently hidden.\n */\nexport function splitExecutionDetail(detail: unknown): { header: ExecutionHeader; rest: unknown } {\n if (!isRecord(detail)) return { header: {}, rest: detail };\n const rest: Rec = { ...detail };\n delete rest.key;\n const take = <T>(key: string, guard: (value: unknown) => value is T): T | undefined => {\n const value = rest[key];\n if (!guard(value)) return undefined;\n delete rest[key];\n return value;\n };\n const header: ExecutionHeader = {};\n const assign = <K extends keyof ExecutionHeader>(field: K, value: ExecutionHeader[K] | undefined) => {\n if (value !== undefined) header[field] = value;\n };\n take(\"name\", isString);\n assign(\"kind\", take(\"kind\", isString));\n assign(\"state\", take(\"state\", isString));\n assign(\"startedAt\", take(\"started_at\", isString));\n assign(\"finishedAt\", take(\"finished_at\", isString));\n assign(\"durationNs\", take(\"duration\", isNumber));\n assign(\"error\", take(\"error\", isString));\n const origin = take(\"origin\", isRecord);\n if (origin) {\n assign(\"file\", isString(origin.file) ? origin.file : undefined);\n assign(\"sectionPath\", isString(origin.section_path) ? origin.section_path : undefined);\n assign(\"rowIndex\", isNumber(origin.row_index) ? origin.row_index : undefined);\n assign(\"line\", isNumber(origin.line) ? origin.line : undefined);\n }\n return { header, rest: Object.keys(rest).length > 0 ? rest : undefined };\n}\n\nexport type WaitCondition = \"until\" | \"failWhen\";\n\n/** Which of the wait's two conditions decided its outcome. `expression` is authoritative; older payloads without it are inferred from the outcome. */\nexport function waitDecidedBy(wait: WaitDetail): WaitCondition {\n if (wait.expression !== undefined) return wait.expression === wait.policy.failWhen ? \"failWhen\" : \"until\";\n return wait.outcome === \"failed\" && wait.policy.failWhen ? \"failWhen\" : \"until\";\n}\n\n/** `09:00:04` from an RFC 3339 timestamp, as written (no timezone conversion); anything else verbatim. */\nexport function clockTime(at: string): string {\n return /T(\\d{2}:\\d{2}:\\d{2})/.exec(at)?.[1] ?? at;\n}\n\nexport function formatDelay(ms: number): string {\n return ms <= 0 ? \"0ms\" : formatTestDuration(ms * 1e6);\n}\n\n/** `every 1s · backoff ×1.5 up to 10s · jitter ±20% · timeout 3m`, skipping what the policy leaves unset. */\nexport function policySummary(policy: WaitPolicy): string {\n const backoff = [\n policy.backoff?.factor !== undefined && `×${policy.backoff.factor}`,\n policy.backoff?.max && `up to ${policy.backoff.max}`,\n ].filter(Boolean);\n return [\n policy.interval && `every ${policy.interval}`,\n backoff.length > 0 && `backoff ${backoff.join(\" \")}`,\n policy.jitter && `jitter ±${policy.jitter}`,\n policy.timeout && `timeout ${policy.timeout}`,\n ]\n .filter(Boolean)\n .join(\" · \");\n}\n\nexport function formatExportValue(value: unknown): string {\n if (value === undefined) return \"\";\n return typeof value === \"string\" ? value : JSON.stringify(value);\n}\n\nfunction waitCopy(wait: WaitDetail): BriefSection {\n const { policy } = wait;\n const lines = [\n `outcome: ${wait.outcome}`,\n `elapsed: ${formatDelay(wait.durationMs)}`,\n `policy: ${policySummary(policy)}`,\n policy.until && `until: ${policy.until}`,\n policy.failWhen && `failWhen: ${policy.failWhen}`,\n wait.expression && `decided by: ${wait.expression}`,\n wait.cause && `cause: ${wait.cause}`,\n wait.error && `error: ${wait.error}`,\n wait.trace && `trace: ${wait.trace}`,\n wait.outputs !== undefined && `outputs: ${JSON.stringify(wait.outputs)}`,\n ];\n return { title: \"Wait\", body: lines.filter(Boolean).join(\"\\n\") };\n}\n\nfunction attemptLine(a: StepAttempt): string {\n const head = [`#${a.attempt}`, a.status, a.durationMs !== undefined && formatDelay(a.durationMs)];\n return `${head.filter(Boolean).join(\" \")}${a.error ? ` — ${a.error}` : \"\"}`;\n}\n\nfunction eventLine(e: WatcherEvent): string {\n const body = [e.status, e.text, e.url].filter((part) => part !== undefined).join(\" \");\n return `[${e.type}]${body ? ` ${body}` : \"\"}${e.detail ? ` — ${e.detail}` : \"\"}`;\n}\n\n/** Brief sections for the \"Copy details\" button: wait trace, retry attempts, exports and watcher events. */\nexport function stepKindCopy(step: StepDetail): BriefSection[] {\n return [\n ...(step.outputs !== undefined ? [{ title: \"Outputs\", body: JSON.stringify(step.outputs, null, 2), lang: \"json\" }] : []),\n ...(step.wait ? [waitCopy(step.wait)] : []),\n ...(step.attempts.length > 0 ? [{ title: \"Attempts\", body: step.attempts.map(attemptLine).join(\"\\n\") }] : []),\n ...(step.exports.length > 0\n ? [{ title: \"Exports\", body: step.exports.map((e) => `${e.name}=${formatExportValue(e.value)} (from ${e.step})`).join(\"\\n\") }]\n : []),\n ...(step.events.length > 0 ? [{ title: \"Events\", body: step.events.map(eventLine).join(\"\\n\") }] : []),\n ];\n}\n"],"mappings":";;AAgCA,IAAa,gBAAgB;CAAC;CAAa;CAAU;AAAS;AAoB9D,IAAa,sBAAsB;CAAC;CAAS;CAAW;CAAa;AAAU;AAW/E,IAAa,mBAAmB;CAAC;CAAY;CAAY;CAAY;AAAY;AAmCjF,IAAM,4BAAY,IAAI,IAAI;CAAC;CAAQ;CAAW;CAAQ;CAAQ;CAAW;CAAQ;CAAY;CAAU;AAAY,CAAC;AAEpH,IAAM,kBAAN,cAA8B,MAAM,CAAC;AAErC,SAAS,KAAK,MAAc,aAA4B;CACtD,MAAM,IAAI,gBAAgB,GAAG,KAAK,WAAW,aAAa;AAC5D;AAIA,IAAM,YAAY,UAChB,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAErE,SAAS,OAAO,OAAgB,MAAmB;CAC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E,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI;EAAE,CAAC,IAC3H,CAAC;EACL,GAAI,KAAK,OAAO,SAAS,IAAI,CAAC;GAAE,OAAO;GAAU,MAAM,KAAK,OAAO,IAAI,SAAS,CAAC,CAAC,KAAK,IAAI;EAAE,CAAC,IAAI,CAAC;CACrG;AACF"}
1
+ {"version":3,"file":"stepKind.cjs","names":["formatTestDuration"],"sources":["../../../src/data/verification/stepKind.ts"],"sourcesContent":["// The typed step-kind detail gavel's fixture verifier attaches to a node\n// (fixtures/verifier/report.go): `detail.step` names the kind and id, beside\n// the structured `wait`, `attempts`, `exports`, `outputs` and (for a\n// background Playwright watcher) `events`. Parsed here, once, so the detail\n// view and the copy brief read the same typed shape. A present-but-malformed\n// field is reported by path instead of being guessed at.\n\nimport type { BriefSection, Test } from \"../test-runner\";\nimport { formatTestDuration } from \"../test-runner\";\nimport type { VerifyNode } from \"./verify-report\";\nimport type { ClickyDocument } from \"../Clicky\";\nimport type { JsonSchemaObject } from \"../../components/json-schema-form-types\";\nimport type {\n LintSeverity,\n Violation,\n ViolationEntity,\n ViolationImageRegion,\n ViolationLocation,\n ViolationUrlTarget,\n} from \"../lint/types\";\n\nexport type StepRef = { id: string; kind: string };\n\nexport type WaitPolicy = {\n until?: string;\n failWhen?: string;\n interval?: string;\n backoff?: { factor?: number; max?: string };\n jitter?: string;\n timeout?: string;\n};\n\nexport const WAIT_OUTCOMES = [\"satisfied\", \"failed\", \"timeout\"] as const;\nexport type WaitOutcome = (typeof WAIT_OUTCOMES)[number];\n\nexport type WaitDetail = {\n policy: WaitPolicy;\n outcome: WaitOutcome;\n durationMs: number;\n /** The CEL expression that decided the outcome: policy.failWhen when it fired, else policy.until. */\n expression?: string;\n /** Domain reason the wait ended unsatisfied; may span several lines. */\n cause?: string;\n outputs?: unknown;\n error?: string;\n trace?: string;\n};\n\nexport type StepAttempt = { attempt: number; status: string; error?: string; durationMs?: number; result?: VerifyNode };\n\nexport type StepExport = { name: string; value: unknown; step: string };\n\nexport const WATCHER_EVENT_TYPES = [\"alert\", \"console\", \"pageerror\", \"response\"] as const;\nexport type WatcherEventType = (typeof WATCHER_EVENT_TYPES)[number];\n\nexport type WatcherEvent = {\n type: WatcherEventType;\n text?: string;\n url?: string;\n status?: number;\n detail?: string;\n};\n\nexport const STEP_FORM_STATES = [\"answered\", \"rejected\", \"supplied\", \"unanswered\"] as const;\nexport type StepFormState = (typeof STEP_FORM_STATES)[number];\n\nexport type StepForm = {\n title: string;\n description?: string;\n schema: JsonSchemaObject;\n values: Record<string, unknown>;\n state: StepFormState;\n answeredBy?: string;\n answeredAt?: string;\n};\n\n/** A file a step attached (gavel fixtures.StepFile): an absolute `path` the host serves, with its mime type. */\nexport type StepFile = { path: string; name: string; mime: string; title?: string };\n\nexport type FilePreview = \"html\" | \"pdf\" | \"image\" | \"none\";\n\n/** How a step file is previewed, decided by its mime type. */\nexport function previewKind(mime: string): FilePreview {\n const type = mime.split(\";\", 1)[0]!.trim().toLowerCase();\n if (type === \"text/html\") return \"html\";\n if (type === \"application/pdf\") return \"pdf\";\n if (type.startsWith(\"image/\")) return \"image\";\n return \"none\";\n}\n\n/** PDFs get their own detail tab; every other attached file previews in the step's detail. */\nexport function isPdfFile(file: StepFile): boolean {\n return previewKind(file.mime) === \"pdf\";\n}\n\nexport type StepDetail = {\n step: StepRef;\n outputs?: unknown;\n /** What the step returned, rendered by its kind as a clicky document (a query step's rows). */\n view?: ClickyDocument;\n /** The form a `form` step (or a fixture's `params:`) showed, and how it was answered. */\n form?: StepForm;\n /** Files the step attached (a facet report's html/pdf/png), previewed through the host's `fileUrl`. */\n files?: StepFile[];\n exports: StepExport[];\n wait?: WaitDetail;\n attempts: StepAttempt[];\n events: WatcherEvent[];\n /** Whether the step runs in the background until teardown (a watcher). */\n background: boolean;\n /** Everything else in `node.detail` (cel_trace, run, recordings, …). */\n rest: Record<string, unknown>;\n};\n\nexport type StepDetailResult =\n | { kind: \"none\" }\n | { kind: \"step\"; step: StepDetail }\n | { kind: \"invalid\"; error: string };\n\nconst STEP_KEYS = new Set([\"step\", \"outputs\", \"view\", \"form\", \"files\", \"exports\", \"wait\", \"attempts\", \"events\", \"background\"]);\n\nclass StepDetailError extends Error {}\n\nfunction fail(path: string, expectation: string): never {\n throw new StepDetailError(`${path} must be ${expectation}`);\n}\n\ntype Rec = Record<string, unknown>;\n\nconst isRecord = (value: unknown): value is Rec =>\n value !== null && typeof value === \"object\" && !Array.isArray(value);\n\nfunction record(value: unknown, path: string): Rec {\n return isRecord(value) ? value : fail(path, \"an object\");\n}\n\nfunction list(value: unknown, path: string): unknown[] {\n return Array.isArray(value) ? value : fail(path, \"an array\");\n}\n\nfunction str(value: unknown, path: string): string {\n return typeof value === \"string\" ? value : fail(path, \"a string\");\n}\n\nfunction num(value: unknown, path: string): number {\n return typeof value === \"number\" && Number.isFinite(value) ? value : fail(path, \"a number\");\n}\n\nfunction bool(value: unknown, path: string): boolean {\n return typeof value === \"boolean\" ? value : fail(path, \"a boolean\");\n}\n\nfunction oneOf<T extends string>(value: unknown, allowed: readonly T[], path: string): T {\n return allowed.includes(value as T)\n ? (value as T)\n : fail(path, `one of ${allowed.join(\", \")} (got ${JSON.stringify(value)})`);\n}\n\n/** `{ [key]: read(value) }` when the optional field is present, else `{}` — absent stays an absent key. */\nfunction optional<K extends string, T>(source: Rec, key: K, read: (value: unknown) => T): { [P in K]?: T } {\n return source[key] === undefined || source[key] === null ? {} : ({ [key]: read(source[key]) } as { [P in K]?: T });\n}\n\n/** A step's `view`: the clicky document (formatters.NewClickyDocument) its kind rendered. */\nfunction readView(value: unknown): ClickyDocument {\n const view = record(value, \"detail.view\");\n num(view.version, \"detail.view.version\");\n record(view.node, \"detail.view.node\");\n return view as unknown as ClickyDocument;\n}\n\n/** A step's `form`: the schema it showed, the values it ended with and how it was answered. */\nfunction readForm(value: unknown): StepForm {\n const form = record(value, \"detail.form\");\n const schema = record(form.schema, \"detail.form.schema\");\n return {\n title: str(form.title, \"detail.form.title\"),\n schema: schema as JsonSchemaObject,\n values: record(form.values, \"detail.form.values\"),\n state: oneOf(form.state, STEP_FORM_STATES, \"detail.form.state\"),\n ...optional(form, \"description\", (v) => str(v, \"detail.form.description\")),\n ...optional(form, \"answeredBy\", (v) => str(v, \"detail.form.answeredBy\")),\n ...optional(form, \"answeredAt\", (v) => str(v, \"detail.form.answeredAt\")),\n };\n}\n\n/** A step's `files`: what it attached through StepContext.AttachFile. */\nfunction readFiles(value: unknown): StepFile[] {\n return list(value, \"detail.files\").map((raw, index) => {\n const path = `detail.files[${index}]`;\n const file = record(raw, path);\n return {\n path: str(file.path, `${path}.path`),\n name: str(file.name, `${path}.name`),\n mime: str(file.mime, `${path}.mime`),\n ...optional(file, \"title\", (v) => str(v, `${path}.title`)),\n };\n });\n}\n\n/** Durations arrive as Go-style strings (\"15s\"); a bare number is nanoseconds like every other duration on the wire. */\nfunction durationText(value: unknown, path: string): string {\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return formatTestDuration(value);\n return fail(path, \"a duration string or nanosecond number\");\n}\n\nfunction scalarText(value: unknown, path: string): string {\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\") return String(value);\n return fail(path, \"a string or number\");\n}\n\nfunction readPolicy(value: unknown): WaitPolicy {\n const path = \"detail.wait.policy\";\n const policy = record(value, path);\n const backoff = (raw: unknown) => {\n const b = record(raw, `${path}.backoff`);\n return {\n ...optional(b, \"factor\", (v) => num(v, `${path}.backoff.factor`)),\n ...optional(b, \"max\", (v) => durationText(v, `${path}.backoff.max`)),\n };\n };\n return {\n ...optional(policy, \"until\", (v) => str(v, `${path}.until`)),\n ...optional(policy, \"failWhen\", (v) => str(v, `${path}.failWhen`)),\n ...optional(policy, \"interval\", (v) => durationText(v, `${path}.interval`)),\n ...optional(policy, \"backoff\", backoff),\n ...optional(policy, \"jitter\", (v) => scalarText(v, `${path}.jitter`)),\n ...optional(policy, \"timeout\", (v) => durationText(v, `${path}.timeout`)),\n };\n}\n\nfunction readWait(value: unknown): WaitDetail {\n const wait = record(value, \"detail.wait\");\n return {\n policy: readPolicy(wait.policy ?? {}),\n outcome: oneOf(wait.outcome, WAIT_OUTCOMES, \"detail.wait.outcome\"),\n durationMs: nonnegative(wait.durationMs, \"detail.wait.durationMs\"),\n ...(wait.outputs === undefined ? {} : { outputs: wait.outputs }),\n ...optional(wait, \"expression\", (v) => str(v, \"detail.wait.expression\")),\n ...optional(wait, \"cause\", (v) => str(v, \"detail.wait.cause\")),\n ...optional(wait, \"error\", (v) => str(v, \"detail.wait.error\")),\n ...optional(wait, \"trace\", (v) => str(v, \"detail.wait.trace\")),\n };\n}\n\nfunction nonnegative(value: unknown, path: string): number {\n const result = num(value, path);\n return result >= 0 ? result : fail(path, \"non-negative\");\n}\n\nfunction readAttemptResult(value: unknown, path: string): VerifyNode {\n const node = record(value, path);\n str(node.name, `${path}.name`);\n for (const key of [\"framework\", \"message\", \"command\", \"work_dir\", \"stdout\", \"stderr\"]) {\n if (node[key] !== undefined) str(node[key], `${path}.${key}`);\n }\n for (const key of [\"passed\", \"failed\", \"timed_out\", \"warned\", \"skipped\", \"pending\", \"running\"]) {\n if (node[key] !== undefined) bool(node[key], `${path}.${key}`);\n }\n if (node.duration !== undefined) nonnegative(node.duration, `${path}.duration`);\n if (node.detail !== undefined) record(node.detail, `${path}.detail`);\n if (node.children !== undefined) list(node.children, `${path}.children`).forEach((child, i) => readAttemptResult(child, `${path}.children[${i}]`));\n return { ...node, name: str(node.name, `${path}.name`) } as VerifyNode;\n}\n\nfunction readAttempt(value: unknown, index: number): StepAttempt {\n const path = `detail.attempts[${index}]`;\n const a = record(value, path);\n return {\n attempt: num(a.attempt, `${path}.attempt`),\n status: str(a.status, `${path}.status`),\n ...optional(a, \"error\", (v) => str(v, `${path}.error`)),\n ...optional(a, \"durationMs\", (v) => nonnegative(v, `${path}.durationMs`)),\n ...optional(a, \"result\", (v) => readAttemptResult(v, `${path}.result`)),\n };\n}\n\nfunction readAttempts(value: unknown): StepAttempt[] {\n const attempts = list(value, \"detail.attempts\").map(readAttempt);\n attempts.forEach((attempt, index) => {\n if (attempt.attempt !== index + 1) fail(`detail.attempts[${index}].attempt`, `the sequence number ${index + 1}`);\n });\n return attempts;\n}\n\nfunction readExports(value: unknown): StepExport[] {\n return Object.entries(record(value, \"detail.exports\")).map(([name, raw]) => {\n const path = `detail.exports.${name}`;\n const entry = record(raw, path);\n return { name, value: entry.value, step: str(entry.step, `${path}.step`) };\n });\n}\n\nfunction readEvent(value: unknown, index: number): WatcherEvent {\n const path = `detail.events[${index}]`;\n const e = record(value, path);\n return {\n type: oneOf(e.type, WATCHER_EVENT_TYPES, `${path}.type`),\n ...optional(e, \"text\", (v) => str(v, `${path}.text`)),\n ...optional(e, \"url\", (v) => str(v, `${path}.url`)),\n ...optional(e, \"status\", (v) => num(v, `${path}.status`)),\n ...optional(e, \"detail\", (v) => str(v, `${path}.detail`)),\n };\n}\n\nfunction readStep(detail: Rec): StepDetail {\n const ref = record(detail.step, \"detail.step\");\n const rest = Object.fromEntries(Object.entries(detail).filter(([key]) => !STEP_KEYS.has(key)));\n return {\n step: { id: str(ref.id, \"detail.step.id\"), kind: str(ref.kind, \"detail.step.kind\") },\n ...(detail.outputs === undefined ? {} : { outputs: detail.outputs }),\n ...optional(detail, \"view\", readView),\n ...optional(detail, \"form\", readForm),\n ...optional(detail, \"files\", readFiles),\n exports: detail.exports == null ? [] : readExports(detail.exports),\n ...optional(detail, \"wait\", readWait),\n attempts: readAttempts(detail.attempts ?? []),\n events: list(detail.events ?? [], \"detail.events\").map(readEvent),\n background: bool(detail.background ?? false, \"detail.background\"),\n rest,\n };\n}\n\n/**\n * Whether `node.detail` carries a typed step (`detail.step`), and if so its\n * parsed contents. A node without `detail.step` is \"none\" whatever else its\n * detail holds; a `step` whose fields violate the contract is \"invalid\" with\n * the offending path, so the view can say so rather than render a guess.\n */\nexport function readStepDetail(detail: unknown): StepDetailResult {\n if (!isRecord(detail) || detail.step === undefined) return { kind: \"none\" };\n try {\n return { kind: \"step\", step: readStep(detail) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\nexport type ViolationDetail = Violation & { locations: ViolationLocation[] };\n\nexport type ViolationDetailResult =\n | { kind: \"none\" }\n | { kind: \"violation\"; violation: ViolationDetail }\n | { kind: \"invalid\"; error: string };\n\nconst SEVERITIES = [\"error\", \"warning\", \"info\"] as const satisfies readonly LintSeverity[];\n\nfunction readEntity(value: unknown, path: string): ViolationEntity {\n const entity = record(value, path);\n return {\n kind: str(entity.kind, `${path}.kind`),\n id: str(entity.id, `${path}.id`),\n ...optional(entity, \"name\", (v) => str(v, `${path}.name`)),\n };\n}\n\nconst URL_STRATEGIES = [\"css\", \"xpath\", \"testId\", \"role\", \"text\"] as const;\n\nfunction readUrlTarget(value: unknown, path: string): ViolationUrlTarget {\n const target = record(value, path);\n const read: ViolationUrlTarget = {\n url: str(target.url, `${path}.url`),\n ...Object.assign({}, ...[...URL_STRATEGIES, \"name\"].map((key) => optional(target, key, (v) => str(v, `${path}.${key}`)))),\n };\n const strategies = URL_STRATEGIES.filter((key) => read[key] !== undefined);\n if (strategies.length > 1) fail(path, `a target with at most one selector strategy (got ${strategies.join(\", \")})`);\n if (read.name !== undefined && read.role === undefined) fail(`${path}.name`, \"paired with a role\");\n return read;\n}\n\nfunction readImage(value: unknown, path: string): ViolationImageRegion {\n const image = record(value, path);\n return {\n src: str(image.src, `${path}.src`),\n x: num(image.x, `${path}.x`),\n y: num(image.y, `${path}.y`),\n width: num(image.width, `${path}.width`),\n height: num(image.height, `${path}.height`),\n };\n}\n\nfunction readLocation(value: unknown, index: number): ViolationLocation {\n const path = `detail.violation.locations[${index}]`;\n const l = record(value, path);\n const location: ViolationLocation = {\n ...optional(l, \"file\", (v) => str(v, `${path}.file`)),\n ...optional(l, \"line\", (v) => num(v, `${path}.line`)),\n ...optional(l, \"column\", (v) => num(v, `${path}.column`)),\n ...optional(l, \"end_line\", (v) => num(v, `${path}.end_line`)),\n ...optional(l, \"ref\", (v) => str(v, `${path}.ref`)),\n ...optional(l, \"entity\", (v) => readEntity(v, `${path}.entity`)),\n ...optional(l, \"url\", (v) => readUrlTarget(v, `${path}.url`)),\n ...optional(l, \"image\", (v) => readImage(v, `${path}.image`)),\n ...optional(l, \"message\", (v) => str(v, `${path}.message`)),\n };\n if (!(location.file || location.entity || location.url || location.image || location.message)) {\n fail(path, \"a location naming a file, entity, url, image or message\");\n }\n return location;\n}\n\nfunction readRule(value: unknown): NonNullable<Violation[\"rule\"]> {\n const path = \"detail.violation.rule\";\n const rule = record(value, path);\n return {\n ...optional(rule, \"method\", (v) => str(v, `${path}.method`)),\n ...optional(rule, \"description\", (v) => str(v, `${path}.description`)),\n ...optional(rule, \"pattern\", (v) => str(v, `${path}.pattern`)),\n ...optional(rule, \"package\", (v) => str(v, `${path}.package`)),\n };\n}\n\nfunction readViolationRecord(value: unknown): ViolationDetail {\n const path = \"detail.violation\";\n const v = record(value, path);\n return {\n ...optional(v, \"severity\", (s) => oneOf(s, SEVERITIES, `${path}.severity`)),\n ...optional(v, \"message\", (m) => str(m, `${path}.message`)),\n ...optional(v, \"rule\", readRule),\n ...optional(v, \"source\", (s) => str(s, `${path}.source`)),\n ...optional(v, \"file\", (f) => str(f, `${path}.file`)),\n ...optional(v, \"line\", (n) => num(n, `${path}.line`)),\n locations: list(v.locations ?? [], `${path}.locations`).map(readLocation),\n };\n}\n\n/**\n * The lint violation a finding node carries in `detail.violation` (gavel\n * models.Violation, published under fixtures.ViolationMetadataKey). Read apart\n * from the typed step: a finding has no `detail.step`. A violation whose fields\n * break the contract is \"invalid\" with the offending path.\n */\nexport function readViolation(detail: unknown): ViolationDetailResult {\n if (!isRecord(detail) || detail.violation === undefined) return { kind: \"none\" };\n try {\n return { kind: \"violation\", violation: readViolationRecord(detail.violation) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\nfunction withoutKey(detail: unknown, key: string): unknown {\n if (!isRecord(detail) || !(key in detail)) return detail;\n const rest = Object.fromEntries(Object.entries(detail).filter(([k]) => k !== key));\n return Object.keys(rest).length > 0 ? rest : undefined;\n}\n\n/** `detail` without its `violation`, which the Locations section shows instead of the raw block. */\nexport function withoutViolation(detail: unknown): unknown {\n return withoutKey(detail, \"violation\");\n}\n\n/**\n * What a query step ran (gavel fixtures.QueryMetadataKey): the query as authored,\n * its `$(.params.x)` / `{{.params.x}}` references intact; the statement\n * commons-db issued with them bound to driver placeholders; the bound values in\n * placeholder order; the step's params by name; and the file the template came from.\n */\nexport type StepQuery = {\n template: string;\n sql?: string;\n arguments?: unknown[];\n params?: Record<string, unknown>;\n queryFile?: string;\n /** The connection the query runs on and where it points; never its secrets. */\n connection?: StepQueryConnection;\n /** The batches of a SQL program that have ended, with the rows each changed where the driver reports it. */\n batches?: StepQueryBatch[];\n /** The server session the query ran on (SPID, backend PID, connection id or ClickHouse query id). */\n session?: StepQuerySession;\n /** AutoDiagnose samples of that session while the statement ran, oldest first (gavel keeps the last 100). */\n diagnose?: StepQuerySample[];\n /** How many older samples gavel dropped beyond the ones in `diagnose`. */\n diagnoseDropped?: number;\n /** Why sampling stopped (a missing grant, a read error); the query itself is unaffected. */\n diagnoseError?: string;\n};\n\n/**\n * commons-db query.ServerSession. `engine` is postgres, sqlserver, mysql, clickhouse or\n * opensearch; `sessionId` is 0 or absent for the engines that identify the session by `queryId`\n * (clickhouse, opensearch, where `server` is the cluster and `database` the index).\n */\nexport type StepQuerySession = {\n engine: string;\n sessionId?: number;\n queryId?: string;\n server?: string;\n database?: string;\n user?: string;\n page?: number;\n};\n\n/**\n * commons-db sqlactivity.Sample or searchactivity.Sample as JSON. For SQL a zero\n * metric means the engine does not report it; `blockedBy` 0 means not blocked;\n * `transactionStartedAt` may be the zero time (\"0001-01-01T00:00:00Z\"). An\n * opensearch sample (`engine` \"opensearch\") has no `sessionId`; its task fields\n * (`taskId` to `memoryBytes`) are absent while the walk is between pages, and\n * `cpuMs` / `memoryBytes` only on OpenSearch 2.9 and later.\n */\nexport type StepQuerySample = {\n sampledAt: string;\n engine: string;\n sessionId?: number;\n database?: string;\n requestId?: number;\n blockedBy?: number;\n blocked?: boolean;\n user?: string;\n application?: string;\n clientHost?: string;\n state?: string;\n command?: string;\n waitType?: string;\n waitResource?: string;\n waitMs?: number;\n startedAt?: string;\n transactionStartedAt?: string;\n elapsedMs?: number;\n transactionMs?: number;\n cpuMs?: number;\n logicalReads?: number;\n reads?: number;\n writes?: number;\n memoryBytes?: number;\n openTransactions?: number;\n queryId?: string;\n sql?: string;\n /** SQL Server: percent_complete of long commands (backup, rebuild, ...); 0 for the rest. */\n percentComplete?: number;\n /** SQL Server: the server's estimate of the time left, in ms. */\n estimatedRemainingMs?: number;\n taskId?: string;\n node?: string;\n action?: string;\n description?: string;\n cancellable?: boolean;\n cancelled?: boolean;\n cluster?: string;\n /** Cluster health: \"green\", \"yellow\" or \"red\". */\n status?: string;\n activeShardsPercent?: number;\n unassignedShards?: number;\n relocatingShards?: number;\n pendingTasks?: number;\n /** Heap and CPU of the node running the task (else the worst data node). */\n heapPercent?: number;\n cpuPercent?: number;\n searchActive?: number;\n searchQueue?: number;\n searchRejected?: number;\n /** Walk progress: pages fetched, rows read, the total hit count and whether it is exact (\"eq\") or a lower bound (\"gte\"). */\n pages?: number;\n rowsRead?: number;\n totalHits?: number;\n totalRelation?: string;\n};\n\nexport type StepQueryConnection = {\n name: string;\n type: string;\n host?: string;\n port?: string;\n user?: string;\n database?: string;\n};\n\n/** `run` is the batch's repetition under `GO <count>`, 1 for a batch that runs once. */\nexport type StepQueryBatch = { batch: number; run: number; rowsAffected?: number };\n\nfunction readQueryConnection(value: unknown): StepQueryConnection {\n const path = \"detail.query.connection\";\n const c = record(value, path);\n return {\n name: str(c.name, `${path}.name`),\n type: str(c.type, `${path}.type`),\n ...optional(c, \"host\", (v) => str(v, `${path}.host`)),\n ...optional(c, \"port\", (v) => str(v, `${path}.port`)),\n ...optional(c, \"user\", (v) => str(v, `${path}.user`)),\n ...optional(c, \"database\", (v) => str(v, `${path}.database`)),\n };\n}\n\nfunction readQueryBatch(value: unknown, index: number): StepQueryBatch {\n const path = `detail.query.batches[${index}]`;\n const b = record(value, path);\n return {\n batch: num(b.batch, `${path}.batch`),\n run: num(b.run, `${path}.run`),\n ...optional(b, \"rowsAffected\", (v) => num(v, `${path}.rowsAffected`)),\n };\n}\n\nfunction readQuerySession(value: unknown): StepQuerySession {\n const path = \"detail.query.session\";\n const s = record(value, path);\n return {\n engine: str(s.engine, `${path}.engine`),\n ...optional(s, \"sessionId\", (v) => num(v, `${path}.sessionId`)),\n ...optional(s, \"queryId\", (v) => str(v, `${path}.queryId`)),\n ...optional(s, \"server\", (v) => str(v, `${path}.server`)),\n ...optional(s, \"database\", (v) => str(v, `${path}.database`)),\n ...optional(s, \"user\", (v) => str(v, `${path}.user`)),\n ...optional(s, \"page\", (v) => num(v, `${path}.page`)),\n };\n}\n\nconst SAMPLE_STRINGS = [\n \"database\", \"user\", \"application\", \"clientHost\", \"state\", \"command\", \"waitType\", \"waitResource\",\n \"startedAt\", \"transactionStartedAt\", \"queryId\", \"sql\",\n \"taskId\", \"node\", \"action\", \"description\", \"cluster\", \"status\", \"totalRelation\",\n] as const;\nconst SAMPLE_NUMBERS = [\n \"sessionId\", \"requestId\", \"blockedBy\", \"waitMs\", \"elapsedMs\", \"transactionMs\", \"cpuMs\", \"logicalReads\", \"reads\", \"writes\",\n \"memoryBytes\", \"openTransactions\", \"percentComplete\", \"estimatedRemainingMs\",\n \"activeShardsPercent\", \"unassignedShards\", \"relocatingShards\", \"pendingTasks\",\n \"heapPercent\", \"cpuPercent\", \"searchActive\", \"searchQueue\", \"searchRejected\",\n \"pages\", \"rowsRead\", \"totalHits\",\n] as const;\nconst SAMPLE_BOOLEANS = [\"blocked\", \"cancellable\", \"cancelled\"] as const;\n\nfunction readQuerySample(value: unknown, index: number): StepQuerySample {\n const path = `detail.query.diagnose[${index}]`;\n const s = record(value, path);\n const sample: StepQuerySample = {\n sampledAt: str(s.sampledAt, `${path}.sampledAt`),\n engine: str(s.engine, `${path}.engine`),\n };\n for (const key of SAMPLE_STRINGS) Object.assign(sample, optional(s, key, (v) => str(v, `${path}.${key}`)));\n for (const key of SAMPLE_NUMBERS) Object.assign(sample, optional(s, key, (v) => num(v, `${path}.${key}`)));\n for (const key of SAMPLE_BOOLEANS) Object.assign(sample, optional(s, key, (v) => bool(v, `${path}.${key}`)));\n return sample;\n}\n\nexport type StepQueryResult =\n | { kind: \"none\" }\n | { kind: \"query\"; query: StepQuery }\n | { kind: \"invalid\"; error: string };\n\nfunction readQueryRecord(value: unknown): StepQuery {\n const path = \"detail.query\";\n const q = record(value, path);\n return {\n template: str(q.template, `${path}.template`),\n ...optional(q, \"sql\", (v) => str(v, `${path}.sql`)),\n ...optional(q, \"arguments\", (v) => list(v, `${path}.arguments`)),\n ...optional(q, \"params\", (v) => record(v, `${path}.params`)),\n ...optional(q, \"queryFile\", (v) => str(v, `${path}.queryFile`)),\n ...optional(q, \"connection\", readQueryConnection),\n ...optional(q, \"batches\", (v) => list(v, `${path}.batches`).map(readQueryBatch)),\n ...optional(q, \"session\", readQuerySession),\n ...optional(q, \"diagnose\", (v) => list(v, `${path}.diagnose`).map(readQuerySample)),\n ...optional(q, \"diagnoseDropped\", (v) => num(v, `${path}.diagnoseDropped`)),\n ...optional(q, \"diagnoseError\", (v) => str(v, `${path}.diagnoseError`)),\n };\n}\n\n/**\n * The query a query step carries in `detail.query`, read apart from the typed\n * step like the violation (a markdown query row has no `detail.step`). A record\n * whose fields break the contract is \"invalid\" with the offending path.\n */\nexport function readQuery(detail: unknown): StepQueryResult {\n if (!isRecord(detail) || detail.query === undefined) return { kind: \"none\" };\n try {\n return { kind: \"query\", query: readQueryRecord(detail.query) };\n } catch (error) {\n if (error instanceof StepDetailError) return { kind: \"invalid\", error: error.message };\n throw error;\n }\n}\n\n/** `detail` without its `query`, which the Query section shows instead of the raw block. */\nexport function withoutQuery(detail: unknown): unknown {\n return withoutKey(detail, \"query\");\n}\n\n/** Brief sections for the \"Copy details\" button: the template, the issued SQL and the params it bound. */\nexport function stepQueryCopy(query: StepQuery): BriefSection[] {\n const params = Object.entries(query.params ?? {});\n const connection = query.connection;\n return [\n ...(connection ? [{ title: \"Connection\", body: connectionCopy(connection) }] : []),\n { title: query.queryFile ? `Template (${query.queryFile})` : \"Template\", lang: \"sql\", body: query.template, ...(query.queryFile ? { source: query.queryFile } : {}) },\n ...(query.sql ? [{ title: \"SQL\", lang: \"sql\", body: query.sql }] : []),\n ...(params.length > 0 ? [{ title: \"Params\", body: params.map(([name, value]) => `${name}=${formatExportValue(value)}`).join(\"\\n\") }] : []),\n ...(query.arguments && query.arguments.length > 0\n ? [{ title: \"Arguments\", body: query.arguments.map((value, i) => `${i + 1}: ${formatExportValue(value)}`).join(\"\\n\") }]\n : []),\n ];\n}\n\n/** The connection as the badges show it: `name (type)`, then host:port, user and db where known. */\nfunction connectionCopy(connection: StepQueryConnection): string {\n const host = connection.host && (connection.port ? `${connection.host}:${connection.port}` : connection.host);\n return [\n `${connection.name} (${connection.type})`,\n host && `host: ${host}`,\n connection.user && `user: ${connection.user}`,\n connection.database && `db: ${connection.database}`,\n ]\n .filter(Boolean)\n .join(\"\\n\");\n}\n\n/** How a `form` step's form was answered, or undefined for a node that is no (valid) form step. */\nexport function stepFormState(node: Pick<Test, \"detail\">): StepFormState | undefined {\n const parsed = readStepDetail(node.detail);\n return parsed.kind === \"step\" ? parsed.step.form?.state : undefined;\n}\n\n/** The step detail when there is one, for matchers that only need to know. */\nexport function hasStepDetail(detail: unknown): boolean {\n return readStepDetail(detail).kind !== \"none\";\n}\n\n/** The fixtures.ExecutionNode fields gavel puts at the top of `node.detail`, shown as a header instead of raw JSON. */\nexport type ExecutionHeader = {\n kind?: string;\n state?: string;\n file?: string;\n sectionPath?: string;\n /** Zero-based row of the step within its section. */\n rowIndex?: number;\n line?: number;\n startedAt?: string;\n finishedAt?: string;\n /** Nanoseconds. */\n durationNs?: number;\n error?: string;\n};\n\nconst isString = (value: unknown): value is string => typeof value === \"string\";\nconst isNumber = (value: unknown): value is number => typeof value === \"number\" && Number.isFinite(value);\n\n/**\n * Splits the ExecutionNode fields (name, kind, state, origin, started_at,\n * finished_at, duration, error) off `detail` into a header, dropping the\n * internal `key`. A field of an unexpected type is not consumed — it stays in\n * `rest`, so it is visible in the raw block rather than silently hidden.\n */\nexport function splitExecutionDetail(detail: unknown): { header: ExecutionHeader; rest: unknown } {\n if (!isRecord(detail)) return { header: {}, rest: detail };\n const rest: Rec = { ...detail };\n delete rest.key;\n const take = <T>(key: string, guard: (value: unknown) => value is T): T | undefined => {\n const value = rest[key];\n if (!guard(value)) return undefined;\n delete rest[key];\n return value;\n };\n const header: ExecutionHeader = {};\n const assign = <K extends keyof ExecutionHeader>(field: K, value: ExecutionHeader[K] | undefined) => {\n if (value !== undefined) header[field] = value;\n };\n take(\"name\", isString);\n assign(\"kind\", take(\"kind\", isString));\n assign(\"state\", take(\"state\", isString));\n assign(\"startedAt\", take(\"started_at\", isString));\n assign(\"finishedAt\", take(\"finished_at\", isString));\n assign(\"durationNs\", take(\"duration\", isNumber));\n assign(\"error\", take(\"error\", isString));\n const origin = take(\"origin\", isRecord);\n if (origin) {\n assign(\"file\", isString(origin.file) ? origin.file : undefined);\n assign(\"sectionPath\", isString(origin.section_path) ? origin.section_path : undefined);\n assign(\"rowIndex\", isNumber(origin.row_index) ? origin.row_index : undefined);\n assign(\"line\", isNumber(origin.line) ? origin.line : undefined);\n }\n return { header, rest: Object.keys(rest).length > 0 ? rest : undefined };\n}\n\nexport type WaitCondition = \"until\" | \"failWhen\";\n\n/** Which of the wait's two conditions decided its outcome. `expression` is authoritative; older payloads without it are inferred from the outcome. */\nexport function waitDecidedBy(wait: WaitDetail): WaitCondition {\n if (wait.expression !== undefined) return wait.expression === wait.policy.failWhen ? \"failWhen\" : \"until\";\n return wait.outcome === \"failed\" && wait.policy.failWhen ? \"failWhen\" : \"until\";\n}\n\n/** `09:00:04` from an RFC 3339 timestamp, as written (no timezone conversion); anything else verbatim. */\nexport function clockTime(at: string): string {\n return /T(\\d{2}:\\d{2}:\\d{2})/.exec(at)?.[1] ?? at;\n}\n\nexport function formatDelay(ms: number): string {\n return ms <= 0 ? \"0ms\" : formatTestDuration(ms * 1e6);\n}\n\n/** `every 1s · backoff ×1.5 up to 10s · jitter ±20% · timeout 3m`, skipping what the policy leaves unset. */\nexport function policySummary(policy: WaitPolicy): string {\n const backoff = [\n policy.backoff?.factor !== undefined && `×${policy.backoff.factor}`,\n policy.backoff?.max && `up to ${policy.backoff.max}`,\n ].filter(Boolean);\n return [\n policy.interval && `every ${policy.interval}`,\n backoff.length > 0 && `backoff ${backoff.join(\" \")}`,\n policy.jitter && `jitter ±${policy.jitter}`,\n policy.timeout && `timeout ${policy.timeout}`,\n ]\n .filter(Boolean)\n .join(\" · \");\n}\n\nexport function formatExportValue(value: unknown): string {\n if (value === undefined) return \"\";\n return typeof value === \"string\" ? value : JSON.stringify(value);\n}\n\nfunction waitCopy(wait: WaitDetail): BriefSection {\n const { policy } = wait;\n const lines = [\n `outcome: ${wait.outcome}`,\n `elapsed: ${formatDelay(wait.durationMs)}`,\n `policy: ${policySummary(policy)}`,\n policy.until && `until: ${policy.until}`,\n policy.failWhen && `failWhen: ${policy.failWhen}`,\n wait.expression && `decided by: ${wait.expression}`,\n wait.cause && `cause: ${wait.cause}`,\n wait.error && `error: ${wait.error}`,\n wait.trace && `trace: ${wait.trace}`,\n wait.outputs !== undefined && `outputs: ${JSON.stringify(wait.outputs)}`,\n ];\n return { title: \"Wait\", body: lines.filter(Boolean).join(\"\\n\") };\n}\n\nfunction attemptLine(a: StepAttempt): string {\n const head = [`#${a.attempt}`, a.status, a.durationMs !== undefined && formatDelay(a.durationMs)];\n return `${head.filter(Boolean).join(\" \")}${a.error ? ` — ${a.error}` : \"\"}`;\n}\n\nfunction eventLine(e: WatcherEvent): string {\n const body = [e.status, e.text, e.url].filter((part) => part !== undefined).join(\" \");\n return `[${e.type}]${body ? ` ${body}` : \"\"}${e.detail ? ` — ${e.detail}` : \"\"}`;\n}\n\n/** Brief sections for the \"Copy details\" button: wait trace, retry attempts, exports and watcher events. */\nexport function stepKindCopy(step: StepDetail): BriefSection[] {\n return [\n ...(step.outputs !== undefined ? [{ title: \"Outputs\", body: JSON.stringify(step.outputs, null, 2), lang: \"json\" }] : []),\n ...(step.wait ? [waitCopy(step.wait)] : []),\n ...(step.attempts.length > 0 ? [{ title: \"Attempts\", body: step.attempts.map(attemptLine).join(\"\\n\") }] : []),\n ...(step.exports.length > 0\n ? [{ title: \"Exports\", body: step.exports.map((e) => `${e.name}=${formatExportValue(e.value)} (from ${e.step})`).join(\"\\n\") }]\n : []),\n ...(step.events.length > 0 ? [{ title: \"Events\", body: step.events.map(eventLine).join(\"\\n\") }] : []),\n ];\n}\n"],"mappings":";;AAgCA,IAAa,gBAAgB;CAAC;CAAa;CAAU;AAAS;AAoB9D,IAAa,sBAAsB;CAAC;CAAS;CAAW;CAAa;AAAU;AAW/E,IAAa,mBAAmB;CAAC;CAAY;CAAY;CAAY;AAAY;;AAmBjF,SAAgB,YAAY,MAA2B;CACrD,MAAM,OAAO,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC,EAAE,CAAE,KAAK,CAAC,CAAC,YAAY;CACvD,IAAI,SAAS,aAAa,OAAO;CACjC,IAAI,SAAS,mBAAmB,OAAO;CACvC,IAAI,KAAK,WAAW,QAAQ,GAAG,OAAO;CACtC,OAAO;AACT;;AAGA,SAAgB,UAAU,MAAyB;CACjD,OAAO,YAAY,KAAK,IAAI,MAAM;AACpC;AA0BA,IAAM,4BAAY,IAAI,IAAI;CAAC;CAAQ;CAAW;CAAQ;CAAQ;CAAS;CAAW;CAAQ;CAAY;CAAU;AAAY,CAAC;AAE7H,IAAM,kBAAN,cAA8B,MAAM,CAAC;AAErC,SAAS,KAAK,MAAc,aAA4B;C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AAU;CACrF,CAAA,CAAK,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,IAAI,EAAE,QAAQ,MAAM,EAAE,UAAU;AACzE;AAEA,SAAS,UAAU,GAAyB;CAC1C,MAAM,OAAO;EAAC,EAAE;EAAQ,EAAE;EAAM,EAAE;CAAG,CAAC,CAAC,QAAQ,SAAS,SAAS,KAAA,CAAS,CAAC,CAAC,KAAK,GAAG;CACpF,OAAO,IAAI,EAAE,KAAK,GAAG,OAAO,IAAI,SAAS,KAAK,EAAE,SAAS,MAAM,EAAE,WAAW;AAC9E;;AAGA,SAAgB,aAAa,MAAkC;CAC7D,OAAO;EACL,GAAI,KAAK,YAAY,KAAA,IAAY,CAAC;GAAE,OAAO;GAAW,MAAM,KAAK,UAAU,KAAK,SAAS,MAAM,CAAC;GAAG,MAAM;EAAO,CAAC,IAAI,CAAC;EACtH,GAAI,KAAK,OAAO,CAAC,SAAS,KAAK,IAAI,CAAC,IAAI,CAAC;EACzC,GAAI,KAAK,SAAS,SAAS,IAAI,CAAC;GAAE,OAAO;GAAY,MAAM,KAAK,SAAS,IAAI,WAAW,CAAC,CAAC,KAAK,IAAI;EAAE,CAAC,IAAI,CAAC;EAC3G,GAAI,KAAK,QAAQ,SAAS,IACtB,CAAC;GAAE,OAAO;GAAW,MAAM,KAAK,QAAQ,KAAK,MAAM,GAAG,EAAE,KAAK,GAAG,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI;EAAE,CAAC,IAC3H,CAAC;EACL,GAAI,KAAK,OAAO,SAAS,IAAI,CAAC;GAAE,OAAO;GAAU,MAAM,KAAK,OAAO,IAAI,SAAS,CAAC,CAAC,KAAK,IAAI;EAAE,CAAC,IAAI,CAAC;CACrG;AACF"}
@@ -64,6 +64,18 @@ export type StepForm = {
64
64
  answeredBy?: string;
65
65
  answeredAt?: string;
66
66
  };
67
+ /** A file a step attached (gavel fixtures.StepFile): an absolute `path` the host serves, with its mime type. */
68
+ export type StepFile = {
69
+ path: string;
70
+ name: string;
71
+ mime: string;
72
+ title?: string;
73
+ };
74
+ export type FilePreview = "html" | "pdf" | "image" | "none";
75
+ /** How a step file is previewed, decided by its mime type. */
76
+ export declare function previewKind(mime: string): FilePreview;
77
+ /** PDFs get their own detail tab; every other attached file previews in the step's detail. */
78
+ export declare function isPdfFile(file: StepFile): boolean;
67
79
  export type StepDetail = {
68
80
  step: StepRef;
69
81
  outputs?: unknown;
@@ -71,6 +83,8 @@ export type StepDetail = {
71
83
  view?: ClickyDocument;
72
84
  /** The form a `form` step (or a fixture's `params:`) showed, and how it was answered. */
73
85
  form?: StepForm;
86
+ /** Files the step attached (a facet report's html/pdf/png), previewed through the host's `fileUrl`. */
87
+ files?: StepFile[];
74
88
  exports: StepExport[];
75
89
  wait?: WaitDetail;
76
90
  attempts: StepAttempt[];
@@ -142,10 +156,14 @@ export type StepQuery = {
142
156
  /** Why sampling stopped (a missing grant, a read error); the query itself is unaffected. */
143
157
  diagnoseError?: string;
144
158
  };
145
- /** commons-db query.ServerSession. `engine` is postgres, sqlserver, mysql or clickhouse; `sessionId` is 0 for clickhouse, which uses `queryId`. */
159
+ /**
160
+ * commons-db query.ServerSession. `engine` is postgres, sqlserver, mysql, clickhouse or
161
+ * opensearch; `sessionId` is 0 or absent for the engines that identify the session by `queryId`
162
+ * (clickhouse, opensearch, where `server` is the cluster and `database` the index).
163
+ */
146
164
  export type StepQuerySession = {
147
165
  engine: string;
148
- sessionId: number;
166
+ sessionId?: number;
149
167
  queryId?: string;
150
168
  server?: string;
151
169
  database?: string;
@@ -153,14 +171,17 @@ export type StepQuerySession = {
153
171
  page?: number;
154
172
  };
155
173
  /**
156
- * commons-db sqlactivity.Sample as JSON. A zero metric means the engine does not
157
- * report it; `blockedBy` 0 means not blocked; `transactionStartedAt` may be the
158
- * zero time ("0001-01-01T00:00:00Z").
174
+ * commons-db sqlactivity.Sample or searchactivity.Sample as JSON. For SQL a zero
175
+ * metric means the engine does not report it; `blockedBy` 0 means not blocked;
176
+ * `transactionStartedAt` may be the zero time ("0001-01-01T00:00:00Z"). An
177
+ * opensearch sample (`engine` "opensearch") has no `sessionId`; its task fields
178
+ * (`taskId` to `memoryBytes`) are absent while the walk is between pages, and
179
+ * `cpuMs` / `memoryBytes` only on OpenSearch 2.9 and later.
159
180
  */
160
181
  export type StepQuerySample = {
161
182
  sampledAt: string;
162
183
  engine: string;
163
- sessionId: number;
184
+ sessionId?: number;
164
185
  database?: string;
165
186
  requestId?: number;
166
187
  blockedBy?: number;
@@ -185,6 +206,34 @@ export type StepQuerySample = {
185
206
  openTransactions?: number;
186
207
  queryId?: string;
187
208
  sql?: string;
209
+ /** SQL Server: percent_complete of long commands (backup, rebuild, ...); 0 for the rest. */
210
+ percentComplete?: number;
211
+ /** SQL Server: the server's estimate of the time left, in ms. */
212
+ estimatedRemainingMs?: number;
213
+ taskId?: string;
214
+ node?: string;
215
+ action?: string;
216
+ description?: string;
217
+ cancellable?: boolean;
218
+ cancelled?: boolean;
219
+ cluster?: string;
220
+ /** Cluster health: "green", "yellow" or "red". */
221
+ status?: string;
222
+ activeShardsPercent?: number;
223
+ unassignedShards?: number;
224
+ relocatingShards?: number;
225
+ pendingTasks?: number;
226
+ /** Heap and CPU of the node running the task (else the worst data node). */
227
+ heapPercent?: number;
228
+ cpuPercent?: number;
229
+ searchActive?: number;
230
+ searchQueue?: number;
231
+ searchRejected?: number;
232
+ /** Walk progress: pages fetched, rows read, the total hit count and whether it is exact ("eq") or a lower bound ("gte"). */
233
+ pages?: number;
234
+ rowsRead?: number;
235
+ totalHits?: number;
236
+ totalRelation?: string;
188
237
  };
189
238
  export type StepQueryConnection = {
190
239
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"stepKind.d.ts","sourceRoot":"","sources":["../../../src/data/verification/stepKind.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,K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