@treeseed/sdk 0.13.0-rc.85 → 0.13.0-rc.86

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-03T08:31:01.823Z"}
1
+ {"completedAt":"2026-09-03T11:02:09.609Z"}
@@ -21917,7 +21917,7 @@ export declare function describeContentFrontmatterSchema(model: PortableContentM
21917
21917
  }>;
21918
21918
  /** A JSON-safe description derived directly from the canonical validation schema. */
21919
21919
  export declare function describeContentFrontmatterContract(model: PortableContentModel): {
21920
- model: "knowledge" | "decision" | "agent" | "objective" | "workday" | "proposal" | "question" | "group" | "discussion" | "page" | "person" | "note" | "book" | "discussion_message" | "discussion_event" | "group_edge" | "agent_context_query" | "agent_context_query_set" | "agent_instruction_template" | "discussion_topic" | "assignment_plan" | "assignment_status" | "assignment_summary" | "agent_evaluation" | "agent_test" | "template_product";
21920
+ model: "knowledge" | "agent" | "decision" | "objective" | "workday" | "proposal" | "question" | "group" | "discussion" | "page" | "person" | "note" | "book" | "discussion_message" | "discussion_event" | "group_edge" | "agent_context_query" | "agent_context_query_set" | "agent_instruction_template" | "discussion_topic" | "assignment_plan" | "assignment_status" | "assignment_summary" | "agent_evaluation" | "agent_test" | "template_product";
21921
21921
  fields: {
21922
21922
  [k: string]: Record<string, unknown>;
21923
21923
  };
@@ -6,7 +6,7 @@ export declare const hostedTopologyTemplateSchema: z.ZodEffects<z.ZodObject<{
6
6
  deploymentId: z.ZodString;
7
7
  stackId: z.ZodString;
8
8
  environment: z.ZodEnum<["staging", "production"]>;
9
- mutation: z.ZodLiteral<"approval-required">;
9
+ mutation: z.ZodLiteral<"agent-authorized">;
10
10
  stateBackend: z.ZodObject<{
11
11
  connectionRef: z.ZodString;
12
12
  }, "strict", z.ZodTypeAny, {
@@ -160,7 +160,7 @@ export declare const hostedTopologyTemplateSchema: z.ZodEffects<z.ZodObject<{
160
160
  };
161
161
  }[];
162
162
  id: string;
163
- mutation: "approval-required";
163
+ mutation: "agent-authorized";
164
164
  environment: "production" | "staging";
165
165
  deploymentId: string;
166
166
  stackId: string;
@@ -200,7 +200,7 @@ export declare const hostedTopologyTemplateSchema: z.ZodEffects<z.ZodObject<{
200
200
  }> | undefined;
201
201
  }[];
202
202
  id: string;
203
- mutation: "approval-required";
203
+ mutation: "agent-authorized";
204
204
  environment: "production" | "staging";
205
205
  deploymentId: string;
206
206
  stackId: string;
@@ -240,7 +240,7 @@ export declare const hostedTopologyTemplateSchema: z.ZodEffects<z.ZodObject<{
240
240
  };
241
241
  }[];
242
242
  id: string;
243
- mutation: "approval-required";
243
+ mutation: "agent-authorized";
244
244
  environment: "production" | "staging";
245
245
  deploymentId: string;
246
246
  stackId: string;
@@ -280,7 +280,7 @@ export declare const hostedTopologyTemplateSchema: z.ZodEffects<z.ZodObject<{
280
280
  }> | undefined;
281
281
  }[];
282
282
  id: string;
283
- mutation: "approval-required";
283
+ mutation: "agent-authorized";
284
284
  environment: "production" | "staging";
285
285
  deploymentId: string;
286
286
  stackId: string;
