@treeseed/sdk 0.13.0-rc.116 → 0.13.0-rc.118

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-11T06:25:55.931Z"}
1
+ {"completedAt":"2026-09-15T06:21:10.535Z"}
@@ -157,6 +157,7 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
157
157
  severity: "error" | "warning" | "info";
158
158
  }>, "many">>;
159
159
  }, "strict", z.ZodTypeAny, {
160
+ activity: AgentActivityEvent;
160
161
  diagnostics: {
161
162
  code: string;
162
163
  path: string;
@@ -164,7 +165,6 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
164
165
  severity: "error" | "warning" | "info";
165
166
  }[];
166
167
  contract: "treeseed.agent-forensic-payload/v1";
167
- activity: AgentActivityEvent;
168
168
  payload?: Record<string, unknown> | undefined;
169
169
  transcript?: {
170
170
  entries: Record<string, unknown>[];
@@ -177,8 +177,8 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
177
177
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
178
178
  } | undefined;
179
179
  }, {
180
- contract: "treeseed.agent-forensic-payload/v1";
181
180
  activity: AgentActivityEvent;
181
+ contract: "treeseed.agent-forensic-payload/v1";
182
182
  payload?: Record<string, unknown> | undefined;
183
183
  diagnostics?: {
184
184
  code: string;
@@ -2548,22 +2548,22 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
2548
2548
  }, "strict", z.ZodTypeAny, {
2549
2549
  name: string;
2550
2550
  required: boolean;
2551
- source: "configuration" | "manager";
2551
+ source: "manager" | "configuration";
2552
2552
  default?: string | undefined;
2553
2553
  }, {
2554
2554
  name: string;
2555
2555
  required: boolean;
2556
- source?: "configuration" | "manager" | undefined;
2556
+ source?: "manager" | "configuration" | undefined;
2557
2557
  default?: string | undefined;
2558
2558
  }>, {
2559
2559
  name: string;
2560
2560
  required: boolean;
2561
- source: "configuration" | "manager";
2561
+ source: "manager" | "configuration";
2562
2562
  default?: string | undefined;
2563
2563
  }, {
2564
2564
  name: string;
2565
2565
  required: boolean;
2566
- source?: "configuration" | "manager" | undefined;
2566
+ source?: "manager" | "configuration" | undefined;
2567
2567
  default?: string | undefined;
2568
2568
  }>, "many">>;
2569
2569
  secretEnvironment: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -2624,7 +2624,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
2624
2624
  environment: {
2625
2625
  name: string;
2626
2626
  required: boolean;
2627
- source: "configuration" | "manager";
2627
+ source: "manager" | "configuration";
2628
2628
  default?: string | undefined;
2629
2629
  }[];
2630
2630
  secretEnvironment: {
@@ -2647,7 +2647,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
2647
2647
  environment?: {
2648
2648
  name: string;
2649
2649
  required: boolean;
2650
- source?: "configuration" | "manager" | undefined;
2650
+ source?: "manager" | "configuration" | undefined;
2651
2651
  default?: string | undefined;
2652
2652
  }[] | undefined;
2653
2653
  secretEnvironment?: {
@@ -2670,7 +2670,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
2670
2670
  environment: {
2671
2671
  name: string;
2672
2672
  required: boolean;
2673
- source: "configuration" | "manager";
2673
+ source: "manager" | "configuration";
2674
2674
  default?: string | undefined;
2675
2675
  }[];
2676
2676
  secretEnvironment: {
@@ -2693,7 +2693,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
2693
2693
  environment?: {
2694
2694
  name: string;
2695
2695
  required: boolean;
2696
- source?: "configuration" | "manager" | undefined;
2696
+ source?: "manager" | "configuration" | undefined;
2697
2697
  default?: string | undefined;
2698
2698
  }[] | undefined;
2699
2699
  secretEnvironment?: {
@@ -3039,7 +3039,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
3039
3039
  environment: {
3040
3040
  name: string;
3041
3041
  required: boolean;
3042
- source: "configuration" | "manager";
3042
+ source: "manager" | "configuration";
3043
3043
  default?: string | undefined;
3044
3044
  }[];
3045
3045
  secretEnvironment: {
@@ -3177,7 +3177,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
3177
3177
  environment?: {
3178
3178
  name: string;
3179
3179
  required: boolean;
3180
- source?: "configuration" | "manager" | undefined;
3180
+ source?: "manager" | "configuration" | undefined;
3181
3181
  default?: string | undefined;
3182
3182
  }[] | undefined;
3183
3183
  secretEnvironment?: {
@@ -3255,7 +3255,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
3255
3255
  environment: {
3256
3256
  name: string;
3257
3257
  required: boolean;
3258
- source: "configuration" | "manager";
3258
+ source: "manager" | "configuration";
3259
3259
  default?: string | undefined;
3260
3260
  }[];
3261
3261
  secretEnvironment: {
@@ -3393,7 +3393,7 @@ export declare const packageRuntimeSchema: z.ZodEffects<z.ZodObject<{
3393
3393
  environment?: {
3394
3394
  name: string;
3395
3395
  required: boolean;
3396
- source?: "configuration" | "manager" | undefined;
3396
+ source?: "manager" | "configuration" | undefined;
3397
3397
  default?: string | undefined;
3398
3398
  }[] | undefined;
3399
3399
  secretEnvironment?: {
@@ -3557,22 +3557,22 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
3557
3557
  }, "strict", z.ZodTypeAny, {
3558
3558
  name: string;
3559
3559
  required: boolean;
3560
- source: "configuration" | "manager";
3560
+ source: "manager" | "configuration";
3561
3561
  default?: string | undefined;
3562
3562
  }, {
3563
3563
  name: string;
3564
3564
  required: boolean;
3565
- source?: "configuration" | "manager" | undefined;
3565
+ source?: "manager" | "configuration" | undefined;
3566
3566
  default?: string | undefined;
3567
3567
  }>, {
3568
3568
  name: string;
3569
3569
  required: boolean;
3570
- source: "configuration" | "manager";
3570
+ source: "manager" | "configuration";
3571
3571
  default?: string | undefined;
3572
3572
  }, {
3573
3573
  name: string;
3574
3574
  required: boolean;
3575
- source?: "configuration" | "manager" | undefined;
3575
+ source?: "manager" | "configuration" | undefined;
3576
3576
  default?: string | undefined;
3577
3577
  }>, "many">>;
3578
3578
  secretEnvironment: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -3633,7 +3633,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
3633
3633
  environment: {
3634
3634
  name: string;
3635
3635
  required: boolean;
3636
- source: "configuration" | "manager";
3636
+ source: "manager" | "configuration";
3637
3637
  default?: string | undefined;
3638
3638
  }[];
3639
3639
  secretEnvironment: {
@@ -3656,7 +3656,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
3656
3656
  environment?: {
3657
3657
  name: string;
3658
3658
  required: boolean;
3659
- source?: "configuration" | "manager" | undefined;
3659
+ source?: "manager" | "configuration" | undefined;
3660
3660
  default?: string | undefined;
3661
3661
  }[] | undefined;
3662
3662
  secretEnvironment?: {
@@ -3679,7 +3679,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
3679
3679
  environment: {
3680
3680
  name: string;
3681
3681
  required: boolean;
3682
- source: "configuration" | "manager";
3682
+ source: "manager" | "configuration";
3683
3683
  default?: string | undefined;
3684
3684
  }[];
3685
3685
  secretEnvironment: {
@@ -3702,7 +3702,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
3702
3702
  environment?: {
3703
3703
  name: string;
3704
3704
  required: boolean;
3705
- source?: "configuration" | "manager" | undefined;
3705
+ source?: "manager" | "configuration" | undefined;
3706
3706
  default?: string | undefined;
3707
3707
  }[] | undefined;
3708
3708
  secretEnvironment?: {
@@ -4048,7 +4048,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4048
4048
  environment: {
4049
4049
  name: string;
4050
4050
  required: boolean;
4051
- source: "configuration" | "manager";
4051
+ source: "manager" | "configuration";
4052
4052
  default?: string | undefined;
4053
4053
  }[];
4054
4054
  secretEnvironment: {
@@ -4186,7 +4186,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4186
4186
  environment?: {
4187
4187
  name: string;
4188
4188
  required: boolean;
4189
- source?: "configuration" | "manager" | undefined;
4189
+ source?: "manager" | "configuration" | undefined;
4190
4190
  default?: string | undefined;
4191
4191
  }[] | undefined;
4192
4192
  secretEnvironment?: {
@@ -4264,7 +4264,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4264
4264
  environment: {
4265
4265
  name: string;
4266
4266
  required: boolean;
4267
- source: "configuration" | "manager";
4267
+ source: "manager" | "configuration";
4268
4268
  default?: string | undefined;
4269
4269
  }[];
4270
4270
  secretEnvironment: {
@@ -4402,7 +4402,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4402
4402
  environment?: {
4403
4403
  name: string;
4404
4404
  required: boolean;
4405
- source?: "configuration" | "manager" | undefined;
4405
+ source?: "manager" | "configuration" | undefined;
4406
4406
  default?: string | undefined;
4407
4407
  }[] | undefined;
4408
4408
  secretEnvironment?: {
@@ -4507,7 +4507,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4507
4507
  environment: {
4508
4508
  name: string;
4509
4509
  required: boolean;
4510
- source: "configuration" | "manager";
4510
+ source: "manager" | "configuration";
4511
4511
  default?: string | undefined;
4512
4512
  }[];
4513
4513
  secretEnvironment: {
@@ -4686,7 +4686,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4686
4686
  environment?: {
4687
4687
  name: string;
4688
4688
  required: boolean;
4689
- source?: "configuration" | "manager" | undefined;
4689
+ source?: "manager" | "configuration" | undefined;
4690
4690
  default?: string | undefined;
4691
4691
  }[] | undefined;
4692
4692
  secretEnvironment?: {
@@ -4805,7 +4805,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4805
4805
  environment: {
4806
4806
  name: string;
4807
4807
  required: boolean;
4808
- source: "configuration" | "manager";
4808
+ source: "manager" | "configuration";
4809
4809
  default?: string | undefined;
4810
4810
  }[];
4811
4811
  secretEnvironment: {
@@ -4984,7 +4984,7 @@ export declare const componentReleaseSchema: z.ZodEffects<z.ZodObject<{
4984
4984
  environment?: {
4985
4985
  name: string;
4986
4986
  required: boolean;
4987
- source?: "configuration" | "manager" | undefined;
4987
+ source?: "manager" | "configuration" | undefined;
4988
4988
  default?: string | undefined;
4989
4989
  }[] | undefined;
4990
4990
  secretEnvironment?: {
@@ -5657,22 +5657,22 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
5657
5657
  }, "strict", z.ZodTypeAny, {
5658
5658
  name: string;
5659
5659
  required: boolean;
5660
- source: "configuration" | "manager";
5660
+ source: "manager" | "configuration";
5661
5661
  default?: string | undefined;
5662
5662
  }, {
5663
5663
  name: string;
5664
5664
  required: boolean;
5665
- source?: "configuration" | "manager" | undefined;
5665
+ source?: "manager" | "configuration" | undefined;
5666
5666
  default?: string | undefined;
5667
5667
  }>, {
5668
5668
  name: string;
5669
5669
  required: boolean;
5670
- source: "configuration" | "manager";
5670
+ source: "manager" | "configuration";
5671
5671
  default?: string | undefined;
5672
5672
  }, {
5673
5673
  name: string;
5674
5674
  required: boolean;
5675
- source?: "configuration" | "manager" | undefined;
5675
+ source?: "manager" | "configuration" | undefined;
5676
5676
  default?: string | undefined;
5677
5677
  }>, "many">>;
5678
5678
  secretEnvironment: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -5733,7 +5733,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
5733
5733
  environment: {
5734
5734
  name: string;
5735
5735
  required: boolean;
5736
- source: "configuration" | "manager";
5736
+ source: "manager" | "configuration";
5737
5737
  default?: string | undefined;
5738
5738
  }[];
5739
5739
  secretEnvironment: {
@@ -5756,7 +5756,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
5756
5756
  environment?: {
5757
5757
  name: string;
5758
5758
  required: boolean;
5759
- source?: "configuration" | "manager" | undefined;
5759
+ source?: "manager" | "configuration" | undefined;
5760
5760
  default?: string | undefined;
5761
5761
  }[] | undefined;
5762
5762
  secretEnvironment?: {
@@ -5779,7 +5779,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
5779
5779
  environment: {
5780
5780
  name: string;
5781
5781
  required: boolean;
5782
- source: "configuration" | "manager";
5782
+ source: "manager" | "configuration";
5783
5783
  default?: string | undefined;
5784
5784
  }[];
5785
5785
  secretEnvironment: {
@@ -5802,7 +5802,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
5802
5802
  environment?: {
5803
5803
  name: string;
5804
5804
  required: boolean;
5805
- source?: "configuration" | "manager" | undefined;
5805
+ source?: "manager" | "configuration" | undefined;
5806
5806
  default?: string | undefined;
5807
5807
  }[] | undefined;
5808
5808
  secretEnvironment?: {
@@ -6148,7 +6148,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6148
6148
  environment: {
6149
6149
  name: string;
6150
6150
  required: boolean;
6151
- source: "configuration" | "manager";
6151
+ source: "manager" | "configuration";
6152
6152
  default?: string | undefined;
6153
6153
  }[];
6154
6154
  secretEnvironment: {
@@ -6286,7 +6286,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6286
6286
  environment?: {
6287
6287
  name: string;
6288
6288
  required: boolean;
6289
- source?: "configuration" | "manager" | undefined;
6289
+ source?: "manager" | "configuration" | undefined;
6290
6290
  default?: string | undefined;
6291
6291
  }[] | undefined;
6292
6292
  secretEnvironment?: {
@@ -6364,7 +6364,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6364
6364
  environment: {
6365
6365
  name: string;
6366
6366
  required: boolean;
6367
- source: "configuration" | "manager";
6367
+ source: "manager" | "configuration";
6368
6368
  default?: string | undefined;
6369
6369
  }[];
6370
6370
  secretEnvironment: {
@@ -6502,7 +6502,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6502
6502
  environment?: {
6503
6503
  name: string;
6504
6504
  required: boolean;
6505
- source?: "configuration" | "manager" | undefined;
6505
+ source?: "manager" | "configuration" | undefined;
6506
6506
  default?: string | undefined;
6507
6507
  }[] | undefined;
6508
6508
  secretEnvironment?: {
@@ -6607,7 +6607,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6607
6607
  environment: {
6608
6608
  name: string;
6609
6609
  required: boolean;
6610
- source: "configuration" | "manager";
6610
+ source: "manager" | "configuration";
6611
6611
  default?: string | undefined;
6612
6612
  }[];
6613
6613
  secretEnvironment: {
@@ -6786,7 +6786,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6786
6786
  environment?: {
6787
6787
  name: string;
6788
6788
  required: boolean;
6789
- source?: "configuration" | "manager" | undefined;
6789
+ source?: "manager" | "configuration" | undefined;
6790
6790
  default?: string | undefined;
6791
6791
  }[] | undefined;
6792
6792
  secretEnvironment?: {
@@ -6905,7 +6905,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
6905
6905
  environment: {
6906
6906
  name: string;
6907
6907
  required: boolean;
6908
- source: "configuration" | "manager";
6908
+ source: "manager" | "configuration";
6909
6909
  default?: string | undefined;
6910
6910
  }[];
6911
6911
  secretEnvironment: {
@@ -7084,7 +7084,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
7084
7084
  environment?: {
7085
7085
  name: string;
7086
7086
  required: boolean;
7087
- source?: "configuration" | "manager" | undefined;
7087
+ source?: "manager" | "configuration" | undefined;
7088
7088
  default?: string | undefined;
7089
7089
  }[] | undefined;
7090
7090
  secretEnvironment?: {
@@ -7319,7 +7319,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
7319
7319
  environment: {
7320
7320
  name: string;
7321
7321
  required: boolean;
7322
- source: "configuration" | "manager";
7322
+ source: "manager" | "configuration";
7323
7323
  default?: string | undefined;
7324
7324
  }[];
7325
7325
  secretEnvironment: {
@@ -7530,7 +7530,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
7530
7530
  environment?: {
7531
7531
  name: string;
7532
7532
  required: boolean;
7533
- source?: "configuration" | "manager" | undefined;
7533
+ source?: "manager" | "configuration" | undefined;
7534
7534
  default?: string | undefined;
7535
7535
  }[] | undefined;
7536
7536
  secretEnvironment?: {
@@ -7681,7 +7681,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
7681
7681
  environment: {
7682
7682
  name: string;
7683
7683
  required: boolean;
7684
- source: "configuration" | "manager";
7684
+ source: "manager" | "configuration";
7685
7685
  default?: string | undefined;
7686
7686
  }[];
7687
7687
  secretEnvironment: {
@@ -7892,7 +7892,7 @@ export declare const releaseCatalogSchema: z.ZodEffects<z.ZodObject<{
7892
7892
  environment?: {
7893
7893
  name: string;
7894
7894
  required: boolean;
7895
- source?: "configuration" | "manager" | undefined;
7895
+ source?: "manager" | "configuration" | undefined;
7896
7896
  default?: string | undefined;
7897
7897
  }[] | undefined;
7898
7898
  secretEnvironment?: {
@@ -1,11 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  export declare const developmentModeSchema: z.ZodEnum<["released", "candidate", "live"]>;
3
- export declare const developmentTargetKindSchema: z.ZodEnum<["package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
3
+ export declare const developmentTargetKindSchema: z.ZodEnum<["source-check", "package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
4
+ export declare const developmentExecutionCustodySchema: z.ZodEnum<["caller", "manager"]>;
4
5
  export declare const developmentReactionSchema: z.ZodEnum<["reload", "restart", "rebuild", "stale", "manual", "none"]>;
5
6
  export declare const developmentStatePolicySchema: z.ZodEnum<["stateless", "ephemeral", "clone", "shared-compatible"]>;
6
7
  export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
7
8
  id: z.ZodString;
8
- kind: z.ZodEnum<["package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
9
+ kind: z.ZodEnum<["source-check", "package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
10
+ executionCustody: z.ZodDefault<z.ZodEnum<["caller", "manager"]>>;
9
11
  platforms: z.ZodArray<z.ZodEnum<["linux-amd64", "linux-arm64", "darwin-arm64", "darwin-amd64"]>, "many">;
10
12
  runtimeRequirements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
11
13
  sourceRoots: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
@@ -510,7 +512,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
510
512
  candidateRequiresVerification: true;
511
513
  }>;
512
514
  }, "strict", z.ZodTypeAny, {
513
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
515
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
514
516
  id: string;
515
517
  resources: {
516
518
  cpuCores?: number | undefined;
@@ -533,6 +535,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
533
535
  kind: "process";
534
536
  graceSeconds: number;
535
537
  };
538
+ executionCustody: "caller" | "manager";
536
539
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
537
540
  runtimeRequirements: string[];
538
541
  sourceRoots: string[];
@@ -648,7 +651,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
648
651
  }[];
649
652
  } | undefined;
650
653
  }, {
651
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
654
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
652
655
  id: string;
653
656
  ready: {
654
657
  path: string;
@@ -741,6 +744,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
741
744
  memoryBytes?: number | undefined;
742
745
  diskBytes?: number | undefined;
743
746
  } | undefined;
747
+ executionCustody?: "caller" | "manager" | undefined;
744
748
  runtimeRequirements?: string[] | undefined;
745
749
  ignoredPaths?: string[] | undefined;
746
750
  outputs?: {
@@ -786,7 +790,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
786
790
  }[] | undefined;
787
791
  } | undefined;
788
792
  }>, {
789
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
793
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
790
794
  id: string;
791
795
  resources: {
792
796
  cpuCores?: number | undefined;
@@ -809,6 +813,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
809
813
  kind: "process";
810
814
  graceSeconds: number;
811
815
  };
816
+ executionCustody: "caller" | "manager";
812
817
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
813
818
  runtimeRequirements: string[];
814
819
  sourceRoots: string[];
@@ -924,7 +929,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
924
929
  }[];
925
930
  } | undefined;
926
931
  }, {
927
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
932
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
928
933
  id: string;
929
934
  ready: {
930
935
  path: string;
@@ -1017,6 +1022,7 @@ export declare const developmentTargetSchema: z.ZodEffects<z.ZodObject<{
1017
1022
  memoryBytes?: number | undefined;
1018
1023
  diskBytes?: number | undefined;
1019
1024
  } | undefined;
1025
+ executionCustody?: "caller" | "manager" | undefined;
1020
1026
  runtimeRequirements?: string[] | undefined;
1021
1027
  ignoredPaths?: string[] | undefined;
1022
1028
  outputs?: {
@@ -1083,7 +1089,8 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1083
1089
  }>;
1084
1090
  targets: z.ZodArray<z.ZodEffects<z.ZodObject<{
1085
1091
  id: z.ZodString;
1086
- kind: z.ZodEnum<["package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
1092
+ kind: z.ZodEnum<["source-check", "package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]>;
1093
+ executionCustody: z.ZodDefault<z.ZodEnum<["caller", "manager"]>>;
1087
1094
  platforms: z.ZodArray<z.ZodEnum<["linux-amd64", "linux-arm64", "darwin-arm64", "darwin-amd64"]>, "many">;
1088
1095
  runtimeRequirements: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1089
1096
  sourceRoots: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
@@ -1588,7 +1595,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1588
1595
  candidateRequiresVerification: true;
1589
1596
  }>;
1590
1597
  }, "strict", z.ZodTypeAny, {
1591
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1598
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1592
1599
  id: string;
1593
1600
  resources: {
1594
1601
  cpuCores?: number | undefined;
@@ -1611,6 +1618,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1611
1618
  kind: "process";
1612
1619
  graceSeconds: number;
1613
1620
  };
1621
+ executionCustody: "caller" | "manager";
1614
1622
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
1615
1623
  runtimeRequirements: string[];
1616
1624
  sourceRoots: string[];
@@ -1726,7 +1734,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1726
1734
  }[];
1727
1735
  } | undefined;
1728
1736
  }, {
1729
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1737
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1730
1738
  id: string;
1731
1739
  ready: {
1732
1740
  path: string;
@@ -1819,6 +1827,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1819
1827
  memoryBytes?: number | undefined;
1820
1828
  diskBytes?: number | undefined;
1821
1829
  } | undefined;
1830
+ executionCustody?: "caller" | "manager" | undefined;
1822
1831
  runtimeRequirements?: string[] | undefined;
1823
1832
  ignoredPaths?: string[] | undefined;
1824
1833
  outputs?: {
@@ -1864,7 +1873,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1864
1873
  }[] | undefined;
1865
1874
  } | undefined;
1866
1875
  }>, {
1867
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1876
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
1868
1877
  id: string;
1869
1878
  resources: {
1870
1879
  cpuCores?: number | undefined;
@@ -1887,6 +1896,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
1887
1896
  kind: "process";
1888
1897
  graceSeconds: number;
1889
1898
  };
1899
+ executionCustody: "caller" | "manager";
1890
1900
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
1891
1901
  runtimeRequirements: string[];
1892
1902
  sourceRoots: string[];
@@ -2002,7 +2012,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2002
2012
  }[];
2003
2013
  } | undefined;
2004
2014
  }, {
2005
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2015
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2006
2016
  id: string;
2007
2017
  ready: {
2008
2018
  path: string;
@@ -2095,6 +2105,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2095
2105
  memoryBytes?: number | undefined;
2096
2106
  diskBytes?: number | undefined;
2097
2107
  } | undefined;
2108
+ executionCustody?: "caller" | "manager" | undefined;
2098
2109
  runtimeRequirements?: string[] | undefined;
2099
2110
  ignoredPaths?: string[] | undefined;
2100
2111
  outputs?: {
@@ -2147,7 +2158,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2147
2158
  repository: string;
2148
2159
  };
2149
2160
  targets: {
2150
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2161
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2151
2162
  id: string;
2152
2163
  resources: {
2153
2164
  cpuCores?: number | undefined;
@@ -2170,6 +2181,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2170
2181
  kind: "process";
2171
2182
  graceSeconds: number;
2172
2183
  };
2184
+ executionCustody: "caller" | "manager";
2173
2185
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2174
2186
  runtimeRequirements: string[];
2175
2187
  sourceRoots: string[];
@@ -2295,7 +2307,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2295
2307
  repository: string;
2296
2308
  };
2297
2309
  targets: {
2298
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2310
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2299
2311
  id: string;
2300
2312
  ready: {
2301
2313
  path: string;
@@ -2388,6 +2400,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2388
2400
  memoryBytes?: number | undefined;
2389
2401
  diskBytes?: number | undefined;
2390
2402
  } | undefined;
2403
+ executionCustody?: "caller" | "manager" | undefined;
2391
2404
  runtimeRequirements?: string[] | undefined;
2392
2405
  ignoredPaths?: string[] | undefined;
2393
2406
  outputs?: {
@@ -2443,7 +2456,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2443
2456
  repository: string;
2444
2457
  };
2445
2458
  targets: {
2446
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2459
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2447
2460
  id: string;
2448
2461
  resources: {
2449
2462
  cpuCores?: number | undefined;
@@ -2466,6 +2479,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2466
2479
  kind: "process";
2467
2480
  graceSeconds: number;
2468
2481
  };
2482
+ executionCustody: "caller" | "manager";
2469
2483
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2470
2484
  runtimeRequirements: string[];
2471
2485
  sourceRoots: string[];
@@ -2591,7 +2605,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2591
2605
  repository: string;
2592
2606
  };
2593
2607
  targets: {
2594
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2608
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2595
2609
  id: string;
2596
2610
  ready: {
2597
2611
  path: string;
@@ -2684,6 +2698,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2684
2698
  memoryBytes?: number | undefined;
2685
2699
  diskBytes?: number | undefined;
2686
2700
  } | undefined;
2701
+ executionCustody?: "caller" | "manager" | undefined;
2687
2702
  runtimeRequirements?: string[] | undefined;
2688
2703
  ignoredPaths?: string[] | undefined;
2689
2704
  outputs?: {
@@ -2739,7 +2754,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2739
2754
  repository: string;
2740
2755
  };
2741
2756
  targets: {
2742
- kind: "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2757
+ kind: "source-check" | "package-watch" | "live-web" | "live-api" | "rebuild-restart" | "local-companion";
2743
2758
  id: string;
2744
2759
  resources: {
2745
2760
  cpuCores?: number | undefined;
@@ -2762,6 +2777,7 @@ export declare const developmentRuntimeSchema: z.ZodEffects<z.ZodEffects<z.ZodOb
2762
2777
  kind: "process";
2763
2778
  graceSeconds: number;
2764
2779
  };
2780
+ executionCustody: "caller" | "manager";
2765
2781
  platforms: ("linux-amd64" | "linux-arm64" | "darwin-arm64" | "darwin-amd64")[];
2766
2782
  runtimeRequirements: string[];
2767
2783
  sourceRoots: string[];
@@ -10,7 +10,8 @@ const relativePath = z.string().min(1).max(512).refine((value) => {
10
10
  const environmentName = z.string().regex(/^[A-Z][A-Z0-9_]{0,127}$/u);
11
11
  const localAlias = z.string().regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.localhost$/u);
12
12
  const developmentModeSchema = z.enum(["released", "candidate", "live"]);
13
- const developmentTargetKindSchema = z.enum(["package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]);
13
+ const developmentTargetKindSchema = z.enum(["source-check", "package-watch", "live-web", "live-api", "rebuild-restart", "local-companion"]);
14
+ const developmentExecutionCustodySchema = z.enum(["caller", "manager"]);
14
15
  const developmentReactionSchema = z.enum(["reload", "restart", "rebuild", "stale", "manual", "none"]);
15
16
  const developmentStatePolicySchema = z.enum(["stateless", "ephemeral", "clone", "shared-compatible"]);
16
17
  const operationSchema = z.object({
@@ -59,6 +60,7 @@ const freezeSchema = z.object({
59
60
  const developmentTargetSchema = z.object({
60
61
  id: identifier,
61
62
  kind: developmentTargetKindSchema,
63
+ executionCustody: developmentExecutionCustodySchema.default("caller"),
62
64
  platforms: z.array(z.enum(["linux-amd64", "linux-arm64", "darwin-arm64", "darwin-amd64"])).min(1),
63
65
  runtimeRequirements: z.array(z.string().min(1).max(128)).default([]),
64
66
  sourceRoots: z.array(relativePath).min(1),
@@ -88,9 +90,11 @@ const developmentTargetSchema = z.object({
88
90
  }).strict().superRefine((target, context) => {
89
91
  const endpoints = target.endpoints.map((entry) => entry.id);
90
92
  if (new Set(endpoints).size !== endpoints.length) context.addIssue({ code: z.ZodIssueCode.custom, path: ["endpoints"], message: "Development endpoint IDs must be unique." });
91
- if (target.kind === "package-watch" && target.endpoints.length) context.addIssue({ code: z.ZodIssueCode.custom, path: ["endpoints"], message: "Package-watch targets cannot own service endpoints." });
93
+ if ((target.kind === "package-watch" || target.kind === "source-check") && target.endpoints.length) context.addIssue({ code: z.ZodIssueCode.custom, path: ["endpoints"], message: "Source and package targets cannot own service endpoints." });
94
+ if (target.kind === "source-check" && (!target.operations.verify || target.operations.start || target.operations.watch)) context.addIssue({ code: z.ZodIssueCode.custom, path: ["operations"], message: "Source-check targets require verify and cannot start a process." });
92
95
  if (target.kind === "local-companion" && target.endpoints.some((entry) => entry.visibility !== "loopback")) context.addIssue({ code: z.ZodIssueCode.custom, path: ["endpoints"], message: "Local companions must remain loopback-only." });
93
- if (target.kind !== "package-watch" && target.ready.kind === "marker") context.addIssue({ code: z.ZodIssueCode.custom, path: ["ready"], message: "Service targets require process, TCP, or HTTP readiness." });
96
+ if (target.kind !== "package-watch" && target.kind !== "source-check" && target.ready.kind === "marker") context.addIssue({ code: z.ZodIssueCode.custom, path: ["ready"], message: "Service targets require process, TCP, or HTTP readiness." });
97
+ if (target.executionCustody === "manager" && target.kind !== "rebuild-restart") context.addIssue({ code: z.ZodIssueCode.custom, path: ["executionCustody"], message: "Manager custody is reserved for rebuild-restart runtimes." });
94
98
  if (target.statePolicy === "shared-compatible" && target.migrationPolicy !== "explicit-review") context.addIssue({ code: z.ZodIssueCode.custom, path: ["migrationPolicy"], message: "Shared state requires explicit migration review." });
95
99
  });
96
100
  const developmentRuntimeSchema = z.preprocess(migrateDevelopmentRuntime, z.object({
@@ -188,6 +192,7 @@ const releaseEvidenceSchema = z.object({
188
192
  });
189
193
  export {
190
194
  developmentCandidateSchema,
195
+ developmentExecutionCustodySchema,
191
196
  developmentModeSchema,
192
197
  developmentReactionSchema,
193
198
  developmentRuntimeSchema,
@@ -2,6 +2,7 @@ import { commandPaths } from "./catalog/infrastructure/command-tree-paths.js";
2
2
  import { managedSecretCommands } from "./catalog/services/secret-commands.js";
3
3
  import { identityLoginCommand } from "./catalog/services/identity-commands.js";
4
4
  import { WORKDAY_PROFILE_COMMAND_BINDINGS } from "./catalog/workdays/profile-commands.js";
5
+ import { WORKDAY_PLAN_OPTIONS, WORKDAY_SELECTION_INPUTS } from "./catalog/workdays/selection-commands.js";
5
6
  import { hostProviderEnvironmentBranch, PROVIDER_ENVIRONMENT_COMMAND_BINDINGS, providerEnvironmentBranches } from "./catalog/provider-environment-commands.js";
6
7
  const unavailable = (reason = "This capability is not enabled until its control-plane operation is accepted.") => ({
7
8
  kind: "unavailable",
@@ -132,7 +133,7 @@ const operationBindings = {
132
133
  "seeds verify": operation("seeds.verify", [field("path", "name", "argument", "seed", true)]),
133
134
  "plans list": operation("plans.list", [field("path", "decisionId", "option", "decision", true), ...page()]),
134
135
  "plans show": operation("plans.show", [field("path", "capacityPlanId", "argument", "plan", true)]),
135
- "workdays plan": operation("workdays.plan", [field("path", "teamId", "context", "team", true), field("body", "profileId", "option", "profile"), field("body", "projects", "option", "projects", false, "csv"), field("body", "startsAt", "option", "start"), field("body", "endsAt", "option", "end"), field("body", "durationSeconds", "option", "duration", false, "integer"), field("body", "objectiveFilters", "option", "objective", false, "csv")]),
136
+ "workdays plan": operation("workdays.plan", [field("path", "teamId", "context", "team", true), field("body", "profileId", "option", "profile"), field("body", "projects", "option", "projects", false, "csv"), field("body", "startsAt", "option", "start"), field("body", "endsAt", "option", "end"), field("body", "durationSeconds", "option", "duration", false, "integer"), field("body", "objectiveFilters", "option", "objective", false, "csv"), field("body", "decisionIds", "option", "decision", false, "csv"), ...WORKDAY_SELECTION_INPUTS]),
136
137
  ...WORKDAY_PROFILE_COMMAND_BINDINGS,
137
138
  "workdays start": operation("workdays.start", [field("path", "teamId", "context", "team", true), field("body", "preflightId", "option", "preflight", true), field("body", "preflightDigest", "option", "digest", true)]),
138
139
  "workdays list": operation("workdays.list", [field("path", "teamId", "context", "team", true), ...page()]),
@@ -457,7 +458,7 @@ const commandTree = {
457
458
  branch("plans", [leaf("list"), leaf("show", "read", "plan"), leaf("explain", "read", "plan"), { nodeType: "leaf", segment: "diff", description: "Compare two API-derived plans.", kind: "read", arguments: [{ name: "left", description: "Left plan identity.", required: true }, { name: "right", description: "Right plan identity.", required: true }], resultSchemaId: "treeseed.command.plans.diff/v1", execution: unavailable() }]),
458
459
  branch("workdays", [
459
460
  branch("profiles", [leaf("list"), leaf("show", "read", "profile"), leaf("reconcile", "mutation", "project", "authority"), leaf("validate", "read", "file")]),
460
- leaf("plan", "mutation"),
461
+ { ...leaf("plan", "mutation"), nodeType: "leaf", segment: "plan", kind: "mutation", description: "Plan a workday with optional targeted cooperative planning; acting stays decision-governed.", resultSchemaId: "treeseed.command.workdays.plan/v1", options: WORKDAY_PLAN_OPTIONS },
461
462
  leaf("start", "mutation", void 0, "authority"),
462
463
  leaf("list"),
463
464
  leaf("show", "read", "workday"),
@@ -0,0 +1,3 @@
1
+ import type { CommandInputBinding, CommandLeafDescriptor } from '../../command-tree.js';
2
+ export declare const WORKDAY_SELECTION_INPUTS: CommandInputBinding[];
3
+ export declare const WORKDAY_PLAN_OPTIONS: NonNullable<CommandLeafDescriptor['options']>;
@@ -0,0 +1,16 @@
1
+ const WORKDAY_SELECTION_INPUTS = [
2
+ { target: "body", field: "agentSelection.agentSlugs", source: "option", name: "agent", transform: "csv" },
3
+ { target: "body", field: "agentSelection.activityTypes", source: "option", name: "activity", transform: "csv" },
4
+ { target: "body", field: "agentSelection.classSlugs", source: "option", name: "class", transform: "csv" }
5
+ ];
6
+ const WORKDAY_PLAN_OPTIONS = [
7
+ { name: "--plan", description: "Return the request without creating a preflight.", type: "boolean" },
8
+ { name: "--decision", description: "Accepted decision id; repeat or comma-separate. The API derives and verifies acting authority.", type: "string[]" },
9
+ { name: "--agent", description: "Planning agent slug; repeat or comma-separate. Intersects with class/activity selectors.", type: "string[]" },
10
+ { name: "--activity", description: "Planning activity: planning, estimating, reviewing, reporting, or chat; repeat or comma-separate.", type: "string[]" },
11
+ { name: "--class", description: "Planning class slug; repeat or comma-separate. Acting remains governed by accepted decisions.", type: "string[]" }
12
+ ];
13
+ export {
14
+ WORKDAY_PLAN_OPTIONS,
15
+ WORKDAY_SELECTION_INPUTS
16
+ };
@@ -23,6 +23,7 @@ export interface CommandAuthorizationDescriptor {
23
23
  export type CommandInputSource = 'argument' | 'context' | 'option';
24
24
  export type CommandInputTarget = 'path' | 'query' | 'body';
25
25
  export interface CommandInputBinding {
26
+ /** Dot-separated object path in the selected target; unsafe prototype keys are forbidden. */
26
27
  field: string;
27
28
  source: CommandInputSource;
28
29
  name: string;
@@ -1,4 +1,6 @@
1
1
  import { type WorkdayBorrowingEvidence } from './workday-profile.js';
2
+ import type { WorkdayAgentSelection } from '../agent-capacity/workday.js';
3
+ export { normalizeWorkdayAgentSelection } from '../agent-capacity/workday.js';
2
4
  export type WorkdayDemandMode = 'planning' | 'acting';
3
5
  export interface WorkdayIntent {
4
6
  schemaVersion: 'treeseed.workday-intent/v1';
@@ -9,6 +11,10 @@ export interface WorkdayIntent {
9
11
  endsAt?: string;
10
12
  durationSeconds?: number;
11
13
  objectiveFilters?: string[];
14
+ /** Selects accepted decisions for API-derived acting work; it does not grant acting authority. */
15
+ decisionIds?: string[];
16
+ /** Limits cooperative planning; acting still requires accepted decision/estimate authority. */
17
+ agentSelection?: Partial<WorkdayAgentSelection>;
12
18
  operatorConstraints?: {
13
19
  providerIds?: string[];
14
20
  maxConcurrency?: number;
@@ -151,6 +157,7 @@ export interface WorkdayLifecycleDiagnostic {
151
157
  message: string;
152
158
  }
153
159
  export declare function validateWorkdayIntent(intent: WorkdayIntent): WorkdayLifecycleDiagnostic[];
160
+ export declare function validateWorkdayIntentSelection(value: unknown): WorkdayLifecycleDiagnostic[];
154
161
  export declare function validateSelectedDemand(demand: WorkdaySelectedDemand): WorkdayLifecycleDiagnostic[];
155
162
  export declare function validateWorkdayPreflight(receipt: WorkdayPreflightReceipt, now?: Date): WorkdayLifecycleDiagnostic[];
156
163
  export declare function validateWorkdayPreflightFreshness(receipt: WorkdayPreflightReceipt, observed: WorkdayPreflightObservation): WorkdayLifecycleDiagnostic[];
@@ -1,4 +1,5 @@
1
1
  import { validateWorkdayBorrowingEvidence } from "./workday-profile.js";
2
+ import { normalizeWorkdayAgentSelection } from "../agent-capacity/workday.js";
2
3
  function validateWorkdayIntent(intent) {
3
4
  const diagnostics = [];
4
5
  if (intent.schemaVersion !== "treeseed.workday-intent/v1") diagnostics.push({ code: "schema_version_invalid", path: "schemaVersion", message: "Unsupported workday intent schema." });
@@ -9,6 +10,31 @@ function validateWorkdayIntent(intent) {
9
10
  if (!Number.isFinite(start)) diagnostics.push({ code: "start_invalid", path: "startsAt", message: "startsAt must be an ISO timestamp." });
10
11
  if (intent.endsAt !== void 0 && (!Number.isFinite(Date.parse(intent.endsAt)) || Date.parse(intent.endsAt) <= start)) diagnostics.push({ code: "end_invalid", path: "endsAt", message: "endsAt must be a valid timestamp after startsAt." });
11
12
  if (intent.durationSeconds !== void 0 && (!Number.isInteger(intent.durationSeconds) || intent.durationSeconds <= 0)) diagnostics.push({ code: "duration_invalid", path: "durationSeconds", message: "durationSeconds must be a positive integer." });
13
+ if (intent.decisionIds !== void 0 && (!Array.isArray(intent.decisionIds) || intent.decisionIds.length === 0 || intent.decisionIds.length > 64 || intent.decisionIds.some((entry) => typeof entry !== "string" || !entry.trim() || entry.length > 128))) {
14
+ diagnostics.push({ code: "decision_selection_invalid", path: "decisionIds", message: "Decision selection must be a bounded nonempty array of decision identities." });
15
+ }
16
+ if (intent.agentSelection !== void 0) diagnostics.push(...validateWorkdayIntentSelection(intent.agentSelection));
17
+ return diagnostics;
18
+ }
19
+ function validateWorkdayIntentSelection(value) {
20
+ const invalid = (path, message) => ({ code: "agent_selection_invalid", path: `agentSelection${path ? `.${path}` : ""}`, message });
21
+ if (!value || typeof value !== "object" || Array.isArray(value)) return [invalid("", "Agent selection must be an object.")];
22
+ const selection = value, diagnostics = [];
23
+ const fields = ["classIds", "classSlugs", "agentSlugs", "activityTypes"];
24
+ for (const key of Object.keys(selection)) if (![...fields, "mode"].includes(key)) diagnostics.push(invalid(key, "Unknown selection field."));
25
+ if (selection.mode !== void 0 && !["intersection", "union"].includes(String(selection.mode))) diagnostics.push(invalid("mode", "Select intersection or union."));
26
+ let selected = 0;
27
+ for (const field of fields) {
28
+ const entries = selection[field];
29
+ if (entries === void 0) continue;
30
+ if (!Array.isArray(entries) || entries.length > 128 || entries.some((entry) => typeof entry !== "string" || !entry.trim() || entry.length > 128)) {
31
+ diagnostics.push(invalid(field, "Selectors must be a bounded array of nonempty strings."));
32
+ continue;
33
+ }
34
+ selected += entries.length;
35
+ if (field === "activityTypes" && entries.some((entry) => !["planning", "estimating", "reviewing", "reporting", "chat"].includes(String(entry).trim()))) diagnostics.push(invalid(field, "Select a planning activity; acting is controlled by accepted decisions and estimates."));
36
+ }
37
+ if (!selected) diagnostics.push(invalid("", "Explicit selection must select an agent, class, or activity; omit it to select all."));
12
38
  return diagnostics;
13
39
  }
14
40
  function validateSelectedDemand(demand) {
@@ -57,8 +83,10 @@ function validateWorkdaySettlement(settlement) {
57
83
  return diagnostics;
58
84
  }
59
85
  export {
86
+ normalizeWorkdayAgentSelection,
60
87
  validateSelectedDemand,
61
88
  validateWorkdayIntent,
89
+ validateWorkdayIntentSelection,
62
90
  validateWorkdayPreflight,
63
91
  validateWorkdayPreflightFreshness,
64
92
  validateWorkdaySettlement
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/sdk",
3
- "version": "0.13.0-rc.116",
3
+ "version": "0.13.0-rc.118",
4
4
  "description": "Portable TreeSeed contracts, standards, and typed remote control-plane clients.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {