@red-hat-developer-hub/backstage-plugin-ai-skills-common 0.3.0 → 0.5.0

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.
package/dist/index.d.ts CHANGED
@@ -265,6 +265,36 @@ declare function isNpxSkillRecord(record: SkillRecord, sourceType: SkillSourceTy
265
265
 
266
266
 
267
267
 
268
+ /**
269
+ * Annotation key for the AI asset category (e.g., `skill`).
270
+ *
271
+ * @public
272
+ */
273
+ declare const ANNOTATION_AI_ASSET_CATEGORY = "rhdh.io/ai-asset-category";
274
+ /**
275
+ * Annotation key for the resolved AI asset version.
276
+ *
277
+ * @public
278
+ */
279
+ declare const ANNOTATION_AI_ASSET_VERSION = "rhdh.io/ai-asset-version";
280
+ /**
281
+ * Annotation key for the AI asset source (`<sourceType>/<sourceId>`).
282
+ *
283
+ * @public
284
+ */
285
+ declare const ANNOTATION_AI_ASSET_SOURCE = "rhdh.io/ai-asset-source";
286
+ /**
287
+ * Annotation key for the OCI skill image reference.
288
+ *
289
+ * @public
290
+ */
291
+ declare const ANNOTATION_OCI_SKILL_REF = "rhdh.io/oci-skill-ref";
292
+ /**
293
+ * Annotation key for the npx skill package reference with digest.
294
+ *
295
+ * @public
296
+ */
297
+ declare const ANNOTATION_NPX_SKILL_REF = "rhdh.io/npx-skill-ref";
268
298
  /**
269
299
  * The identity tuple used for deterministic catalog entity naming.
270
300
  *
@@ -305,18 +335,22 @@ declare function computeCatalogName(tuple: IdentityTuple): string;
305
335
  interface NormalizeTagsResult {
306
336
  /** Valid, deduplicated tags in lowercase. */
307
337
  tags: string[];
308
- /** Diagnostic messages for tags that were dropped. */
338
+ /**
339
+ * Diagnostic messages for tags that were dropped.
340
+ *
341
+ * @remarks
342
+ * Message text is informational and may change. Consumers must not
343
+ * treat wording as a stable API or use it for programmatic decisions.
344
+ */
309
345
  diagnostics: string[];
310
346
  }
311
347
  /**
312
348
  * Normalizes tags for catalog use per design D3/D5.
313
349
  *
314
350
  * Trims whitespace, lowercases, deduplicates, and retains only values
315
- * accepted by an extended catalog tag pattern (per design D3/D5) that
316
- * allows colons, plus signs, and hash characters beyond the standard
317
- * Backstage tag validator. Invalid or overlength values are omitted
318
- * with a diagnostic — tags are never truncated and replacement
319
- * characters are never synthesized.
351
+ * accepted by {@link CATALOG_TAG_PATTERN} (per design D3/D5). Invalid or
352
+ * overlength values are omitted with a diagnostic — tags are never
353
+ * truncated and replacement characters are never synthesized.
320
354
  *
321
355
  * @public
322
356
  */
@@ -545,6 +579,309 @@ declare const SKILLS_ENDPOINT_BASE = "/skills";
545
579
  */
546
580
  declare const MAX_RESPONSE_BYTES: number;
547
581
 
