/** * Tracker verifiers (#2719): `tracker.comment`, `tracker.issue.closed` and * `tracker.pr.merged` for Gitea and GitHub. * * - **Authority.** The tracker comes from `resolveTrackerAuthority` over the * project config and git remote URLs. A target whose forge is neither the * internal nor the customer tracker, or whose repository differs from that * tracker remote, is `unknown` with a specific precondition reason. The API * base is derived from the selected remote URL; no host is assumed. * - **Access order.** `chooseTrackerAccess` over the probes a CLI process can * offer: the tracker HTTP API (with credentials from the existing tracker * token path, `resolveToken`), then the forge CLI (`gh`, GitHub only). MCP * is never offered. Blockers include a safe configuration or credential hint. * - **Matching.** A comment matches exactly when it carries the * `` marker and was written by the pinned tracker * actor; a merged PR matches its merge commit's `Effect-Id:` trailer. * Author and time-window matches give `heuristic-match` and never `absent`. * - **Absent.** Only after an authenticated, complete query (every comment * page read, or an authoritative issue/PR state read) and once the intent is * older than `minAbsentAgeMs`; a younger intent is `unknown` / * `consistency-lag`. * * Access material stays inside the transport: evidence carries IDs, SHAs, * digests and safe repair hints only, and errors carry fixed messages. * * @see docs/contracts/effect-ledger.v1.md "Tracker verifiers" */ import type { AiwgConfig } from '../../config/aiwg-config.js'; import { type ForgeCliRunner } from '../../tracker/forge-http.js'; import { type EffectVerifier } from './types.js'; export declare const TRACKER_VERIFIER_VERSION = "1.0.0"; /** Default minimum intent age before a tracker verifier may answer `absent`. */ export declare const DEFAULT_MIN_ABSENT_AGE_MS = 60000; /** Default page bound for a comment scan; more pages is `unknown` / `paging-incomplete`. */ export declare const DEFAULT_MAX_COMMENT_PAGES = 100; /** The hidden marker line a writer embeds in a tracker comment so the verifier can match it exactly. */ export declare function renderEffectMarker(effectId: string): string; /** Effect IDs named by `aiwg-effect` markers in a comment body. */ export declare function parseEffectMarkers(body: string): string[]; /** Values of `Effect-Id:` trailer lines in a commit message. */ export declare function parseEffectIdTrailers(message: string): string[]; export interface TrackerCliOptions { /** Whether the forge CLI is installed. Defaults to a PATH lookup of `binary`. */ available?: boolean; /** Whether the CLI is authenticated; `false` removes it from the access order. */ authenticated?: boolean; binary?: string; /** Test seam; defaults to spawning `binary`. */ runner?: ForgeCliRunner; } export interface TrackerVerifierOptions { /** The project `.aiwg/aiwg.config`; tracker authority, remotes and pinned actors come from it. */ config: AiwgConfig | null | undefined; /** Git remote name to URL, e.g. from `git remote get-url`. */ remoteUrls: Record; /** Source of tracker credentials via `resolveToken`. Defaults to `process.env`. */ env?: NodeJS.ProcessEnv; fetchImpl?: typeof fetch; /** The forge CLI access path (GitHub `gh`), or `false` to disable it. */ cli?: TrackerCliOptions | false; /** Default 60 s. A younger intent never gives `absent`. */ minAbsentAgeMs?: number; /** Author and time-window heuristic for `tracker.comment`; `0` (default) disables it. */ heuristicWindowMs?: number; maxPages?: number; pageSize?: number; maxResponseBytes?: number; now?: () => number; } /** `tracker.comment`: target `gitea:owner/repo#N` or `github:owner/repo#N` (an issue or PR). */ export declare function trackerCommentVerifier(options: TrackerVerifierOptions): EffectVerifier; /** `tracker.issue.closed`: target `gitea:owner/repo#N` or `github:owner/repo#N`. */ export declare function trackerIssueClosedVerifier(options: TrackerVerifierOptions): EffectVerifier; /** * `tracker.pr.merged`: target `gitea:owner/repo#N` or `github:owner/repo#N`. * The expected merge commit comes from `expected.object` or `context.object`. */ export declare function trackerPrMergedVerifier(options: TrackerVerifierOptions): EffectVerifier; /** The three tracker verifiers, for `createBuiltinVerifierRegistry(options, createTrackerVerifiers(...))`. */ export declare function createTrackerVerifiers(options: TrackerVerifierOptions): EffectVerifier[]; //# sourceMappingURL=tracker.d.ts.map