import { type ActAs, type AgentRunner, type AuditEvent, type Guard, type PermissionGrant, type Principal, type RunContext, type SecretsProvider, type StoreAdapter, type ToolCall, type ToolDescriptor, type ToolRegistry } from "../index.js"; export { memoryStoreAdapter, type MemoryStoreAdapterOptions } from "./memory-store.js"; export { memoryKnowledgeAdapter, type MemoryKnowledgeAdapterOptions } from "./memory-knowledge.js"; export { knowledgeAdapterConformance, type KnowledgeConformanceOptions } from "./knowledge.js"; export { appAccessConformance, type AppAccessConformanceOptions } from "./app-access.js"; export { storeOpsConformance, type StoreOpsConformanceOptions } from "./store-ops.js"; export { memoryStoreOps } from "./memory-store-ops.js"; export { memoryAppAccess, type MemoryAppAccess } from "./memory-app-access.js"; /** * One executable seam assertion. Cases throw on failure and can be mounted in any * test framework, for example: `for (const c of suite.cases) it(c.name, c.run)`. */ /** * What a case answers when the mount does not serve the OPTIONAL member the * case covers (`transcripts.appendMessages`, `retention`, a second tenant). * * RETURNED, never thrown: omitting an optional member is legal, so it is not a * failure. It is not a PASS either, and that is the whole point — a case that * simply `return`ed on an absent member made "this mount does not serve the op" * and "this mount serves the op correctly" the same green line, so an * implementation could drop a whole family and never appear to. An omission is * counted in its own bucket instead, named and reasoned, so it has to be read. */ export interface ConformanceOmission { omitted: string; } /** Spells {@link ConformanceOmission} at a case's return site. */ export declare const omitted: (reason: string) => ConformanceOmission; export interface ConformanceCase { name: string; /** * Why this case does not run yet, and which lane lands it. Set it and the * case is carried but never executed — by `runConformance`, and by every * mount, which reports it as skipped WITH this reason in the test name. * * It exists so that an op the contract declares and nothing yet serves is * VISIBLE. The alternative every time has been to leave the case out until * its implementation arrives, and a case nobody can see is how a feature * ships dead four times over: the suite is green, the op is in the types, * and the first person to find out is a caller in production. A named * pending case is a standing line in the test output that says the contract * is ahead of the code and who owes the difference. * * The body is a real one, not a placeholder: landing the capability means * deleting this one field. */ pending?: string; /** Throws on failure. Resolves to a {@link ConformanceOmission} when the mount does not serve the optional member this case covers, and to nothing when it ran. */ run(): Promise; } /** A framework-agnostic collection of executable assertions for one core seam. */ export interface ConformanceSuite { seam: string; cases: ConformanceCase[]; } /** The serializable result of executing every case in a conformance suite. `pending` names the cases that were carried but not run; `omitted` names the ones that ran and found the optional member they cover absent. `ok` is keyed off failures alone, because neither a promise nobody has made yet nor a legally unserved family is a broken one. Every case lands in exactly one bucket: `passed + pending.length + omitted.length + failures.length === cases.length`. */ export interface ConformanceReport { seam: string; passed: number; pending: string[]; omitted: Array<{ name: string; reason: string; }>; failures: Array<{ name: string; error: string; }>; ok: boolean; } /** Executes all cases without stopping at the first failure. */ export declare function runConformance(suite: ConformanceSuite): Promise; type AdapterFactoryResult = { adapter: StoreAdapter; close?(): Promise; }; /** Executable StoreAdapter checks from 02-store §4 and 01-core §12. */ export declare function storeAdapterConformance(opts: { makeAdapter(): Promise; }): ConformanceSuite; /** Executable ToolRegistry checks from 01-core §4. */ export declare function toolRegistryConformance(opts: { makeRegistry(): Promise; ctx: RunContext; safeCall?: ToolCall; }): ConformanceSuite; /** * Executable Guard checks from 01-core §§4, 6 and 05-guard §2. * * Known limit: the kit verifies `onApprovalDecision` returns a working * unsubscribe, but cannot verify decision events actually fire — that needs the * guard block's own approvals API (05 §1), so its delivery semantics are * exercised by the guard block's test suite, not this seam kit. */ export declare function guardConformance(opts: { makeGuard(): Promise; ctx: RunContext; confirmEachDescriptor: ToolDescriptor; confirmEachCall: ToolCall; readDescriptor: ToolDescriptor; readCall: ToolCall; sampleAuditEvent: AuditEvent; }): ConformanceSuite; /** Executable SecretsProvider checks from 01-core §13. */ export declare function secretsProviderConformance(opts: { makeProvider(): Promise; presentName: string; expectedValue?: string; absentName: string; }): ConformanceSuite; /** Executable ActAs checks from 01-core §13. */ export declare function actAsConformance(opts: { actAs: ActAs; principal: Principal; grant: PermissionGrant; }): ConformanceSuite; /** Executable AgentRunner checks from 01-core §13 and 03-agent §§1-2. */ export declare function agentRunnerConformance(opts: { makeRunner(): Promise; ctx: RunContext; }): ConformanceSuite;