agent-inspect 6.28.0 → 6.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/docs/LIMITATIONS.md +1 -1
  4. package/docs/SCHEMA.md +1 -1
  5. package/package.json +2 -1
  6. package/packages/cli/dist/{chunk-JVQ4LTHR.mjs → chunk-D7PT6TXM.mjs} +57 -8
  7. package/packages/cli/dist/chunk-D7PT6TXM.mjs.map +1 -0
  8. package/packages/cli/dist/index.cjs +56 -7
  9. package/packages/cli/dist/index.cjs.map +1 -1
  10. package/packages/cli/dist/index.mjs +4 -4
  11. package/packages/cli/dist/index.mjs.map +1 -1
  12. package/packages/cli/dist/{src-M5J5YC5E.mjs → src-QONEBW2F.mjs} +3 -3
  13. package/packages/cli/dist/{src-M5J5YC5E.mjs.map → src-QONEBW2F.mjs.map} +1 -1
  14. package/packages/core/dist/advanced.cjs +53 -6
  15. package/packages/core/dist/advanced.cjs.map +1 -1
  16. package/packages/core/dist/advanced.d.cts +9 -7
  17. package/packages/core/dist/advanced.d.ts +9 -7
  18. package/packages/core/dist/advanced.mjs +14 -14
  19. package/packages/core/dist/checks.cjs +10 -1
  20. package/packages/core/dist/checks.cjs.map +1 -1
  21. package/packages/core/dist/checks.d.cts +5 -5
  22. package/packages/core/dist/checks.d.ts +5 -5
  23. package/packages/core/dist/checks.mjs +5 -5
  24. package/packages/core/dist/{chunk-U25RHRSU.mjs → chunk-3B24355S.mjs} +12 -5
  25. package/packages/core/dist/chunk-3B24355S.mjs.map +1 -0
  26. package/packages/core/dist/{chunk-NXQF73EC.mjs → chunk-5B4DNGFB.mjs} +9 -5
  27. package/packages/core/dist/chunk-5B4DNGFB.mjs.map +1 -0
  28. package/packages/core/dist/{chunk-NDRMIL7Z.mjs → chunk-FKUTGUFG.mjs} +12 -4
  29. package/packages/core/dist/chunk-FKUTGUFG.mjs.map +1 -0
  30. package/packages/core/dist/{chunk-ME4WXYY3.mjs → chunk-LGTPSHH2.mjs} +13 -4
  31. package/packages/core/dist/chunk-LGTPSHH2.mjs.map +1 -0
  32. package/packages/core/dist/{chunk-R4SSYU6D.mjs → chunk-MVRZ7JBH.mjs} +3 -3
  33. package/packages/core/dist/{chunk-R4SSYU6D.mjs.map → chunk-MVRZ7JBH.mjs.map} +1 -1
  34. package/packages/core/dist/{chunk-P366CCL2.mjs → chunk-QJI52TH3.mjs} +4 -2
  35. package/packages/core/dist/chunk-QJI52TH3.mjs.map +1 -0
  36. package/packages/core/dist/{chunk-WRE4CNPF.mjs → chunk-SJ3C5RIS.mjs} +3 -3
  37. package/packages/core/dist/chunk-SJ3C5RIS.mjs.map +1 -0
  38. package/packages/core/dist/{chunk-WGDSM37E.mjs → chunk-TIGBAVED.mjs} +5 -5
  39. package/packages/core/dist/{chunk-WGDSM37E.mjs.map → chunk-TIGBAVED.mjs.map} +1 -1
  40. package/packages/core/dist/{chunk-JBNRJLIV.mjs → chunk-TNOPL75V.mjs} +33 -7
  41. package/packages/core/dist/chunk-TNOPL75V.mjs.map +1 -0
  42. package/packages/core/dist/{context-DgcvkJ9t.d.ts → context-B8zzsmjX.d.ts} +2 -2
  43. package/packages/core/dist/{context-DGMqxFpz.d.cts → context-BhaVHtOT.d.cts} +2 -2
  44. package/packages/core/dist/diff.d.cts +1 -1
  45. package/packages/core/dist/diff.d.ts +1 -1
  46. package/packages/core/dist/exporters.cjs +29 -3
  47. package/packages/core/dist/exporters.cjs.map +1 -1
  48. package/packages/core/dist/exporters.d.cts +1 -1
  49. package/packages/core/dist/exporters.d.ts +1 -1
  50. package/packages/core/dist/exporters.mjs +5 -5
  51. package/packages/core/dist/{index-C6bCIbFO.d.cts → index-BT3KcO6-.d.cts} +1 -1
  52. package/packages/core/dist/{index-DVetZwGG.d.cts → index-C61p7wBR.d.cts} +3 -3
  53. package/packages/core/dist/{index-BOA1AeEU.d.ts → index-DTO2iGeq.d.ts} +3 -3
  54. package/packages/core/dist/{index-BzyNPfLm.d.ts → index-reskZCVW.d.ts} +1 -1
  55. package/packages/core/dist/index.cjs +10 -1
  56. package/packages/core/dist/index.cjs.map +1 -1
  57. package/packages/core/dist/index.d.cts +4 -4
  58. package/packages/core/dist/index.d.ts +4 -4
  59. package/packages/core/dist/index.mjs +6 -6
  60. package/packages/core/dist/{persisted-inspect-event-CbaRYpbw.d.ts → persisted-inspect-event-BMwvGIB8.d.ts} +5 -0
  61. package/packages/core/dist/{persisted-inspect-event-DiJ0I_vi.d.cts → persisted-inspect-event-DPaCiars.d.cts} +5 -0
  62. package/packages/core/dist/persisted.cjs +8 -2
  63. package/packages/core/dist/persisted.cjs.map +1 -1
  64. package/packages/core/dist/persisted.d.cts +3 -3
  65. package/packages/core/dist/persisted.d.ts +3 -3
  66. package/packages/core/dist/persisted.mjs +3 -3
  67. package/packages/core/dist/readers.cjs +16 -2
  68. package/packages/core/dist/readers.cjs.map +1 -1
  69. package/packages/core/dist/readers.d.cts +2 -2
  70. package/packages/core/dist/readers.d.ts +2 -2
  71. package/packages/core/dist/readers.mjs +4 -4
  72. package/packages/core/dist/{types-wXuxMUop.d.cts → types-BSzhK7Z1.d.cts} +9 -0
  73. package/packages/core/dist/{types-xv9bSgOK.d.ts → types-C5Y8Idle.d.ts} +9 -0
  74. package/packages/core/dist/writers.cjs +10 -1
  75. package/packages/core/dist/writers.cjs.map +1 -1
  76. package/packages/core/dist/writers.d.cts +1 -1
  77. package/packages/core/dist/writers.d.ts +1 -1
  78. package/packages/core/dist/writers.mjs +3 -3
  79. package/packages/cli/dist/chunk-JVQ4LTHR.mjs.map +0 -1
  80. package/packages/core/dist/chunk-JBNRJLIV.mjs.map +0 -1
  81. package/packages/core/dist/chunk-ME4WXYY3.mjs.map +0 -1
  82. package/packages/core/dist/chunk-NDRMIL7Z.mjs.map +0 -1
  83. package/packages/core/dist/chunk-NXQF73EC.mjs.map +0 -1
  84. package/packages/core/dist/chunk-P366CCL2.mjs.map +0 -1
  85. package/packages/core/dist/chunk-U25RHRSU.mjs.map +0 -1
  86. package/packages/core/dist/chunk-WRE4CNPF.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { a as InspectRunTree, c as InspectNode } from './inspect-event-CDqjcrG_.cjs';
