@teamix-evo/registry 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
@@ -223,8 +223,8 @@ declare const SkillEntrySchema: z.ZodObject<{
223
223
  * coding-conventions, baseline design-rules) leave it unset.
224
224
  *
225
225
  * When present, the CLI installs this skill ONLY if the consumer's
226
- * `.teamix-evo/design/pack.lock.json` records the same variant. MUST equal
227
- * the variant directory name in `@teamix-evo/design/variants/<name>/`.
226
+ * `.teamix-evo/tokens-lock.json` records the same variant. MUST equal
227
+ * the variant directory name in `@teamix-evo/tokens/variants/<name>/`.
228
228
  *
229
229
  * Mirrors `UiEntrySchema.variant` semantics in @teamix-evo/biz-ui &
230
230
  * @teamix-evo/templates per ADR 0014.
@@ -299,8 +299,8 @@ declare const SkillsPackageManifestSchema: z.ZodObject<{
299
299
  * coding-conventions, baseline design-rules) leave it unset.
300
300
  *
301
301
  * When present, the CLI installs this skill ONLY if the consumer's
302
- * `.teamix-evo/design/pack.lock.json` records the same variant. MUST equal
303
- * the variant directory name in `@teamix-evo/design/variants/<name>/`.
302
+ * `.teamix-evo/tokens-lock.json` records the same variant. MUST equal
303
+ * the variant directory name in `@teamix-evo/tokens/variants/<name>/`.
304
304
  *
305
305
  * Mirrors `UiEntrySchema.variant` semantics in @teamix-evo/biz-ui &
306
306
  * @teamix-evo/templates per ADR 0014.
@@ -443,8 +443,8 @@ declare const UiEntrySchema: z.ZodObject<{
443
443
  }>, "many">;
444
444
  /**
445
445
  * Optional path to an AI-readable meta document (frontmatter + Markdown).
446
- * When set, CLI install drops it at `.teamix-evo/design/components/<id>.meta.md`
447
- * for design's ai-rules to consume.
446
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
447
+ * copy is written (per ADR 0020 §3).
448
448
  */
449
449
  meta: z.ZodOptional<z.ZodString>;
450
450
  /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
@@ -543,7 +543,7 @@ declare const UiPackageManifestSchema: z.ZodObject<{
543
543
  }, {
544
544
  'teamix-evo': string;
545
545
  }>;
