@treeseed/sdk 0.13.0-rc.121 → 0.13.0-rc.123
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 +2365 -1275
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +94 -28
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +38 -38
- 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 +2 -59
- 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 +2 -4
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +22 -16
- 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 +244 -85
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +54 -19
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +216 -70
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
- package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +0 -2
- package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +55 -55
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -23
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
- package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
- package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
- package/dist/agent-capacity/contracts/support/execution-graph.d.ts +496 -292
- package/dist/agent-capacity/contracts/support/execution-graph.js +21 -19
- package/dist/agent-capacity/contracts/support/financial-records.d.ts +3 -6
- package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
- package/dist/agent-capacity/grant.d.ts +34 -0
- package/dist/agent-capacity/grant.js +4 -0
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1178 -1152
- package/dist/agent-capacity/validation/agent-definition-schema.js +21 -28
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +10 -10
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
- package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
- package/dist/agent-capacity/validation/assignment-records.js +49 -35
- package/dist/agent-capacity/validation/configuration.d.ts +1 -1
- package/dist/agent-capacity/validation/configuration.js +2 -6
- package/dist/agent-capacity/validation/grant.d.ts +11 -0
- package/dist/agent-capacity/validation/grant.js +31 -0
- package/dist/capacity/agents/agent-capacity.d.ts +3 -4
- package/dist/capacity/agents/agent-capacity.js +2 -3
- package/dist/capacity-provider/capability-ontology.d.ts +150 -150
- package/dist/capacity-provider/client.d.ts +15 -9
- package/dist/capacity-provider/client.js +1 -10
- package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +44 -44
- 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 +188 -188
- package/dist/capacity-provider/environment-catalog.js +1 -1
- package/dist/capacity-provider/install-configuration.d.ts +2 -2
- package/dist/capacity-provider/sandbox-contracts.d.ts +92 -92
- package/dist/capacity-provider/source-workspace.d.ts +166 -68
- package/dist/capacity-provider/source-workspace.js +5 -1
- 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 +144 -142
- package/dist/content/validation/agent-operational-content-schemas.js +2 -0
- package/dist/content/validation/auxiliary-content-schemas.d.ts +158 -158
- package/dist/content/validation/content-model-schemas.d.ts +9105 -5295
- package/dist/content/validation/content-model-schemas.js +192 -115
- package/dist/content/validation/portable-content-data.d.ts +411 -238
- package/dist/content/validation/portable-content-data.js +6 -1
- 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 +24 -24
- package/dist/deployment/ai-hosting.d.ts +18 -18
- package/dist/deployment/ai-instance.d.ts +16 -16
- package/dist/deployment/ai-mode.d.ts +92 -92
- package/dist/deployment/hosted-topology-template.d.ts +44 -44
- package/dist/deployment/hosted-topology.d.ts +335 -335
- package/dist/deployment/postgres/contracts.d.ts +52 -52
- package/dist/deployment/postgres/transfer.d.ts +6 -6
- package/dist/deployment/schemas.d.ts +1114 -1114
- package/dist/development/schemas.d.ts +633 -633
- 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/knowledge/contracts.d.ts +9 -2
- package/dist/knowledge/contracts.js +2 -2
- package/dist/model-registry/discussion-models.js +0 -1
- package/dist/operator-contracts/canonical-command-tree.js +25 -9
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +29 -29
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +30 -30
- package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +15 -13
- package/dist/operator-contracts/catalog/communication-operations.d.ts +176 -158
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +67 -67
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +65 -65
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +6 -6
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
- package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +10 -10
- 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 +3 -0
- package/dist/operator-contracts/communication/contracts.d.ts +537 -395
- 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 +631 -610
- package/dist/operator-contracts/control-plane-operations.js +26 -12
- package/dist/operator-contracts/inbox/contracts.d.ts +229 -229
- package/dist/operator-contracts/knowledge/contracts.d.ts +16 -16
- package/dist/operator-contracts/mcp.js +4 -3
- package/dist/operator-contracts/workday-lifecycle.d.ts +192 -0
- package/dist/operator-contracts/workday-lifecycle.js +109 -45
- package/dist/platform/agent-schema-verification.d.ts +3 -0
- package/dist/platform/agent-schema-verification.js +377 -0
- 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 +10 -0
- package/dist/sdk-types/support/planning-policy.d.ts +1 -1
- 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 +3 -3
- package/dist/secrets-capability/shared-resources.d.ts +50 -50
- package/dist/secrets-capability/vault-contracts.d.ts +2 -2
- package/dist/security/encrypted-envelope.d.ts +14 -14
- 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/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 +9 -3
- 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
- package/dist/agent-capacity/allocation.d.ts +0 -183
- package/dist/agent-capacity/allocation.js +0 -5
- package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
- package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
- package/dist/agent-capacity/artifacts.d.ts +0 -123
- package/dist/agent-capacity/artifacts.js +0 -39
- package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -227
- package/dist/agent-capacity/contracts/support/decision-work.js +0 -0
- package/dist/agent-capacity/validation/allocation.d.ts +0 -12
- package/dist/agent-capacity/validation/allocation.js +0 -115
|
@@ -1,39 +1,60 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type AgentWorkExecutionMode } from '../../support/authority/execution-mode.js';
|
|
3
|
+
export declare const weightMapSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodNumber>, Record<string, number>, Record<string, number>>;
|
|
4
|
+
export declare const projectWeightSchema: z.ZodObject<{
|
|
5
|
+
projectId: z.ZodString;
|
|
6
|
+
weight: z.ZodNumber;
|
|
7
|
+
}, "strict", z.ZodTypeAny, {
|
|
8
|
+
projectId: string;
|
|
9
|
+
weight: number;
|
|
10
|
+
}, {
|
|
11
|
+
projectId: string;
|
|
12
|
+
weight: number;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const agentClassWeightSchema: z.ZodObject<{
|
|
15
|
+
agentClass: z.ZodString;
|
|
16
|
+
weight: z.ZodNumber;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
agentClass: string;
|
|
19
|
+
weight: number;
|
|
20
|
+
}, {
|
|
21
|
+
agentClass: string;
|
|
22
|
+
weight: number;
|
|
23
|
+
}>;
|
|
3
24
|
export declare const workdayPolicySchema: z.ZodObject<{
|
|
4
25
|
durationSeconds: z.ZodNumber;
|
|
5
26
|
maximumConcurrency: z.ZodNumber;
|
|
6
|
-
planningPercent: z.
|
|
7
|
-
allocationWeight: z.
|
|
8
|
-
planningTurnMaximumSeconds: z.
|
|
27
|
+
planningPercent: z.ZodNumber;
|
|
28
|
+
allocationWeight: z.ZodNumber;
|
|
29
|
+
planningTurnMaximumSeconds: z.ZodNumber;
|
|
9
30
|
communicationConcurrency: z.ZodNumber;
|
|
10
|
-
projectPercentages: z.
|
|
11
|
-
agentClassPercentages: z.
|
|
31
|
+
projectPercentages: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
32
|
+
agentClassPercentages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
12
33
|
}, "strict", z.ZodTypeAny, {
|
|
34
|
+
durationSeconds: number;
|
|
35
|
+
maximumConcurrency: number;
|
|
13
36
|
planningPercent: number;
|
|
14
37
|
allocationWeight: number;
|
|
15
38
|
planningTurnMaximumSeconds: number;
|
|
39
|
+
communicationConcurrency: number;
|
|
16
40
|
projectPercentages: Record<string, number>;
|
|
17
41
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
18
|
-
durationSeconds: number;
|
|
19
|
-
maximumConcurrency: number;
|
|
20
|
-
communicationConcurrency: number;
|
|
21
42
|
}, {
|
|
22
43
|
durationSeconds: number;
|
|
23
44
|
maximumConcurrency: number;
|
|
45
|
+
planningPercent: number;
|
|
46
|
+
allocationWeight: number;
|
|
47
|
+
planningTurnMaximumSeconds: number;
|
|
24
48
|
communicationConcurrency: number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
planningTurnMaximumSeconds?: number | undefined;
|
|
28
|
-
projectPercentages?: Record<string, number> | undefined;
|
|
29
|
-
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
49
|
+
projectPercentages: Record<string, number>;
|
|
50
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
30
51
|
}>;
|
|
31
52
|
export declare const workdayAllocationOverridesSchema: z.ZodObject<{
|
|
32
|
-
planningPercent: z.ZodOptional<z.
|
|
33
|
-
allocationWeight: z.ZodOptional<z.
|
|
34
|
-
planningTurnMaximumSeconds: z.ZodOptional<z.
|
|
35
|
-
projectPercentages: z.ZodOptional<z.
|
|
36
|
-
agentClassPercentages: z.ZodOptional<z.
|
|
53
|
+
planningPercent: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
allocationWeight: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
planningTurnMaximumSeconds: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
projectPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
57
|
+
agentClassPercentages: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
|
|
37
58
|
}, "strict", z.ZodTypeAny, {
|
|
38
59
|
planningPercent?: number | undefined;
|
|
39
60
|
allocationWeight?: number | undefined;
|
|
@@ -49,14 +70,14 @@ export declare const workdayAllocationOverridesSchema: z.ZodObject<{
|
|
|
49
70
|
}>;
|
|
50
71
|
/** One canonical default; team-owned overrides use this same policy contract. */
|
|
51
72
|
export declare const DEFAULT_WORKDAY_POLICY: Readonly<{
|
|
73
|
+
durationSeconds: number;
|
|
74
|
+
maximumConcurrency: number;
|
|
52
75
|
planningPercent: number;
|
|
53
76
|
allocationWeight: number;
|
|
54
77
|
planningTurnMaximumSeconds: number;
|
|
78
|
+
communicationConcurrency: number;
|
|
55
79
|
projectPercentages: Record<string, number>;
|
|
56
80
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
57
|
-
durationSeconds: number;
|
|
58
|
-
maximumConcurrency: number;
|
|
59
|
-
communicationConcurrency: number;
|
|
60
81
|
}>;
|
|
61
82
|
export declare const workdayProfileSchema: z.ZodObject<{
|
|
62
83
|
id: z.ZodLiteral<"default">;
|
|
@@ -65,95 +86,96 @@ export declare const workdayProfileSchema: z.ZodObject<{
|
|
|
65
86
|
policy: z.ZodObject<{
|
|
66
87
|
durationSeconds: z.ZodNumber;
|
|
67
88
|
maximumConcurrency: z.ZodNumber;
|
|
68
|
-
planningPercent: z.
|
|
69
|
-
allocationWeight: z.
|
|
70
|
-
planningTurnMaximumSeconds: z.
|
|
89
|
+
planningPercent: z.ZodNumber;
|
|
90
|
+
allocationWeight: z.ZodNumber;
|
|
91
|
+
planningTurnMaximumSeconds: z.ZodNumber;
|
|
71
92
|
communicationConcurrency: z.ZodNumber;
|
|
72
|
-
projectPercentages: z.
|
|
73
|
-
agentClassPercentages: z.
|
|
93
|
+
projectPercentages: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
94
|
+
agentClassPercentages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
74
95
|
}, "strict", z.ZodTypeAny, {
|
|
96
|
+
durationSeconds: number;
|
|
97
|
+
maximumConcurrency: number;
|
|
75
98
|
planningPercent: number;
|
|
76
99
|
allocationWeight: number;
|
|
77
100
|
planningTurnMaximumSeconds: number;
|
|
101
|
+
communicationConcurrency: number;
|
|
78
102
|
projectPercentages: Record<string, number>;
|
|
79
103
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
80
|
-
durationSeconds: number;
|
|
81
|
-
maximumConcurrency: number;
|
|
82
|
-
communicationConcurrency: number;
|
|
83
104
|
}, {
|
|
84
105
|
durationSeconds: number;
|
|
85
106
|
maximumConcurrency: number;
|
|
107
|
+
planningPercent: number;
|
|
108
|
+
allocationWeight: number;
|
|
109
|
+
planningTurnMaximumSeconds: number;
|
|
86
110
|
communicationConcurrency: number;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
planningTurnMaximumSeconds?: number | undefined;
|
|
90
|
-
projectPercentages?: Record<string, number> | undefined;
|
|
91
|
-
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
111
|
+
projectPercentages: Record<string, number>;
|
|
112
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
92
113
|
}>;
|
|
93
114
|
}, "strict", z.ZodTypeAny, {
|
|
94
115
|
id: "default";
|
|
95
|
-
teamId: string;
|
|
96
116
|
revision: number;
|
|
117
|
+
teamId: string;
|
|
97
118
|
policy: {
|
|
119
|
+
durationSeconds: number;
|
|
120
|
+
maximumConcurrency: number;
|
|
98
121
|
planningPercent: number;
|
|
99
122
|
allocationWeight: number;
|
|
100
123
|
planningTurnMaximumSeconds: number;
|
|
124
|
+
communicationConcurrency: number;
|
|
101
125
|
projectPercentages: Record<string, number>;
|
|
102
126
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
103
|
-
durationSeconds: number;
|
|
104
|
-
maximumConcurrency: number;
|
|
105
|
-
communicationConcurrency: number;
|
|
106
127
|
};
|
|
107
128
|
}, {
|
|
108
129
|
id: "default";
|
|
109
|
-
teamId: string;
|
|
110
130
|
revision: number;
|
|
131
|
+
teamId: string;
|
|
111
132
|
policy: {
|
|
112
133
|
durationSeconds: number;
|
|
113
134
|
maximumConcurrency: number;
|
|
135
|
+
planningPercent: number;
|
|
136
|
+
allocationWeight: number;
|
|
137
|
+
planningTurnMaximumSeconds: number;
|
|
114
138
|
communicationConcurrency: number;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
planningTurnMaximumSeconds?: number | undefined;
|
|
118
|
-
projectPercentages?: Record<string, number> | undefined;
|
|
119
|
-
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
139
|
+
projectPercentages: Record<string, number>;
|
|
140
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
120
141
|
};
|
|
121
142
|
}>;
|
|
122
143
|
export type WorkdayProfile = z.infer<typeof workdayProfileSchema>;
|
|
123
|
-
export declare const appliedWorkdaySchema: z.ZodObject<{
|
|
144
|
+
export declare const appliedWorkdaySchema: z.ZodEffects<z.ZodObject<{
|
|
124
145
|
schemaVersion: z.ZodLiteral<"treeseed.workday/v1">;
|
|
125
146
|
id: z.ZodString;
|
|
126
147
|
teamId: z.ZodString;
|
|
127
148
|
executionMode: z.ZodEnum<["simulation", "production"]>;
|
|
149
|
+
reportingAgentId: z.ZodOptional<z.ZodString>;
|
|
128
150
|
policyId: z.ZodString;
|
|
129
151
|
policyRevision: z.ZodNumber;
|
|
130
152
|
policySnapshot: z.ZodObject<{
|
|
131
153
|
durationSeconds: z.ZodNumber;
|
|
132
154
|
maximumConcurrency: z.ZodNumber;
|
|
133
|
-
planningPercent: z.
|
|
134
|
-
allocationWeight: z.
|
|
135
|
-
planningTurnMaximumSeconds: z.
|
|
155
|
+
planningPercent: z.ZodNumber;
|
|
156
|
+
allocationWeight: z.ZodNumber;
|
|
157
|
+
planningTurnMaximumSeconds: z.ZodNumber;
|
|
136
158
|
communicationConcurrency: z.ZodNumber;
|
|
137
|
-
projectPercentages: z.
|
|
138
|
-
agentClassPercentages: z.
|
|
159
|
+
projectPercentages: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
160
|
+
agentClassPercentages: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
139
161
|
}, "strict", z.ZodTypeAny, {
|
|
162
|
+
durationSeconds: number;
|
|
163
|
+
maximumConcurrency: number;
|
|
140
164
|
planningPercent: number;
|
|
141
165
|
allocationWeight: number;
|
|
142
166
|
planningTurnMaximumSeconds: number;
|
|
167
|
+
communicationConcurrency: number;
|
|
143
168
|
projectPercentages: Record<string, number>;
|
|
144
169
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
145
|
-
durationSeconds: number;
|
|
146
|
-
maximumConcurrency: number;
|
|
147
|
-
communicationConcurrency: number;
|
|
148
170
|
}, {
|
|
149
171
|
durationSeconds: number;
|
|
150
172
|
maximumConcurrency: number;
|
|
173
|
+
planningPercent: number;
|
|
174
|
+
allocationWeight: number;
|
|
175
|
+
planningTurnMaximumSeconds: number;
|
|
151
176
|
communicationConcurrency: number;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
planningTurnMaximumSeconds?: number | undefined;
|
|
155
|
-
projectPercentages?: Record<string, number> | undefined;
|
|
156
|
-
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
177
|
+
projectPercentages: Record<string, number>;
|
|
178
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
157
179
|
}>;
|
|
158
180
|
state: z.ZodEnum<["planned", "active", "closing", "ended"]>;
|
|
159
181
|
startsAt: z.ZodString;
|
|
@@ -161,97 +183,219 @@ export declare const appliedWorkdaySchema: z.ZodObject<{
|
|
|
161
183
|
planningRounds: z.ZodArray<z.ZodObject<{
|
|
162
184
|
round: z.ZodNumber;
|
|
163
185
|
state: z.ZodEnum<["pending", "active", "complete"]>;
|
|
164
|
-
assignmentIds: z.ZodArray<z.ZodString, "many">;
|
|
186
|
+
assignmentIds: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
165
187
|
startedAt: z.ZodOptional<z.ZodString>;
|
|
166
188
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
167
189
|
}, "strict", z.ZodTypeAny, {
|
|
168
190
|
state: "active" | "pending" | "complete";
|
|
169
191
|
round: number;
|
|
170
192
|
assignmentIds: string[];
|
|
171
|
-
completedAt?: string | undefined;
|
|
172
193
|
startedAt?: string | undefined;
|
|
194
|
+
completedAt?: string | undefined;
|
|
173
195
|
}, {
|
|
174
196
|
state: "active" | "pending" | "complete";
|
|
175
197
|
round: number;
|
|
176
198
|
assignmentIds: string[];
|
|
177
|
-
completedAt?: string | undefined;
|
|
178
199
|
startedAt?: string | undefined;
|
|
200
|
+
completedAt?: string | undefined;
|
|
179
201
|
}>, "many">;
|
|
180
202
|
admittedSecondsByProject: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
181
203
|
admittedSecondsByAgentClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
182
204
|
activatedAt: z.ZodOptional<z.ZodString>;
|
|
183
205
|
closingAt: z.ZodOptional<z.ZodString>;
|
|
184
206
|
endedAt: z.ZodOptional<z.ZodString>;
|
|
207
|
+
reportRef: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
kind: z.ZodLiteral<"treedx">;
|
|
209
|
+
projectId: z.ZodString;
|
|
210
|
+
repository: z.ZodString;
|
|
211
|
+
commit: z.ZodString;
|
|
212
|
+
path: z.ZodString;
|
|
213
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
214
|
+
}, "strict", z.ZodTypeAny, {
|
|
215
|
+
path: string;
|
|
216
|
+
kind: "treedx";
|
|
217
|
+
commit: string;
|
|
218
|
+
repository: string;
|
|
219
|
+
projectId: string;
|
|
220
|
+
workspaceId?: string | undefined;
|
|
221
|
+
}, {
|
|
222
|
+
path: string;
|
|
223
|
+
kind: "treedx";
|
|
224
|
+
commit: string;
|
|
225
|
+
repository: string;
|
|
226
|
+
projectId: string;
|
|
227
|
+
workspaceId?: string | undefined;
|
|
228
|
+
}>>;
|
|
185
229
|
}, "strict", z.ZodTypeAny, {
|
|
186
230
|
id: string;
|
|
187
231
|
state: "active" | "planned" | "closing" | "ended";
|
|
188
232
|
schemaVersion: "treeseed.workday/v1";
|
|
189
233
|
teamId: string;
|
|
190
|
-
executionMode: "
|
|
234
|
+
executionMode: "simulation" | "production";
|
|
235
|
+
policyId: string;
|
|
236
|
+
policyRevision: number;
|
|
237
|
+
policySnapshot: {
|
|
238
|
+
durationSeconds: number;
|
|
239
|
+
maximumConcurrency: number;
|
|
240
|
+
planningPercent: number;
|
|
241
|
+
allocationWeight: number;
|
|
242
|
+
planningTurnMaximumSeconds: number;
|
|
243
|
+
communicationConcurrency: number;
|
|
244
|
+
projectPercentages: Record<string, number>;
|
|
245
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
246
|
+
};
|
|
191
247
|
startsAt: string;
|
|
192
248
|
endsAt: string;
|
|
249
|
+
planningRounds: {
|
|
250
|
+
state: "active" | "pending" | "complete";
|
|
251
|
+
round: number;
|
|
252
|
+
assignmentIds: string[];
|
|
253
|
+
startedAt?: string | undefined;
|
|
254
|
+
completedAt?: string | undefined;
|
|
255
|
+
}[];
|
|
256
|
+
admittedSecondsByProject: Record<string, number>;
|
|
257
|
+
admittedSecondsByAgentClass: Record<string, number>;
|
|
258
|
+
endedAt?: string | undefined;
|
|
259
|
+
reportingAgentId?: string | undefined;
|
|
260
|
+
activatedAt?: string | undefined;
|
|
261
|
+
closingAt?: string | undefined;
|
|
262
|
+
reportRef?: {
|
|
263
|
+
path: string;
|
|
264
|
+
kind: "treedx";
|
|
265
|
+
commit: string;
|
|
266
|
+
repository: string;
|
|
267
|
+
projectId: string;
|
|
268
|
+
workspaceId?: string | undefined;
|
|
269
|
+
} | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
id: string;
|
|
272
|
+
state: "active" | "planned" | "closing" | "ended";
|
|
273
|
+
schemaVersion: "treeseed.workday/v1";
|
|
274
|
+
teamId: string;
|
|
275
|
+
executionMode: "simulation" | "production";
|
|
193
276
|
policyId: string;
|
|
194
277
|
policyRevision: number;
|
|
195
278
|
policySnapshot: {
|
|
279
|
+
durationSeconds: number;
|
|
280
|
+
maximumConcurrency: number;
|
|
196
281
|
planningPercent: number;
|
|
197
282
|
allocationWeight: number;
|
|
198
283
|
planningTurnMaximumSeconds: number;
|
|
284
|
+
communicationConcurrency: number;
|
|
199
285
|
projectPercentages: Record<string, number>;
|
|
200
286
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
287
|
+
};
|
|
288
|
+
startsAt: string;
|
|
289
|
+
endsAt: string;
|
|
290
|
+
planningRounds: {
|
|
291
|
+
state: "active" | "pending" | "complete";
|
|
292
|
+
round: number;
|
|
293
|
+
assignmentIds: string[];
|
|
294
|
+
startedAt?: string | undefined;
|
|
295
|
+
completedAt?: string | undefined;
|
|
296
|
+
}[];
|
|
297
|
+
admittedSecondsByProject: Record<string, number>;
|
|
298
|
+
admittedSecondsByAgentClass: Record<string, number>;
|
|
299
|
+
endedAt?: string | undefined;
|
|
300
|
+
reportingAgentId?: string | undefined;
|
|
301
|
+
activatedAt?: string | undefined;
|
|
302
|
+
closingAt?: string | undefined;
|
|
303
|
+
reportRef?: {
|
|
304
|
+
path: string;
|
|
305
|
+
kind: "treedx";
|
|
306
|
+
commit: string;
|
|
307
|
+
repository: string;
|
|
308
|
+
projectId: string;
|
|
309
|
+
workspaceId?: string | undefined;
|
|
310
|
+
} | undefined;
|
|
311
|
+
}>, {
|
|
312
|
+
id: string;
|
|
313
|
+
state: "active" | "planned" | "closing" | "ended";
|
|
314
|
+
schemaVersion: "treeseed.workday/v1";
|
|
315
|
+
teamId: string;
|
|
316
|
+
executionMode: "simulation" | "production";
|
|
317
|
+
policyId: string;
|
|
318
|
+
policyRevision: number;
|
|
319
|
+
policySnapshot: {
|
|
201
320
|
durationSeconds: number;
|
|
202
321
|
maximumConcurrency: number;
|
|
322
|
+
planningPercent: number;
|
|
323
|
+
allocationWeight: number;
|
|
324
|
+
planningTurnMaximumSeconds: number;
|
|
203
325
|
communicationConcurrency: number;
|
|
326
|
+
projectPercentages: Record<string, number>;
|
|
327
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
204
328
|
};
|
|
329
|
+
startsAt: string;
|
|
330
|
+
endsAt: string;
|
|
205
331
|
planningRounds: {
|
|
206
332
|
state: "active" | "pending" | "complete";
|
|
207
333
|
round: number;
|
|
208
334
|
assignmentIds: string[];
|
|
209
|
-
completedAt?: string | undefined;
|
|
210
335
|
startedAt?: string | undefined;
|
|
336
|
+
completedAt?: string | undefined;
|
|
211
337
|
}[];
|
|
212
338
|
admittedSecondsByProject: Record<string, number>;
|
|
213
339
|
admittedSecondsByAgentClass: Record<string, number>;
|
|
340
|
+
endedAt?: string | undefined;
|
|
341
|
+
reportingAgentId?: string | undefined;
|
|
214
342
|
activatedAt?: string | undefined;
|
|
215
343
|
closingAt?: string | undefined;
|
|
216
|
-
|
|
344
|
+
reportRef?: {
|
|
345
|
+
path: string;
|
|
346
|
+
kind: "treedx";
|
|
347
|
+
commit: string;
|
|
348
|
+
repository: string;
|
|
349
|
+
projectId: string;
|
|
350
|
+
workspaceId?: string | undefined;
|
|
351
|
+
} | undefined;
|
|
217
352
|
}, {
|
|
218
353
|
id: string;
|
|
219
354
|
state: "active" | "planned" | "closing" | "ended";
|
|
220
355
|
schemaVersion: "treeseed.workday/v1";
|
|
221
356
|
teamId: string;
|
|
222
|
-
executionMode: "
|
|
223
|
-
startsAt: string;
|
|
224
|
-
endsAt: string;
|
|
357
|
+
executionMode: "simulation" | "production";
|
|
225
358
|
policyId: string;
|
|
226
359
|
policyRevision: number;
|
|
227
360
|
policySnapshot: {
|
|
228
361
|
durationSeconds: number;
|
|
229
362
|
maximumConcurrency: number;
|
|
363
|
+
planningPercent: number;
|
|
364
|
+
allocationWeight: number;
|
|
365
|
+
planningTurnMaximumSeconds: number;
|
|
230
366
|
communicationConcurrency: number;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
planningTurnMaximumSeconds?: number | undefined;
|
|
234
|
-
projectPercentages?: Record<string, number> | undefined;
|
|
235
|
-
agentClassPercentages?: Record<string, Record<string, number>> | undefined;
|
|
367
|
+
projectPercentages: Record<string, number>;
|
|
368
|
+
agentClassPercentages: Record<string, Record<string, number>>;
|
|
236
369
|
};
|
|
370
|
+
startsAt: string;
|
|
371
|
+
endsAt: string;
|
|
237
372
|
planningRounds: {
|
|
238
373
|
state: "active" | "pending" | "complete";
|
|
239
374
|
round: number;
|
|
240
375
|
assignmentIds: string[];
|
|
241
|
-
completedAt?: string | undefined;
|
|
242
376
|
startedAt?: string | undefined;
|
|
377
|
+
completedAt?: string | undefined;
|
|
243
378
|
}[];
|
|
244
379
|
admittedSecondsByProject: Record<string, number>;
|
|
245
380
|
admittedSecondsByAgentClass: Record<string, number>;
|
|
381
|
+
endedAt?: string | undefined;
|
|
382
|
+
reportingAgentId?: string | undefined;
|
|
246
383
|
activatedAt?: string | undefined;
|
|
247
384
|
closingAt?: string | undefined;
|
|
248
|
-
|
|
385
|
+
reportRef?: {
|
|
386
|
+
path: string;
|
|
387
|
+
kind: "treedx";
|
|
388
|
+
commit: string;
|
|
389
|
+
repository: string;
|
|
390
|
+
projectId: string;
|
|
391
|
+
workspaceId?: string | undefined;
|
|
392
|
+
} | undefined;
|
|
249
393
|
}>;
|
|
250
394
|
export interface FairReadyNode {
|
|
251
395
|
id: string;
|
|
396
|
+
priority?: number;
|
|
252
397
|
projectId: string;
|
|
253
398
|
agentClass: string;
|
|
254
|
-
graphPriority: number;
|
|
255
399
|
readyAt: string;
|
|
256
400
|
}
|
|
257
401
|
export interface FairUsage {
|
|
@@ -261,6 +405,10 @@ export interface FairUsage {
|
|
|
261
405
|
}
|
|
262
406
|
/** Select work only; provider selection is a later hard-gated admission step. */
|
|
263
407
|
export declare function selectFairReadyNode(nodes: FairReadyNode[], usage: FairUsage[], policy: z.infer<typeof workdayPolicySchema>): {
|
|
408
|
+
input: {
|
|
409
|
+
nodes: FairReadyNode[];
|
|
410
|
+
usage: FairUsage[];
|
|
411
|
+
};
|
|
264
412
|
explanation: {
|
|
265
413
|
projectTargetPercent: number;
|
|
266
414
|
projectDeficitSeconds: number;
|
|
@@ -269,9 +417,9 @@ export declare function selectFairReadyNode(nodes: FairReadyNode[], usage: FairU
|
|
|
269
417
|
readyNodeCount: number;
|
|
270
418
|
};
|
|
271
419
|
id: string;
|
|
420
|
+
priority?: number;
|
|
272
421
|
projectId: string;
|
|
273
422
|
agentClass: string;
|
|
274
|
-
graphPriority: number;
|
|
275
423
|
readyAt: string;
|
|
276
424
|
} | null;
|
|
277
425
|
export declare function compilePlanningRounds(workdayId: string, agentIds: string[], planningTurnMaximumSeconds: number, round?: number): {
|
|
@@ -282,7 +430,8 @@ export declare function compilePlanningRounds(workdayId: string, agentIds: strin
|
|
|
282
430
|
dependsOn: string[];
|
|
283
431
|
}[];
|
|
284
432
|
export declare function workdayPlanningEndsAt(plan: Pick<AppliedWorkday, 'startsAt' | 'policySnapshot'>): string;
|
|
285
|
-
|
|
433
|
+
/** The percentage reserves an initial planning window; later phase choice follows live graph readiness. */
|
|
434
|
+
export declare function workdayPhase(plan: Pick<AppliedWorkday, 'startsAt' | 'endsAt' | 'policySnapshot'>, now: string, actingReady: boolean): 'planning' | 'acting' | 'ended';
|
|
286
435
|
/** Shared by read-only plan and mutating start; callers persist this exact value. */
|
|
287
436
|
export declare function compileWorkday(input: {
|
|
288
437
|
id: string;
|
|
@@ -294,38 +443,48 @@ export declare function compileWorkday(input: {
|
|
|
294
443
|
agentIds: string[];
|
|
295
444
|
startsAt: string;
|
|
296
445
|
activityTypes?: string[];
|
|
446
|
+
reportingAgentId?: string;
|
|
297
447
|
}): {
|
|
298
448
|
id: string;
|
|
299
449
|
state: "active" | "planned" | "closing" | "ended";
|
|
300
450
|
schemaVersion: "treeseed.workday/v1";
|
|
301
451
|
teamId: string;
|
|
302
|
-
executionMode: "
|
|
303
|
-
startsAt: string;
|
|
304
|
-
endsAt: string;
|
|
452
|
+
executionMode: "simulation" | "production";
|
|
305
453
|
policyId: string;
|
|
306
454
|
policyRevision: number;
|
|
307
455
|
policySnapshot: {
|
|
456
|
+
durationSeconds: number;
|
|
457
|
+
maximumConcurrency: number;
|
|
308
458
|
planningPercent: number;
|
|
309
459
|
allocationWeight: number;
|
|
310
460
|
planningTurnMaximumSeconds: number;
|
|
461
|
+
communicationConcurrency: number;
|
|
311
462
|
projectPercentages: Record<string, number>;
|
|
312
463
|
agentClassPercentages: Record<string, Record<string, number>>;
|
|
313
|
-
durationSeconds: number;
|
|
314
|
-
maximumConcurrency: number;
|
|
315
|
-
communicationConcurrency: number;
|
|
316
464
|
};
|
|
465
|
+
startsAt: string;
|
|
466
|
+
endsAt: string;
|
|
317
467
|
planningRounds: {
|
|
318
468
|
state: "active" | "pending" | "complete";
|
|
319
469
|
round: number;
|
|
320
470
|
assignmentIds: string[];
|
|
321
|
-
completedAt?: string | undefined;
|
|
322
471
|
startedAt?: string | undefined;
|
|
472
|
+
completedAt?: string | undefined;
|
|
323
473
|
}[];
|
|
324
474
|
admittedSecondsByProject: Record<string, number>;
|
|
325
475
|
admittedSecondsByAgentClass: Record<string, number>;
|
|
476
|
+
endedAt?: string | undefined;
|
|
477
|
+
reportingAgentId?: string | undefined;
|
|
326
478
|
activatedAt?: string | undefined;
|
|
327
479
|
closingAt?: string | undefined;
|
|
328
|
-
|
|
480
|
+
reportRef?: {
|
|
481
|
+
path: string;
|
|
482
|
+
kind: "treedx";
|
|
483
|
+
commit: string;
|
|
484
|
+
repository: string;
|
|
485
|
+
projectId: string;
|
|
486
|
+
workspaceId?: string | undefined;
|
|
487
|
+
} | undefined;
|
|
329
488
|
};
|
|
330
489
|
export type WorkdayPolicy = z.infer<typeof workdayPolicySchema>;
|
|
331
490
|
export type AppliedWorkday = z.infer<typeof appliedWorkdaySchema>;
|