@treeseed/sdk 0.13.0-rc.67 → 0.13.0-rc.68

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.
@@ -1 +1 @@
1
- {"completedAt":"2026-09-01T06:11:25.862Z"}
1
+ {"completedAt":"2026-09-01T09:57:27.022Z"}
@@ -516,6 +516,22 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
516
516
  diskBytes?: number | undefined;
517
517
  };
518
518
  id: string;
519
+ ready: {
520
+ path: string;
521
+ timeoutSeconds: number;
522
+ kind: "marker";
523
+ } | {
524
+ path: string;
525
+ timeoutSeconds: number;
526
+ kind: "http";
527
+ expectedStatus: number;
528
+ } | {
529
+ timeoutSeconds: number;
530
+ kind: "tcp";
531
+ } | {
532
+ kind: "process";
533
+ graceSeconds: number;
534
+ };
519
535
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
520
536
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
521
537
  runtimeRequirements: string[];
@@ -572,22 +588,6 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
572
588
  cwd?: string | undefined;
573
589
  } | undefined;
574
590
  };
575
- ready: {
576
- path: string;
577
- timeoutSeconds: number;
578
- kind: "marker";
579
- } | {
580
- path: string;
581
- timeoutSeconds: number;
582
- kind: "http";
583
- expectedStatus: number;
584
- } | {
585
- timeoutSeconds: number;
586
- kind: "tcp";
587
- } | {
588
- kind: "process";
589
- graceSeconds: number;
590
- };
591
591
  outputs: {
592
592
  path: string;
593
593
  mediaType: string;
@@ -649,6 +649,22 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
649
649
  } | undefined;
650
650
  }, {
651
651
  id: string;
652
+ ready: {
653
+ path: string;
654
+ timeoutSeconds: number;
655
+ kind: "marker";
656
+ } | {
657
+ path: string;
658
+ timeoutSeconds: number;
659
+ kind: "http";
660
+ expectedStatus?: number | undefined;
661
+ } | {
662
+ timeoutSeconds: number;
663
+ kind: "tcp";
664
+ } | {
665
+ kind: "process";
666
+ graceSeconds?: number | undefined;
667
+ };
652
668
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
653
669
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
654
670
  sourceRoots: string[];
@@ -703,22 +719,6 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
703
719
  timeoutSeconds?: number | undefined;
704
720
  } | undefined;
705
721
  };
706
- ready: {
707
- path: string;
708
- timeoutSeconds: number;
709
- kind: "marker";
710
- } | {
711
- path: string;
712
- timeoutSeconds: number;
713
- kind: "http";
714
- expectedStatus?: number | undefined;
715
- } | {
716
- timeoutSeconds: number;
717
- kind: "tcp";
718
- } | {
719
- kind: "process";
720
- graceSeconds?: number | undefined;
721
- };
722
722
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
723
723
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
724
724
  shutdown: {
@@ -792,6 +792,22 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
792
792
  diskBytes?: number | undefined;
793
793
  };
794
794
  id: string;
795
+ ready: {
796
+ path: string;
797
+ timeoutSeconds: number;
798
+ kind: "marker";
799
+ } | {
800
+ path: string;
801
+ timeoutSeconds: number;
802
+ kind: "http";
803
+ expectedStatus: number;
804
+ } | {
805
+ timeoutSeconds: number;
806
+ kind: "tcp";
807
+ } | {
808
+ kind: "process";
809
+ graceSeconds: number;
810
+ };
795
811
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
796
812
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
797
813
  runtimeRequirements: string[];
@@ -848,22 +864,6 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
848
864
  cwd?: string | undefined;
849
865
  } | undefined;
850
866
  };
851
- ready: {
852
- path: string;
853
- timeoutSeconds: number;
854
- kind: "marker";
855
- } | {
856
- path: string;
857
- timeoutSeconds: number;
858
- kind: "http";
859
- expectedStatus: number;
860
- } | {
861
- timeoutSeconds: number;
862
- kind: "tcp";
863
- } | {
864
- kind: "process";
865
- graceSeconds: number;
866
- };
867
867
  outputs: {
868
868
  path: string;
869
869
  mediaType: string;
@@ -925,6 +925,22 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
925
925
  } | undefined;
