@red-hat-developer-hub/backstage-plugin-ai-skills-common 0.2.0 → 0.4.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/CHANGELOG.md +31 -0
- package/README.md +77 -4
- package/dist/catalog-helpers.cjs.js +7 -8
- package/dist/catalog-helpers.cjs.js.map +1 -1
- package/dist/catalog-helpers.esm.js +6 -7
- package/dist/catalog-helpers.esm.js.map +1 -1
- package/dist/fixtures.cjs.js +130 -4
- package/dist/fixtures.cjs.js.map +1 -1
- package/dist/fixtures.esm.js +114 -5
- package/dist/fixtures.esm.js.map +1 -1
- package/dist/index.cjs.js +23 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +457 -8
- package/dist/index.esm.js +3 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/normalizer.cjs.js +344 -0
- package/dist/normalizer.cjs.js.map +1 -0
- package/dist/normalizer.esm.js +341 -0
- package/dist/normalizer.esm.js.map +1 -0
- package/dist/tag-constants.cjs.js +8 -0
- package/dist/tag-constants.cjs.js.map +1 -0
- package/dist/tag-constants.esm.js +5 -0
- package/dist/tag-constants.esm.js.map +1 -0
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -305,18 +305,22 @@ declare function computeCatalogName(tuple: IdentityTuple): string;
|
|
|
305
305
|
interface NormalizeTagsResult {
|
|
306
306
|
/** Valid, deduplicated tags in lowercase. */
|
|
307
307
|
tags: string[];
|
|
308
|
-
/**
|
|
308
|
+
/**
|
|
309
|
+
* Diagnostic messages for tags that were dropped.
|
|
310
|
+
*
|
|
311
|
+
* @remarks
|
|
312
|
+
* Message text is informational and may change. Consumers must not
|
|
313
|
+
* treat wording as a stable API or use it for programmatic decisions.
|
|
314
|
+
*/
|
|
309
315
|
diagnostics: string[];
|
|
310
316
|
}
|
|
311
317
|
/**
|
|
312
318
|
* Normalizes tags for catalog use per design D3/D5.
|
|
313
319
|
*
|
|
314
320
|
* Trims whitespace, lowercases, deduplicates, and retains only values
|
|
315
|
-
* accepted by
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* with a diagnostic — tags are never truncated and replacement
|
|
319
|
-
* characters are never synthesized.
|
|
321
|
+
* accepted by {@link CATALOG_TAG_PATTERN} (per design D3/D5). Invalid or
|
|
322
|
+
* overlength values are omitted with a diagnostic — tags are never
|
|
323
|
+
* truncated and replacement characters are never synthesized.
|
|
320
324
|
*
|
|
321
325
|
* @public
|
|
322
326
|
*/
|
|
@@ -545,6 +549,309 @@ declare const SKILLS_ENDPOINT_BASE = "/skills";
|
|
|
545
549
|
*/
|
|
546
550
|
declare const MAX_RESPONSE_BYTES: number;
|
|
547
551
|
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Parsed OCI SkillCard metadata fields.
|
|
558
|
+
*
|
|
559
|
+
* Fields use `unknown` because the YAML parser may produce any type.
|
|
560
|
+
* The normalizer validates and selects correctly typed values.
|
|
561
|
+
*
|
|
562
|
+
* @remarks
|
|
563
|
+
* The `unknown` field types are deliberate and stable for the v1 contract.
|
|
564
|
+
* Native metadata arrives as parsed YAML/JSON and may contain any type.
|
|
565
|
+
* Narrowing to concrete types in a future minor release would be a
|
|
566
|
+
* breaking TypeScript change; any such narrowing will be reserved for v2.
|
|
567
|
+
*
|
|
568
|
+
* @public
|
|
569
|
+
*/
|
|
570
|
+
interface OciSkillCardMetadata {
|
|
571
|
+
/** Display name (`metadata.display-name`). */
|
|
572
|
+
'display-name'?: unknown;
|
|
573
|
+
/** Name (`metadata.name`). */
|
|
574
|
+
name?: unknown;
|
|
575
|
+
/** Description (`metadata.description`). */
|
|
576
|
+
description?: unknown;
|
|
577
|
+
/** Declared version (`metadata.version`). */
|
|
578
|
+
version?: unknown;
|
|
579
|
+
/** License identifier (`metadata.license`). */
|
|
580
|
+
license?: unknown;
|
|
581
|
+
/** Author list (`metadata.authors`). */
|
|
582
|
+
authors?: unknown;
|
|
583
|
+
/** Metadata tags (`metadata.tags`). */
|
|
584
|
+
tags?: unknown;
|
|
585
|
+
/** Compatibility info (`metadata.compatibility`). */
|
|
586
|
+
compatibility?: unknown;
|
|
587
|
+
/** Namespace scope (`metadata.namespace`). */
|
|
588
|
+
namespace?: unknown;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Parsed OCI SkillCard spec fields.
|
|
592
|
+
*
|
|
593
|
+
* @public
|
|
594
|
+
*/
|
|
595
|
+
interface OciSkillCardSpec {
|
|
596
|
+
/** System prompt (`spec.prompt`). */
|
|
597
|
+
prompt?: unknown;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Parsed OCI SkillCard document.
|
|
601
|
+
*
|
|
602
|
+
* @public
|
|
603
|
+
*/
|
|
604
|
+
interface OciSkillCard {
|
|
605
|
+
/** SkillCard metadata section. */
|
|
606
|
+
metadata?: OciSkillCardMetadata;
|
|
607
|
+
/** SkillCard spec section. */
|
|
608
|
+
spec?: OciSkillCardSpec;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Shared base interface for parsed Markdown frontmatter.
|
|
612
|
+
*
|
|
613
|
+
* Both OCI and npx skill documents use the same YAML frontmatter
|
|
614
|
+
* structure. This base captures the common shape. Dedicated aliases
|
|
615
|
+
* ({@link OciMarkdownFrontmatter}, {@link NpxFrontmatter}) represent
|
|
616
|
+
* semantically distinct domains and may diverge independently in
|
|
617
|
+
* future versions.
|
|
618
|
+
*
|
|
619
|
+
* @remarks
|
|
620
|
+
* The `unknown` field types are deliberate and stable for the v1 contract.
|
|
621
|
+
* See {@link OciSkillCardMetadata} for the rationale.
|
|
622
|
+
*
|
|
623
|
+
* @public
|
|
624
|
+
*/
|
|
625
|
+
interface MarkdownFrontmatter {
|
|
626
|
+
/** Top-level name. */
|
|
627
|
+
name?: unknown;
|
|
628
|
+
/** Top-level description. */
|
|
629
|
+
description?: unknown;
|
|
630
|
+
/** Top-level version (frontmatter `version`). */
|
|
631
|
+
version?: unknown;
|
|
632
|
+
/** Top-level license. */
|
|
633
|
+
license?: unknown;
|
|
634
|
+
/** Top-level compatibility. */
|
|
635
|
+
compatibility?: unknown;
|
|
636
|
+
/** Nested metadata block in frontmatter. */
|
|
637
|
+
metadata?: FrontmatterMetadata;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Nested metadata block within parsed Markdown frontmatter.
|
|
641
|
+
*
|
|
642
|
+
* @remarks
|
|
643
|
+
* The `unknown` field types are deliberate and stable for the v1 contract.
|
|
644
|
+
* See {@link OciSkillCardMetadata} for the rationale.
|
|
645
|
+
*
|
|
646
|
+
* @public
|
|
647
|
+
*/
|
|
648
|
+
interface FrontmatterMetadata {
|
|
649
|
+
/** Frontmatter `metadata.version`. */
|
|
650
|
+
version?: unknown;
|
|
651
|
+
/** Frontmatter `metadata.author` (string or object). */
|
|
652
|
+
author?: unknown;
|
|
653
|
+
/** Frontmatter `metadata.tags`. */
|
|
654
|
+
tags?: unknown;
|
|
655
|
+
/** Frontmatter `metadata.owner`. */
|
|
656
|
+
owner?: unknown;
|
|
657
|
+
/** Frontmatter `metadata.lifecycle`. */
|
|
658
|
+
lifecycle?: unknown;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Parsed Markdown frontmatter from an OCI skill document
|
|
662
|
+
* (SKILL.md or SKILLS.md).
|
|
663
|
+
*
|
|
664
|
+
* Structurally identical to {@link MarkdownFrontmatter} but kept as a
|
|
665
|
+
* separate named type so the OCI and npx domains can diverge
|
|
666
|
+
* independently in future versions without a breaking rename.
|
|
667
|
+
*
|
|
668
|
+
* @public
|
|
669
|
+
*/
|
|
670
|
+
type OciMarkdownFrontmatter = MarkdownFrontmatter;
|
|
671
|
+
/**
|
|
672
|
+
* Combined parsed OCI native input for normalization.
|
|
673
|
+
*
|
|
674
|
+
* @public
|
|
675
|
+
*/
|
|
676
|
+
interface OciNativeInput {
|
|
677
|
+
/** Parsed SkillCard document. */
|
|
678
|
+
skillCard?: OciSkillCard;
|
|
679
|
+
/** Parsed Markdown frontmatter. */
|
|
680
|
+
frontmatter?: OciMarkdownFrontmatter;
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Parsed npx discovery entry from an Agent Skills index.
|
|
684
|
+
*
|
|
685
|
+
* @remarks
|
|
686
|
+
* The `unknown` field types are deliberate and stable for the v1 contract.
|
|
687
|
+
* See {@link OciSkillCardMetadata} for the rationale.
|
|
688
|
+
*
|
|
689
|
+
* @public
|
|
690
|
+
*/
|
|
691
|
+
interface NpxDiscoveryEntry {
|
|
692
|
+
/** Discovery entry name. */
|
|
693
|
+
name?: unknown;
|
|
694
|
+
/** Discovery entry description. */
|
|
695
|
+
description?: unknown;
|
|
696
|
+
/**
|
|
697
|
+
* Artifact format type.
|
|
698
|
+
*
|
|
699
|
+
* @remarks
|
|
700
|
+
* Currently only `'skill-md'` is accepted by the normalizer. Any other
|
|
701
|
+
* non-nullish value is omitted from the normalized record with a
|
|
702
|
+
* diagnostic. The field is typed `unknown` because the discovery index
|
|
703
|
+
* may contain arbitrary strings; the normalizer validates at runtime.
|
|
704
|
+
*/
|
|
705
|
+
type?: unknown;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Parsed Markdown frontmatter from an npx skill document.
|
|
709
|
+
*
|
|
710
|
+
* Structurally identical to {@link MarkdownFrontmatter} but kept as a
|
|
711
|
+
* separate named type so the npx and OCI domains can diverge
|
|
712
|
+
* independently in future versions without a breaking rename.
|
|
713
|
+
*
|
|
714
|
+
* @public
|
|
715
|
+
*/
|
|
716
|
+
type NpxFrontmatter = MarkdownFrontmatter;
|
|
717
|
+
/**
|
|
718
|
+
* Combined parsed npx native input for normalization.
|
|
719
|
+
*
|
|
720
|
+
* @public
|
|
721
|
+
*/
|
|
722
|
+
interface NpxNativeInput {
|
|
723
|
+
/** Parsed discovery entry. */
|
|
724
|
+
entry?: NpxDiscoveryEntry;
|
|
725
|
+
/** Parsed Markdown frontmatter. */
|
|
726
|
+
frontmatter?: NpxFrontmatter;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Trusted source identity and integrity fields provided by the
|
|
730
|
+
* connector after verified acquisition. These are never derived
|
|
731
|
+
* from native metadata or user-supplied frontmatter.
|
|
732
|
+
*
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
735
|
+
interface TrustedSourceInput {
|
|
736
|
+
/** Stable identity key within this source. */
|
|
737
|
+
key: string;
|
|
738
|
+
/** Digest-addressed OCI URI or fragment-free HTTPS URL. */
|
|
739
|
+
sourceUri: string;
|
|
740
|
+
/** Content digest in `sha256:<64 lowercase hex digits>` format. */
|
|
741
|
+
digest: string;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* A single diagnostic produced during metadata normalization.
|
|
745
|
+
*
|
|
746
|
+
* @public
|
|
747
|
+
*/
|
|
748
|
+
interface NormalizationDiagnostic {
|
|
749
|
+
/** The normalized field that triggered the diagnostic. */
|
|
750
|
+
field: string;
|
|
751
|
+
/**
|
|
752
|
+
* Human-readable description of the issue.
|
|
753
|
+
*
|
|
754
|
+
* @remarks
|
|
755
|
+
* The `message` field is informational and not part of the stable API
|
|
756
|
+
* contract. Diagnostic wording may change between minor releases.
|
|
757
|
+
* Downstream consumers should not assert on exact message text.
|
|
758
|
+
*/
|
|
759
|
+
message: string;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Result of a metadata normalization operation.
|
|
763
|
+
*
|
|
764
|
+
* When `record` is non-null, the normalization succeeded and the record
|
|
765
|
+
* is schema-valid. Diagnostics may still be present for omitted optional
|
|
766
|
+
* fields. When `record` is null, the normalization failed due to missing
|
|
767
|
+
* required fields or other fatal issues.
|
|
768
|
+
*
|
|
769
|
+
* @public
|
|
770
|
+
*/
|
|
771
|
+
interface NormalizationResult<T> {
|
|
772
|
+
/** The normalized record, or null if normalization failed. */
|
|
773
|
+
record: T | null;
|
|
774
|
+
/** Diagnostics produced during normalization. */
|
|
775
|
+
diagnostics: NormalizationDiagnostic[];
|
|
776
|
+
}
|
|
777
|
+
/**
|
|
778
|
+
* Normalizes OCI metadata into an `OciSkillRecord` using design D3
|
|
779
|
+
* precedence rules.
|
|
780
|
+
*
|
|
781
|
+
* Accepts parsed, verified OCI SkillCard metadata and Markdown
|
|
782
|
+
* frontmatter plus trusted source identity/integrity fields from
|
|
783
|
+
* the connector. Returns a schema-valid record or null with
|
|
784
|
+
* diagnostics.
|
|
785
|
+
*
|
|
786
|
+
* D3 OCI precedence order per field:
|
|
787
|
+
* - name: `metadata.display-name`, `metadata.name`, frontmatter `name`
|
|
788
|
+
* - description: `metadata.description`, frontmatter `description`
|
|
789
|
+
* - version: `metadata.version`, frontmatter `metadata.version`,
|
|
790
|
+
* frontmatter `version`
|
|
791
|
+
* - license: `metadata.license`, frontmatter `license`
|
|
792
|
+
* - authors: `metadata.authors`, frontmatter `metadata.author`
|
|
793
|
+
* - tags: `metadata.tags`, frontmatter `metadata.tags`
|
|
794
|
+
* - compatibility: `metadata.compatibility`, frontmatter `compatibility`
|
|
795
|
+
* - owner: frontmatter `metadata.owner`
|
|
796
|
+
* - lifecycle: frontmatter `metadata.lifecycle`
|
|
797
|
+
* - extensions.oci.namespace: `metadata.namespace`
|
|
798
|
+
* - extensions.oci.prompt: `spec.prompt`
|
|
799
|
+
*
|
|
800
|
+
* @public
|
|
801
|
+
*/
|
|
802
|
+
declare function normalizeOciMetadata(native: OciNativeInput, trusted: TrustedSourceInput): NormalizationResult<OciSkillRecord>;
|
|
803
|
+
/**
|
|
804
|
+
* Normalizes npx metadata into an `NpxSkillRecord` using design D3
|
|
805
|
+
* precedence rules.
|
|
806
|
+
*
|
|
807
|
+
* Accepts parsed, verified npx discovery entry and Markdown frontmatter
|
|
808
|
+
* plus trusted source identity/integrity fields from the connector.
|
|
809
|
+
* Returns a schema-valid record or null with diagnostics.
|
|
810
|
+
*
|
|
811
|
+
* D3 npx precedence order per field:
|
|
812
|
+
* - name: frontmatter `name`, discovery entry `name`
|
|
813
|
+
* - description: frontmatter `description`, discovery entry `description`
|
|
814
|
+
* - version: frontmatter `metadata.version`, frontmatter `version`
|
|
815
|
+
* - license: frontmatter `license`
|
|
816
|
+
* - authors: frontmatter `metadata.author`
|
|
817
|
+
* - tags: frontmatter `metadata.tags`
|
|
818
|
+
* - compatibility: frontmatter `compatibility`
|
|
819
|
+
* - owner: frontmatter `metadata.owner`
|
|
820
|
+
* - lifecycle: frontmatter `metadata.lifecycle`
|
|
821
|
+
* - extensions.npx.type: discovery entry `type`
|
|
822
|
+
*
|
|
823
|
+
* @public
|
|
824
|
+
*/
|
|
825
|
+
declare function normalizeNpxMetadata(native: NpxNativeInput, trusted: TrustedSourceInput): NormalizationResult<NpxSkillRecord>;
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* Shared catalog tag validation constants used by both the D3
|
|
829
|
+
* metadata normalizers and the D5 catalog helpers.
|
|
830
|
+
*
|
|
831
|
+
* @packageDocumentation
|
|
832
|
+
*/
|
|
833
|
+
/**
|
|
834
|
+
* Catalog tag validation pattern.
|
|
835
|
+
*
|
|
836
|
+
* Tags contain lowercase alphanumeric characters, colons, plus signs,
|
|
837
|
+
* and hash characters, separated by single hyphens.
|
|
838
|
+
*
|
|
839
|
+
* @remarks
|
|
840
|
+
* This pattern matches Backstage's default catalog tag validator.
|
|
841
|
+
* Tests compare it and the length limit with `makeValidator().isValidTag`
|
|
842
|
+
* from `@backstage/catalog-model`, a development-only dependency.
|
|
843
|
+
* Runtime consumers do not need a Backstage dependency for validation.
|
|
844
|
+
*
|
|
845
|
+
* @public
|
|
846
|
+
*/
|
|
847
|
+
declare const CATALOG_TAG_PATTERN: RegExp;
|
|
848
|
+
/**
|
|
849
|
+
* Maximum tag length accepted by the Backstage catalog.
|
|
850
|
+
*
|
|
851
|
+
* @public
|
|
852
|
+
*/
|
|
853
|
+
declare const MAX_TAG_LENGTH = 63;
|
|
854
|
+
|
|
548
855
|
/**
|
|
549
856
|
* Reusable OCI and npx contract fixtures for connector and provider tests.
|
|
550
857
|
*
|
|
@@ -557,6 +864,19 @@ declare const MAX_RESPONSE_BYTES: number;
|
|
|
557
864
|
|
|
558
865
|
|
|
559
866
|
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
|
|
560
880
|
|
|
561
881
|
/**
|
|
562
882
|
* OCI source fixture for contract tests.
|
|
@@ -732,6 +1052,122 @@ declare const invalidFailedWithSkills: unknown;
|
|
|
732
1052
|
* @public
|
|
733
1053
|
*/
|
|
734
1054
|
declare const invalidSnapshotNonUtcTimestamp: unknown;
|
|
1055
|
+
/**
|
|
1056
|
+
* OCI SkillCard with full metadata including namespace and prompt.
|
|
1057
|
+
*
|
|
1058
|
+
* @public
|
|
1059
|
+
*/
|
|
1060
|
+
declare const ociSkillCardFull: OciSkillCard;
|
|
1061
|
+
/**
|
|
1062
|
+
* OCI Markdown frontmatter with full metadata.
|
|
1063
|
+
*
|
|
1064
|
+
* The `metadata.version` here intentionally conflicts with the SkillCard
|
|
1065
|
+
* version to verify D3 precedence: SkillCard `metadata.version` (1.0.0)
|
|
1066
|
+
* wins over frontmatter `metadata.version` (1.0).
|
|
1067
|
+
*
|
|
1068
|
+
* @public
|
|
1069
|
+
*/
|
|
1070
|
+
declare const ociMarkdownFrontmatterFull: OciMarkdownFrontmatter;
|
|
1071
|
+
/**
|
|
1072
|
+
* OCI SkillCard with conflicting version.
|
|
1073
|
+
*
|
|
1074
|
+
* SkillCard `metadata.version` is 1.0.0 while the paired frontmatter
|
|
1075
|
+
* declares `metadata.version: "1.0"` and `version: "0.9.0"`. D3
|
|
1076
|
+
* precedence selects 1.0.0 as the declared version.
|
|
1077
|
+
*
|
|
1078
|
+
* @public
|
|
1079
|
+
*/
|
|
1080
|
+
declare const ociSkillCardConflictingVersion: OciSkillCard;
|
|
1081
|
+
/**
|
|
1082
|
+
* OCI Markdown frontmatter with conflicting version values.
|
|
1083
|
+
*
|
|
1084
|
+
* Paired with {@link ociSkillCardConflictingVersion} to test D3
|
|
1085
|
+
* version precedence. The SkillCard version (1.0.0) wins.
|
|
1086
|
+
*
|
|
1087
|
+
* @public
|
|
1088
|
+
*/
|
|
1089
|
+
declare const ociMarkdownFrontmatterConflictingVersion: OciMarkdownFrontmatter;
|
|
1090
|
+
/**
|
|
1091
|
+
* OCI SkillCard with only a name — no optional metadata.
|
|
1092
|
+
*
|
|
1093
|
+
* @public
|
|
1094
|
+
*/
|
|
1095
|
+
declare const ociSkillCardMinimal: OciSkillCard;
|
|
1096
|
+
/**
|
|
1097
|
+
* Combined OCI native input with full metadata.
|
|
1098
|
+
*
|
|
1099
|
+
* @public
|
|
1100
|
+
*/
|
|
1101
|
+
declare const ociNativeInputFull: OciNativeInput;
|
|
1102
|
+
/**
|
|
1103
|
+
* Combined OCI native input with conflicting versions.
|
|
1104
|
+
*
|
|
1105
|
+
* @public
|
|
1106
|
+
*/
|
|
1107
|
+
declare const ociNativeInputConflictingVersion: OciNativeInput;
|
|
1108
|
+
/**
|
|
1109
|
+
* Combined OCI native input with only a minimal SkillCard.
|
|
1110
|
+
*
|
|
1111
|
+
* @public
|
|
1112
|
+
*/
|
|
1113
|
+
declare const ociNativeInputMinimal: OciNativeInput;
|
|
1114
|
+
/**
|
|
1115
|
+
* Trusted source input for OCI fixtures.
|
|
1116
|
+
*
|
|
1117
|
+
* @public
|
|
1118
|
+
*/
|
|
1119
|
+
declare const ociTrustedInput: TrustedSourceInput;
|
|
1120
|
+
/**
|
|
1121
|
+
* npx discovery entry with full metadata.
|
|
1122
|
+
*
|
|
1123
|
+
* @public
|
|
1124
|
+
*/
|
|
1125
|
+
declare const npxDiscoveryEntryFull: NpxDiscoveryEntry;
|
|
1126
|
+
/**
|
|
1127
|
+
* npx Markdown frontmatter with full metadata.
|
|
1128
|
+
*
|
|
1129
|
+
* @public
|
|
1130
|
+
*/
|
|
1131
|
+
declare const npxFrontmatterFull: NpxFrontmatter;
|
|
1132
|
+
/**
|
|
1133
|
+
* npx discovery entry with only a name (minimal).
|
|
1134
|
+
*
|
|
1135
|
+
* @public
|
|
1136
|
+
*/
|
|
1137
|
+
declare const npxDiscoveryEntryMinimal: NpxDiscoveryEntry;
|
|
1138
|
+
/**
|
|
1139
|
+
* npx Markdown frontmatter with conflicting version values.
|
|
1140
|
+
*
|
|
1141
|
+
* `metadata.version` (2.0.0) has higher precedence than top-level
|
|
1142
|
+
* `version` (1.5.0) per D3.
|
|
1143
|
+
*
|
|
1144
|
+
* @public
|
|
1145
|
+
*/
|
|
1146
|
+
declare const npxFrontmatterConflictingVersion: NpxFrontmatter;
|
|
1147
|
+
/**
|
|
1148
|
+
* Combined npx native input with full metadata.
|
|
1149
|
+
*
|
|
1150
|
+
* @public
|
|
1151
|
+
*/
|
|
1152
|
+
declare const npxNativeInputFull: NpxNativeInput;
|
|
1153
|
+
/**
|
|
1154
|
+
* Combined npx native input with conflicting versions.
|
|
1155
|
+
*
|
|
1156
|
+
* @public
|
|
1157
|
+
*/
|
|
1158
|
+
declare const npxNativeInputConflictingVersion: NpxNativeInput;
|
|
1159
|
+
/**
|
|
1160
|
+
* Combined npx native input with minimal data.
|
|
1161
|
+
*
|
|
1162
|
+
* @public
|
|
1163
|
+
*/
|
|
1164
|
+
declare const npxNativeInputMinimal: NpxNativeInput;
|
|
1165
|
+
/**
|
|
1166
|
+
* Trusted source input for npx fixtures.
|
|
1167
|
+
*
|
|
1168
|
+
* @public
|
|
1169
|
+
*/
|
|
1170
|
+
declare const npxTrustedInput: TrustedSourceInput;
|
|
735
1171
|
|
|
736
1172
|
/**
|
|
737
1173
|
* Shared v1 skill record and snapshot contract for skill connectors
|
|
@@ -760,5 +1196,18 @@ declare const invalidSnapshotNonUtcTimestamp: unknown;
|
|
|
760
1196
|
|
|
761
1197
|
|
|
762
1198
|
|
|
763
|
-
|
|
764
|
-
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
export { 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 };
|
|
1213
|
+
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
|
@@ -2,5 +2,7 @@ export { MAX_SNAPSHOT_BYTES, MAX_SNAPSHOT_RECORDS, SUPPORTED_SCHEMA_VERSION, isN
|
|
|
2
2
|
export { 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 {
|
|
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
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|