@treeseed/sdk 0.13.0-rc.118 → 0.13.0-rc.119

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 (73) hide show
  1. package/dist/.treeseed-build-complete.json +1 -1
  2. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +4199 -0
  3. package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +155 -0
  4. package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +7 -1
  5. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +199 -0
  6. package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +96 -0
  7. package/dist/agent-capacity/contracts/operations/agent-team-clone.d.ts +218 -0
  8. package/dist/agent-capacity/contracts/operations/agent-team-clone.js +57 -0
  9. package/dist/agent-capacity/contracts/support/decision-work.d.ts +1 -24
  10. package/dist/agent-capacity/contracts/support/execution-graph.d.ts +1087 -0
  11. package/dist/agent-capacity/contracts/support/execution-graph.js +120 -0
  12. package/dist/agent-capacity/validation/activity-profile.d.ts +1 -1
  13. package/dist/agent-capacity/validation/activity-profile.js +3 -272
  14. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +2699 -8867
  15. package/dist/agent-capacity/validation/agent-definition-schema.js +67 -159
  16. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +3 -3
  17. package/dist/agent-capacity/validation/assignment-records.js +1 -1
  18. package/dist/agent-capacity/validation/execution/execution-graph.d.ts +1 -0
  19. package/dist/agent-capacity/validation/execution/execution-graph.js +16 -0
  20. package/dist/agent-capacity/validation/index.d.ts +2 -1
  21. package/dist/agent-capacity/validation/index.js +2 -1
  22. package/dist/capacity/agents/agent-capacity.d.ts +5 -1
  23. package/dist/capacity/agents/agent-capacity.js +4 -1
  24. package/dist/capacity-provider/client.d.ts +1 -43
  25. package/dist/capacity-provider/client.js +1 -22
  26. package/dist/capacity-provider/sandbox-contracts.d.ts +4 -4
  27. package/dist/capacity-provider/sandbox.d.ts +0 -1
  28. package/dist/capacity-provider/sandbox.js +0 -1
  29. package/dist/capacity-provider/source-workspace.d.ts +19 -171
  30. package/dist/capacity-provider/source-workspace.js +7 -24
  31. package/dist/content/contracts.d.ts +1 -1
  32. package/dist/content/validation/agent-operational-content-schemas.d.ts +24 -695
  33. package/dist/content/validation/agent-operational-content-schemas.js +11 -54
  34. package/dist/content/validation/auxiliary-content-schemas.d.ts +58 -58
  35. package/dist/content/validation/content-model-schemas.d.ts +8617 -18610
  36. package/dist/content/validation/content-model-schemas.js +160 -43
  37. package/dist/content/validation/portable-content-data.d.ts +369 -1681
  38. package/dist/content/validation/portable-content-data.js +5 -4
  39. package/dist/model-registry/agent-operational-models.d.ts +1 -1
  40. package/dist/model-registry/agent-operational-models.js +0 -3
  41. package/dist/model-registry/build-builtin-model-registry.js +44 -72
  42. package/dist/operator-contracts/canonical-command-tree.js +62 -179
  43. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +75 -0
  44. package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.js +42 -0
  45. package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +60 -0
  46. package/dist/operator-contracts/catalog/commands/command-tree-builders.js +191 -0
  47. package/dist/operator-contracts/catalog/communication-operations.d.ts +1 -1
  48. package/dist/operator-contracts/catalog/execution/execution-operations.d.ts +36 -0
  49. package/dist/operator-contracts/catalog/execution/execution-operations.js +39 -0
  50. package/dist/operator-contracts/catalog/inbox-operations.d.ts +5 -1
  51. package/dist/operator-contracts/command-tree.js +1 -0
  52. package/dist/operator-contracts/control-plane-operations.d.ts +136 -73
  53. package/dist/operator-contracts/control-plane-operations.js +19 -40
  54. package/dist/operator-contracts/inbox/contracts.d.ts +12 -0
  55. package/dist/operator-contracts/inbox/contracts.js +5 -1
  56. package/dist/operator-contracts/mcp.js +1 -1
  57. package/dist/operator-contracts/workday-lifecycle.d.ts +6 -8
  58. package/dist/operator-contracts/workday-lifecycle.js +3 -3
  59. package/dist/sdk-types/support/sdk-model-names.d.ts +1 -1
  60. package/dist/sdk-types/support/sdk-model-names.js +0 -3
  61. package/dist/secrets-capability/shared-resources.d.ts +6 -6
  62. package/dist/types/agents/agent-activity-profile.d.ts +39 -77
  63. package/dist/types/agents/agent-activity-profile.js +23 -0
  64. package/dist/types/agents/execution-run-ref.d.ts +1 -8
  65. package/package.json +1 -1
  66. package/dist/agent-capacity/authority/agent-authority-presets.d.ts +0 -13
  67. package/dist/agent-capacity/authority/agent-authority-presets.js +0 -107
  68. package/dist/agent-capacity/contracts/operations/workflow-promotion.d.ts +0 -24
  69. package/dist/agent-capacity/contracts/operations/workflow-promotion.js +0 -0
  70. package/dist/agent-capacity/validation/workflow-promotion.d.ts +0 -2
  71. package/dist/agent-capacity/validation/workflow-promotion.js +0 -34
  72. package/dist/capacity-provider/source/candidate.d.ts +0 -1275
  73. package/dist/capacity-provider/source/candidate.js +0 -72