926
926
  }, {
927
927
  id: string;
928
+ ready: {
929
+ path: string;
930
+ timeoutSeconds: number;
931
+ kind: "marker";
932
+ } | {
933
+ path: string;
934
+ timeoutSeconds: number;
935
+ kind: "http";
936
+ expectedStatus?: number | undefined;
937
+ } | {
938
+ timeoutSeconds: number;
939
+ kind: "tcp";
940
+ } | {
941
+ kind: "process";
942
+ graceSeconds?: number | undefined;
943
+ };
928
944
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
929
945
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
930
946
  sourceRoots: string[];
@@ -979,22 +995,6 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
979
995
  timeoutSeconds?: number | undefined;
980
996
  } | undefined;
981
997
  };
982
- ready: {
983
- path: string;
984
- timeoutSeconds: number;
985
- kind: "marker";
986
- } | {
987
- path: string;
988
- timeoutSeconds: number;
989
- kind: "http";
990
- expectedStatus?: number | undefined;
991
- } | {
992
- timeoutSeconds: number;
993
- kind: "tcp";
994
- } | {
995
- kind: "process";
996
- graceSeconds?: number | undefined;
997
- };
998
998
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
999
999
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
1000
1000
  shutdown: {
@@ -1597,6 +1597,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1597
1597
  diskBytes?: number | undefined;
1598
1598
  };
1599
1599
  id: string;
1600
+ ready: {
1601
+ path: string;
1602
+ timeoutSeconds: number;
1603
+ kind: "marker";
1604
+ } | {
1605
+ path: string;
1606
+ timeoutSeconds: number;
1607
+ kind: "http";
1608
+ expectedStatus: number;
1609
+ } | {
1610
+ timeoutSeconds: number;
1611
+ kind: "tcp";
1612
+ } | {
1613
+ kind: "process";
1614
+ graceSeconds: number;
1615
+ };
1600
1616
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1601
1617
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
1602
1618
  runtimeRequirements: string[];
@@ -1653,22 +1669,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1653
1669
  cwd?: string | undefined;
1654
1670
  } | undefined;
1655
1671
  };
1656
- ready: {
1657
- path: string;
1658
- timeoutSeconds: number;
1659
- kind: "marker";
1660
- } | {
1661
- path: string;
1662
- timeoutSeconds: number;
1663
- kind: "http";
1664
- expectedStatus: number;
1665
- } | {
1666
- timeoutSeconds: number;
1667
- kind: "tcp";
1668
- } | {
1669
- kind: "process";
1670
- graceSeconds: number;
1671
- };
1672
1672
  outputs: {
1673
1673
  path: string;
1674
1674
  mediaType: string;
@@ -1730,6 +1730,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1730
1730
  } | undefined;
1731
1731
  }, {
1732
1732
  id: string;
1733
+ ready: {
1734
+ path: string;
1735
+ timeoutSeconds: number;
1736
+ kind: "marker";
1737
+ } | {
1738
+ path: string;
1739
+ timeoutSeconds: number;
1740
+ kind: "http";
1741
+ expectedStatus?: number | undefined;
1742
+ } | {
1743
+ timeoutSeconds: number;
1744
+ kind: "tcp";
1745
+ } | {
1746
+ kind: "process";
1747
+ graceSeconds?: number | undefined;
1748
+ };
1733
1749
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1734
1750
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
1735
1751
  sourceRoots: string[];
@@ -1784,22 +1800,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1784
1800
  timeoutSeconds?: number | undefined;
1785
1801
  } | undefined;
1786
1802
  };
