@treeseed/sdk 0.13.0-rc.55 → 0.13.0-rc.57

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 (37) hide show
  1. package/dist/agent-capacity/contracts/capacity/providers/supply-policy.d.ts +0 -2
  2. package/dist/agent-capacity/validation/activity-profile.js +18 -9
  3. package/dist/agent-capacity/validation/agent-definition-schema.d.ts +558 -636
  4. package/dist/agent-capacity/validation/agent-definition-schema.js +8 -28
  5. package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +11 -11
  6. package/dist/capacity-provider/capability-ontology.d.ts +1211 -0
  7. package/dist/capacity-provider/capability-ontology.js +200 -0
  8. package/dist/capacity-provider/contracts/governance.d.ts +37 -2
  9. package/dist/capacity-provider/core-capability-catalog.d.ts +47 -0
  10. package/dist/capacity-provider/core-capability-catalog.js +63 -0
  11. package/dist/capacity-provider/environment-catalog.d.ts +877 -0
  12. package/dist/capacity-provider/environment-catalog.js +116 -0
  13. package/dist/capacity-provider/index.d.ts +3 -0
  14. package/dist/capacity-provider/index.js +3 -0
  15. package/dist/capacity-provider/sandbox-contracts.d.ts +147 -26
  16. package/dist/capacity-provider/sandbox-contracts.js +16 -1
  17. package/dist/capacity-provider/validation.d.ts +2 -1
  18. package/dist/capacity-provider/validation.js +34 -1
  19. package/dist/content/validation/agent-operational-content-schemas.d.ts +16 -16
  20. package/dist/content/validation/auxiliary-content-schemas.d.ts +2 -2
  21. package/dist/content/validation/content-model-schemas.d.ts +1077 -1220
  22. package/dist/content/validation/portable-content-data.d.ts +104 -117
  23. package/dist/deployment/schemas.d.ts +169 -25
  24. package/dist/deployment/schemas.js +27 -1
  25. package/dist/operator-contracts/canonical-command-tree.js +17 -1
  26. package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +164 -0
  27. package/dist/operator-contracts/catalog/capability-ontology-operations.js +24 -0
  28. package/dist/operator-contracts/catalog/control-plane-catalog.d.ts +6 -0
  29. package/dist/operator-contracts/catalog/control-plane-catalog.js +18 -0
  30. package/dist/operator-contracts/catalog/inbox-operations.d.ts +3 -3
  31. package/dist/operator-contracts/control-plane-operations.d.ts +513 -345
  32. package/dist/operator-contracts/control-plane-operations.js +7 -10
  33. package/dist/operator-contracts/inbox/contracts.d.ts +16 -16
  34. package/dist/operator-contracts/index.d.ts +1 -0
  35. package/dist/operator-contracts/index.js +1 -0
  36. package/dist/types/agents/agent-activity-profile.d.ts +15 -33
  37. package/package.json +1 -1
@@ -34,14 +34,13 @@ const closeoutPolicySchema = z.object({
34
34
  requiredArtifactKinds: stringList.optional(),
35
35
  blockOnOpenQuestions: z.boolean().optional()
36
36
  }).strict();
37
- const providerOverridesSchema = z.object({
38
- requiredCapabilities: stringList.optional(),
39
- disallowedProviderIds: stringList.optional(),
40
- promptRef: nonEmpty.optional(),
41
- instructionTemplateRefs: exactRevisionRefList.optional(),
42
- maxRuntimeSeconds: z.number().int().positive().optional(),
43
- maxTotalTokens: z.number().int().positive().optional(),
44
- maxCostAmount: z.number().nonnegative().optional()
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()
45
44
  }).strict();
