/**
 * Launch-time project compile. Invoked by the agent shim's hot path (via
 * `agents sync --launch`) between version resolve and binary exec.
 *
 * Three responsibilities, all skip-fast when there's nothing to do:
 *
 * 1. Compile project rules from `<cwd>/.agents/rules/` into `<cwd>/AGENTS.md`
 *    (+ per-agent symlinks). Delegates to compileRulesForProject, which is
 *    the same helper management-side `agents sync` uses.
 *
 * 2. Copy project resources from `<cwd>/.agents/{commands,skills,subagents,workflows}`
 *    into the agent's workspace-local discovery dir (`<cwd>/.claude/`,
 *    `<cwd>/.codex/`, etc.) with an ownership manifest at
 *    `<cwd>/.{agent}/.agents-managed.json`. The manifest is the only clobber
 *    authority: paths it lists are removed and refreshed, pre-existing paths it
 *    does not list are skipped as user-owned.
 *
 * 3. Synthesize four scope-grouped plugin marketplaces under the version's
 *    `<versionHome>/.{agent}/plugins/marketplaces/` (for plugin-capable agents):
 *      - agents-cli         ← ~/.agents/plugins/*           (user scope, legacy name)
 *      - agents-system      ← ~/.agents/.system/plugins/*
 *      - extras-<alias>     ← ~/.agents-<alias>/plugins/*   (per enabled extra)
 *      - agents-project     ← <cwd>/.agents/plugins/*
 *    Each plugin is copied in (skip-fast via mtime cache), the marketplace
 *    catalog is rewritten only when contents change, and the marketplace is
 *    registered in known_marketplaces.json. Upstream marketplaces like
 *    "claude-plugins-official" are left untouched. Project- and extras-
 *    scope plugins do NOT auto-enable exec surfaces (.mcp.json, hooks, bin/,
 *    scripts/) — user must explicitly `agents plugins enable` them.
 *
 * Heavy work (version-home reconciliation, hook registration, MCP merging)
 * stays in `agents sync` without --launch and is NOT touched here. The
 * launch path is filesystem-only and skip-fast: sub-50ms when no source
 * has changed, scales linearly only with newly-modified plugins on the
 * change path.
 */
import type { AgentId } from './types.js';
import { pluginInstallDir } from './plugins/plugin-marketplace.js';
export interface LaunchSyncOptions {
    agent: AgentId;
    version: string;
    cwd: string;
}
export interface LaunchSyncResult {
    /** Project rules were re-compiled into cwd/AGENTS.md (+ per-agent symlinks). */
    rulesCompiled: boolean;
    /** Number of workspace resource symlinks created or refreshed. */
    workspaceLinks: number;
    /** Workspace resource paths we left alone because they exist and aren't ours. */
    workspaceSkipped: string[];
    /** Map of marketplace name → plugin names installed under it. */
    marketplaces: Record<string, string[]>;
}
/**
 * Run the launch-time project compile. Safe to call on every agent launch:
 * each step is idempotent and skips when its inputs are missing.
 *
 * After a successful run, touches the shim-side skip-fast sentinel at
 * `~/.agents/.cache/launch-sync/<agent>@<version>@<projectslug>` so the next
 * shim invocation can skip the node spawn entirely when no source dir is
 * newer than the sentinel (shim schema v17+).
 */
export declare function runLaunchSync(opts: LaunchSyncOptions): LaunchSyncResult;
export { pluginInstallDir };