1787
- ready: {
1788
- path: string;
1789
- timeoutSeconds: number;
1790
- kind: "marker";
1791
- } | {
1792
- path: string;
1793
- timeoutSeconds: number;
1794
- kind: "http";
1795
- expectedStatus?: number | undefined;
1796
- } | {
1797
- timeoutSeconds: number;
1798
- kind: "tcp";
1799
- } | {
1800
- kind: "process";
1801
- graceSeconds?: number | undefined;
1802
- };
1803
1803
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
1804
1804
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
1805
1805
  shutdown: {
@@ -1873,6 +1873,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1873
1873
  diskBytes?: number | undefined;
1874
1874
  };
1875
1875
  id: string;
1876
+ ready: {
1877
+ path: string;
1878
+ timeoutSeconds: number;
1879
+ kind: "marker";
1880
+ } | {
1881
+ path: string;
1882
+ timeoutSeconds: number;
1883
+ kind: "http";
1884
+ expectedStatus: number;
1885
+ } | {
1886
+ timeoutSeconds: number;
1887
+ kind: "tcp";
1888
+ } | {
1889
+ kind: "process";
1890
+ graceSeconds: number;
1891
+ };
1876
1892
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1877
1893
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
1878
1894
  runtimeRequirements: string[];
@@ -1929,22 +1945,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
1929
1945
  cwd?: string | undefined;
1930
1946
  } | undefined;
1931
1947
  };
1932
- ready: {
1933
- path: string;
1934
- timeoutSeconds: number;
1935
- kind: "marker";
1936
- } | {
1937
- path: string;
1938
- timeoutSeconds: number;
1939
- kind: "http";
1940
- expectedStatus: number;
1941
- } | {
1942
- timeoutSeconds: number;
1943
- kind: "tcp";
1944
- } | {
1945
- kind: "process";
1946
- graceSeconds: number;
1947
- };
1948
1948
  outputs: {
1949
1949
  path: string;
1950
1950
  mediaType: string;
@@ -2006,6 +2006,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2006
2006
  } | undefined;
2007
2007
  }, {
2008
2008
  id: string;
2009
+ ready: {
2010
+ path: string;
2011
+ timeoutSeconds: number;
2012
+ kind: "marker";
2013
+ } | {
2014
+ path: string;
2015
+ timeoutSeconds: number;
2016
+ kind: "http";
2017
+ expectedStatus?: number | undefined;
2018
+ } | {
2019
+ timeoutSeconds: number;
2020
+ kind: "tcp";
2021
+ } | {
2022
+ kind: "process";
2023
+ graceSeconds?: number | undefined;
2024
+ };
2009
2025
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2010
2026
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2011
2027
  sourceRoots: string[];
@@ -2060,22 +2076,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2060
2076
  timeoutSeconds?: number | undefined;
2061
2077
  } | undefined;
2062
2078
  };
2063
- ready: {
2064
- path: string;
2065
- timeoutSeconds: number;
2066
- kind: "marker";
2067
- } | {
2068
- path: string;
2069
- timeoutSeconds: number;
2070
- kind: "http";
2071
- expectedStatus?: number | undefined;
2072
- } | {
2073
- timeoutSeconds: number;
2074
- kind: "tcp";
2075
- } | {
2076
- kind: "process";
2077
- graceSeconds?: number | undefined;
2078
- };
2079
2079
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
2080
2080
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
2081
2081
  shutdown: {
@@ -2156,6 +2156,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2156
2156
  diskBytes?: number | undefined;
2157
2157
  };
2158
2158
  id: string;
2159
+ ready: {
2160
+ path: string;
2161
+ timeoutSeconds: number;
2162
+ kind: "marker";
2163
+ } | {
2164
+ path: string;
2165
+ timeoutSeconds: number;
2166
+ kind: "http";
2167
+ expectedStatus: number;
2168
+ } | {
2169
+ timeoutSeconds: number;
2170
+ kind: "tcp";
2171
+ } | {
2172
+ kind: "process";
2173
+ graceSeconds: number;
2174
+ };
2159
2175
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2160
2176
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2161
2177
  runtimeRequirements: string[];
@@ -2212,22 +2228,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2212
2228
  cwd?: string | undefined;
2213
2229
  } | undefined;
2214
2230
  };
