@treeseed/sdk 0.13.0-rc.122 → 0.13.0-rc.124
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/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +1392 -974
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +72 -27
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +34 -34
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +1 -0
- package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +126 -1
- package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +1 -3
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +21 -15
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +3 -42
- package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +8 -8
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +227 -66
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +54 -19
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +214 -5
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
- package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +47 -47
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -0
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
- package/dist/agent-capacity/contracts/support/execution-graph.d.ts +434 -230
- package/dist/agent-capacity/contracts/support/execution-graph.js +20 -18
- package/dist/agent-capacity/contracts/support/financial-records.d.ts +2 -0
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +286 -254
- package/dist/agent-capacity/validation/agent-definition-schema.js +22 -28
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
- package/dist/agent-capacity/validation/assignment-records.js +45 -0
- package/dist/capacity/agents/agent-capacity.d.ts +1 -0
- package/dist/capacity/agents/agent-capacity.js +1 -0
- package/dist/capacity-provider/capability-ontology.d.ts +102 -102
- package/dist/capacity-provider/client.d.ts +14 -7
- package/dist/capacity-provider/client.js +1 -4
- package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +40 -40
- package/dist/capacity-provider/contracts/governance.d.ts +2 -17
- package/dist/capacity-provider/contracts/index.d.ts +2 -0
- package/dist/capacity-provider/contracts/index.js +2 -0
- package/dist/capacity-provider/core-capability-catalog.d.ts +7 -7
- package/dist/capacity-provider/environment-catalog.d.ts +22 -22
- package/dist/capacity-provider/environment-catalog.js +1 -1
- package/dist/capacity-provider/install-configuration.d.ts +4 -4
- package/dist/capacity-provider/sandbox-contracts.d.ts +54 -54
- package/dist/capacity-provider/source-workspace.d.ts +76 -76
- package/dist/capacity-provider/validation.d.ts +10 -2
- package/dist/capacity-provider/validation.js +52 -22
- package/dist/content/validation/agent-operational-content-schemas.d.ts +120 -118
- package/dist/content/validation/agent-operational-content-schemas.js +2 -0
- package/dist/content/validation/auxiliary-content-schemas.d.ts +92 -92
- package/dist/content/validation/content-model-schemas.d.ts +3155 -2512
- package/dist/content/validation/content-model-schemas.js +97 -87
- package/dist/content/validation/portable-content-data.d.ts +173 -168
- package/dist/content/validation/schema-constraints.d.ts +78 -0
- package/dist/content/validation/schema-constraints.js +149 -0
- package/dist/deployment/ai/storage.d.ts +20 -20
- package/dist/deployment/ai-hosting.d.ts +12 -12
- package/dist/deployment/ai-instance.d.ts +12 -12
- package/dist/deployment/ai-mode.d.ts +34 -34
- package/dist/deployment/hosted-topology-template.d.ts +25 -25
- package/dist/deployment/hosted-topology.d.ts +146 -146
- package/dist/deployment/postgres/transfer.d.ts +2 -2
- package/dist/deployment/schemas.d.ts +504 -504
- package/dist/development/schemas.d.ts +325 -325
- package/dist/graph/context-query-contracts.js +1 -1
- package/dist/guarantees/index.d.ts +26 -2
- package/dist/identity/contracts.js +6 -1
- package/dist/operator-contracts/canonical-command-tree.js +22 -8
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +27 -27
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +25 -25
- package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +11 -9
- package/dist/operator-contracts/catalog/communication-operations.d.ts +108 -90
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +33 -33
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +27 -27
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +4 -4
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
- package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +5 -5
- package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +3 -3
- package/dist/operator-contracts/catalog/services/secret-operations.d.ts +16 -8
- package/dist/operator-contracts/catalog/services/secret-operations.js +2 -1
- package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +11 -11
- package/dist/operator-contracts/catalog/workdays/selection-commands.js +7 -6
- package/dist/operator-contracts/communication/contracts.d.ts +340 -198
- package/dist/operator-contracts/communication/contracts.js +6 -1
- package/dist/operator-contracts/control-plane-operation.d.ts +7 -0
- package/dist/operator-contracts/control-plane-operation.js +6 -0
- package/dist/operator-contracts/control-plane-operations.d.ts +469 -442
- package/dist/operator-contracts/control-plane-operations.js +26 -10
- package/dist/operator-contracts/inbox/contracts.d.ts +100 -100
- package/dist/operator-contracts/knowledge/contracts.d.ts +6 -6
- package/dist/operator-contracts/mcp.js +4 -3
- package/dist/operator-contracts/workday-lifecycle.d.ts +192 -2
- package/dist/operator-contracts/workday-lifecycle.js +108 -45
- package/dist/platform/agent-schema-verification.js +316 -33
- package/dist/platform/contracts.d.ts +72 -72
- package/dist/platform/schemas.d.ts +144 -36
- package/dist/platform/schemas.js +26 -0
- package/dist/platform/verification.js +4 -0
- package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
- package/dist/secrets-capability/secret-contracts.d.ts +2 -2
- package/dist/secrets-capability/shared-access.d.ts +1 -1
- package/dist/secrets-capability/shared-resources.d.ts +30 -30
- package/dist/security/encrypted-envelope.d.ts +6 -6
- package/dist/treedx/client.d.ts +4 -4
- package/dist/treedx/index.d.ts +1 -1
- package/dist/treedx/index.js +1 -0
- package/dist/treedx/types.d.ts +286 -0
- package/dist/treedx/types.js +44 -0
- package/dist/types/agents/agent-activity-profile.d.ts +1 -0
- package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
- package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
- package/guarantees/agent/golden/product.guarantee.yaml +12 -0
- package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +837 -0
- package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
- package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
- package/guarantees/verifiers/golden.verifiers.yaml +1429 -0
- package/package.json +10 -5
- package/tests/acceptance/golden-product.test.ts +205 -0
- package/tests/acceptance/golden-product.ts +404 -0
- package/tests/acceptance/product/base-red.ts +73 -0
- package/tests/acceptance/product/documentation-examples.ts +68 -0
- package/tests/acceptance/product/intent-runtime.ts +145 -0
- package/tests/acceptance/product/release-output.ts +160 -0
- package/tests/acceptance/product/research-artifact.ts +87 -0
- package/tests/acceptance/product/research-revision.ts +82 -0
- package/tests/acceptance/product/research-source.ts +91 -0
- package/tests/acceptance/product/test-chain.ts +192 -0
- package/treeseed.package.yaml +147 -0
- package/dist/.treeseed-build-complete.json +0 -1
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { conditionalFields, uniqueArray } from "../../../content/validation/schema-constraints.js";
|
|
3
|
+
import { activityProfileSchema, agentClassSchema } from "../../validation/agent-definition-schema.js";
|
|
3
4
|
import { estimateSchema, exactEntityReferenceSchema } from "../capacity/assignments/agent-execution.js";
|
|
4
5
|
const identifier = z.string().trim().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/u);
|
|
5
6
|
const slug = z.string().trim().min(1).max(100).regex(/^[a-z0-9]+(?:[._/-][a-z0-9]+)*$/u);
|
|
6
|
-
const uniqueIds = z.array(identifier)
|
|
7
|
-
if (new Set(items).size !== items.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
|
|
8
|
-
});
|
|
7
|
+
const uniqueIds = uniqueArray(z.array(identifier));
|
|
9
8
|
const conditionDefinitionSchema = z.object({
|
|
10
9
|
conditionType: z.enum(["question", "external", "authority", "lifecycle"]),
|
|
11
10
|
subjectRef: exactEntityReferenceSchema,
|
|
12
11
|
expectedState: identifier
|
|
13
12
|
}).strict();
|
|
14
|
-
const
|
|
13
|
+
const assignable = ["agentClass", "estimate", "requiredCapabilities", "requestedPermissions", "workspace"];
|
|
14
|
+
const executionNodeSchema = conditionalFields(z.object({
|
|
15
15
|
schemaVersion: z.literal("treeseed.execution-node/v1"),
|
|
16
16
|
id: identifier,
|
|
17
17
|
teamId: identifier,
|
|
18
18
|
projectId: identifier,
|
|
19
19
|
workdayId: identifier.optional(),
|
|
20
20
|
workItemId: slug.optional(),
|
|
21
|
+
priority: z.number().int().safe().optional(),
|
|
21
22
|
kind: z.enum(["planning", "estimating", "acting", "reviewing", "reporting", "communication", "condition"]),
|
|
22
23
|
pairRole: z.enum(["actor", "reviewer"]).nullable(),
|
|
23
24
|
sourceRef: exactEntityReferenceSchema,
|
|
24
|
-
authorityRefs: z.array(exactEntityReferenceSchema).optional(),
|
|
25
|
+
authorityRefs: uniqueArray(z.array(exactEntityReferenceSchema)).optional(),
|
|
25
26
|
ruleRevision: z.number().int().positive(),
|
|
26
27
|
nodeRevision: z.number().int().positive(),
|
|
27
|
-
agentClass:
|
|
28
|
+
agentClass: agentClassSchema.optional(),
|
|
28
29
|
status: z.enum(["proposed", "blocked", "ready", "assigned", "running", "completed", "failed", "cancelled", "stale"]),
|
|
29
30
|
estimate: estimateSchema.optional(),
|
|
30
31
|
requiredCapabilities: uniqueIds.optional(),
|
|
@@ -35,16 +36,17 @@ const executionNodeSchema = z.object({
|
|
|
35
36
|
condition: conditionDefinitionSchema.optional(),
|
|
36
37
|
graphRevisionCreated: z.number().int().positive(),
|
|
37
38
|
graphRevisionUpdated: z.number().int().positive()
|
|
38
|
-
}).strict()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
39
|
+
}).strict(), [
|
|
40
|
+
{
|
|
41
|
+
field: "kind",
|
|
42
|
+
equals: "condition",
|
|
43
|
+
alternatives: [["condition"]],
|
|
44
|
+
forbidden: { fields: ["agentClass", "estimate", "requestedPermissions", "workspace"] },
|
|
45
|
+
message: "Condition nodes require condition and cannot define assignable execution authority."
|
|
46
|
+
},
|
|
47
|
+
{ field: "kind", notEquals: "condition", alternatives: [assignable], message: "Assignable nodes require complete scheduling authority." },
|
|
48
|
+
{ field: "pairRole", in: ["actor", "reviewer"], alternatives: [["workItemId", "maximumReviewCycles"]], message: "Actor and Reviewer nodes require workItemId and maximumReviewCycles." }
|
|
49
|
+
]).superRefine((node, context) => {
|
|
48
50
|
if (node.graphRevisionUpdated < node.graphRevisionCreated) context.addIssue({ code: z.ZodIssueCode.custom, path: ["graphRevisionUpdated"], message: "Updated revision cannot precede created revision." });
|
|
49
51
|
});
|
|
50
52
|
const executionEdgeSchema = z.object({
|
|
@@ -72,7 +74,7 @@ const graphRevisionSchema = z.object({
|
|
|
72
74
|
teamId: identifier,
|
|
73
75
|
revision: z.number().int().positive(),
|
|
74
76
|
ruleRevision: z.number().int().positive(),
|
|
75
|
-
changedSourceRefs: z.array(exactEntityReferenceSchema).min(1),
|
|
77
|
+
changedSourceRefs: uniqueArray(z.array(exactEntityReferenceSchema).min(1)),
|
|
76
78
|
graphDigest: z.string().regex(/^sha256:[a-f0-9]{64}$/u),
|
|
77
79
|
changes: graphChangeSetSchema,
|
|
78
80
|
createdAt: z.string().datetime({ offset: true })
|
|
@@ -38,6 +38,8 @@ export interface CapacityReservation {
|
|
|
38
38
|
}
|
|
39
39
|
export type CapacityLedgerPhase = 'task_completed_actual_settlement' | 'reservation_released' | 'task_failed_refund' | 'overrun_hold';
|
|
40
40
|
export interface CapacityLedgerEntry {
|
|
41
|
+
/** Original canonical record persisted by the owning settlement transaction. */
|
|
42
|
+
usageSettlement?: import('../capacity/assignments/agent-execution.js').UsageSettlement;
|
|
41
43
|
id: string;
|
|
42
44
|
settlementKey: string;
|
|
43
45
|
membershipId: string;
|