@teamix-evo/registry 0.6.0 → 0.8.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
@@ -942,6 +942,38 @@ declare const TokensPackLinkedSchema: z.ZodObject<{
942
942
  templates?: string | undefined;
943
943
  'biz-ui'?: string | undefined;
944
944
  }>;
945
+ /**
946
+ * One entry in a variant's `renames` log — declares that a token was
947
+ * renamed at the given upstream variant version. Consumed by
948
+ * `teamix-evo update` (writes `.teamix-evo/.upgrade-hints/tokens-<ts>.json`)
949
+ * and the future `teamix-evo-upgrade` skill (suggests codemods, never
950
+ * auto-rewrites — frozen boundary, [ADR 0019](../../../../docs/adr/0019-project-upgrade-flow.md) §D4).
951
+ *
952
+ * Semantics: as of `sinceVersion`, every CSS custom property reference of
953
+ * `from` should be migrated to `to`. Older snapshots may still mention
954
+ * `from` legitimately.
955
+ */
956
+ declare const TokenRenameEntrySchema: z.ZodObject<{
957
+ /** Variant version at which the rename took effect (semver). */
958
+ sinceVersion: z.ZodString;
959
+ /** Old token name (with or without leading `--`; both forms accepted). */
960
+ from: z.ZodString;
961
+ /** New token name. */
962
+ to: z.ZodString;
963
+ /** Optional one-liner rationale surfaced in the upgrade-hints file. */
964
+ description: z.ZodOptional<z.ZodString>;
965
+ }, "strip", z.ZodTypeAny, {
966
+ sinceVersion: string;
967
+ from: string;
968
+ to: string;
969
+ description?: string | undefined;
970
+ }, {
971
+ sinceVersion: string;
972
+ from: string;
973
+ to: string;
974
+ description?: string | undefined;
975
+ }>;
976
+ type TokenRenameEntry = z.infer<typeof TokenRenameEntrySchema>;
945
977
  /**
946
978
  * One variant entry in the top-level catalog.
947
979
  */
@@ -971,6 +1003,30 @@ declare const TokensVariantEntrySchema: z.ZodObject<{
971
1003
  templates?: string | undefined;
972
1004
  'biz-ui'?: string | undefined;
973
1005
  }>>;
1006
+ /**
1007
+ * Token rename log accumulated across this variant's version history.
1008
+ * Empty / absent when the variant has never renamed a token.
1009
+ */
1010
+ renames: z.ZodOptional<z.ZodArray<z.ZodObject<{
1011
+ /** Variant version at which the rename took effect (semver). */
1012
+ sinceVersion: z.ZodString;
1013
+ /** Old token name (with or without leading `--`; both forms accepted). */
1014
+ from: z.ZodString;
1015
+ /** New token name. */
1016
+ to: z.ZodString;
1017
+ /** Optional one-liner rationale surfaced in the upgrade-hints file. */
1018
+ description: z.ZodOptional<z.ZodString>;
1019
+ }, "strip", z.ZodTypeAny, {
1020
+ sinceVersion: string;
1021
+ from: string;
1022
+ to: string;
1023
+ description?: string | undefined;
1024
+ }, {
1025
+ sinceVersion: string;
1026
+ from: string;
1027
+ to: string;
1028
+ description?: string | undefined;
1029
+ }>, "many">>;
974
1030
  }, "strip", z.ZodTypeAny, {
975
1031
  displayName: string;
976
1032
  version: string;
@@ -981,6 +1037,12 @@ declare const TokensVariantEntrySchema: z.ZodObject<{
981
1037
  templates?: string | undefined;
982
1038
  'biz-ui'?: string | undefined;
983
1039
  } | undefined;
1040
+ renames?: {
1041
+ sinceVersion: string;
1042
+ from: string;
1043
+ to: string;
1044
+ description?: string | undefined;
1045
+ }[] | undefined;
984
1046
  }, {
985
1047
  displayName: string;
986
1048
  version: string;
@@ -991,6 +1053,12 @@ declare const TokensVariantEntrySchema: z.ZodObject<{
991
1053
  templates?: string | undefined;
992
1054
  'biz-ui'?: string | undefined;
993
1055
  } | undefined;
1056
+ renames?: {
1057
+ sinceVersion: string;
1058
+ from: string;
1059
+ to: string;
1060
+ description?: string | undefined;
1061
+ }[] | undefined;
994
1062
  }>;
995
1063
  type TokensVariantEntry = z.infer<typeof TokensVariantEntrySchema>;
996
1064
  type TokensPackLinked = z.infer<typeof TokensPackLinkedSchema>;
@@ -1046,6 +1114,30 @@ declare const TokensPackageManifestSchema: z.ZodObject<{
1046
1114
  templates?: string | undefined;
1047
1115
  'biz-ui'?: string | undefined;
1048
1116
  }>>;
1117
+ /**
1118
+ * Token rename log accumulated across this variant's version history.
1119
+ * Empty / absent when the variant has never renamed a token.
1120
+ */
1121
+ renames: z.ZodOptional<z.ZodArray<z.ZodObject<{
1122
+ /** Variant version at which the rename took effect (semver). */
1123
+ sinceVersion: z.ZodString;
1124
+ /** Old token name (with or without leading `--`; both forms accepted). */
1125
+ from: z.ZodString;
1126
+ /** New token name. */
1127
+ to: z.ZodString;
1128
+ /** Optional one-liner rationale surfaced in the upgrade-hints file. */
1129
+ description: z.ZodOptional<z.ZodString>;
1130
+ }, "strip", z.ZodTypeAny, {
1131
+ sinceVersion: string;
1132
+ from: string;
1133
+ to: string;
1134
+ description?: string | undefined;
1135
+ }, {
1136
+ sinceVersion: string;
1137
+ from: string;
1138
+ to: string;
1139
+ description?: string | undefined;
1140
+ }>, "many">>;
1049
1141
  }, "strip", z.ZodTypeAny, {
1050
1142
  displayName: string;
1051
1143
  version: string;
@@ -1056,6 +1148,12 @@ declare const TokensPackageManifestSchema: z.ZodObject<{
1056
1148
  templates?: string | undefined;
1057
1149
  'biz-ui'?: string | undefined;
1058
1150
  } | undefined;
1151
+ renames?: {
1152
+ sinceVersion: string;
1153
+ from: string;
1154
+ to: string;
1155
+ description?: string | undefined;
1156
+ }[] | undefined;
1059
1157
  }, {
1060
1158
  displayName: string;
1061
1159
  version: string;
@@ -1066,6 +1164,12 @@ declare const TokensPackageManifestSchema: z.ZodObject<{
1066
1164
  templates?: string | undefined;
1067
1165
  'biz-ui'?: string | undefined;
1068
1166
  } | undefined;
1167
+ renames?: {
1168
+ sinceVersion: string;
1169
+ from: string;
1170
+ to: string;
1171
+ description?: string | undefined;
1172
+ }[] | undefined;
1069
1173
  }>, "many">;
1070
1174
  /**
1071
1175
  * Reserved for future shared assets that span variants (e.g. browser
@@ -1089,6 +1193,12 @@ declare const TokensPackageManifestSchema: z.ZodObject<{
1089
1193
  templates?: string | undefined;
1090
1194
  'biz-ui'?: string | undefined;
1091
1195
  } | undefined;
1196
+ renames?: {
1197
+ sinceVersion: string;
1198
+ from: string;
1199
+ to: string;
1200
+ description?: string | undefined;
1201
+ }[] | undefined;
1092
1202
  }[];
1093
1203
  $schema?: string | undefined;
1094
1204
  description?: string | undefined;
@@ -1110,6 +1220,12 @@ declare const TokensPackageManifestSchema: z.ZodObject<{
1110
1220
  templates?: string | undefined;
1111
1221
  'biz-ui'?: string | undefined;
1112
1222
  } | undefined;
1223
+ renames?: {
1224
+ sinceVersion: string;
1225
+ from: string;
1226
+ to: string;
1227
+ description?: string | undefined;
1228
+ }[] | undefined;
1113
1229
  }[];
1114
1230
  $schema?: string | undefined;
1115
1231
  description?: string | undefined;
@@ -1622,9 +1738,59 @@ declare const PackageEntrySchema: z.ZodObject<{
1622
1738
  rsc?: boolean | undefined;
1623
1739
  }>;
1624
1740
  /**
1625
- * Project configuration schemateamix-evo config.json at project root.
1741
+ * Token rename recordcaptures a single variant-switch's token mapping so
1742
+ * downstream codemod skills can rewrite consumer code (ADR 0019 §recovery).
1743
+ */
1744
+ declare const TokenRenameRecordSchema: z.ZodObject<{
1745
+ /** ISO-8601 UTC timestamp at which the variant switch was performed. */
1746
+ ts: z.ZodString;
1747
+ /** Variant the project was on before the switch. */
1748
+ fromVariant: z.ZodString;
1749
+ /** Variant the project switched to. */
1750
+ toVariant: z.ZodString;
1751
+ /**
1752
+ * Token rename mapping — old token name → new token name.
1753
+ * Empty object is legal (e.g. switch with zero rename).
1754
+ */
1755
+ renames: z.ZodRecord<z.ZodString, z.ZodString>;
1756
+ }, "strip", z.ZodTypeAny, {
1757
+ renames: Record<string, string>;
1758
+ ts: string;
1759
+ fromVariant: string;
1760
+ toVariant: string;
1761
+ }, {
1762
+ renames: Record<string, string>;
1763
+ ts: string;
1764
+ fromVariant: string;
1765
+ toVariant: string;
1766
+ }>;
1767
+ /**
1768
+ * Last successful update record per package — set by `teamix-evo update`
1769
+ * after a non-critical / critical step succeeds. Used by `restore` to point
1770
+ * users at the right snapshot, and by `doctor` to flag staleness.
1771
+ */
1772
+ declare const LastUpdateRecordSchema: z.ZodObject<{
1773
+ /** ISO-8601 UTC timestamp of the last successful update. */
1774
+ ts: z.ZodString;
1775
+ /** Version the package was on before this update. */
1776
+ fromVersion: z.ZodString;
1777
+ /** Version the package was on after this update. */
1778
+ toVersion: z.ZodString;
1779
+ }, "strip", z.ZodTypeAny, {
1780
+ ts: string;
1781
+ fromVersion: string;
1782
+ toVersion: string;
1783
+ }, {
1784
+ ts: string;
1785
+ fromVersion: string;
1786
+ toVersion: string;
1787
+ }>;
1788
+ /**
1789
+ * Project configuration schema v1 — the original shape shipped through v0.x.
1790
+ * Retained so existing `config.json` files keep validating; the top-level
1791
+ * `ProjectConfigSchema` transforms v1 into v2 transparently for callers.
1626
1792
  */
