@wix/pathgrade 1.0.31 → 1.0.32
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.
- package/dist/adapters/jest/invocation-adapter.d.ts +2 -2
- package/dist/adapters/jest/invocation-adapter.js +1 -1
- package/dist/adapters/jest/lifecycle.d.ts +3 -3
- package/dist/adapters/jest/lifecycle.js +1 -1
- package/dist/adapters/jest/metadata.d.ts +0 -1
- package/dist/adapters/jest/metadata.js +1 -1
- package/dist/adapters/jest/results.d.ts +3 -2
- package/dist/affected/format.d.ts +0 -23
- package/dist/affected/format.js +1 -1
- package/dist/affected/sidecar.d.ts +0 -1
- package/dist/affected/sidecar.js +1 -1
- package/dist/affected/types.d.ts +2 -17
- package/dist/agents/claude/ask-user-answer-store.d.ts +2 -1
- package/dist/agents/claude/tool-results.d.ts +1 -1
- package/dist/agents/claude/tool-results.js +1 -1
- package/dist/agents/claude.d.ts +2 -1
- package/dist/agents/codex-app-server/protocol/DynamicToolCallParams.d.ts +2 -1
- package/dist/agents/codex-app-server/protocol/GrantedPermissionProfile.d.ts +3 -2
- package/dist/agents/codex-app-server/protocol/McpElicitationRequestParams.d.ts +3 -2
- package/dist/agents/codex-app-server/protocol/PermissionsRequestApprovalParams.d.ts +3 -2
- package/dist/agents/codex-app-server/protocol/ThreadStartParams.d.ts +7 -6
- package/dist/agents/codex-app-server/protocol/TurnCompletedNotification.d.ts +2 -1
- package/dist/agents/codex-app-server/transport.d.ts +2 -2
- package/dist/commands/analyze.d.ts +0 -13
- package/dist/commands/report.d.ts +0 -7
- package/dist/commands/report.js +1 -1
- package/dist/core/generated-mcp-protocol.d.ts +0 -2
- package/dist/core/generated-mcp-protocol.js +2 -2
- package/dist/evals/discovery.d.ts +0 -1
- package/dist/evals/discovery.js +1 -1
- package/dist/internal/direct-mcp-v2/acp-client.d.ts +0 -8
- package/dist/internal/direct-mcp-v2/acp-direct-mcp.d.ts +2 -1
- package/dist/internal/direct-mcp-v2/claude-direct-mcp.d.ts +1 -1
- package/dist/internal/direct-mcp-v2/claude-profile.d.ts +0 -10
- package/dist/internal/direct-mcp-v2/claude-profile.js +3 -3
- package/dist/internal/direct-mcp-v2/codex-direct-mcp.d.ts +2 -1
- package/dist/internal/direct-mcp-v2/compiler.d.ts +0 -1
- package/dist/internal/direct-mcp-v2/compiler.js +1 -1
- package/dist/internal/direct-mcp-v2/json.d.ts +0 -2
- package/dist/internal/direct-mcp-v2/json.js +2 -2
- package/dist/internal/direct-mcp-v2/runtime-lock.d.ts +2 -1
- package/dist/internal/direct-mcp-v2/runtime-profile.d.ts +0 -1
- package/dist/internal/direct-mcp-v2/runtime-profile.js +1 -1
- package/dist/internal/direct-mcp-v2/types.d.ts +5 -4
- package/dist/providers/mcp-config.d.ts +0 -2
- package/dist/providers/mcp-config.js +2 -2
- package/dist/providers/mcp-runtime-mounting.d.ts +1 -9
- package/dist/providers/sandbox-lifecycle.d.ts +0 -2
- package/dist/providers/sandbox-lifecycle.js +2 -2
- package/dist/providers/scripted-mcp-mock-host.d.ts +1 -1
- package/dist/providers/workspace.d.ts +0 -1
- package/dist/reporters/github-comment.d.ts +0 -11
- package/dist/reporters/github-comment.js +1 -1
- package/dist/reporters/verbose-emitter.d.ts +7 -19
- package/dist/reporters/verbose-emitter.js +5 -5
- package/dist/reporting/types.d.ts +2 -1
- package/dist/runners/adapter-loader.d.ts +0 -3
- package/dist/runners/model-validation.d.ts +2 -1
- package/dist/runners/repeated-attempts.d.ts +0 -5
- package/dist/runners/repeated-attempts.js +1 -1
- package/dist/runners/vitest-invocation.d.ts +2 -2
- package/dist/runners/vitest-invocation.js +1 -1
- package/dist/runners/vitest-lifecycle.d.ts +0 -2
- package/dist/runners/vitest-lifecycle.js +1 -1
- package/dist/sdk/ask-bus/handler.d.ts +3 -2
- package/dist/sdk/diagnostics.d.ts +4 -3
- package/dist/sdk/judge-tool-runner.d.ts +1 -2
- package/dist/sdk/mcp-mock-approvals.d.ts +3 -2
- package/dist/sdk/reaction-loader.d.ts +1 -2
- package/dist/sdk/reaction-preview.d.ts +1 -4
- package/dist/sdk/reaction-preview.js +3 -3
- package/dist/sdk/run-scorer.d.ts +1 -4
- package/dist/sdk/run-scorer.js +3 -3
- package/dist/sdk/runtime-policy.d.ts +0 -1
- package/dist/sdk/runtime-policy.js +1 -1
- package/dist/tool-events.d.ts +0 -1
- package/dist/tool-events.js +1 -1
- package/dist/types.d.ts +8 -26
- package/dist/types.js +1 -1
- package/dist/utils/cli.d.ts +0 -15
- package/dist/utils/cli.js +4 -4
- package/dist/utils/llm-mocks.d.ts +3 -2
- package/dist/utils/llm-providers/cli.d.ts +0 -1
- package/dist/utils/llm-providers/cli.js +1 -1
- package/dist/utils/llm-types.d.ts +4 -3
- package/dist/utils/llm.d.ts +2 -2
- package/dist/utils/llm.js +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ResolvedPathgradeConfig, type RunnerInvocationAdapter } from '@wix/pathgrade/adapter-kit';
|
|
2
|
-
|
|
2
|
+
interface SpawnJestRequest {
|
|
3
3
|
argv: string[];
|
|
4
4
|
env: NodeJS.ProcessEnv;
|
|
5
5
|
cwd: string;
|
|
@@ -12,4 +12,4 @@ export declare function createJestInvocationAdapter(input: {
|
|
|
12
12
|
export declare function createPathgradeInvocationAdapter(input: {
|
|
13
13
|
config: ResolvedPathgradeConfig;
|
|
14
14
|
}): RunnerInvocationAdapter;
|
|
15
|
-
export
|
|
15
|
+
export {};
|
|
@@ -99,7 +99,7 @@ async function defaultSpawnJest(req) {
|
|
|
99
99
|
child.on('error', () => resolve(1));
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
|
|
102
|
+
function resolveLocalJestBinPath(cwd) {
|
|
103
103
|
let packageJsonPath;
|
|
104
104
|
try {
|
|
105
105
|
const req = createRequire(path.join(cwd, 'package.json'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CaseContext, type CaseContextProviderHandle, type ResultObserverHandle, type PathgradeTestMeta, type AdapterLifecycleHooks, type EvalResultEvent } from '@wix/pathgrade/adapter-kit';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type JestHook = (fn: () => void | Promise<void>) => void;
|
|
3
|
+
interface JestState {
|
|
4
4
|
testPath?: string;
|
|
5
5
|
currentTestName?: string;
|
|
6
6
|
}
|
|
@@ -18,4 +18,4 @@ export interface JestLifecycleInstallHandle {
|
|
|
18
18
|
}
|
|
19
19
|
export declare function installJestLifecycle(input: JestLifecycleInstallInput): JestLifecycleInstallHandle;
|
|
20
20
|
export declare function getJestLifecycleMetadata(): Map<string, PathgradeTestMeta[]>;
|
|
21
|
-
export
|
|
21
|
+
export {};
|
|
@@ -54,7 +54,7 @@ export function installJestLifecycle(input) {
|
|
|
54
54
|
export function getJestLifecycleMetadata() {
|
|
55
55
|
return new Map(metadataByCaseId);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
function resetJestLifecycleMetadata() {
|
|
58
58
|
metadataByCaseId.clear();
|
|
59
59
|
}
|
|
60
60
|
function defaultSubscribeToResults(callback) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { PathgradeTestMeta } from '@wix/pathgrade/adapter-kit';
|
|
2
|
-
export declare function resolveJestMetadataPath(cwd?: string): string;
|
|
3
2
|
export declare function withJestMetadataEnv(env: NodeJS.ProcessEnv, cwd: string): NodeJS.ProcessEnv;
|
|
4
3
|
export declare function appendJestMetadata(caseId: string, metadata: PathgradeTestMeta[]): void;
|
|
5
4
|
export declare function readJestMetadata(metadataPath?: string): Map<string, PathgradeTestMeta[]>;
|
|
@@ -2,7 +2,7 @@ import * as fs from 'node:fs';
|
|
|
2
2
|
import * as path from 'node:path';
|
|
3
3
|
const METADATA_ENV = 'PATHGRADE_JEST_METADATA_PATH';
|
|
4
4
|
const FALLBACK_METADATA_FILE = 'jest-metadata.jsonl';
|
|
5
|
-
|
|
5
|
+
function resolveJestMetadataPath(cwd = process.cwd()) {
|
|
6
6
|
return process.env[METADATA_ENV] ?? path.join(cwd, '.pathgrade', FALLBACK_METADATA_FILE);
|
|
7
7
|
}
|
|
8
8
|
export function withJestMetadataEnv(env, cwd) {
|
|
@@ -2,12 +2,12 @@ import type { AdapterRunHandle, NormalizedRunSnapshot, PathgradeTestMeta } from
|
|
|
2
2
|
export interface JestAggregatedResult {
|
|
3
3
|
testResults?: JestFileResult[];
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
interface JestFileResult {
|
|
6
6
|
testFilePath: string;
|
|
7
7
|
assertionResults?: JestAssertionResult[];
|
|
8
8
|
testResults?: JestAssertionResult[];
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
interface JestAssertionResult {
|
|
11
11
|
ancestorTitles?: string[];
|
|
12
12
|
title: string;
|
|
13
13
|
fullName?: string;
|
|
@@ -30,3 +30,4 @@ export declare function jestCaseId(input: {
|
|
|
30
30
|
fullName: string;
|
|
31
31
|
occurrenceCounts?: Map<string, number>;
|
|
32
32
|
}): string;
|
|
33
|
+
export {};
|
|
@@ -9,28 +9,6 @@
|
|
|
9
9
|
* size-optimized `changed_files_count` summary).
|
|
10
10
|
*/
|
|
11
11
|
import type { SelectionResult } from './types.js';
|
|
12
|
-
interface JsonSelectionEntry {
|
|
13
|
-
file: string;
|
|
14
|
-
reason: string;
|
|
15
|
-
matched_glob?: string;
|
|
16
|
-
}
|
|
17
|
-
interface JsonSelectionSkipped {
|
|
18
|
-
file: string;
|
|
19
|
-
reason: string;
|
|
20
|
-
}
|
|
21
|
-
export interface JsonSelectionResult {
|
|
22
|
-
base_ref: string;
|
|
23
|
-
changed_files: string[];
|
|
24
|
-
global_match?: string;
|
|
25
|
-
selected: JsonSelectionEntry[];
|
|
26
|
-
skipped: JsonSelectionSkipped[];
|
|
27
|
-
warnings: string[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Transform `SelectionResult` (camelCase) into the snake_case wire shape
|
|
31
|
-
* consumed by `--json` and the sidecar-writer (Issue 11).
|
|
32
|
-
*/
|
|
33
|
-
export declare function toJsonShape(result: SelectionResult): JsonSelectionResult;
|
|
34
12
|
/**
|
|
35
13
|
* Stable JSON: keys in a fixed order, arrays pre-sorted by `toJsonShape`.
|
|
36
14
|
* Emits a trailing newline so downstream tools can treat it like any other
|
|
@@ -42,4 +20,3 @@ export declare function formatJson(result: SelectionResult): string;
|
|
|
42
20
|
* changed files, per-eval decision with reason, warnings footer.
|
|
43
21
|
*/
|
|
44
22
|
export declare function formatExplain(result: SelectionResult): string;
|
|
45
|
-
export {};
|
package/dist/affected/format.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Transform `SelectionResult` (camelCase) into the snake_case wire shape
|
|
13
13
|
* consumed by `--json` and the sidecar-writer (Issue 11).
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
function toJsonShape(result) {
|
|
16
16
|
const out = {
|
|
17
17
|
base_ref: result.baseRef,
|
|
18
18
|
changed_files: [...result.changedFiles].sort(),
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type { SelectionResult } from './types.js';
|
|
16
16
|
import type { PathgradeSelectionReport } from '../types.js';
|
|
17
|
-
export declare const SIDECAR_FILENAME = "selection.json";
|
|
18
17
|
export declare function getSidecarPath(cwd: string): string;
|
|
19
18
|
/**
|
|
20
19
|
* Flatten a `SelectionResult` into the compact shape written to
|
package/dist/affected/sidecar.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import * as path from 'path';
|
|
16
16
|
import fs from 'fs-extra';
|
|
17
17
|
import { getPathgradeDir } from '../reporters/results-path.js';
|
|
18
|
-
|
|
18
|
+
const SIDECAR_FILENAME = 'selection.json';
|
|
19
19
|
export function getSidecarPath(cwd) {
|
|
20
20
|
return path.join(getPathgradeDir(cwd), SIDECAR_FILENAME);
|
|
21
21
|
}
|
package/dist/affected/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This file is the single source of truth for the `SelectionResult` shape
|
|
5
5
|
* and `SelectionReason` enum. Extended across Issues 5–11; do not duplicate.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type SelectionReason = 'deps-match' | 'always-run' | 'global-match' | 'on-missing-fail-closed';
|
|
8
8
|
export interface SelectionEntry {
|
|
9
9
|
file: string;
|
|
10
10
|
reason: SelectionReason;
|
|
@@ -25,19 +25,4 @@ export interface SelectionResult {
|
|
|
25
25
|
skipped: SelectionSkipped[];
|
|
26
26
|
warnings: string[];
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
* Public SDK type — exported from `@wix/pathgrade` so evals can annotate
|
|
30
|
-
* their `__pathgradeMeta` export with a typed shape.
|
|
31
|
-
*
|
|
32
|
-
* `onMissing` is intentionally NOT a user-writable field: it names
|
|
33
|
-
* pathgrade's *runtime behavior* when an eval has neither a SKILL.md
|
|
34
|
-
* anchor nor an explicit meta declaration.
|
|
35
|
-
*/
|
|
36
|
-
export interface PathgradeMeta {
|
|
37
|
-
/** Full-override dep globs (repo-relative). Replaces auto-detected SKILL.md anchor. */
|
|
38
|
-
deps?: string[];
|
|
39
|
-
/** Additional dep globs unioned with the auto-detected SKILL.md anchor. */
|
|
40
|
-
extraDeps?: string[];
|
|
41
|
-
/** When true, unconditionally include this eval in every `pathgrade run --changed`. */
|
|
42
|
-
alwaysRun?: boolean;
|
|
43
|
-
}
|
|
28
|
+
export {};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* the projector ultimately sees — both sides need a join key.
|
|
16
16
|
*/
|
|
17
17
|
import type { AskAnswerSource } from '../../sdk/ask-bus/types.js';
|
|
18
|
-
|
|
18
|
+
interface AskUserAnswerEntry {
|
|
19
19
|
/** The SDK-shape `answers` map (question text → answer string). */
|
|
20
20
|
readonly answers: Record<string, string>;
|
|
21
21
|
/** Source tag from the `AskAnswer` resolution — what the projector stamps. */
|
|
@@ -26,3 +26,4 @@ export interface AskUserAnswerStore {
|
|
|
26
26
|
get(toolUseId: string | undefined): AskUserAnswerEntry | undefined;
|
|
27
27
|
}
|
|
28
28
|
export declare function createAskUserAnswerStore(): AskUserAnswerStore;
|
|
29
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SDKMessage } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import type { ToolEvent } from '../../tool-events.js';
|
|
3
|
-
export { collectSensitiveEnvValues,
|
|
3
|
+
export { collectSensitiveEnvValues, } from '../../tool-event-results.js';
|
|
4
4
|
export interface ClaudeSdkMessageTiming {
|
|
5
5
|
receivedAt: string;
|
|
6
6
|
receivedMonotonicMs: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sanitizeToolEventResult, } from '../../tool-event-results.js';
|
|
2
|
-
export { collectSensitiveEnvValues,
|
|
2
|
+
export { collectSensitiveEnvValues, } from '../../tool-event-results.js';
|
|
3
3
|
export function hasToolLifecycleBoundary(message) {
|
|
4
4
|
if (message.type !== 'assistant' && message.type !== 'user')
|
|
5
5
|
return false;
|
package/dist/agents/claude.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { type Options as SdkOptions, type Query } from '@anthropic-ai/claude-agent-sdk';
|
|
25
25
|
import { AgentCommandRunner, AgentSession, AgentSessionOptions, BaseAgent, EnvironmentHandle } from '../types.js';
|
|
26
26
|
/** Shape of the SDK `query()` callable, narrowed for orchestration use. */
|
|
27
|
-
|
|
27
|
+
type ClaudeSdkQueryFn = (args: {
|
|
28
28
|
prompt: string | unknown;
|
|
29
29
|
options?: SdkOptions;
|
|
30
30
|
}) => Query;
|
|
@@ -60,3 +60,4 @@ export declare class ClaudeAgent extends BaseAgent {
|
|
|
60
60
|
constructor(deps?: ClaudeAgentDeps, opts?: ClaudeAgentOptions);
|
|
61
61
|
createSession(runtime: EnvironmentHandle, _runCommand: AgentCommandRunner, sessionOptions?: AgentSessionOptions): Promise<AgentSession>;
|
|
62
62
|
}
|
|
63
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type AdditionalFileSystemPermissions = unknown;
|
|
2
|
+
type AdditionalNetworkPermissions = unknown;
|
|
3
3
|
export type GrantedPermissionProfile = {
|
|
4
4
|
network?: AdditionalNetworkPermissions;
|
|
5
5
|
fileSystem?: AdditionalFileSystemPermissions;
|
|
6
6
|
};
|
|
7
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type JsonValue = unknown;
|
|
2
|
+
type McpElicitationSchema = unknown;
|
|
3
3
|
export type McpElicitationRequestParams = {
|
|
4
4
|
threadId: string;
|
|
5
5
|
/**
|
|
@@ -26,3 +26,4 @@ export type McpElicitationRequestParams = {
|
|
|
26
26
|
url: string;
|
|
27
27
|
elicitationId: string;
|
|
28
28
|
});
|
|
29
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type AbsolutePathBuf = string;
|
|
2
|
+
type RequestPermissionProfile = unknown;
|
|
3
3
|
export type PermissionsRequestApprovalParams = {
|
|
4
4
|
threadId: string;
|
|
5
5
|
turnId: string;
|
|
@@ -11,3 +11,4 @@ export type PermissionsRequestApprovalParams = {
|
|
|
11
11
|
reason: string | null;
|
|
12
12
|
permissions: RequestPermissionProfile;
|
|
13
13
|
};
|
|
14
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { SandboxMode } from './SandboxMode.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type Personality = unknown;
|
|
3
|
+
type JsonValue = unknown;
|
|
4
|
+
type ApprovalsReviewer = 'user' | 'auto_review' | 'guardian_subagent';
|
|
5
|
+
type AskForApproval = 'untrusted' | 'on-request' | {
|
|
6
6
|
granular: {
|
|
7
7
|
sandbox_approval: boolean;
|
|
8
8
|
rules: boolean;
|
|
@@ -11,8 +11,8 @@ export type AskForApproval = 'untrusted' | 'on-request' | {
|
|
|
11
11
|
mcp_elicitations: boolean;
|
|
12
12
|
};
|
|
13
13
|
} | 'never';
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
type ThreadStartSource = unknown;
|
|
15
|
+
type ThreadSource = unknown;
|
|
16
16
|
export type ThreadStartParams = {
|
|
17
17
|
model?: string | null;
|
|
18
18
|
modelProvider?: string | null;
|
|
@@ -39,3 +39,4 @@ export type ThreadStartParams = {
|
|
|
39
39
|
*/
|
|
40
40
|
threadSource?: ThreadSource | null;
|
|
41
41
|
};
|
|
42
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Readable, Writable } from 'stream';
|
|
2
|
-
|
|
2
|
+
type Unsubscribe = () => void;
|
|
3
3
|
export interface ServerRequestMessage {
|
|
4
4
|
readonly id: number | string;
|
|
5
5
|
readonly method: string;
|
|
6
6
|
readonly params: unknown;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface ServerNotificationMessage {
|
|
9
9
|
readonly method: string;
|
|
10
10
|
readonly params: unknown;
|
|
11
11
|
}
|
|
@@ -2,19 +2,6 @@ export interface AnalyzeOptions {
|
|
|
2
2
|
skill?: string;
|
|
3
3
|
dir?: string;
|
|
4
4
|
}
|
|
5
|
-
export interface SkillAnalysis {
|
|
6
|
-
skillName: string;
|
|
7
|
-
description: string;
|
|
8
|
-
procedures: string[];
|
|
9
|
-
expectedOutputs: string[];
|
|
10
|
-
suggestedScorers: Array<{
|
|
11
|
-
type: 'check' | 'judge';
|
|
12
|
-
name: string;
|
|
13
|
-
hint: string;
|
|
14
|
-
}>;
|
|
15
|
-
workspaceHint: string;
|
|
16
|
-
hasFixtures: boolean;
|
|
17
|
-
}
|
|
18
5
|
/**
|
|
19
6
|
* Run the analyze command. Returns exit code (0 = success, 1 = error).
|
|
20
7
|
*/
|
|
@@ -33,13 +33,6 @@ export interface ReportOptions {
|
|
|
33
33
|
/** Skip a comment update when the pull request has advanced. */
|
|
34
34
|
expectedHeadSha?: string;
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolve the comment-id used for the dedup marker.
|
|
38
|
-
*
|
|
39
|
-
* Precedence: explicit `commentId` → `$GITHUB_WORKFLOW:$GITHUB_JOB` →
|
|
40
|
-
* `$GITHUB_WORKFLOW` → hard-coded literal `"default"`.
|
|
41
|
-
*/
|
|
42
|
-
export declare function resolveCommentId(explicit?: string): string;
|
|
43
36
|
/**
|
|
44
37
|
* Entry point for `pathgrade report`. The default display-only mode never
|
|
45
38
|
* fails CI. Strict mode is intended for orchestrators that own publication.
|
package/dist/commands/report.js
CHANGED
|
@@ -28,7 +28,7 @@ const DEFAULT_RESULTS_PATH = path.join('.pathgrade', 'results.json');
|
|
|
28
28
|
* Precedence: explicit `commentId` → `$GITHUB_WORKFLOW:$GITHUB_JOB` →
|
|
29
29
|
* `$GITHUB_WORKFLOW` → hard-coded literal `"default"`.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
function resolveCommentId(explicit) {
|
|
32
32
|
if (explicit && explicit.length > 0)
|
|
33
33
|
return explicit;
|
|
34
34
|
const workflow = process.env.GITHUB_WORKFLOW;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const MCP_ANNOTATION_PROTOCOL_FLOOR = "2025-03-26";
|
|
2
|
-
export declare const MCP_LATEST_ANNOTATION_PROTOCOL = "2025-11-25";
|
|
3
2
|
export interface GeneratedMcpInitializeResult {
|
|
4
3
|
protocolVersion: string;
|
|
5
4
|
capabilities: {
|
|
@@ -11,7 +10,6 @@ export interface GeneratedMcpInitializeResult {
|
|
|
11
10
|
};
|
|
12
11
|
instructions?: string;
|
|
13
12
|
}
|
|
14
|
-
export declare function negotiateGeneratedMcpProtocol(requestedVersion: unknown): string;
|
|
15
13
|
export declare function buildGeneratedMcpInitializeResult(opts: {
|
|
16
14
|
requestedVersion: unknown;
|
|
17
15
|
serverName: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export const MCP_ANNOTATION_PROTOCOL_FLOOR = '2025-03-26';
|
|
2
|
-
|
|
2
|
+
const MCP_LATEST_ANNOTATION_PROTOCOL = '2025-11-25';
|
|
3
3
|
const SUPPORTED_ANNOTATION_PROTOCOLS = new Set([
|
|
4
4
|
MCP_ANNOTATION_PROTOCOL_FLOOR,
|
|
5
5
|
'2025-06-18',
|
|
6
6
|
MCP_LATEST_ANNOTATION_PROTOCOL,
|
|
7
7
|
]);
|
|
8
|
-
|
|
8
|
+
function negotiateGeneratedMcpProtocol(requestedVersion) {
|
|
9
9
|
if (typeof requestedVersion !== 'string') {
|
|
10
10
|
throw new Error('MCP initialize requires a string protocolVersion');
|
|
11
11
|
}
|
package/dist/evals/discovery.js
CHANGED
|
@@ -44,7 +44,7 @@ export function discoverPathgradeEvalFiles(opts) {
|
|
|
44
44
|
results.sort();
|
|
45
45
|
return results;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
function isPathgradeEval(absPath) {
|
|
48
48
|
const source = fs.readFileSync(absPath, 'utf8');
|
|
49
49
|
const sourceFile = ts.createSourceFile(absPath, source, ts.ScriptTarget.Latest,
|
|
50
50
|
/* setParentNodes */ false, ts.ScriptKind.TS);
|
|
@@ -2,14 +2,6 @@ import { type ChildProcessWithoutNullStreams } from 'node:child_process';
|
|
|
2
2
|
import type { JsonObject, JsonValue } from './types.js';
|
|
3
3
|
export type JsonRpcMessage = JsonObject;
|
|
4
4
|
export type AcpNotificationCheckpoint = number;
|
|
5
|
-
export type AcpPermissionRequest = {
|
|
6
|
-
sessionId?: string;
|
|
7
|
-
toolCallId?: string;
|
|
8
|
-
options: readonly {
|
|
9
|
-
optionId: string;
|
|
10
|
-
kind: string;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
5
|
export type AcpClientRequestHandler = (method: string, params: JsonValue) => Promise<JsonValue>;
|
|
14
6
|
export declare class AcpClientCore {
|
|
15
7
|
private readonly sendFrame;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { spawnAcpClient } from './acp-client.js';
|
|
2
2
|
import { type CleanupReport } from './cleanup.js';
|
|
3
3
|
import type { EvidenceEnvelope, RuntimeCapabilityProfile, ScenarioArtifact, ScenarioMachineV2 } from './types.js';
|
|
4
|
-
|
|
4
|
+
type AcpDirectMcpChecks = {
|
|
5
5
|
runtimeAdmitted: boolean;
|
|
6
6
|
secretFreeProject: boolean;
|
|
7
7
|
directCall: boolean;
|
|
@@ -36,3 +36,4 @@ export type AcpDirectMcpOptions = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare function curateAcpProcessEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
38
38
|
export declare function runAcpDirectMcpTrial(options: AcpDirectMcpOptions): Promise<AcpDirectMcpTrialResult>;
|
|
39
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { type CleanupReport } from './cleanup.js';
|
|
|
4
4
|
import { type MaterializedProjection } from './materialize.js';
|
|
5
5
|
import type { AdmittedRuntimeProfile, EvidenceEnvelope, ScenarioArtifact, ScenarioMachineV2 } from './types.js';
|
|
6
6
|
export declare const CLAUDE_DIRECT_MCP_FLAG = "PATHGRADE_INTERNAL_CLAUDE_DIRECT_MCP_V2";
|
|
7
|
-
|
|
7
|
+
type ClaudeDirectMcpChecks = {
|
|
8
8
|
runtimeAdmitted: boolean;
|
|
9
9
|
secretFreeProject: boolean;
|
|
10
10
|
directCall: boolean;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import type { RuntimeLock, RuntimeLockControlPlane } from './runtime-lock.js';
|
|
2
2
|
import type { JsonObject } from './types.js';
|
|
3
3
|
export declare const CLAUDE_DIRECT_MCP_NORMALIZED_HANDSHAKE: JsonObject;
|
|
4
|
-
export declare const CLAUDE_DIRECT_MCP_CAPABILITIES: {
|
|
5
|
-
readonly streamableHttp: true;
|
|
6
|
-
readonly controlPlaneHeaders: true;
|
|
7
|
-
readonly parentOwnedSdkMcp: true;
|
|
8
|
-
readonly cancellation: "abort-controller";
|
|
9
|
-
};
|
|
10
|
-
/** Code-owned relocatable identity lock captured by RFC 0006. */
|
|
11
|
-
export declare const CLAUDE_DIRECT_MCP_DARWIN_ARM64_LOCK: RuntimeLock;
|
|
12
|
-
/** Provisional Linux x64 glibc lock; CI re-verifies every artifact before admission. */
|
|
13
|
-
export declare const CLAUDE_DIRECT_MCP_LINUX_X64_GLIBC_LOCK: RuntimeLock;
|
|
14
4
|
export type ClaudeRuntimeTarget = {
|
|
15
5
|
id: 'darwin-arm64' | 'linux-x64-glibc';
|
|
16
6
|
platform: 'darwin' | 'linux';
|
|
@@ -13,7 +13,7 @@ export const CLAUDE_DIRECT_MCP_NORMALIZED_HANDSHAKE = {
|
|
|
13
13
|
cancellation: 'abort-controller',
|
|
14
14
|
sdkMethods: ['createSdkMcpServer', 'query'],
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
const CLAUDE_DIRECT_MCP_CAPABILITIES = {
|
|
17
17
|
streamableHttp: true,
|
|
18
18
|
controlPlaneHeaders: true,
|
|
19
19
|
parentOwnedSdkMcp: true,
|
|
@@ -45,14 +45,14 @@ function claudeLock(options) {
|
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
/** Code-owned relocatable identity lock captured by RFC 0006. */
|
|
48
|
-
|
|
48
|
+
const CLAUDE_DIRECT_MCP_DARWIN_ARM64_LOCK = claudeLock({
|
|
49
49
|
platform: 'darwin',
|
|
50
50
|
architecture: 'arm64',
|
|
51
51
|
packageName: '@anthropic-ai/claude-agent-sdk-darwin-arm64',
|
|
52
52
|
commandSha256: '31ac95bb19a33b1d0cddd3f3ff594bf8bfd2be5051cd2af7867109641cab705e',
|
|
53
53
|
});
|
|
54
54
|
/** Provisional Linux x64 glibc lock; CI re-verifies every artifact before admission. */
|
|
55
|
-
|
|
55
|
+
const CLAUDE_DIRECT_MCP_LINUX_X64_GLIBC_LOCK = claudeLock({
|
|
56
56
|
platform: 'linux',
|
|
57
57
|
architecture: 'x64',
|
|
58
58
|
packageName: '@anthropic-ai/claude-agent-sdk-linux-x64',
|
|
@@ -2,7 +2,7 @@ import { type CleanupReport } from './cleanup.js';
|
|
|
2
2
|
import { type AppServerSessionHandle } from '../../agents/codex-app-server/transport.js';
|
|
3
3
|
import type { EvidenceEnvelope, ScenarioArtifact, ScenarioMachineV2 } from './types.js';
|
|
4
4
|
export declare const CODEX_DIRECT_MCP_FLAG = "PATHGRADE_INTERNAL_CODEX_DIRECT_MCP_V2";
|
|
5
|
-
|
|
5
|
+
type CodexDirectMcpChecks = {
|
|
6
6
|
runtimeAdmitted: boolean;
|
|
7
7
|
secretFreeProject: boolean;
|
|
8
8
|
directCall: boolean;
|
|
@@ -39,3 +39,4 @@ export declare function runCodexDirectMcpTrial(options: {
|
|
|
39
39
|
}) => AppServerSessionHandle;
|
|
40
40
|
}): Promise<CodexDirectMcpTrialResult>;
|
|
41
41
|
export declare function mapCodexProviderEnvironment(environment: NodeJS.ProcessEnv, codexHome: string): NodeJS.ProcessEnv;
|
|
42
|
+
export {};
|
|
@@ -9,4 +9,3 @@ export type CompileScenarioResult = {
|
|
|
9
9
|
export declare function matchExpression(args: JsonObject, expression: MatchExpr): boolean;
|
|
10
10
|
export declare function compileScenario(source: unknown): CompileScenarioResult;
|
|
11
11
|
export declare function compileScenarioText(text: string): CompileScenarioResult;
|
|
12
|
-
export declare function isSha256(value: unknown): value is string;
|
|
@@ -444,6 +444,6 @@ export function compileScenarioText(text) {
|
|
|
444
444
|
return { ok: false, diagnostics: [{ code: 'INVALID_JSON_TEXT', path: '$', message: error instanceof Error ? error.message : String(error) }] };
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
|
|
447
|
+
function isSha256(value) {
|
|
448
448
|
return typeof value === 'string' && SHA256.test(value);
|
|
449
449
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { JsonValue } from './types.js';
|
|
2
|
-
export declare function assertJsonValue(value: unknown, path?: string, ancestors?: Set<object>): asserts value is JsonValue;
|
|
3
2
|
export declare function canonicalJson(value: unknown): string;
|
|
4
3
|
export declare function sha256Canonical(value: unknown): string;
|
|
5
|
-
export declare function escapePointerToken(token: string): string;
|
|
6
4
|
export declare function parsePointer(pointer: string): string[];
|
|
7
5
|
export declare const MISSING: unique symbol;
|
|
8
6
|
export declare function resolvePointer(value: JsonValue, pointer: string): JsonValue | typeof MISSING;
|
|
@@ -13,7 +13,7 @@ function assertValidString(value, path) {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
function assertJsonValue(value, path = '$', ancestors = new Set()) {
|
|
17
17
|
if (value === null || typeof value === 'boolean')
|
|
18
18
|
return;
|
|
19
19
|
if (typeof value === 'string')
|
|
@@ -69,7 +69,7 @@ export function canonicalJson(value) {
|
|
|
69
69
|
export function sha256Canonical(value) {
|
|
70
70
|
return createHash('sha256').update(canonicalJson(value)).digest('hex');
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
function escapePointerToken(token) {
|
|
73
73
|
return token.replaceAll('~', '~0').replaceAll('/', '~1');
|
|
74
74
|
}
|
|
75
75
|
export function parsePointer(pointer) {
|
|
@@ -32,7 +32,7 @@ export type RuntimeLockAdmissionContext<TControlPlane extends RuntimeLockControl
|
|
|
32
32
|
commandVersion?: (commandPath: string, args: readonly string[]) => Promise<string>;
|
|
33
33
|
initializeControlPlane(commandPath: string, args: readonly string[]): Promise<TControlPlane>;
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
type RuntimeLockIdentity = {
|
|
36
36
|
provider: RuntimeLock['provider'];
|
|
37
37
|
platform: string;
|
|
38
38
|
architecture: string;
|
|
@@ -49,3 +49,4 @@ export type RuntimeLockAdmission<TControlPlane extends RuntimeLockControlPlane =
|
|
|
49
49
|
controlPlane: TControlPlane;
|
|
50
50
|
};
|
|
51
51
|
export declare function admitRuntimeLock<TControlPlane extends RuntimeLockControlPlane>(rawLock: RuntimeLock, context: RuntimeLockAdmissionContext<TControlPlane>): Promise<RuntimeLockAdmission<TControlPlane>>;
|
|
52
|
+
export {};
|
|
@@ -24,5 +24,4 @@ export type RuntimeAdmissionResult = {
|
|
|
24
24
|
};
|
|
25
25
|
export declare function profileFingerprint(profile: Omit<RuntimeCapabilityProfile, 'profileFingerprint' | 'runtimeCapabilityFingerprint'>): string;
|
|
26
26
|
export declare function runtimeCapabilityFingerprint(normalizedHandshake: JsonObject): string;
|
|
27
|
-
export declare function parseRuntimeProfile(input: string | unknown): RuntimeCapabilityProfile;
|
|
28
27
|
export declare function admitRuntimeProfile(rawProfile: string | unknown, context: RuntimeAdmissionContext): Promise<RuntimeAdmissionResult>;
|
|
@@ -28,7 +28,7 @@ export function profileFingerprint(profile) {
|
|
|
28
28
|
export function runtimeCapabilityFingerprint(normalizedHandshake) {
|
|
29
29
|
return sha256Canonical(normalizedHandshake);
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
function parseRuntimeProfile(input) {
|
|
32
32
|
const value = typeof input === 'string' ? parseStrictJson(input) : input;
|
|
33
33
|
canonicalJson(value);
|
|
34
34
|
if (!object(value))
|
|
@@ -3,8 +3,8 @@ export type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
|
|
|
3
3
|
export type JsonObject = {
|
|
4
4
|
[key: string]: JsonValue;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
type Sha256 = string;
|
|
7
|
+
type HmacSha256 = string;
|
|
8
8
|
export type ProviderId = 'claude' | 'codex' | 'cursor' | 'opencode';
|
|
9
9
|
export type MatchPredicate = {
|
|
10
10
|
pointer: string;
|
|
@@ -72,7 +72,7 @@ export type ScenarioDiagnostic = {
|
|
|
72
72
|
path: string;
|
|
73
73
|
message: string;
|
|
74
74
|
};
|
|
75
|
-
|
|
75
|
+
type CompiledTool = {
|
|
76
76
|
qualifiedToolId: string;
|
|
77
77
|
serverId: string;
|
|
78
78
|
toolId: string;
|
|
@@ -80,7 +80,7 @@ export type CompiledTool = {
|
|
|
80
80
|
otherwise: ScenarioRejection;
|
|
81
81
|
effectful: boolean;
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
type ScenarioIR = {
|
|
84
84
|
version: 2;
|
|
85
85
|
scenarioId: string;
|
|
86
86
|
initialState: string;
|
|
@@ -231,3 +231,4 @@ export type ProviderCorroboration = {
|
|
|
231
231
|
phase: string;
|
|
232
232
|
order: number;
|
|
233
233
|
};
|
|
234
|
+
export {};
|