Files
reverse-engineering-anything/scripts/lib/artifact-e2e.d.mts
T
morluto 8b7829e385 fix(verify): run the native-calls hardened-runtime check in the artifact CLI environment (#11236)
* fix(verify): run the native-calls hardened-runtime check in the artifact CLI environment

* fix(verify): give the native-calls get-task-allow copy its dSYM
2026-11-15 23:58:09 +08:00

38 lines
1.1 KiB
TypeScript

import type {
Client,
CallToolRequestOptions,
} from "@modelcontextprotocol/client";
import type { VerifierCommands } from "./verify-commands.mjs";
/** Keep the opened target and its owned stdio server alive through verification. */
export function withArtifactMcp(
target: string,
verify: (client: Client) => Promise<void>,
options?: {
readonly commands?: VerifierCommands;
readonly signal?: AbortSignal;
},
): Promise<void>;
/** Call with the server's advertised schema; callers cannot replace it. */
export function artifactMcpCall(
client: Client,
parameters: Parameters<Client["callTool"]>[0],
options?: Omit<CallToolRequestOptions, "toolDefinition">,
): ReturnType<Client["callTool"]>;
/**
* Run the compiled CLI in the artifact verification environment for a run
* that must fail, and return its JSON error record.
*/
export function artifactCliFailure(
command: string,
target: string,
arguments_?: readonly string[],
options?: { readonly timeoutMs?: number; readonly signal?: AbortSignal },
): Promise<{
readonly code: string;
readonly details?: Record<string, unknown>;
readonly [key: string]: unknown;
}>;