@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.
Files changed (157) hide show
  1. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +2365 -1275
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +94 -28
  3. package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +38 -38
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.d.ts +2 -0
  5. package/dist/agent-capacity/contracts/capacity/assignments/assignment-path.js +13 -0
  6. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +2 -59
  7. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +126 -1
  8. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.js +35 -1
  9. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +2 -4
  10. package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +22 -16
  11. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.d.ts +3 -42
  12. package/dist/agent-capacity/contracts/capacity/workdays/capability-accounting.js +8 -8
  13. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +244 -85
  14. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +54 -19
  15. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +216 -70
  16. package/dist/agent-capacity/contracts/capacity/workdays/workday-records.js +19 -0
  17. package/dist/agent-capacity/contracts/configuration/configuration.d.ts +1 -1
  18. package/dist/agent-capacity/contracts/configuration/configuration.js +0 -2
  19. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +55 -55
  20. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +119 -23
  21. package/dist/agent-capacity/contracts/projects/agents/project-agent-class.js +16 -0
  22. package/dist/agent-capacity/contracts/runtime/runtime-observability.d.ts +2 -154
  23. package/dist/agent-capacity/contracts/support/agent-atlas.d.ts +0 -13
  24. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +496 -292
  25. package/dist/agent-capacity/contracts/support/execution-graph.js +21 -19
  26. package/dist/agent-capacity/contracts/support/financial-records.d.ts +3 -6
  27. package/dist/agent-capacity/contracts/support/planning-records.d.ts +1 -87
  28. package/dist/agent-capacity/grant.d.ts +34 -0
  29. package/dist/agent-capacity/grant.js +4 -0
  30. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +1178 -1152
  31. package/dist/agent-capacity/validation/agent-definition-schema.js +21 -28
  32. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +10 -10
  33. package/dist/agent-capacity/validation/agent-lab-forensics-schema.js +0 -1
  34. package/dist/agent-capacity/validation/assignment-records.d.ts +1 -6
  35. package/dist/agent-capacity/validation/assignment-records.js +49 -35
  36. package/dist/agent-capacity/validation/configuration.d.ts +1 -1
  37. package/dist/agent-capacity/validation/configuration.js +2 -6
  38. package/dist/agent-capacity/validation/grant.d.ts +11 -0
  39. package/dist/agent-capacity/validation/grant.js +31 -0
  40. package/dist/capacity/agents/agent-capacity.d.ts +3 -4
  41. package/dist/capacity/agents/agent-capacity.js +2 -3
  42. package/dist/capacity-provider/capability-ontology.d.ts +150 -150
  43. package/dist/capacity-provider/client.d.ts +15 -9
  44. package/dist/capacity-provider/client.js +1 -10
  45. package/dist/capacity-provider/contracts/capacity-facts.d.ts +0 -1
  46. package/dist/capacity-provider/contracts/environment-profiles.d.ts +44 -44
  47. package/dist/capacity-provider/contracts/governance.d.ts +2 -17
  48. package/dist/capacity-provider/contracts/index.d.ts +2 -0
  49. package/dist/capacity-provider/contracts/index.js +2 -0
  50. package/dist/capacity-provider/core-capability-catalog.d.ts +7 -7
  51. package/dist/capacity-provider/environment-catalog.d.ts +188 -188
  52. package/dist/capacity-provider/environment-catalog.js +1 -1
  53. package/dist/capacity-provider/install-configuration.d.ts +2 -2
  54. package/dist/capacity-provider/sandbox-contracts.d.ts +92 -92
  55. package/dist/capacity-provider/source-workspace.d.ts +166 -68
  56. package/dist/capacity-provider/source-workspace.js +5 -1
  57. package/dist/capacity-provider/validation.d.ts +10 -2
  58. package/dist/capacity-provider/validation.js +52 -22
  59. package/dist/content/validation/agent-operational-content-schemas.d.ts +144 -142
  60. package/dist/content/validation/agent-operational-content-schemas.js +2 -0
  61. package/dist/content/validation/auxiliary-content-schemas.d.ts +158 -158
  62. package/dist/content/validation/content-model-schemas.d.ts +9105 -5295
  63. package/dist/content/validation/content-model-schemas.js +192 -115
  64. package/dist/content/validation/portable-content-data.d.ts +411 -238
  65. package/dist/content/validation/portable-content-data.js +6 -1
  66. package/dist/content/validation/schema-constraints.d.ts +78 -0
  67. package/dist/content/validation/schema-constraints.js +149 -0
  68. package/dist/deployment/ai/storage.d.ts +24 -24
  69. package/dist/deployment/ai-hosting.d.ts +18 -18
  70. package/dist/deployment/ai-instance.d.ts +16 -16
  71. package/dist/deployment/ai-mode.d.ts +92 -92
  72. package/dist/deployment/hosted-topology-template.d.ts +44 -44
  73. package/dist/deployment/hosted-topology.d.ts +335 -335
  74. package/dist/deployment/postgres/contracts.d.ts +52 -52
  75. package/dist/deployment/postgres/transfer.d.ts +6 -6
  76. package/dist/deployment/schemas.d.ts +1114 -1114
  77. package/dist/development/schemas.d.ts +633 -633
  78. package/dist/graph/context-query-contracts.js +1 -1
  79. package/dist/guarantees/index.d.ts +26 -2
  80. package/dist/identity/contracts.js +6 -1
  81. package/dist/knowledge/contracts.d.ts +9 -2
  82. package/dist/knowledge/contracts.js +2 -2
  83. package/dist/model-registry/discussion-models.js +0 -1
  84. package/dist/operator-contracts/canonical-command-tree.js +25 -9
  85. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +29 -29
  86. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +30 -30
  87. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +15 -13
  88. package/dist/operator-contracts/catalog/communication-operations.d.ts +176 -158
  89. package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +67 -67
  90. package/dist/operator-contracts/catalog/inbox-operations.d.ts +65 -65
  91. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +6 -6
  92. package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.js +2 -1
  93. package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +10 -10
  94. package/dist/operator-contracts/catalog/provider-environment-operations.d.ts +3 -3
  95. package/dist/operator-contracts/catalog/services/secret-operations.d.ts +16 -8
  96. package/dist/operator-contracts/catalog/services/secret-operations.js +2 -1
  97. package/dist/operator-contracts/catalog/workdays/profile-operations.d.ts +11 -11
  98. package/dist/operator-contracts/catalog/workdays/selection-commands.js +3 -0
  99. package/dist/operator-contracts/communication/contracts.d.ts +537 -395
  100. package/dist/operator-contracts/communication/contracts.js +6 -1
  101. package/dist/operator-contracts/control-plane-operation.d.ts +7 -0
  102. package/dist/operator-contracts/control-plane-operation.js +6 -0
  103. package/dist/operator-contracts/control-plane-operations.d.ts +631 -610
  104. package/dist/operator-contracts/control-plane-operations.js +26 -12
  105. package/dist/operator-contracts/inbox/contracts.d.ts +229 -229
  106. package/dist/operator-contracts/knowledge/contracts.d.ts +16 -16
  107. package/dist/operator-contracts/mcp.js +4 -3
  108. package/dist/operator-contracts/workday-lifecycle.d.ts +192 -0
  109. package/dist/operator-contracts/workday-lifecycle.js +109 -45
  110. package/dist/platform/agent-schema-verification.d.ts +3 -0
  111. package/dist/platform/agent-schema-verification.js +377 -0
  112. package/dist/platform/contracts.d.ts +72 -72
  113. package/dist/platform/schemas.d.ts +144 -36
  114. package/dist/platform/schemas.js +26 -0
  115. package/dist/platform/verification.js +10 -0
  116. package/dist/sdk-types/support/planning-policy.d.ts +1 -1
  117. package/dist/sdk-types/support/sdk-search-request.d.ts +2 -2
  118. package/dist/secrets-capability/secret-contracts.d.ts +2 -2
  119. package/dist/secrets-capability/shared-access.d.ts +3 -3
  120. package/dist/secrets-capability/shared-resources.d.ts +50 -50
  121. package/dist/secrets-capability/vault-contracts.d.ts +2 -2
  122. package/dist/security/encrypted-envelope.d.ts +14 -14
  123. package/dist/treedx/client.d.ts +4 -4
  124. package/dist/treedx/index.d.ts +1 -1
  125. package/dist/treedx/index.js +1 -0
  126. package/dist/treedx/types.d.ts +286 -0
  127. package/dist/treedx/types.js +44 -0
  128. package/guarantees/agent/golden/component-boundaries.guarantee.yaml +12 -0
  129. package/guarantees/agent/golden/product-custody.guarantee.yaml +12 -0
  130. package/guarantees/agent/golden/product.guarantee.yaml +12 -0
  131. package/guarantees/agent/golden/scenes/component-boundaries.scene.yaml +837 -0
  132. package/guarantees/agent/golden/scenes/product-custody.scene.yaml +53 -0
  133. package/guarantees/agent/golden/scenes/product.scene.yaml +8 -0
  134. package/guarantees/verifiers/golden.verifiers.yaml +1429 -0
  135. package/package.json +9 -3
  136. package/tests/acceptance/golden-product.test.ts +205 -0
  137. package/tests/acceptance/golden-product.ts +404 -0
  138. package/tests/acceptance/product/base-red.ts +73 -0
  139. package/tests/acceptance/product/documentation-examples.ts +68 -0
  140. package/tests/acceptance/product/intent-runtime.ts +145 -0
  141. package/tests/acceptance/product/release-output.ts +160 -0
  142. package/tests/acceptance/product/research-artifact.ts +87 -0
  143. package/tests/acceptance/product/research-revision.ts +82 -0
  144. package/tests/acceptance/product/research-source.ts +91 -0
  145. package/tests/acceptance/product/test-chain.ts +192 -0
  146. package/treeseed.package.yaml +147 -0
  147. package/dist/.treeseed-build-complete.json +0 -1
  148. package/dist/agent-capacity/allocation.d.ts +0 -183
  149. package/dist/agent-capacity/allocation.js +0 -5
  150. package/dist/agent-capacity/artifact-mutation-receipt.d.ts +0 -49
  151. package/dist/agent-capacity/artifact-mutation-receipt.js +0 -36
  152. package/dist/agent-capacity/artifacts.d.ts +0 -123
  153. package/dist/agent-capacity/artifacts.js +0 -39
  154. package/dist/agent-capacity/contracts/support/decision-work.d.ts +0 -227
  155. package/dist/agent-capacity/contracts/support/decision-work.js +0 -0
  156. package/dist/agent-capacity/validation/allocation.d.ts +0 -12
  157. package/dist/agent-capacity/validation/allocation.js +0 -115
