@wix/pathgrade 1.0.33 → 1.0.35

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.
@@ -1,6 +1,6 @@
1
1
  export { runnerAdapterContractVersion, type AdapterCaseContext, type AdapterDiagnostic, type AdapterDiscoveryInput, type AdapterDiscoveryResult, type AdapterEvalUnit, type AdapterInvocationInput, type AdapterLifecycleHooks, type AdapterRunHandle, type AdapterRunStatus, type EvalResultEvent, type RunnerAdapter, } from '../runners/adapter.js';
2
2
  export type { RunnerInvocationAdapter, RunnerInvocationInput, } from '../runners/invocation.js';
3
- export type { AttemptOutcome, AttemptRecord, AssertionRecord, Diagnostic, EvalUnitRecord, EvaluationRecord, GroupingHint, NativeReference, NormalizedRunModel, NormalizedRunSnapshot, RunCaseRecord, RunCaseState, RunRecord, RunStatus, ScoringPolicy, SnapshotCompleteness, } from '../runners/model.js';
3
+ export type { AttemptOutcome, AttemptRecord, AssertionRecord, Diagnostic, EvalUnitRecord, EvalUnitCollection, EvaluationRecord, GroupingHint, NativeReference, NormalizedRunModel, NormalizedRunSnapshot, RunCaseRecord, RunCaseState, RunRecord, RunStatus, ScoringPolicy, SnapshotCompleteness, } from '../runners/model.js';
4
4
  export { buildNormalizedRunSnapshotFromReportGroups } from '../runners/model-builders.js';
5
5
  export { validateNormalizedRunSnapshot } from '../runners/model-validation.js';
6
6
  export { projectNormalizedRunSnapshotToReportInput } from '../runners/report-projection.js';
