/** * @fileoverview Post-write success path for SkillInstallationService.install(). * @module @skillsmith/core/services/skill-installation.service.finalize * @see SMI-6529 Wave A0: pure move out of skill-installation.service.ts to make * headroom for the pre-write target guard (checkInstallTarget) — no behavior * change. Mirrors this service's existing domain-driven split convention * (skill-installation.io.ts, skill-installation.content.ts, etc). * * Everything `install()` does AFTER `writeInstallFiles()` succeeds: update the * manifest, record co-install/dependency-intelligence/AI-defence signals * (all best-effort), and assemble the final `success: true` InstallResult. */ import type { ScanReport } from '../security/index.js'; import type { TrustTier } from '../types/skill.js'; import type { SkillDependencyRepository } from '../repositories/SkillDependencyRepository.js'; import type { RiskScoreHistoryRepository } from '../repositories/RiskScoreHistoryRepository.js'; import type { ClientId } from '../install/paths.js'; import type { ManifestManager } from './skill-manifest.js'; import type { AiDefenceFeedback, CoInstallRecorder, InstallResult, OptimizationInfo, ProgressCallback, QuarantineStatus } from './skill-installation.types.js'; /** Everything {@link finalizeSuccessfulInstall} needs from the service and the install in progress. */ export interface FinalizeInstallParams { manifest: ManifestManager; coInstallRecorder: CoInstallRecorder | undefined; /** Mutated in place (pushed to) — same array the service instance owns. */ sessionInstalledSkillIds: string[]; skillDependencyRepo: SkillDependencyRepository; quarantineLookup: ((skillId: string) => QuarantineStatus | null) | undefined; riskHistoryRepo: RiskScoreHistoryRepository | undefined; aiDefenceFeedback: AiDefenceFeedback | undefined; onProgress: ProgressCallback; client: ClientId; skillsDir: string; skillId: string; owner: string; repo: string; skillName: string; installPath: string; manifestKey: string; contentHash: string; skillMdContent: string; optimizationInfo: OptimizationInfo; securityReport: ScanReport | undefined; configWarnings: string[]; skipScanRequested: boolean | undefined; contentHashMismatch: boolean; trustTier: TrustTier; /** * SMI-6529 M10: extra tips to append verbatim after the standard set below * (e.g. a warning that a companion agent file was NOT overwritten because * it already existed on a fresh install). Optional — omitted callers see * no change in behavior. */ extraTips?: string[]; } /** * Everything after a successful `writeInstallFiles()`: manifest update, * best-effort dependency/quarantine/trend/AI-defence bookkeeping, and the * final `InstallResult`. Never throws for a best-effort step — only the * manifest update itself (via `updateSafely`) can propagate. */ export declare function finalizeSuccessfulInstall(params: FinalizeInstallParams): Promise; //# sourceMappingURL=skill-installation.service.finalize.d.ts.map