Files
zernie__vigiles/api-surface/vigiles-adapter.api.md
T
zernie 6349d2c123 fix: three places where a function promised more than it could see (#211)
verifyGuardrail certified guards it never ran. Claude Code hooks carry an `if:` permission-rule pattern deciding whether the hook runs at all; vigiles never read it, so a real vendored hook whose body is an unconditional deny scored 7/7 blocked — certifying it stops rm -rf /, git reset --hard, an SSH-key read and curl | sh. It now reports 1/7 blocked and 6 not run, each with its reason. The condition is evaluated rather than reported unknown because Claude Code's own matcher fails open, so mirroring that asymmetry can only add a run, never invent a skip.

clear() erased other hooks' state. Hooks in one directory deliberately share a store — that is what lets one read a fact another recorded — so removing the directory reset unrelated hooks. It now deletes only entries whose `by` names this hook, verified to agree between the runtime writer and seed() across three path shapes.

The site showed numbers nobody measured: a blurred `recall 92% · precision 100%` sat beside a real grade of the repo a visitor types in, two screens above copy mocking unverified numbers in other people's READMEs. Replaced with em-dash placeholders, as this repo's own landing-site skill had already ruled in writing. Wedge no longer claims breadth that `claude plugin validate` covers.

Each fix carries a mutation proof with the patch grepped in source and in dist before the run.
2026-09-08 02:05:26 +05:00

4.6 KiB

API Report File for "vigiles-adapter"

Do not edit this file. It is a report generated by API Extractor.


// @public
export interface AdapterCapabilities {
    readonly harnessTesting: boolean;
    readonly referenceVerification: true;
    readonly shellHooks: boolean;
    readonly subagents: boolean;
}

// @public
export const ADAPTERS: readonly HarnessAdapter[];

// @public
export function assertAdapterConformance(adapter: HarnessAdapter): void;

// @public
export function assertAdapterLoadsHooks(adapter: HarnessAdapter): void;

// @public
export function assertHarnessTestable(adapter: HarnessAdapter): {
    runtime: NonNullable<HarnessAdapter["runtime"]>;
    modelMock: NonNullable<HarnessAdapter["modelMock"]>;
};

// @public
export function checkAdapterConformance(adapter: HarnessAdapter): ConformanceResult;

// @public (undocumented)
export interface ConformanceResult {
    // (undocumented)
    readonly failures: readonly string[];
    // (undocumented)
    readonly ok: boolean;
}

// @public
export const defaultAdapter: HarnessAdapter;

// @public
export function detectAdapter(root: string): HarnessAdapter;

// @public
export function detectAdapterResult(root: string): DetectResult;

// @public
export interface DetectResult {
    // (undocumented)
    readonly adapter: HarnessAdapter;
    readonly ambiguousWith: readonly string[];
    readonly fallback: boolean;
}

// @public
export function getAdapter(name: string): HarnessAdapter | undefined;

// @public (undocumented)
export interface HarnessAdapter {
    readonly capabilities: AdapterCapabilities;
    detect(root: string): number;
    readonly dialect: HarnessDialect;
    readonly harnessTestDriver?: HarnessTestDriver;
    readonly hookProtocol?: HookProtocol;
    readonly layout: PluginLayout;
    readonly modelMock?: ModelMock;
    readonly name: string;
    readonly runtime?: HarnessRuntime;
}

// @public (undocumented)
export interface HarnessDialect {
    readonly builtinAgentTools: readonly string[];
    readonly hookEvents: readonly string[];
    readonly hookEventVocabulary?: HarnessVocabulary;
    readonly instructionTargets: readonly string[];
    readonly knownMcpServers?: readonly string[];
    readonly mcpToolPattern: RegExp;
    readonly name: string;
    readonly neverAvailableTools: readonly string[];
    readonly noEffectHookEvents?: readonly string[];
    readonly permissionDecisionHookEvents?: readonly string[];
    readonly pluginRootToken: string;
    readonly sideEffectingTools?: readonly string[];
    readonly skillFrontmatter: SkillFrontmatterProfile;
    readonly subagentToolVocabulary?: HarnessVocabulary;
}

// @public
export interface HarnessRuntime {
    readonly agentBinary: string;
    readonly mockApiKey: string;
    readonly modelApiKeyEnv: string;
    readonly modelBaseUrlEnv: string;
    readonly name: string;
    versionKey(raw: string): string;
    wireMock(baseUrl: string): {
        readonly args: readonly string[];
        readonly env: Record<string, string>;
    };
}

// @public (undocumented)
export interface HookProtocol {
    readonly blockExitCode: number;
    readonly condition?: HookConditionSupport;
    readonly denyDecisionValues: readonly string[];
    readonly eventEnvVars: readonly string[];
    readonly haltsTurnField?: string;
    readonly injectableEvents: readonly string[];
    readonly matcherStyle?: "exact" | "regex";
    readonly name: string;
}

// @public
export interface ModelMock {
    readonly countTokensEndpoint?: string;
    readonly modelEndpoint: string;
    readonly name: string;
    readonly wireApi: string;
}

// @public
export interface PluginLayout {
    readonly agentDir: string;
    readonly commandDir: string;
    readonly hooksConventionPath: string;
    readonly instructionFile: string;
    readonly intraRefDirs: readonly string[];
    readonly manifestPath: string;
    readonly materializeRoot: string;
    readonly mcpConfigFile: string;
    readonly mcpManifestKey: string;
    readonly name: string;
    readonly pluginRootToken: string;
    readonly projectRootTokens?: readonly string[];
    readonly rulesDir?: string;
    readonly settingsFormat: "json" | "toml";
    readonly settingsPath: string;
    readonly skillDir: string;
    readonly surfaceDirs: readonly string[];
    readonly userSurfaceRoot?: string;
}

// @public
export function resolveAdapter(root: string, harness?: string): HarnessAdapter;

// (No @packageDocumentation comment for this package)