46
45
  const branchPolicySchema = z.object({
47
46
  kind: z.enum(["read-only", "main-planning-content", "staging-content", "assignment-feature", "staging-release"]),
@@ -119,10 +118,10 @@ const activityProfileSchema = z.object({
119
118
  contextQueryRefs: exactRevisionRefList.optional(),
120
119
  contextQuerySetRefs: exactRevisionRefList.optional(),
121
120
  instructionTemplateRefs: exactRevisionRefList.optional(),
121
+ capabilityRequirements: z.array(capabilityRequirementSchema).min(1).optional(),
122
122
  permissions: permissionsSchema.optional(),
123
123
  artifactTriggers: z.array(artifactTriggerSchema).optional(),
124
124
  closeoutPolicy: closeoutPolicySchema.optional(),
125
- providerOverrides: providerOverridesSchema.optional(),
126
125
  tools: toolPolicySchema,
127
126
  signals: signalPolicySchema.optional(),
128
127
  outputs: z.object({ messageTypes: stringList, modelMutations: stringList }).strict(),
@@ -130,16 +129,6 @@ const activityProfileSchema = z.object({
130
129
  questionPolicy: z.object({ blockExecutionWhenCreated: z.boolean().optional(), defaultAnswerPolicy: answerPolicySchema.optional() }).strict().optional(),
131
130
  execution: executionSchema.optional()
132
131
  }).strict().superRefine((profile, context) => {
133
- const overrides = profile.providerOverrides;
134
- if (!overrides) return;
135
- for (const key of ["maxRuntimeSeconds", "maxTotalTokens", "maxCostAmount"]) {
136
- if (overrides[key] !== void 0 && (profile.execution?.[key] === void 0 || overrides[key] > profile.execution[key])) {
137
- context.addIssue({ code: z.ZodIssueCode.custom, path: ["providerOverrides", key], message: `${key} must narrow an explicit profile execution limit.` });
138
- }
139
- }
140
- if (overrides.promptRef && !Object.hasOwn(profile.prompt.templates ?? {}, overrides.promptRef)) {
141
- context.addIssue({ code: z.ZodIssueCode.custom, path: ["providerOverrides", "promptRef"], message: "Provider promptRef must select a declared profile prompt template." });
142
- }
143
132
  });
144
133
  const agentDefinitionSchema = z.object({
145
134
  id: nonEmpty,
@@ -166,15 +155,6 @@ const agentDefinitionSchema = z.object({
166
155
  }).passthrough().superRefine((agent, context) => {
167
156
  const raw = agent;
168
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.` });
169
- for (const [profileName, profile] of Object.entries(agent.activityProfiles)) {
170
- const key = (ref) => `${ref.id}@${ref.revision}`;
171
- const allowed = new Set([...agent.instructionTemplateRefs ?? [], ...profile.instructionTemplateRefs ?? []].map(key));
172
- if (profile.providerOverrides?.instructionTemplateRefs?.some((ref) => !allowed.has(key(ref)))) context.addIssue({
173
- code: z.ZodIssueCode.custom,
174
- path: ["activityProfiles", profileName, "providerOverrides", "instructionTemplateRefs"],
175
- message: "Provider instruction templates must narrow common or profile instruction templates."
176
- });
177
- }
178
158
  });
179
159
  function issuePath(path) {
180
160
  return path.reduce((current, segment) => typeof segment === "number" ? `${current}[${segment}]` : current ? `${current}.${segment}` : segment, "");
@@ -74,19 +74,19 @@ export declare const agentTranscriptPayloadSchema: z.ZodObject<{
74
74
  nextCursor: z.ZodNullable<z.ZodString>;
75
75
  }, "strict", z.ZodTypeAny, {
76
76
  limit: number;
77
- hasMore: boolean;
78
77
  nextCursor: string | null;
78
+ hasMore: boolean;
79
79
  }, {
80
80
  limit: number;
81
- hasMore: boolean;
82
81
  nextCursor: string | null;
82
+ hasMore: boolean;
83
83
  }>;
84
84
  }, "strict", z.ZodTypeAny, {
85
85
  entries: Record<string, unknown>[];
86
86
  page: {
87
87
  limit: number;
88
- hasMore: boolean;
89
88
  nextCursor: string | null;
89
+ hasMore: boolean;
90
90
  };
91
91
  executionRunId: string;
92
92
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -94,8 +94,8 @@ export declare const agentTranscriptPayloadSchema: z.ZodObject<{
94
94
  entries: Record<string, unknown>[];
95
95
  page: {
96
96
  limit: number;
97
- hasMore: boolean;
98
97
  nextCursor: string | null;
98
+ hasMore: boolean;
99
99
  };
100
100
  executionRunId: string;
101
101
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -114,19 +114,19 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
114
114
  nextCursor: z.ZodNullable<z.ZodString>;
115
115
  }, "strict", z.ZodTypeAny, {
116
116
  limit: number;
117
- hasMore: boolean;
118
117
  nextCursor: string | null;
118
+ hasMore: boolean;
119
119
  }, {
120
120
  limit: number;
121
- hasMore: boolean;
122
121
  nextCursor: string | null;
122
+ hasMore: boolean;
123
123
  }>;
124
124
  }, "strict", z.ZodTypeAny, {
125
125
  entries: Record<string, unknown>[];
126
126
  page: {
127
127
  limit: number;
128
- hasMore: boolean;
129
128
  nextCursor: string | null;
129
+ hasMore: boolean;
130
130
  };
131
131
  executionRunId: string;
132
132
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -134,8 +134,8 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
134
134
  entries: Record<string, unknown>[];
135
135
  page: {
136
136
  limit: number;
137
- hasMore: boolean;
138
137
  nextCursor: string | null;
138
+ hasMore: boolean;
139
139
  };
140
140
  executionRunId: string;
141
141
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -170,8 +170,8 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
170
170
  entries: Record<string, unknown>[];
171
171
  page: {
172
172
  limit: number;
173
- hasMore: boolean;
174
173
  nextCursor: string | null;
174
+ hasMore: boolean;
175
175
  };
176
176
  executionRunId: string;
177
177
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -190,8 +190,8 @@ export declare const agentForensicPayloadSchema: z.ZodObject<{
190
190
  entries: Record<string, unknown>[];
191
191
  page: {
192
192
  limit: number;
193
- hasMore: boolean;
194
193
  nextCursor: string | null;
194
+ hasMore: boolean;
195
195
  };
196
196
  executionRunId: string;
197
197
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";
@@ -226,8 +226,8 @@ export declare function parseAgentTranscriptPayload(value: unknown): {
226
226
  entries: Record<string, unknown>[];
227
227
  page: {
228
228
  limit: number;
229
- hasMore: boolean;
230
229
  nextCursor: string | null;
230
+ hasMore: boolean;
231
231
  };
232
232
  executionRunId: string;
233
233
  redactionStatus: "sanitized" | "partially-redacted" | "withheld";