@treeseed/sdk 0.13.0-rc.121 → 0.13.0-rc.122
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/.treeseed-build-complete.json +1 -1
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.d.ts +1594 -922
- package/dist/agent-capacity/contracts/capacity/assignments/agent-execution.js +22 -1
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-context-pack.d.ts +40 -40
- package/dist/agent-capacity/contracts/capacity/assignments/assignment-records.d.ts +1 -59
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.d.ts +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/assignment-allocation.js +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.d.ts +18 -20
- package/dist/agent-capacity/contracts/capacity/workdays/workday-allocation.js +1 -1
- package/dist/agent-capacity/contracts/capacity/workdays/workday-records.d.ts +0 -67
- 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 +8 -8
- package/dist/agent-capacity/contracts/projects/agents/project-agent-class.d.ts +0 -23
- 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 +176 -176
- package/dist/agent-capacity/contracts/support/execution-graph.js +1 -1
- package/dist/agent-capacity/contracts/support/financial-records.d.ts +1 -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 +1042 -1042
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +11 -11
- 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 +4 -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 +2 -4
- package/dist/capacity/agents/agent-capacity.js +1 -3
- package/dist/capacity-provider/capability-ontology.d.ts +138 -138
- package/dist/capacity-provider/client.d.ts +1 -2
- package/dist/capacity-provider/client.js +0 -6
- package/dist/capacity-provider/contracts/environment-profiles.d.ts +8 -8
- package/dist/capacity-provider/core-capability-catalog.d.ts +4 -4
- package/dist/capacity-provider/environment-catalog.d.ts +166 -166
- package/dist/capacity-provider/install-configuration.d.ts +2 -2
- package/dist/capacity-provider/sandbox-contracts.d.ts +52 -52
- package/dist/capacity-provider/source-workspace.d.ts +102 -4
- package/dist/capacity-provider/source-workspace.js +5 -1
- package/dist/content/validation/agent-operational-content-schemas.d.ts +108 -108
- package/dist/content/validation/auxiliary-content-schemas.d.ts +108 -108
- package/dist/content/validation/content-model-schemas.d.ts +9473 -6284
- package/dist/content/validation/content-model-schemas.js +116 -48
- package/dist/content/validation/portable-content-data.d.ts +351 -181
- package/dist/content/validation/portable-content-data.js +6 -1
- package/dist/deployment/ai/storage.d.ts +14 -14
- package/dist/deployment/ai-hosting.d.ts +10 -10
- package/dist/deployment/ai-instance.d.ts +14 -14
- package/dist/deployment/ai-mode.d.ts +82 -82
- package/dist/deployment/hosted-topology-template.d.ts +24 -24
- package/dist/deployment/hosted-topology.d.ts +219 -219
- package/dist/deployment/postgres/contracts.d.ts +52 -52
- package/dist/deployment/postgres/transfer.d.ts +4 -4
- package/dist/deployment/schemas.d.ts +780 -780
- package/dist/development/schemas.d.ts +439 -439
- 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 +3 -1
- package/dist/operator-contracts/catalog/agents/agent-team-clone-operations.d.ts +2 -2
- package/dist/operator-contracts/catalog/capability-ontology-operations.d.ts +17 -17
- package/dist/operator-contracts/catalog/commands/command-tree-builders.d.ts +4 -4
- package/dist/operator-contracts/catalog/communication-operations.d.ts +100 -100
- package/dist/operator-contracts/catalog/hosted-topology-operations.d.ts +40 -40
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +54 -54
- package/dist/operator-contracts/catalog/infrastructure/ai-instance-operations.d.ts +5 -5
- package/dist/operator-contracts/catalog/knowledge-share-operations.d.ts +10 -10
- package/dist/operator-contracts/catalog/services/secret-operations.d.ts +8 -8
- package/dist/operator-contracts/communication/contracts.d.ts +273 -273
- package/dist/operator-contracts/control-plane-operations.d.ts +236 -242
- package/dist/operator-contracts/control-plane-operations.js +0 -2
- package/dist/operator-contracts/inbox/contracts.d.ts +204 -204
- package/dist/operator-contracts/knowledge/contracts.d.ts +16 -16
- package/dist/platform/agent-schema-verification.d.ts +3 -0
- package/dist/platform/agent-schema-verification.js +94 -0
- package/dist/platform/verification.js +6 -0
- package/dist/sdk-types/support/planning-policy.d.ts +1 -1
- package/dist/secrets-capability/shared-access.d.ts +2 -2
- package/dist/secrets-capability/shared-resources.d.ts +46 -46
- package/dist/secrets-capability/vault-contracts.d.ts +2 -2
- package/dist/security/encrypted-envelope.d.ts +8 -8
- package/package.json +3 -2
- 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
|
@@ -13,10 +13,38 @@ import { agentTestContentSchema, templateProductContentSchema, workdayContentSch
|
|
|
13
13
|
export * from "./agent-operational-content-schemas.js";
|
|
14
14
|
const nonEmpty = z.string().trim().min(1);
|
|
15
15
|
const strings = z.array(z.string());
|
|
16
|
+
const identifier = z.string().trim().min(1).max(200).regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]*$/u);
|
|
17
|
+
const slug = z.string().trim().min(1).max(100).regex(/^[a-z0-9]+(?:[._/-][a-z0-9]+)*$/u);
|
|
18
|
+
const agentClass = z.string().trim().min(1).max(100).regex(/^[a-z][a-z0-9-]*$/u);
|
|
19
|
+
const identifiers = z.array(identifier);
|
|
20
|
+
const unique = (schema) => schema.superRefine((values, context) => {
|
|
21
|
+
if (new Set(values.map((value) => JSON.stringify(value))).size !== values.length) {
|
|
22
|
+
context.addIssue({ code: z.ZodIssueCode.custom, message: "Values must be unique." });
|
|
23
|
+
}
|
|
24
|
+
});
|
|
16
25
|
const date = z.coerce.date();
|
|
17
26
|
const lifecycleStatus = z.enum(["live", "in progress", "exploratory", "planned", "speculative"]);
|
|
18
|
-
const contributor = nonEmpty;
|
|
19
27
|
const exactRefs = z.array(exactEntityReferenceSchema);
|
|
28
|
+
const exactDependencyLinkSchema = z.object({
|
|
29
|
+
relation: z.literal("depends_on"),
|
|
30
|
+
from: exactEntityReferenceSchema,
|
|
31
|
+
to: exactEntityReferenceSchema
|
|
32
|
+
}).strict().superRefine((link, context) => {
|
|
33
|
+
for (const end of ["from", "to"]) {
|
|
34
|
+
const ref = link[end];
|
|
35
|
+
if (ref.store !== "treedx" || ref.model !== "proposal" || !ref.repository || !ref.commit || !ref.path || !ref.digest || !ref.revision || !/^work-item\/[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(ref.anchor ?? "")) {
|
|
36
|
+
context.addIssue({
|
|
37
|
+
code: z.ZodIssueCode.custom,
|
|
38
|
+
path: [end],
|
|
39
|
+
message: "A dependency endpoint must identify an exact proposal work item."
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (JSON.stringify(link.from) === JSON.stringify(link.to)) context.addIssue({
|
|
44
|
+
code: z.ZodIssueCode.custom,
|
|
45
|
+
message: "A work item cannot depend on itself."
|
|
46
|
+
});
|
|
47
|
+
});
|
|
20
48
|
const linked = {
|
|
21
49
|
group_ids: strings.optional(),
|
|
22
50
|
related_objectives: strings.optional(),
|
|
@@ -108,8 +136,8 @@ const proposalSchema = z.object({
|
|
|
108
136
|
request: nonEmpty,
|
|
109
137
|
summary: nonEmpty.optional(),
|
|
110
138
|
status: z.enum(["draft", "discussing", "ready", "decided", "withdrawn"]),
|
|
111
|
-
objectiveRefs:
|
|
112
|
-
evidenceRefs:
|
|
139
|
+
objectiveRefs: unique(exactRefs).optional(),
|
|
140
|
+
evidenceRefs: unique(exactRefs).optional(),
|
|
113
141
|
discussionRef: exactEntityReferenceSchema.optional(),
|
|
114
142
|
executionPlan: executionPlanSchema.optional()
|
|
115
143
|
}).strict().superRefine((value, context) => {
|
|
@@ -151,7 +179,8 @@ const schemas = {
|
|
|
151
179
|
classification: z.enum(["general", "feedback", "research", "workday-report"]),
|
|
152
180
|
subjectRefs: exactRefs.min(1),
|
|
153
181
|
body: nonEmpty,
|
|
154
|
-
createdAt: z.string().datetime({ offset: true })
|
|
182
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
183
|
+
links: z.array(exactDependencyLinkSchema).optional()
|
|
155
184
|
}).strict().superRefine((value, context) => {
|
|
156
185
|
if (value.classification === "workday-report" && !value.subjectRefs.some((reference) => reference.store === "postgresql" && reference.model === "workday")) {
|
|
157
186
|
context.addIssue({ code: z.ZodIssueCode.custom, path: ["subjectRefs"], message: "Workday reports must reference their exact workday." });
|
|
@@ -173,12 +202,14 @@ const schemas = {
|
|
|
173
202
|
if (value.status === "answered" && !(value.answer || value.answerRefs?.length)) context.addIssue({ code: z.ZodIssueCode.custom, message: "Answered questions require an answer or exact answer reference." });
|
|
174
203
|
}),
|
|
175
204
|
objective: z.object({
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
205
|
+
schemaVersion: z.literal("treeseed.objective/v1"),
|
|
206
|
+
id: identifier,
|
|
207
|
+
projectId: identifier,
|
|
208
|
+
title: nonEmpty,
|
|
209
|
+
outcome: nonEmpty,
|
|
210
|
+
status: z.enum(["active", "achieved", "abandoned"]),
|
|
211
|
+
evidenceRefs: unique(exactRefs).optional()
|
|
212
|
+
}).strict(),
|
|
182
213
|
proposal: proposalSchema,
|
|
183
214
|
decision: z.object({
|
|
184
215
|
schemaVersion: z.literal("treeseed.decision/v1"),
|
|
@@ -201,31 +232,56 @@ const schemas = {
|
|
|
201
232
|
}),
|
|
202
233
|
book: z.object({
|
|
203
234
|
schemaVersion: z.literal(BOOK_SCHEMA_VERSION),
|
|
204
|
-
id:
|
|
235
|
+
id: identifier,
|
|
236
|
+
projectId: identifier,
|
|
237
|
+
revision: z.number().int().positive(),
|
|
205
238
|
order: z.number().int().nonnegative(),
|
|
206
|
-
slug
|
|
239
|
+
slug,
|
|
207
240
|
title: nonEmpty,
|
|
208
241
|
description: nonEmpty.optional(),
|
|
209
242
|
summary: nonEmpty,
|
|
210
243
|
status: z.enum(KNOWLEDGE_STATUSES),
|
|
211
244
|
visibility: z.enum(KNOWLEDGE_VISIBILITIES),
|
|
212
|
-
groupIds:
|
|
213
|
-
audience:
|
|
214
|
-
relatedBookIds:
|
|
215
|
-
|
|
245
|
+
groupIds: identifiers.optional(),
|
|
246
|
+
audience: z.array(nonEmpty).optional(),
|
|
247
|
+
relatedBookIds: identifiers.optional(),
|
|
248
|
+
packPolicy: z.enum(["allowed", "restricted", "disabled"]).optional(),
|
|
249
|
+
editorialCoreNoteId: identifier.optional(),
|
|
250
|
+
cover: z.object({ image: nonEmpty.optional(), alt: nonEmpty.optional() }).strict().optional()
|
|
251
|
+
}).strict(),
|
|
216
252
|
knowledge: z.object({
|
|
217
253
|
schemaVersion: z.literal(KNOWLEDGE_PAGE_SCHEMA_VERSION),
|
|
218
|
-
id:
|
|
219
|
-
|
|
220
|
-
|
|
254
|
+
id: identifier,
|
|
255
|
+
projectId: identifier,
|
|
256
|
+
bookRef: exactEntityReferenceSchema.refine((ref) => ref.store === "treedx" && ref.model === "book" && Boolean(ref.revision && ref.digest && ref.path), "Knowledge requires an exact Book path, revision, and digest."),
|
|
257
|
+
slug,
|
|
258
|
+
body: nonEmpty,
|
|
221
259
|
title: nonEmpty,
|
|
222
260
|
description: nonEmpty.optional(),
|
|
223
|
-
summary: nonEmpty,
|
|
261
|
+
summary: nonEmpty.optional(),
|
|
224
262
|
status: z.enum(KNOWLEDGE_STATUSES),
|
|
225
263
|
visibility: z.enum(KNOWLEDGE_VISIBILITIES),
|
|
226
264
|
order: z.number().int().nonnegative().optional(),
|
|
227
|
-
groupIds:
|
|
228
|
-
|
|
265
|
+
groupIds: identifiers.optional(),
|
|
266
|
+
parentId: identifier.optional(),
|
|
267
|
+
contributors: identifiers.optional(),
|
|
268
|
+
relatedBookIds: identifiers.optional(),
|
|
269
|
+
relatedKnowledgeIds: identifiers.optional(),
|
|
270
|
+
relatedNoteIds: identifiers.optional(),
|
|
271
|
+
relatedQuestionIds: identifiers.optional(),
|
|
272
|
+
relatedObjectiveIds: identifiers.optional(),
|
|
273
|
+
relatedProposalIds: identifiers.optional(),
|
|
274
|
+
relatedDecisionIds: identifiers.optional(),
|
|
275
|
+
guaranteeIds: identifiers.optional(),
|
|
276
|
+
audiences: z.object({ primary: z.array(nonEmpty).optional(), secondary: z.array(nonEmpty).optional(), excluded: z.array(nonEmpty).optional() }).strict().optional(),
|
|
277
|
+
relatedRefs: unique(exactRefs).optional(),
|
|
278
|
+
capabilityIds: identifiers.optional(),
|
|
279
|
+
routePatterns: z.array(nonEmpty).optional(),
|
|
280
|
+
resourceTypes: identifiers.optional(),
|
|
281
|
+
actionIds: identifiers.optional(),
|
|
282
|
+
keywords: z.array(nonEmpty).optional(),
|
|
283
|
+
documentationUrls: z.array(nonEmpty).optional()
|
|
284
|
+
}).strict(),
|
|
229
285
|
person: z.object({
|
|
230
286
|
name: nonEmpty,
|
|
231
287
|
description: nonEmpty.optional(),
|
|
@@ -239,36 +295,47 @@ const schemas = {
|
|
|
239
295
|
}),
|
|
240
296
|
agent: agentDefinitionSchema,
|
|
241
297
|
discussion: z.object({
|
|
298
|
+
schemaVersion: z.literal("treeseed.discussion/v1"),
|
|
299
|
+
id: identifier,
|
|
300
|
+
projectId: identifier,
|
|
301
|
+
subjectRef: exactEntityReferenceSchema,
|
|
302
|
+
status: z.enum(["open", "resolved", "closed"]),
|
|
303
|
+
participantClasses: unique(z.array(agentClass)),
|
|
242
304
|
title: nonEmpty,
|
|
305
|
+
teamId: identifier,
|
|
306
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
243
307
|
topic: nonEmpty.optional(),
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
legacy_status: z.enum(["open", "resolved"]).optional(),
|
|
252
|
-
created_at: date.optional(),
|
|
253
|
-
updated_at: date.optional()
|
|
254
|
-
}),
|
|
308
|
+
visibility: z.enum(KNOWLEDGE_VISIBILITIES).optional(),
|
|
309
|
+
participantIds: identifiers.optional(),
|
|
310
|
+
agentIds: identifiers.optional(),
|
|
311
|
+
groupIds: identifiers.optional(),
|
|
312
|
+
parentWorkdayId: identifier.optional(),
|
|
313
|
+
updatedAt: z.string().datetime({ offset: true }).optional()
|
|
314
|
+
}).strict(),
|
|
255
315
|
discussion_message: z.object({
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
316
|
+
schemaVersion: z.literal("treeseed.discussion-message/v1"),
|
|
317
|
+
id: identifier,
|
|
318
|
+
discussionRef: exactEntityReferenceSchema,
|
|
319
|
+
authorRef: exactEntityReferenceSchema,
|
|
320
|
+
body: nonEmpty,
|
|
321
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
322
|
+
replyToRef: exactEntityReferenceSchema.optional(),
|
|
323
|
+
title: nonEmpty.optional(),
|
|
324
|
+
discussionId: identifier.optional(),
|
|
325
|
+
authorId: identifier.optional(),
|
|
326
|
+
authorType: z.enum(["user", "agent", "system"]).optional(),
|
|
260
327
|
intent: z.enum(["discuss", "propose"]).optional(),
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
}),
|
|
328
|
+
mentionedAgents: identifiers.optional(),
|
|
329
|
+
recipientIds: identifiers.optional(),
|
|
330
|
+
fileRefs: z.array(z.record(z.unknown())).optional(),
|
|
331
|
+
contextRefs: z.array(z.record(z.unknown())).optional(),
|
|
332
|
+
inboxIntent: z.enum(["comment", "answer", "reply"]).optional(),
|
|
333
|
+
sourceMessageRefs: unique(exactRefs).optional(),
|
|
334
|
+
authorAgentId: identifier.optional(),
|
|
335
|
+
handoffId: identifier.optional(),
|
|
336
|
+
parentWorkdayId: identifier.optional(),
|
|
337
|
+
resultingOperationId: identifier.optional()
|
|
338
|
+
}).strict(),
|
|
272
339
|
discussion_event: z.object({
|
|
273
340
|
title: nonEmpty,
|
|
274
341
|
discussion_id: nonEmpty.optional(),
|
|
@@ -393,6 +460,7 @@ export {
|
|
|
393
460
|
describeContentFrontmatterContract,
|
|
394
461
|
describeContentFrontmatterJsonSchema,
|
|
395
462
|
describeContentFrontmatterSchema,
|
|
463
|
+
exactDependencyLinkSchema,
|
|
396
464
|
isPortableContentModel,
|
|
397
465
|
templateProductContentSchema,
|
|
398
466
|
validateContentFrontmatter,
|