@@ -1,180 +1,88 @@
1
1
  import { z } from "zod";
2
- import { AGENT_ACTIVITY_TYPES, AGENT_HANDLER_KINDS } from "../../types/agents.js";
3
- import { validateAgentActivityProfilesConfiguration } from "./activity-profile.js";
2
+ import { AGENT_CONTENT_MODELS, AGENT_TOOL_GROUPS } from "../../types/agents.js";
3
+ const identifier = z.string().trim().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/u);
4
+ const agentClass = z.string().trim().min(1).max(100).regex(/^[a-z][a-z0-9-]*$/u);
4
5
  const nonEmpty = z.string().trim().min(1);
5
- const stringList = z.array(nonEmpty).superRefine((items, context) => {
6
- if (new Set(items).size !== items.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
7
- });
8
- const nonEmptyStringList = z.array(nonEmpty).min(1).superRefine((items, context) => {
9
- if (new Set(items).size !== items.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
6
+ const unique = (item) => z.array(item).superRefine((items, context) => {
7
+ if (new Set(items.map((value) => JSON.stringify(value))).size !== items.length) {
8
+ context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
9
+ }
10
10
  });
11
- const exactRevisionRefSchema = z.object({ id: nonEmpty, revision: z.number().int().positive() }).strict();
12
- const exactRevisionRefList = z.array(exactRevisionRefSchema).superRefine((items, context) => {
13
- if (new Set(items.map((item) => `${item.id}@${item.revision}`)).size !== items.length) context.addIssue({ code: z.ZodIssueCode.custom, message: "Exact revision references must be unique." });
11
+ const dependenciesSchema = z.object({
12
+ agents: unique(agentClass).optional(),
13
+ events: unique(z.literal("workday-closing")).optional()
14
+ }).strict().refine((value) => Boolean(value.agents?.length || value.events?.length), {
15
+ message: "At least one dependency selector is required."
14
16
  });
15
- const promptSchema = z.object({ system: nonEmpty, task: z.string().optional(), templates: z.record(z.string()).optional() }).strict();
16
- const toolPolicySchema = z.object({ allowed: stringList, denied: stringList.optional() }).strict();
17
- const modelPermissionSchema = z.object({ operations: nonEmptyStringList, filters: z.record(z.unknown()).optional() }).strict();
18
- const permissionsSchema = z.object({
19
- content: z.record(modelPermissionSchema).optional(),
20
- commit: z.object({ allowed: z.boolean() }).strict().optional(),
21
- repository: z.object({ readPaths: stringList.optional(), writePaths: stringList.optional(), allowCodeMutation: z.boolean().optional() }).strict().optional(),
22
- network: z.object({ allowWeb: z.boolean().optional(), allowedDomains: stringList.optional() }).strict().optional(),
23
- shell: z.object({ allowCommands: z.boolean().optional(), allowedCommands: stringList.optional(), deniedCommands: stringList.optional() }).strict().optional()
24
- }).strict();
25
- const artifactTriggerSchema = z.object({
26
- event: nonEmpty,
27
- artifactKind: nonEmpty,
28
- model: nonEmpty.optional(),
29
- required: z.boolean().optional()
30
- }).strict();
31
- const closeoutPolicySchema = z.object({
32
- warningSeconds: z.number().int().positive().optional(),
33
- summaryRequired: z.boolean().optional(),
34
- requiredArtifactKinds: stringList.optional(),
35
- blockOnOpenQuestions: z.boolean().optional()
36
- }).strict();
37
- const capabilityRequirementSchema = z.object({
38
- capabilityId: nonEmpty,
39
- versionRange: nonEmpty,
40
- requirement: z.enum(["required", "preferred"]),
41
- alternativeGroup: nonEmpty.nullable().optional(),
42
- requiredFeatures: stringList.optional(),
43
- configuration: z.record(z.object({ value: z.unknown(), requirement: z.enum(["required", "preferred"]) }).strict()).optional()
44
- }).strict();
45
- const branchPolicySchema = z.object({
46
- kind: z.enum(["read-only", "main-planning-content", "staging-content", "assignment-feature", "staging-release"]),
47
- base: z.enum(["main", "staging"]),
48
- target: z.enum(["main", "staging"]).optional(),
49
- prefix: z.string().optional(),
50
- branchNameTemplate: z.string().optional(),
51
- worktree: z.string().optional(),
52
- updateBaseBeforeRun: z.boolean().optional(),
53
- mergeTargetBeforeSave: z.boolean().optional()
54
- }).strict();
55
- const signalPolicySchema = z.object({
56
- subscribesTo: z.array(z.object({
57
- contract: nonEmpty,
58
- groupScope: z.object({ mode: nonEmpty, projectId: nonEmpty.optional(), groupRefs: z.array(z.object({ projectId: nonEmpty, groupId: nonEmpty }).strict()).optional() }).strict().optional(),
59
- filters: z.record(z.unknown()).optional(),
60
- cardinality: z.enum(["single", "each"]).optional(),
61
- producerPolicy: z.enum(["any", "all", "quorum"]).optional(),
62
- quorum: z.number().int().positive().optional()
63
- }).strict()).optional(),
64
- publishes: stringList.optional()
17
+ const permissionSetSchema = z.object({
18
+ content: z.object({
19
+ read: unique(z.enum(AGENT_CONTENT_MODELS)),
20
+ write: unique(z.enum(AGENT_CONTENT_MODELS))
21
+ }).strict(),
22
+ tools: unique(z.enum(AGENT_TOOL_GROUPS))
65
23
  }).strict();
66
- const planningSignalsSchema = signalPolicySchema.optional();
67
- const planningIntentSchema = z.object({
68
- objective: nonEmpty.optional(),
69
- proposalTypes: stringList.optional(),
70
- artifactKind: nonEmpty.optional(),
71
- subjectModel: nonEmpty.optional(),
72
- subjectId: nonEmpty.nullable().optional(),
73
- includeWorkdayArtifacts: z.boolean().optional(),
74
- stage: z.enum(["discovery", "synthesis", "deliberation", "evaluation", "revision", "closeout"]).optional(),
75
- stages: z.array(z.object({
76
- stage: z.enum(["discovery", "synthesis", "deliberation", "evaluation", "revision", "closeout"]),
77
- promptTask: nonEmpty.optional(),
78
- signals: planningSignalsSchema
79
- }).strict()).min(1).optional(),
80
- requiresArtifactKinds: stringList.optional()
81
- }).strict();
82
- const answerPolicySchema = z.object({
83
- kind: z.enum(["team-human", "human-or-agent", "specific-human", "specific-agent"]),
84
- teamId: nonEmpty.optional(),
85
- requiredRoles: stringList.optional(),
86
- allowedRoles: stringList.optional(),
87
- allowedAgentIds: stringList.optional(),
88
- allowedAgentClasses: stringList.optional(),
89
- allowedActivityProfiles: stringList.optional(),
90
- teamMemberId: nonEmpty.optional(),
91
- projectId: nonEmpty.optional(),
92
- agentSlug: nonEmpty.optional()
93
- }).strict();
94
- const executionSchema = z.object({
95
- reasoningEffort: z.enum(["minimal", "low", "medium", "high", "xhigh"]).optional(),
96
- maxRuntimeSeconds: z.number().int().positive().optional(),
97
- closeoutWarningSeconds: z.number().int().positive().optional(),
98
- preparationSeconds: z.number().int().positive().optional(),
99
- closeoutSeconds: z.number().int().positive().optional(),
100
- maxRetries: z.number().int().nonnegative().optional(),
101
- verificationRequired: z.boolean().optional(),
102
- maxTotalTokens: z.number().int().positive().optional(),
103
- warningTokens: z.number().int().positive().optional(),
104
- maxCostAmount: z.number().nonnegative().optional(),
105
- costCurrency: z.string().length(3).optional(),
106
- nativeLimits: z.array(z.object({ unit: nonEmpty, amount: z.number().nonnegative(), enforceable: z.boolean().optional() }).strict()).optional(),
107
- pricingGeneration: z.string().optional(),
108
- enforcementConfidence: z.enum(["exact", "bounded", "estimated", "opaque"]).optional(),
109
- allowedPaths: stringList.optional(),
110
- forbiddenPaths: stringList.optional()
24
+ const promptSchema = z.object({
25
+ system: z.string().trim().min(20),
26
+ instructions: z.array(nonEmpty).optional()
111
27
  }).strict();
112
28
  const activityProfileSchema = z.object({
113
- activityType: z.enum(AGENT_ACTIVITY_TYPES).optional(),
114
- enabled: z.boolean(),
115
- handler: z.enum(AGENT_HANDLER_KINDS),
29
+ handler: identifier,
30
+ dependsOn: dependenciesSchema.optional(),
31
+ permissions: permissionSetSchema,
116
32
  prompt: promptSchema,
117
- branchPolicy: branchPolicySchema,
118
- contextQueryRefs: exactRevisionRefList.optional(),
119
- contextQuerySetRefs: exactRevisionRefList.optional(),
120
- instructionTemplateRefs: exactRevisionRefList.optional(),
121
- capabilityRequirements: z.array(capabilityRequirementSchema).min(1).optional(),
122
- permissions: permissionsSchema.optional(),
123
- artifactTriggers: z.array(artifactTriggerSchema).optional(),
124
- closeoutPolicy: closeoutPolicySchema.optional(),
125
- tools: toolPolicySchema,
126
- signals: signalPolicySchema.optional(),
127
- outputs: z.object({ messageTypes: stringList, modelMutations: stringList }).strict(),
128
- planningIntent: planningIntentSchema.optional(),
129
- questionPolicy: z.object({ blockExecutionWhenCreated: z.boolean().optional(), defaultAnswerPolicy: answerPolicySchema.optional() }).strict().optional(),
130
- execution: executionSchema.optional()
131
- }).strict().superRefine((profile, context) => {
33
+ additionalContext: unique(identifier).optional(),
34
+ parameters: z.record(z.unknown()).optional()
35
+ }).strict();
36
+ const activityProfilesSchema = z.object({
37
+ planning: activityProfileSchema.optional(),
38
+ estimating: activityProfileSchema.optional(),
39
+ acting: activityProfileSchema.optional(),
40
+ reviewing: activityProfileSchema.optional(),
41
+ reporting: activityProfileSchema.optional(),
42
+ chat: activityProfileSchema.optional()
43
+ }).strict().refine((value) => Object.keys(value).length > 0, {
44
+ message: "At least one activity profile is required."
132
45
  });
133
46
  const agentDefinitionSchema = z.object({
134
- id: nonEmpty,
135
- slug: nonEmpty,
136
- title: nonEmpty,
47
+ schemaVersion: z.literal("treeseed.agent/v1"),
48
+ id: identifier,
137
49
  name: nonEmpty,
138
- description: nonEmpty,
139
- summary: nonEmpty,
140
- agentClass: nonEmpty,
141
- projectAgentClassId: nonEmpty,
142
- projectAgentClassSlug: nonEmpty,
143
- template: z.string().optional(),
144
- enabled: z.boolean(),
145
- designMaturity: z.enum(["draft", "validated", "simulated", "proven"]).optional(),
146
- runtimeStatus: z.enum(["active", "experimental", "dormant"]).optional(),
147
- groupIds: nonEmptyStringList,
148
- topicIds: stringList.optional(),
149
- contextQueryRefs: exactRevisionRefList.optional(),
150
- contextQuerySetRefs: exactRevisionRefList.optional(),
151
- instructionTemplateRefs: exactRevisionRefList.optional(),
152
- identity: z.object({ purpose: nonEmpty, responsibilities: stringList, durableInstructions: nonEmpty }).passthrough(),
153
- capabilities: z.array(z.union([nonEmpty, z.object({ id: nonEmpty }).passthrough()])).optional(),
154
- activityProfiles: z.record(activityProfileSchema)
155
- }).passthrough().superRefine((agent, context) => {
156
- const raw = agent;
157
- for (const legacy of ["primaryGroupId", "permissionPolicy", "contentAccess"]) if (legacy in raw) context.addIssue({ code: z.ZodIssueCode.custom, path: [legacy], message: `${legacy} is not part of the canonical agent contract.` });
158
- for (const forbidden of ["capacityProviderId", "capacityProviderIds", "executionProviderId", "executionProviderIds", "executionProvider", "providerPreference", "providerPreferences", "providerAllowList", "providerDenyList", "sandboxEnvironment", "sandboxProfile", "containerImage", "imageRef"])
159
- if (forbidden in raw) context.addIssue({ code: z.ZodIssueCode.custom, path: [forbidden], message: `${forbidden} is provider-owned runtime configuration and cannot appear in an agent profile.` });
50
+ agentClass,
51
+ purpose: nonEmpty,
52
+ responsibilities: z.array(nonEmpty).min(1),
53
+ capabilities: unique(identifier).refine((value) => value.length > 0, "At least one capability is required."),
54
+ context: z.object({ include: unique(identifier).refine((value) => value.length > 0) }).strict(),
55
+ activityProfiles: activityProfilesSchema
56
+ }).strict().superRefine((agent, context) => {
57
+ if (agent.agentClass !== "reviewer" && agent.activityProfiles.reviewing) {
58
+ context.addIssue({
59
+ code: z.ZodIssueCode.custom,
60
+ path: ["activityProfiles", "reviewing"],
61
+ message: "Only the Reviewer agent class may enable reviewing."
62
+ });
63
+ }
160
64
  });
161
65
  function issuePath(path) {
162
- return path.reduce((current, segment) => typeof segment === "number" ? `${current}[${segment}]` : current ? `${current}.${segment}` : segment, "");
66
+ return path.reduce((current, segment) => typeof segment === "number" ? `${current}[${segment}]` : current ? `${current}.${String(segment)}` : String(segment), "");
67
+ }
68
+ function diagnosticsFromZod(error, prefix = "") {
69
+ return error.issues.map((issue) => {
70
+ const suffix = issuePath(issue.path);
71
+ return {
72
+ code: `agent_schema_${issue.code}`,
73
+ path: prefix && suffix ? `${prefix}.${suffix}` : prefix || suffix,
74
+ message: issue.message
75
+ };
76
+ });
163
77
  }
164
78
  function validateAgentDefinitionModel(value) {
165
79
  const parsed = agentDefinitionSchema.safeParse(value);
166
- const diagnostics = parsed.success ? [] : parsed.error.issues.map((issue) => ({
167
- code: `agent_zod_${issue.code}`,
168
- path: issuePath(issue.path),
169
- message: issue.message
170
- }));
171
- if (value && typeof value === "object" && !Array.isArray(value)) {
172
- diagnostics.push(...validateAgentActivityProfilesConfiguration(value.activityProfiles).diagnostics);
173
- }
174
- const unique = new Map(diagnostics.map((diagnostic) => [`${diagnostic.code}:${diagnostic.path}:${diagnostic.message}`, diagnostic]));
175
- return { ok: unique.size === 0, diagnostics: [...unique.values()], data: parsed.success ? parsed.data : null };
80
+ return parsed.success ? { ok: true, diagnostics: [], data: parsed.data } : { ok: false, diagnostics: diagnosticsFromZod(parsed.error), data: null };
176
81
  }
177
82
  export {
83
+ activityProfileSchema,
84
+ activityProfilesSchema,
178
85
  agentDefinitionSchema,
86
+ diagnosticsFromZod,
179
87
  validateAgentDefinitionModel
180
88
  };
@@ -13,15 +13,15 @@ export declare const agentActivityQuerySchema: z.ZodObject<{
13
13
  after: number;
14
14
  type?: string | string[] | undefined;
15
15
  agent?: string | string[] | undefined;
16
- agentClass?: string | string[] | undefined;
17
16
  severity?: string | string[] | undefined;
17
+ agentClass?: string | string[] | undefined;
18
18
  }, {
19
19
  type?: string | string[] | undefined;
20
20
  agent?: string | string[] | undefined;
21
21
  limit?: number | undefined;
22
22
  after?: number | undefined;
23
- agentClass?: string | string[] | undefined;
24
23
  severity?: string | string[] | undefined;
24
+ agentClass?: string | string[] | undefined;
25
25
  }>;
26
26
  export declare const agentActivityPageSchema: z.ZodObject<{
27
27
  items: z.ZodArray<z.ZodType<AgentActivityEvent, z.ZodTypeDef, AgentActivityEvent>, "many">;
@@ -208,8 +208,8 @@ export declare function parseAgentActivityQuery(value: unknown): {
208
208
  after: number;
209
209
  type?: string | string[] | undefined;
210
210
  agent?: string | string[] | undefined;
211
- agentClass?: string | string[] | undefined;
212
211
  severity?: string | string[] | undefined;
212
+ agentClass?: string | string[] | undefined;
213
213
  };
214
214
  export declare function parseAgentActivityPage(value: unknown): {
215
215
  items: AgentActivityEvent[];
@@ -1,7 +1,7 @@
1
1
  const ASSIGNMENT_STATUSES = /* @__PURE__ */ new Set(["pending", "leased", "running", "completed", "failed", "returned", "expired", "cancelled"]);
2
2
  const LEASE_STATES = /* @__PURE__ */ new Set(["unleased", "leased", "released", "expired"]);
3
3
  const MODE_RUN_STATUSES = /* @__PURE__ */ new Set(["queued", "running", "succeeded", "failed", "cancelled"]);
4
- const SYNTHESIS_SOURCES = /* @__PURE__ */ new Set(["approved_decision", "planning_input_request", "capacity_plan", "workday_demand", "verification_failure", "fallback_queue"]);
4
+ const SYNTHESIS_SOURCES = /* @__PURE__ */ new Set(["approved_decision", "planning_input_request", "capacity_plan", "living_execution_graph", "workday_demand", "verification_failure", "fallback_queue"]);
5
5
  function record(value) {
6
6
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
7
7
  }
@@ -0,0 +1 @@
1
+ export { conditionDefinitionSchema, executionEdgeSchema, executionNodeSchema, graphChangeSetSchema, graphRevisionSchema, validateExecutionGraph, } from '../../contracts/support/execution-graph.js';
@@ -0,0 +1,16 @@
1
+ import {
2
+ conditionDefinitionSchema,
3
+ executionEdgeSchema,
4
+ executionNodeSchema,
5
+ graphChangeSetSchema,
6
+ graphRevisionSchema,
7
+ validateExecutionGraph
8
+ } from "../../contracts/support/execution-graph.js";
9
+ export {
10
+ conditionDefinitionSchema,
11
+ executionEdgeSchema,
12
+ executionNodeSchema,
13
+ graphChangeSetSchema,
14
+ graphRevisionSchema,
15
+ validateExecutionGraph
16
+ };
@@ -8,4 +8,5 @@ export * from './configuration.js';
8
8
  export * from './research/citation.js';
9
9
  export * from './research/source-policy.js';
10
10
  export * from './research/workflow.js';
11
- export * from './workflow-promotion.js';
11
+ export * from './execution/execution-graph.js';
12
+ export * from '../contracts/capacity/assignments/agent-execution.js';
@@ -8,4 +8,5 @@ export * from "./configuration.js";
8
8
  export * from "./research/citation.js";
9
9
  export * from "./research/source-policy.js";
10
10
  export * from "./research/workflow.js";
11
- export * from "./workflow-promotion.js";
11
+ export * from "./execution/execution-graph.js";
12
+ export * from "../contracts/capacity/assignments/agent-execution.js";
@@ -1,5 +1,7 @@
1
1
  export type { AgentKernelPolicy, AgentKernelProfile, ProjectAgentClass, ProjectAgentClassStatus } from '../../agent-capacity/contracts/projects/agents/project-agent-class.js';
2
+ export type { AgentDefinition, AgentActivityProfile } from '../../types/agents.js';
2
3
  export * from '../../agent-capacity/allocation.js';
4
+ export * from '../../agent-capacity/artifacts.js';
3
5
  export * from '../../agent-capacity/validation/index.js';
4
6
  export * from '../../agent-capacity/contracts/capacity/assignments/assignment-records.js';
5
7
  export * from '../../agent-capacity/contracts/capacity/assignments/assignment-context-pack.js';
@@ -7,12 +9,14 @@ export * from '../../agent-capacity/contracts/capacity/assignments/context-pack-
7
9
  export * from '../../agent-capacity/contracts/capacity/communication/communication-records.js';
8
10
  export * from '../../agent-capacity/contracts/capacity/providers/supply-policy.js';
9
11
  export * from '../../agent-capacity/contracts/capacity/workdays/workday-records.js';
12
+ export * from '../../agent-capacity/contracts/capacity/workdays/workday-allocation.js';
10
13
  export * from '../../agent-capacity/contracts/configuration/configuration.js';
11
14
  export * from '../../agent-capacity/contracts/operations/research-workflow.js';
12
- export * from '../../agent-capacity/contracts/operations/workflow-promotion.js';
15
+ export * from '../../agent-capacity/contracts/operations/agent-team-clone.js';
13
16
  export * from '../../agent-capacity/contracts/projects/agents/project-agent-class.js';
14
17
  export * from '../../agent-capacity/contracts/runtime/runtime-observability.js';
15
18
  export * from '../../agent-capacity/contracts/support/decision-work.js';
19
+ export * from '../../agent-capacity/contracts/support/execution-graph.js';
16
20
  export * from '../../agent-capacity/contracts/support/agent-lab-monitoring.js';
17
21
  export * from '../../agent-capacity/contracts/support/agent-atlas.js';
18
22
  export * from '../../agent-capacity/contracts/support/failure-records.js';
@@ -1,4 +1,5 @@
1
1
  export * from "../../agent-capacity/allocation.js";
2
+ export * from "../../agent-capacity/artifacts.js";
2
3
  export * from "../../agent-capacity/validation/index.js";
3
4
  export * from "../../agent-capacity/contracts/capacity/assignments/assignment-records.js";
4
5
  export * from "../../agent-capacity/contracts/capacity/assignments/assignment-context-pack.js";
@@ -6,12 +7,14 @@ export * from "../../agent-capacity/contracts/capacity/assignments/context-pack-
6
7
  export * from "../../agent-capacity/contracts/capacity/communication/communication-records.js";
7
8
  export * from "../../agent-capacity/contracts/capacity/providers/supply-policy.js";
8
9
  export * from "../../agent-capacity/contracts/capacity/workdays/workday-records.js";
10
+ export * from "../../agent-capacity/contracts/capacity/workdays/workday-allocation.js";
9
11
  export * from "../../agent-capacity/contracts/configuration/configuration.js";
10
12
  export * from "../../agent-capacity/contracts/operations/research-workflow.js";
11
- export * from "../../agent-capacity/contracts/operations/workflow-promotion.js";
13
+ export * from "../../agent-capacity/contracts/operations/agent-team-clone.js";
12
14
  export * from "../../agent-capacity/contracts/projects/agents/project-agent-class.js";
13
15
  export * from "../../agent-capacity/contracts/runtime/runtime-observability.js";
14
16
  export * from "../../agent-capacity/contracts/support/decision-work.js";
17
+ export * from "../../agent-capacity/contracts/support/execution-graph.js";
15
18
  export * from "../../agent-capacity/contracts/support/agent-lab-monitoring.js";
16
19
  export * from "../../agent-capacity/contracts/support/agent-atlas.js";
17
20
  export * from "../../agent-capacity/contracts/support/failure-records.js";
@@ -3,7 +3,6 @@ import type { ProviderRuntimeEventInput } from '../agent-capacity/contracts/capa
3
3
  import type { CapacityProviderIdentity, CapacityProviderIdentityRotationRequest, CapacityProviderSignedProof, ProviderAccessTokenIssue, ProviderAvailabilitySession, ProviderCredentialIssuanceAuthorization, ProviderRegistrationRequest, ProviderRegistrationSubmission, ProviderTeamCredentialIssue } from './contracts/index.js';
4
4
  import type { ProviderDiscussionResponseRequest } from '../operator-contracts/communication/contracts.js';
5
5
  import { type SourceWorkspaceRequest } from './source-workspace.js';
6
- import { type SourceCandidateRequest, type SourceChunkRequest } from './source/candidate.js';
7
6
  export interface ProviderProtocolClientOptions {
8
7
  controlPlaneUrl: string;
9
8
  accessToken?: string;
@@ -73,7 +72,7 @@ export declare class ProviderProtocolClient {
73
72
  };
74
73
  mode: "analysis" | "work";
75
74
  attempt: number;
76
- publication: "denied" | "candidate-only";
75
+ publication: "denied" | "assignment-branch";
77
76
  credentialBindingId: string;
78
77
  };
79
78
  credential: {
@@ -87,47 +86,6 @@ export declare class ProviderProtocolClient {
87
86
  authorizationId: string;
88
87
  ephemeralPublicKey: string;
89
88
  };
90
- sourceBundle?: {
91
- digest: string;
92
- bytes: number;
93
- artifactId: string;
94
- chunks: string[];
95
- } | undefined;
96
- }>;
97
- /** Bounded host-only transfer. The API verifies registered-provider signatures and live publication authority. */
98
- publishAssignmentSourceCandidate(assignmentId: string, request: SourceCandidateRequest): Promise<Record<string, unknown> | {
99
- id: string;
100
- schemaVersion: "treeseed.source-candidate-receipt/v1";
101
- commit: string;
102
- source: {
103
- commit: string;
104
- projectId: string;
105
- teamId: string;
106
- profile: "source-only";
107
- repositoryId: string;
108
- controlPlaneId: string;
109
- formatVersion: 1;
110
- };
111
- verification: {
112
- authority: true;
113
- objectClosure: true;
114
- ancestry: true;
115
- };
116
- bundle: {
117
- digest: string;
118
- bytes: number;
119
- artifactId: string;
120
- };
121
- leaseId: string;
122
- parentCandidateId: string | null;
123
- persistedAt: string;
124
- }>;
125
- /** Source artifacts are accessible only through a current assignment, never ambient team access. */
126
- readAssignmentSourceChunk(assignmentId: string, request: SourceChunkRequest): Promise<{
127
- content: string;
128
- digest: string;
129
- index: number;
130
- artifactId: string;
131
89
  }>;
132
90
  respondToAssignmentDiscussion(assignmentId: string, request: ProviderDiscussionResponseRequest, idempotencyKey: string): Promise<{
133
91
  status: "responded" | "abstained";
@@ -1,7 +1,6 @@
1
1
  import { ControlPlaneClient, ControlPlaneClientError } from "../entrypoints/clients/control-plane-client.js";
2
2
  import { CONTROL_PLANE_OPERATIONS } from "../operator-contracts/index.js";
3
- import { sourceWorkspaceRequestSchema, sourceWorkspaceResponseSchema, sourceCandidateReceiptSchema } from "./source-workspace.js";
4
- import { sourceCandidateRequestSchema, sourceChunkRequestSchema, sourceChunkResponseSchema } from "./source/candidate.js";
3
+ import { sourceWorkspaceRequestSchema, sourceWorkspaceResponseSchema } from "./source-workspace.js";
5
4
  class CapacityProviderApiError extends Error {
6
5
  constructor(message, status, payload) {
7
6
  super(message);
@@ -138,26 +137,6 @@ class ProviderProtocolClient {
138
137
  if (response.authorization.assignmentId !== assignmentId) throw new CapacityProviderApiError("Source authority assignment correlation failed.", 502, { code: "source_authority_mismatch" });
139
138
  return response;
140
139
  }
141
- /** Bounded host-only transfer. The API verifies registered-provider signatures and live publication authority. */
142
- async publishAssignmentSourceCandidate(assignmentId, request) {
143
- const body = sourceCandidateRequestSchema.parse(request);
144
- if (body.candidate.attestation.assignmentId !== assignmentId) throw new CapacityProviderApiError("Candidate assignment correlation failed.", 400, { code: "source_candidate_mismatch" });
145
- const response = await this.invoke(CONTROL_PLANE_OPERATIONS.providers.sourceCandidate, { path: { assignmentId }, body });
146
- if (body.action === "commit") {
147
- const receipt = sourceCandidateReceiptSchema.parse(response);
148
- if (receipt.leaseId !== body.candidate.attestation.leaseId || receipt.commit !== body.candidate.attestation.commit || receipt.bundle.digest !== body.candidate.attestation.bundle.digest || JSON.stringify(receipt.source) !== JSON.stringify(body.candidate.attestation.source)) throw new CapacityProviderApiError("Candidate receipt correlation failed.", 502, { code: "source_candidate_receipt_mismatch" });
149
- return receipt;
150
- }
151
- if (response.accepted !== true || response.index !== body.index || response.digest !== body.candidate.attestation.bundle.chunks[body.index]) throw new CapacityProviderApiError("Candidate chunk receipt correlation failed.", 502, { code: "source_candidate_chunk_mismatch" });
152
- return response;
153
- }
154
- /** Source artifacts are accessible only through a current assignment, never ambient team access. */
155
- async readAssignmentSourceChunk(assignmentId, request) {
156
- const body = sourceChunkRequestSchema.parse(request);
157
- const response = sourceChunkResponseSchema.parse(await this.invoke(CONTROL_PLANE_OPERATIONS.providers.sourceChunk, { path: { assignmentId }, body }));
158
- if (response.artifactId !== body.artifactId || response.index !== body.index) throw new CapacityProviderApiError("Source chunk correlation failed.", 502, { code: "source_chunk_mismatch" });
159
- return response;
160
- }
161
140
  respondToAssignmentDiscussion(assignmentId, request, idempotencyKey) {
162
141
  return this.invoke(CONTROL_PLANE_OPERATIONS.providers.discussionResponse, { path: { assignmentId }, body: request }, { idempotencyKey });
163
142
  }
@@ -117,18 +117,18 @@ export declare const sandboxAssignmentSchema: z.ZodObject<{
117
117
  provider: string;
118
118
  capabilities: string[];
119
119
  model: string;
120
- reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
121
120
  maxInputTokens?: number | undefined;
122
121
  maxOutputTokens?: number | undefined;
123
122
  maxCost?: number | undefined;
123
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
124
124
  }, {
125
125
  provider: string;
126
126
  capabilities: string[];
127
127
  model: string;
128
- reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
129
128
  maxInputTokens?: number | undefined;
130
129
  maxOutputTokens?: number | undefined;
131
130
  maxCost?: number | undefined;
131
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
132
132
  }>;
133
133
  credentialHandles: z.ZodArray<z.ZodObject<{
134
134
  id: z.ZodString;
@@ -209,10 +209,10 @@ export declare const sandboxAssignmentSchema: z.ZodObject<{
209
209
  provider: string;
210
210
  capabilities: string[];
211
211
  model: string;
212
- reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
213
212
  maxInputTokens?: number | undefined;
214
213
  maxOutputTokens?: number | undefined;
215
214
  maxCost?: number | undefined;
215
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
216
216
  };
217
217
  credentialHandles: {
218
218
  id: string;
@@ -277,10 +277,10 @@ export declare const sandboxAssignmentSchema: z.ZodObject<{
277
277
  provider: string;
278
278
  capabilities: string[];
279
279
  model: string;
280
- reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
281
280
  maxInputTokens?: number | undefined;
282
281
  maxOutputTokens?: number | undefined;
283
282
  maxCost?: number | undefined;
283
+ reasoningEffort?: "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
284
284
  };
285
285
  credentialHandles: {
286
286
  id: string;
@@ -1,3 +1,2 @@
1
1
  export * from './sandbox-contracts.js';
2
2
  export * from './source-workspace.js';
3
- export * from './source/candidate.js';
@@ -1,3 +1,2 @@
1
1
  export * from "./sandbox-contracts.js";
2
2
  export * from "./source-workspace.js";
3
- export * from "./source/candidate.js";