import type { CiWatchSubscription } from './types.js'; import type { CreateCiWatchInput } from './service.js'; /** The default delivery channel: the daemon's operator web surface (control-plane delivery). */ export declare const DEFAULT_AUTO_WATCH_CHANNEL = "web"; /** A push detected in an exec command list. */ export interface DetectedCiPush { readonly kind: 'push' | 'pr'; /** The pushed branch when the command names one (else the current branch is resolved). */ readonly branch?: string | undefined; } /** * Detect a CI-relevant push in one exec command line: `git push ...` or * `gh pr create ...`. Only simple top-level forms are matched, a compound * line still matches when a segment starts with the command. */ export declare function detectCiPushInCommand(command: string): DetectedCiPush | null; /** Extract the command strings from exec-tool args ({ commands: [{cmd}] } or strings). */ export declare function execCommandsFromArgs(args: Record): string[]; /** Parse a git remote URL into a GitHub owner/name slug, or null when not GitHub. */ export declare function parseGitHubSlug(remoteUrl: string): string | null; export interface CiWatchAutoMintDeps { readonly service: { createWatch(input: CreateCiWatchInput): Promise; listWatches(): Promise; }; /** The working directory pushes resolve against when exec args carry none. */ readonly workingDirectory: string; /** Delivery channel for minted watches; defaults to the operator web surface. */ readonly deliveryChannel?: string | undefined; /** Injectable repo-slug resolver (tests); default shells `git remote get-url`. */ readonly resolveRepoSlug?: ((cwd: string) => Promise) | undefined; /** Injectable current-branch resolver (tests); default shells `git rev-parse`. */ readonly resolveCurrentBranch?: ((cwd: string) => Promise) | undefined; } /** * The self-minting tap. `onToolExecuted` has the exact shape of the shared * tool-execution observer seam; `onGitPushed` serves GitService-path callers. * Minting is asynchronous and best-effort, it never blocks or fails the * caller, and a repo that is not a GitHub remote is a silent no-op (the gh * status source could not watch it honestly). */ export declare class CiWatchAutoMinter { private readonly deps; constructor(deps: CiWatchAutoMintDeps); /** Tool-execution observer: mints on a successful exec containing a push/PR-create. */ onToolExecuted(toolName: string, args: Record, success: boolean): void; /** GitService-path tap: a platform push through GitService mints the same way. */ onGitPushed(input: { readonly cwd: string; readonly branch?: string | undefined; }): void; private mint; } //# sourceMappingURL=auto-watch.d.ts.map