2215
- ready: {
2216
- path: string;
2217
- timeoutSeconds: number;
2218
- kind: "marker";
2219
- } | {
2220
- path: string;
2221
- timeoutSeconds: number;
2222
- kind: "http";
2223
- expectedStatus: number;
2224
- } | {
2225
- timeoutSeconds: number;
2226
- kind: "tcp";
2227
- } | {
2228
- kind: "process";
2229
- graceSeconds: number;
2230
- };
2231
2231
  outputs: {
2232
2232
  path: string;
2233
2233
  mediaType: string;
@@ -2300,6 +2300,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2300
2300
  schemaVersion: "treeseed.development-runtime/v1";
2301
2301
  targets: {
2302
2302
  id: string;
2303
+ ready: {
2304
+ path: string;
2305
+ timeoutSeconds: number;
2306
+ kind: "marker";
2307
+ } | {
2308
+ path: string;
2309
+ timeoutSeconds: number;
2310
+ kind: "http";
2311
+ expectedStatus?: number | undefined;
2312
+ } | {
2313
+ timeoutSeconds: number;
2314
+ kind: "tcp";
2315
+ } | {
2316
+ kind: "process";
2317
+ graceSeconds?: number | undefined;
2318
+ };
2303
2319
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2304
2320
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2305
2321
  sourceRoots: string[];
@@ -2354,22 +2370,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2354
2370
  timeoutSeconds?: number | undefined;
2355
2371
  } | undefined;
2356
2372
  };
2357
- ready: {
2358
- path: string;
2359
- timeoutSeconds: number;
2360
- kind: "marker";
2361
- } | {
2362
- path: string;
2363
- timeoutSeconds: number;
2364
- kind: "http";
2365
- expectedStatus?: number | undefined;
2366
- } | {
2367
- timeoutSeconds: number;
2368
- kind: "tcp";
2369
- } | {
2370
- kind: "process";
2371
- graceSeconds?: number | undefined;
2372
- };
2373
2373
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
2374
2374
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
2375
2375
  shutdown: {
@@ -2454,6 +2454,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2454
2454
  diskBytes?: number | undefined;
2455
2455
  };
2456
2456
  id: string;
2457
+ ready: {
2458
+ path: string;
2459
+ timeoutSeconds: number;
2460
+ kind: "marker";
2461
+ } | {
2462
+ path: string;
2463
+ timeoutSeconds: number;
2464
+ kind: "http";
2465
+ expectedStatus: number;
2466
+ } | {
2467
+ timeoutSeconds: number;
2468
+ kind: "tcp";
2469
+ } | {
2470
+ kind: "process";
2471
+ graceSeconds: number;
2472
+ };
2457
2473
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2458
2474
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2459
2475
  runtimeRequirements: string[];
@@ -2510,22 +2526,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2510
2526
  cwd?: string | undefined;
2511
2527
  } | undefined;
2512
2528
  };
