import { Harness } from '../harness/index.js';
import { SkillEntry, ComposedSkills } from '../skills/index.js';
import '@tangle-network/agent-interface';
import '@tangle-network/sandbox';

/**
 * Harness-native skill directory resolution — the one place agent-app binds
 * to the platform's authoritative per-harness skill-dir map.
 *
 * `../skills` renders skill CONTENT (parse, tier-filter, `inline`/`mounted`
 * delivery) but deliberately stops short of naming WHICH cwd path a `mounted`
 * skill lands at on a given harness — that mapping is owned by the platform
 * materializer (`@tangle-network/agent-profile-materialize`'s
 * `skillDirForHarness`), not by app-shell. This subpath exists so no product
 * — and no other agent-app module — ever writes a skill path literal
 * (`~/.claude/skills/...`, `.opencode/skills`, ...) of its own; it bridges
 * agent-app's `Harness` taxonomy onto the platform's `HarnessId` and asks the
 * platform for the answer.
 *
 * Requires the OPTIONAL peer `@tangle-network/agent-profile-materialize`.
 * Products that don't install it simply don't import this subpath — every
 * other agent-app skills surface (`../skills`, `ProfileChannels.skillRefs`)
 * works without it, falling back to `inline` delivery.
 */

/** Resolve the cwd-relative skill dir `resources.skills` refs materialize
 *  into on `harness` — via the platform's `skillDirForHarness`. `null` when
 *  `harness` isn't bridged (see {@link HARNESS_BRIDGE}) or when the platform
 *  itself has no cwd skill primitive for it (e.g. `hermes`, user-dir-only). */
declare function resolveSkillDir(harness: Harness): string | null;
/** Filter `harnesses` down to those with no mounted skill dir (deduped,
 *  first-seen order preserved) — the set that must fall back to `inline`
 *  delivery, or that a caller should warn about before offering "mounted"
 *  install UX. */
declare function unsupportedSkillHarnesses(harnesses: Iterable<Harness>): Harness[];
/** Inputs to {@link composeSkillsForHarness}. */
interface ComposeSkillsForHarnessInput {
    skills: SkillEntry[];
    harness: Harness;
    tier?: string;
    heading?: string;
}
/**
 * Compose {@link ComposedSkills} for `harness`: `mounted` delivery when the
 * platform names a cwd skill dir for it, `inline` delivery (the automatic
 * fallback that keeps every skill available on every harness) otherwise. The
 * one function a product calls instead of hand-checking `resolveSkillDir`
 * and branching between {@link composeSkills}'s two modes itself.
 */
declare function composeSkillsForHarness(input: ComposeSkillsForHarnessInput): ComposedSkills;

export { type ComposeSkillsForHarnessInput, ComposedSkills, SkillEntry, composeSkillsForHarness, resolveSkillDir, unsupportedSkillHarnesses };