582
+
583
+
584
+
585
+
586
+ /**
587
+ * Parsed OCI SkillCard metadata fields.
588
+ *
589
+ * Fields use `unknown` because the YAML parser may produce any type.
590
+ * The normalizer validates and selects correctly typed values.
591
+ *
592
+ * @remarks
593
+ * The `unknown` field types are deliberate and stable for the v1 contract.
594
+ * Native metadata arrives as parsed YAML/JSON and may contain any type.
595
+ * Narrowing to concrete types in a future minor release would be a
596
+ * breaking TypeScript change; any such narrowing will be reserved for v2.
597
+ *
598
+ * @public
599
+ */
600
+ interface OciSkillCardMetadata {
601
+ /** Display name (`metadata.display-name`). */
602
+ 'display-name'?: unknown;
603
+ /** Name (`metadata.name`). */
604
+ name?: unknown;
605
+ /** Description (`metadata.description`). */
606
+ description?: unknown;
607
+ /** Declared version (`metadata.version`). */
608
+ version?: unknown;
609
+ /** License identifier (`metadata.license`). */
610
+ license?: unknown;
611
+ /** Author list (`metadata.authors`). */
612
+ authors?: unknown;
613
+ /** Metadata tags (`metadata.tags`). */
614
+ tags?: unknown;
615
+ /** Compatibility info (`metadata.compatibility`). */
616
+ compatibility?: unknown;
617
+ /** Namespace scope (`metadata.namespace`). */
618
+ namespace?: unknown;
619
+ }
620
+ /**
621
+ * Parsed OCI SkillCard spec fields.
622
+ *
623
+ * @public
624
+ */
625
+ interface OciSkillCardSpec {
626
+ /** System prompt (`spec.prompt`). */
627
+ prompt?: unknown;
628
+ }
629
+ /**
630
+ * Parsed OCI SkillCard document.
631
+ *
632
+ * @public
633
+ */
634
+ interface OciSkillCard {
635
+ /** SkillCard metadata section. */
636
+ metadata?: OciSkillCardMetadata;
637
+ /** SkillCard spec section. */
638
+ spec?: OciSkillCardSpec;
639
+ }
640
+ /**
641
+ * Shared base interface for parsed Markdown frontmatter.
642
+ *
643
+ * Both OCI and npx skill documents use the same YAML frontmatter
644
+ * structure. This base captures the common shape. Dedicated aliases
645
+ * ({@link OciMarkdownFrontmatter}, {@link NpxFrontmatter}) represent
646
+ * semantically distinct domains and may diverge independently in
647
+ * future versions.
648
+ *
649
+ * @remarks
650
+ * The `unknown` field types are deliberate and stable for the v1 contract.
651
+ * See {@link OciSkillCardMetadata} for the rationale.
652
+ *
653
+ * @public
654
+ */
655
+ interface MarkdownFrontmatter {
656
+ /** Top-level name. */
657
+ name?: unknown;
658
+ /** Top-level description. */
659
+ description?: unknown;
660
+ /** Top-level version (frontmatter `version`). */
661
+ version?: unknown;
662
+ /** Top-level license. */
663
+ license?: unknown;
664
+ /** Top-level compatibility. */
665
+ compatibility?: unknown;
666
+ /** Nested metadata block in frontmatter. */
667
+ metadata?: FrontmatterMetadata;
668
+ }
669
+ /**
670
+ * Nested metadata block within parsed Markdown frontmatter.
671
+ *
672
+ * @remarks
673
+ * The `unknown` field types are deliberate and stable for the v1 contract.
674
+ * See {@link OciSkillCardMetadata} for the rationale.
675
+ *
676
+ * @public
677
+ */
678
+ interface FrontmatterMetadata {
679
+ /** Frontmatter `metadata.version`. */
680
+ version?: unknown;
681
+ /** Frontmatter `metadata.author` (string or object). */
682
+ author?: unknown;
683
+ /** Frontmatter `metadata.tags`. */
684
+ tags?: unknown;
685
+ /** Frontmatter `metadata.owner`. */
686
+ owner?: unknown;
687
+ /** Frontmatter `metadata.lifecycle`. */
688
+ lifecycle?: unknown;
689
+ }
690
+ /**
691
+ * Parsed Markdown frontmatter from an OCI skill document
692
+ * (SKILL.md or SKILLS.md).
693
+ *
694
+ * Structurally identical to {@link MarkdownFrontmatter} but kept as a
695
+ * separate named type so the OCI and npx domains can diverge
696
+ * independently in future versions without a breaking rename.
697
+ *
698
+ * @public
699
+ */
700
+ type OciMarkdownFrontmatter = MarkdownFrontmatter;
701
+ /**
702
+ * Combined parsed OCI native input for normalization.
703
+ *
704
+ * @public
705
+ */
706
+ interface OciNativeInput {
707
+ /** Parsed SkillCard document. */
708
+ skillCard?: OciSkillCard;
709
+ /** Parsed Markdown frontmatter. */
710
+ frontmatter?: OciMarkdownFrontmatter;
711
+ }
712
+ /**
713
+ * Parsed npx discovery entry from an Agent Skills index.
714
+ *
715
+ * @remarks
716
+ * The `unknown` field types are deliberate and stable for the v1 contract.
717
+ * See {@link OciSkillCardMetadata} for the rationale.
718
+ *
719
+ * @public
720
+ */
721
+ interface NpxDiscoveryEntry {
722
+ /** Discovery entry name. */
723
+ name?: unknown;
724
+ /** Discovery entry description. */
725
+ description?: unknown;
726
+ /**
727
+ * Artifact format type.
728
+ *
729
+ * @remarks
730
+ * Currently only `'skill-md'` is accepted by the normalizer. Any other
731
+ * non-nullish value is omitted from the normalized record with a
732
+ * diagnostic. The field is typed `unknown` because the discovery index
733
+ * may contain arbitrary strings; the normalizer validates at runtime.
734
+ */
735
+ type?: unknown;
736
+ }
737
+ /**
738
+ * Parsed Markdown frontmatter from an npx skill document.
739
+ *
740
+ * Structurally identical to {@link MarkdownFrontmatter} but kept as a
741
+ * separate named type so the npx and OCI domains can diverge
742
+ * independently in future versions without a breaking rename.
743
+ *
744
+ * @public
745
+ */
746
+ type NpxFrontmatter = MarkdownFrontmatter;
747
+ /**
748
+ * Combined parsed npx native input for normalization.
749
+ *
750
+ * @public
751
+ */
752
+ interface NpxNativeInput {
753
+ /** Parsed discovery entry. */
754
+ entry?: NpxDiscoveryEntry;
755
+ /** Parsed Markdown frontmatter. */
756
+ frontmatter?: NpxFrontmatter;
757
+ }
758
+ /**
759
+ * Trusted source identity and integrity fields provided by the
760
+ * connector after verified acquisition. These are never derived
761
+ * from native metadata or user-supplied frontmatter.
762
+ *
763
+ * @public
764
+ */
765
+ interface TrustedSourceInput {
766
+ /** Stable identity key within this source. */
767
+ key: string;
768
+ /** Digest-addressed OCI URI or fragment-free HTTPS URL. */
769
+ sourceUri: string;
770
+ /** Content digest in `sha256:<64 lowercase hex digits>` format. */
771
+ digest: string;
772
+ }
773
+ /**
774
+ * A single diagnostic produced during metadata normalization.
775
+ *
776
+ * @public
777
+ */
778
+ interface NormalizationDiagnostic {
779
+ /** The normalized field that triggered the diagnostic. */
780
+ field: string;
781
+ /**
782
+ * Human-readable description of the issue.
783
+ *
784
+ * @remarks
785
+ * The `message` field is informational and not part of the stable API
786
+ * contract. Diagnostic wording may change between minor releases.
787
+ * Downstream consumers should not assert on exact message text.
788
+ */
789
+ message: string;
790
+ }
791
+ /**
792
+ * Result of a metadata normalization operation.
793
+ *
794
+ * When `record` is non-null, the normalization succeeded and the record
795
+ * is schema-valid. Diagnostics may still be present for omitted optional
796
+ * fields. When `record` is null, the normalization failed due to missing
797
+ * required fields or other fatal issues.
798
+ *
799
+ * @public
800
+ */
801
+ interface NormalizationResult<T> {
802
+ /** The normalized record, or null if normalization failed. */
803
+ record: T | null;
804
+ /** Diagnostics produced during normalization. */
805
+ diagnostics: NormalizationDiagnostic[];
806
+ }
807
+ /**
808
+ * Normalizes OCI metadata into an `OciSkillRecord` using design D3
809
+ * precedence rules.
810
+ *
811
+ * Accepts parsed, verified OCI SkillCard metadata and Markdown
812
+ * frontmatter plus trusted source identity/integrity fields from
813
+ * the connector. Returns a schema-valid record or null with
814
+ * diagnostics.
815
+ *
816
+ * D3 OCI precedence order per field:
817
+ * - name: `metadata.display-name`, `metadata.name`, frontmatter `name`
818
+ * - description: `metadata.description`, frontmatter `description`
819
+ * - version: `metadata.version`, frontmatter `metadata.version`,
820
+ * frontmatter `version`
821
+ * - license: `metadata.license`, frontmatter `license`
822
+ * - authors: `metadata.authors`, frontmatter `metadata.author`
823
+ * - tags: `metadata.tags`, frontmatter `metadata.tags`
824
+ * - compatibility: `metadata.compatibility`, frontmatter `compatibility`
825
+ * - owner: frontmatter `metadata.owner`
826
+ * - lifecycle: frontmatter `metadata.lifecycle`
827
+ * - extensions.oci.namespace: `metadata.namespace`
828
+ * - extensions.oci.prompt: `spec.prompt`
829
+ *
830
+ * @public
831
+ */
832
+ declare function normalizeOciMetadata(native: OciNativeInput, trusted: TrustedSourceInput): NormalizationResult<OciSkillRecord>;
833
+ /**
834
+ * Normalizes npx metadata into an `NpxSkillRecord` using design D3
835
+ * precedence rules.
836
+ *
837
+ * Accepts parsed, verified npx discovery entry and Markdown frontmatter
838
+ * plus trusted source identity/integrity fields from the connector.
839
+ * Returns a schema-valid record or null with diagnostics.
840
+ *
841
+ * D3 npx precedence order per field:
842
+ * - name: frontmatter `name`, discovery entry `name`
843
+ * - description: frontmatter `description`, discovery entry `description`
844
+ * - version: frontmatter `metadata.version`, frontmatter `version`
845
+ * - license: frontmatter `license`
846
+ * - authors: frontmatter `metadata.author`
847
+ * - tags: frontmatter `metadata.tags`
848
+ * - compatibility: frontmatter `compatibility`
849
+ * - owner: frontmatter `metadata.owner`
850
+ * - lifecycle: frontmatter `metadata.lifecycle`
851
+ * - extensions.npx.type: discovery entry `type`
852
+ *
853
+ * @public
854
+ */
855
+ declare function normalizeNpxMetadata(native: NpxNativeInput, trusted: TrustedSourceInput): NormalizationResult<NpxSkillRecord>;
856
+
857
+ /**
858
+ * Shared catalog tag validation constants used by both the D3
859
+ * metadata normalizers and the D5 catalog helpers.
860
+ *
861
+ * @packageDocumentation
862
+ */
863
+ /**
864
+ * Catalog tag validation pattern.
865
+ *
866
+ * Tags contain lowercase alphanumeric characters, colons, plus signs,
867
+ * and hash characters, separated by single hyphens.
868
+ *
869
+ * @remarks
870
+ * This pattern matches Backstage's default catalog tag validator.
871
+ * Tests compare it and the length limit with `makeValidator().isValidTag`
872
+ * from `@backstage/catalog-model`, a development-only dependency.
873
+ * Runtime consumers do not need a Backstage dependency for validation.
874
+ *
875
+ * @public
876
+ */
877
+ declare const CATALOG_TAG_PATTERN: RegExp;
878
+ /**
879
+ * Maximum tag length accepted by the Backstage catalog.
880
+ *
881
+ * @public
882
+ */
883
+ declare const MAX_TAG_LENGTH = 63;
884
+
548
885
  /**
549
886
  * Reusable OCI and npx contract fixtures for connector and provider tests.
550
887
  *
@@ -557,6 +894,19 @@ declare const MAX_RESPONSE_BYTES: number;
557
894
 
558
895
 
559
896
 
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
560
910
 
561
911
  /**
562
912
  * OCI source fixture for contract tests.
@@ -732,6 +1082,122 @@ declare const invalidFailedWithSkills: unknown;
732
1082
  * @public
733
1083
  */
