@treeseed/sdk 0.13.0-rc.126 → 0.13.0-rc.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +2 -6
- package/dist/agent-capacity/workday.d.ts +13 -4
- package/dist/agent-capacity/workday.js +10 -26
- package/dist/content/validation/content-model-schemas.d.ts +8453 -5653
- package/dist/content/validation/content-model-schemas.js +75 -30
- package/dist/content/validation/portable-content-data.d.ts +102 -0
- package/dist/operator-contracts/catalog/workdays/selection-commands.js +0 -2
- package/dist/operator-contracts/workday-lifecycle.d.ts +3 -9
- package/dist/operator-contracts/workday-lifecycle.js +4 -6
- package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +12 -0
- package/guarantees/verifiers/golden.verifiers.yaml +22 -2
- package/package.json +1 -1
|
@@ -76,32 +76,13 @@ const proposalLinks = {
|
|
|
76
76
|
decision_dependencies: z.array(z.object({ projectId: nonEmpty, decisionId: nonEmpty }).strict()).optional(),
|
|
77
77
|
...linked
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
id: slug,
|
|
81
|
-
priority: z.number().int().safe().optional(),
|
|
82
|
-
activity: z.literal("acting"),
|
|
83
|
-
agentClass,
|
|
84
|
-
workspace: z.enum(["read-only", "treedx", "git"]),
|
|
85
|
-
review: z.enum(["required", "none"]),
|
|
86
|
-
objective: nonEmpty,
|
|
87
|
-
estimate: estimateSchema.optional(),
|
|
88
|
-
reviewEstimate: estimateSchema.optional(),
|
|
89
|
-
maximumReviewCycles: z.number().int().positive().optional(),
|
|
90
|
-
dependsOn: unique(z.array(slug)),
|
|
91
|
-
requestedPermissions: permissionSetSchema,
|
|
92
|
-
requiredCapabilities: unique(z.array(identifier)).optional(),
|
|
93
|
-
contextRefs: unique(exactRefs).optional(),
|
|
94
|
-
acceptanceCriteria: z.array(nonEmpty).min(1)
|
|
95
|
-
}).strict(), [
|
|
96
|
-
{ field: "review", equals: "required", alternatives: [["maximumReviewCycles"]], message: "Required review needs a maximum cycle count." },
|
|
97
|
-
{ field: "review", equals: "none", forbidden: { fields: ["reviewEstimate", "maximumReviewCycles"] }, message: "Unreviewed work cannot define review estimates or cycles." }
|
|
98
|
-
]).superRefine((value, context) => {
|
|
79
|
+
function validateWorkItemWorkspace(value, context) {
|
|
99
80
|
if (value.workspace !== "read-only") {
|
|
100
81
|
const mutable = (value.contextRefs ?? []).filter((reference) => reference.store === value.workspace && reference.model === "repository");
|
|
101
82
|
if (mutable.length !== 1) context.addIssue({ code: z.ZodIssueCode.custom, path: ["contextRefs"], message: `${value.workspace} work requires exactly one exact ${value.workspace} workspace reference.` });
|
|
102
83
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
84
|
+
}
|
|
85
|
+
function validateWorkItemDependencies(value, context) {
|
|
105
86
|
const ids = new Set(value.workItems.map((item) => item.id));
|
|
106
87
|
if (ids.size !== value.workItems.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Work-item IDs must be unique." });
|
|
107
88
|
for (const [index, item] of value.workItems.entries()) for (const dependency of item.dependsOn) {
|
|
@@ -120,7 +101,28 @@ const executionPlanSchema = z.object({ workItems: z.array(executionPlanWorkItemS
|
|
|
120
101
|
return false;
|
|
121
102
|
};
|
|
122
103
|
if ([...ids].some(cyclic)) context.addIssue({ code: z.ZodIssueCode.custom, path: ["workItems"], message: "Work-item dependencies must be acyclic." });
|
|
123
|
-
}
|
|
104
|
+
}
|
|
105
|
+
const executionPlanWorkItemSchema = conditionalFields(z.object({
|
|
106
|
+
id: slug,
|
|
107
|
+
priority: z.number().int().safe().optional(),
|
|
108
|
+
activity: z.literal("acting"),
|
|
109
|
+
agentClass,
|
|
110
|
+
workspace: z.enum(["read-only", "treedx", "git"]),
|
|
111
|
+
review: z.enum(["required", "none"]),
|
|
112
|
+
objective: nonEmpty,
|
|
113
|
+
estimate: estimateSchema.optional(),
|
|
114
|
+
reviewEstimate: estimateSchema.optional(),
|
|
115
|
+
maximumReviewCycles: z.number().int().positive().optional(),
|
|
116
|
+
dependsOn: unique(z.array(slug)),
|
|
117
|
+
requestedPermissions: permissionSetSchema,
|
|
118
|
+
requiredCapabilities: unique(z.array(identifier)).optional(),
|
|
119
|
+
contextRefs: unique(exactRefs).optional(),
|
|
120
|
+
acceptanceCriteria: z.array(nonEmpty).min(1)
|
|
121
|
+
}).strict(), [
|
|
122
|
+
{ field: "review", equals: "required", alternatives: [["maximumReviewCycles"]], message: "Required review needs a maximum cycle count." },
|
|
123
|
+
{ field: "review", equals: "none", forbidden: { fields: ["reviewEstimate", "maximumReviewCycles"] }, message: "Unreviewed work cannot define review estimates or cycles." }
|
|
124
|
+
]).superRefine(validateWorkItemWorkspace);
|
|
125
|
+
const executionPlanSchema = z.object({ workItems: z.array(executionPlanWorkItemSchema).min(1) }).strict().superRefine(validateWorkItemDependencies);
|
|
124
126
|
const proposalSchema = conditionalFields(z.object({
|
|
125
127
|
schemaVersion: z.literal("treeseed.proposal/v1"),
|
|
126
128
|
id: identifier,
|
|
@@ -146,6 +148,46 @@ const proposalSchema = conditionalFields(z.object({
|
|
|
146
148
|
},
|
|
147
149
|
message: "Ready proposals require a summary, an execution plan, and each required independent estimate."
|
|
148
150
|
}]);
|
|
151
|
+
const estimateAssignmentRefSchema = exactEntityReferenceSchema.innerType().pick({ store: true, model: true, id: true, revision: true }).extend({
|
|
152
|
+
store: z.literal("postgresql"),
|
|
153
|
+
model: z.literal("assignment-attempt"),
|
|
154
|
+
revision: z.number().int().positive()
|
|
155
|
+
}).strict();
|
|
156
|
+
const contributionEstimateSchema = estimateSchema.innerType().extend({ rationale: nonEmpty }).refine(
|
|
157
|
+
(value) => estimateSchema.safeParse(value).success,
|
|
158
|
+
{ message: "Contribution estimates must satisfy the shared bounded estimate contract." }
|
|
159
|
+
);
|
|
160
|
+
const contributionWorkItemSchema = conditionalFields(executionPlanWorkItemSchema.innerType().innerType().omit({ agentClass: true }).extend({
|
|
161
|
+
estimateRef: estimateAssignmentRefSchema,
|
|
162
|
+
estimate: contributionEstimateSchema,
|
|
163
|
+
reviewEstimate: contributionEstimateSchema.optional()
|
|
164
|
+
}), [
|
|
165
|
+
{
|
|
166
|
+
field: "review",
|
|
167
|
+
equals: "required",
|
|
168
|
+
alternatives: [["maximumReviewCycles", "reviewEstimate"]],
|
|
169
|
+
message: "Reviewed contributions require bounded cycles and their author\u2019s own review estimate."
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
field: "review",
|
|
173
|
+
equals: "none",
|
|
174
|
+
forbidden: { fields: ["reviewEstimate", "maximumReviewCycles"] },
|
|
175
|
+
message: "Unreviewed work cannot define review estimates or cycles."
|
|
176
|
+
}
|
|
177
|
+
]).superRefine(validateWorkItemWorkspace);
|
|
178
|
+
const contributionExecutionPlanSchema = executionPlanSchema.innerType().extend({
|
|
179
|
+
workItems: z.array(contributionWorkItemSchema).min(1)
|
|
180
|
+
}).superRefine(validateWorkItemDependencies);
|
|
181
|
+
const contributionProposalSchema = conditionalFields(proposalSchema.innerType().extend({
|
|
182
|
+
schemaVersion: z.literal("treeseed.proposal/v2"),
|
|
183
|
+
groupIds: unique(z.array(identifier).min(1)),
|
|
184
|
+
executionPlan: contributionExecutionPlanSchema.optional()
|
|
185
|
+
}), [{
|
|
186
|
+
field: "status",
|
|
187
|
+
in: ["ready", "decided"],
|
|
188
|
+
alternatives: [["summary", "executionPlan"]],
|
|
189
|
+
message: "Ready proposals require the contribution plan from every subscribed participant."
|
|
190
|
+
}]);
|
|
149
191
|
const schemas = {
|
|
150
192
|
page: z.object({
|
|
151
193
|
title: nonEmpty,
|
|
@@ -201,7 +243,7 @@ const schemas = {
|
|
|
201
243
|
status: z.enum(["active", "achieved", "abandoned"]),
|
|
202
244
|
evidenceRefs: unique(exactRefs).optional()
|
|
203
245
|
}).strict(),
|
|
204
|
-
proposal: proposalSchema,
|
|
246
|
+
proposal: z.union([contributionProposalSchema, proposalSchema]),
|
|
205
247
|
decision: conditionalFields(z.object({
|
|
206
248
|
schemaVersion: z.literal("treeseed.decision/v1"),
|
|
207
249
|
id: identifier,
|
|
@@ -395,8 +437,11 @@ function validateContentFrontmatter(model, value) {
|
|
|
395
437
|
}))
|
|
396
438
|
};
|
|
397
439
|
}
|
|
398
|
-
function describeContentFrontmatterSchema(model) {
|
|
399
|
-
return schemas[model];
|
|
440
|
+
function describeContentFrontmatterSchema(model, schemaVersion) {
|
|
441
|
+
if (model !== "proposal") return schemas[model];
|
|
442
|
+
if (schemaVersion === "treeseed.proposal/v1") return proposalSchema;
|
|
443
|
+
if (schemaVersion !== void 0 && schemaVersion !== "treeseed.proposal/v2") throw new Error("proposal_schema_version_unsupported");
|
|
444
|
+
return contributionProposalSchema;
|
|
400
445
|
}
|
|
401
446
|
function fieldContract(schema) {
|
|
402
447
|
let current = schema;
|
|
@@ -432,8 +477,8 @@ function fieldContract(schema) {
|
|
|
432
477
|
};
|
|
433
478
|
return { ...contract, type: current._def.typeName ?? "unknown" };
|
|
434
479
|
}
|
|
435
|
-
function describeContentFrontmatterContract(model) {
|
|
436
|
-
const selected =
|
|
480
|
+
function describeContentFrontmatterContract(model, schemaVersion) {
|
|
481
|
+
const selected = describeContentFrontmatterSchema(model, schemaVersion);
|
|
437
482
|
const schema = selected instanceof z.ZodEffects ? selected.innerType() : selected;
|
|
438
483
|
if (!(schema instanceof z.ZodObject)) throw new Error(`Content model ${model} is not an object schema.`);
|
|
439
484
|
return {
|
|
@@ -461,8 +506,8 @@ function contractJsonSchema(contract) {
|
|
|
461
506
|
if (type === "date") return { type: "string", format: "date-time" };
|
|
462
507
|
return Object.fromEntries(Object.entries(contract).filter(([name]) => !["required", "fields", "items"].includes(name)));
|
|
463
508
|
}
|
|
464
|
-
function describeContentFrontmatterJsonSchema(model) {
|
|
465
|
-
const contract = describeContentFrontmatterContract(model);
|
|
509
|
+
function describeContentFrontmatterJsonSchema(model, schemaVersion) {
|
|
510
|
+
const contract = describeContentFrontmatterContract(model, schemaVersion);
|
|
466
511
|
return contractJsonSchema({ required: true, type: "object", fields: contract.fields });
|
|
467
512
|
}
|
|
468
513
|
export {
|
|
@@ -523,6 +523,108 @@ export declare function validatePortableContentData(model: string, value: unknow
|
|
|
523
523
|
maximumReviewCycles?: number | undefined;
|
|
524
524
|
}[];
|
|
525
525
|
} | undefined;
|
|
526
|
+
} | {
|
|
527
|
+
status: "ready" | "draft" | "discussing" | "decided" | "withdrawn";
|
|
528
|
+
id: string;
|
|
529
|
+
schemaVersion: "treeseed.proposal/v2";
|
|
530
|
+
title: string;
|
|
531
|
+
groupIds: string[];
|
|
532
|
+
request: string;
|
|
533
|
+
projectId: string;
|
|
534
|
+
summary?: string | undefined;
|
|
535
|
+
evidenceRefs?: {
|
|
536
|
+
id: string;
|
|
537
|
+
model: string;
|
|
538
|
+
store: "url" | "treedx" | "git" | "postgresql";
|
|
539
|
+
path?: string | undefined;
|
|
540
|
+
anchor?: string | undefined;
|
|
541
|
+
url?: string | undefined;
|
|
542
|
+
commit?: string | undefined;
|
|
543
|
+
repository?: string | undefined;
|
|
544
|
+
revision?: number | undefined;
|
|
545
|
+
digest?: string | undefined;
|
|
546
|
+
startLine?: number | undefined;
|
|
547
|
+
endLine?: number | undefined;
|
|
548
|
+
}[] | undefined;
|
|
549
|
+
objectiveRefs?: {
|
|
550
|
+
id: string;
|
|
551
|
+
model: string;
|
|
552
|
+
store: "url" | "treedx" | "git" | "postgresql";
|
|
553
|
+
path?: string | undefined;
|
|
554
|
+
anchor?: string | undefined;
|
|
555
|
+
url?: string | undefined;
|
|
556
|
+
commit?: string | undefined;
|
|
557
|
+
repository?: string | undefined;
|
|
558
|
+
revision?: number | undefined;
|
|
559
|
+
digest?: string | undefined;
|
|
560
|
+
startLine?: number | undefined;
|
|
561
|
+
endLine?: number | undefined;
|
|
562
|
+
}[] | undefined;
|
|
563
|
+
discussionRef?: {
|
|
564
|
+
id: string;
|
|
565
|
+
model: string;
|
|
566
|
+
store: "url" | "treedx" | "git" | "postgresql";
|
|
567
|
+
path?: string | undefined;
|
|
568
|
+
anchor?: string | undefined;
|
|
569
|
+
url?: string | undefined;
|
|
570
|
+
commit?: string | undefined;
|
|
571
|
+
repository?: string | undefined;
|
|
572
|
+
revision?: number | undefined;
|
|
573
|
+
digest?: string | undefined;
|
|
574
|
+
startLine?: number | undefined;
|
|
575
|
+
endLine?: number | undefined;
|
|
576
|
+
} | undefined;
|
|
577
|
+
executionPlan?: {
|
|
578
|
+
workItems: {
|
|
579
|
+
id: string;
|
|
580
|
+
objective: string;
|
|
581
|
+
estimate: {
|
|
582
|
+
expectedSeconds: number;
|
|
583
|
+
maximumSeconds: number;
|
|
584
|
+
rationale: string;
|
|
585
|
+
};
|
|
586
|
+
review: "none" | "required";
|
|
587
|
+
dependsOn: string[];
|
|
588
|
+
activity: "acting";
|
|
589
|
+
acceptanceCriteria: string[];
|
|
590
|
+
workspace: "read-only" | "treedx" | "git";
|
|
591
|
+
requestedPermissions: {
|
|
592
|
+
content: {
|
|
593
|
+
read: ("agent" | "note" | "question" | "proposal" | "decision" | "book" | "knowledge" | "objective" | "discussion" | "discussion-message")[];
|
|
594
|
+
write: ("agent" | "note" | "question" | "proposal" | "decision" | "book" | "knowledge" | "objective" | "discussion" | "discussion-message")[];
|
|
595
|
+
};
|
|
596
|
+
tools: ("discussion" | "source.read" | "source.write" | "verification" | "release")[];
|
|
597
|
+
};
|
|
598
|
+
estimateRef: {
|
|
599
|
+
id: string;
|
|
600
|
+
revision: number;
|
|
601
|
+
model: "assignment-attempt";
|
|
602
|
+
store: "postgresql";
|
|
603
|
+
};
|
|
604
|
+
priority?: number | undefined;
|
|
605
|
+
requiredCapabilities?: string[] | undefined;
|
|
606
|
+
contextRefs?: {
|
|
607
|
+
id: string;
|
|
608
|
+
model: string;
|
|
609
|
+
store: "url" | "treedx" | "git" | "postgresql";
|
|
610
|
+
path?: string | undefined;
|
|
611
|
+
anchor?: string | undefined;
|
|
612
|
+
url?: string | undefined;
|
|
613
|
+
commit?: string | undefined;
|
|
614
|
+
repository?: string | undefined;
|
|
615
|
+
revision?: number | undefined;
|
|
616
|
+
digest?: string | undefined;
|
|
617
|
+
startLine?: number | undefined;
|
|
618
|
+
endLine?: number | undefined;
|
|
619
|
+
}[] | undefined;
|
|
620
|
+
reviewEstimate?: {
|
|
621
|
+
expectedSeconds: number;
|
|
622
|
+
maximumSeconds: number;
|
|
623
|
+
rationale: string;
|
|
624
|
+
} | undefined;
|
|
625
|
+
maximumReviewCycles?: number | undefined;
|
|
626
|
+
}[];
|
|
627
|
+
} | undefined;
|
|
526
628
|
} | {
|
|
527
629
|
title: string;
|
|
528
630
|
status?: "planned" | "live" | "in progress" | "exploratory" | "speculative" | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
const WORKDAY_SELECTION_INPUTS = [
|
|
2
|
-
{ target: "body", field: "reportingAgentId", source: "option", name: "reportingAgent", required: false, transform: "identity" },
|
|
3
2
|
{ target: "body", field: "allocation.planningPercent", source: "option", name: "planningPercent", transform: "number" },
|
|
4
3
|
{ target: "body", field: "allocation.allocationWeight", source: "option", name: "allocationWeight", transform: "number" },
|
|
5
4
|
{ target: "body", field: "allocation.planningTurnMaximumSeconds", source: "option", name: "planningTurnMaximumSeconds", transform: "integer" },
|
|
@@ -9,7 +8,6 @@ const WORKDAY_SELECTION_INPUTS = [
|
|
|
9
8
|
{ target: "body", field: "agentSelection.activityTypes", source: "option", name: "activity", transform: "csv" }
|
|
10
9
|
];
|
|
11
10
|
const WORKDAY_PLAN_OPTIONS = [
|
|
12
|
-
{ name: "--reporting-agent", description: "Closeout Reporter identity; required when several are eligible.", type: "string" },
|
|
13
11
|
{ name: "--planning-percent", description: "Planning share of workday time and capacity (default 20%).", type: "number" },
|
|
14
12
|
{ name: "--allocation-weight", description: "Relative share among eligible concurrent workdays (default 1).", type: "number" },
|
|
15
13
|
{ name: "--planning-turn-maximum-seconds", description: "Maximum active seconds per planning turn (default 180).", type: "number" },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WorkdayAgentSelection } from '../agent-capacity/workday.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export { normalizeWorkdayAgentSelection } from '../agent-capacity/workday.js';
|
|
4
4
|
export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
@@ -15,7 +15,6 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
15
15
|
proposalIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
16
16
|
decisionIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
17
17
|
groupIds: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>>;
|
|
18
|
-
reportingAgentId: z.ZodOptional<z.ZodString>;
|
|
19
18
|
continueFromWorkdayId: z.ZodOptional<z.ZodString>;
|
|
20
19
|
allocation: z.ZodOptional<z.ZodObject<{
|
|
21
20
|
planningPercent: z.ZodOptional<z.ZodNumber>;
|
|
@@ -37,8 +36,9 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
37
36
|
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
38
37
|
}>>;
|
|
39
38
|
agentSelection: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
40
|
-
activityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["planning", "estimating", "reviewing", "reporting", "chat"]>, "many">>;
|
|
41
39
|
mode: z.ZodOptional<z.ZodLiteral<"intersection">>;
|
|
40
|
+
} & {
|
|
41
|
+
activityTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["planning", "estimating", "reviewing", "reporting", "chat"]>, "many">>;
|
|
42
42
|
}, "strict", z.ZodTypeAny, {
|
|
43
43
|
mode?: "intersection" | undefined;
|
|
44
44
|
activityTypes?: ("planning" | "estimating" | "reviewing" | "reporting" | "chat")[] | undefined;
|
|
@@ -69,7 +69,6 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
69
69
|
durationSeconds?: number | undefined;
|
|
70
70
|
projects?: any;
|
|
71
71
|
executionMode?: "simulation" | "production" | undefined;
|
|
72
|
-
reportingAgentId?: string | undefined;
|
|
73
72
|
endsAt?: string | undefined;
|
|
74
73
|
planningOnly?: boolean | undefined;
|
|
75
74
|
objectiveFilters?: string[] | undefined;
|
|
@@ -99,7 +98,6 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
99
98
|
durationSeconds?: number | undefined;
|
|
100
99
|
projects?: any;
|
|
101
100
|
executionMode?: "simulation" | "production" | undefined;
|
|
102
|
-
reportingAgentId?: string | undefined;
|
|
103
101
|
endsAt?: string | undefined;
|
|
104
102
|
planningOnly?: boolean | undefined;
|
|
105
103
|
objectiveFilters?: string[] | undefined;
|
|
@@ -129,7 +127,6 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
129
127
|
durationSeconds?: number | undefined;
|
|
130
128
|
projects?: any;
|
|
131
129
|
executionMode?: "simulation" | "production" | undefined;
|
|
132
|
-
reportingAgentId?: string | undefined;
|
|
133
130
|
endsAt?: string | undefined;
|
|
134
131
|
planningOnly?: boolean | undefined;
|
|
135
132
|
objectiveFilters?: string[] | undefined;
|
|
@@ -159,7 +156,6 @@ export declare const workdayIntentSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
159
156
|
durationSeconds?: number | undefined;
|
|
160
157
|
projects?: any;
|
|
161
158
|
executionMode?: "simulation" | "production" | undefined;
|
|
162
|
-
reportingAgentId?: string | undefined;
|
|
163
159
|
endsAt?: string | undefined;
|
|
164
160
|
planningOnly?: boolean | undefined;
|
|
165
161
|
objectiveFilters?: string[] | undefined;
|
|
@@ -202,8 +198,6 @@ export interface WorkdayIntent {
|
|
|
202
198
|
groupIds?: string[];
|
|
203
199
|
/** Selects accepted decisions for API-derived acting work; it does not grant acting authority. */
|
|
204
200
|
decisionIds?: string[];
|
|
205
|
-
/** Selects one configured closeout agent; the API resolves its frozen reporting profile. */
|
|
206
|
-
reportingAgentId?: string;
|
|
207
201
|
/** Continue exact accepted work from a settled workday; omission starts a fresh simulation. */
|
|
208
202
|
continueFromWorkdayId?: string;
|
|
209
203
|
/** Selects activity phases without excluding group participants by identity or class. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { workdayActivitySelectionSchema } from "../agent-capacity/workday.js";
|
|
1
2
|
import { workdayAllocationOverridesSchema } from "../agent-capacity/contracts/capacity/workdays/workday-allocation.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { leaseSchema } from "../agent-capacity/contracts/capacity/assignments/agent-execution.js";
|
|
@@ -5,10 +6,9 @@ import { alternativeProperties, conditionalFields, exclusiveProperties, exclusiv
|
|
|
5
6
|
import { normalizeWorkdayAgentSelection } from "../agent-capacity/workday.js";
|
|
6
7
|
const identifier = leaseSchema.shape.id, timestamp = leaseSchema.shape.acquiredAt;
|
|
7
8
|
const selectedIdentities = uniqueArray(z.array(identifier).min(1).max(64));
|
|
8
|
-
const intentAgentSelectionSchema = alternativeProperties(
|
|
9
|
-
activityTypes:
|
|
10
|
-
|
|
11
|
-
}).strict(), ["activityTypes"]);
|
|
9
|
+
const intentAgentSelectionSchema = alternativeProperties(workdayActivitySelectionSchema.extend({
|
|
10
|
+
activityTypes: workdayActivitySelectionSchema.shape.activityTypes.unwrap().min(1).optional()
|
|
11
|
+
}), ["activityTypes"]);
|
|
12
12
|
const workdayIntentFields = z.object({
|
|
13
13
|
schemaVersion: z.literal("treeseed.workday-intent/v1"),
|
|
14
14
|
teamId: identifier,
|
|
@@ -23,7 +23,6 @@ const workdayIntentFields = z.object({
|
|
|
23
23
|
proposalIds: selectedIdentities.optional(),
|
|
24
24
|
decisionIds: selectedIdentities.optional(),
|
|
25
25
|
groupIds: selectedIdentities.optional(),
|
|
26
|
-
reportingAgentId: identifier.optional(),
|
|
27
26
|
continueFromWorkdayId: z.string().min(1).max(128).regex(/\S/u).optional(),
|
|
28
27
|
allocation: workdayAllocationOverridesSchema.optional(),
|
|
29
28
|
agentSelection: intentAgentSelectionSchema.optional(),
|
|
@@ -70,7 +69,6 @@ function validateWorkdayIntent(intent) {
|
|
|
70
69
|
proposalIds: "proposal_selection_invalid",
|
|
71
70
|
decisionIds: "decision_selection_invalid",
|
|
72
71
|
groupIds: "group_selection_invalid",
|
|
73
|
-
reportingAgentId: "reporting_agent_selection_invalid",
|
|
74
72
|
continueFromWorkdayId: "continuation_invalid",
|
|
75
73
|
agentSelection: "agent_selection_invalid",
|
|
76
74
|
allocation: "allocation_invalid"
|
|
@@ -3,6 +3,18 @@ id: sdk.golden.component-boundaries
|
|
|
3
3
|
title: sdk golden component boundaries
|
|
4
4
|
scope: local-component-tests
|
|
5
5
|
workflow:
|
|
6
|
+
- id: group-contribution-unit
|
|
7
|
+
action: { verifier: sdk.golden.group-contribution-unit }
|
|
8
|
+
expect: { status: passed }
|
|
9
|
+
- id: group-contribution-denials
|
|
10
|
+
action: { verifier: sdk.golden.group-contribution-denials }
|
|
11
|
+
expect: { status: passed }
|
|
12
|
+
- id: group-contribution-native
|
|
13
|
+
action: { verifier: sdk.golden.group-contribution-native }
|
|
14
|
+
expect: { status: passed }
|
|
15
|
+
- id: group-phase-selection
|
|
16
|
+
action: { verifier: sdk.golden.group-phase-selection }
|
|
17
|
+
expect: { status: passed }
|
|
6
18
|
- id: integration-reviewed-input-unit
|
|
7
19
|
action: { verifier: sdk.golden.integration-reviewed-input-unit }
|
|
8
20
|
expect: { status: passed }
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
schemaVersion: treeseed.guarantee-verifiers/v1
|
|
2
2
|
ownerPackage: "@treeseed/sdk"
|
|
3
3
|
verifiers:
|
|
4
|
+
sdk.golden.group-contribution-unit:
|
|
5
|
+
kind: vitestCase
|
|
6
|
+
ownerPackage: "@treeseed/sdk"
|
|
7
|
+
testFile: tests/unit/content/proposals/group-contributions.test.ts
|
|
8
|
+
testName: "retains each independently estimated contribution and dependency without agent targeting"
|
|
9
|
+
sdk.golden.group-contribution-denials:
|
|
10
|
+
kind: vitestCase
|
|
11
|
+
ownerPackage: "@treeseed/sdk"
|
|
12
|
+
testFile: tests/unit/content/proposals/group-contributions.test.ts
|
|
13
|
+
testName: "requires a group and actual estimate-assignment provenance rather than caller-selected agent identity"
|
|
14
|
+
sdk.golden.group-contribution-native:
|
|
15
|
+
kind: vitestCase
|
|
16
|
+
ownerPackage: "@treeseed/sdk"
|
|
17
|
+
testFile: tests/unit/content/proposals/group-contributions.test.ts
|
|
18
|
+
testName: "native public proposal validation preserves every contribution and historical read while rejecting forged target fields and malformed estimates"
|
|
19
|
+
sdk.golden.group-phase-selection:
|
|
20
|
+
kind: vitestCase
|
|
21
|
+
ownerPackage: "@treeseed/sdk"
|
|
22
|
+
testFile: tests/unit/operator-contracts/group-workday-intent.test.ts
|
|
23
|
+
testName: "keeps normalized internal phase snapshots free of identity filters and rejects legacy targeting"
|
|
4
24
|
sdk.golden.cli-read-library-unit:
|
|
5
25
|
kind: vitestCase
|
|
6
26
|
ownerPackage: "@treeseed/sdk"
|
|
@@ -1421,9 +1441,9 @@ verifiers:
|
|
|
1421
1441
|
kind: vitestCase
|
|
1422
1442
|
ownerPackage: "@treeseed/sdk"
|
|
1423
1443
|
testFile: tests/unit/operator-contracts/workday-lifecycle.test.ts
|
|
1424
|
-
testName: "
|
|
1444
|
+
testName: "rejects every explicit reporting identity so group configuration owns closeout participation"
|
|
1425
1445
|
sdk.golden.reporting-selection-command:
|
|
1426
1446
|
kind: vitestCase
|
|
1427
1447
|
ownerPackage: "@treeseed/sdk"
|
|
1428
1448
|
testFile: tests/unit/operator-contracts/command-tree.test.ts
|
|
1429
|
-
testName: "
|
|
1449
|
+
testName: "removes explicit closeout agent selection from direct Workday planning and scheduling while retaining group and phase controls"
|