@@ -1,30 +1,31 @@
1
1
  import { z } from "zod";
2
- import { activityProfileSchema } from "../../validation/agent-definition-schema.js";
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).superRefine((items, context) => {
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 executionNodeSchema = z.object({
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: z.string().regex(/^[a-z][a-z0-9-]*$/u).optional(),
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().superRefine((node, context) => {
39
- const assignable = ["agentClass", "estimate", "requiredCapabilities", "requestedPermissions", "workspace"];
40
- if (node.kind === "condition") {
41
- if (!node.condition) context.addIssue({ code: z.ZodIssueCode.custom, path: ["condition"], message: "Condition nodes require condition." });
42
- for (const key of assignable) if (node[key] !== void 0) context.addIssue({ code: z.ZodIssueCode.custom, path: [key], message: `Condition nodes cannot define ${key}.` });
43
- } else {
44
- for (const key of assignable) if (node[key] === void 0) context.addIssue({ code: z.ZodIssueCode.custom, path: [key], message: `Assignable nodes require ${key}.` });
45
- if (node.condition) context.addIssue({ code: z.ZodIssueCode.custom, path: ["condition"], message: "Assignable nodes cannot define condition." });
46
- }
47
- if (node.pairRole && !(node.workItemId && node.maximumReviewCycles)) context.addIssue({ code: z.ZodIssueCode.custom, message: "Actor and Reviewer nodes require workItemId and maximumReviewCycles." });
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({
@@ -53,7 +55,7 @@ const executionEdgeSchema = z.object({
53
55
  teamId: identifier,
54
56
  fromNodeId: identifier,
55
57
  toNodeId: identifier,
56
- provenance: z.enum(["profile-agent", "profile-event", "work-item", "review-pair", "governance"]),
58
+ provenance: z.enum(["profile-agent", "profile-event", "work-item", "review-pair", "governance", "treedx-link"]),
57
59
  sourceRef: exactEntityReferenceSchema.optional(),
58
60
  graphRevisionCreated: z.number().int().positive(),
59
61
  graphRevisionRemoved: z.number().int().positive().optional()
@@ -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 })
@@ -5,13 +5,10 @@ export interface CapacityReservation {
5
5
  id: string;
6
6
  idempotencyKey: string;
7
7
  membershipId: string;
8
- grantId: string;
8
+ grantId: string | null;
9
9
  capacityProviderId: string;
10
10
  executionProviderId: string | null;
11
11
  laneId: string | null;
12
- allocationSetId: string;
13
- allocationVersion: number;
14
- allocationSliceIds: string[];
15
12
  policySnapshot: Record<string, unknown>;
16
13
  projectAgentClassId: string;
17
14
  assignmentId: string | null;
@@ -41,13 +38,14 @@ export interface CapacityReservation {
41
38
  }
42
39
  export type CapacityLedgerPhase = 'task_completed_actual_settlement' | 'reservation_released' | 'task_failed_refund' | 'overrun_hold';
43
40
  export interface CapacityLedgerEntry {
41
+ /** Original canonical record persisted by the owning settlement transaction. */
42
+ usageSettlement?: import('../capacity/assignments/agent-execution.js').UsageSettlement;
44
43
  id: string;
45
44
  settlementKey: string;
46
45
  membershipId: string;
47
46
  capacityProviderId: string;
48
47
  reservationId: string | null;
49
48
  assignmentId: string | null;
50
- modeRunId: string | null;
51
49
  mode: 'planning' | 'acting' | null;
52
50
  teamId: string;
53
51
  projectId: string | null;
@@ -96,7 +94,6 @@ export interface CapacityUsageActual {
96
94
  assignmentAttempt: number;
97
95
  usageDimension: string;
98
96
  accountingMode: 'informational' | 'incremental' | 'aggregate';
99
- modeRunId: string | null;
100
97
  mode: 'planning' | 'acting' | null;
101
98
  capacityProviderId: string | null;
102
99
  executionProviderId: string | null;
@@ -1,9 +1,6 @@
1
- import type { AgentCapacityEnvelope, AgentExecutionMode, DecisionExecutionInput, WorkdayCapacityEnvelope } from '../capacity/assignments/assignment-records.js';
1
+ import type { AgentExecutionMode } from '../capacity/assignments/assignment-records.js';
2
2
  export type DecisionExecutionReadinessStatus = 'draft' | 'blocked' | 'ready' | 'stale' | 'waived';
3
3
  export type PlanningInputRequestStatus = 'requested' | 'complete' | 'waived' | 'rejected' | 'stale';
4
- export type DecisionExecutionInputStatus = 'proposed' | 'accepted' | 'revision_requested' | 'rejected' | 'stale';
5
- export type WorkdayCapacityEnvelopeStatus = 'draft' | 'queued' | 'active' | 'paused' | 'completed' | 'cancelled' | 'failed' | 'degraded';
6
- export type DurableAgentCapacityPlanStatus = 'draft' | 'accepted' | 'revision_requested' | 'deferred' | 'scheduled' | 'active' | 'completed' | 'superseded';
7
4
  export interface DecisionPlanningStatus {
8
5
  id: string;
9
6
  teamId: string;
@@ -36,86 +33,3 @@ export interface PlanningInputRequest {
36
33
  completedAt?: string | null;
37
34
  staleAt?: string | null;
38
35
  }
39
- export interface DecisionExecutionInputRecord {
40
- id: string;
41
- teamId: string;
42
- projectId: string;
43
- decisionId: string;
44
- workGraphNodeId?: string | null;
45
- estimateId?: string | null;
46
- projectAgentClassId: string;
47
- mode: AgentExecutionMode;
48
- status: DecisionExecutionInputStatus;
49
- scopeHash: string;
50
- input: DecisionExecutionInput;
51
- acceptedAt?: string | null;
52
- revisionRequestedAt?: string | null;
53
- staleAt?: string | null;
54
- metadata?: Record<string, unknown>;
55
- createdAt?: string;
56
- updatedAt?: string;
57
- }
58
- export interface WorkdayCapacityEnvelopeRecord {
59
- id: string;
60
- teamId: string;
61
- projectId: string;
62
- workdayRunId?: string | null;
63
- allocationSetId?: string | null;
64
- status: WorkdayCapacityEnvelopeStatus;
65
- startedAt?: string | null;
66
- pausedAt?: string | null;
67
- completedAt?: string | null;
68
- envelope: WorkdayCapacityEnvelope;
69
- metadata?: Record<string, unknown>;
70
- createdAt?: string;
71
- updatedAt?: string;
72
- }
73
- export interface AgentCapacityPlanWorkUnit {
74
- id: string;
75
- decisionExecutionInputId: string;
76
- decisionId: string;
77
- workGraphNodeId?: string | null;
78
- projectAgentClassId: string;
79
- mode: AgentExecutionMode;
80
- activityType?: import('../../../types/agents.js').AgentActivityType;
81
- taskId?: string | null;
82
- agentId?: string | null;
83
- handlerId?: string | null;
84
- workDayId?: string | null;
85
- expectedSeconds: number;
86
- highSeconds: number;
87
- requiredCapabilities: string[];
88
- dependencies: string[];
89
- blockers: string[];
90
- risk: Record<string, unknown>;
91
- assumptions: string[];
92
- confidence?: number | null;
93
- capacityEnvelope: AgentCapacityEnvelope;
94
- decisionInput: DecisionExecutionInput;
95
- metadata?: Record<string, unknown>;
96
- }
97
- export interface AgentCapacityPlanRecord {
98
- id: string;
99
- teamId: string;
100
- projectId: string;
101
- decisionId: string;
102
- status: DurableAgentCapacityPlanStatus;
103
- scopeHash: string;
104
- allocationSetId?: string | null;
105
- workDayId?: string | null;
106
- expectedSeconds: number;
107
- highSeconds: number;
108
- workUnits: AgentCapacityPlanWorkUnit[];
109
- capabilityNeeds: string[];
110
- environmentNeeds: string[];
111
- reserves: Record<string, unknown>;
112
- blockers: string[];
113
- priorityRationale?: string | null;
114
- review?: Record<string, unknown>;
115
- metadata?: Record<string, unknown>;
116
- acceptedAt?: string | null;
117
- scheduledAt?: string | null;
118
- supersededAt?: string | null;
119
- createdAt?: string;
120
- updatedAt?: string;
121
- }
@@ -0,0 +1,34 @@
1
+ export type CapacityGrantStatus = 'planned' | 'active' | 'paused' | 'revoked' | 'expired';
2
+ export interface CapacityGrantV2 {
3
+ schemaVersion: 2;
4
+ id: string;
5
+ membershipId: string;
6
+ teamId: string;
7
+ providerId: string;
8
+ projectId: string;
9
+ environment: string;
10
+ status: CapacityGrantStatus;
11
+ executionProviderIds: string[];
12
+ laneIds: string[];
13
+ capabilities: string[];
14
+ allowedModes: Array<'planning' | 'acting'>;
15
+ dailyAgentSecondsLimit?: number | null;
16
+ monthlyAgentSecondsLimit?: number | null;
17
+ maxConcurrentAssignments?: number | null;
18
+ budgetLimits?: {
19
+ tokens?: number | null;
20
+ cost?: {
21
+ amount: number;
22
+ currency: string;
23
+ } | null;
24
+ native?: Array<{
25
+ unit: string;
26
+ amount: number;
27
+ }>;
28
+ } | null;
29
+ unmetered?: boolean;
30
+ expiresAt?: string | null;
31
+ metadata?: Record<string, unknown>;
32
+ }
33
+ export { validateCapacityGrantV2 } from './validation/grant.js';
34
+ export type { CapacityGrantDiagnostic, CapacityGrantValidation } from './validation/grant.js';
@@ -0,0 +1,4 @@
1
+ import { validateCapacityGrantV2 } from "./validation/grant.js";
2
+ export {
3
+ validateCapacityGrantV2
4
+ };