734
1084
  declare const invalidSnapshotNonUtcTimestamp: unknown;
1085
+ /**
1086
+ * OCI SkillCard with full metadata including namespace and prompt.
1087
+ *
1088
+ * @public
1089
+ */
1090
+ declare const ociSkillCardFull: OciSkillCard;
1091
+ /**
1092
+ * OCI Markdown frontmatter with full metadata.
1093
+ *
1094
+ * The `metadata.version` here intentionally conflicts with the SkillCard
1095
+ * version to verify D3 precedence: SkillCard `metadata.version` (1.0.0)
1096
+ * wins over frontmatter `metadata.version` (1.0).
1097
+ *
1098
+ * @public
1099
+ */
1100
+ declare const ociMarkdownFrontmatterFull: OciMarkdownFrontmatter;
1101
+ /**
1102
+ * OCI SkillCard with conflicting version.
1103
+ *
1104
+ * SkillCard `metadata.version` is 1.0.0 while the paired frontmatter
1105
+ * declares `metadata.version: "1.0"` and `version: "0.9.0"`. D3
1106
+ * precedence selects 1.0.0 as the declared version.
1107
+ *
1108
+ * @public
1109
+ */
1110
+ declare const ociSkillCardConflictingVersion: OciSkillCard;
1111
+ /**
1112
+ * OCI Markdown frontmatter with conflicting version values.
1113
+ *
1114
+ * Paired with {@link ociSkillCardConflictingVersion} to test D3
1115
+ * version precedence. The SkillCard version (1.0.0) wins.
1116
+ *
1117
+ * @public
1118
+ */
1119
+ declare const ociMarkdownFrontmatterConflictingVersion: OciMarkdownFrontmatter;
1120
+ /**
1121
+ * OCI SkillCard with only a name — no optional metadata.
1122
+ *
1123
+ * @public
1124
+ */
1125
+ declare const ociSkillCardMinimal: OciSkillCard;
1126
+ /**
1127
+ * Combined OCI native input with full metadata.
1128
+ *
1129
+ * @public
1130
+ */
1131
+ declare const ociNativeInputFull: OciNativeInput;
1132
+ /**
1133
+ * Combined OCI native input with conflicting versions.
1134
+ *
1135
+ * @public
1136
+ */
1137
+ declare const ociNativeInputConflictingVersion: OciNativeInput;
1138
+ /**
1139
+ * Combined OCI native input with only a minimal SkillCard.
1140
+ *
1141
+ * @public
1142
+ */
1143
+ declare const ociNativeInputMinimal: OciNativeInput;
1144
+ /**
1145
+ * Trusted source input for OCI fixtures.
1146
+ *
1147
+ * @public
1148
+ */
1149
+ declare const ociTrustedInput: TrustedSourceInput;
1150
+ /**
1151
+ * npx discovery entry with full metadata.
1152
+ *
1153
+ * @public
1154
+ */
1155
+ declare const npxDiscoveryEntryFull: NpxDiscoveryEntry;
1156
+ /**
1157
+ * npx Markdown frontmatter with full metadata.
1158
+ *
1159
+ * @public
1160
+ */
1161
+ declare const npxFrontmatterFull: NpxFrontmatter;
1162
+ /**
1163
+ * npx discovery entry with only a name (minimal).
1164
+ *
1165
+ * @public
1166
+ */
1167
+ declare const npxDiscoveryEntryMinimal: NpxDiscoveryEntry;
1168
+ /**
1169
+ * npx Markdown frontmatter with conflicting version values.
1170
+ *
1171
+ * `metadata.version` (2.0.0) has higher precedence than top-level
1172
+ * `version` (1.5.0) per D3.
1173
+ *
1174
+ * @public
1175
+ */
1176
+ declare const npxFrontmatterConflictingVersion: NpxFrontmatter;
1177
+ /**
1178
+ * Combined npx native input with full metadata.
1179
+ *
1180
+ * @public
1181
+ */
1182
+ declare const npxNativeInputFull: NpxNativeInput;
1183
+ /**
1184
+ * Combined npx native input with conflicting versions.
1185
+ *
1186
+ * @public
1187
+ */
1188
+ declare const npxNativeInputConflictingVersion: NpxNativeInput;
1189
+ /**
1190
+ * Combined npx native input with minimal data.
1191
+ *
1192
+ * @public
1193
+ */
1194
+ declare const npxNativeInputMinimal: NpxNativeInput;
1195
+ /**
1196
+ * Trusted source input for npx fixtures.
1197
+ *
1198
+ * @public
1199
+ */
1200
+ declare const npxTrustedInput: TrustedSourceInput;
735
1201
 
