@finalai/agent-protocol 0.1.0
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.
Potentially problematic release.
This version of @finalai/agent-protocol might be problematic. Click here for more details.
- package/README.md +10 -0
- package/dist/modules/agent-platform/agents.d.mts +162 -0
- package/dist/modules/agent-platform/agents.mjs +91 -0
- package/dist/modules/agent-platform/agents.mjs.map +7 -0
- package/dist/modules/agent-platform/build.d.mts +678 -0
- package/dist/modules/agent-platform/build.mjs +348 -0
- package/dist/modules/agent-platform/build.mjs.map +7 -0
- package/dist/modules/agent-platform/common.d.mts +221 -0
- package/dist/modules/agent-platform/common.mjs +157 -0
- package/dist/modules/agent-platform/common.mjs.map +7 -0
- package/dist/modules/agent-platform/conversation-schedules.d.mts +98 -0
- package/dist/modules/agent-platform/conversation-schedules.mjs +70 -0
- package/dist/modules/agent-platform/conversation-schedules.mjs.map +7 -0
- package/dist/modules/agent-platform/conversations.d.mts +1024 -0
- package/dist/modules/agent-platform/conversations.mjs +378 -0
- package/dist/modules/agent-platform/conversations.mjs.map +7 -0
- package/dist/modules/agent-platform/enums.d.mts +231 -0
- package/dist/modules/agent-platform/enums.mjs +306 -0
- package/dist/modules/agent-platform/enums.mjs.map +7 -0
- package/dist/modules/agent-platform/index.d.mts +13 -0
- package/dist/modules/agent-platform/index.mjs +16 -0
- package/dist/modules/agent-platform/index.mjs.map +7 -0
- package/dist/modules/agent-platform/links.d.mts +77 -0
- package/dist/modules/agent-platform/links.mjs +34 -0
- package/dist/modules/agent-platform/links.mjs.map +7 -0
- package/dist/modules/agent-platform/people.d.mts +21 -0
- package/dist/modules/agent-platform/people.mjs +22 -0
- package/dist/modules/agent-platform/people.mjs.map +7 -0
- package/dist/modules/agent-platform/realtime.d.mts +713 -0
- package/dist/modules/agent-platform/realtime.mjs +185 -0
- package/dist/modules/agent-platform/realtime.mjs.map +7 -0
- package/dist/modules/agent-platform/sandboxes.d.mts +203 -0
- package/dist/modules/agent-platform/sandboxes.mjs +186 -0
- package/dist/modules/agent-platform/sandboxes.mjs.map +7 -0
- package/dist/modules/agent-platform/sessions.d.mts +494 -0
- package/dist/modules/agent-platform/sessions.mjs +242 -0
- package/dist/modules/agent-platform/sessions.mjs.map +7 -0
- package/dist/modules/base58.d.mts +2 -0
- package/dist/modules/base58.mjs +46 -0
- package/dist/modules/base58.mjs.map +7 -0
- package/dist/modules/index.d.mts +4 -0
- package/dist/modules/index.mjs +5 -0
- package/dist/modules/index.mjs.map +7 -0
- package/dist/modules/json-rpc.d.mts +15 -0
- package/dist/modules/json-rpc.mjs +20 -0
- package/dist/modules/json-rpc.mjs.map +7 -0
- package/dist/modules/json.d.mts +7 -0
- package/dist/modules/json.mjs +11 -0
- package/dist/modules/json.mjs.map +7 -0
- package/dist/modules/process-inspection.d.mts +177 -0
- package/dist/modules/process-inspection.mjs +83 -0
- package/dist/modules/process-inspection.mjs.map +7 -0
- package/dist/modules/tolerance.d.mts +18 -0
- package/dist/modules/tolerance.mjs +15 -0
- package/dist/modules/tolerance.mjs.map +7 -0
- package/package.json +121 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { jsonObjectSchema, jsonValueSchema } from "../json.mjs";
|
|
3
|
+
import { tolerantStringEnum } from "../tolerance.mjs";
|
|
4
|
+
import { nullableNumber, nullableString, providerRefSchema } from "./common.mjs";
|
|
5
|
+
import {
|
|
6
|
+
CommitFileEncoding,
|
|
7
|
+
CompatibilityCategory,
|
|
8
|
+
CompatibilityResult,
|
|
9
|
+
CompatibilitySummary,
|
|
10
|
+
DefinitionRepositoryKind,
|
|
11
|
+
DefinitionStarterTemplate,
|
|
12
|
+
DiagnosticSeverity,
|
|
13
|
+
ManifestChangeKind,
|
|
14
|
+
ProviderKind,
|
|
15
|
+
ScheduleTarget,
|
|
16
|
+
SetupGuideBuildState
|
|
17
|
+
} from "./enums.mjs";
|
|
18
|
+
const definitionRepositorySchema = z.object({
|
|
19
|
+
kind: tolerantStringEnum(DefinitionRepositoryKind),
|
|
20
|
+
ref: z.string(),
|
|
21
|
+
path: z.string().default(""),
|
|
22
|
+
defaultBranch: z.string().default("main")
|
|
23
|
+
});
|
|
24
|
+
const revisionSchema = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
definitionId: z.string(),
|
|
27
|
+
number: z.number(),
|
|
28
|
+
commitSha: nullableString(),
|
|
29
|
+
bundleHash: nullableString(),
|
|
30
|
+
createdByUserId: nullableString(),
|
|
31
|
+
note: nullableString(),
|
|
32
|
+
/** The compiled manifest; omitted from lists. */
|
|
33
|
+
manifest: jsonValueSchema.nullable().default(null),
|
|
34
|
+
createdAt: z.string()
|
|
35
|
+
});
|
|
36
|
+
const definitionSchema = z.object({
|
|
37
|
+
id: z.string(),
|
|
38
|
+
organizationId: z.string(),
|
|
39
|
+
slug: z.string(),
|
|
40
|
+
name: nullableString(),
|
|
41
|
+
ownerUserId: nullableString(),
|
|
42
|
+
repository: definitionRepositorySchema.nullable().default(null),
|
|
43
|
+
currentRevisionId: nullableString(),
|
|
44
|
+
currentRevision: revisionSchema.nullable().default(null),
|
|
45
|
+
archivedAt: nullableString(),
|
|
46
|
+
createdAt: z.string(),
|
|
47
|
+
updatedAt: nullableString()
|
|
48
|
+
});
|
|
49
|
+
const definitionListSchema = z.object({
|
|
50
|
+
definitions: z.array(definitionSchema),
|
|
51
|
+
nextCursor: nullableString()
|
|
52
|
+
});
|
|
53
|
+
const revisionListSchema = z.object({
|
|
54
|
+
revisions: z.array(revisionSchema),
|
|
55
|
+
nextCursor: nullableString()
|
|
56
|
+
});
|
|
57
|
+
const manifestChangeSchema = z.object({
|
|
58
|
+
path: z.string(),
|
|
59
|
+
kind: tolerantStringEnum(ManifestChangeKind),
|
|
60
|
+
before: jsonValueSchema.nullable().default(null),
|
|
61
|
+
after: jsonValueSchema.nullable().default(null)
|
|
62
|
+
});
|
|
63
|
+
const revisionDiffSchema = z.object({
|
|
64
|
+
from: revisionSchema,
|
|
65
|
+
to: revisionSchema,
|
|
66
|
+
changes: z.array(manifestChangeSchema).default([])
|
|
67
|
+
});
|
|
68
|
+
const definitionFileSchema = z.object({
|
|
69
|
+
/** Directory-relative path. */
|
|
70
|
+
path: z.string(),
|
|
71
|
+
content: z.string()
|
|
72
|
+
});
|
|
73
|
+
const definitionFilesSchema = z.object({
|
|
74
|
+
ref: z.string(),
|
|
75
|
+
commitSha: nullableString(),
|
|
76
|
+
files: z.array(definitionFileSchema).default([])
|
|
77
|
+
});
|
|
78
|
+
const diagnosticSchema = z.object({
|
|
79
|
+
severity: tolerantStringEnum(DiagnosticSeverity),
|
|
80
|
+
message: z.string(),
|
|
81
|
+
code: nullableString(),
|
|
82
|
+
file: nullableString(),
|
|
83
|
+
line: nullableNumber(),
|
|
84
|
+
column: nullableNumber()
|
|
85
|
+
});
|
|
86
|
+
const compatibilityRowSchema = z.object({
|
|
87
|
+
item: z.string(),
|
|
88
|
+
category: tolerantStringEnum(CompatibilityCategory),
|
|
89
|
+
result: tolerantStringEnum(CompatibilityResult),
|
|
90
|
+
detail: nullableString(),
|
|
91
|
+
/** Config path or file the row is about. */
|
|
92
|
+
path: nullableString()
|
|
93
|
+
});
|
|
94
|
+
const compatibilityReportSchema = z.object({
|
|
95
|
+
harness: providerRefSchema,
|
|
96
|
+
revisionId: nullableString(),
|
|
97
|
+
summary: tolerantStringEnum(CompatibilitySummary),
|
|
98
|
+
rows: z.array(compatibilityRowSchema).default([])
|
|
99
|
+
});
|
|
100
|
+
const compileResultSchema = z.object({
|
|
101
|
+
ok: z.boolean(),
|
|
102
|
+
ref: z.string(),
|
|
103
|
+
commitSha: nullableString(),
|
|
104
|
+
manifest: jsonValueSchema.nullable().default(null),
|
|
105
|
+
bundleHash: nullableString(),
|
|
106
|
+
diagnostics: z.array(diagnosticSchema).default([]),
|
|
107
|
+
compatibility: compatibilityReportSchema.nullable().default(null),
|
|
108
|
+
/** Declared `secrets` the organization has not set; publish refuses them. */
|
|
109
|
+
missingSecrets: z.array(z.string()).default([])
|
|
110
|
+
});
|
|
111
|
+
const commitResultSchema = z.object({
|
|
112
|
+
commitSha: z.string(),
|
|
113
|
+
branch: z.string(),
|
|
114
|
+
compile: compileResultSchema.nullable().default(null)
|
|
115
|
+
});
|
|
116
|
+
const channelRouteUrlSchema = z.object({
|
|
117
|
+
method: z.string(),
|
|
118
|
+
path: z.string(),
|
|
119
|
+
/** Null when the organization has no slug yet, or locally. */
|
|
120
|
+
url: nullableString(),
|
|
121
|
+
/** Rename-safe alias addressed by binding id. */
|
|
122
|
+
aliasUrl: z.string()
|
|
123
|
+
});
|
|
124
|
+
const publishedChannelSchema = z.object({
|
|
125
|
+
bindingId: z.string(),
|
|
126
|
+
key: z.string(),
|
|
127
|
+
channel: providerRefSchema,
|
|
128
|
+
routes: z.array(channelRouteUrlSchema).default([]),
|
|
129
|
+
/** Returned once, when the binding's webhook secret is first created. */
|
|
130
|
+
webhookSecret: nullableString()
|
|
131
|
+
});
|
|
132
|
+
const definitionChannelSchema = z.object({
|
|
133
|
+
bindingId: z.string(),
|
|
134
|
+
key: z.string(),
|
|
135
|
+
channel: providerRefSchema,
|
|
136
|
+
routes: z.array(channelRouteUrlSchema).default([]),
|
|
137
|
+
/** Where the binding's inbound events and bound-conversation schedules post; null: none. */
|
|
138
|
+
conversationId: nullableString()
|
|
139
|
+
});
|
|
140
|
+
const definitionChannelsResponseSchema = z.object({
|
|
141
|
+
channels: z.array(definitionChannelSchema).default([])
|
|
142
|
+
});
|
|
143
|
+
const attachChannelBindingRequestSchema = z.strictObject({
|
|
144
|
+
conversationId: z.string().min(1).nullable()
|
|
145
|
+
});
|
|
146
|
+
const attachChannelBindingResponseSchema = z.object({
|
|
147
|
+
bindingId: z.string(),
|
|
148
|
+
key: z.string(),
|
|
149
|
+
conversationId: nullableString()
|
|
150
|
+
});
|
|
151
|
+
const definitionCloneUrlSchema = z.object({
|
|
152
|
+
url: z.string(),
|
|
153
|
+
expiresAt: z.string()
|
|
154
|
+
});
|
|
155
|
+
const publishResultSchema = z.object({
|
|
156
|
+
revision: revisionSchema,
|
|
157
|
+
definition: definitionSchema.nullable().default(null),
|
|
158
|
+
diagnostics: z.array(diagnosticSchema).default([]),
|
|
159
|
+
/** False when the commit was already the current revision. */
|
|
160
|
+
created: z.boolean().default(true),
|
|
161
|
+
channels: z.array(publishedChannelSchema).default([])
|
|
162
|
+
});
|
|
163
|
+
const providerEntrySchema = z.object({
|
|
164
|
+
kind: tolerantStringEnum(ProviderKind),
|
|
165
|
+
ref: providerRefSchema,
|
|
166
|
+
name: z.string(),
|
|
167
|
+
description: nullableString(),
|
|
168
|
+
/** JSON Schema of the provider's config (Build renders forms from it). */
|
|
169
|
+
configSchema: jsonValueSchema.nullable().default(null),
|
|
170
|
+
/** Harness description (`supports`, transports, inference kinds); opaque to clients. */
|
|
171
|
+
capabilities: jsonValueSchema.nullable().default(null)
|
|
172
|
+
});
|
|
173
|
+
const providerListSchema = z.object({
|
|
174
|
+
providers: z.array(providerEntrySchema)
|
|
175
|
+
});
|
|
176
|
+
const computerSetupGuideVersionSchema = z.object({
|
|
177
|
+
id: z.string(),
|
|
178
|
+
guideId: z.string(),
|
|
179
|
+
number: z.number(),
|
|
180
|
+
image: nullableString(),
|
|
181
|
+
buildState: tolerantStringEnum(SetupGuideBuildState),
|
|
182
|
+
builtAt: nullableString(),
|
|
183
|
+
instructionsMarkdown: nullableString(),
|
|
184
|
+
defaultParameters: jsonValueSchema.nullable().default(null),
|
|
185
|
+
buildArtifactKey: nullableString(),
|
|
186
|
+
templateConfig: jsonValueSchema.nullable().default(null),
|
|
187
|
+
createdByUserId: nullableString(),
|
|
188
|
+
createdAt: z.string()
|
|
189
|
+
});
|
|
190
|
+
const computerSetupGuideSchema = z.object({
|
|
191
|
+
id: z.string(),
|
|
192
|
+
slug: z.string(),
|
|
193
|
+
title: z.string(),
|
|
194
|
+
currentVersion: computerSetupGuideVersionSchema.nullable().default(null),
|
|
195
|
+
archivedAt: nullableString(),
|
|
196
|
+
createdAt: z.string(),
|
|
197
|
+
updatedAt: nullableString()
|
|
198
|
+
});
|
|
199
|
+
const computerSetupGuideDetailSchema = computerSetupGuideSchema.extend({
|
|
200
|
+
versions: z.array(computerSetupGuideVersionSchema).default([])
|
|
201
|
+
});
|
|
202
|
+
const computerSetupGuideListSchema = z.object({
|
|
203
|
+
guides: z.array(computerSetupGuideSchema)
|
|
204
|
+
});
|
|
205
|
+
const publishComputerSetupGuideResultSchema = z.object({
|
|
206
|
+
guide: computerSetupGuideSchema,
|
|
207
|
+
version: computerSetupGuideVersionSchema
|
|
208
|
+
});
|
|
209
|
+
const scheduleSchema = z.object({
|
|
210
|
+
id: z.string(),
|
|
211
|
+
agentId: z.string(),
|
|
212
|
+
key: z.string(),
|
|
213
|
+
cron: z.string(),
|
|
214
|
+
timezone: z.string(),
|
|
215
|
+
prompt: z.string(),
|
|
216
|
+
target: tolerantStringEnum(ScheduleTarget),
|
|
217
|
+
conversationId: nullableString(),
|
|
218
|
+
ownerUserId: nullableString(),
|
|
219
|
+
enabled: z.boolean(),
|
|
220
|
+
nextRunAt: nullableString(),
|
|
221
|
+
lastRunAt: nullableString(),
|
|
222
|
+
createdAt: z.string(),
|
|
223
|
+
updatedAt: nullableString()
|
|
224
|
+
});
|
|
225
|
+
const scheduleListSchema = z.object({
|
|
226
|
+
schedules: z.array(scheduleSchema)
|
|
227
|
+
});
|
|
228
|
+
const scheduleRunResultSchema = z.object({
|
|
229
|
+
firingId: z.string(),
|
|
230
|
+
conversationId: nullableString(),
|
|
231
|
+
messageId: nullableString()
|
|
232
|
+
});
|
|
233
|
+
const createDefinitionRequestSchema = z.strictObject({
|
|
234
|
+
slug: z.string().min(1).max(64).regex(/^[a-z0-9][a-z0-9-]*$/u),
|
|
235
|
+
name: z.string().min(1).max(120).optional(),
|
|
236
|
+
/** Personal agents are owned by the caller; organization agents by the organization. */
|
|
237
|
+
personal: z.boolean().optional(),
|
|
238
|
+
repository: z.strictObject({
|
|
239
|
+
kind: z.enum(DefinitionRepositoryKind),
|
|
240
|
+
ref: z.string().min(1),
|
|
241
|
+
path: z.string().optional(),
|
|
242
|
+
defaultBranch: z.string().min(1).optional()
|
|
243
|
+
}).optional(),
|
|
244
|
+
/** Final-hosted repositories only; defaults to the assistant starter. */
|
|
245
|
+
template: z.enum(DefinitionStarterTemplate).optional()
|
|
246
|
+
});
|
|
247
|
+
const compileDefinitionRequestSchema = z.strictObject({
|
|
248
|
+
ref: z.string().min(1),
|
|
249
|
+
harness: z.string().min(1).optional()
|
|
250
|
+
});
|
|
251
|
+
const commitFileInputSchema = z.strictObject({
|
|
252
|
+
path: z.string().min(1),
|
|
253
|
+
/** Null deletes the file. */
|
|
254
|
+
content: z.string().nullable(),
|
|
255
|
+
encoding: z.enum(CommitFileEncoding).optional(),
|
|
256
|
+
/**
|
|
257
|
+
* SHA-256 (hex) of the file's UTF-8 content the edit started from, or null
|
|
258
|
+
* when it started from no file. The commit fails with 409 when the file at
|
|
259
|
+
* the branch head differs (Build's source editor guards hand edits with it).
|
|
260
|
+
*/
|
|
261
|
+
baseSha256: z.string().regex(/^[0-9a-f]{64}$/u).nullable().optional()
|
|
262
|
+
});
|
|
263
|
+
const commitDefinitionRequestSchema = z.strictObject({
|
|
264
|
+
files: z.array(commitFileInputSchema).min(1),
|
|
265
|
+
message: z.string().min(1).max(2e3),
|
|
266
|
+
branch: z.string().min(1).optional(),
|
|
267
|
+
/** Expected head of the branch; the commit fails on a mismatch. */
|
|
268
|
+
parentSha: z.string().min(1).optional()
|
|
269
|
+
});
|
|
270
|
+
const publishDefinitionRequestSchema = z.strictObject({
|
|
271
|
+
ref: z.string().min(1),
|
|
272
|
+
note: z.string().max(2e3).optional()
|
|
273
|
+
});
|
|
274
|
+
const publishComputerSetupGuideRequestSchema = z.strictObject({
|
|
275
|
+
slug: z.string().min(1).max(64).regex(/^[a-z0-9][a-z0-9-]*$/u),
|
|
276
|
+
title: z.string().min(1).max(200).optional(),
|
|
277
|
+
image: z.string().min(1).optional(),
|
|
278
|
+
templateConfig: jsonObjectSchema.optional(),
|
|
279
|
+
defaultParameters: jsonObjectSchema.optional(),
|
|
280
|
+
instructionsMarkdown: z.string().optional()
|
|
281
|
+
});
|
|
282
|
+
const updateScheduleRequestSchema = z.strictObject({
|
|
283
|
+
enabled: z.boolean().optional(),
|
|
284
|
+
cron: z.string().min(1).optional(),
|
|
285
|
+
timezone: z.string().min(1).optional(),
|
|
286
|
+
prompt: z.string().min(1).optional()
|
|
287
|
+
});
|
|
288
|
+
const previewCredentialPolicyRequestSchema = z.strictObject({
|
|
289
|
+
policy: jsonValueSchema.optional(),
|
|
290
|
+
harness: z.string().min(1).optional(),
|
|
291
|
+
model: z.string().min(1).optional(),
|
|
292
|
+
authorUserId: z.string().min(1).optional()
|
|
293
|
+
});
|
|
294
|
+
const credentialPolicyPreviewSchema = z.object({
|
|
295
|
+
ok: z.boolean(),
|
|
296
|
+
payerUserId: z.string().nullable(),
|
|
297
|
+
credentialKind: z.string().nullable(),
|
|
298
|
+
credentialId: z.string().nullable(),
|
|
299
|
+
vendor: z.string().nullable(),
|
|
300
|
+
reason: z.string().nullable(),
|
|
301
|
+
steps: z.array(
|
|
302
|
+
z.object({ position: z.number(), outcome: z.string(), reasons: z.array(z.string()) })
|
|
303
|
+
)
|
|
304
|
+
});
|
|
305
|
+
export {
|
|
306
|
+
attachChannelBindingRequestSchema,
|
|
307
|
+
attachChannelBindingResponseSchema,
|
|
308
|
+
channelRouteUrlSchema,
|
|
309
|
+
commitDefinitionRequestSchema,
|
|
310
|
+
commitFileInputSchema,
|
|
311
|
+
commitResultSchema,
|
|
312
|
+
compatibilityReportSchema,
|
|
313
|
+
compatibilityRowSchema,
|
|
314
|
+
compileDefinitionRequestSchema,
|
|
315
|
+
compileResultSchema,
|
|
316
|
+
computerSetupGuideDetailSchema,
|
|
317
|
+
computerSetupGuideListSchema,
|
|
318
|
+
computerSetupGuideSchema,
|
|
319
|
+
computerSetupGuideVersionSchema,
|
|
320
|
+
createDefinitionRequestSchema,
|
|
321
|
+
credentialPolicyPreviewSchema,
|
|
322
|
+
definitionChannelSchema,
|
|
323
|
+
definitionChannelsResponseSchema,
|
|
324
|
+
definitionCloneUrlSchema,
|
|
325
|
+
definitionFileSchema,
|
|
326
|
+
definitionFilesSchema,
|
|
327
|
+
definitionListSchema,
|
|
328
|
+
definitionRepositorySchema,
|
|
329
|
+
definitionSchema,
|
|
330
|
+
diagnosticSchema,
|
|
331
|
+
manifestChangeSchema,
|
|
332
|
+
previewCredentialPolicyRequestSchema,
|
|
333
|
+
providerEntrySchema,
|
|
334
|
+
providerListSchema,
|
|
335
|
+
publishComputerSetupGuideRequestSchema,
|
|
336
|
+
publishComputerSetupGuideResultSchema,
|
|
337
|
+
publishDefinitionRequestSchema,
|
|
338
|
+
publishResultSchema,
|
|
339
|
+
publishedChannelSchema,
|
|
340
|
+
revisionDiffSchema,
|
|
341
|
+
revisionListSchema,
|
|
342
|
+
revisionSchema,
|
|
343
|
+
scheduleListSchema,
|
|
344
|
+
scheduleRunResultSchema,
|
|
345
|
+
scheduleSchema,
|
|
346
|
+
updateScheduleRequestSchema
|
|
347
|
+
};
|
|
348
|
+
//# sourceMappingURL=build.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/agent-platform/build.ts"],
|
|
4
|
+
"sourcesContent": ["import * as z from 'zod';\n\nimport { jsonObjectSchema, jsonValueSchema } from \"../json.mjs\";\n\nimport { tolerantStringEnum } from \"../tolerance.mjs\";\n\nimport { nullableNumber, nullableString, providerRefSchema } from \"./common.mjs\";\n\nimport {\n CommitFileEncoding,\n CompatibilityCategory,\n CompatibilityResult,\n CompatibilitySummary,\n DefinitionRepositoryKind,\n DefinitionStarterTemplate,\n DiagnosticSeverity,\n ManifestChangeKind,\n ProviderKind,\n ScheduleTarget,\n SetupGuideBuildState,\n} from \"./enums.mjs\";\n\n// What Build and settings screens use: definitions and revisions, compile and\n// compatibility, installed providers, computer setup guides, schedules, model\n// credentials, credential policies and budgets.\n\nexport const definitionRepositorySchema = z.object({\n kind: tolerantStringEnum(DefinitionRepositoryKind),\n ref: z.string(),\n path: z.string().default(''),\n defaultBranch: z.string().default('main'),\n});\n\nexport const revisionSchema = z.object({\n id: z.string(),\n definitionId: z.string(),\n number: z.number(),\n commitSha: nullableString(),\n bundleHash: nullableString(),\n createdByUserId: nullableString(),\n note: nullableString(),\n /** The compiled manifest; omitted from lists. */\n manifest: jsonValueSchema.nullable().default(null),\n createdAt: z.string(),\n});\n\nexport type RevisionIface = z.infer<typeof revisionSchema>;\n\nexport const definitionSchema = z.object({\n id: z.string(),\n organizationId: z.string(),\n slug: z.string(),\n name: nullableString(),\n ownerUserId: nullableString(),\n repository: definitionRepositorySchema.nullable().default(null),\n currentRevisionId: nullableString(),\n currentRevision: revisionSchema.nullable().default(null),\n archivedAt: nullableString(),\n createdAt: z.string(),\n updatedAt: nullableString(),\n});\n\nexport type DefinitionIface = z.infer<typeof definitionSchema>;\n\nexport const definitionListSchema = z.object({\n definitions: z.array(definitionSchema),\n nextCursor: nullableString(),\n});\n\nexport const revisionListSchema = z.object({\n revisions: z.array(revisionSchema),\n nextCursor: nullableString(),\n});\n\n/**\n * One changed path between two revisions' manifests. Paths use the dynamic\n * slot notation (`harness.config.instructions[1]`); keyed lists (MCP servers,\n * channels, schedules) are addressed by key (`channels[key=webhook]`).\n */\nexport const manifestChangeSchema = z.object({\n path: z.string(),\n kind: tolerantStringEnum(ManifestChangeKind),\n before: jsonValueSchema.nullable().default(null),\n after: jsonValueSchema.nullable().default(null),\n});\n\n/** `GET /definitions/:id/revisions/diff?from&to`: `to` defaults to the current revision. */\nexport const revisionDiffSchema = z.object({\n from: revisionSchema,\n to: revisionSchema,\n changes: z.array(manifestChangeSchema).default([]),\n});\n\nexport type RevisionDiffIface = z.infer<typeof revisionDiffSchema>;\n\nexport const definitionFileSchema = z.object({\n /** Directory-relative path. */\n path: z.string(),\n content: z.string(),\n});\n\n/** `GET /v1/definitions/:id/files`: the agent directory at a ref. */\nexport const definitionFilesSchema = z.object({\n ref: z.string(),\n commitSha: nullableString(),\n files: z.array(definitionFileSchema).default([]),\n});\n\nexport type DefinitionFilesIface = z.infer<typeof definitionFilesSchema>;\n\nexport const diagnosticSchema = z.object({\n severity: tolerantStringEnum(DiagnosticSeverity),\n message: z.string(),\n code: nullableString(),\n file: nullableString(),\n line: nullableNumber(),\n column: nullableNumber(),\n});\n\nexport const compatibilityRowSchema = z.object({\n item: z.string(),\n category: tolerantStringEnum(CompatibilityCategory),\n result: tolerantStringEnum(CompatibilityResult),\n detail: nullableString(),\n /** Config path or file the row is about. */\n path: nullableString(),\n});\n\nexport const compatibilityReportSchema = z.object({\n harness: providerRefSchema,\n revisionId: nullableString(),\n summary: tolerantStringEnum(CompatibilitySummary),\n rows: z.array(compatibilityRowSchema).default([]),\n});\n\nexport type CompatibilityReportIface = z.infer<typeof compatibilityReportSchema>;\n\nexport const compileResultSchema = z.object({\n ok: z.boolean(),\n ref: z.string(),\n commitSha: nullableString(),\n manifest: jsonValueSchema.nullable().default(null),\n bundleHash: nullableString(),\n diagnostics: z.array(diagnosticSchema).default([]),\n compatibility: compatibilityReportSchema.nullable().default(null),\n /** Declared `secrets` the organization has not set; publish refuses them. */\n missingSecrets: z.array(z.string()).default([]),\n});\n\nexport type CompileResultIface = z.infer<typeof compileResultSchema>;\n\nexport const commitResultSchema = z.object({\n commitSha: z.string(),\n branch: z.string(),\n compile: compileResultSchema.nullable().default(null),\n});\n\nexport type CommitResultIface = z.infer<typeof commitResultSchema>;\n\nexport const channelRouteUrlSchema = z.object({\n method: z.string(),\n path: z.string(),\n /** Null when the organization has no slug yet, or locally. */\n url: nullableString(),\n /** Rename-safe alias addressed by binding id. */\n aliasUrl: z.string(),\n});\n\nexport const publishedChannelSchema = z.object({\n bindingId: z.string(),\n key: z.string(),\n channel: providerRefSchema,\n routes: z.array(channelRouteUrlSchema).default([]),\n /** Returned once, when the binding's webhook secret is first created. */\n webhookSecret: nullableString(),\n});\n\n/** A live channel binding of an agent, and the conversation it is attached to. */\nexport const definitionChannelSchema = z.object({\n bindingId: z.string(),\n key: z.string(),\n channel: providerRefSchema,\n routes: z.array(channelRouteUrlSchema).default([]),\n /** Where the binding's inbound events and bound-conversation schedules post; null: none. */\n conversationId: nullableString(),\n});\n\nexport type DefinitionChannelIface = z.infer<typeof definitionChannelSchema>;\n\nexport const definitionChannelsResponseSchema = z.object({\n channels: z.array(definitionChannelSchema).default([]),\n});\n\n/** Attaches a channel binding to a conversation the agent and the caller take part in; null detaches. */\nexport const attachChannelBindingRequestSchema = z.strictObject({\n conversationId: z.string().min(1).nullable(),\n});\n\nexport const attachChannelBindingResponseSchema = z.object({\n bindingId: z.string(),\n key: z.string(),\n conversationId: nullableString(),\n});\n\nexport type AttachChannelBindingResponseIface = z.infer<typeof attachChannelBindingResponseSchema>;\n\n/**\n * `POST /v1/definitions/:id/clone-url`: a short-lived, read-only git remote\n * for a Final-hosted repository (export). The URL carries its token.\n */\nexport const definitionCloneUrlSchema = z.object({\n url: z.string(),\n expiresAt: z.string(),\n});\n\nexport type DefinitionCloneUrlIface = z.infer<typeof definitionCloneUrlSchema>;\n\nexport const publishResultSchema = z.object({\n revision: revisionSchema,\n definition: definitionSchema.nullable().default(null),\n diagnostics: z.array(diagnosticSchema).default([]),\n /** False when the commit was already the current revision. */\n created: z.boolean().default(true),\n channels: z.array(publishedChannelSchema).default([]),\n});\n\nexport type PublishResultIface = z.infer<typeof publishResultSchema>;\n\nexport const providerEntrySchema = z.object({\n kind: tolerantStringEnum(ProviderKind),\n ref: providerRefSchema,\n name: z.string(),\n description: nullableString(),\n /** JSON Schema of the provider's config (Build renders forms from it). */\n configSchema: jsonValueSchema.nullable().default(null),\n /** Harness description (`supports`, transports, inference kinds); opaque to clients. */\n capabilities: jsonValueSchema.nullable().default(null),\n});\n\nexport type ProviderEntryIface = z.infer<typeof providerEntrySchema>;\n\nexport const providerListSchema = z.object({\n providers: z.array(providerEntrySchema),\n});\n\nexport const computerSetupGuideVersionSchema = z.object({\n id: z.string(),\n guideId: z.string(),\n number: z.number(),\n image: nullableString(),\n buildState: tolerantStringEnum(SetupGuideBuildState),\n builtAt: nullableString(),\n instructionsMarkdown: nullableString(),\n defaultParameters: jsonValueSchema.nullable().default(null),\n buildArtifactKey: nullableString(),\n templateConfig: jsonValueSchema.nullable().default(null),\n createdByUserId: nullableString(),\n createdAt: z.string(),\n});\n\nexport type ComputerSetupGuideVersionIface = z.infer<typeof computerSetupGuideVersionSchema>;\n\nexport const computerSetupGuideSchema = z.object({\n id: z.string(),\n slug: z.string(),\n title: z.string(),\n currentVersion: computerSetupGuideVersionSchema.nullable().default(null),\n archivedAt: nullableString(),\n createdAt: z.string(),\n updatedAt: nullableString(),\n});\n\nexport type ComputerSetupGuideIface = z.infer<typeof computerSetupGuideSchema>;\n\nexport const computerSetupGuideDetailSchema = computerSetupGuideSchema.extend({\n versions: z.array(computerSetupGuideVersionSchema).default([]),\n});\n\nexport type ComputerSetupGuideDetailIface = z.infer<typeof computerSetupGuideDetailSchema>;\n\nexport const computerSetupGuideListSchema = z.object({\n guides: z.array(computerSetupGuideSchema),\n});\n\nexport const publishComputerSetupGuideResultSchema = z.object({\n guide: computerSetupGuideSchema,\n version: computerSetupGuideVersionSchema,\n});\n\nexport const scheduleSchema = z.object({\n id: z.string(),\n agentId: z.string(),\n key: z.string(),\n cron: z.string(),\n timezone: z.string(),\n prompt: z.string(),\n target: tolerantStringEnum(ScheduleTarget),\n conversationId: nullableString(),\n ownerUserId: nullableString(),\n enabled: z.boolean(),\n nextRunAt: nullableString(),\n lastRunAt: nullableString(),\n createdAt: z.string(),\n updatedAt: nullableString(),\n});\n\nexport type ScheduleIface = z.infer<typeof scheduleSchema>;\n\nexport const scheduleListSchema = z.object({\n schedules: z.array(scheduleSchema),\n});\n\nexport const scheduleRunResultSchema = z.object({\n firingId: z.string(),\n conversationId: nullableString(),\n messageId: nullableString(),\n});\n\nexport type ScheduleRunResultIface = z.infer<typeof scheduleRunResultSchema>;\n\nexport const createDefinitionRequestSchema = z.strictObject({\n slug: z\n .string()\n .min(1)\n .max(64)\n .regex(/^[a-z0-9][a-z0-9-]*$/u),\n name: z.string().min(1).max(120).optional(),\n /** Personal agents are owned by the caller; organization agents by the organization. */\n personal: z.boolean().optional(),\n repository: z\n .strictObject({\n kind: z.enum(DefinitionRepositoryKind),\n ref: z.string().min(1),\n path: z.string().optional(),\n defaultBranch: z.string().min(1).optional(),\n })\n .optional(),\n /** Final-hosted repositories only; defaults to the assistant starter. */\n template: z.enum(DefinitionStarterTemplate).optional(),\n});\n\nexport type CreateDefinitionRequestIface = z.infer<typeof createDefinitionRequestSchema>;\n\nexport const compileDefinitionRequestSchema = z.strictObject({\n ref: z.string().min(1),\n harness: z.string().min(1).optional(),\n});\n\nexport const commitFileInputSchema = z.strictObject({\n path: z.string().min(1),\n /** Null deletes the file. */\n content: z.string().nullable(),\n encoding: z.enum(CommitFileEncoding).optional(),\n /**\n * SHA-256 (hex) of the file's UTF-8 content the edit started from, or null\n * when it started from no file. The commit fails with 409 when the file at\n * the branch head differs (Build's source editor guards hand edits with it).\n */\n baseSha256: z\n .string()\n .regex(/^[0-9a-f]{64}$/u)\n .nullable()\n .optional(),\n});\n\nexport const commitDefinitionRequestSchema = z.strictObject({\n files: z.array(commitFileInputSchema).min(1),\n message: z.string().min(1).max(2000),\n branch: z.string().min(1).optional(),\n /** Expected head of the branch; the commit fails on a mismatch. */\n parentSha: z.string().min(1).optional(),\n});\n\nexport type CommitDefinitionRequestIface = z.infer<typeof commitDefinitionRequestSchema>;\n\nexport const publishDefinitionRequestSchema = z.strictObject({\n ref: z.string().min(1),\n note: z.string().max(2000).optional(),\n});\n\nexport const publishComputerSetupGuideRequestSchema = z.strictObject({\n slug: z\n .string()\n .min(1)\n .max(64)\n .regex(/^[a-z0-9][a-z0-9-]*$/u),\n title: z.string().min(1).max(200).optional(),\n image: z.string().min(1).optional(),\n templateConfig: jsonObjectSchema.optional(),\n defaultParameters: jsonObjectSchema.optional(),\n instructionsMarkdown: z.string().optional(),\n});\n\nexport type PublishComputerSetupGuideRequestIface = z.infer<\n typeof publishComputerSetupGuideRequestSchema\n>;\n\nexport const updateScheduleRequestSchema = z.strictObject({\n enabled: z.boolean().optional(),\n cron: z.string().min(1).optional(),\n timezone: z.string().min(1).optional(),\n prompt: z.string().min(1).optional(),\n});\n\nexport type UpdateScheduleRequestIface = z.infer<typeof updateScheduleRequestSchema>;\n\nexport const previewCredentialPolicyRequestSchema = z.strictObject({\n policy: jsonValueSchema.optional(),\n harness: z.string().min(1).optional(),\n model: z.string().min(1).optional(),\n authorUserId: z.string().min(1).optional(),\n});\n\nexport type PreviewCredentialPolicyRequestIface = z.infer<\n typeof previewCredentialPolicyRequestSchema\n>;\n\nexport const credentialPolicyPreviewSchema = z.object({\n ok: z.boolean(),\n payerUserId: z.string().nullable(),\n credentialKind: z.string().nullable(),\n credentialId: z.string().nullable(),\n vendor: z.string().nullable(),\n reason: z.string().nullable(),\n steps: z.array(\n z.object({ position: z.number(), outcome: z.string(), reasons: z.array(z.string()) }),\n ),\n});\n\nexport type CredentialPolicyPreviewIface = z.infer<typeof credentialPolicyPreviewSchema>;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,OAAO;AAEnB,SAAS,kBAAkB,uBAAuB;AAElD,SAAS,0BAA0B;AAEnC,SAAS,gBAAgB,gBAAgB,yBAAyB;AAElE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAMA,MAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,MAAM,mBAAmB,wBAAwB;AAAA,EACjD,KAAK,EAAE,OAAO;AAAA,EACd,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AAAA,EAC3B,eAAe,E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gB,EAAE,OAAO,EAAE,SAAS;AAAA,EACpC,cAAc,EAAE,OAAO,EAAE,SAAS;AAAA,EAClC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,OAAO,EAAE;AAAA,IACP,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;AAAA,EACtF;AACF,CAAC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { AgentHealthStatus, ProviderRefKind } from "./enums.mjs";
|
|
3
|
+
/** A nullable server field that a newer server may also omit. */
|
|
4
|
+
export declare const nullableString: () => z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
export declare const nullableNumber: () => z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
6
|
+
/** An ACP content block as the server stored it; every field is kept. */
|
|
7
|
+
export declare const contentBlockSchema: z.ZodObject<{
|
|
8
|
+
type: z.ZodString;
|
|
9
|
+
text: z.ZodOptional<z.ZodString>;
|
|
10
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
11
|
+
data: z.ZodOptional<z.ZodString>;
|
|
12
|
+
uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
name: z.ZodOptional<z.ZodString>;
|
|
14
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
resource: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
17
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
18
|
+
}, z.core.$loose>;
|
|
19
|
+
export type ContentBlockIface = z.infer<typeof contentBlockSchema>;
|
|
20
|
+
/**
|
|
21
|
+
* One ACP JSON-RPC message (request, response or notification) as logged by
|
|
22
|
+
* the session service; every field is kept.
|
|
23
|
+
*/
|
|
24
|
+
export declare const acpWireMessageSchema: z.ZodObject<{
|
|
25
|
+
jsonrpc: z.ZodOptional<z.ZodString>;
|
|
26
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>>;
|
|
27
|
+
method: z.ZodOptional<z.ZodString>;
|
|
28
|
+
params: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
29
|
+
result: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
30
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
31
|
+
code: z.ZodNumber;
|
|
32
|
+
message: z.ZodString;
|
|
33
|
+
data: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
34
|
+
}, z.core.$loose>>;
|
|
35
|
+
}, z.core.$loose>;
|
|
36
|
+
export type AcpWireMessageIface = z.infer<typeof acpWireMessageSchema>;
|
|
37
|
+
/** `session/update` params, enough to branch on `sessionUpdate` without the full ACP schema. */
|
|
38
|
+
export declare const acpSessionUpdateParamsSchema: z.ZodObject<{
|
|
39
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
40
|
+
update: z.ZodObject<{
|
|
41
|
+
sessionUpdate: z.ZodString;
|
|
42
|
+
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
43
|
+
type: z.ZodString;
|
|
44
|
+
text: z.ZodOptional<z.ZodString>;
|
|
45
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
46
|
+
data: z.ZodOptional<z.ZodString>;
|
|
47
|
+
uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
name: z.ZodOptional<z.ZodString>;
|
|
49
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
50
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
51
|
+
resource: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
52
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
53
|
+
}, z.core.$loose>, z.ZodArray<z.ZodObject<{
|
|
54
|
+
type: z.ZodString;
|
|
55
|
+
text: z.ZodOptional<z.ZodString>;
|
|
56
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
57
|
+
data: z.ZodOptional<z.ZodString>;
|
|
58
|
+
uri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
name: z.ZodOptional<z.ZodString>;
|
|
60
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
62
|
+
resource: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
63
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
|
|
64
|
+
}, z.core.$loose>>]>>;
|
|
65
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
state: z.ZodOptional<z.ZodString>;
|
|
67
|
+
stopReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
|
+
}, z.core.$loose>;
|
|
69
|
+
}, z.core.$loose>;
|
|
70
|
+
export type AcpSessionUpdateParamsIface = z.infer<typeof acpSessionUpdateParamsSchema>;
|
|
71
|
+
export declare const providerRefSchema: z.ZodObject<{
|
|
72
|
+
kind: z.ZodUnion<readonly [z.ZodEnum<typeof ProviderRefKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
|
|
73
|
+
specifier: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
74
|
+
export: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export type ProviderRefIface = z.infer<typeof providerRefSchema>;
|
|
77
|
+
export declare const okResponseSchema: z.ZodObject<{
|
|
78
|
+
ok: z.ZodDefault<z.ZodBoolean>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export declare const healthResponseSchema: z.ZodObject<{
|
|
81
|
+
ok: z.ZodBoolean;
|
|
82
|
+
status: z.ZodUnion<readonly [z.ZodEnum<typeof AgentHealthStatus>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
|
|
83
|
+
version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type HealthResponseIface = z.infer<typeof healthResponseSchema>;
|
|
86
|
+
export declare const apiErrorDetailSchema: z.ZodObject<{
|
|
87
|
+
code: z.ZodDefault<z.ZodString>;
|
|
88
|
+
message: z.ZodDefault<z.ZodString>;
|
|
89
|
+
details: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
|
|
90
|
+
state: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
sessionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
92
|
+
pendingId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type ApiErrorDetailIface = z.infer<typeof apiErrorDetailSchema>;
|
|
96
|
+
/** `{ error }` body of every non-2xx response; a bare string error parses as its message. */
|
|
97
|
+
export declare const apiErrorResponseSchema: z.ZodObject<{
|
|
98
|
+
error: z.ZodUnion<readonly [z.ZodObject<{
|
|
99
|
+
code: z.ZodDefault<z.ZodString>;
|
|
100
|
+
message: z.ZodDefault<z.ZodString>;
|
|
101
|
+
details: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
|
|
102
|
+
state: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
sessionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
pendingId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodString, z.ZodTransform<{
|
|
107
|
+
code: string;
|
|
108
|
+
message: string;
|
|
109
|
+
details: import("./index.mjs").JsonValue;
|
|
110
|
+
state: string | null;
|
|
111
|
+
sessionId: string | null;
|
|
112
|
+
pendingId: string | null;
|
|
113
|
+
reason: string | null;
|
|
114
|
+
}, string>>]>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type ApiErrorResponseIface = z.infer<typeof apiErrorResponseSchema>;
|
|
117
|
+
/** `POST /api/v1/realtime/session`: same shape as console-server's `/api/realtime/session`. */
|
|
118
|
+
export declare const realtimeSessionResponseSchema: z.ZodObject<{
|
|
119
|
+
url: z.ZodString;
|
|
120
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
121
|
+
apiKeyPrincipalId: z.ZodOptional<z.ZodString>;
|
|
122
|
+
token: z.ZodString;
|
|
123
|
+
expiresAt: z.ZodString;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
export type RealtimeSessionResponseIface = z.infer<typeof realtimeSessionResponseSchema>;
|
|
126
|
+
/** The organization/team-key bootstrap variant, introduced with API-key owner topics. */
|
|
127
|
+
export declare const apiKeyRealtimeSessionResponseSchema: z.ZodObject<{
|
|
128
|
+
url: z.ZodString;
|
|
129
|
+
token: z.ZodString;
|
|
130
|
+
expiresAt: z.ZodString;
|
|
131
|
+
userId: z.ZodNull;
|
|
132
|
+
apiKeyPrincipalId: z.ZodString;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
/**
|
|
135
|
+
* `POST /api/v1/acp/tickets`: a single-use credential for opening `/acp/ws`
|
|
136
|
+
* where a WebSocket cannot carry an authorization header (browsers). Offer it
|
|
137
|
+
* as the `final-acp-ticket.<ticket>` subprotocol next to `ACP_WS_SUBPROTOCOL`,
|
|
138
|
+
* or as `?ticket=`, at `url`.
|
|
139
|
+
*/
|
|
140
|
+
export declare const acpTicketSchema: z.ZodObject<{
|
|
141
|
+
ticket: z.ZodString;
|
|
142
|
+
expiresAt: z.ZodString;
|
|
143
|
+
url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type AcpTicketIface = z.infer<typeof acpTicketSchema>;
|
|
146
|
+
export declare const ACP_WS_SUBPROTOCOL = "acp.v1";
|
|
147
|
+
export declare const ACP_TICKET_SUBPROTOCOL_PREFIX = "final-acp-ticket.";
|
|
148
|
+
export declare const acpTicketRequestSchema: z.ZodObject<{
|
|
149
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
export type AcpTicketRequestIface = z.infer<typeof acpTicketRequestSchema>;
|
|
152
|
+
export declare const contentBlockInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"text">;
|
|
154
|
+
text: z.ZodString;
|
|
155
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
156
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
157
|
+
type: z.ZodLiteral<"image">;
|
|
158
|
+
data: z.ZodOptional<z.ZodString>;
|
|
159
|
+
mimeType: z.ZodString;
|
|
160
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
161
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
162
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"audio">;
|
|
164
|
+
data: z.ZodString;
|
|
165
|
+
mimeType: z.ZodString;
|
|
166
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
167
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"resource_link">;
|
|
169
|
+
uri: z.ZodString;
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
title: z.ZodOptional<z.ZodString>;
|
|
172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
174
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
176
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"resource">;
|
|
178
|
+
resource: z.ZodObject<{
|
|
179
|
+
uri: z.ZodString;
|
|
180
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
181
|
+
text: z.ZodOptional<z.ZodString>;
|
|
182
|
+
blob: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strict>;
|
|
184
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
185
|
+
}, z.core.$strict>], "type">;
|
|
186
|
+
export type ContentBlockInputIface = z.infer<typeof contentBlockInputSchema>;
|
|
187
|
+
export declare const contentInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<"text">;
|
|
189
|
+
text: z.ZodString;
|
|
190
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
191
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
192
|
+
type: z.ZodLiteral<"image">;
|
|
193
|
+
data: z.ZodOptional<z.ZodString>;
|
|
194
|
+
mimeType: z.ZodString;
|
|
195
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
196
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
197
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
+
type: z.ZodLiteral<"audio">;
|
|
199
|
+
data: z.ZodString;
|
|
200
|
+
mimeType: z.ZodString;
|
|
201
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
202
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"resource_link">;
|
|
204
|
+
uri: z.ZodString;
|
|
205
|
+
name: z.ZodString;
|
|
206
|
+
title: z.ZodOptional<z.ZodString>;
|
|
207
|
+
description: z.ZodOptional<z.ZodString>;
|
|
208
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
209
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
211
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
212
|
+
type: z.ZodLiteral<"resource">;
|
|
213
|
+
resource: z.ZodObject<{
|
|
214
|
+
uri: z.ZodString;
|
|
215
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
216
|
+
text: z.ZodOptional<z.ZodString>;
|
|
217
|
+
blob: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$strict>;
|
|
219
|
+
_meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
|
|
220
|
+
}, z.core.$strict>], "type">>]>;
|
|
221
|
+
export type ContentInput = z.infer<typeof contentInputSchema>;
|