import type { DocAccess } from './access.js'; import type { CheckJournal } from './check-journal.js'; import { type CheckArgs } from './host-check.js'; import { type ListArgs } from './host-list.js'; import type { PartJournal } from './part-journal.js'; import type { DocumentStore } from './store.js'; export interface PublishArgs { type: string; body: unknown; idempotency_key?: string; supersedes?: string; evidence?: unknown[]; inputs?: string[]; note?: string; } export interface ReadArgs { id: string; version?: number; part?: number; } export interface DecideArgs { id: string; version: number; decision: 'accept' | 'reject'; reason?: string; idempotency_key?: string; expected_state_seq?: number; } export type { ListArgs }; export type DocResult = { ok: boolean; } & Record; export interface DocumentToolHost { readonly role: string; list(a: ListArgs): DocResult; read(a: ReadArgs): DocResult; publish(a: PublishArgs): DocResult; decide(a: DecideArgs): DocResult; /** Present only when some contract declares checks (P3.11); the org_doc_check tool exists exactly then. */ check?(a: CheckArgs): DocResult; } /** What a host needs of its runtime. */ export interface HostContext { store: DocumentStore; access: DocAccess; run: string; isClosed(): boolean; /** Where org_doc_check calls are recorded (P3.11). */ checks?: CheckJournal; /** Which parts of each version a role has read (P3.16b): org_doc_decide needs every part. */ reads: PartJournal; /** The consuming section whose spent review cycle makes `doc` version `version` the root's to decide (P4.7). */ rootMayDecide?(doc: string, version: number): string | undefined; } export declare function createHost(ctx: HostContext, role: string): DocumentToolHost; //# sourceMappingURL=host.d.ts.map