@@ -0,0 +1,152 @@
1
+ import type { PathgradeGroupReport, PathgradeReport, StrippedTrialResult } from '../types.js';
2
+ export declare const PATHGRADE_REPORT_VERSION: 3;
3
+ export declare const TASK_INVENTORY_VERSION: 1;
4
+ export declare const COMPARISON_CONTRACT_VERSION: 2;
5
+ export declare const NORMALIZED_RUN_MODEL_VERSION: 2;
6
+ export type TaskNonScoringReason = 'skipped' | 'pending' | 'timed-out' | 'failed-before-evaluation';
7
+ export type CollectionIncompleteReason = 'adapter-cannot-prove-completeness' | 'collection-failed' | 'run-incomplete';
8
+ export type TaskInventoryEntry = {
9
+ task_key: string;
10
+ state: 'scored';
11
+ } | {
12
+ task_key: string;
13
+ state: 'not-scored';
14
+ reason: TaskNonScoringReason;
15
+ };
16
+ export type TaskInventoryFile = {
17
+ eval_file: string;
18
+ tasks: readonly TaskInventoryEntry[];
19
+ } & ({
20
+ completeness: 'complete';
21
+ } | {
22
+ completeness: 'incomplete';
23
+ reason: CollectionIncompleteReason;
24
+ });
25
+ export interface TaskInventory {
26
+ version: typeof TASK_INVENTORY_VERSION;
27
+ files: readonly TaskInventoryFile[];
28
+ }
29
+ export type ComparisonInputsInvalidReason = 'malformed-declaration' | 'no-matches' | 'outside-repository' | 'unreadable-input';
30
+ export type ComparisonInputsState = {
31
+ state: 'missing';
32
+ } | {
33
+ state: 'invalid';
34
+ reason: ComparisonInputsInvalidReason;
35
+ } | {
36
+ state: 'resolved';
37
+ declarations: readonly string[];
38
+ files: readonly {
39
+ path: string;
40
+ revision: string;
41
+ }[];
42
+ revision: string;
43
+ };
44
+ export type ScorerRevisionState = {
45
+ state: 'complete';
46
+ revision: string;
47
+ } | {
48
+ state: 'incomplete';
49
+ reason: 'explicit-revision-required' | 'metadata-missing';
50
+ };
51
+ export interface RuntimeComponentRevisions {
52
+ agent_name: string;
53
+ model: string;
54
+ transport: string;
55
+ interaction_mode: string;
56
+ }
57
+ type DefinitionRevisionContract = {
58
+ comparison_inputs: Extract<ComparisonInputsState, {
59
+ state: 'resolved';
60
+ }>;
61
+ definition_revision: string;
62
+ } | {
63
+ comparison_inputs: Exclude<ComparisonInputsState, {
64
+ state: 'resolved';
65
+ }>;
66
+ definition_revision?: never;
67
+ };
68
+ type ScorerRevisionContract = {
69
+ scorer_revision_state: {
70
+ state: 'complete';
71
+ };
72
+ scorer_revision: string;
73
+ } | {
74
+ scorer_revision_state: {
75
+ state: 'incomplete';
76
+ reason: 'explicit-revision-required' | 'metadata-missing';
77
+ };
78
+ scorer_revision?: never;
79
+ };
80
+ type RuntimeRevisionContract = {
81
+ runtime_revision_state: {
82
+ state: 'complete';
83
+ };
84
+ runtime_revision: string;
85
+ runtime_components: RuntimeComponentRevisions;
86
+ } | {
87
+ runtime_revision_state: {
88
+ state: 'incomplete';
89
+ reason: 'metadata-missing';
90
+ };
91
+ runtime_revision?: never;
92
+ runtime_components?: never;
93
+ };
94
+ type SamplingRevisionContract = {
95
+ sampling_revision_state: {
96
+ state: 'complete';
97
+ };
98
+ sampling_revision: string;
99
+ } | {
100
+ sampling_revision_state: {
101
+ state: 'incomplete';
102
+ reason: 'sampling-incomplete';
103
+ };
104
+ sampling_revision?: never;
105
+ };
106
+ export type ComparisonContractV2 = {
107
+ version: typeof COMPARISON_CONTRACT_VERSION;
108
+ report_schema_revision: 'pathgrade-results-v3';
109
+ } & DefinitionRevisionContract & ScorerRevisionContract & RuntimeRevisionContract & SamplingRevisionContract;
110
+ export type AdapterCollectionState = {
111
+ state: 'complete';
112
+ } | {
113
+ state: 'incomplete';
114
+ reason: CollectionIncompleteReason;
115
+ };
116
+ export interface NormalizedEvalUnitV2Contract {
117
+ version: typeof NORMALIZED_RUN_MODEL_VERSION;
118
+ id: string;
119
+ source_file: string;
120
+ collection: AdapterCollectionState;
121
+ }
122
+ type AdapterCollectionContractBase = {
123
+ adapter: 'vitest' | 'jest' | 'node-test';
124
+ observed_task_keys: readonly string[];
125
+ unaccounted_task_keys: readonly string[];
126
+ };
127
+ export type AdapterCollectionContract = AdapterCollectionContractBase & ({
128
+ unit: Omit<NormalizedEvalUnitV2Contract, 'collection'> & {
129
+ collection: {
130
+ state: 'complete';
131
+ };
132
+ };
133
+ disposition: 'replace-complete';
134
+ } | {
135
+ unit: Omit<NormalizedEvalUnitV2Contract, 'collection'> & {
136
+ collection: {
137
+ state: 'incomplete';
138
+ reason: CollectionIncompleteReason;
139
+ };
140
+ };
141
+ disposition: 'retain-with-file-gap';
142
+ });
143
+ export type PathgradeGroupReportV3 = Omit<PathgradeGroupReport, 'comparison_contract' | 'trials'> & {
144
+ trials: readonly StrippedTrialResult[];
145
+ comparison_contract: ComparisonContractV2;
146
+ };
147
+ export type PathgradeReportV3 = Omit<PathgradeReport, 'version' | 'groups'> & {
148
+ version: typeof PATHGRADE_REPORT_VERSION;
149
+ groups: readonly PathgradeGroupReportV3[];
150
+ task_inventory: TaskInventory;
151
+ };
152
+ export {};
@@ -0,0 +1,4 @@
1
+ export const PATHGRADE_REPORT_VERSION = 3;
2
+ export const TASK_INVENTORY_VERSION = 1;
3
+ export const COMPARISON_CONTRACT_VERSION = 2;
4
+ export const NORMALIZED_RUN_MODEL_VERSION = 2;
@@ -1,5 +1,6 @@
1
1
  import type { DiagnosticsReport } from '../sdk/diagnostics.js';