2513
- ready: {
2514
- path: string;
2515
- timeoutSeconds: number;
2516
- kind: "marker";
2517
- } | {
2518
- path: string;
2519
- timeoutSeconds: number;
2520
- kind: "http";
2521
- expectedStatus: number;
2522
- } | {
2523
- timeoutSeconds: number;
2524
- kind: "tcp";
2525
- } | {
2526
- kind: "process";
2527
- graceSeconds: number;
2528
- };
2529
2529
  outputs: {
2530
2530
  path: string;
2531
2531
  mediaType: string;
@@ -2598,6 +2598,22 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2598
2598
  schemaVersion: "treeseed.development-runtime/v1";
2599
2599
  targets: {
2600
2600
  id: string;
2601
+ ready: {
2602
+ path: string;
2603
+ timeoutSeconds: number;
2604
+ kind: "marker";
2605
+ } | {
2606
+ path: string;
2607
+ timeoutSeconds: number;
2608
+ kind: "http";
2609
+ expectedStatus?: number | undefined;
2610
+ } | {
2611
+ timeoutSeconds: number;
2612
+ kind: "tcp";
2613
+ } | {
2614
+ kind: "process";
2615
+ graceSeconds?: number | undefined;
2616
+ };
2601
2617
  kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2602
2618
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2603
2619
  sourceRoots: string[];
@@ -2652,22 +2668,6 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodObject<{
2652
2668
  timeoutSeconds?: number | undefined;
2653
2669
  } | undefined;
2654
2670
  };
2655
- ready: {
2656
- path: string;
2657
- timeoutSeconds: number;
2658
- kind: "marker";
2659
- } | {
2660
- path: string;
2661
- timeoutSeconds: number;
2662
- kind: "http";
2663
- expectedStatus?: number | undefined;
2664
- } | {
2665
- timeoutSeconds: number;
2666
- kind: "tcp";
2667
- } | {
2668
- kind: "process";
2669
- graceSeconds?: number | undefined;
2670
- };
2671
2671
  statePolicy: "clone" | "stateless" | "ephemeral" | "shared-compatible";
2672
2672
  migrationPolicy: "none" | "explicit-review" | "disposable-only";
2673
2673
  shutdown: {
@@ -149,6 +149,20 @@ export declare const projectCreatePlanSchema: z.ZodObject<{
149
149
  visibility: "public" | "private";
150
150
  }>;
151
151
  steps: z.ZodArray<z.ZodEnum<["project", "repository", "template", "library", "inventory"]>, "many">;
152
+ actions: z.ZodArray<z.ZodObject<{
153
+ step: z.ZodEnum<["project", "repository", "template", "library", "inventory"]>;
154
+ action: z.ZodEnum<["create", "adopt", "apply", "bind", "publish", "noop", "blocked"]>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
157
+ step: "project" | "library" | "repository" | "template" | "inventory";
158
+ }, {
159
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
160
+ step: "project" | "library" | "repository" | "template" | "inventory";
161
+ }>, "many">;
162
+ observationDigest: z.ZodString;
163
+ planDigest: z.ZodString;
164
+ ok: z.ZodBoolean;
165
+ blockers: z.ZodArray<z.ZodString, "many">;
152
166
  }, "strict", z.ZodTypeAny, {
153
167
  slug: string;
154
168
  schemaVersion: "treeseed.platform-project-create-plan/v1";
@@ -157,6 +171,9 @@ export declare const projectCreatePlanSchema: z.ZodObject<{
157
171
  owner: string;
158
172
  visibility: "public" | "private";
159
173
  };
174
+ blockers: string[];
175
+ ok: boolean;
176
+ planDigest: string;
160
177
  template: {
161
178
  id: string;
162
179
  version: string;
@@ -164,6 +181,11 @@ export declare const projectCreatePlanSchema: z.ZodObject<{
164
181
  };
165
182
  team: string;
166
183
  steps: ("project" | "library" | "repository" | "template" | "inventory")[];
184
+ actions: {
185
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
186
+ step: "project" | "library" | "repository" | "template" | "inventory";
187
+ }[];
188
+ observationDigest: string;
167
189
  }, {
168
190
  slug: string;
169
191
  schemaVersion: "treeseed.platform-project-create-plan/v1";
@@ -172,6 +194,9 @@ export declare const projectCreatePlanSchema: z.ZodObject<{
172
194
  owner: string;
173
195
  visibility: "public" | "private";
174
196
  };
197
+ blockers: string[];
198
+ ok: boolean;
199
+ planDigest: string;
175
200
  template: {
176
201
  id: string;
177
202
  version: string;
@@ -179,9 +204,15 @@ export declare const projectCreatePlanSchema: z.ZodObject<{
179
204
  };
180
205
  team: string;
181
206
  steps: ("project" | "library" | "repository" | "template" | "inventory")[];
207
+ actions: {
208
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
209
+ step: "project" | "library" | "repository" | "template" | "inventory";
210
+ }[];
211
+ observationDigest: string;
182
212
  }>;
183
- export declare const projectCreateReceiptSchema: z.ZodObject<Omit<{
184
- schemaVersion: z.ZodLiteral<"treeseed.platform-project-create-plan/v1">;
213
+ export declare const projectCreateReceiptSchema: z.ZodObject<{
214
+ schemaVersion: z.ZodLiteral<"treeseed.platform-project-create-receipt/v1">;
215
+ planDigest: z.ZodString;
185
216
  slug: z.ZodString;
186
217
  template: z.ZodObject<{
187
218
  id: z.ZodString;
@@ -210,13 +241,20 @@ export declare const projectCreateReceiptSchema: z.ZodObject<Omit<{
210
241
  owner: string;
211
242
  visibility: "public" | "private";
212
243
  }>;
213
- steps: z.ZodArray<z.ZodEnum<["project", "repository", "template", "library", "inventory"]>, "many">;
214
- }, "schemaVersion"> & {
215
- schemaVersion: z.ZodLiteral<"treeseed.platform-project-create-receipt/v1">;
216
244
  projectId: z.ZodString;
217
245
  repositoryUrl: z.ZodString;
218
246
  libraryBindingId: z.ZodString;
219
247
  inventoryVersion: z.ZodNumber;
248
+ actions: z.ZodArray<z.ZodObject<{
249
+ step: z.ZodEnum<["project", "repository", "template", "library", "inventory"]>;
250
+ action: z.ZodEnum<["create", "adopt", "apply", "bind", "publish", "noop", "blocked"]>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
253
+ step: "project" | "library" | "repository" | "template" | "inventory";
254
+ }, {
255
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
256
+ step: "project" | "library" | "repository" | "template" | "inventory";
257
+ }>, "many">;
220
258
  }, "strict", z.ZodTypeAny, {
221
259
  slug: string;
222
260
  schemaVersion: "treeseed.platform-project-create-receipt/v1";
@@ -225,13 +263,17 @@ export declare const projectCreateReceiptSchema: z.ZodObject<Omit<{
225
263
  owner: string;
226
264
  visibility: "public" | "private";
227
265
  };
266
+ planDigest: string;
228
267
  template: {
229
268
  id: string;
230
269
  version: string;
231
270
  digest: string;
232
271
  };
233
272
  team: string;
234
- steps: ("project" | "library" | "repository" | "template" | "inventory")[];
273
+ actions: {
274
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
275
+ step: "project" | "library" | "repository" | "template" | "inventory";
276
+ }[];
235
277
  projectId: string;
236
278
  repositoryUrl: string;
237
279
  libraryBindingId: string;
@@ -244,13 +286,17 @@ export declare const projectCreateReceiptSchema: z.ZodObject<Omit<{
244
286
  owner: string;
245
287
  visibility: "public" | "private";
246
288
  };
289
+ planDigest: string;
247
290
  template: {
248
291
  id: string;
249
292
  version: string;
250
293
  digest: string;
251
294
  };
252
295
  team: string;
253
- steps: ("project" | "library" | "repository" | "template" | "inventory")[];
296
+ actions: {
297
+ action: "noop" | "blocked" | "create" | "adopt" | "apply" | "bind" | "publish";
298
+ step: "project" | "library" | "repository" | "template" | "inventory";
299
+ }[];
254
300
  projectId: string;
255
301
  repositoryUrl: string;
256
302
  libraryBindingId: string;
@@ -27,14 +27,28 @@ const projectCreatePlanSchema = z.object({
27
27
  template: z.object({ id: z.string().min(1), version: z.string().min(1), digest }),
28
28
  team: z.string().min(1),
29
29
  repository: z.object({ owner: z.string().min(1), name: z.string().min(1), visibility: z.enum(["public", "private"]) }),
30
- steps: z.array(z.enum(["project", "repository", "template", "library", "inventory"]))
30
+ steps: z.array(z.enum(["project", "repository", "template", "library", "inventory"])),
31
+ actions: z.array(z.object({
32
+ step: z.enum(["project", "repository", "template", "library", "inventory"]),
33
+ action: z.enum(["create", "adopt", "apply", "bind", "publish", "noop", "blocked"])
34
+ })),
35
+ observationDigest: digest,
36
+ planDigest: digest,
37
+ ok: z.boolean(),
38
+ blockers: z.array(z.string())
31
39
  }).strict();
32
- const projectCreateReceiptSchema = projectCreatePlanSchema.omit({ schemaVersion: true }).extend({
40
+ const projectCreateReceiptSchema = z.object({
33
41
  schemaVersion: z.literal("treeseed.platform-project-create-receipt/v1"),
42
+ planDigest: digest,
43
+ slug: projectCreatePlanSchema.shape.slug,
44
+ template: projectCreatePlanSchema.shape.template,
45
+ team: z.string().min(1),
46
+ repository: projectCreatePlanSchema.shape.repository,
34
47
  projectId: z.string().min(1),
35
48
  repositoryUrl: z.string().url(),
36
49
  libraryBindingId: z.string().min(1),
37
- inventoryVersion: z.number().int().positive()
50
+ inventoryVersion: z.number().int().positive(),
51
+ actions: projectCreatePlanSchema.shape.actions
38
52
  }).strict();
39
53
  const providerRegistrationRequestSchema = z.object({
40
54
  schemaVersion: z.literal("treeseed.provider-registration-request/v1"),
@@ -1,5 +1,6 @@
1
1
  export * from './schemas.js';
2
2
  export * from './contracts.js';
3
3
  export * from './inventory.js';
4
+ export * from './project-create.js';
4
5
  export * from './workset.js';
5
6
  export * from './verification.js';
@@ -1,5 +1,6 @@
1
1
  export * from "./schemas.js";
2
2
  export * from "./contracts.js";
3
3
  export * from "./inventory.js";
4
+ export * from "./project-create.js";
4
5
  export * from "./workset.js";
5
6
  export * from "./verification.js";
@@ -0,0 +1,49 @@
1
+ import { type ProjectCreatePlan, type ProjectCreateReceipt } from './contracts.js';
2
+ export type ProjectCreateStep = 'project' | 'repository' | 'template' | 'library' | 'inventory';
3
+ export type ProjectCreateState = 'missing' | 'ready' | 'conflict';
4
+ export interface ProjectCreateTarget {
5
+ slug: string;
6
+ template: {
7
+ id: string;
8
+ version: string;
9
+ digest: string;
10
+ };
11
+ team: string;
12
+ repository: {
13
+ owner: string;
14
+ name: string;
15
+ visibility: 'public' | 'private';
16
+ };
17
+ }
18
+ export interface ProjectCreateObservation {
19
+ project: {
20
+ state: ProjectCreateState;
21
+ id?: string;
22
+ };
23
+ repository: {
24
+ state: ProjectCreateState;
25
+ url?: string;
26
+ };
27
+ template: {
28
+ state: ProjectCreateState;
29
+ digest?: string;
30
+ };
31
+ library: {
32
+ state: ProjectCreateState;
33
+ bindingId?: string;
34
+ };
35
+ inventory: {
36
+ state: ProjectCreateState;
37
+ version?: number;
38
+ };
39
+ }
40
+ export interface ProjectCreateAuthority {
41
+ observe(target: ProjectCreateTarget): Promise<ProjectCreateObservation>;
42
+ reconcileProject(target: ProjectCreateTarget): Promise<void>;
43
+ reconcileRepository(target: ProjectCreateTarget): Promise<void>;
44
+ applyTemplate(target: ProjectCreateTarget): Promise<void>;
45
+ reconcileLibrary(target: ProjectCreateTarget): Promise<void>;
46
+ publishInventory(target: ProjectCreateTarget): Promise<void>;
47
+ }
48
+ export declare function planPlatformProjectCreate(target: ProjectCreateTarget, authority: Pick<ProjectCreateAuthority, 'observe'>): Promise<ProjectCreatePlan>;
49
+ export declare function applyPlatformProjectCreate(plan: ProjectCreatePlan, authority: ProjectCreateAuthority): Promise<ProjectCreateReceipt>;
@@ -0,0 +1,75 @@
1
+ import { createHash } from "node:crypto";
2
+ import { projectCreatePlanSchema, projectCreateReceiptSchema } from "./contracts.js";
3
+ const steps = ["project", "repository", "template", "library", "inventory"];
4
+ const actionFor = {
5
+ project: "create",
6
+ repository: "adopt",
7
+ template: "apply",
8
+ library: "bind",
9
+ inventory: "publish"
10
+ };
11
+ function canonical(value) {
12
+ if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
13
+ if (value && typeof value === "object") return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${canonical(item)}`).join(",")}}`;
14
+ return JSON.stringify(value);
15
+ }
16
+ function digest(value) {
17
+ return `sha256:${createHash("sha256").update(canonical(value)).digest("hex")}`;
18
+ }
19
+ function blockers(observation) {
20
+ return steps.filter((step) => observation[step].state === "conflict").map((step) => `${step}_conflicts_with_requested_target`);
21
+ }
22
+ async function planPlatformProjectCreate(target, authority) {
23
+ const observation = await authority.observe(target);
24
+ const conflicts = blockers(observation);
25
+ const base = {
26
+ schemaVersion: "treeseed.platform-project-create-plan/v1",
27
+ ...target,
28
+ steps: [...steps],
29
+ actions: steps.map((step) => ({ step, action: observation[step].state === "ready" ? "noop" : observation[step].state === "conflict" ? "blocked" : actionFor[step] })),
30
+ observationDigest: digest(observation),
31
+ ok: conflicts.length === 0,
32
+ blockers: conflicts
33
+ };
34
+ return projectCreatePlanSchema.parse({ ...base, planDigest: digest(base) });
35
+ }
36
+ function requireReady(observation) {
37
+ const incomplete = steps.filter((step) => observation[step].state !== "ready");
38
+ if (incomplete.length) throw new Error(`Project creation postconditions are incomplete: ${incomplete.join(", ")}.`);
39
+ if (!observation.project.id || !observation.repository.url || !observation.library.bindingId || !observation.inventory.version) {
40
+ throw new Error("Project creation authority returned incomplete receipt identities.");
41
+ }
42
+ }
43
+ async function applyPlatformProjectCreate(plan, authority) {
44
+ const accepted = projectCreatePlanSchema.parse(plan);
45
+ const { planDigest: _planDigest, ...unsigned } = accepted;
46
+ if (digest(unsigned) !== accepted.planDigest) throw new Error("Project creation plan digest does not match its frozen inputs.");
47
+ if (!accepted.ok || accepted.blockers.length) throw new Error("Blocked project creation plans cannot be applied.");
48
+ const target = { slug: accepted.slug, template: accepted.template, team: accepted.team, repository: accepted.repository };
49
+ const current = await authority.observe(target);
50
+ if (digest(current) !== accepted.observationDigest) throw new Error("Project creation authority changed after planning; create a new plan.");
51
+ const operations = {
52
+ project: authority.reconcileProject,
53
+ repository: authority.reconcileRepository,
54
+ template: authority.applyTemplate,
55
+ library: authority.reconcileLibrary,
56
+ inventory: authority.publishInventory
57
+ };
58
+ for (const item of accepted.actions) if (item.action !== "noop") await operations[item.step].call(authority, target);
59
+ const final = await authority.observe(target);
60
+ requireReady(final);
61
+ return projectCreateReceiptSchema.parse({
62
+ schemaVersion: "treeseed.platform-project-create-receipt/v1",
63
+ planDigest: accepted.planDigest,
64
+ ...target,
65
+ projectId: final.project.id,
66
+ repositoryUrl: final.repository.url,
67
+ libraryBindingId: final.library.bindingId,
68
+ inventoryVersion: final.inventory.version,
69
+ actions: accepted.actions
70
+ });
71
+ }
72
+ export {
73
+ applyPlatformProjectCreate,
74
+ planPlatformProjectCreate
75
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.67",
3
+ "version": "0.13.0-rc.68",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {