mirror of
https://github.com/zernie/vigiles.git
synced 2026-09-14 20:53:57 +08:00
94af23a5b7
Closes #173, #174, #175, #176 and #170. #174 — decideHook read exit 2, `decision` and `permissionDecision` but not the harness's halt-the-turn field, so `assertBlocksDisasters` reported a guard that stopped every disaster as blocking none. The field is read from the PORT, not hard-coded: `continue` is documented for Claude Code and unverified for Codex. The issue's adjacent suggestion was deliberately NOT implemented — adding the halt to `hook-block-ineffective` as a block-attempt signal would fire on hooks that WORK, since a halt is not event-scoped. It reads as a suppressor instead, fixing a real false alarm. A mutation implementing the original suggestion literally is pinned by a test that fails on it. #173 — compile printed its errors, exited 1, and wrote a hash-valid CLAUDE.md anyway, so `lint` went green over refs it had just called dead. Nothing is written on a failed compile now. #176 — eight small defects, including `audit --out` outside the repo appending unreachable `../../..` entries to .gitignore (a documented read-only report editing a tracked file), an unknown command exiting 1 against a documented 2, and STABILITY.md promising the removed `scan` verb. #175 + #176.2 — three missing capabilities, each opt-in and additive: `{surface}` in testGlobs, `--single`, and `rulesDir` so `.claude/rules/**` stops being invisible. #170 — one enumeration of export forms written against the grammar, both naming checks driven off it, and `check-internal-tag.mjs` asking the TypeScript compiler instead of a regex. It immediately found the issue's open case, 13 tagged types the regex had never seen, and a live gap in the ESLint rule. BREAKING CHANGE: `HookRunResult` gains a required `haltsTurn`, so code that CONSTRUCTS one (a test fake) must set it. Reading a result is unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4.5 KiB
4.5 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
export interface HookProtocol {
readonly blockExitCode: number;
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)