agentfootprint
Version:
The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.
47 lines (46 loc) • 2.3 kB
TypeScript
/**
* hosting/conformance/run — running the battery, and saying honestly how it
* went.
*
* The runner owns exactly three decisions, and all three are about the ways a
* case can NOT run:
*
* 1. the case is about an OPTIONAL port member this store does not implement
* → `'not-applicable'`, naming the member. Feature detection, which is the
* port's own rule applied to its own battery.
* 2. the store implements it and cannot satisfy the case, and the harness said
* so by name → `'declared'`, carrying the reason. It is run ANYWAY, so a
* declaration that has quietly become untrue is visible rather than
* permanent.
* 3. the case needs a harness hook nobody supplied and nobody declared →
* `'failed'`. This is the one that matters: an undeclared skip is a pass
* with the evidence removed, which is the same shape as every defect this
* suite exists to catch.
*/
import type { SessionLifecycleCase, SessionLifecycleOutcome, SessionLifecycleReport, SessionStoreHarness } from './types.js';
/**
* Run ONE case against one store, building and disposing the store around it.
*
* Exported because a test framework wants one assertion per case: iterate
* {@link sessionLifecycleConformance}, call this, and turn the outcome into a
* `it()`. That gives per-case granularity in any framework without this module
* knowing what a framework is.
*/
export declare function runSessionLifecycleCase(testCase: SessionLifecycleCase, harness: SessionStoreHarness): Promise<SessionLifecycleOutcome>;
/**
* Run the whole battery against one store and report.
*
* @example Claiming the port for a store of your own
* const report = await runSessionLifecycleConformance({
* name: 'ourOwnSessions',
* createStore: () => ourOwnSessions({ pool }),
* disposeStore: (store) => store.close(),
* });
* if (!report.ok) throw new Error(formatConformanceReport(report));
*/
export declare function runSessionLifecycleConformance(harness: SessionStoreHarness): Promise<SessionLifecycleReport>;
/**
* The report as something to put in a failure message or a log — one line per
* case, with the reason a case did not simply pass.
*/
export declare function formatConformanceReport(report: SessionLifecycleReport): string;