736
1202
  /**
737
1203
  * Shared v1 skill record and snapshot contract for skill connectors
@@ -760,5 +1226,18 @@ declare const invalidSnapshotNonUtcTimestamp: unknown;
760
1226
 
761
1227
 
762
1228
 
763
- export { MAX_RESPONSE_BYTES, MAX_SNAPSHOT_BYTES, MAX_SNAPSHOT_RECORDS, SKILLS_ENDPOINT_BASE, SUPPORTED_SCHEMA_VERSION, boundSnapshot, buildNpxRef, buildOciRef, computeCatalogName, createFailedSnapshot, createLoadingSnapshot, invalidFailedWithSkills, invalidLoadingWithObservedAt, invalidLoadingWithSkills, invalidNpxRecordWithOciExtension, invalidOciRecordUnknownExtKey, invalidOciRecordWithNpxExtension, invalidRecordBadDigest, invalidRecordEmptyKey, invalidRecordShortDigest, invalidSnapshotBadVersion, invalidSnapshotDuplicateKeys, invalidSnapshotNonUtcTimestamp, invalidSnapshotOverlappingKeys, invalidSnapshotReadyWithFailedKeys, isNpxSkillRecord, isOciSkillRecord, isValidDigest, isValidUtcTimestamp, normalizeTags, npxSource, ociSource, parseNpxRef, parseOciRef, resolveVersion, sortRecordsByKey, validFailedSnapshot, validLoadingSnapshot, validNpxRecordFull, validNpxRecordMinimal, validNpxRecordWithQuery, validNpxSnapshotReady, validOciRecordEmptyExtensions, validOciRecordFull, validOciRecordMinimal, validOciSnapshotReady, validPartialEmptySnapshot, validPartialSnapshot, validReadyEmptySnapshot, validateSnapshot, validateSnapshotSize };
764
- export type { BoundSnapshotOptions, IdentityTuple, NormalizeTagsResult, NpxExtensions, NpxRef, NpxSkillRecord, OciExtensions, OciRef, OciSkillRecord, SkillAuthor, SkillRecord, SkillSnapshot, SkillSnapshotV1, SkillSourceType, SnapshotSource, SnapshotStatus, ValidationResult };
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+ export { ANNOTATION_AI_ASSET_CATEGORY, ANNOTATION_AI_ASSET_SOURCE, ANNOTATION_AI_ASSET_VERSION, ANNOTATION_NPX_SKILL_REF, ANNOTATION_OCI_SKILL_REF, CATALOG_TAG_PATTERN, MAX_RESPONSE_BYTES, MAX_SNAPSHOT_BYTES, MAX_SNAPSHOT_RECORDS, MAX_TAG_LENGTH, SKILLS_ENDPOINT_BASE, SUPPORTED_SCHEMA_VERSION, boundSnapshot, buildNpxRef, buildOciRef, computeCatalogName, createFailedSnapshot, createLoadingSnapshot, invalidFailedWithSkills, invalidLoadingWithObservedAt, invalidLoadingWithSkills, invalidNpxRecordWithOciExtension, invalidOciRecordUnknownExtKey, invalidOciRecordWithNpxExtension, invalidRecordBadDigest, invalidRecordEmptyKey, invalidRecordShortDigest, invalidSnapshotBadVersion, invalidSnapshotDuplicateKeys, invalidSnapshotNonUtcTimestamp, invalidSnapshotOverlappingKeys, invalidSnapshotReadyWithFailedKeys, isNpxSkillRecord, isOciSkillRecord, isValidDigest, isValidUtcTimestamp, normalizeNpxMetadata, normalizeOciMetadata, normalizeTags, npxDiscoveryEntryFull, npxDiscoveryEntryMinimal, npxFrontmatterConflictingVersion, npxFrontmatterFull, npxNativeInputConflictingVersion, npxNativeInputFull, npxNativeInputMinimal, npxSource, npxTrustedInput, ociMarkdownFrontmatterConflictingVersion, ociMarkdownFrontmatterFull, ociNativeInputConflictingVersion, ociNativeInputFull, ociNativeInputMinimal, ociSkillCardConflictingVersion, ociSkillCardFull, ociSkillCardMinimal, ociSource, ociTrustedInput, parseNpxRef, parseOciRef, resolveVersion, sortRecordsByKey, validFailedSnapshot, validLoadingSnapshot, validNpxRecordFull, validNpxRecordMinimal, validNpxRecordWithQuery, validNpxSnapshotReady, validOciRecordEmptyExtensions, validOciRecordFull, validOciRecordMinimal, validOciSnapshotReady, validPartialEmptySnapshot, validPartialSnapshot, validReadyEmptySnapshot, validateSnapshot, validateSnapshotSize };
1243
+ export type { BoundSnapshotOptions, FrontmatterMetadata, IdentityTuple, MarkdownFrontmatter, NormalizationDiagnostic, NormalizationResult, NormalizeTagsResult, NpxDiscoveryEntry, NpxExtensions, NpxFrontmatter, NpxNativeInput, NpxRef, NpxSkillRecord, OciExtensions, OciMarkdownFrontmatter, OciNativeInput, OciRef, OciSkillCard, OciSkillCardMetadata, OciSkillCardSpec, OciSkillRecord, SkillAuthor, SkillRecord, SkillSnapshot, SkillSnapshotV1, SkillSourceType, SnapshotSource, SnapshotStatus, TrustedSourceInput, ValidationResult };
package/dist/index.esm.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export { MAX_SNAPSHOT_BYTES, MAX_SNAPSHOT_RECORDS, SUPPORTED_SCHEMA_VERSION, isNpxSkillRecord, isOciSkillRecord, isValidDigest, isValidUtcTimestamp, validateSnapshot, validateSnapshotSize } from './validation.esm.js';
2
- export { buildNpxRef, buildOciRef, computeCatalogName, normalizeTags, parseNpxRef, parseOciRef, resolveVersion } from './catalog-helpers.esm.js';
2
+ export { ANNOTATION_AI_ASSET_CATEGORY, ANNOTATION_AI_ASSET_SOURCE, ANNOTATION_AI_ASSET_VERSION, ANNOTATION_NPX_SKILL_REF, ANNOTATION_OCI_SKILL_REF, buildNpxRef, buildOciRef, computeCatalogName, normalizeTags, parseNpxRef, parseOciRef, resolveVersion } from './catalog-helpers.esm.js';
3
3
  export { boundSnapshot, createFailedSnapshot, createLoadingSnapshot, sortRecordsByKey } from './snapshot.esm.js';
4
4
  export { MAX_RESPONSE_BYTES, SKILLS_ENDPOINT_BASE } from './rest-contract.esm.js';
5
- export { invalidFailedWithSkills, invalidLoadingWithObservedAt, invalidLoadingWithSkills, invalidNpxRecordWithOciExtension, invalidOciRecordUnknownExtKey, invalidOciRecordWithNpxExtension, invalidRecordBadDigest, invalidRecordEmptyKey, invalidRecordShortDigest, invalidSnapshotBadVersion, invalidSnapshotDuplicateKeys, invalidSnapshotNonUtcTimestamp, invalidSnapshotOverlappingKeys, invalidSnapshotReadyWithFailedKeys, npxSource, ociSource, validFailedSnapshot, validLoadingSnapshot, validNpxRecordFull, validNpxRecordMinimal, validNpxRecordWithQuery, validNpxSnapshotReady, validOciRecordEmptyExtensions, validOciRecordFull, validOciRecordMinimal, validOciSnapshotReady, validPartialEmptySnapshot, validPartialSnapshot, validReadyEmptySnapshot } from './fixtures.esm.js';
5
+ export { normalizeNpxMetadata, normalizeOciMetadata } from './normalizer.esm.js';
6
+ export { CATALOG_TAG_PATTERN, MAX_TAG_LENGTH } from './tag-constants.esm.js';
7
+ export { invalidFailedWithSkills, invalidLoadingWithObservedAt, invalidLoadingWithSkills, invalidNpxRecordWithOciExtension, invalidOciRecordUnknownExtKey, invalidOciRecordWithNpxExtension, invalidRecordBadDigest, invalidRecordEmptyKey, invalidRecordShortDigest, invalidSnapshotBadVersion, invalidSnapshotDuplicateKeys, invalidSnapshotNonUtcTimestamp, invalidSnapshotOverlappingKeys, invalidSnapshotReadyWithFailedKeys, npxDiscoveryEntryFull, npxDiscoveryEntryMinimal, npxFrontmatterConflictingVersion, npxFrontmatterFull, npxNativeInputConflictingVersion, npxNativeInputFull, npxNativeInputMinimal, npxSource, npxTrustedInput, ociMarkdownFrontmatterConflictingVersion, ociMarkdownFrontmatterFull, ociNativeInputConflictingVersion, ociNativeInputFull, ociNativeInputMinimal, ociSkillCardConflictingVersion, ociSkillCardFull, ociSkillCardMinimal, ociSource, ociTrustedInput, validFailedSnapshot, validLoadingSnapshot, validNpxRecordFull, validNpxRecordMinimal, validNpxRecordWithQuery, validNpxSnapshotReady, validOciRecordEmptyExtensions, validOciRecordFull, validOciRecordMinimal, validOciSnapshotReady, validPartialEmptySnapshot, validPartialSnapshot, validReadyEmptySnapshot } from './fixtures.esm.js';
6
8
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}