@@ -421,7 +421,7 @@ export declare function compileHostedTopologyTemplate(input: {
421
421
  repository: "treeseed-ai/platform";
422
422
  commit: string;
423
423
  };
424
- mutation: "approval-required";
424
+ mutation: "agent-authorized";
425
425
  environment: "production" | "staging";
426
426
  artifacts: Record<string, {
427
427
  digest: string;
@@ -9,7 +9,7 @@ const hostedTopologyTemplateSchema = z.object({
9
9
  deploymentId: custodyIdentifier,
10
10
  stackId: custodyIdentifier,
11
11
  environment: z.enum(["staging", "production"]),
12
- mutation: z.literal("approval-required"),
12
+ mutation: z.literal("agent-authorized"),
13
13
  stateBackend: z.object({ connectionRef: identifier }).strict(),
14
14
  providerConnections: z.record(hostedProviderSchema, z.object({ connectionRef: identifier }).strict()),
15
15
  artifactBindings: z.record(identifier, z.object({ input: identifier, kind: z.enum(["archive", "file", "oci-image"]) }).strict()),
@@ -320,7 +320,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
320
320
  deploymentId: z.ZodString;
321
321
  stackId: z.ZodString;
322
322
  environment: z.ZodEnum<["staging", "production"]>;
323
- mutation: z.ZodLiteral<"approval-required">;
323
+ mutation: z.ZodLiteral<"agent-authorized">;
324
324
  platform: z.ZodObject<{
325
325
  repository: z.ZodLiteral<"treeseed-ai/platform">;
326
326
  commit: z.ZodString;
@@ -530,7 +530,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
530
530
  repository: "treeseed-ai/platform";
531
531
  commit: string;
532
532
  };
533
- mutation: "approval-required";
533
+ mutation: "agent-authorized";
534
534
  environment: "production" | "staging";
535
535
  artifacts: Record<string, {
536
536
  digest: string;
@@ -586,7 +586,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
586
586
  repository: "treeseed-ai/platform";
587
587
  commit: string;
588
588
  };
589
- mutation: "approval-required";
589
+ mutation: "agent-authorized";
590
590
  environment: "production" | "staging";
591
591
  artifacts: Record<string, {
592
592
  digest: string;
@@ -642,7 +642,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
642
642
  repository: "treeseed-ai/platform";
643
643
  commit: string;
644
644
  };
645
- mutation: "approval-required";
645
+ mutation: "agent-authorized";
646
646
  environment: "production" | "staging";
647
647
  artifacts: Record<string, {
648
648
  digest: string;
@@ -698,7 +698,7 @@ export declare const hostedTopologyDeclarationSchema: z.ZodEffects<z.ZodObject<{
698
698
  repository: "treeseed-ai/platform";
699
699
  commit: string;
700
700
  };
701
- mutation: "approval-required";
701
+ mutation: "agent-authorized";
702
702
  environment: "production" | "staging";
703
703
  artifacts: Record<string, {
704
704
  digest: string;
@@ -1094,7 +1094,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1094
1094
  message: string;
1095
1095
  resourceId?: string | undefined;
1096
1096
  }>, "many">;
1097
- readonly approvalRequired: z.ZodBoolean;
1097
+ readonly authorization: z.ZodLiteral<"authenticated-agent">;
1098
1098
  readonly executable: z.ZodLiteral<false>;
1099
1099
  }, "strict", z.ZodTypeAny, {
1100
1100
  schemaVersion: "treeseed.hosted-topology-plan/v1";
@@ -1180,7 +1180,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1180
1180
  declarationDigest: string;
1181
1181
  topologyId: string;
1182
1182
  platformCommit: string;
1183
- approvalRequired: boolean;
1183
+ authorization: "authenticated-agent";
1184
1184
  }, {
1185
1185
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1186
1186
  blockers: {
@@ -1265,7 +1265,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1265
1265
  declarationDigest: string;
1266
1266
  topologyId: string;
1267
1267
  platformCommit: string;
1268
- approvalRequired: boolean;
1268
+ authorization: "authenticated-agent";
1269
1269
  }>, {
1270
1270
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1271
1271
  blockers: {
@@ -1350,7 +1350,7 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1350
1350
  declarationDigest: string;
1351
1351
  topologyId: string;
1352
1352
  platformCommit: string;
1353
- approvalRequired: boolean;
1353
+ authorization: "authenticated-agent";
1354
1354
  }, {
1355
1355
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1356
1356
  blockers: {
@@ -1435,78 +1435,10 @@ export declare const hostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1435
1435
  declarationDigest: string;
1436
1436
  topologyId: string;
1437
1437
  platformCommit: string;
1438
- approvalRequired: boolean;
1438
+ authorization: "authenticated-agent";
1439
1439
  }>;
1440
- export declare const hostedTopologyApprovalSchema: z.ZodObject<{
1441
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
1442
- planDigest: z.ZodString;
1443
- teamId: z.ZodString;
1444
- deploymentId: z.ZodString;
1445
- stackId: z.ZodString;
1446
- environment: z.ZodEnum<["staging", "production"]>;
1447
- backendBindingDigest: z.ZodString;
1448
- decision: z.ZodLiteral<"approved">;
1449
- approvedBy: z.ZodString;
1450
- approvedAt: z.ZodString;
1451
- }, "strict", z.ZodTypeAny, {
1452
- schemaVersion: "treeseed.hosted-topology-approval/v1";
1453
- planDigest: string;
1454
- teamId: string;
1455
- environment: "production" | "staging";
1456
- deploymentId: string;
1457
- stackId: string;
1458
- backendBindingDigest: string;
1459
- decision: "approved";
1460
- approvedBy: string;
1461
- approvedAt: string;
1462
- }, {
1463
- schemaVersion: "treeseed.hosted-topology-approval/v1";
1464
- planDigest: string;
1465
- teamId: string;
1466
- environment: "production" | "staging";
1467
- deploymentId: string;
1468
- stackId: string;
1469
- backendBindingDigest: string;
1470
- decision: "approved";
1471
- approvedBy: string;
1472
- approvedAt: string;
1473
- }>;
1474
- export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<Omit<{
1440
+ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObject<{
1475
1441
  executable: z.ZodLiteral<true>;
1476
- approval: z.ZodNullable<z.ZodObject<{
1477
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-approval/v1">;
1478
- planDigest: z.ZodString;
1479
- teamId: z.ZodString;
1480
- deploymentId: z.ZodString;
1481
- stackId: z.ZodString;
1482
- environment: z.ZodEnum<["staging", "production"]>;
1483
- backendBindingDigest: z.ZodString;
1484
- decision: z.ZodLiteral<"approved">;
1485
- approvedBy: z.ZodString;
1486
- approvedAt: z.ZodString;
1487
- }, "strict", z.ZodTypeAny, {
1488
- schemaVersion: "treeseed.hosted-topology-approval/v1";
1489
- planDigest: string;
1490
- teamId: string;
1491
- environment: "production" | "staging";
1492
- deploymentId: string;
1493
- stackId: string;
1494
- backendBindingDigest: string;
1495
- decision: "approved";
1496
- approvedBy: string;
1497
- approvedAt: string;
1498
- }, {
1499
- schemaVersion: "treeseed.hosted-topology-approval/v1";
1500
- planDigest: string;
1501
- teamId: string;
1502
- environment: "production" | "staging";
1503
- deploymentId: string;
1504
- stackId: string;
1505
- backendBindingDigest: string;
1506
- decision: "approved";
1507
- approvedBy: string;
1508
- approvedAt: string;
1509
- }>>;
1510
1442
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-plan/v1">;
1511
1443
  planId: z.ZodString;
1512
1444
  planDigest: z.ZodString;
@@ -1848,8 +1780,8 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1848
1780
  message: string;
1849
1781
  resourceId?: string | undefined;
1850
1782
  }>, "many">;
1851
- approvalRequired: z.ZodBoolean;
1852
- }, "approvalRequired">, "strict", z.ZodTypeAny, {
1783
+ authorization: z.ZodLiteral<"authenticated-agent">;
1784
+ }, "strict", z.ZodTypeAny, {
1853
1785
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1854
1786
  blockers: {
1855
1787
  code: "connection-unavailable" | "state-backend-unavailable" | "dependency-cycle" | "observation-unhealthy" | "adoption-drift";
@@ -1933,18 +1865,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
1933
1865
  declarationDigest: string;
1934
1866
  topologyId: string;
1935
1867
  platformCommit: string;
1936
- approval: {
1937
- schemaVersion: "treeseed.hosted-topology-approval/v1";
1938
- planDigest: string;
1939
- teamId: string;
1940
- environment: "production" | "staging";
1941
- deploymentId: string;
1942
- stackId: string;
1943
- backendBindingDigest: string;
1944
- decision: "approved";
1945
- approvedBy: string;
1946
- approvedAt: string;
1947
- } | null;
1868
+ authorization: "authenticated-agent";
1948
1869
  }, {
1949
1870
  schemaVersion: "treeseed.hosted-topology-plan/v1";
1950
1871
  blockers: {
@@ -2029,18 +1950,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
2029
1950
  declarationDigest: string;
2030
1951
  topologyId: string;
2031
1952
  platformCommit: string;
2032
- approval: {
2033
- schemaVersion: "treeseed.hosted-topology-approval/v1";
2034
- planDigest: string;
2035
- teamId: string;
2036
- environment: "production" | "staging";
2037
- deploymentId: string;
2038
- stackId: string;
2039
- backendBindingDigest: string;
2040
- decision: "approved";
2041
- approvedBy: string;
2042
- approvedAt: string;
2043
- } | null;
1953
+ authorization: "authenticated-agent";
2044
1954
  }>, {
2045
1955
  schemaVersion: "treeseed.hosted-topology-plan/v1";
2046
1956
  blockers: {
@@ -2125,18 +2035,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
2125
2035
  declarationDigest: string;
2126
2036
  topologyId: string;
2127
2037
  platformCommit: string;
2128
- approval: {
2129
- schemaVersion: "treeseed.hosted-topology-approval/v1";
2130
- planDigest: string;
2131
- teamId: string;
2132
- environment: "production" | "staging";
2133
- deploymentId: string;
2134
- stackId: string;
2135
- backendBindingDigest: string;
2136
- decision: "approved";
2137
- approvedBy: string;
2138
- approvedAt: string;
2139
- } | null;
2038
+ authorization: "authenticated-agent";
2140
2039
  }, {
2141
2040
  schemaVersion: "treeseed.hosted-topology-plan/v1";
2142
2041
  blockers: {
@@ -2221,18 +2120,7 @@ export declare const authorizedHostedTopologyPlanSchema: z.ZodEffects<z.ZodObjec
2221
2120
  declarationDigest: string;
2222
2121
  topologyId: string;
2223
2122
  platformCommit: string;
2224
- approval: {
2225
- schemaVersion: "treeseed.hosted-topology-approval/v1";
2226
- planDigest: string;
2227
- teamId: string;
2228
- environment: "production" | "staging";
2229
- deploymentId: string;
2230
- stackId: string;
2231
- backendBindingDigest: string;
2232
- decision: "approved";
2233
- approvedBy: string;
2234
- approvedAt: string;
2235
- } | null;
2123
+ authorization: "authenticated-agent";
2236
2124
  }>;
2237
2125
  export declare const hostedTopologyReceiptSchema: z.ZodObject<{
2238
2126
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-receipt/v1">;
@@ -2373,7 +2261,7 @@ export declare const hostedTopologyReceiptSchema: z.ZodObject<{
2373
2261
  observedAt: string;
2374
2262
  }[];
2375
2263
  }>;
2376
- export declare const hostedTopologyRollbackSchema: z.ZodObject<{
2264
+ export declare const hostedTopologyRollbackSchema: z.ZodEffects<z.ZodObject<{
2377
2265
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
2378
2266
  rollbackId: z.ZodString;
2379
2267
  sourceReceiptId: z.ZodString;
@@ -2431,44 +2319,42 @@ export declare const hostedTopologyRollbackSchema: z.ZodObject<{
2431
2319
  rollbackId: string;
2432
2320
  sourceReceiptId: string;
2433
2321
  rollbackDigest: string;
2434
- }>;
2435
- export declare const hostedTopologyRollbackApprovalSchema: z.ZodObject<{
2436
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-approval/v1">;
2437
- rollbackDigest: z.ZodString;
2438
- teamId: z.ZodString;
2439
- deploymentId: z.ZodString;
2440
- stackId: z.ZodString;
2441
- environment: z.ZodEnum<["staging", "production"]>;
2442
- backendBindingDigest: z.ZodString;
2443
- decision: z.ZodLiteral<"approved">;
2444
- approvedBy: z.ZodString;
2445
- approvedAt: z.ZodString;
2446
- }, "strict", z.ZodTypeAny, {
2447
- schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2322
+ }>, {
2323
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
2448
2324
  teamId: string;
2449
2325
  environment: "production" | "staging";
2326
+ operations: {
2327
+ action: "noop" | "restore" | "delete-created";
2328
+ resourceId: string;
2329
+ providerResourceId: string;
2330
+ targetDigest: string | null;
2331
+ }[];
2450
2332
  deploymentId: string;
2451
2333
  stackId: string;
2452
2334
  backendBindingDigest: string;
2453
- decision: "approved";
2454
- approvedBy: string;
2455
- approvedAt: string;
2335
+ rollbackId: string;
2336
+ sourceReceiptId: string;
2456
2337
  rollbackDigest: string;
2457
2338
  }, {
2458
- schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2339
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
2459
2340
  teamId: string;
2460
2341
  environment: "production" | "staging";
2342
+ operations: {
2343
+ action: "noop" | "restore" | "delete-created";
2344
+ resourceId: string;
2345
+ providerResourceId: string;
2346
+ targetDigest: string | null;
2347
+ }[];
2461
2348
  deploymentId: string;
2462
2349
  stackId: string;
2463
2350
  backendBindingDigest: string;
2464
- decision: "approved";
2465
- approvedBy: string;
2466
- approvedAt: string;
2351
+ rollbackId: string;
2352
+ sourceReceiptId: string;
2467
2353
  rollbackDigest: string;
2468
2354
  }>;
2469
2355
  export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodObject<{
2470
2356
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-execution/v1">;
2471
- rollback: z.ZodObject<{
2357
+ rollback: z.ZodEffects<z.ZodObject<{
2472
2358
  schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback/v1">;
2473
2359
  rollbackId: z.ZodString;
2474
2360
  sourceReceiptId: z.ZodString;
@@ -2526,6 +2412,38 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
2526
2412
  rollbackId: string;
2527
2413
  sourceReceiptId: string;
2528
2414
  rollbackDigest: string;
2415
+ }>, {
2416
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
2417
+ teamId: string;
2418
+ environment: "production" | "staging";
2419
+ operations: {
2420
+ action: "noop" | "restore" | "delete-created";
2421
+ resourceId: string;
2422
+ providerResourceId: string;
2423
+ targetDigest: string | null;
2424
+ }[];
2425
+ deploymentId: string;
2426
+ stackId: string;
2427
+ backendBindingDigest: string;
2428
+ rollbackId: string;
2429
+ sourceReceiptId: string;
2430
+ rollbackDigest: string;
2431
+ }, {
2432
+ schemaVersion: "treeseed.hosted-topology-rollback/v1";
2433
+ teamId: string;
2434
+ environment: "production" | "staging";
2435
+ operations: {
2436
+ action: "noop" | "restore" | "delete-created";
2437
+ resourceId: string;
2438
+ providerResourceId: string;
2439
+ targetDigest: string | null;
2440
+ }[];
2441
+ deploymentId: string;
2442
+ stackId: string;
2443
+ backendBindingDigest: string;
2444
+ rollbackId: string;
2445
+ sourceReceiptId: string;
2446
+ rollbackDigest: string;
2529
2447
  }>;
2530
2448
  sourceReceiptId: z.ZodString;
2531
2449
  topologyId: z.ZodString;
@@ -2654,45 +2572,10 @@ export declare const hostedTopologyRollbackExecutionSchema: z.ZodEffects<z.ZodOb
2654
2572
  targetPlanDigest: string;
2655
2573
  executionDigest: string;
2656
2574
  }>;
2657
- export declare const hostedTopologyRollbackExecutionApprovalSchema: z.ZodObject<{
2658
- schemaVersion: z.ZodLiteral<"treeseed.hosted-topology-rollback-execution-approval/v1">;
2659
- executionDigest: z.ZodString;
2660
- teamId: z.ZodString;
2661
- deploymentId: z.ZodString;
2662
- stackId: z.ZodString;
2663
- environment: z.ZodEnum<["staging", "production"]>;
2664
- backendBindingDigest: z.ZodString;
2665
- decision: z.ZodLiteral<"approved">;
2666
- approvedBy: z.ZodString;
2667
- approvedAt: z.ZodString;
2668
- }, "strict", z.ZodTypeAny, {
2669
- schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2670
- teamId: string;
2671
- environment: "production" | "staging";
2672
- deploymentId: string;
2673
- stackId: string;
2674
- backendBindingDigest: string;
2675
- decision: "approved";
2676
- approvedBy: string;
2677
- approvedAt: string;
2678
- executionDigest: string;
2679
- }, {
2680
- schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2681
- teamId: string;
2682
- environment: "production" | "staging";
2683
- deploymentId: string;
2684
- stackId: string;
2685
- backendBindingDigest: string;
2686
- decision: "approved";
2687
- approvedBy: string;
2688
- approvedAt: string;
2689
- executionDigest: string;
2690
- }>;
2691
2575
  export type HostedTopologyDeclaration = z.infer<typeof hostedTopologyDeclarationSchema>;
2692
2576
  export type HostedStateBackend = z.infer<typeof hostedStateBackendSchema>;
2693
2577
  export type HostedResourceObservation = z.infer<typeof hostedResourceObservationSchema>;
2694
2578
  export type HostedTopologyPlan = z.infer<typeof hostedTopologyPlanSchema>;
2695
- export type HostedTopologyApproval = z.infer<typeof hostedTopologyApprovalSchema>;
2696
2579
  export type AuthorizedHostedTopologyPlan = z.infer<typeof authorizedHostedTopologyPlanSchema>;
2697
2580
  export type HostedTopologyReceipt = z.infer<typeof hostedTopologyReceiptSchema>;
2698
2581
  export type HostedTopologyRollbackExecution = z.infer<typeof hostedTopologyRollbackExecutionSchema>;
@@ -2702,7 +2585,7 @@ export declare function planHostedTopology(input: {
2702
2585
  connections: Partial<Record<z.infer<typeof hostedProviderSchema>, z.input<typeof hostedConnectionSnapshotSchema>>>;
2703
2586
  stateBackend?: z.input<typeof hostedStateBackendSchema>;
2704
2587
  }): HostedTopologyPlan;
2705
- export declare function authorizeHostedTopologyPlan(planInput: HostedTopologyPlan, approvalInput?: HostedTopologyApproval): AuthorizedHostedTopologyPlan;
2588
+ export declare function authorizeHostedTopologyPlan(planInput: HostedTopologyPlan): AuthorizedHostedTopologyPlan;
2706
2589
  export declare function verifyHostedTopologyReadback(input: {
2707
2590
  plan: AuthorizedHostedTopologyPlan;
2708
2591
  previousResources: HostedResourceObservation[];
@@ -2726,7 +2609,7 @@ export declare function planHostedTopologyRollback(receiptInput: HostedTopologyR
2726
2609
  sourceReceiptId: string;
2727
2610
  rollbackDigest: string;
2728
2611
  };
2729
- export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<typeof hostedTopologyRollbackSchema>, approvalInput: z.input<typeof hostedTopologyRollbackApprovalSchema>): {
2612
+ export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<typeof hostedTopologyRollbackSchema>): {
2730
2613
  rollback: {
2731
2614
  schemaVersion: "treeseed.hosted-topology-rollback/v1";
2732
2615
  teamId: string;
@@ -2744,18 +2627,6 @@ export declare function authorizeHostedTopologyRollback(rollbackInput: z.input<t
2744
2627
  sourceReceiptId: string;
2745
2628
  rollbackDigest: string;
2746
2629
  };
2747
- approval: {
2748
- schemaVersion: "treeseed.hosted-topology-rollback-approval/v1";
2749
- teamId: string;
2750
- environment: "production" | "staging";
2751
- deploymentId: string;
2752
- stackId: string;
2753
- backendBindingDigest: string;
2754
- decision: "approved";
2755
- approvedBy: string;
2756
- approvedAt: string;
2757
- rollbackDigest: string;
2758
- };
2759
2630
  };
2760
2631
  export declare function planHostedTopologyRollbackExecution(input: {
2761
2632
  rollback: z.input<typeof hostedTopologyRollbackSchema>;
@@ -2792,7 +2663,7 @@ export declare function planHostedTopologyRollbackExecution(input: {
2792
2663
  targetPlanDigest: string;
2793
2664
  executionDigest: string;
2794
2665
  };
2795
- export declare function authorizeHostedTopologyRollbackExecution(executionInput: z.input<typeof hostedTopologyRollbackExecutionSchema>, approvalInput: z.input<typeof hostedTopologyRollbackExecutionApprovalSchema>): {
2666
+ export declare function authorizeHostedTopologyRollbackExecution(executionInput: z.input<typeof hostedTopologyRollbackExecutionSchema>): {
2796
2667
  execution: {
2797
2668
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
2798
2669
  teamId: string;
@@ -2823,17 +2694,5 @@ export declare function authorizeHostedTopologyRollbackExecution(executionInput:
2823
2694
  targetPlanDigest: string;
2824
2695
  executionDigest: string;
2825
2696
  };
2826
- approval: {
2827
- schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
2828
- teamId: string;
2829
- environment: "production" | "staging";
2830
- deploymentId: string;
2831
- stackId: string;
2832
- backendBindingDigest: string;
2833
- decision: "approved";
2834
- approvedBy: string;
2835
- approvedAt: string;
2836
- executionDigest: string;
2837
- };
2838
2697
  };
2839
2698
  export {};
@@ -91,7 +91,7 @@ const hostedTopologyDeclarationSchema = z.object({
91
91
  deploymentId: custodyIdentifier,
92
92
  stackId: custodyIdentifier,
93
93
  environment: hostedEnvironmentSchema,
94
- mutation: z.literal("approval-required"),
94
+ mutation: z.literal("agent-authorized"),
95
95
  platform: z.object({ repository: z.literal("treeseed-ai/platform"), commit: gitCommit }).strict(),
96
96
  stateBackend: z.object({ connectionRef: identifier }).strict(),
97
97
  providerConnections: z.record(hostedProviderSchema, z.object({ connectionRef: identifier }).strict()),
@@ -146,7 +146,7 @@ const hostedTopologyPlanShape = {
146
146
  providerResourceId: z.string().min(1).max(512).nullable()
147
147
  }).strict()),
148
148
  blockers: z.array(z.object({ code: z.enum(["connection-unavailable", "state-backend-unavailable", "dependency-cycle", "observation-unhealthy", "adoption-drift"]), resourceId: identifier.optional(), message: z.string().min(1) }).strict()),
149
- approvalRequired: z.boolean(),
149
+ authorization: z.literal("authenticated-agent"),
150
150
  executable: z.literal(false)
151
151
  };
152
152
  function verifyPlanBinding(plan, context) {
@@ -173,30 +173,18 @@ function verifyPlanBinding(plan, context) {
173
173
  artifacts: plan.artifacts,
174
174
  providerConnections: plan.providerConnections,
175
175
  actions: plan.actions,
176
- blockers: plan.blockers
176
+ blockers: plan.blockers,
177
+ authorization: plan.authorization
177
178
  };
178
179
  const expected = deploymentDigest(core);
179
180
  if (expected !== plan.planDigest || plan.planId !== `topology-plan-${expected.slice(7, 23)}`)
180
181
  context.addIssue({ code: z.ZodIssueCode.custom, path: ["planDigest"], message: "Hosted topology plan identity must bind the exact canonical plan." });
181
182
  }
182
183
  const hostedTopologyPlanSchema = z.object(hostedTopologyPlanShape).strict().superRefine(verifyPlanBinding);
183
- const hostedTopologyApprovalSchema = z.object({
184
- schemaVersion: z.literal("treeseed.hosted-topology-approval/v1"),
185
- planDigest: digest,
186
- teamId: custodyIdentifier,
187
- deploymentId: custodyIdentifier,
188
- stackId: custodyIdentifier,
189
- environment: hostedEnvironmentSchema,
190
- backendBindingDigest: digest,
191
- decision: z.literal("approved"),
192
- approvedBy: z.string().min(1).max(256),
193
- approvedAt: timestamp
194
- }).strict();
195
184
  const authorizedHostedTopologyPlanSchema = z.object({
196
185
  ...hostedTopologyPlanShape,
197
- executable: z.literal(true),
198
- approval: hostedTopologyApprovalSchema.nullable()
199
- }).strict().omit({ approvalRequired: true }).superRefine(verifyPlanBinding);
186
+ executable: z.literal(true)
187
+ }).strict().superRefine(verifyPlanBinding);
200
188
  const hostedTopologyReceiptSchema = z.object({
201
189
  schemaVersion: z.literal("treeseed.hosted-topology-receipt/v1"),
202
190
  receiptId: z.string().regex(/^topology-receipt-[a-f0-9]{16}$/u),
@@ -230,19 +218,19 @@ const hostedTopologyRollbackSchema = z.object({
230
218
  targetDigest: digest.nullable()
231
219
  }).strict()),
232
220
  rollbackDigest: digest
233
- }).strict();
234
- const hostedTopologyRollbackApprovalSchema = z.object({
235
- schemaVersion: z.literal("treeseed.hosted-topology-rollback-approval/v1"),
236
- rollbackDigest: digest,
237
- teamId: custodyIdentifier,
238
- deploymentId: custodyIdentifier,
239
- stackId: custodyIdentifier,
240
- environment: hostedEnvironmentSchema,
241
- backendBindingDigest: digest,
242
- decision: z.literal("approved"),
243
- approvedBy: z.string().min(1).max(256),
244
- approvedAt: timestamp
245
- }).strict();
221
+ }).strict().superRefine((rollback, context) => {
222
+ const core = {
223
+ sourceReceiptId: rollback.sourceReceiptId,
224
+ teamId: rollback.teamId,
225
+ deploymentId: rollback.deploymentId,
226
+ stackId: rollback.stackId,
227
+ environment: rollback.environment,
228
+ backendBindingDigest: rollback.backendBindingDigest,
229
+ operations: rollback.operations
230
+ };
231
+ if (deploymentDigest(core) !== rollback.rollbackDigest || rollback.rollbackId !== `topology-rollback-${rollback.rollbackDigest.slice(7, 23)}`)
232
+ context.addIssue({ code: z.ZodIssueCode.custom, path: ["rollbackDigest"], message: "Hosted topology rollback identity must bind the exact rollback custody and operations." });
233
+ });
246
234
  const hostedTopologyRollbackExecutionSchema = z.object({
247
235
  schemaVersion: z.literal("treeseed.hosted-topology-rollback-execution/v1"),
248
236
  rollback: hostedTopologyRollbackSchema,
@@ -271,18 +259,6 @@ const hostedTopologyRollbackExecutionSchema = z.object({
271
259
  };
272
260
  if (deploymentDigest(core) !== execution.executionDigest) context.addIssue({ code: z.ZodIssueCode.custom, path: ["executionDigest"], message: "Hosted rollback execution digest does not bind its complete source and target closure." });
273
261
  });
274
- const hostedTopologyRollbackExecutionApprovalSchema = z.object({
275
- schemaVersion: z.literal("treeseed.hosted-topology-rollback-execution-approval/v1"),
276
- executionDigest: digest,
277
- teamId: custodyIdentifier,
278
- deploymentId: custodyIdentifier,
279
- stackId: custodyIdentifier,
280
- environment: hostedEnvironmentSchema,
281
- backendBindingDigest: digest,
282
- decision: z.literal("approved"),
283
- approvedBy: z.string().min(1).max(256),
284
- approvedAt: timestamp
285
- }).strict();
286
262
  function observationMap(items, declaration) {
287
263
  const resources = new Map(declaration.resources.map((resource) => [resource.id, resource]));
288
264
  const observations = /* @__PURE__ */ new Map();
@@ -372,20 +348,17 @@ function planHostedTopology(input) {
372
348
  artifacts: normalizedDeclaration.artifacts,
373
349
  providerConnections,
374
350
  actions,
375
- blockers
351
+ blockers,
352
+ authorization: "authenticated-agent"
376
353
  };
377
354
  const planDigest = deploymentDigest(core);
378
- return hostedTopologyPlanSchema.parse({ schemaVersion: "treeseed.hosted-topology-plan/v1", planId: `topology-plan-${planDigest.slice(7, 23)}`, planDigest, ...core, approvalRequired: actions.some(({ action }) => action !== "noop"), executable: false });
355
+ return hostedTopologyPlanSchema.parse({ schemaVersion: "treeseed.hosted-topology-plan/v1", planId: `topology-plan-${planDigest.slice(7, 23)}`, planDigest, ...core, executable: false });
379
356
  }
380
- function authorizeHostedTopologyPlan(planInput, approvalInput) {
357
+ function authorizeHostedTopologyPlan(planInput) {
381
358
  const plan = hostedTopologyPlanSchema.parse(planInput);
382
359
  if (plan.blockers.length) throw new Error("Hosted topology plan has unresolved blockers.");
383
360
  if (!plan.stateBackend) throw new Error("Hosted topology plan has no state backend authority.");
384
- const approval = approvalInput ? hostedTopologyApprovalSchema.parse(approvalInput) : null;
385
- if (plan.approvalRequired && !approval) throw new Error("Hosted topology mutation requires environment approval.");
386
- if (approval && (approval.planDigest !== plan.planDigest || approval.teamId !== plan.teamId || approval.deploymentId !== plan.deploymentId || approval.stackId !== plan.stackId || approval.environment !== plan.environment || approval.backendBindingDigest !== plan.stateBackend.bindingDigest)) throw new Error("Hosted topology approval does not bind the exact plan custody and backend.");
387
- const { approvalRequired: _approvalRequired, ...approvedPlan } = plan;
388
- return authorizedHostedTopologyPlanSchema.parse({ ...approvedPlan, executable: true, approval });
361
+ return authorizedHostedTopologyPlanSchema.parse({ ...plan, executable: true });
389
362
  }
390
363
  function verifyHostedTopologyReadback(input) {
391
364
  const plan = authorizedHostedTopologyPlanSchema.parse(input.plan);
@@ -428,14 +401,12 @@ function planHostedTopologyRollback(receiptInput) {
428
401
  const rollbackDigest = deploymentDigest({ sourceReceiptId: receipt.receiptId, ...custody, operations });
429
402
  return hostedTopologyRollbackSchema.parse({ schemaVersion: "treeseed.hosted-topology-rollback/v1", rollbackId: `topology-rollback-${rollbackDigest.slice(7, 23)}`, sourceReceiptId: receipt.receiptId, ...custody, operations, rollbackDigest });
430
403
  }
431
- function authorizeHostedTopologyRollback(rollbackInput, approvalInput) {
432
- const rollback = hostedTopologyRollbackSchema.parse(rollbackInput), approval = hostedTopologyRollbackApprovalSchema.parse(approvalInput);
433
- if (approval.rollbackDigest !== rollback.rollbackDigest || approval.teamId !== rollback.teamId || approval.deploymentId !== rollback.deploymentId || approval.stackId !== rollback.stackId || approval.environment !== rollback.environment || approval.backendBindingDigest !== rollback.backendBindingDigest) throw new Error("Hosted topology rollback approval does not bind the exact rollback custody and backend.");
434
- return { rollback, approval };
404
+ function authorizeHostedTopologyRollback(rollbackInput) {
405
+ return { rollback: hostedTopologyRollbackSchema.parse(rollbackInput) };
435
406
  }
436
407
  function planHostedTopologyRollbackExecution(input) {
437
408
  const rollback = hostedTopologyRollbackSchema.parse(input.rollback), sourceReceipt = hostedTopologyReceiptSchema.parse(input.sourceReceipt);
438
- const sourcePlan = input.sourcePlan && typeof input.sourcePlan === "object" && "approval" in input.sourcePlan ? authorizedHostedTopologyPlanSchema.parse(input.sourcePlan) : hostedTopologyPlanSchema.parse(input.sourcePlan);
409
+ const sourcePlan = input.sourcePlan && typeof input.sourcePlan === "object" && input.sourcePlan.executable === true ? authorizedHostedTopologyPlanSchema.parse(input.sourcePlan) : hostedTopologyPlanSchema.parse(input.sourcePlan);
439
410
  const targetPlan = hostedTopologyPlanSchema.parse(input.targetPlan);
440
411
  if (sourceReceipt.receiptId !== rollback.sourceReceiptId || sourceReceipt.planDigest !== sourcePlan.planDigest) throw new Error("Hosted rollback execution source receipt is stale.");
441
412
  const custody = { teamId: rollback.teamId, deploymentId: rollback.deploymentId, stackId: rollback.stackId, environment: rollback.environment, backendBindingDigest: rollback.backendBindingDigest };
@@ -458,7 +429,7 @@ function planHostedTopologyRollbackExecution(input) {
458
429
  throw new Error(`Hosted rollback execution target specification mismatch for ${operation.resourceId}.`);
459
430
  }
460
431
  }
461
- if ([...targetActions.keys()].some((resourceId) => !sourceActions.has(resourceId))) throw new Error("Hosted rollback execution target introduces an unapproved resource.");
432
+ if ([...targetActions.keys()].some((resourceId) => !sourceActions.has(resourceId))) throw new Error("Hosted rollback execution target introduces an unauthorized resource.");
462
433
  const core = {
463
434
  rollback,
464
435
  sourceReceiptId: sourceReceipt.receiptId,
@@ -469,10 +440,8 @@ function planHostedTopologyRollbackExecution(input) {
469
440
  };
470
441
  return hostedTopologyRollbackExecutionSchema.parse({ schemaVersion: "treeseed.hosted-topology-rollback-execution/v1", ...core, executionDigest: deploymentDigest(core) });
471
442
  }
472
- function authorizeHostedTopologyRollbackExecution(executionInput, approvalInput) {
473
- const execution = hostedTopologyRollbackExecutionSchema.parse(executionInput), approval = hostedTopologyRollbackExecutionApprovalSchema.parse(approvalInput);
474
- if (approval.executionDigest !== execution.executionDigest || approval.teamId !== execution.teamId || approval.deploymentId !== execution.deploymentId || approval.stackId !== execution.stackId || approval.environment !== execution.environment || approval.backendBindingDigest !== execution.backendBindingDigest) throw new Error("Hosted rollback execution approval does not bind the exact source target custody and backend.");
475
- return { execution, approval };
443
+ function authorizeHostedTopologyRollbackExecution(executionInput) {
444
+ return { execution: hostedTopologyRollbackExecutionSchema.parse(executionInput) };
476
445
  }
477
446
  export {
478
447
  authorizeHostedTopologyPlan,
@@ -486,12 +455,9 @@ export {
486
455
  hostedResourceKindSchema,
487
456
  hostedResourceObservationSchema,
488
457
  hostedStateBackendSchema,
489
- hostedTopologyApprovalSchema,
490
458
  hostedTopologyDeclarationSchema,
491
459
  hostedTopologyPlanSchema,
492
460
  hostedTopologyReceiptSchema,
493
- hostedTopologyRollbackApprovalSchema,
494
- hostedTopologyRollbackExecutionApprovalSchema,
495
461
  hostedTopologyRollbackExecutionSchema,
496
462
  hostedTopologyRollbackSchema,
497
463
  hostedTopologyStateKey,
@@ -365,9 +365,9 @@ const commandTree = {
365
365
  ]),
366
366
  branch("topology", [
367
367
  { nodeType: "leaf", segment: "plan", description: "Plan Cloudflare and Railway reconciliation from a portable hosted-topology declaration or template.", kind: "read", arguments: [{ name: "file", description: "Hosted topology YAML or JSON declaration or template.", required: true }], options: [{ name: "--artifacts", description: "Exact runtime artifact-input YAML or JSON required by a portable template.", type: "string" }], resultSchemaId: "treeseed.hosted-topology-plan/v1", execution: local("local.platform.topology.plan") },
368
- { nodeType: "leaf", segment: "apply", description: "Apply an exact reviewed hosted-topology plan through the operations runner.", kind: "mutation", arguments: [{ name: "plan", description: "Exact plan JSON file.", required: true }], options: [planOption, { name: "--approval", description: "Exact environment approval JSON file.", type: "string", required: true }, { name: "--yes", description: "Confirm the authority-bearing mutation.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "authority" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.apply") },
368
+ { nodeType: "leaf", segment: "apply", description: "Apply an exact agent-authorized hosted-topology plan through the operations runner.", kind: "mutation", arguments: [{ name: "plan", description: "Exact plan JSON file.", required: true }], options: [planOption, { name: "--yes", description: "Confirm the authority-bearing mutation.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "authority" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.apply") },
369
369
  { nodeType: "leaf", segment: "status", description: "Read the latest hosted-topology operation and known-good receipt.", kind: "read", resultSchemaId: "treeseed.infrastructure.topology.status.output/v1", execution: local("local.platform.topology.status") },
370
- { nodeType: "leaf", segment: "rollback", description: "Restore exact prior hosted-topology state from a known-good receipt.", kind: "mutation", arguments: [{ name: "rollback", description: "Exact rollback JSON file.", required: true }], options: [planOption, { name: "--approval", description: "Exact rollback approval JSON file.", type: "string", required: true }, { name: "--yes", description: "Confirm the destructive rollback.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "destructive" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.rollback") }
370
+ { nodeType: "leaf", segment: "rollback", description: "Restore exact prior hosted-topology state from a known-good receipt.", kind: "mutation", arguments: [{ name: "rollback", description: "Exact rollback JSON file.", required: true }], options: [planOption, { name: "--yes", description: "Confirm the destructive rollback.", type: "boolean" }], authorization: { capability: "infrastructure.write", confirmation: "destructive" }, resultSchemaId: "treeseed.platform-operation/v1", execution: local("local.platform.topology.rollback") }
371
371
  ])
372
372
  ]),
373
373
  branch("dev", [
@@ -33,7 +33,7 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
33
33
  repository: "treeseed-ai/platform";
34
34
  commit: string;
35
35
  };
36
- mutation: "approval-required";
36
+ mutation: "agent-authorized";
37
37
  environment: "production" | "staging";
38
38
  artifacts: Record<string, {
39
39
  digest: string;
@@ -64,18 +64,6 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
64
64
  readonly apply: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
65
65
  teamId: string;
66
66
  }, {}, {
67
- approval: {
68
- schemaVersion: "treeseed.hosted-topology-approval/v1";
69
- planDigest: string;
70
- teamId: string;
71
- environment: "production" | "staging";
72
- deploymentId: string;
73
- stackId: string;
74
- backendBindingDigest: string;
75
- decision: "approved";
76
- approvedBy: string;
77
- approvedAt: string;
78
- };
79
67
  plan: {
80
68
  schemaVersion: "treeseed.hosted-topology-plan/v1";
81
69
  blockers: {
@@ -160,7 +148,7 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
160
148
  declarationDigest: string;
161
149
  topologyId: string;
162
150
  platformCommit: string;
163
- approvalRequired: boolean;
151
+ authorization: "authenticated-agent";
164
152
  };
165
153
  credentialLeaseIds?: string[] | undefined;
166
154
  }, Record<string, unknown>>;
@@ -207,18 +195,6 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
207
195
  readonly rollback: import("../control-plane-operation.js").ControlPlaneOperationBinding<{
208
196
  teamId: string;
209
197
  }, {}, {
210
- approval: {
211
- schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
212
- teamId: string;
213
- environment: "production" | "staging";
214
- deploymentId: string;
215
- stackId: string;
216
- backendBindingDigest: string;
217
- decision: "approved";
218
- approvedBy: string;
219
- approvedAt: string;
220
- executionDigest: string;
221
- };
222
198
  execution: {
223
199
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
224
200
  teamId: string;
@@ -333,7 +309,7 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
333
309
  declarationDigest: string;
334
310
  topologyId: string;
335
311
  platformCommit: string;
336
- approvalRequired: boolean;
312
+ authorization: "authenticated-agent";
337
313
  };
338
314
  targetPlan: {
339
315
  schemaVersion: "treeseed.hosted-topology-plan/v1";
@@ -419,7 +395,7 @@ export declare const HOSTED_TOPOLOGY_OPERATIONS: {
419
395
  declarationDigest: string;
420
396
  topologyId: string;
421
397
  platformCommit: string;
422
- approvalRequired: boolean;
398
+ authorization: "authenticated-agent";
423
399
  };
424
400
  credentialLeaseIds?: string[] | undefined;
425
401
  }, Record<string, unknown>>;
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { hostedTopologyApprovalSchema, hostedTopologyDeclarationSchema, hostedTopologyPlanSchema, hostedTopologyReceiptSchema, hostedTopologyRollbackExecutionApprovalSchema, hostedTopologyRollbackExecutionSchema } from "../../deployment/hosted-topology.js";
2
+ import { hostedTopologyDeclarationSchema, hostedTopologyPlanSchema, hostedTopologyReceiptSchema, hostedTopologyRollbackExecutionSchema } from "../../deployment/hosted-topology.js";
3
3
  import { defineOperation } from "../operation-builder.js";
4
4
  const teamPath = z.object({ teamId: z.string().min(1) }).strict();
5
5
  const empty = z.object({}).strict();
@@ -25,7 +25,7 @@ const HOSTED_TOPOLOGY_OPERATIONS = {
25
25
  }, { path: teamPath, query: empty, body: z.object({ declaration: hostedTopologyDeclarationSchema, credentialLeaseIds }).strict(), output: operationReceipt }),
26
26
  apply: defineOperation({
27
27
  operationId: "infrastructure.topology.apply",
28
- description: "Apply an exact approved hosted topology plan through the operations runner.",
28
+ description: "Apply an exact agent-authorized hosted topology plan through the operations runner.",
29
29
  rest: { method: "POST", path: "/v1/teams/{teamId}/infrastructure/topology/apply" },
30
30
  parameters: "treeseed.infrastructure.topology.apply.parameters/v1",
31
31
  capability: "infrastructure.write",
@@ -37,9 +37,8 @@ const HOSTED_TOPOLOGY_OPERATIONS = {
37
37
  surfaces: ["rest", "cli"],
38
38
  cacheScope: "none",
39
39
  pagination: "none",
40
- concurrencyRequired: true,
41
- redactedPaths: ["body.approval.approvedBy"]
42
- }, { path: teamPath, query: empty, body: z.object({ plan: hostedTopologyPlanSchema, approval: hostedTopologyApprovalSchema, credentialLeaseIds }).strict(), output: operationReceipt }),
40
+ concurrencyRequired: true
41
+ }, { path: teamPath, query: empty, body: z.object({ plan: hostedTopologyPlanSchema, credentialLeaseIds }).strict(), output: operationReceipt }),
43
42
  status: defineOperation({
44
43
  operationId: "infrastructure.topology.status",
45
44
  description: "Read the latest authoritative hosted topology receipt and operation state.",
@@ -69,11 +68,9 @@ const HOSTED_TOPOLOGY_OPERATIONS = {
69
68
  surfaces: ["rest", "cli"],
70
69
  cacheScope: "none",
71
70
  pagination: "none",
72
- concurrencyRequired: true,
73
- redactedPaths: ["body.approval.approvedBy"]
71
+ concurrencyRequired: true
74
72
  }, { path: teamPath, query: empty, body: z.object({
75
73
  execution: hostedTopologyRollbackExecutionSchema,
76
- approval: hostedTopologyRollbackExecutionApprovalSchema,
77
74
  sourcePlan: hostedTopologyPlanSchema,
78
75
  targetPlan: hostedTopologyPlanSchema,
79
76
  credentialLeaseIds
@@ -36,7 +36,7 @@ export declare const CONTROL_PLANE_OPERATIONS: {
36
36
  repository: "treeseed-ai/platform";
37
37
  commit: string;
38
38
  };
39
- mutation: "approval-required";
39
+ mutation: "agent-authorized";
40
40
  environment: "production" | "staging";
41
41
  artifacts: Record<string, {
42
42
  digest: string;
@@ -67,18 +67,6 @@ export declare const CONTROL_PLANE_OPERATIONS: {
67
67
  readonly apply: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
68
68
  teamId: string;
69
69
  }, {}, {
70
- approval: {
71
- schemaVersion: "treeseed.hosted-topology-approval/v1";
72
- planDigest: string;
73
- teamId: string;
74
- environment: "production" | "staging";
75
- deploymentId: string;
76
- stackId: string;
77
- backendBindingDigest: string;
78
- decision: "approved";
79
- approvedBy: string;
80
- approvedAt: string;
81
- };
82
70
  plan: {
83
71
  schemaVersion: "treeseed.hosted-topology-plan/v1";
84
72
  blockers: {
@@ -163,7 +151,7 @@ export declare const CONTROL_PLANE_OPERATIONS: {
163
151
  declarationDigest: string;
164
152
  topologyId: string;
165
153
  platformCommit: string;
166
- approvalRequired: boolean;
154
+ authorization: "authenticated-agent";
167
155
  };
168
156
  credentialLeaseIds?: string[] | undefined;
169
157
  }, Record<string, unknown>>;
@@ -210,18 +198,6 @@ export declare const CONTROL_PLANE_OPERATIONS: {
210
198
  readonly rollback: import("./control-plane-operation.js").ControlPlaneOperationBinding<{
211
199
  teamId: string;
212
200
  }, {}, {
213
- approval: {
214
- schemaVersion: "treeseed.hosted-topology-rollback-execution-approval/v1";
215
- teamId: string;
216
- environment: "production" | "staging";
217
- deploymentId: string;
218
- stackId: string;
219
- backendBindingDigest: string;
220
- decision: "approved";
221
- approvedBy: string;
222
- approvedAt: string;
223
- executionDigest: string;
224
- };
225
201
  execution: {
226
202
  schemaVersion: "treeseed.hosted-topology-rollback-execution/v1";
227
203
  teamId: string;
@@ -336,7 +312,7 @@ export declare const CONTROL_PLANE_OPERATIONS: {
336
312
  declarationDigest: string;
337
313
  topologyId: string;
338
314
  platformCommit: string;
339
- approvalRequired: boolean;
315
+ authorization: "authenticated-agent";
340
316
  };
341
317
  targetPlan: {
342
318
  schemaVersion: "treeseed.hosted-topology-plan/v1";
@@ -422,7 +398,7 @@ export declare const CONTROL_PLANE_OPERATIONS: {
422
398
  declarationDigest: string;
423
399
  topologyId: string;
424
400
  platformCommit: string;
425
- approvalRequired: boolean;
401
+ authorization: "authenticated-agent";
426
402
  };
427
403
  credentialLeaseIds?: string[] | undefined;
428
404
  }, Record<string, unknown>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.85",
3
+ "version": "0.13.0-rc.86",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {