import type { SkillKind } from "./registry-types.js"; import { type PortableSkillManifest, type PortableSkillProvenance, type PortableSkillRuntimeContract } from "./portable-skills-types.js"; /** * Default runtime contract (hasna.skill.v1). `bun` is the Hasna default * runtime; the sandbox is read-only by default, execution is time-capped at * 900s and does not assume network egress. */ export declare function defaultRuntimeContract(entrypoint?: string): PortableSkillRuntimeContract; /** Provenance defaults; content_hash is filled at write time over the bundle. */ export declare function defaultProvenance(sourceCommit?: string): PortableSkillProvenance; export declare function normalizePortableSkillName(name: string): string; /** New local identities use hyphens; legacy lookups and command names keep their grammar. */ export declare function normalizeNewPortableSkillName(name: string): string; export declare function readPortableSkillManifest(skillPath: string, fallbackName?: string): PortableSkillManifest; /** Import needs the original spelling before the legacy reader discards case boundaries. */ export declare function readPortableSkillManifestForImport(skillPath: string): PortableSkillManifest; export declare function parseSkillKind(value: string | undefined): SkillKind | undefined; /** * The version a skill EXPLICITLY declares, or undefined when none of the sources do: * skill.json first, then the SKILL.md frontmatter, then package.json. * * Distinct from `readPortableSkillManifest().version`, which falls back to * PORTABLE_SKILL_DEFAULT_VERSION: callers that must not invent a version (publishing, * version pinning) use this and refuse when it is undefined. */ export declare function readDeclaredSkillVersion(skillPath: string): string | undefined; export declare function createInstructionManifest(name: string, options: { description: string; category?: string; tags?: string[]; }): PortableSkillManifest; export declare function writeInstructionSkillTemplate(skillPath: string, manifest: PortableSkillManifest): void; export declare function createPortableManifest(name: string, options: { description: string; category?: string; tags?: string[]; }): PortableSkillManifest; export declare function writePortableSkillTemplate(skillPath: string, manifest: PortableSkillManifest): void; /** * Write skill.json with the canonical content_hash computed over the current * bundle. Preserves unknown keys already present in an existing skill.json * (merge, never replace) and recomputes the hash whenever content changed. * * The manifest is written hashless FIRST so the canonical bundle covers * skill.json itself; canonicalization strips content_hash, so adding the hash * afterwards does not change the digest. */ export declare function writeSkillJsonWithHash(skillPath: string, manifest: PortableSkillManifest): PortableSkillManifest; export declare function ensurePortableSkillFiles(skillPath: string, manifest: PortableSkillManifest): PortableSkillManifest; /** * Instruction (prose) skills are consumed by agent renderers/MCP docs, not run * locally, so `port` must never fabricate executable stubs (package.json, bin, * src/index.ts, tsconfig.json, AGENTS.md). Apart from aligning declared names * after an import rename, it preserves the copied prose and metadata. */ export declare function ensureInstructionSkillFiles(skillPath: string, manifest: PortableSkillManifest): PortableSkillManifest; export declare function copySkillDirectory(source: string, destination: string): void; export declare function renderSkillJson(manifest: PortableSkillManifest): string; /** The skill.json object for a manifest, with contract defaults applied. */ export declare function renderSkillJsonObject(manifest: PortableSkillManifest): Record; export declare function hasPackageDependencies(pkgPath: string): boolean; export declare function displayName(name: string): string;