2
- import { R as RedactionProfile, h as TraceEvent } from './types-wXuxMUop.cjs';
2
+ import { R as RedactionProfile, h as TraceEvent } from './types-BSzhK7Z1.cjs';
3
3
  import './log-config-DcjV8ZjF.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { a as InspectRunTree, c as InspectNode } from './inspect-event-CDqjcrG_.js';
2
- import { R as RedactionProfile, h as TraceEvent } from './types-xv9bSgOK.js';
2
+ import { R as RedactionProfile, h as TraceEvent } from './types-C5Y8Idle.js';
3
3
  import './log-config-N_c5AE09.js';
4
4
 
5
5
  /**
@@ -1,11 +1,11 @@
1
- import { buildRunWhatSummary, renderRunWhat, renderTimeline, buildRunTimeline } from './chunk-JBNRJLIV.mjs';
2
- import { summarizeObservedOutcomes, extractOutcomesFromTraceEvents, renderObservedOutcomesMarkdown, renderObservedOutcomesHtml } from './chunk-R4SSYU6D.mjs';
1
+ import { buildRunWhatSummary, renderRunWhat, renderTimeline, buildRunTimeline } from './chunk-TNOPL75V.mjs';
2
+ import { summarizeObservedOutcomes, extractOutcomesFromTraceEvents, renderObservedOutcomesMarkdown, renderObservedOutcomesHtml } from './chunk-MVRZ7JBH.mjs';
3
3
  import { escapeHtml, flattenTree, safeString, compactAttributes, stableJson, escapeMarkdown, zeroKinds } from './chunk-CAWPF22J.mjs';
4
4
  export { compactAttributes, escapeHtml, escapeMarkdown, flattenTree, safeString, stableJson, summarizeTree } from './chunk-CAWPF22J.mjs';
5
- import { resolveRedactionProfile, applyProfileMetadataCaps, truncateStringForProfile } from './chunk-U25RHRSU.mjs';
5
+ import { resolveRedactionProfile, applyProfileMetadataCaps, truncateStringForProfile } from './chunk-3B24355S.mjs';
6
6
  import { Redactor } from './chunk-VU6O5QAH.mjs';
7
- import './chunk-WRE4CNPF.mjs';
8
- import './chunk-P366CCL2.mjs';
7
+ import './chunk-SJ3C5RIS.mjs';
8
+ import './chunk-QJI52TH3.mjs';
9
9
  import './chunk-7TGZLWEE.mjs';
10
10
  import crypto from 'crypto';
11
11
 
@@ -1,5 +1,5 @@
1
1
  import { a as InspectRunTree } from './inspect-event-CDqjcrG_.cjs';
2
- import { P as PersistedInspectEvent } from './persisted-inspect-event-DiJ0I_vi.cjs';
2
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-DPaCiars.cjs';
3
3
 
4
4
  type TraceInput = {
5
5
  type: "file";
@@ -1,8 +1,8 @@
1
- import { g as TraceReadResult, h as TraceReadWarning } from './index-C6bCIbFO.cjs';
1
+ import { g as TraceReadResult, h as TraceReadWarning } from './index-BT3KcO6-.cjs';
2
2
  import { a as InspectRunTree, c as InspectNode, A as AttributionConfidence } from './inspect-event-CDqjcrG_.cjs';
3
- import { P as PersistedInspectEvent } from './persisted-inspect-event-DiJ0I_vi.cjs';
3
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-DPaCiars.cjs';
4
4
  import { a as ObservedOutcomeStatus } from './types-BA_IOdg4.cjs';
5
- import { j as TraceMetadataStatus } from './types-wXuxMUop.cjs';
5
+ import { j as TraceMetadataStatus } from './types-BSzhK7Z1.cjs';
6
6
 
7
7
  /** Known session/workflow metadata keys (v2.4 RFC). */