1627
- declare const ProjectConfigSchema: z.ZodObject<{
1793
+ declare const ProjectConfigV1Schema: z.ZodObject<{
1628
1794
  $schema: z.ZodOptional<z.ZodString>;
1629
1795
  schemaVersion: z.ZodLiteral<1>;
1630
1796
  /** IDE identifier */
@@ -1755,116 +1921,751 @@ declare const ProjectConfigSchema: z.ZodObject<{
1755
1921
  }>;
1756
1922
  $schema?: string | undefined;
1757
1923
  }>;
1758
-
1759
1924
  /**
1760
- * An installed resource entrytracks individual resource installation state.
1925
+ * Project configuration schema v2adds failure-recovery / variant-switch
1926
+ * tracking fields per [ADR 0019](../../../../docs/adr/0019-project-upgrade-flow.md):
1761
1927
  *
1762
- * For type="skill" resources, the same logical skill may produce multiple installed
1763
- * entries (one per ide × scope combination); the optional `ide`/`scope` fields
1764
- * disambiguate them.
1765
- */
1766
- declare const InstalledResourceSchema: z.ZodObject<{
1767
- /** Resource identifier matching the variant manifest */
1768
- id: z.ZodString;
1769
- /** Target path where the resource was installed (absolute or project-relative) */
1770
- target: z.ZodString;
1771
- /** Content hash for change detection (e.g. "sha256:...") */
1772
- hash: z.ZodString;
1773
- /** Update strategy that was applied */
1774
- strategy: z.ZodEnum<["frozen", "regenerable", "managed"]>;
1775
- /** IDE this resource was installed for (skill resources only) */
1776
- ide: z.ZodOptional<z.ZodEnum<["qoder", "claude"]>>;
1777
- /** Install scope (skill resources only) */
1778
- scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
1779
- }, "strip", z.ZodTypeAny, {
1780
- id: string;
1781
- target: string;
1782
- hash: string;
1783
- strategy: "frozen" | "regenerable" | "managed";
1784
- scope?: "project" | "global" | undefined;
1785
- ide?: "qoder" | "claude" | undefined;
1786
- }, {
1787
- id: string;
1788
- target: string;
1789
- hash: string;
1790
- strategy: "frozen" | "regenerable" | "managed";
1791
- scope?: "project" | "global" | undefined;
1792
- ide?: "qoder" | "claude" | undefined;
1793
- }>;
1794
- /**
1795
- * An installed package entry — tracks a single package installation.
1928
+ * - `priorVariant` — variant in effect before the most recent switch.
1929
+ * - `lastUpdate` — per-package successful update record.
1930
+ * - `tokenRenameHistory` — accumulated rename log across switches.
1931
+ *
1932
+ * All new fields are optional so a freshly-migrated v1 config (no recovery
1933
+ * history yet) is a legal v2 document.
1796
1934
  */
1797
- declare const InstalledPackageSchema: z.ZodObject<{
1798
- /** Full package name (e.g. "@teamix-evo/tokens") */
1799
- package: z.ZodString;
1800
- /** Variant identifier (use "_flat" for non-variant packages such as skills) */
1801
- variant: z.ZodString;
1802
- /** Installed version */
1803
- version: z.ZodString;
1804
- /** ISO 8601 timestamp of installation */
1805
- installedAt: z.ZodString;
1806
- /** List of installed resources */
1807
- resources: z.ZodArray<z.ZodObject<{
1808
- /** Resource identifier matching the variant manifest */
1809
- id: z.ZodString;
1810
- /** Target path where the resource was installed (absolute or project-relative) */
1811
- target: z.ZodString;
1812
- /** Content hash for change detection (e.g. "sha256:...") */
1813
- hash: z.ZodString;
1814
- /** Update strategy that was applied */
1815
- strategy: z.ZodEnum<["frozen", "regenerable", "managed"]>;
1816
- /** IDE this resource was installed for (skill resources only) */
1817
- ide: z.ZodOptional<z.ZodEnum<["qoder", "claude"]>>;
1818
- /** Install scope (skill resources only) */
1935
+ declare const ProjectConfigV2Schema: z.ZodObject<{
1936
+ $schema: z.ZodOptional<z.ZodString>;
1937
+ schemaVersion: z.ZodLiteral<2>;
1938
+ /** IDE identifier */
1939
+ ide: z.ZodString;
1940
+ /** Installed packages keyed by package name */
1941
+ packages: z.ZodRecord<z.ZodString, z.ZodObject<{
1942
+ /** Variant identifier (e.g. "opentrek"; use "_flat" for skills/ui) */
1943
+ variant: z.ZodString;
1944
+ /** Semver version string */
1945
+ version: z.ZodString;
1946
+ /** Tailwind CSS version this project uses (only meaningful for design package). */
1947
+ tailwind: z.ZodOptional<z.ZodLiteral<"v4">>;
1948
+ /** IDEs this package was installed for (only meaningful for skills package). */
1949
+ ides: z.ZodOptional<z.ZodArray<z.ZodEnum<["qoder", "claude"]>, "many">>;
1950
+ /** Install scope (only meaningful for skills package). */
1819
1951
  scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
1952
+ /** Path aliases for ui entry installation (only meaningful for ui package). */
1953
+ aliases: z.ZodOptional<z.ZodObject<{
1954
+ components: z.ZodString;
1955
+ hooks: z.ZodString;
1956
+ utils: z.ZodString;
1957
+ lib: z.ZodString;
1958
+ /** Biz-ui components (variant-bound). Defaults to `src/components/business/`. */
1959
+ business: z.ZodDefault<z.ZodString>;
1960
+ /** Page templates (variant-bound). Defaults to `src/templates/`. */
1961
+ templates: z.ZodDefault<z.ZodString>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ components: string;
1964
+ hooks: string;
1965
+ utils: string;
1966
+ lib: string;
1967
+ business: string;
1968
+ templates: string;
1969
+ }, {
1970
+ components: string;
1971
+ hooks: string;
1972
+ utils: string;
1973
+ lib: string;
1974
+ business?: string | undefined;
1975
+ templates?: string | undefined;
1976
+ }>>;
1977
+ /**
1978
+ * Default icon library declared by the project (only meaningful for ui).
1979
+ * Declarative only — does NOT trigger code rewrites; ui entries hardcode imports.
1980
+ */
1981
+ iconLibrary: z.ZodOptional<z.ZodString>;
1982
+ /** Whether the project uses TSX (true) or JSX (false). ui-specific. */
1983
+ tsx: z.ZodOptional<z.ZodBoolean>;
1984
+ /** Whether to emit React Server Components markers (`"use client"`). ui-specific. */
1985
+ rsc: z.ZodOptional<z.ZodBoolean>;
1820
1986
  }, "strip", z.ZodTypeAny, {
1821
- id: string;
1822
- target: string;
1823
- hash: string;
1824
- strategy: "frozen" | "regenerable" | "managed";
1987
+ variant: string;
1988
+ version: string;
1989
+ ides?: ("qoder" | "claude")[] | undefined;
1825
1990
  scope?: "project" | "global" | undefined;
1826
- ide?: "qoder" | "claude" | undefined;
1991
+ tailwind?: "v4" | undefined;
1992
+ aliases?: {
1993
+ components: string;
1994
+ hooks: string;
1995
+ utils: string;
1996
+ lib: string;
1997
+ business: string;
1998
+ templates: string;
1999
+ } | undefined;
2000
+ iconLibrary?: string | undefined;
2001
+ tsx?: boolean | undefined;
2002
+ rsc?: boolean | undefined;
1827
2003
  }, {
1828
- id: string;
1829
- target: string;
1830
- hash: string;
1831
- strategy: "frozen" | "regenerable" | "managed";
2004
+ variant: string;
2005
+ version: string;
2006
+ ides?: ("qoder" | "claude")[] | undefined;
1832
2007
  scope?: "project" | "global" | undefined;
1833
- ide?: "qoder" | "claude" | undefined;
1834
- }>, "many">;
2008
+ tailwind?: "v4" | undefined;
2009
+ aliases?: {
2010
+ components: string;
2011
+ hooks: string;
2012
+ utils: string;
2013
+ lib: string;
2014
+ business?: string | undefined;
2015
+ templates?: string | undefined;
2016
+ } | undefined;
2017
+ iconLibrary?: string | undefined;
2018
+ tsx?: boolean | undefined;
2019
+ rsc?: boolean | undefined;
2020
+ }>>;
2021
+ /** Variant in effect before the most recent `variant switch`, if any. */
2022
+ priorVariant: z.ZodOptional<z.ZodString>;
2023
+ /** Last successful update record keyed by package name. */
2024
+ lastUpdate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2025
+ /** ISO-8601 UTC timestamp of the last successful update. */
2026
+ ts: z.ZodString;
2027
+ /** Version the package was on before this update. */
2028
+ fromVersion: z.ZodString;
2029
+ /** Version the package was on after this update. */
2030
+ toVersion: z.ZodString;
2031
+ }, "strip", z.ZodTypeAny, {
2032
+ ts: string;
2033
+ fromVersion: string;
2034
+ toVersion: string;
2035
+ }, {
2036
+ ts: string;
2037
+ fromVersion: string;
2038
+ toVersion: string;
2039
+ }>>>;
2040
+ /** Token rename log accumulated across variant switches (oldest → newest). */
2041
+ tokenRenameHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
2042
+ /** ISO-8601 UTC timestamp at which the variant switch was performed. */
2043
+ ts: z.ZodString;
2044
+ /** Variant the project was on before the switch. */
2045
+ fromVariant: z.ZodString;
2046
+ /** Variant the project switched to. */
2047
+ toVariant: z.ZodString;
2048
+ /**
2049
+ * Token rename mapping — old token name → new token name.
2050
+ * Empty object is legal (e.g. switch with zero rename).
2051
+ */
2052
+ renames: z.ZodRecord<z.ZodString, z.ZodString>;
2053
+ }, "strip", z.ZodTypeAny, {
2054
+ renames: Record<string, string>;
2055
+ ts: string;
2056
+ fromVariant: string;
2057
+ toVariant: string;
2058
+ }, {
2059
+ renames: Record<string, string>;
2060
+ ts: string;
2061
+ fromVariant: string;
2062
+ toVariant: string;
2063
+ }>, "many">>;
1835
2064
  }, "strip", z.ZodTypeAny, {
1836
- package: string;
1837
- variant: string;
1838
- version: string;
1839
- resources: {
1840
- id: string;
1841
- target: string;
1842
- hash: string;
1843
- strategy: "frozen" | "regenerable" | "managed";
2065
+ schemaVersion: 2;
2066
+ ide: string;
2067
+ packages: Record<string, {
2068
+ variant: string;
2069
+ version: string;
2070
+ ides?: ("qoder" | "claude")[] | undefined;
1844
2071
  scope?: "project" | "global" | undefined;
1845
- ide?: "qoder" | "claude" | undefined;
1846
- }[];
1847
- installedAt: string;
2072
+ tailwind?: "v4" | undefined;
2073
+ aliases?: {
2074
+ components: string;
2075
+ hooks: string;
2076
+ utils: string;
2077
+ lib: string;
2078
+ business: string;
2079
+ templates: string;
2080
+ } | undefined;
2081
+ iconLibrary?: string | undefined;
2082
+ tsx?: boolean | undefined;
2083
+ rsc?: boolean | undefined;
2084
+ }>;
2085
+ $schema?: string | undefined;
2086
+ priorVariant?: string | undefined;
2087
+ lastUpdate?: Record<string, {
2088
+ ts: string;
2089
+ fromVersion: string;
2090
+ toVersion: string;
2091
+ }> | undefined;
2092
+ tokenRenameHistory?: {
2093
+ renames: Record<string, string>;
2094
+ ts: string;
2095
+ fromVariant: string;
2096
+ toVariant: string;
2097
+ }[] | undefined;
1848
2098
  }, {
1849
- package: string;
1850
- variant: string;
1851
- version: string;
1852
- resources: {
1853
- id: string;
1854
- target: string;
1855
- hash: string;
1856
- strategy: "frozen" | "regenerable" | "managed";
2099
+ schemaVersion: 2;
2100
+ ide: string;
2101
+ packages: Record<string, {
2102
+ variant: string;
2103
+ version: string;
2104
+ ides?: ("qoder" | "claude")[] | undefined;
1857
2105
  scope?: "project" | "global" | undefined;
1858
- ide?: "qoder" | "claude" | undefined;
1859
- }[];
1860
- installedAt: string;
1861
- }>;
1862
- /**
1863
- * Installed manifest schema — tracks all installed packages in a project.
1864
- * Stored at `.teamix-evo/manifest.json`.
1865
- */
1866
- declare const InstalledManifestSchema: z.ZodObject<{
1867
- schemaVersion: z.ZodLiteral<1>;
2106
+ tailwind?: "v4" | undefined;
2107
+ aliases?: {
2108
+ components: string;
2109
+ hooks: string;
2110
+ utils: string;
2111
+ lib: string;
2112
+ business?: string | undefined;
2113
+ templates?: string | undefined;
2114
+ } | undefined;
2115
+ iconLibrary?: string | undefined;
2116
+ tsx?: boolean | undefined;
2117
+ rsc?: boolean | undefined;
2118
+ }>;
2119
+ $schema?: string | undefined;
2120
+ priorVariant?: string | undefined;
2121
+ lastUpdate?: Record<string, {
2122
+ ts: string;
2123
+ fromVersion: string;
2124
+ toVersion: string;
2125
+ }> | undefined;
2126
+ tokenRenameHistory?: {
2127
+ renames: Record<string, string>;
2128
+ ts: string;
2129
+ fromVariant: string;
2130
+ toVariant: string;
2131
+ }[] | undefined;
2132
+ }>;
2133
+ /**
2134
+ * Project configuration schema — teamix-evo config.json at project root.
2135
+ *
2136
+ * Accepts both v1 and v2 input documents and transforms v1 → v2 transparently,
2137
+ * so consumers always observe a v2-shaped object. Writers (`writeProjectConfig`)
2138
+ * therefore always emit `schemaVersion: 2`; legacy v1 files on disk are
2139
+ * silently upgraded the next time they're read and re-written.
2140
+ */
2141
+ declare const ProjectConfigSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"schemaVersion", [z.ZodObject<{
2142
+ $schema: z.ZodOptional<z.ZodString>;
2143
+ schemaVersion: z.ZodLiteral<1>;
2144
+ /** IDE identifier */
2145
+ ide: z.ZodString;
2146
+ /** Installed packages keyed by package name */
2147
+ packages: z.ZodRecord<z.ZodString, z.ZodObject<{
2148
+ /** Variant identifier (e.g. "opentrek"; use "_flat" for skills/ui) */
2149
+ variant: z.ZodString;
2150
+ /** Semver version string */
2151
+ version: z.ZodString;
2152
+ /** Tailwind CSS version this project uses (only meaningful for design package). */
2153
+ tailwind: z.ZodOptional<z.ZodLiteral<"v4">>;
2154
+ /** IDEs this package was installed for (only meaningful for skills package). */
2155
+ ides: z.ZodOptional<z.ZodArray<z.ZodEnum<["qoder", "claude"]>, "many">>;
2156
+ /** Install scope (only meaningful for skills package). */
2157
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
2158
+ /** Path aliases for ui entry installation (only meaningful for ui package). */
2159
+ aliases: z.ZodOptional<z.ZodObject<{
2160
+ components: z.ZodString;
2161
+ hooks: z.ZodString;
2162
+ utils: z.ZodString;
2163
+ lib: z.ZodString;
2164
+ /** Biz-ui components (variant-bound). Defaults to `src/components/business/`. */
2165
+ business: z.ZodDefault<z.ZodString>;
2166
+ /** Page templates (variant-bound). Defaults to `src/templates/`. */
2167
+ templates: z.ZodDefault<z.ZodString>;
2168
+ }, "strip", z.ZodTypeAny, {
2169
+ components: string;
2170
+ hooks: string;
2171
+ utils: string;
2172
+ lib: string;
2173
+ business: string;
2174
+ templates: string;
2175
+ }, {
2176
+ components: string;
2177
+ hooks: string;
2178
+ utils: string;
2179
+ lib: string;
2180
+ business?: string | undefined;
2181
+ templates?: string | undefined;
2182
+ }>>;
2183
+ /**
2184
+ * Default icon library declared by the project (only meaningful for ui).
2185
+ * Declarative only — does NOT trigger code rewrites; ui entries hardcode imports.
2186
+ */
2187
+ iconLibrary: z.ZodOptional<z.ZodString>;
2188
+ /** Whether the project uses TSX (true) or JSX (false). ui-specific. */
2189
+ tsx: z.ZodOptional<z.ZodBoolean>;
2190
+ /** Whether to emit React Server Components markers (`"use client"`). ui-specific. */
2191
+ rsc: z.ZodOptional<z.ZodBoolean>;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ variant: string;
2194
+ version: string;
2195
+ ides?: ("qoder" | "claude")[] | undefined;
2196
+ scope?: "project" | "global" | undefined;
2197
+ tailwind?: "v4" | undefined;
2198
+ aliases?: {
2199
+ components: string;
2200
+ hooks: string;
2201
+ utils: string;
2202
+ lib: string;
2203
+ business: string;
2204
+ templates: string;
2205
+ } | undefined;
2206
+ iconLibrary?: string | undefined;
2207
+ tsx?: boolean | undefined;
2208
+ rsc?: boolean | undefined;
2209
+ }, {
2210
+ variant: string;
2211
+ version: string;
2212
+ ides?: ("qoder" | "claude")[] | undefined;
2213
+ scope?: "project" | "global" | undefined;
2214
+ tailwind?: "v4" | undefined;
2215
+ aliases?: {
2216
+ components: string;
2217
+ hooks: string;
2218
+ utils: string;
2219
+ lib: string;
2220
+ business?: string | undefined;
2221
+ templates?: string | undefined;
2222
+ } | undefined;
2223
+ iconLibrary?: string | undefined;
2224
+ tsx?: boolean | undefined;
2225
+ rsc?: boolean | undefined;
2226
+ }>>;
2227
+ }, "strip", z.ZodTypeAny, {
2228
+ schemaVersion: 1;
2229
+ ide: string;
2230
+ packages: Record<string, {
2231
+ variant: string;
2232
+ version: string;
2233
+ ides?: ("qoder" | "claude")[] | undefined;
2234
+ scope?: "project" | "global" | undefined;
2235
+ tailwind?: "v4" | undefined;
2236
+ aliases?: {
2237
+ components: string;
2238
+ hooks: string;
2239
+ utils: string;
2240
+ lib: string;
2241
+ business: string;
2242
+ templates: string;
2243
+ } | undefined;
2244
+ iconLibrary?: string | undefined;
2245
+ tsx?: boolean | undefined;
2246
+ rsc?: boolean | undefined;
2247
+ }>;
2248
+ $schema?: string | undefined;
2249
+ }, {
2250
+ schemaVersion: 1;
2251
+ ide: string;
2252
+ packages: Record<string, {
2253
+ variant: string;
2254
+ version: string;
2255
+ ides?: ("qoder" | "claude")[] | undefined;
2256
+ scope?: "project" | "global" | undefined;
2257
+ tailwind?: "v4" | undefined;
2258
+ aliases?: {
2259
+ components: string;
2260
+ hooks: string;
2261
+ utils: string;
2262
+ lib: string;
2263
+ business?: string | undefined;
2264
+ templates?: string | undefined;
2265
+ } | undefined;
2266
+ iconLibrary?: string | undefined;
2267
+ tsx?: boolean | undefined;
2268
+ rsc?: boolean | undefined;
2269
+ }>;
2270
+ $schema?: string | undefined;
2271
+ }>, z.ZodObject<{
2272
+ $schema: z.ZodOptional<z.ZodString>;
2273
+ schemaVersion: z.ZodLiteral<2>;
2274
+ /** IDE identifier */
2275
+ ide: z.ZodString;
2276
+ /** Installed packages keyed by package name */
2277
+ packages: z.ZodRecord<z.ZodString, z.ZodObject<{
2278
+ /** Variant identifier (e.g. "opentrek"; use "_flat" for skills/ui) */
2279
+ variant: z.ZodString;
2280
+ /** Semver version string */
2281
+ version: z.ZodString;
2282
+ /** Tailwind CSS version this project uses (only meaningful for design package). */
2283
+ tailwind: z.ZodOptional<z.ZodLiteral<"v4">>;
2284
+ /** IDEs this package was installed for (only meaningful for skills package). */
2285
+ ides: z.ZodOptional<z.ZodArray<z.ZodEnum<["qoder", "claude"]>, "many">>;
2286
+ /** Install scope (only meaningful for skills package). */
2287
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
2288
+ /** Path aliases for ui entry installation (only meaningful for ui package). */
2289
+ aliases: z.ZodOptional<z.ZodObject<{
2290
+ components: z.ZodString;
2291
+ hooks: z.ZodString;
2292
+ utils: z.ZodString;
2293
+ lib: z.ZodString;
2294
+ /** Biz-ui components (variant-bound). Defaults to `src/components/business/`. */
2295
+ business: z.ZodDefault<z.ZodString>;
2296
+ /** Page templates (variant-bound). Defaults to `src/templates/`. */
2297
+ templates: z.ZodDefault<z.ZodString>;
2298
+ }, "strip", z.ZodTypeAny, {
2299
+ components: string;
2300
+ hooks: string;
2301
+ utils: string;
2302
+ lib: string;
2303
+ business: string;
2304
+ templates: string;
2305
+ }, {
2306
+ components: string;
2307
+ hooks: string;
2308
+ utils: string;
2309
+ lib: string;
2310
+ business?: string | undefined;
2311
+ templates?: string | undefined;
2312
+ }>>;
2313
+ /**
2314
+ * Default icon library declared by the project (only meaningful for ui).
2315
+ * Declarative only — does NOT trigger code rewrites; ui entries hardcode imports.
2316
+ */
2317
+ iconLibrary: z.ZodOptional<z.ZodString>;
2318
+ /** Whether the project uses TSX (true) or JSX (false). ui-specific. */
2319
+ tsx: z.ZodOptional<z.ZodBoolean>;
2320
+ /** Whether to emit React Server Components markers (`"use client"`). ui-specific. */
2321
+ rsc: z.ZodOptional<z.ZodBoolean>;
2322
+ }, "strip", z.ZodTypeAny, {
2323
+ variant: string;
2324
+ version: string;
2325
+ ides?: ("qoder" | "claude")[] | undefined;
2326
+ scope?: "project" | "global" | undefined;
2327
+ tailwind?: "v4" | undefined;
2328
+ aliases?: {
2329
+ components: string;
2330
+ hooks: string;
2331
+ utils: string;
2332
+ lib: string;
2333
+ business: string;
2334
+ templates: string;
2335
+ } | undefined;
2336
+ iconLibrary?: string | undefined;
2337
+ tsx?: boolean | undefined;
2338
+ rsc?: boolean | undefined;
2339
+ }, {
2340
+ variant: string;
2341
+ version: string;
2342
+ ides?: ("qoder" | "claude")[] | undefined;
2343
+ scope?: "project" | "global" | undefined;
2344
+ tailwind?: "v4" | undefined;
2345
+ aliases?: {
2346
+ components: string;
2347
+ hooks: string;
2348
+ utils: string;
2349
+ lib: string;
2350
+ business?: string | undefined;
2351
+ templates?: string | undefined;
2352
+ } | undefined;
2353
+ iconLibrary?: string | undefined;
2354
+ tsx?: boolean | undefined;
2355
+ rsc?: boolean | undefined;
2356
+ }>>;
2357
+ /** Variant in effect before the most recent `variant switch`, if any. */
2358
+ priorVariant: z.ZodOptional<z.ZodString>;
2359
+ /** Last successful update record keyed by package name. */
2360
+ lastUpdate: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2361
+ /** ISO-8601 UTC timestamp of the last successful update. */
2362
+ ts: z.ZodString;
2363
+ /** Version the package was on before this update. */
2364
+ fromVersion: z.ZodString;
2365
+ /** Version the package was on after this update. */
2366
+ toVersion: z.ZodString;
2367
+ }, "strip", z.ZodTypeAny, {
2368
+ ts: string;
2369
+ fromVersion: string;
2370
+ toVersion: string;
2371
+ }, {
2372
+ ts: string;
2373
+ fromVersion: string;
2374
+ toVersion: string;
2375
+ }>>>;
2376
+ /** Token rename log accumulated across variant switches (oldest → newest). */
2377
+ tokenRenameHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
2378
+ /** ISO-8601 UTC timestamp at which the variant switch was performed. */
2379
+ ts: z.ZodString;
2380
+ /** Variant the project was on before the switch. */
2381
+ fromVariant: z.ZodString;
2382
+ /** Variant the project switched to. */
2383
+ toVariant: z.ZodString;
2384
+ /**
2385
+ * Token rename mapping — old token name → new token name.
2386
+ * Empty object is legal (e.g. switch with zero rename).
2387
+ */
2388
+ renames: z.ZodRecord<z.ZodString, z.ZodString>;
2389
+ }, "strip", z.ZodTypeAny, {
2390
+ renames: Record<string, string>;
2391
+ ts: string;
2392
+ fromVariant: string;
2393
+ toVariant: string;
2394
+ }, {
2395
+ renames: Record<string, string>;
2396
+ ts: string;
2397
+ fromVariant: string;
2398
+ toVariant: string;
2399
+ }>, "many">>;
2400
+ }, "strip", z.ZodTypeAny, {
2401
+ schemaVersion: 2;
2402
+ ide: string;
2403
+ packages: Record<string, {
2404
+ variant: string;
2405
+ version: string;
2406
+ ides?: ("qoder" | "claude")[] | undefined;
2407
+ scope?: "project" | "global" | undefined;
2408
+ tailwind?: "v4" | undefined;
2409
+ aliases?: {
2410
+ components: string;
2411
+ hooks: string;
2412
+ utils: string;
2413
+ lib: string;
2414
+ business: string;
2415
+ templates: string;
2416
+ } | undefined;
2417
+ iconLibrary?: string | undefined;
2418
+ tsx?: boolean | undefined;
2419
+ rsc?: boolean | undefined;
2420
+ }>;
2421
+ $schema?: string | undefined;
2422
+ priorVariant?: string | undefined;
2423
+ lastUpdate?: Record<string, {
2424
+ ts: string;
2425
+ fromVersion: string;
2426
+ toVersion: string;
2427
+ }> | undefined;
2428
+ tokenRenameHistory?: {
2429
+ renames: Record<string, string>;
2430
+ ts: string;
2431
+ fromVariant: string;
2432
+ toVariant: string;
2433
+ }[] | undefined;
2434
+ }, {
2435
+ schemaVersion: 2;
2436
+ ide: string;
2437
+ packages: Record<string, {
2438
+ variant: string;
2439
+ version: string;
2440
+ ides?: ("qoder" | "claude")[] | undefined;
2441
+ scope?: "project" | "global" | undefined;
2442
+ tailwind?: "v4" | undefined;
2443
+ aliases?: {
2444
+ components: string;
2445
+ hooks: string;
2446
+ utils: string;
2447
+ lib: string;
2448
+ business?: string | undefined;
2449
+ templates?: string | undefined;
2450
+ } | undefined;
2451
+ iconLibrary?: string | undefined;
2452
+ tsx?: boolean | undefined;
2453
+ rsc?: boolean | undefined;
2454
+ }>;
2455
+ $schema?: string | undefined;
2456
+ priorVariant?: string | undefined;
2457
+ lastUpdate?: Record<string, {
2458
+ ts: string;
2459
+ fromVersion: string;
2460
+ toVersion: string;
2461
+ }> | undefined;
2462
+ tokenRenameHistory?: {
2463
+ renames: Record<string, string>;
2464
+ ts: string;
2465
+ fromVariant: string;
2466
+ toVariant: string;
2467
+ }[] | undefined;
2468
+ }>]>, {
2469
+ schemaVersion: 2;
2470
+ ide: string;
2471
+ packages: Record<string, {
2472
+ variant: string;
2473
+ version: string;
2474
+ ides?: ("qoder" | "claude")[] | undefined;
2475
+ scope?: "project" | "global" | undefined;
2476
+ tailwind?: "v4" | undefined;
2477
+ aliases?: {
2478
+ components: string;
2479
+ hooks: string;
2480
+ utils: string;
2481
+ lib: string;
2482
+ business: string;
2483
+ templates: string;
2484
+ } | undefined;
2485
+ iconLibrary?: string | undefined;
2486
+ tsx?: boolean | undefined;
2487
+ rsc?: boolean | undefined;
2488
+ }>;
2489
+ $schema?: string | undefined;
2490
+ priorVariant?: string | undefined;
2491
+ lastUpdate?: Record<string, {
2492
+ ts: string;
2493
+ fromVersion: string;
2494
+ toVersion: string;
2495
+ }> | undefined;
2496
+ tokenRenameHistory?: {
2497
+ renames: Record<string, string>;
2498
+ ts: string;
2499
+ fromVariant: string;
2500
+ toVariant: string;
2501
+ }[] | undefined;
2502
+ }, {
2503
+ schemaVersion: 1;
2504
+ ide: string;
2505
+ packages: Record<string, {
2506
+ variant: string;
2507
+ version: string;
2508
+ ides?: ("qoder" | "claude")[] | undefined;
2509
+ scope?: "project" | "global" | undefined;
2510
+ tailwind?: "v4" | undefined;
2511
+ aliases?: {
2512
+ components: string;
2513
+ hooks: string;
2514
+ utils: string;
2515
+ lib: string;
2516
+ business?: string | undefined;
2517
+ templates?: string | undefined;
2518
+ } | undefined;
2519
+ iconLibrary?: string | undefined;
2520
+ tsx?: boolean | undefined;
2521
+ rsc?: boolean | undefined;
2522
+ }>;
2523
+ $schema?: string | undefined;
2524
+ } | {
2525
+ schemaVersion: 2;
2526
+ ide: string;
2527
+ packages: Record<string, {
2528
+ variant: string;
2529
+ version: string;
2530
+ ides?: ("qoder" | "claude")[] | undefined;
2531
+ scope?: "project" | "global" | undefined;
2532
+ tailwind?: "v4" | undefined;
2533
+ aliases?: {
2534
+ components: string;
2535
+ hooks: string;
2536
+ utils: string;
2537
+ lib: string;
2538
+ business?: string | undefined;
2539
+ templates?: string | undefined;
2540
+ } | undefined;
2541
+ iconLibrary?: string | undefined;
2542
+ tsx?: boolean | undefined;
2543
+ rsc?: boolean | undefined;
2544
+ }>;
2545
+ $schema?: string | undefined;
2546
+ priorVariant?: string | undefined;
2547
+ lastUpdate?: Record<string, {
2548
+ ts: string;
2549
+ fromVersion: string;
2550
+ toVersion: string;
2551
+ }> | undefined;
2552
+ tokenRenameHistory?: {
2553
+ renames: Record<string, string>;
2554
+ ts: string;
2555
+ fromVariant: string;
2556
+ toVariant: string;
2557
+ }[] | undefined;
2558
+ }>;
2559
+
2560
+ /**
2561
+ * An installed resource entry — tracks individual resource installation state.
2562
+ *
2563
+ * For type="skill" resources, the same logical skill may produce multiple installed
2564
+ * entries (one per ide × scope combination); the optional `ide`/`scope` fields
2565
+ * disambiguate them.
2566
+ */
2567
+ declare const InstalledResourceSchema: z.ZodObject<{
2568
+ /** Resource identifier matching the variant manifest */
2569
+ id: z.ZodString;
2570
+ /** Target path where the resource was installed (absolute or project-relative) */
2571
+ target: z.ZodString;
2572
+ /** Content hash for change detection (e.g. "sha256:...") */
2573
+ hash: z.ZodString;
2574
+ /** Update strategy that was applied */
2575
+ strategy: z.ZodEnum<["frozen", "regenerable", "managed"]>;
2576
+ /** IDE this resource was installed for (skill resources only) */
2577
+ ide: z.ZodOptional<z.ZodEnum<["qoder", "claude"]>>;
2578
+ /** Install scope (skill resources only) */
2579
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
2580
+ }, "strip", z.ZodTypeAny, {
2581
+ id: string;
2582
+ target: string;
2583
+ hash: string;
2584
+ strategy: "frozen" | "regenerable" | "managed";
2585
+ scope?: "project" | "global" | undefined;
2586
+ ide?: "qoder" | "claude" | undefined;
2587
+ }, {
2588
+ id: string;
2589
+ target: string;
2590
+ hash: string;
2591
+ strategy: "frozen" | "regenerable" | "managed";
2592
+ scope?: "project" | "global" | undefined;
2593
+ ide?: "qoder" | "claude" | undefined;
2594
+ }>;
2595
+ /**
2596
+ * An installed package entry — tracks a single package installation.
2597
+ */
2598
+ declare const InstalledPackageSchema: z.ZodObject<{
2599
+ /** Full package name (e.g. "@teamix-evo/tokens") */
2600
+ package: z.ZodString;
2601
+ /** Variant identifier (use "_flat" for non-variant packages such as skills) */
2602
+ variant: z.ZodString;
2603
+ /** Installed version */
2604
+ version: z.ZodString;
2605
+ /** ISO 8601 timestamp of installation */
2606
+ installedAt: z.ZodString;
2607
+ /** List of installed resources */
2608
+ resources: z.ZodArray<z.ZodObject<{
2609
+ /** Resource identifier matching the variant manifest */
2610
+ id: z.ZodString;
2611
+ /** Target path where the resource was installed (absolute or project-relative) */
2612
+ target: z.ZodString;
2613
+ /** Content hash for change detection (e.g. "sha256:...") */
2614
+ hash: z.ZodString;
2615
+ /** Update strategy that was applied */
2616
+ strategy: z.ZodEnum<["frozen", "regenerable", "managed"]>;
2617
+ /** IDE this resource was installed for (skill resources only) */
2618
+ ide: z.ZodOptional<z.ZodEnum<["qoder", "claude"]>>;
2619
+ /** Install scope (skill resources only) */
2620
+ scope: z.ZodOptional<z.ZodEnum<["project", "global"]>>;
2621
+ }, "strip", z.ZodTypeAny, {
2622
+ id: string;
2623
+ target: string;
2624
+ hash: string;
2625
+ strategy: "frozen" | "regenerable" | "managed";
2626
+ scope?: "project" | "global" | undefined;
2627
+ ide?: "qoder" | "claude" | undefined;
2628
+ }, {
2629
+ id: string;
2630
+ target: string;
2631
+ hash: string;
2632
+ strategy: "frozen" | "regenerable" | "managed";
2633
+ scope?: "project" | "global" | undefined;
2634
+ ide?: "qoder" | "claude" | undefined;
2635
+ }>, "many">;
2636
+ }, "strip", z.ZodTypeAny, {
2637
+ package: string;
2638
+ variant: string;
2639
+ version: string;
2640
+ resources: {
2641
+ id: string;
2642
+ target: string;
2643
+ hash: string;
2644
+ strategy: "frozen" | "regenerable" | "managed";
2645
+ scope?: "project" | "global" | undefined;
2646
+ ide?: "qoder" | "claude" | undefined;
2647
+ }[];
2648
+ installedAt: string;
2649
+ }, {
2650
+ package: string;
2651
+ variant: string;
2652
+ version: string;
2653
+ resources: {
2654
+ id: string;
2655
+ target: string;
2656
+ hash: string;
2657
+ strategy: "frozen" | "regenerable" | "managed";
2658
+ scope?: "project" | "global" | undefined;
2659
+ ide?: "qoder" | "claude" | undefined;
2660
+ }[];
2661
+ installedAt: string;
2662
+ }>;
2663
+ /**
2664
+ * Installed manifest schema — tracks all installed packages in a project.
2665
+ * Stored at `.teamix-evo/manifest.json`.
2666
+ */
2667
+ declare const InstalledManifestSchema: z.ZodObject<{
2668
+ schemaVersion: z.ZodLiteral<1>;
1868
2669
  /** List of installed packages */
1869
2670
  installed: z.ZodArray<z.ZodObject<{
1870
2671
  /** Full package name (e.g. "@teamix-evo/tokens") */
@@ -2066,6 +2867,392 @@ declare const SkillsLockSchema: z.ZodObject<{
2066
2867
  type SkillsLockEntry = z.infer<typeof SkillsLockEntrySchema>;
2067
2868
  type SkillsLock = z.infer<typeof SkillsLockSchema>;
2068
2869
 
2870
+ /**
2871
+ * Component-source upgrade staging manifest — emitted by CLI as the input for
2872
+ * the `teamix-evo-upgrade` skill (component source section). Persisted at
2873
+ * `.teamix-evo/.upgrade-staging/<category>-<fs-iso-ts>/meta.json`.
2874
+ *
2875
+ * See [ADR 0040](../../../../docs/adr/0040-component-source-layer-upgrade-flow.md).
2876
+ */
2877
+ /** Risk classification CLI assigns per component (AI may downgrade after review). */
2878
+ declare const UpgradeRiskLevelSchema: z.ZodEnum<["unchanged", "upgradable-low", "upgradable-medium", "risky", "breaking", "foreign"]>;
2879
+ /** Lineage classification of the consumer project's component layer. */
2880
+ declare const ComponentLineageSchema: z.ZodEnum<["teamix-evo", "shadcn-native", "mixed", "custom-only"]>;
2881
+ /** Discriminator for which package category a staging manifest covers. */
2882
+ declare const UpgradeStagingCategorySchema: z.ZodEnum<["ui", "biz-ui"]>;
2883
+ /** What command produced the staging dir. */
2884
+ declare const UpgradeStagingTriggerSchema: z.ZodEnum<["update", "ui-upgrade", "biz-ui-upgrade"]>;
2885
+ /** Per-component "current state on disk" portion of a staging entry. */
2886
+ declare const UpgradeStagingCurrentSchema: z.ZodObject<{
2887
+ /** Project-relative path of the component file (e.g. `src/components/ui/button.tsx`). */
2888
+ target: z.ZodString;
2889
+ /** Hash recorded in `.teamix-evo/manifest.json` at install time, or null when foreign. */
2890
+ hash: z.ZodNullable<z.ZodString>;
2891
+ /** Lineage of *this specific component* (independent of project-wide lineage). */
2892
+ sourceLineage: z.ZodEnum<["teamix-evo", "shadcn-native", "custom", "absent"]>;
2893
+ }, "strip", z.ZodTypeAny, {
2894
+ target: string;
2895
+ hash: string | null;
2896
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
2897
+ }, {
2898
+ target: string;
2899
+ hash: string | null;
2900
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
2901
+ }>;
2902
+ /** Per-component "incoming source from registry" portion of a staging entry. */
2903
+ declare const UpgradeStagingIncomingSchema: z.ZodObject<{
2904
+ /** Package-level version the incoming source comes from. */
2905
+ sourceVersion: z.ZodString;
2906
+ /** Hash of incoming source after applying the consumer's import-rewrite aliases. */
2907
+ hash: z.ZodString;
2908
+ /** Path of the incoming source file relative to the staging dir (e.g. `button/incoming.tsx`). */
2909
+ relPath: z.ZodString;
2910
+ }, "strip", z.ZodTypeAny, {
2911
+ hash: string;
2912
+ sourceVersion: string;
2913
+ relPath: string;
2914
+ }, {
2915
+ hash: string;
2916
+ sourceVersion: string;
2917
+ relPath: string;
2918
+ }>;
2919
+ /** Risk + diff metadata produced by CLI heuristics. */
2920
+ declare const UpgradeStagingDiffSchema: z.ZodObject<{
2921
+ riskLevel: z.ZodEnum<["unchanged", "upgradable-low", "upgradable-medium", "risky", "breaking", "foreign"]>;
2922
+ /** Human-readable, machine-parsable hints (e.g. `"new prop: loading"`, `"removed cva variant: ghost"`). */
2923
+ hints: z.ZodArray<z.ZodString, "many">;
2924
+ /** Number of files that differ for this entry (almost always 1 today; reserved for multi-file entries). */
2925
+ filesChangedCount: z.ZodNumber;
2926
+ /**
2927
+ * Path of the unified diff relative to the staging dir, when CLI emitted one.
2928
+ * Reserved for a future emitter — in schema v1 the CLI does **not** pre-render
2929
+ * `diff.unified.patch`; the consumer of the staging (the `teamix-evo-upgrade`
2930
+ * skill) computes the diff on the fly from `current.tsx` vs `incoming.tsx`.
2931
+ */
2932
+ diffRelPath: z.ZodOptional<z.ZodString>;
2933
+ }, "strip", z.ZodTypeAny, {
2934
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
2935
+ hints: string[];
2936
+ filesChangedCount: number;
2937
+ diffRelPath?: string | undefined;
2938
+ }, {
2939
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
2940
+ hints: string[];
2941
+ filesChangedCount: number;
2942
+ diffRelPath?: string | undefined;
2943
+ }>;
2944
+ /** A single component-level entry inside the staging manifest. */
2945
+ declare const UpgradeStagingEntrySchema: z.ZodObject<{
2946
+ /** Component identifier matching the upstream registry (e.g. `"button"`). */
2947
+ id: z.ZodString;
2948
+ /** Which package category this entry belongs to. */
2949
+ category: z.ZodEnum<["ui", "biz-ui"]>;
2950
+ current: z.ZodObject<{
2951
+ /** Project-relative path of the component file (e.g. `src/components/ui/button.tsx`). */
2952
+ target: z.ZodString;
2953
+ /** Hash recorded in `.teamix-evo/manifest.json` at install time, or null when foreign. */
2954
+ hash: z.ZodNullable<z.ZodString>;
2955
+ /** Lineage of *this specific component* (independent of project-wide lineage). */
2956
+ sourceLineage: z.ZodEnum<["teamix-evo", "shadcn-native", "custom", "absent"]>;
2957
+ }, "strip", z.ZodTypeAny, {
2958
+ target: string;
2959
+ hash: string | null;
2960
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
2961
+ }, {
2962
+ target: string;
2963
+ hash: string | null;
2964
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
2965
+ }>;
2966
+ /** Absent when the entry is `breaking` (no incoming) or `foreign` (no upstream). */
2967
+ incoming: z.ZodOptional<z.ZodObject<{
2968
+ /** Package-level version the incoming source comes from. */
2969
+ sourceVersion: z.ZodString;
2970
+ /** Hash of incoming source after applying the consumer's import-rewrite aliases. */
2971
+ hash: z.ZodString;
2972
+ /** Path of the incoming source file relative to the staging dir (e.g. `button/incoming.tsx`). */
2973
+ relPath: z.ZodString;
2974
+ }, "strip", z.ZodTypeAny, {
2975
+ hash: string;
2976
+ sourceVersion: string;
2977
+ relPath: string;
2978
+ }, {
2979
+ hash: string;
2980
+ sourceVersion: string;
2981
+ relPath: string;
2982
+ }>>;
2983
+ diff: z.ZodObject<{
2984
+ riskLevel: z.ZodEnum<["unchanged", "upgradable-low", "upgradable-medium", "risky", "breaking", "foreign"]>;
2985
+ /** Human-readable, machine-parsable hints (e.g. `"new prop: loading"`, `"removed cva variant: ghost"`). */
2986
+ hints: z.ZodArray<z.ZodString, "many">;
2987
+ /** Number of files that differ for this entry (almost always 1 today; reserved for multi-file entries). */
2988
+ filesChangedCount: z.ZodNumber;
2989
+ /**
2990
+ * Path of the unified diff relative to the staging dir, when CLI emitted one.
2991
+ * Reserved for a future emitter — in schema v1 the CLI does **not** pre-render
2992
+ * `diff.unified.patch`; the consumer of the staging (the `teamix-evo-upgrade`
2993
+ * skill) computes the diff on the fly from `current.tsx` vs `incoming.tsx`.
2994
+ */
2995
+ diffRelPath: z.ZodOptional<z.ZodString>;
2996
+ }, "strip", z.ZodTypeAny, {
2997
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
2998
+ hints: string[];
2999
+ filesChangedCount: number;
3000
+ diffRelPath?: string | undefined;
3001
+ }, {
3002
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3003
+ hints: string[];
3004
+ filesChangedCount: number;
3005
+ diffRelPath?: string | undefined;
3006
+ }>;
3007
+ }, "strip", z.ZodTypeAny, {
3008
+ id: string;
3009
+ category: "ui" | "biz-ui";
3010
+ current: {
3011
+ target: string;
3012
+ hash: string | null;
3013
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3014
+ };
3015
+ diff: {
3016
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3017
+ hints: string[];
3018
+ filesChangedCount: number;
3019
+ diffRelPath?: string | undefined;
3020
+ };
3021
+ incoming?: {
3022
+ hash: string;
3023
+ sourceVersion: string;
3024
+ relPath: string;
3025
+ } | undefined;
3026
+ }, {
3027
+ id: string;
3028
+ category: "ui" | "biz-ui";
3029
+ current: {
3030
+ target: string;
3031
+ hash: string | null;
3032
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3033
+ };
3034
+ diff: {
3035
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3036
+ hints: string[];
3037
+ filesChangedCount: number;
3038
+ diffRelPath?: string | undefined;
3039
+ };
3040
+ incoming?: {
3041
+ hash: string;
3042
+ sourceVersion: string;
3043
+ relPath: string;
3044
+ } | undefined;
3045
+ }>;
3046
+ /**
3047
+ * Top-level staging manifest, written as `meta.json` in the staging dir.
3048
+ * Versioned independently from the project config (`schemaVersion: 1` here is
3049
+ * scoped to this manifest only).
3050
+ */
3051
+ declare const UpgradeStagingManifestSchema: z.ZodObject<{
3052
+ schemaVersion: z.ZodLiteral<1>;
3053
+ /** ISO-8601 timestamp the staging dir was created (matches dir suffix). */
3054
+ ts: z.ZodString;
3055
+ /** Which package category this staging covers. */
3056
+ package: z.ZodEnum<["ui", "biz-ui"]>;
3057
+ /** Which command produced this staging. */
3058
+ trigger: z.ZodEnum<["update", "ui-upgrade", "biz-ui-upgrade"]>;
3059
+ /** Variant applicable to the staging (always `_flat` for ui; concrete variant for biz-ui). */
3060
+ variant: z.ZodString;
3061
+ /** Installed package version (from `.teamix-evo/manifest.json`); empty string when foreign-only. */
3062
+ fromVersion: z.ZodString;
3063
+ /** Upstream package version. */
3064
+ toVersion: z.ZodString;
3065
+ /** Project-wide lineage classification. */
3066
+ lineage: z.ZodEnum<["teamix-evo", "shadcn-native", "mixed", "custom-only"]>;
3067
+ /** Aggregate counts grouped by riskLevel for quick AI summarization. */
3068
+ summary: z.ZodObject<{
3069
+ total: z.ZodNumber;
3070
+ byRisk: z.ZodRecord<z.ZodEnum<["unchanged", "upgradable-low", "upgradable-medium", "risky", "breaking", "foreign"]>, z.ZodNumber>;
3071
+ }, "strip", z.ZodTypeAny, {
3072
+ total: number;
3073
+ byRisk: Partial<Record<"unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign", number>>;
3074
+ }, {
3075
+ total: number;
3076
+ byRisk: Partial<Record<"unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign", number>>;
3077
+ }>;
3078
+ entries: z.ZodArray<z.ZodObject<{
3079
+ /** Component identifier matching the upstream registry (e.g. `"button"`). */
3080
+ id: z.ZodString;
3081
+ /** Which package category this entry belongs to. */
3082
+ category: z.ZodEnum<["ui", "biz-ui"]>;
3083
+ current: z.ZodObject<{
3084
+ /** Project-relative path of the component file (e.g. `src/components/ui/button.tsx`). */
3085
+ target: z.ZodString;
3086
+ /** Hash recorded in `.teamix-evo/manifest.json` at install time, or null when foreign. */
3087
+ hash: z.ZodNullable<z.ZodString>;
3088
+ /** Lineage of *this specific component* (independent of project-wide lineage). */
3089
+ sourceLineage: z.ZodEnum<["teamix-evo", "shadcn-native", "custom", "absent"]>;
3090
+ }, "strip", z.ZodTypeAny, {
3091
+ target: string;
3092
+ hash: string | null;
3093
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3094
+ }, {
3095
+ target: string;
3096
+ hash: string | null;
3097
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3098
+ }>;
3099
+ /** Absent when the entry is `breaking` (no incoming) or `foreign` (no upstream). */
3100
+ incoming: z.ZodOptional<z.ZodObject<{
3101
+ /** Package-level version the incoming source comes from. */
3102
+ sourceVersion: z.ZodString;
3103
+ /** Hash of incoming source after applying the consumer's import-rewrite aliases. */
3104
+ hash: z.ZodString;
3105
+ /** Path of the incoming source file relative to the staging dir (e.g. `button/incoming.tsx`). */
3106
+ relPath: z.ZodString;
3107
+ }, "strip", z.ZodTypeAny, {
3108
+ hash: string;
3109
+ sourceVersion: string;
3110
+ relPath: string;
3111
+ }, {
3112
+ hash: string;
3113
+ sourceVersion: string;
3114
+ relPath: string;
3115
+ }>>;
3116
+ diff: z.ZodObject<{
3117
+ riskLevel: z.ZodEnum<["unchanged", "upgradable-low", "upgradable-medium", "risky", "breaking", "foreign"]>;
3118
+ /** Human-readable, machine-parsable hints (e.g. `"new prop: loading"`, `"removed cva variant: ghost"`). */
3119
+ hints: z.ZodArray<z.ZodString, "many">;
3120
+ /** Number of files that differ for this entry (almost always 1 today; reserved for multi-file entries). */
3121
+ filesChangedCount: z.ZodNumber;
3122
+ /**
3123
+ * Path of the unified diff relative to the staging dir, when CLI emitted one.
3124
+ * Reserved for a future emitter — in schema v1 the CLI does **not** pre-render
3125
+ * `diff.unified.patch`; the consumer of the staging (the `teamix-evo-upgrade`
3126
+ * skill) computes the diff on the fly from `current.tsx` vs `incoming.tsx`.
3127
+ */
3128
+ diffRelPath: z.ZodOptional<z.ZodString>;
3129
+ }, "strip", z.ZodTypeAny, {
3130
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3131
+ hints: string[];
3132
+ filesChangedCount: number;
3133
+ diffRelPath?: string | undefined;
3134
+ }, {
3135
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3136
+ hints: string[];
3137
+ filesChangedCount: number;
3138
+ diffRelPath?: string | undefined;
3139
+ }>;
3140
+ }, "strip", z.ZodTypeAny, {
3141
+ id: string;
3142
+ category: "ui" | "biz-ui";
3143
+ current: {
3144
+ target: string;
3145
+ hash: string | null;
3146
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3147
+ };
3148
+ diff: {
3149
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3150
+ hints: string[];
3151
+ filesChangedCount: number;
3152
+ diffRelPath?: string | undefined;
3153
+ };
3154
+ incoming?: {
3155
+ hash: string;
3156
+ sourceVersion: string;
3157
+ relPath: string;
3158
+ } | undefined;
3159
+ }, {
3160
+ id: string;
3161
+ category: "ui" | "biz-ui";
3162
+ current: {
3163
+ target: string;
3164
+ hash: string | null;
3165
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3166
+ };
3167
+ diff: {
3168
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3169
+ hints: string[];
3170
+ filesChangedCount: number;
3171
+ diffRelPath?: string | undefined;
3172
+ };
3173
+ incoming?: {
3174
+ hash: string;
3175
+ sourceVersion: string;
3176
+ relPath: string;
3177
+ } | undefined;
3178
+ }>, "many">;
3179
+ }, "strip", z.ZodTypeAny, {
3180
+ entries: {
3181
+ id: string;
3182
+ category: "ui" | "biz-ui";
3183
+ current: {
3184
+ target: string;
3185
+ hash: string | null;
3186
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3187
+ };
3188
+ diff: {
3189
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3190
+ hints: string[];
3191
+ filesChangedCount: number;
3192
+ diffRelPath?: string | undefined;
3193
+ };
3194
+ incoming?: {
3195
+ hash: string;
3196
+ sourceVersion: string;
3197
+ relPath: string;
3198
+ } | undefined;
3199
+ }[];
3200
+ schemaVersion: 1;
3201
+ package: "ui" | "biz-ui";
3202
+ variant: string;
3203
+ ts: string;
3204
+ fromVersion: string;
3205
+ toVersion: string;
3206
+ trigger: "update" | "ui-upgrade" | "biz-ui-upgrade";
3207
+ lineage: "teamix-evo" | "shadcn-native" | "mixed" | "custom-only";
3208
+ summary: {
3209
+ total: number;
3210
+ byRisk: Partial<Record<"unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign", number>>;
3211
+ };
3212
+ }, {
3213
+ entries: {
3214
+ id: string;
3215
+ category: "ui" | "biz-ui";
3216
+ current: {
3217
+ target: string;
3218
+ hash: string | null;
3219
+ sourceLineage: "custom" | "teamix-evo" | "shadcn-native" | "absent";
3220
+ };
3221
+ diff: {
3222
+ riskLevel: "unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign";
3223
+ hints: string[];
3224
+ filesChangedCount: number;
3225
+ diffRelPath?: string | undefined;
3226
+ };
3227
+ incoming?: {
3228
+ hash: string;
3229
+ sourceVersion: string;
3230
+ relPath: string;
3231
+ } | undefined;
3232
+ }[];
3233
+ schemaVersion: 1;
3234
+ package: "ui" | "biz-ui";
3235
+ variant: string;
3236
+ ts: string;
3237
+ fromVersion: string;
3238
+ toVersion: string;
3239
+ trigger: "update" | "ui-upgrade" | "biz-ui-upgrade";
3240
+ lineage: "teamix-evo" | "shadcn-native" | "mixed" | "custom-only";
3241
+ summary: {
3242
+ total: number;
3243
+ byRisk: Partial<Record<"unchanged" | "upgradable-low" | "upgradable-medium" | "risky" | "breaking" | "foreign", number>>;
3244
+ };
3245
+ }>;
3246
+ type UpgradeRiskLevel = z.infer<typeof UpgradeRiskLevelSchema>;
3247
+ type ComponentLineage = z.infer<typeof ComponentLineageSchema>;
3248
+ type UpgradeStagingCategory = z.infer<typeof UpgradeStagingCategorySchema>;
3249
+ type UpgradeStagingTrigger = z.infer<typeof UpgradeStagingTriggerSchema>;
3250
+ type UpgradeStagingCurrent = z.infer<typeof UpgradeStagingCurrentSchema>;
3251
+ type UpgradeStagingIncoming = z.infer<typeof UpgradeStagingIncomingSchema>;
3252
+ type UpgradeStagingDiff = z.infer<typeof UpgradeStagingDiffSchema>;
3253
+ type UpgradeStagingEntry = z.infer<typeof UpgradeStagingEntrySchema>;
3254
+ type UpgradeStagingManifest = z.infer<typeof UpgradeStagingManifestSchema>;
3255
+
2069
3256
  /** Resource update strategy */
2070
3257
  type UpdateStrategy = z.infer<typeof UpdateStrategySchema>;
2071
3258
  /** Resource type discriminator */
@@ -2098,8 +3285,26 @@ type UiAliases = z.infer<typeof UiAliasesSchema>;
2098
3285
  type PackageEntry = z.infer<typeof PackageEntrySchema>;
2099
3286
  /** Tailwind CSS major version (always `"v4"` since v0.7). */
2100
3287
  type TailwindVersion = z.infer<typeof TailwindVersionSchema>;
2101
- /** Project configuration (config.json) */
3288
+ /**
3289
+ * Project configuration v1 — legacy shape kept for migration only. New code
3290
+ * should use `ProjectConfig` (≡ v2) which `validateConfig` always returns.
3291
+ */
3292
+ type ProjectConfigV1 = z.infer<typeof ProjectConfigV1Schema>;
3293
+ /**
3294
+ * Project configuration v2 — current shape with failure-recovery fields
3295
+ * (`priorVariant` / `lastUpdate` / `tokenRenameHistory`). Equivalent to
3296
+ * `ProjectConfig`.
3297
+ */
3298
+ type ProjectConfigV2 = z.infer<typeof ProjectConfigV2Schema>;
3299
+ /**
3300
+ * Project configuration (config.json) — always v2 after parsing; legacy v1
3301
+ * documents are auto-migrated by `ProjectConfigSchema.transform`.
3302
+ */
2102
3303
  type ProjectConfig = z.infer<typeof ProjectConfigSchema>;
3304
+ /** Token rename record stored in `tokenRenameHistory`. */
3305
+ type TokenRenameRecord = z.infer<typeof TokenRenameRecordSchema>;
3306
+ /** Last successful update record stored in `lastUpdate[pkgName]`. */
3307
+ type LastUpdateRecord = z.infer<typeof LastUpdateRecordSchema>;
2103
3308
  /** An installed resource tracking entry */
2104
3309
  type InstalledResource = z.infer<typeof InstalledResourceSchema>;
2105
3310
  /** An installed package tracking entry */
@@ -2117,6 +3322,24 @@ interface ManagedRegion {
2117
3322
  /** Content between start and end markers */
2118
3323
  content: string;
2119
3324
  }
3325
+ /**
3326
+ * Ordered slice of a document, classifying each chunk as either user-owned
3327
+ * (`unmanaged`) or framework-owned (`managed`). Used by the update pipeline
3328
+ * (ADR 0019 §2) to apply tri-state semantics — `regenerable` rewrites the
3329
+ * whole file, `managed` rewrites only `managed` segments and preserves
3330
+ * `unmanaged` ones verbatim, `frozen` skips entirely.
3331
+ *
3332
+ * Concatenating every segment's textual form (start marker + content + end
3333
+ * marker for managed; content for unmanaged) reconstructs the original
3334
+ * document byte-for-byte.
3335
+ */
3336
+ type DocumentSegment = {
3337
+ kind: 'unmanaged';
3338
+ content: string;
3339
+ } | {
3340
+ kind: 'managed';
3341
+ region: ManagedRegion;
3342
+ };
2120
3343
  /** Generic result type for validation operations */
2121
3344
  type Result<T> = {
2122
3345
  success: true;
@@ -2250,6 +3473,58 @@ declare function replaceManagedRegion(content: string, id: string, newContent: s
2250
3473
  * @returns true if the region exists
2251
3474
  */
2252
3475
  declare function hasManagedRegion(content: string, id: string): boolean;
3476
+ /**
3477
+ * Split a document into an ordered sequence of {@link DocumentSegment}s,
3478
+ * classifying each chunk as either `unmanaged` (user-owned) or `managed`
3479
+ * (framework-owned, identified by `<!-- teamix-evo:managed:start id="..." -->`
3480
+ * markers).
3481
+ *
3482
+ * The output preserves the document byte-for-byte: concatenating each
3483
+ * segment's serialized form—marker + content + marker for `managed`,
3484
+ * `content` for `unmanaged`—reconstructs the original input exactly.
3485
+ *
3486
+ * `unmanaged` segments may be empty strings when two managed regions touch
3487
+ * each other or sit at the document edges — callers SHOULD preserve them so
3488
+ * a later round-trip (split → mutate managed only → join) does not silently
3489
+ * drop boundary structure.
3490
+ *
3491
+ * Marker integrity is enforced via {@link parseManagedRegions} — unmatched
3492
+ * or duplicate markers throw. The update pipeline (ADR 0019 §2) relies on
3493
+ * this contract so a corrupted file fails fast rather than producing
3494
+ * unexpected merges.
3495
+ *
3496
+ * @example
3497
+ * const segs = splitManagedRegions(
3498
+ * `prelude\n<!-- teamix-evo:managed:start id="core" -->\nA\n<!-- teamix-evo:managed:end id="core" -->\ntail`,
3499
+ * );
3500
+ * // [
3501
+ * // { kind: 'unmanaged', content: 'prelude\n' },
3502
+ * // { kind: 'managed', region: { id: 'core', …, content: '\nA\n' } },
3503
+ * // { kind: 'unmanaged', content: '\ntail' },
3504
+ * // ]
3505
+ *
3506
+ * @param content - The full document content.
3507
+ * @returns Ordered segments covering the entire input.
3508
+ * @throws Error when start/end markers are unmatched or a start id appears more than once.
3509
+ */
3510
+ declare function splitManagedRegions(content: string): DocumentSegment[];
3511
+ /**
3512
+ * Extract the leading YAML frontmatter block (including the surrounding
3513
+ * `---` fences and the trailing newline, if any) from a document.
3514
+ *
3515
+ * Returns `null` when the document does not start with a frontmatter block.
3516
+ */
3517
+ declare function extractFrontmatter(content: string): string | null;
3518
+ /**
3519
+ * Replace the leading YAML frontmatter block of `content` with
3520
+ * `newFrontmatter`. If `content` has no frontmatter, `newFrontmatter` is
3521
+ * prepended (separated by a single newline if it does not already end
3522
+ * with one).
3523
+ *
3524
+ * `newFrontmatter` must include the surrounding `---` fences — pass the
3525
+ * value returned by {@link extractFrontmatter}.
3526
+ */
3527
+ declare function replaceFrontmatter(content: string, newFrontmatter: string): string;
2253
3528
 
2254
3529
  /**
2255
3530
  * Determine whether a resource should be updated based on its strategy
@@ -2279,4 +3554,4 @@ interface UpdateActionOptions {
2279
3554
  */
2280
3555
  declare function getUpdateAction(strategy: UpdateStrategy, options: UpdateActionOptions): UpdateAction;
2281
3556
 
2282
- 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 };
3557
+ export { type ComponentLineage, ComponentLineageSchema, type DocumentSegment, type InstalledManifest, InstalledManifestSchema, type InstalledPackage, InstalledPackageSchema, type InstalledResource, InstalledResourceSchema, type LastUpdateRecord, LastUpdateRecordSchema, type ManagedRegion, type PackageEntry, PackageEntrySchema, type ProjectConfig, ProjectConfigSchema, type ProjectConfigV1, ProjectConfigV1Schema, type ProjectConfigV2, ProjectConfigV2Schema, 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 TokenRenameEntry, TokenRenameEntrySchema, type TokenRenameRecord, TokenRenameRecordSchema, 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 UpgradeRiskLevel, UpgradeRiskLevelSchema, type UpgradeStagingCategory, UpgradeStagingCategorySchema, type UpgradeStagingCurrent, UpgradeStagingCurrentSchema, type UpgradeStagingDiff, UpgradeStagingDiffSchema, type UpgradeStagingEntry, UpgradeStagingEntrySchema, type UpgradeStagingIncoming, UpgradeStagingIncomingSchema, type UpgradeStagingManifest, UpgradeStagingManifestSchema, type UpgradeStagingTrigger, UpgradeStagingTriggerSchema, type VariantManifest, VariantManifestSchema, type VariantUiPackageCatalog, VariantUiPackageCatalogSchema, type VariantUiPackageManifest, VariantUiPackageManifestSchema, type VariantUiPackageName, VariantUiPackageNameSchema, extractFrontmatter, getUpdateAction, getVariantEntry, hasManagedRegion, loadSkillsPackageManifest, loadTokensPackageManifest, loadUiPackageManifest, loadVariantManifest, loadVariantUiPackageCatalog, loadVariantUiPackageManifest, parseManagedRegions, replaceFrontmatter, replaceManagedRegion, resolveUiEntryOrder, shouldUpdate, splitManagedRegions, validateConfig, validateInstalled, validateManifest, validateSkillsLock, validateSkillsPackage, validateUiDependencyGraph, validateUiPackage };