@treeseed/sdk 0.13.0-rc.129 → 0.13.0-rc.130
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.
|
@@ -17,7 +17,14 @@ import { AGENT_TEAM_CLONE_OPERATIONS } from "./catalog/agents/agent-team-clone-o
|
|
|
17
17
|
import { workdayIntentRequestSchema } from "./workday-lifecycle.js";
|
|
18
18
|
const empty = z.object({}).strict(), none = z.undefined(), record = z.record(z.unknown()), payload = record;
|
|
19
19
|
const workdayIntent = workdayIntentRequestSchema;
|
|
20
|
-
const scheduledWorkdayIntent = record.transform((value) =>
|
|
20
|
+
const scheduledWorkdayIntent = record.transform((value, context) => {
|
|
21
|
+
const intent = workdayIntent.safeParse(value.intent);
|
|
22
|
+
if (!intent.success) {
|
|
23
|
+
for (const issue of intent.error.issues) context.addIssue({ ...issue, path: ["intent", ...issue.path] });
|
|
24
|
+
return z.NEVER;
|
|
25
|
+
}
|
|
26
|
+
return { ...value, intent: intent.data };
|
|
27
|
+
});
|
|
21
28
|
const providerRequest = record.superRefine((value, context) => {
|
|
22
29
|
if (Object.hasOwn(value, "modeRunId")) context.addIssue({ code: z.ZodIssueCode.custom, path: ["modeRunId"], message: "Mode-run identity is retired; use assignment and attempt identity." });
|
|
23
30
|
});
|
|
@@ -3,6 +3,9 @@ id: sdk.golden.component-boundaries
|
|
|
3
3
|
title: sdk golden component boundaries
|
|
4
4
|
scope: local-component-tests
|
|
5
5
|
workflow:
|
|
6
|
+
- id: scheduled-intent-validation
|
|
7
|
+
action: { verifier: sdk.golden.scheduled-intent-validation }
|
|
8
|
+
expect: { status: passed }
|
|
6
9
|
- id: group-contribution-unit
|
|
7
10
|
action: { verifier: sdk.golden.group-contribution-unit }
|
|
8
11
|
expect: { status: passed }
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
schemaVersion: treeseed.guarantee-verifiers/v1
|
|
2
2
|
ownerPackage: "@treeseed/sdk"
|
|
3
3
|
verifiers:
|
|
4
|
+
sdk.golden.scheduled-intent-validation:
|
|
5
|
+
kind: vitestCase
|
|
6
|
+
ownerPackage: "@treeseed/sdk"
|
|
7
|
+
testFile: tests/unit/operator-contracts/group-workday-intent.test.ts
|
|
8
|
+
testName: "returns nested validation issues for invalid scheduled intents instead of throwing from safeParse"
|
|
4
9
|
sdk.golden.group-contribution-unit:
|
|
5
10
|
kind: vitestCase
|
|
6
11
|
ownerPackage: "@treeseed/sdk"
|