/** * Skill roots several platforms declare at one path. `.agents/skills` is the * portable root for codex, kimi, opencode, gemini, cursor and more, so each * file there is written by every one of those adapters. It is co-owned: the * ledger records the platforms installed into it, and a file goes only with * the last of them. Older versions wrapped each file in a `skills:agents:` * block (before that, one `skills::` copy per platform); those * markers are still read so such files migrate. */ import type { ArtifactIntent, InstallScope, OwnedFileWriter, PlatformAdapter, PlatformId } from './types.js'; export interface SharedSkillSurface { /** Marker namespace for the shared root: `.agents/skills` -> `agents`. */ id: string; platforms: readonly PlatformId[]; } /** The skill root this adapter shares with other platforms, if any. */ export declare function sharedSkillSurface(adapter: PlatformAdapter, scope: InstallScope): SharedSkillSurface | undefined; /** * Co-owners known only from their pre-surface blocks. Read before an apply * folds those blocks away, or the ownership they record is lost. */ export declare function legacySurfaceOwners(intents: readonly ArtifactIntent[], pathOf: (intent: ArtifactIntent) => string | undefined): string[]; /** * Uninstall of one platform from a co-owned artifact: its own pre-surface * block always goes, the shared block only when no other platform still * installs into the surface (per the ledger or a remaining legacy block). */ export declare function releaseSharedBlock(content: string, intent: ArtifactIntent, platform: PlatformId, coOwners: readonly string[]): string; /** * Collapses per-platform blocks left in a project's shared skill roots by an * install that predates co-owned blocks. `init upgrade` installs no platform, * so it calls this directly; only files that still hold a superseded block are * rewritten (with a backup), and the platforms those blocks named are recorded * as the surface's owners. */ export declare function foldLegacySharedSkills(root: string, fileGuard?: OwnedFileWriter): Promise; //# sourceMappingURL=shared-surface.d.ts.map