546
- /** Flat list of entries shipped by this package */
546
+ /** Active list of entries shipped (and exposed) by this package. */
547
547
  entries: z.ZodArray<z.ZodObject<{
548
548
  /** Unique entry identifier within the ui package (e.g. "button") */
549
549
  id: z.ZodString;
@@ -572,8 +572,8 @@ declare const UiPackageManifestSchema: z.ZodObject<{
572
572
  }>, "many">;
573
573
  /**
574
574
  * Optional path to an AI-readable meta document (frontmatter + Markdown).
575
- * When set, CLI install drops it at `.teamix-evo/design/components/<id>.meta.md`
576
- * for design's ai-rules to consume.
575
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
576
+ * copy is written (per ADR 0020 §3).
577
577
  */
578
578
  meta: z.ZodOptional<z.ZodString>;
579
579
  /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
@@ -652,6 +652,123 @@ declare const UiPackageManifestSchema: z.ZodObject<{
652
652
  deprecatedReason?: string | undefined;
653
653
  replacedBy?: string | undefined;
654
654
  }>, "many">;
655
+ /**
656
+ * Archived entries that are kept in source for Storybook documentation only
657
+ * and are NOT exposed through the active distribution chain. Per ADR 0028:
658
+ * - `teamix-evo ui add <id>` rejects ids found here unless `--include-deprecated` is passed
659
+ * - MCP `list_components` / `find_components` exclude these by default
660
+ * - Storybook keeps the story under `废弃 · Deprecated/` with a banner
661
+ * Optional for backwards compatibility — older manifests without this field
662
+ * still validate.
663
+ */
664
+ deprecatedEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
665
+ /** Unique entry identifier within the ui package (e.g. "button") */
666
+ id: z.ZodString;
667
+ /** Display name (e.g. "Button") */
668
+ name: z.ZodString;
669
+ /** Entry type */
670
+ type: z.ZodEnum<["component", "hook", "util", "block", "template"]>;
671
+ /** One-line description for entry discovery and AI guidance */
672
+ description: z.ZodString;
673
+ /** Files this entry ships (typically 1) */
674
+ files: z.ZodArray<z.ZodObject<{
675
+ /** Source path relative to the ui package root (e.g. "src/components/button/button.tsx") */
676
+ source: z.ZodString;
677
+ /** Which alias this file resolves under in the consumer project */
678
+ targetAlias: z.ZodEnum<["components", "hooks", "utils", "lib", "business", "templates"]>;
679
+ /** Filename written under the alias directory (e.g. "button.tsx") */
680
+ targetName: z.ZodString;
681
+ }, "strip", z.ZodTypeAny, {
682
+ source: string;
683
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
684
+ targetName: string;
685
+ }, {
686
+ source: string;
687
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
688
+ targetName: string;
689
+ }>, "many">;
690
+ /**
691
+ * Optional path to an AI-readable meta document (frontmatter + Markdown).
692
+ * Read directly from `@teamix-evo/ui` by MCP at runtime — no consumer-side
693
+ * copy is written (per ADR 0020 §3).
694
+ */
695
+ meta: z.ZodOptional<z.ZodString>;
696
+ /** Other UI entries this one depends on (e.g. "button" depends on "cn") */
697
+ registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
698
+ /** npm dependencies required by this entry (name → semver range) */
699
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
700
+ /**
701
+ * How CLI handles this entry on `ui upgrade`.
702
+ * Defaults to `frozen` — user-owned source code, untouched after first install.
703
+ * Upgrade is handled by AI + skill flow (no CLI rewrite). See PLAN §10.9.
704
+ */
705
+ updateStrategy: z.ZodDefault<z.ZodEnum<["frozen", "regenerable", "managed"]>>;
706
+ /**
707
+ * Whether the source file should be passed through Handlebars before write.
708
+ * Most entries don't need templating (use import-rewrite transformer instead).
709
+ */
710
+ template: z.ZodOptional<z.ZodBoolean>;
711
+ /**
712
+ * Maturity / lifecycle status of this entry. Defaults to `stable`.
713
+ * See {@link UiEntryStatusSchema} for semantics.
714
+ */
715
+ status: z.ZodDefault<z.ZodEnum<["stable", "experimental", "deprecated"]>>;
716
+ /**
717
+ * Free-text rationale shown to consumers when `status` is `deprecated`.
718
+ * Should explain why the entry is going away and what replaces it.
719
+ */
720
+ deprecatedReason: z.ZodOptional<z.ZodString>;
721
+ /**
722
+ * If this entry is `deprecated`, the id of the entry that supersedes it.
723
+ * Consumers (and AI) should migrate to `replacedBy` rather than this entry.
724
+ */
725
+ replacedBy: z.ZodOptional<z.ZodString>;
726
+ /**
727
+ * Variant identifier when this entry is shipped from a variant-aware
728
+ * package (`@teamix-evo/biz-ui` or `@teamix-evo/templates` per ADR 0014).
729
+ * Optional — entries from `@teamix-evo/ui` (variant-agnostic) leave it unset.
730
+ * MUST equal the variant directory name when present.
731
+ */
732
+ variant: z.ZodOptional<z.ZodString>;
733
+ }, "strip", z.ZodTypeAny, {
734
+ id: string;
735
+ type: "template" | "component" | "hook" | "util" | "block";
736
+ updateStrategy: "frozen" | "regenerable" | "managed";
737
+ status: "stable" | "experimental" | "deprecated";
738
+ description: string;
739
+ name: string;
740
+ files: {
741
+ source: string;
742
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
743
+ targetName: string;
744
+ }[];
745
+ template?: boolean | undefined;
746
+ variant?: string | undefined;
747
+ meta?: string | undefined;
748
+ registryDependencies?: string[] | undefined;
749
+ dependencies?: Record<string, string> | undefined;
750
+ deprecatedReason?: string | undefined;
751
+ replacedBy?: string | undefined;
752
+ }, {
753
+ id: string;
754
+ type: "template" | "component" | "hook" | "util" | "block";
755
+ description: string;
756
+ name: string;
757
+ files: {
758
+ source: string;
759
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
760
+ targetName: string;
761
+ }[];
762
+ updateStrategy?: "frozen" | "regenerable" | "managed" | undefined;
763
+ template?: boolean | undefined;
764
+ status?: "stable" | "experimental" | "deprecated" | undefined;
765
+ variant?: string | undefined;
766
+ meta?: string | undefined;
767
+ registryDependencies?: string[] | undefined;
768
+ dependencies?: Record<string, string> | undefined;
769
+ deprecatedReason?: string | undefined;
770
+ replacedBy?: string | undefined;
771
+ }>, "many">>;
655
772
  }, "strip", z.ZodTypeAny, {
656
773
  entries: {
657
774
  id: string;
@@ -680,6 +797,26 @@ declare const UiPackageManifestSchema: z.ZodObject<{
680
797
  'teamix-evo': string;
681
798
  };
682
799
  $schema?: string | undefined;
800
+ deprecatedEntries?: {
801
+ id: string;
802
+ type: "template" | "component" | "hook" | "util" | "block";
803
+ updateStrategy: "frozen" | "regenerable" | "managed";
804
+ status: "stable" | "experimental" | "deprecated";
805
+ description: string;
806
+ name: string;
807
+ files: {
808
+ source: string;
809
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
810
+ targetName: string;
811
+ }[];
812
+ template?: boolean | undefined;
813
+ variant?: string | undefined;
814
+ meta?: string | undefined;
815
+ registryDependencies?: string[] | undefined;
816
+ dependencies?: Record<string, string> | undefined;
817
+ deprecatedReason?: string | undefined;
818
+ replacedBy?: string | undefined;
819
+ }[] | undefined;
683
820
  }, {
684
821
  entries: {
685
822
  id: string;
@@ -708,53 +845,60 @@ declare const UiPackageManifestSchema: z.ZodObject<{
708
845
  'teamix-evo': string;
709
846
  };
710
847
  $schema?: string | undefined;
848
+ deprecatedEntries?: {
849
+ id: string;
850
+ type: "template" | "component" | "hook" | "util" | "block";
851
+ description: string;
852
+ name: string;
853
+ files: {
854
+ source: string;
855
+ targetAlias: "components" | "hooks" | "utils" | "lib" | "business" | "templates";
856
+ targetName: string;
857
+ }[];
858
+ updateStrategy?: "frozen" | "regenerable" | "managed" | undefined;
859
+ template?: boolean | undefined;
860
+ status?: "stable" | "experimental" | "deprecated" | undefined;
861
+ variant?: string | undefined;
862
+ meta?: string | undefined;
863
+ registryDependencies?: string[] | undefined;
864
+ dependencies?: Record<string, string> | undefined;
865
+ deprecatedReason?: string | undefined;
866
+ replacedBy?: string | undefined;
867
+ }[] | undefined;
711
868
  }>;
712
869
 
713
870
  /**
714
- * Design Pack manifest schema.
871
+ * `@teamix-evo/tokens` package manifest schema.
715
872
  *
716
- * Per [ADR 0010](../../../../docs/adr/0010-design-default-and-variants.md) the
717
- * design system is structured as one **default** baseline + N **variants**:
873
+ * Per [ADR 0020](../../../../docs/adr/0020-design-to-tokens-skill-fusion.md)
874
+ * the package is now a pure, variant-list catalog no `default/` baseline,
875
+ * no per-variant `pack.json`, no walk-and-merge inheritance:
718
876
  *
719
- * packages/design/
720
- * ├── default/ <- B-end neutral baseline (always present)
721
- * │ ├── pack.json <- this schema (no `extends`)
722
- * │ └── ... (philosophy/, foundations/, patterns/, scenarios/)
723
- * ├── variants/
724
- * ├── _template/ <- minimal scaffold for new variants
725
- * │ │ └── pack.json <- this schema, extends: "default"
726
- *├── opentrek/
727
- * │ │ ├── pack.json <- this schema, extends: "default"
728
- * │ │ └── ... (only files differing from default)
729
- * │ └── uni-manager/
730
- * │ └── pack.json
731
- * └── manifest.json <- top-level catalog (lists default + variants)
877
+ * packages/tokens/
878
+ * ├── manifest.json <- this schema (top-level catalog)
879
+ * └── variants/
880
+ * ├── opentrek/
881
+ *├── theme.css <- Tailwind v4 @theme source of truth
882
+ * └── base.tokens.json
883
+ * └── uni-manager/
884
+ * ├── theme.css
885
+ * └── base.tokens.json
732
886
  *
733
- * The `pack.json` carries **only the protocol identity** of one pack; file
734
- * lists are NOT declared here the loader walks the filesystem under the
735
- * pack root and lets file-level override merge happen at install time.
736
- *
737
- * Rationale: variant authors who add a new file (e.g. a new Markdown pattern)
738
- * shouldn't have to register it in `pack.json`. The filesystem is the single
739
- * source of truth (P2). See ADR 0010 §7 for the schema-simplification
740
- * rationale.
887
+ * Each variant is a complete, self-contained token set (ADR 0020 §3). The
888
+ * catalog is the single source of truth for variant identity + advertised
889
+ * files; the validator (`packages/tokens/scripts/validate-variants.ts`)
890
+ * enforces parity between catalog entries and on-disk variant directories.
741
891
  */
742
892
 
743
893
  /**
744
- * Soft cross-package links advertised by a design pack.
745
- *
746
- * When a consumer installs design `<variant>`, the CLI MAY check that the
747
- * matching biz-ui / templates variant exists in the workspace / npm and
748
- * prompt the user to install it too. The link is **soft** — packs may exist
749
- * without their biz-ui or templates counterparts, especially in early
750
- * development.
894
+ * Soft cross-package links advertised by a variant.
751
895
  *
752
896
  * Format: `<package-spec>#<variant-name>`, e.g. `@teamix-evo/biz-ui#opentrek`.
897
+ * The link is **soft** — the linked package may not exist yet.
753
898
  *
754
- * Linked field for `templates` added per [ADR 0014 2026-05-18 amendment](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md)
755
- * (templates became variant-aware mirroring biz-ui).
899
+ * Templates link added per [ADR 0014 amendment](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md).
756
900
  */
757
- declare const DesignPackLinkedSchema: z.ZodObject<{
901
+ declare const TokensPackLinkedSchema: z.ZodObject<{
758
902
  'biz-ui': z.ZodOptional<z.ZodString>;
759
903
  templates: z.ZodOptional<z.ZodString>;
760
904
  }, "strip", z.ZodTypeAny, {
@@ -765,32 +909,24 @@ declare const DesignPackLinkedSchema: z.ZodObject<{
765
909
  'biz-ui'?: string | undefined;
766
910
  }>;
767
911
  /**
768
- * Design pack manifest schema.
769
- *
770
- * Describes ONE pack (either the default baseline or one variant). Files are
771
- * not declared — the loader walks the pack root.
912
+ * One variant entry in the top-level catalog.
772
913
  */
773
- declare const DesignPackManifestSchema: z.ZodObject<{
774
- $schema: z.ZodOptional<z.ZodString>;
775
- schemaVersion: z.ZodLiteral<1>;
776
- /**
777
- * Pack identifier.
778
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
779
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
780
- */
781
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
914
+ declare const TokensVariantEntrySchema: z.ZodObject<{
915
+ /** Variant id — lowercase kebab-case. */
916
+ name: z.ZodString;
782
917
  /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
783
918
  displayName: z.ZodString;
784
- /** Semver. */
919
+ /** Variant version — semver. May trail the package version when only a subset of variants change. */
785
920
  version: z.ZodString;
921
+ /** Optional one-liner description; surfaced in `tokens list-variants` output. */
922
+ description: z.ZodOptional<z.ZodString>;
786
923
  /**
787
- * Parent pack name. Required for variants, must be omitted for `default`.
788
- * Currently only `"default"` is a valid parent.
924
+ * Files this variant advertises, paths relative to the tokens package root
925
+ * (e.g. `variants/opentrek/theme.css`). The validator walks these to
926
+ * confirm presence; the CLI consumes them at install time.
789
927
  */
790
- extends: z.ZodOptional<z.ZodString>;
791
- /** Optional one-liner; useful for `design list-variants` output. */
792
- description: z.ZodOptional<z.ZodString>;
793
- /** Soft cross-package links (biz-ui / templates with same variant name). */
928
+ files: z.ZodArray<z.ZodString, "many">;
929
+ /** Soft cross-package links (biz-ui / templates with the same variant name). */
794
930
  linked: z.ZodOptional<z.ZodObject<{
795
931
  'biz-ui': z.ZodOptional<z.ZodString>;
796
932
  templates: z.ZodOptional<z.ZodString>;
@@ -802,46 +938,42 @@ declare const DesignPackManifestSchema: z.ZodObject<{
802
938
  'biz-ui'?: string | undefined;
803
939
  }>>;
804
940
  }, "strip", z.ZodTypeAny, {
805
- schemaVersion: 1;
806
941
  displayName: string;
807
942
  version: string;
808
943
  name: string;
809
- $schema?: string | undefined;
944
+ files: string[];
810
945
  description?: string | undefined;
811
- extends?: string | undefined;
812
946
  linked?: {
813
947
  templates?: string | undefined;
814
948
  'biz-ui'?: string | undefined;
815
949
  } | undefined;
816
950
  }, {
817
- schemaVersion: 1;
818
951
  displayName: string;
819
952
  version: string;
820
953
  name: string;
821
- $schema?: string | undefined;
954
+ files: string[];
822
955
  description?: string | undefined;
823
- extends?: string | undefined;
824
956
  linked?: {
825
957
  templates?: string | undefined;
826
958
  'biz-ui'?: string | undefined;
827
959
  } | undefined;
828
960
  }>;
829
- type DesignPackManifest = z.infer<typeof DesignPackManifestSchema>;
830
- type DesignPackLinked = z.infer<typeof DesignPackLinkedSchema>;
961
+ type TokensVariantEntry = z.infer<typeof TokensVariantEntrySchema>;
962
+ type TokensPackLinked = z.infer<typeof TokensPackLinkedSchema>;
831
963
  /**
832
- * Top-level catalog of all packs in `@teamix-evo/design`.
964
+ * Top-level catalog of all variants in `@teamix-evo/tokens`.
833
965
  *
834
- * Lives at `packages/design/manifest.json`. Lists the default baseline + all
835
- * variants the package ships. The catalog is regenerable via
836
- * `pnpm --filter @teamix-evo/design validate` variant directories are the
837
- * source of truth.
966
+ * Lives at `packages/tokens/manifest.json`. Lists every variant the package
967
+ * ships. The catalog is hand-edited (or regenerable via
968
+ * `pnpm --filter @teamix-evo/tokens validate`); variant directories on disk
969
+ * are the source of truth for file content.
838
970
  */
839
- declare const DesignPackageManifestSchema: z.ZodObject<{
971
+ declare const TokensPackageManifestSchema: z.ZodObject<{
840
972
  $schema: z.ZodOptional<z.ZodString>;
841
973
  schemaVersion: z.ZodLiteral<1>;
842
- /** Always `"design"` for this package. */
843
- package: z.ZodLiteral<"design">;
844
- /** Semver of the entire design package. */
974
+ /** Always `"tokens"` disambiguates from other teamix-evo package manifests. */
975
+ package: z.ZodLiteral<"tokens">;
976
+ /** Semver of the entire tokens package. */
845
977
  version: z.ZodString;
846
978
  /** Engine compatibility. */
847
979
  engines: z.ZodObject<{
@@ -851,85 +983,25 @@ declare const DesignPackageManifestSchema: z.ZodObject<{
851
983
  }, {
852
984
  'teamix-evo': string;
853
985
  }>;
854
- /** The default baseline pack — always present. */
855
- default: z.ZodObject<{
856
- $schema: z.ZodOptional<z.ZodString>;
857
- schemaVersion: z.ZodLiteral<1>;
858
- /**
859
- * Pack identifier.
860
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
861
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
862
- */
863
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
864
- /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
865
- displayName: z.ZodString;
866
- /** Semver. */
867
- version: z.ZodString;
868
- /**
869
- * Parent pack name. Required for variants, must be omitted for `default`.
870
- * Currently only `"default"` is a valid parent.
871
- */
872
- extends: z.ZodOptional<z.ZodString>;
873
- /** Optional one-liner; useful for `design list-variants` output. */
874
- description: z.ZodOptional<z.ZodString>;
875
- /** Soft cross-package links (biz-ui / templates with same variant name). */
876
- linked: z.ZodOptional<z.ZodObject<{
877
- 'biz-ui': z.ZodOptional<z.ZodString>;
878
- templates: z.ZodOptional<z.ZodString>;
879
- }, "strip", z.ZodTypeAny, {
880
- templates?: string | undefined;
881
- 'biz-ui'?: string | undefined;
882
- }, {
883
- templates?: string | undefined;
884
- 'biz-ui'?: string | undefined;
885
- }>>;
886
- }, "strip", z.ZodTypeAny, {
887
- schemaVersion: 1;
888
- displayName: string;
889
- version: string;
890
- name: string;
891
- $schema?: string | undefined;
892
- description?: string | undefined;
893
- extends?: string | undefined;
894
- linked?: {
895
- templates?: string | undefined;
896
- 'biz-ui'?: string | undefined;
897
- } | undefined;
898
- }, {
899
- schemaVersion: 1;
900
- displayName: string;
901
- version: string;
902
- name: string;
903
- $schema?: string | undefined;
904
- description?: string | undefined;
905
- extends?: string | undefined;
906
- linked?: {
907
- templates?: string | undefined;
908
- 'biz-ui'?: string | undefined;
909
- } | undefined;
910
- }>;
911
- /** All shipped variants (excluding `_template/`). */
986
+ /** Optional package-level description. */
987
+ description: z.ZodOptional<z.ZodString>;
988
+ /** All shipped variants (excluding scaffold dirs that begin with `_`). */
912
989
  variants: z.ZodArray<z.ZodObject<{
913
- $schema: z.ZodOptional<z.ZodString>;
914
- schemaVersion: z.ZodLiteral<1>;
915
- /**
916
- * Pack identifier.
917
- * - `"default"` for the built-in baseline (only valid name when `extends` is absent)
918
- * - lowercase kebab-case for variants (`opentrek`, `uni-manager`, `acme-erp`, `_template`)
919
- */
920
- name: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodLiteral<"_template">]>, z.ZodLiteral<"default">]>;
990
+ /** Variant id — lowercase kebab-case. */
991
+ name: z.ZodString;
921
992
  /** Human-readable display name (e.g. "OpenTrek" for variant id "opentrek"). */
922
993
  displayName: z.ZodString;
923
- /** Semver. */
994
+ /** Variant version — semver. May trail the package version when only a subset of variants change. */
924
995
  version: z.ZodString;
996
+ /** Optional one-liner description; surfaced in `tokens list-variants` output. */
997
+ description: z.ZodOptional<z.ZodString>;
925
998
  /**
926
- * Parent pack name. Required for variants, must be omitted for `default`.
927
- * Currently only `"default"` is a valid parent.
999
+ * Files this variant advertises, paths relative to the tokens package root
1000
+ * (e.g. `variants/opentrek/theme.css`). The validator walks these to
1001
+ * confirm presence; the CLI consumes them at install time.
928
1002
  */
929
- extends: z.ZodOptional<z.ZodString>;
930
- /** Optional one-liner; useful for `design list-variants` output. */
931
- description: z.ZodOptional<z.ZodString>;
932
- /** Soft cross-package links (biz-ui / templates with same variant name). */
1003
+ files: z.ZodArray<z.ZodString, "many">;
1004
+ /** Soft cross-package links (biz-ui / templates with the same variant name). */
933
1005
  linked: z.ZodOptional<z.ZodObject<{
934
1006
  'biz-ui': z.ZodOptional<z.ZodString>;
935
1007
  templates: z.ZodOptional<z.ZodString>;
@@ -941,121 +1013,85 @@ declare const DesignPackageManifestSchema: z.ZodObject<{
941
1013
  'biz-ui'?: string | undefined;
942
1014
  }>>;
943
1015
  }, "strip", z.ZodTypeAny, {
944
- schemaVersion: 1;
945
1016
  displayName: string;
946
1017
  version: string;
947
1018
  name: string;
948
- $schema?: string | undefined;
1019
+ files: string[];
949
1020
  description?: string | undefined;
950
- extends?: string | undefined;
951
1021
  linked?: {
952
1022
  templates?: string | undefined;
953
1023
  'biz-ui'?: string | undefined;
954
1024
  } | undefined;
955
1025
  }, {
956
- schemaVersion: 1;
957
1026
  displayName: string;
958
1027
  version: string;
959
1028
  name: string;
960
- $schema?: string | undefined;
1029
+ files: string[];
961
1030
  description?: string | undefined;
962
- extends?: string | undefined;
963
1031
  linked?: {
964
1032
  templates?: string | undefined;
965
1033
  'biz-ui'?: string | undefined;
966
1034
  } | undefined;
967
1035
  }>, "many">;
1036
+ /**
1037
+ * Reserved for future shared assets that span variants (e.g. browser
1038
+ * quirks resets co-shipped at the package root). Empty array today.
1039
+ */
1040
+ shared: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
1041
  }, "strip", z.ZodTypeAny, {
969
1042
  schemaVersion: 1;
970
- package: "design";
1043
+ package: "tokens";
971
1044
  version: string;
972
1045
  engines: {
973
1046
  'teamix-evo': string;
974
1047
  };
975
- default: {
976
- schemaVersion: 1;
977
- displayName: string;
978
- version: string;
979
- name: string;
980
- $schema?: string | undefined;
981
- description?: string | undefined;
982
- extends?: string | undefined;
983
- linked?: {
984
- templates?: string | undefined;
985
- 'biz-ui'?: string | undefined;
986
- } | undefined;
987
- };
988
1048
  variants: {
989
- schemaVersion: 1;
990
1049
  displayName: string;
991
1050
  version: string;
992
1051
  name: string;
993
- $schema?: string | undefined;
1052
+ files: string[];
994
1053
  description?: string | undefined;
995
- extends?: string | undefined;
996
1054
  linked?: {
997
1055
  templates?: string | undefined;
998
1056
  'biz-ui'?: string | undefined;
999
1057
  } | undefined;
1000
1058
  }[];
1001
1059
  $schema?: string | undefined;
1060
+ description?: string | undefined;
1061
+ shared?: string[] | undefined;
1002
1062
  }, {
1003
1063
  schemaVersion: 1;
1004
- package: "design";
1064
+ package: "tokens";
1005
1065
  version: string;
1006
1066
  engines: {
1007
1067
  'teamix-evo': string;
1008
1068
  };
1009
- default: {
1010
- schemaVersion: 1;
1011
- displayName: string;
1012
- version: string;
1013
- name: string;
1014
- $schema?: string | undefined;
1015
- description?: string | undefined;
1016
- extends?: string | undefined;
1017
- linked?: {
1018
- templates?: string | undefined;
1019
- 'biz-ui'?: string | undefined;
1020
- } | undefined;
1021
- };
1022
1069
  variants: {
1023
- schemaVersion: 1;
1024
1070
  displayName: string;
1025
1071
  version: string;
1026
1072
  name: string;
1027
- $schema?: string | undefined;
1073
+ files: string[];
1028
1074
  description?: string | undefined;
1029
- extends?: string | undefined;
1030
1075
  linked?: {
1031
1076
  templates?: string | undefined;
1032
1077
  'biz-ui'?: string | undefined;
1033
1078
  } | undefined;
1034
1079
  }[];
1035
1080
  $schema?: string | undefined;
1081
+ description?: string | undefined;
1082
+ shared?: string[] | undefined;
1036
1083
  }>;
1037
- type DesignPackageManifest = z.infer<typeof DesignPackageManifestSchema>;
1084
+ type TokensPackageManifest = z.infer<typeof TokensPackageManifestSchema>;
1038
1085
  /**
1039
1086
  * Consumer-side lock file written to
1040
- * `.teamix-evo/design/pack.lock.json` after `design init`.
1087
+ * `.teamix-evo/tokens-lock.json` after `tokens init`.
1041
1088
  *
1042
- * Records which default + variant version was installed so future
1043
- * `design upgrade` / `doctor` / AI tooling can reason about install state
1044
- * without re-walking the source.
1089
+ * Records which tokens variant + version was installed. There is no longer a
1090
+ * `default` field every variant is self-contained per ADR 0020.
1045
1091
  */
1046
- declare const DesignPackLockSchema: z.ZodObject<{
1092
+ declare const TokensPackLockSchema: z.ZodObject<{
1047
1093
  $schema: z.ZodOptional<z.ZodString>;
1048
1094
  schemaVersion: z.ZodLiteral<1>;
1049
- default: z.ZodObject<{
1050
- version: z.ZodString;
1051
- from: z.ZodString;
1052
- }, "strip", z.ZodTypeAny, {
1053
- version: string;
1054
- from: string;
1055
- }, {
1056
- version: string;
1057
- from: string;
1058
- }>;
1059
1095
  variant: z.ZodObject<{
1060
1096
  name: z.ZodString;
1061
1097
  displayName: z.ZodString;
@@ -1072,6 +1108,8 @@ declare const DesignPackLockSchema: z.ZodObject<{
1072
1108
  name: string;
1073
1109
  from: string;
1074
1110
  }>;
1111
+ /** Tokens package version — useful when variant version trails the package. */
1112
+ packageVersion: z.ZodString;
1075
1113
  linked: z.ZodOptional<z.ZodObject<{
1076
1114
  'biz-ui': z.ZodOptional<z.ZodString>;
1077
1115
  templates: z.ZodOptional<z.ZodString>;
@@ -1091,10 +1129,7 @@ declare const DesignPackLockSchema: z.ZodObject<{
1091
1129
  name: string;
1092
1130
  from: string;
1093
1131
  };
1094
- default: {
1095
- version: string;
1096
- from: string;
1097
- };
1132
+ packageVersion: string;
1098
1133
  installedAt: string;
1099
1134
  $schema?: string | undefined;
1100
1135
  linked?: {
@@ -1109,10 +1144,7 @@ declare const DesignPackLockSchema: z.ZodObject<{
1109
1144
  name: string;
1110
1145
  from: string;
1111
1146
  };
1112
- default: {
1113
- version: string;
1114
- from: string;
1115
- };
1147
+ packageVersion: string;
1116
1148
  installedAt: string;
1117
1149
  $schema?: string | undefined;
1118
1150
  linked?: {
@@ -1120,14 +1152,14 @@ declare const DesignPackLockSchema: z.ZodObject<{
1120
1152
  'biz-ui'?: string | undefined;
1121
1153
  } | undefined;
1122
1154
  }>;
1123
- type DesignPackLock = z.infer<typeof DesignPackLockSchema>;
1155
+ type TokensPackLock = z.infer<typeof TokensPackLockSchema>;
1124
1156
 
1125
1157
  /**
1126
1158
  * Schemas for variant-aware UI packages — `@teamix-evo/biz-ui` and
1127
1159
  * `@teamix-evo/templates`.
1128
1160
  *
1129
1161
  * Per [ADR 0014](../../../../docs/adr/0014-ui-biz-ui-templates-tier.md), these
1130
- * two packages mirror `@teamix-evo/design`'s variant model: each ships a
1162
+ * two packages mirror `@teamix-evo/tokens`'s variant model: each ships a
1131
1163
  * top-level catalog (variants list) plus a per-variant manifest (entry list).
1132
1164
  *
1133
1165
  * packages/biz-ui/
@@ -1468,7 +1500,7 @@ declare const UiAliasesSchema: z.ZodObject<{
1468
1500
  * Package entry within a project config.
1469
1501
  *
1470
1502
  * Some fields only apply to specific packages:
1471
- * - `tailwind` — design only
1503
+ * - `tailwind` — tokens only
1472
1504
  * - `ides` / `scope` — skills only
1473
1505
  * - `aliases` / `iconLibrary` / `tsx` / `rsc` — ui only
1474
1506
  *
@@ -1729,7 +1761,7 @@ declare const InstalledResourceSchema: z.ZodObject<{
1729
1761
  * An installed package entry — tracks a single package installation.
1730
1762
  */
1731
1763
  declare const InstalledPackageSchema: z.ZodObject<{
1732
- /** Full package name (e.g. "@teamix-evo/design") */
1764
+ /** Full package name (e.g. "@teamix-evo/tokens") */
1733
1765
  package: z.ZodString;
1734
1766
  /** Variant identifier (use "_flat" for non-variant packages such as skills) */
1735
1767
  variant: z.ZodString;
@@ -1801,7 +1833,7 @@ declare const InstalledManifestSchema: z.ZodObject<{
1801
1833
  schemaVersion: z.ZodLiteral<1>;
1802
1834
  /** List of installed packages */
1803
1835
  installed: z.ZodArray<z.ZodObject<{
1804
- /** Full package name (e.g. "@teamix-evo/design") */
1836
+ /** Full package name (e.g. "@teamix-evo/tokens") */
1805
1837
  package: z.ZodString;
1806
1838
  /** Variant identifier (use "_flat" for non-variant packages such as skills) */
1807
1839
  variant: z.ZodString;
@@ -2096,54 +2128,15 @@ declare function loadSkillsPackageManifest(packageDir: string): Promise<SkillsPa
2096
2128
  declare function loadUiPackageManifest(packageDir: string): Promise<UiPackageManifest>;
2097
2129
 
2098
2130
  /**
2099
- * Read & validate a single pack's `pack.json`.
2131
+ * Read & validate the top-level `packages/tokens/manifest.json` catalog.
2100
2132
  * Errors are wrapped with the file path for easy diagnosis (P8).
2101
2133
  */
2102
- declare function loadDesignPack(packDir: string): Promise<DesignPackManifest>;
2134
+ declare function loadTokensPackageManifest(packageDir: string): Promise<TokensPackageManifest>;
2103
2135
  /**
2104
- * Read & validate the top-level `packages/design/manifest.json` catalog.
2105
- */
2106
- declare function loadDesignPackageManifest(packageDir: string): Promise<DesignPackageManifest>;
2107
- /**
2108
- * Walk all files under a pack root and return their paths **relative to
2109
- * `packDir`**, excluding pack metadata files (`pack.json`).
2110
- *
2111
- * Returns a sorted list (deterministic for tests + diff-friendly).
2112
- */
2113
- declare function walkPackTree(packDir: string): Promise<string[]>;
2114
- /**
2115
- * Result of merging default + variant: each entry is a file the CLI should
2116
- * install, paired with which on-disk file to read.
2117
- */
2118
- interface MergedFileEntry {
2119
- /** Path relative to the pack root (e.g. `philosophy/principles.md`). */
2120
- relPath: string;
2121
- /** Absolute filesystem path the CLI should read. */
2122
- sourcePath: string;
2123
- /** Which pack provided this file (for diagnostics + UI listing). */
2124
- origin: 'default' | 'variant';
2125
- }
2126
- interface MergeResult {
2127
- files: MergedFileEntry[];
2128
- /** Files where variant overrode default. Useful for diagnostics. */
2129
- overrides: string[];
2130
- /** Files only in variant (no default counterpart). */
2131
- variantAdds: string[];
2132
- /** Files only in default (variant didn't override). */
2133
- defaultPassThrough: string[];
2134
- }
2135
- /**
2136
- * File-level merge per ADR 0010 §4.
2137
- *
2138
- * For each file path P:
2139
- * - If `<variantDir>/P` exists: use the variant's file (override).
2140
- * - Else: use the default's file (pass-through).
2141
- * Plus: every file in variant tree NOT present in default tree is appended
2142
- * (variant-add).
2143
- *
2144
- * No content parsing happens here — files are read as-is by the caller.
2136
+ * Lookup helper: find one variant entry in a catalog by name.
2137
+ * Returns `undefined` when the variant is not advertised.
2145
2138
  */
2146
- declare function mergeDefaultAndVariant(defaultDir: string, variantDir: string): Promise<MergeResult>;
2139
+ declare function getVariantEntry(catalog: TokensPackageManifest, variantName: string): TokensVariantEntry | undefined;
2147
2140
 
2148
2141
  declare function loadVariantUiPackageCatalog(packageDir: string): Promise<VariantUiPackageCatalog>;
2149
2142
  declare function loadVariantUiPackageManifest(variantDir: string): Promise<VariantUiPackageManifest>;
@@ -2252,4 +2245,4 @@ interface UpdateActionOptions {
2252
2245
  */
2253
2246
  declare function getUpdateAction(strategy: UpdateStrategy, options: UpdateActionOptions): UpdateAction;
2254
2247
 
2255
- export { type DesignPackLinked, DesignPackLinkedSchema, type DesignPackLock, DesignPackLockSchema, type DesignPackManifest, DesignPackManifestSchema, type DesignPackageManifest, DesignPackageManifestSchema, type InstalledManifest, InstalledManifestSchema, type InstalledPackage, InstalledPackageSchema, type InstalledResource, InstalledResourceSchema, type ManagedRegion, type MergeResult, type MergedFileEntry, type PackageEntry, PackageEntrySchema, type ProjectConfig, ProjectConfigSchema, type Resource, ResourceSchema, type ResourceType, ResourceTypeSchema, type Result, type SkillEntry, SkillEntrySchema, type SkillIde, SkillIdeSchema, type SkillScope, SkillScopeSchema, type SkillsLock, type SkillsLockEntry, SkillsLockEntrySchema, SkillsLockSchema, type SkillsPackageManifest, SkillsPackageManifestSchema, type TailwindVersion, TailwindVersionSchema, type UiAlias, UiAliasSchema, type UiAliases, UiAliasesSchema, type UiEntry, type UiEntryFile, UiEntryFileSchema, UiEntrySchema, type UiEntryType, UiEntryTypeSchema, type UiPackageManifest, UiPackageManifestSchema, type UpdateAction, type UpdateActionOptions, type UpdateStrategy, UpdateStrategySchema, type VariantManifest, VariantManifestSchema, type VariantUiPackageCatalog, VariantUiPackageCatalogSchema, type VariantUiPackageManifest, VariantUiPackageManifestSchema, type VariantUiPackageName, VariantUiPackageNameSchema, getUpdateAction, hasManagedRegion, loadDesignPack, loadDesignPackageManifest, loadSkillsPackageManifest, loadUiPackageManifest, loadVariantManifest, loadVariantUiPackageCatalog, loadVariantUiPackageManifest, mergeDefaultAndVariant, parseManagedRegions, replaceManagedRegion, resolveUiEntryOrder, shouldUpdate, validateConfig, validateInstalled, validateManifest, validateSkillsLock, validateSkillsPackage, validateUiDependencyGraph, validateUiPackage, walkPackTree };
2248
+ export { type InstalledManifest, InstalledManifestSchema, type InstalledPackage, InstalledPackageSchema, type InstalledResource, InstalledResourceSchema, type ManagedRegion, type PackageEntry, PackageEntrySchema, type ProjectConfig, ProjectConfigSchema, type Resource, ResourceSchema, type ResourceType, ResourceTypeSchema, type Result, type SkillEntry, SkillEntrySchema, type SkillIde, SkillIdeSchema, type SkillScope, SkillScopeSchema, type SkillsLock, type SkillsLockEntry, SkillsLockEntrySchema, SkillsLockSchema, type SkillsPackageManifest, SkillsPackageManifestSchema, type TailwindVersion, TailwindVersionSchema, type TokensPackLinked, TokensPackLinkedSchema, type TokensPackLock, TokensPackLockSchema, type TokensPackageManifest, TokensPackageManifestSchema, type TokensVariantEntry, TokensVariantEntrySchema, type UiAlias, UiAliasSchema, type UiAliases, UiAliasesSchema, type UiEntry, type UiEntryFile, UiEntryFileSchema, UiEntrySchema, type UiEntryType, UiEntryTypeSchema, type UiPackageManifest, UiPackageManifestSchema, type UpdateAction, type UpdateActionOptions, type UpdateStrategy, UpdateStrategySchema, type VariantManifest, VariantManifestSchema, type VariantUiPackageCatalog, VariantUiPackageCatalogSchema, type VariantUiPackageManifest, VariantUiPackageManifestSchema, type VariantUiPackageName, VariantUiPackageNameSchema, getUpdateAction, getVariantEntry, hasManagedRegion, loadSkillsPackageManifest, loadTokensPackageManifest, loadUiPackageManifest, loadVariantManifest, loadVariantUiPackageCatalog, loadVariantUiPackageManifest, parseManagedRegions, replaceManagedRegion, resolveUiEntryOrder, shouldUpdate, validateConfig, validateInstalled, validateManifest, validateSkillsLock, validateSkillsPackage, validateUiDependencyGraph, validateUiPackage };