/** * `sklx agent install` core orchestration (SMI-5456 Wave 1 Step 5). * * Generates the pack via `generateAgentPack({ toolProfile: AGENT_TOOL_PROFILE_NAMES })` * (QD-2: byte-identical to the committed `packages/mcp-server/src/assets/agent-pack/` * tree by determinism, never read from the mcp-server package) and writes: * - SKILL.md to the mandatory dual path (claude-code + agents) plus any * detected Tier-2/3 harness with its own native skill directory * (opencode, hermes, windsurf). * - Named-agent shims for every detected harness with a shim target * (claude-code always; copilot, opencode when detected; codex via its * own TOML-merge "shim"). * - SessionStart/SessionEnd hooks (+x) for claude-code (always), cursor * and codex when detected — hook CONFIG wiring is per-harness-shaped: * claude-code's `{ matcher, hooks: [{ type, command }] }` JSON array * (`installJsonHooks`), Cursor's structurally different * `{ version: 1, hooks: { sessionStart: [{ command }], ... } }` JSON * shape (`installCursorHooks` in `agent-pack-installer.cursor-hooks.ts` * — SMI-5893 Wave 8a, corrected from a false Claude-compatible claim), * and codex (SessionStart ONLY, as a marker-delimited * `[[hooks.SessionStart]]` TOML block; Codex has no SessionEnd event and * its Stop event is per-turn — see `installCodexHooks` in * `agent-pack-installer.harness.ts`). * - The `skillsmith` MCP server registration (`SKILLSMITH_TOOL_PROFILE=agent`) * for every detected MCP-capable harness (all 7), backup-first, * idempotent, preserve-and-prompt on a foreign entry. * - AntiGravity (SMI-6275 Wave 5): a workspace-scoped 8th target, handled * OUTSIDE the 7-harness loop above — see the `antigravity` block near * the end of `installAgentPack`. Whenever its workspace scope resolves * (an existing `.agents/` marker auto-detects, or `--scope workspace` * creates one), writes the skill pack AND `.agents/mcp_config.json` * (`installAntigravityMcpConfig`, `agent-pack-installer.antigravity-mcp.ts`) * — MCP config only, no hooks/shim this wave (stated decision, see * `HOOK_HARNESSES`'s doc comment in `services/agent-pack/types.ts`). * * Every write funnels through `writeOwnedArtifactFile` (owned files) or the * `agent-config-merge.*` helpers (shared config files), both of which record * a manifest entry — `uninstallAgentPack` (SMI-5456) reverses exactly what * this function wrote by replaying that manifest, never by re-deriving * "what the current generator would produce". * * @module @skillsmith/core/install/agent-pack-installer */ import { loadAgentManifest } from './agent-manifest.js'; import { type AgentInstallOptions, type AgentInstallResult } from './agent-pack-installer.types.js'; /** * Detect + install the portable Skillsmith Agent pack across every * supported harness. See module header for the full per-harness matrix. */ export declare function installAgentPack(opts?: AgentInstallOptions): AgentInstallResult; export { loadAgentManifest }; //# sourceMappingURL=agent-pack-installer.d.ts.map