import type { AppliedChange, ChangePlan, Discovery, DeliveryProfile, DomainProfile, EnforcementResult, Intake, PolicyDocument, PolicyUpdateMetadata, QualityProfile, Stack, StackAdapterResult, StackProfile } from "./types.js"; import type { WorkspaceAudit, WorkspaceReceipt } from "../worktree/types.js"; declare const SKILL_NAMES: readonly ["harness-automation", "manage-worktree-delivery"]; export type SkillName = typeof SKILL_NAMES[number]; export declare function packagedSkillPath(packagePath: string, name: SkillName): string; export declare function inspectSkillInstallations(options?: { packagePath?: string; homeDirectory?: string; }): Record; export declare function intakeProject(args: { projectRoot: string; owner: string; approveSources: boolean; approveTypeScriptNamingAdoption?: boolean; approveWeakening?: string; weakeningRuleIds?: string[]; now?: Date; }): Intake; export declare function discoverAndSave(projectRoot: string, now?: Date): Discovery; interface ProjectPlanArgs { projectRoot: string; owner?: string; projectName?: string; phase?: PolicyDocument["project"]["phase"]; profile?: StackProfile; stacks?: Stack[]; inheritedStacks?: Stack[]; deliveryProfiles?: DeliveryProfile[]; domainProfiles?: DomainProfile[]; qualityProfiles?: QualityProfile[]; adoptTypeScriptNaming?: boolean; now?: Date; } export declare function planProject(args: ProjectPlanArgs): { plan: ChangePlan; path: string; policy: PolicyDocument; }; export interface ProjectUpdatePlanResult { status: "current" | "planned"; planPath: string | null; planHash: string | null; plan: ChangePlan | null; policy: PolicyDocument; worktree: PolicyUpdateMetadata["worktree"]; } export declare function planProjectUpdate(args: { projectRoot: string; adoptTypeScriptNaming?: boolean; migrateLegacyEvalSnapshot?: boolean; now?: Date; }): ProjectUpdatePlanResult; /** @deprecated Use planProjectUpdate. */ export declare const planProjectUpgrade: typeof planProjectUpdate; /** @deprecated Use ProjectUpdatePlanResult. */ export type ProjectUpgradePlanResult = ProjectUpdatePlanResult; export declare function applyPlan(args: { projectRoot: string; planPath: string; approval: string; recoveryApprovalRef?: string; now?: Date; testInterruptAfterWrites?: number; testFailPostApply?: boolean; testInterruptAfterChangeReceipt?: boolean; }): AppliedChange | WorkspaceReceipt; export declare function rollbackChange(args: { projectRoot: string; changeId?: string; recoveryApprovalRef?: string; now?: Date; testInterruptAfterRestores?: number; testInterruptAfterRollbackReceipt?: boolean; }): { id: string; restored: string[]; } | WorkspaceReceipt; export declare function driftProject(projectRoot: string): { clean: boolean; workspaceClean: boolean; sourceDrift: string[]; outputDrift: Array<{ path: string; expected: string; actual: string | null; }>; workspace: WorkspaceAudit | null; }; export declare function checkProject(projectRoot: string, observedDrift?: ReturnType): { ok: boolean; policyDigest: string; agents: Array<{ id: string; configured: boolean; loaded: boolean; enforced: boolean; passing: boolean; status: "verified" | "failing" | "blocked"; }>; results: EnforcementResult[]; stackAdapters: StackAdapterResult[]; stackCoverageComplete: boolean; violations: string[]; }; export interface TrustedCommandResult { id: string; command: string[]; status: "passed" | "failed" | "blocked"; exitCode: number | null; output: string; outputSha256: string; negativeReport?: NegativeControlReport; validationError?: string; } interface NegativeControlReport { schemaVersion: "evaluation-negative-report/1"; suiteId: string; fixture: string; executed: Array<{ id: string; status: "failed"; }>; failures: Array<{ assertionId: string; category: string; }>; } export declare function hasExecutableFileHeader(header: Uint8Array): boolean; export declare function runTrustedChecks(args: { projectRoot: string; mode: "session" | "commit" | "ci"; now?: Date; /** Test seam; production callers use the fixed mode-specific timeout. */ commandTimeoutMs?: number; }): { ok: boolean; policy: ReturnType; stackAdapters: StackAdapterResult[]; stackCoverageComplete: boolean; commands: TrustedCommandResult[]; evaluations: { configured: boolean; loaded: boolean; enforced: boolean; passing: boolean; available: boolean; status: "not-configured" | "not-run" | "verified" | "failing" | "blocked"; contractPath: string | null; receiptPath: string | null; receiptHash: string | null; }; workspace: { configured: boolean; available: boolean; status: "not-configured" | "verified" | "failing" | "blocked"; detail: string; audit: WorkspaceAudit | null; }; }; export declare function explainPolicy(projectRoot: string, policyId: string): PolicyDocument["policies"][number]; export declare function createSessionContext(projectRoot: string, now?: Date, requestedAgent?: "auto" | "portable" | "claude-code" | "codex"): { policyDigest: string; policyPath: string; owner: string; agent: string; receipt: string; message: string; }; export declare function doctorProject(projectRoot: string, options?: { packagePath?: string; homeDirectory?: string; }): Record; interface GitHubCandidate { fullName: string; url: string; description: string | null; license: string | null; stars: number; updatedAt: string; query: string; } export declare function researchGitHub(args: { projectRoot: string; queries?: string[]; now?: Date; }): { report: string; index: string; candidates: GitHubCandidate[]; }; export {}; //# sourceMappingURL=service.d.ts.map