2
2
  import type { TrialResult } from '../types.js';
3
+ import type { CollectionIncompleteReason } from '../reporting/reliability-contract.js';
3
4
  export interface NormalizedRunSnapshot {
4
5
  version: 1;
5
6
  completeness: SnapshotCompleteness;
@@ -25,12 +26,19 @@ export interface EvalUnitRecord {
25
26
  id: string;
26
27
  runId: string;
27
28
  displayName: string;
29
+ collection?: EvalUnitCollection;
28
30
  sourceFile?: string;
29
31
  sourceRevision?: string;
30
32
  diagnostics?: Diagnostic[];
31
33
  nativeReferences?: NativeReference[];
32
34
  groupingHints?: GroupingHint[];
33
35
  }
36
+ export type EvalUnitCollection = {
37
+ state: 'complete';
38
+ } | {
39
+ state: 'incomplete';
40
+ reason: CollectionIncompleteReason;
41
+ };
34
42
  export type RunCaseState = 'passed' | 'failed' | 'skipped' | 'pending';
35
43
  export type ScoringPolicy = {
36
44
  kind: 'score';
@@ -42,6 +42,8 @@ export type { ExpectedMcpStartupStatus, ExpectedMcpToolCall, McpStartupStatusEvi
42
42
  export type { McpPolicyDenialReason, McpToolCallRequest, McpToolPolicyDecision, } from './mcp-safety.js';
43
43
  export type { ToolEvent, McpToolCallClassification } from '../tool-events.js';
44
44
  export type { ComparisonContract, ComparisonUnavailableReason, PathgradeGroupReport, PathgradeReport, StrippedTrialResult, } from '../types.js';
45
+ export { COMPARISON_CONTRACT_VERSION, NORMALIZED_RUN_MODEL_VERSION, PATHGRADE_REPORT_VERSION, TASK_INVENTORY_VERSION, } from '../reporting/reliability-contract.js';
46
+ export type { AdapterCollectionContract, AdapterCollectionState, CollectionIncompleteReason, ComparisonContractV2, ComparisonInputsInvalidReason, ComparisonInputsState, NormalizedEvalUnitV2Contract, PathgradeGroupReportV3, PathgradeReportV3, RuntimeComponentRevisions, ScorerRevisionState, TaskInventory, TaskInventoryEntry, TaskInventoryFile, TaskNonScoringReason, } from '../reporting/reliability-contract.js';
45
47
  export type { LLMPort, EvalRuntime } from './eval-runtime.js';
46
48
  export { createAgentLLM, createLLMClient, ProviderNotSupportedError } from '../utils/llm.js';
47
49
  export type { CreateLLMClientOptions, LLMProviderAdapter, TokenUsage as LLMTokenUsage } from '../utils/llm.js';
package/dist/sdk/index.js CHANGED
@@ -25,5 +25,6 @@ export { toAskUserToolEvent } from './ask-bus/projection.js';
25
25
  export { buildAskBatchLogEntries } from './agent-result-log.js';
26
26
  export { emitEvalResult, resetAllResultObserversForTests, resetUserResultObservers, subscribeToEvalResults, } from './result-capture.js';
27
27
  export { getAgentCapabilities } from './types.js';
28
+ export { COMPARISON_CONTRACT_VERSION, NORMALIZED_RUN_MODEL_VERSION, PATHGRADE_REPORT_VERSION, TASK_INVENTORY_VERSION, } from '../reporting/reliability-contract.js';
28
29
  export { createAgentLLM, createLLMClient, ProviderNotSupportedError } from '../utils/llm.js';
29
30
  export { createMockLLM } from '../utils/llm-mocks.js';
@@ -6,7 +6,7 @@ import type { DiagnosticsReport } from './diagnostics.js';
6
6
  import type { LLMPort } from '../utils/llm-types.js';
7
7
  import type { McpSafetyOptions } from './mcp-safety.js';
8
8
  import type { McpMockApprovalRule } from './mcp-mock-approvals.js';
9
- import type { EvidenceEnvelope } from '../internal/direct-mcp-v2/types.js';
9
+ import type { EvidenceEnvelope, JsonValue } from '../internal/direct-mcp-v2/types.js';
10
10
  import type { ScenarioMachineV2 } from './scenario-machine-v2.js';
11
11
  export type AgentName = 'claude' | 'codex' | 'cursor' | 'opencode';
12
12
  export type AgentInteractionMode = 'prompt' | 'start_chat' | 'conversation';
@@ -280,12 +280,14 @@ export interface CheckScorer {
280
280
  name: string;
281
281
  weight: number;
282
282
  fn: (ctx: ScorerContext) => boolean | Promise<boolean>;
283
+ revision?: JsonValue;
283
284
  }
284
285
  export interface ScoreScorer {
285
286
  type: 'score';
286
287
  name: string;
287
288
  weight: number;
288
289
  fn: (ctx: ScorerContext) => number | ScoreResult | Promise<number | ScoreResult>;
290
+ revision?: JsonValue;
289
291
  }
290
292
  export interface ScoreResult {
291
293
  score: number;
@@ -308,6 +310,7 @@ export interface JudgeScorer {
308
310
  maxRounds?: number;
309
311
  /** Enable Anthropic prompt caching for system + tool schemas. Default: true when tools is set. */
310
312
  cacheControl?: boolean;
313
+ revision?: JsonValue;
311
314
  }
312
315
  export interface ToolExpectation {
313
316
  action: ToolAction;
@@ -324,6 +327,7 @@ export interface ToolUsageScorer {
324
327
  name: string;
325
328
  weight: number;
326
329
  expectations: ToolExpectation[];
330
+ revision?: JsonValue;
327
331
  }
328
332
  export interface SessionArtifactMatchOptions {
329
333
  actions?: import('../tool-events.js').ToolAction[];
@@ -472,6 +476,8 @@ export interface PathgradeMeta {
472
476
  deps?: string[];
473
477
  /** Unioned with the auto-detected skill root (or with `deps`). */
474
478
  extraDeps?: string[];
479
+ /** Methodology inputs whose raw bytes participate in comparison identity. */
480
+ comparisonInputs?: string[];
475
481
  /** Unconditionally include this eval in every `pathgrade run --changed`. */
476
482
  alwaysRun?: boolean;
477
483
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/pathgrade",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "packageManager": "yarn@4.12.0",
5
5
  "description": "Evaluate whether AI agents discover and use your skills correctly",
6
6
  "exports": {
@@ -134,11 +134,12 @@
134
134
  "@types/node": "25.6.0",
135
135
  "ajv": "8.20.0",
136
136
  "fs-extra": "11.3.3",
137
+ "hono": "4.13.3",
137
138
  "jiti": "2.6.1",
138
139
  "picomatch": "^4.0.4",
139
140
  "tsx": "4.22.3",
140
141
  "typescript": "^5.9.3",
141
142
  "zod": "4.3.6"
142
143
  },
143
- "falconPackageHash": "044358f11c1feb83b7e0a5b40972dd14eaf2c5b0d1261ba1339cf9d2"
144
+ "falconPackageHash": "9eca97f7cef9dc643ad6eef1d5e6c58f3661f23d216f365cd956102c"
144
145
  }