8
8
  declare const SESSION_WORKFLOW_KEYS: readonly ["sessionId", "conversationId", "groupId", "parentGroupId", "attempt", "retryOf", "retryReason", "handoffFrom", "handoffTo", "subAgentId", "subAgentName", "jobId", "queueName", "workflowName", "workflowStep", "toolCallId", "mcpToolCallId", "linkedStepId", "operationId", "attemptId", "attemptNumber", "fallbackOf", "idempotencyKey", "correlationId", "requestId", "decisionId"];
@@ -1,8 +1,8 @@
1
- import { g as TraceReadResult, h as TraceReadWarning } from './index-BzyNPfLm.js';
1
+ import { g as TraceReadResult, h as TraceReadWarning } from './index-reskZCVW.js';
2
2
  import { a as InspectRunTree, c as InspectNode, A as AttributionConfidence } from './inspect-event-CDqjcrG_.js';
3
- import { P as PersistedInspectEvent } from './persisted-inspect-event-CbaRYpbw.js';
3
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-BMwvGIB8.js';
4
4
  import { a as ObservedOutcomeStatus } from './types-BA_IOdg4.js';
5
- import { j as TraceMetadataStatus } from './types-xv9bSgOK.js';
5
+ import { j as TraceMetadataStatus } from './types-C5Y8Idle.js';
6
6
 
7
7
  /** Known session/workflow metadata keys (v2.4 RFC). */
8
8
  declare const SESSION_WORKFLOW_KEYS: readonly ["sessionId", "conversationId", "groupId", "parentGroupId", "attempt", "retryOf", "retryReason", "handoffFrom", "handoffTo", "subAgentId", "subAgentName", "jobId", "queueName", "workflowName", "workflowStep", "toolCallId", "mcpToolCallId", "linkedStepId", "operationId", "attemptId", "attemptNumber", "fallbackOf", "idempotencyKey", "correlationId", "requestId", "decisionId"];
@@ -1,5 +1,5 @@
1
1
  import { a as InspectRunTree } from './inspect-event-CDqjcrG_.js';
2
- import { P as PersistedInspectEvent } from './persisted-inspect-event-CbaRYpbw.js';
2
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-BMwvGIB8.js';
3
3
 
4
4
  type TraceInput = {
5
5
  type: "file";
@@ -357,6 +357,8 @@ function isPersistedTokenUsage(value) {
357
357
  if (!isOptionalNonNegativeNumber(value.output)) return false;
358
358
  if (!isOptionalNonNegativeNumber(value.total)) return false;
359
359
  if (!isOptionalNonNegativeNumber(value.cached)) return false;
360
+ if (!isOptionalNonNegativeNumber(value.cacheWrite)) return false;
361
+ if (!isOptionalNonNegativeNumber(value.reasoning)) return false;
360
362
  return true;
361
363
  }
362
364
  function isPersistedTraceContext(value) {
@@ -1051,7 +1053,14 @@ function preparePersistedErrorForDisk(value, opts) {
1051
1053
  function prepareTokenUsage(value) {
1052
1054
  if (!isRecord4(value)) return void 0;
1053
1055
  const out = {};
1054
- for (const key of ["input", "output", "total", "cached"]) {
1056
+ for (const key of [
1057
+ "input",
1058
+ "output",
1059
+ "total",
1060
+ "cached",
1061
+ "cacheWrite",
1062
+ "reasoning"
1063
+ ]) {
1055
1064
  const item = safeGet(value, key);
1056
1065
  if (typeof item === "number" && Number.isFinite(item) && item >= 0) {
1057
1066
  out[key] = item;