@hasna/skills 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,15 @@ export declare function defaultProvenance(sourceCommit?: string): PortableSkillP
11
11
  export declare function normalizePortableSkillName(name: string): string;
12
12
  export declare function readPortableSkillManifest(skillPath: string, fallbackName?: string): PortableSkillManifest;
13
13
  export declare function parseSkillKind(value: string | undefined): SkillKind | undefined;
14
+ /**
15
+ * The version a skill EXPLICITLY declares, or undefined when none of the sources do:
16
+ * skill.json first, then the SKILL.md frontmatter, then package.json.
17
+ *
18
+ * Distinct from `readPortableSkillManifest().version`, which falls back to
19
+ * PORTABLE_SKILL_DEFAULT_VERSION: callers that must not invent a version (publishing,
20
+ * version pinning) use this and refuse when it is undefined.
21
+ */
22
+ export declare function readDeclaredSkillVersion(skillPath: string): string | undefined;
14
23
  export declare function createInstructionManifest(name: string, options: {
15
24
  description: string;
16
25
  }): PortableSkillManifest;
@@ -1,8 +1,8 @@
1
1
  import type { SkillKind, SkillMeta } from "./registry-types.js";
2
2
  import { type SkillValidationResult } from "./skill-validation.js";
3
- import { normalizePortableSkillName, readPortableSkillManifest } from "./portable-skills-files.js";
3
+ import { normalizePortableSkillName, readDeclaredSkillVersion, readPortableSkillManifest } from "./portable-skills-files.js";
4
4
  import type { BulkPortPortableSkillOptions, BulkPortResult, PortableSkillOptions, PortableSkillRunOptions, PortableSkillRunResult, PortableSkillSummary, PortableSkillWriteResult, PortPortableSkillOptions, ScaffoldPortableSkillOptions } from "./portable-skills-types.js";
5
- export { normalizePortableSkillName, readPortableSkillManifest, };
5
+ export { normalizePortableSkillName, readDeclaredSkillVersion, readPortableSkillManifest, };
6
6
  export * from "./portable-skills-types.js";
7
7
  /**
8
8
  * Resolve the corpus: the directory holding one folder per installed skill.
@@ -120,11 +120,11 @@ export declare class RemoteSkillsClient {
120
120
  * instance serves no bundle for this skill (the metadata-only fallback path).
121
121
  */
122
122
  getBundle(slug: string, version?: string): Promise<Response | null>;
123
- /** List the pins the instance holds for this principal. */
124
123
  /** Every published version of a slug, newest first (hasna/apps#1630). */
125
124
  listSkillVersions(slug: string): Promise<RemoteSkillVersion[]>;
126
125
  /** One version's manifest, or null when the slug@version was never published. */
127
126
  getSkillVersion(slug: string, version: string): Promise<RemoteSkillVersion | null>;
127
+ /** List the pins the instance holds for this principal. */
128
128
  listPins(): Promise<RemotePin[]>;
129
129
  /**
130
130
  * Pin a skill on the instance (upsert — pinning again refreshes it). The