@treeseed/sdk 0.13.0-rc.53 → 0.13.0-rc.55
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/README.md +4 -0
- package/dist/agent-capacity/authority/agent-authority-presets.js +2 -1
- package/dist/agent-capacity/contracts/configuration/configuration.js +1 -1
- package/dist/agent-capacity/validation/agent-definition-schema.d.ts +240 -240
- package/dist/agent-capacity/validation/agent-lab-forensics-schema.d.ts +1 -1
- package/dist/capacity-provider/client.d.ts +18 -3
- package/dist/capacity-provider/client.js +6 -0
- package/dist/capacity-provider/contracts/governance.d.ts +28 -1
- package/dist/capacity-provider/index.d.ts +1 -0
- package/dist/capacity-provider/index.js +1 -0
- package/dist/capacity-provider/sandbox-contracts.d.ts +422 -0
- package/dist/capacity-provider/sandbox-contracts.js +71 -0
- package/dist/capacity-provider/validation.d.ts +2 -1
- package/dist/capacity-provider/validation.js +23 -0
- package/dist/content/validation/agent-operational-content-schemas.d.ts +76 -76
- package/dist/content/validation/auxiliary-content-schemas.d.ts +20 -20
- package/dist/content/validation/content-model-schemas.d.ts +570 -570
- package/dist/content/validation/portable-content-data.d.ts +61 -61
- package/dist/deployment/ai-mode.d.ts +4 -4
- package/dist/deployment/schemas.d.ts +418 -100
- package/dist/deployment/schemas.js +23 -1
- package/dist/development/schemas.d.ts +22 -22
- package/dist/operator-contracts/canonical-command-tree.js +63 -3
- package/dist/operator-contracts/catalog/communication-operations.d.ts +300 -33
- package/dist/operator-contracts/catalog/communication-operations.js +56 -2
- package/dist/operator-contracts/catalog/inbox-operations.d.ts +261 -0
- package/dist/operator-contracts/catalog/inbox-operations.js +36 -0
- package/dist/operator-contracts/communication/contracts.d.ts +1261 -71
- package/dist/operator-contracts/communication/contracts.js +99 -7
- package/dist/operator-contracts/control-plane-operations.d.ts +592 -66
- package/dist/operator-contracts/control-plane-operations.js +4 -1
- package/dist/operator-contracts/inbox/contracts.d.ts +1099 -0
- package/dist/operator-contracts/inbox/contracts.js +134 -0
- package/dist/operator-contracts/index.d.ts +1 -0
- package/dist/operator-contracts/index.js +1 -0
- package/dist/operator-contracts/mcp.js +1 -1
- package/dist/security/encrypted-envelope.d.ts +177 -0
- package/dist/security/encrypted-envelope.js +34 -0
- package/dist/security/envelope-codec.d.ts +38 -0
- package/dist/security/envelope-codec.js +96 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.js +2 -0
- package/package.json +5 -1
|
@@ -5,10 +5,46 @@ const communicationRecipientSchema = z.object({
|
|
|
5
5
|
}).strict();
|
|
6
6
|
const communicationSendRequestSchema = z.object({
|
|
7
7
|
message: z.string().trim().min(1).max(1e5),
|
|
8
|
-
projectId: z.string().min(1),
|
|
9
8
|
recipients: z.array(z.string().trim().min(1)).max(100).optional(),
|
|
10
9
|
timeoutSeconds: z.number().int().min(1).max(3600).optional()
|
|
11
10
|
}).strict();
|
|
11
|
+
const communicationTopicEventTypeSchema = z.enum([
|
|
12
|
+
"message.posted",
|
|
13
|
+
"mention.acknowledged",
|
|
14
|
+
"response_lease.accepted",
|
|
15
|
+
"agent.progress",
|
|
16
|
+
"agent.response",
|
|
17
|
+
"agent.abstained",
|
|
18
|
+
"agent.failed"
|
|
19
|
+
]);
|
|
20
|
+
const communicationTopicEventSchema = z.object({
|
|
21
|
+
id: z.string().min(1),
|
|
22
|
+
sequence: z.number().int().positive(),
|
|
23
|
+
teamId: z.string().min(1),
|
|
24
|
+
topicId: z.string().min(1),
|
|
25
|
+
channel: z.string().min(1),
|
|
26
|
+
type: communicationTopicEventTypeSchema,
|
|
27
|
+
occurredAt: z.string().datetime(),
|
|
28
|
+
sendId: z.string().min(1).nullable(),
|
|
29
|
+
invocationId: z.string().min(1).nullable(),
|
|
30
|
+
assignmentId: z.string().min(1).nullable(),
|
|
31
|
+
actor: z.object({ kind: z.enum(["user", "agent", "provider", "control-plane"]), id: z.string().min(1), handle: z.string().min(1).nullable() }).strict(),
|
|
32
|
+
summary: z.string().min(1),
|
|
33
|
+
payload: z.record(z.unknown())
|
|
34
|
+
}).strict();
|
|
35
|
+
const communicationDiagnosticSchema = z.object({
|
|
36
|
+
availability: z.enum(["available", "partial", "unavailable"]),
|
|
37
|
+
reason: z.string().min(1).nullable(),
|
|
38
|
+
provider: z.object({ providerId: z.string().min(1).nullable(), executionProviderId: z.string().min(1).nullable(), runtimeVersion: z.string().min(1).nullable() }).strict(),
|
|
39
|
+
selection: z.object({ model: z.string().min(1).nullable(), capabilities: z.array(z.string()), parameters: z.record(z.unknown()) }).strict(),
|
|
40
|
+
identityManifest: z.record(z.unknown()),
|
|
41
|
+
contextManifest: z.array(z.record(z.unknown())),
|
|
42
|
+
usage: z.array(z.record(z.unknown())),
|
|
43
|
+
timing: z.record(z.unknown()),
|
|
44
|
+
resources: z.record(z.unknown()),
|
|
45
|
+
traceEvents: z.array(z.record(z.unknown())),
|
|
46
|
+
fullPayload: z.record(z.unknown()).optional()
|
|
47
|
+
}).strict();
|
|
12
48
|
const communicationTargetSchema = communicationRecipientSchema.extend({
|
|
13
49
|
projectSlug: z.string().min(1),
|
|
14
50
|
definitionRevision: z.string().min(1),
|
|
@@ -39,9 +75,13 @@ const communicationTargetSchema = communicationRecipientSchema.extend({
|
|
|
39
75
|
completedAt: z.string().datetime().nullable(),
|
|
40
76
|
returnedAt: z.string().datetime().nullable(),
|
|
41
77
|
failedAt: z.string().datetime().nullable()
|
|
42
|
-
}).strict()
|
|
78
|
+
}).strict(),
|
|
79
|
+
acknowledgedAt: z.string().datetime().nullable(),
|
|
80
|
+
leaseAcceptedAt: z.string().datetime().nullable(),
|
|
81
|
+
diagnostics: communicationDiagnosticSchema
|
|
43
82
|
});
|
|
44
83
|
const communicationResponseSchema = communicationRecipientSchema.extend({
|
|
84
|
+
projectSlug: z.string().min(1),
|
|
45
85
|
invocationId: z.string().min(1),
|
|
46
86
|
assignmentId: z.string().min(1).nullable(),
|
|
47
87
|
messageRef: z.string().min(1),
|
|
@@ -51,22 +91,63 @@ const communicationResponseSchema = communicationRecipientSchema.extend({
|
|
|
51
91
|
createdAt: z.string().datetime()
|
|
52
92
|
});
|
|
53
93
|
const communicationSendReceiptSchema = z.object({
|
|
54
|
-
schemaVersion: z.literal("treeseed.communication-send-receipt/
|
|
94
|
+
schemaVersion: z.literal("treeseed.communication-send-receipt/v4"),
|
|
55
95
|
sendId: z.string().min(1),
|
|
56
96
|
teamId: z.string().min(1),
|
|
57
97
|
channel: z.string().min(1),
|
|
58
98
|
topic: z.object({ id: z.string().min(1), slug: z.string().min(1) }).strict(),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
99
|
+
projectStreams: z.array(z.object({
|
|
100
|
+
id: z.string().min(1),
|
|
101
|
+
projectId: z.string().min(1),
|
|
102
|
+
projectSlug: z.string().min(1),
|
|
103
|
+
discussionId: z.string().min(1),
|
|
104
|
+
messageRef: z.string().min(1)
|
|
105
|
+
}).strict()).min(1),
|
|
63
106
|
status: z.enum(["queued", "running", "complete", "partial", "failed"]),
|
|
64
107
|
targets: z.array(communicationTargetSchema),
|
|
65
108
|
responses: z.array(communicationResponseSchema),
|
|
109
|
+
events: z.array(communicationTopicEventSchema),
|
|
66
110
|
createdAt: z.string().datetime(),
|
|
67
111
|
updatedAt: z.string().datetime(),
|
|
68
112
|
replayed: z.boolean()
|
|
69
113
|
}).strict();
|
|
114
|
+
const communicationTopicListenerSchema = communicationRecipientSchema.extend({
|
|
115
|
+
projectSlug: z.string().min(1),
|
|
116
|
+
agentHandle: z.string().min(1),
|
|
117
|
+
status: z.enum(["active", "removed"]),
|
|
118
|
+
subscribedAt: z.string().datetime(),
|
|
119
|
+
updatedAt: z.string().datetime(),
|
|
120
|
+
source: z.enum(["mention", "operator", "seed"])
|
|
121
|
+
}).strict();
|
|
122
|
+
const communicationTopicSchema = z.object({
|
|
123
|
+
id: z.string().min(1),
|
|
124
|
+
teamId: z.string().min(1),
|
|
125
|
+
slug: z.string().min(1),
|
|
126
|
+
status: z.enum(["active", "archived"]),
|
|
127
|
+
createdAt: z.string().datetime(),
|
|
128
|
+
updatedAt: z.string().datetime(),
|
|
129
|
+
streams: z.array(z.object({ id: z.string().min(1), projectId: z.string().min(1), projectSlug: z.string().min(1), discussionId: z.string().min(1) }).strict()),
|
|
130
|
+
listeners: z.array(communicationTopicListenerSchema)
|
|
131
|
+
}).strict();
|
|
132
|
+
const communicationTopicPageSchema = z.object({ items: z.array(communicationTopicSchema), cursor: z.string().nullable() }).strict();
|
|
133
|
+
const communicationTopicTimelineSchema = z.object({ topic: communicationTopicSchema, events: z.array(communicationTopicEventSchema), cursor: z.string().nullable() }).strict();
|
|
134
|
+
const communicationTopicSubscriptionRequestSchema = z.object({ agent: z.string().trim().min(2).max(180) }).strict();
|
|
135
|
+
const communicationTopicSubscriptionReceiptSchema = z.object({ topicId: z.string().min(1), listener: communicationTopicListenerSchema, replayed: z.boolean() }).strict();
|
|
136
|
+
const providerCommunicationNotificationAcknowledgeRequestSchema = z.object({
|
|
137
|
+
providerId: z.string().min(1),
|
|
138
|
+
runnerId: z.string().min(1),
|
|
139
|
+
observedAt: z.string().datetime()
|
|
140
|
+
}).strict();
|
|
141
|
+
const providerCommunicationTraceEventRequestSchema = z.object({
|
|
142
|
+
leaseToken: z.string().min(1),
|
|
143
|
+
runnerId: z.string().min(1),
|
|
144
|
+
sequence: z.number().int().nonnegative(),
|
|
145
|
+
type: z.string().min(1),
|
|
146
|
+
occurredAt: z.string().datetime(),
|
|
147
|
+
summary: z.string().min(1),
|
|
148
|
+
payload: z.record(z.unknown()),
|
|
149
|
+
protectedPayload: z.record(z.unknown()).optional()
|
|
150
|
+
}).strict();
|
|
70
151
|
const providerDiscussionResponseRequestSchema = z.object({
|
|
71
152
|
leaseToken: z.string().min(1),
|
|
72
153
|
runnerId: z.string().min(1),
|
|
@@ -86,11 +167,22 @@ const providerDiscussionResponseReceiptSchema = z.object({
|
|
|
86
167
|
settledAt: z.string().datetime()
|
|
87
168
|
}).strict();
|
|
88
169
|
export {
|
|
170
|
+
communicationDiagnosticSchema,
|
|
89
171
|
communicationRecipientSchema,
|
|
90
172
|
communicationResponseSchema,
|
|
91
173
|
communicationSendReceiptSchema,
|
|
92
174
|
communicationSendRequestSchema,
|
|
93
175
|
communicationTargetSchema,
|
|
176
|
+
communicationTopicEventSchema,
|
|
177
|
+
communicationTopicEventTypeSchema,
|
|
178
|
+
communicationTopicListenerSchema,
|
|
179
|
+
communicationTopicPageSchema,
|
|
180
|
+
communicationTopicSchema,
|
|
181
|
+
communicationTopicSubscriptionReceiptSchema,
|
|
182
|
+
communicationTopicSubscriptionRequestSchema,
|
|
183
|
+
communicationTopicTimelineSchema,
|
|
184
|
+
providerCommunicationNotificationAcknowledgeRequestSchema,
|
|
185
|
+
providerCommunicationTraceEventRequestSchema,
|
|
94
186
|
providerDiscussionResponseReceiptSchema,
|
|
95
187
|
providerDiscussionResponseRequestSchema
|
|
96
188
|
};
|