@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.

Files changed (56) hide show
  1. package/README.md +10 -0
  2. package/dist/modules/agent-platform/agents.d.mts +162 -0
  3. package/dist/modules/agent-platform/agents.mjs +91 -0
  4. package/dist/modules/agent-platform/agents.mjs.map +7 -0
  5. package/dist/modules/agent-platform/build.d.mts +678 -0
  6. package/dist/modules/agent-platform/build.mjs +348 -0
  7. package/dist/modules/agent-platform/build.mjs.map +7 -0
  8. package/dist/modules/agent-platform/common.d.mts +221 -0
  9. package/dist/modules/agent-platform/common.mjs +157 -0
  10. package/dist/modules/agent-platform/common.mjs.map +7 -0
  11. package/dist/modules/agent-platform/conversation-schedules.d.mts +98 -0
  12. package/dist/modules/agent-platform/conversation-schedules.mjs +70 -0
  13. package/dist/modules/agent-platform/conversation-schedules.mjs.map +7 -0
  14. package/dist/modules/agent-platform/conversations.d.mts +1024 -0
  15. package/dist/modules/agent-platform/conversations.mjs +378 -0
  16. package/dist/modules/agent-platform/conversations.mjs.map +7 -0
  17. package/dist/modules/agent-platform/enums.d.mts +231 -0
  18. package/dist/modules/agent-platform/enums.mjs +306 -0
  19. package/dist/modules/agent-platform/enums.mjs.map +7 -0
  20. package/dist/modules/agent-platform/index.d.mts +13 -0
  21. package/dist/modules/agent-platform/index.mjs +16 -0
  22. package/dist/modules/agent-platform/index.mjs.map +7 -0
  23. package/dist/modules/agent-platform/links.d.mts +77 -0
  24. package/dist/modules/agent-platform/links.mjs +34 -0
  25. package/dist/modules/agent-platform/links.mjs.map +7 -0
  26. package/dist/modules/agent-platform/people.d.mts +21 -0
  27. package/dist/modules/agent-platform/people.mjs +22 -0
  28. package/dist/modules/agent-platform/people.mjs.map +7 -0
  29. package/dist/modules/agent-platform/realtime.d.mts +713 -0
  30. package/dist/modules/agent-platform/realtime.mjs +185 -0
  31. package/dist/modules/agent-platform/realtime.mjs.map +7 -0
  32. package/dist/modules/agent-platform/sandboxes.d.mts +203 -0
  33. package/dist/modules/agent-platform/sandboxes.mjs +186 -0
  34. package/dist/modules/agent-platform/sandboxes.mjs.map +7 -0
  35. package/dist/modules/agent-platform/sessions.d.mts +494 -0
  36. package/dist/modules/agent-platform/sessions.mjs +242 -0
  37. package/dist/modules/agent-platform/sessions.mjs.map +7 -0
  38. package/dist/modules/base58.d.mts +2 -0
  39. package/dist/modules/base58.mjs +46 -0
  40. package/dist/modules/base58.mjs.map +7 -0
  41. package/dist/modules/index.d.mts +4 -0
  42. package/dist/modules/index.mjs +5 -0
  43. package/dist/modules/index.mjs.map +7 -0
  44. package/dist/modules/json-rpc.d.mts +15 -0
  45. package/dist/modules/json-rpc.mjs +20 -0
  46. package/dist/modules/json-rpc.mjs.map +7 -0
  47. package/dist/modules/json.d.mts +7 -0
  48. package/dist/modules/json.mjs +11 -0
  49. package/dist/modules/json.mjs.map +7 -0
  50. package/dist/modules/process-inspection.d.mts +177 -0
  51. package/dist/modules/process-inspection.mjs +83 -0
  52. package/dist/modules/process-inspection.mjs.map +7 -0
  53. package/dist/modules/tolerance.d.mts +18 -0
  54. package/dist/modules/tolerance.mjs +15 -0
  55. package/dist/modules/tolerance.mjs.map +7 -0
  56. package/package.json +121 -0
@@ -0,0 +1,494 @@
1
+ import * as z from 'zod';
2
+ import { AcpFrameDirection, AcpPreviewKind, AgentSessionState, AgentTurnPolicy, PendingEventState, PendingRequestKind } from "./enums.mjs";
3
+ /**
4
+ * One ACP session config option (model, thought level, mode, ...). ACP v2 keys
5
+ * options by `configId`; `id` is the older spelling. Every other field (type,
6
+ * category, options) is kept loosely for clients to read.
7
+ */
8
+ export declare const sessionConfigOptionSchema: z.ZodObject<{
9
+ id: z.ZodOptional<z.ZodString>;
10
+ configId: z.ZodOptional<z.ZodString>;
11
+ name: z.ZodOptional<z.ZodString>;
12
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ currentValue: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
14
+ }, z.core.$loose>;
15
+ export declare const sessionSchema: z.ZodObject<{
16
+ id: z.ZodString;
17
+ organizationId: z.ZodString;
18
+ agentId: z.ZodString;
19
+ revisionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
20
+ ownerUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
23
+ state: z.ZodUnion<readonly [z.ZodEnum<typeof AgentSessionState>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
24
+ turnPolicy: z.ZodUnion<readonly [z.ZodEnum<typeof AgentTurnPolicy>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
25
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
+ headSeq: z.ZodDefault<z.ZodNumber>;
27
+ configOptions: z.ZodDefault<z.ZodArray<z.ZodObject<{
28
+ id: z.ZodOptional<z.ZodString>;
29
+ configId: z.ZodOptional<z.ZodString>;
30
+ name: z.ZodOptional<z.ZodString>;
31
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ currentValue: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
33
+ }, z.core.$loose>>>;
34
+ lastPromptAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
35
+ closedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
+ createdAt: z.ZodString;
37
+ updatedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
38
+ }, z.core.$strip>;
39
+ export type AgentSessionIface = z.infer<typeof sessionSchema>;
40
+ /**
41
+ * `GET /v1/sessions/:id/manifest`: what the session was given: the
42
+ * revision's manifest with its dynamic slots resolved, and the resolver
43
+ * report (each slot's resolved value, compatibility notes). Null fields
44
+ * before the session's first open resolved them.
45
+ */
46
+ export declare const sessionManifestSchema: z.ZodObject<{
47
+ sessionId: z.ZodString;
48
+ revisionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ resolvedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
50
+ manifest: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>>;
51
+ report: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>>;
52
+ }, z.core.$strip>;
53
+ export type SessionManifestIface = z.infer<typeof sessionManifestSchema>;
54
+ export declare const turnSchema: z.ZodObject<{
55
+ id: z.ZodString;
56
+ sessionId: z.ZodString;
57
+ promptMessageId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
58
+ startedAt: z.ZodString;
59
+ endedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
60
+ stopReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
61
+ fromSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
62
+ toSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
63
+ inputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
64
+ outputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
65
+ }, z.core.$strip>;
66
+ export type AgentTurnIface = z.infer<typeof turnSchema>;
67
+ /** A prompt the session accepted (ACP insertion semantics: not the end of the turn). */
68
+ export declare const promptAcceptedSchema: z.ZodObject<{
69
+ messageId: z.ZodString;
70
+ turnId: z.ZodString;
71
+ fromSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
72
+ }, z.core.$strip>;
73
+ export type PromptAcceptedIface = z.infer<typeof promptAcceptedSchema>;
74
+ /** One logged ACP frame: the `acp.frame` realtime payload and a replay row. */
75
+ export declare const acpFrameEventSchema: z.ZodObject<{
76
+ seq: z.ZodNumber;
77
+ frame: z.ZodObject<{
78
+ jsonrpc: z.ZodOptional<z.ZodString>;
79
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>>;
80
+ method: z.ZodOptional<z.ZodString>;
81
+ params: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
82
+ result: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
83
+ error: z.ZodOptional<z.ZodObject<{
84
+ code: z.ZodNumber;
85
+ message: z.ZodString;
86
+ data: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
87
+ }, z.core.$loose>>;
88
+ }, z.core.$loose>;
89
+ direction: z.ZodUnion<readonly [z.ZodEnum<typeof AcpFrameDirection>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
90
+ at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
91
+ pendingId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
92
+ }, z.core.$strip>;
93
+ export type AcpFrameEventIface = z.infer<typeof acpFrameEventSchema>;
94
+ /** Provisional full frame; `streamId` scopes its seq until the durable stream confirms it. */
95
+ export declare const acpLiveFrameEventSchema: z.ZodObject<{
96
+ seq: z.ZodNumber;
97
+ frame: z.ZodObject<{
98
+ jsonrpc: z.ZodOptional<z.ZodString>;
99
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>>;
100
+ method: z.ZodOptional<z.ZodString>;
101
+ params: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
102
+ result: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
103
+ error: z.ZodOptional<z.ZodObject<{
104
+ code: z.ZodNumber;
105
+ message: z.ZodString;
106
+ data: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
107
+ }, z.core.$loose>>;
108
+ }, z.core.$loose>;
109
+ direction: z.ZodUnion<readonly [z.ZodEnum<typeof AcpFrameDirection>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
110
+ at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
111
+ pendingId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
112
+ streamId: z.ZodString;
113
+ }, z.core.$strip>;
114
+ export type AcpLiveFrameEventIface = z.infer<typeof acpLiveFrameEventSchema>;
115
+ /** Discard provisional state after a lost writer/stream; null means the durable head is unknown. */
116
+ export declare const acpLiveResetEventSchema: z.ZodObject<{
117
+ streamId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
118
+ throughSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
119
+ reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
120
+ }, z.core.$strip>;
121
+ export type AcpLiveResetEventIface = z.infer<typeof acpLiveResetEventSchema>;
122
+ /** `acp.preview`: low-latency text ahead of the durable frames (voice, typing previews). */
123
+ export declare const acpPreviewEventSchema: z.ZodObject<{
124
+ seq: z.ZodNumber;
125
+ text: z.ZodString;
126
+ previewKind: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<typeof AcpPreviewKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>>>;
127
+ messageId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
128
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
129
+ }, z.core.$strip>;
130
+ export type AcpPreviewEventIface = z.infer<typeof acpPreviewEventSchema>;
131
+ export declare const permissionOptionSchema: z.ZodObject<{
132
+ optionId: z.ZodString;
133
+ name: z.ZodString;
134
+ kind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
135
+ }, z.core.$strip>;
136
+ export type PermissionOptionIface = z.infer<typeof permissionOptionSchema>;
137
+ export declare const pendingRequestDetailSchema: z.ZodObject<{
138
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
139
+ body: z.ZodDefault<z.ZodNullable<z.ZodString>>;
140
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
141
+ optionId: z.ZodString;
142
+ name: z.ZodString;
143
+ kind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
144
+ }, z.core.$strip>>>;
145
+ schema: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
146
+ mode: z.ZodDefault<z.ZodNullable<z.ZodString>>;
147
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
148
+ toolCall: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
149
+ }, z.core.$strip>;
150
+ export declare const pendingRequestSchema: z.ZodObject<{
151
+ id: z.ZodString;
152
+ sessionId: z.ZodString;
153
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
154
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
155
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof PendingRequestKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
156
+ request: z.ZodObject<{
157
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
158
+ body: z.ZodDefault<z.ZodNullable<z.ZodString>>;
159
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
160
+ optionId: z.ZodString;
161
+ name: z.ZodString;
162
+ kind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
163
+ }, z.core.$strip>>>;
164
+ schema: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
165
+ mode: z.ZodDefault<z.ZodNullable<z.ZodString>>;
166
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
167
+ toolCall: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
168
+ }, z.core.$strip>;
169
+ audienceParticipantIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
170
+ audienceUserIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
171
+ logSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
172
+ createdAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
173
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
174
+ resolvedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
175
+ resolvedByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
176
+ outcome: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
177
+ }, z.core.$strip>;
178
+ export type PendingRequestIface = z.infer<typeof pendingRequestSchema>;
179
+ export declare const acpPendingEventSchema: z.ZodObject<{
180
+ pending: z.ZodObject<{
181
+ id: z.ZodString;
182
+ sessionId: z.ZodString;
183
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
184
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
185
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof PendingRequestKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
186
+ request: z.ZodObject<{
187
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
188
+ body: z.ZodDefault<z.ZodNullable<z.ZodString>>;
189
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
+ optionId: z.ZodString;
191
+ name: z.ZodString;
192
+ kind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
193
+ }, z.core.$strip>>>;
194
+ schema: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
195
+ mode: z.ZodDefault<z.ZodNullable<z.ZodString>>;
196
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
197
+ toolCall: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
198
+ }, z.core.$strip>;
199
+ audienceParticipantIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
200
+ audienceUserIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
201
+ logSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
202
+ createdAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
203
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
204
+ resolvedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
205
+ resolvedByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
206
+ outcome: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
207
+ }, z.core.$strip>;
208
+ state: z.ZodUnion<readonly [z.ZodEnum<typeof PendingEventState>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
209
+ }, z.core.$strip>;
210
+ export type AcpPendingEventIface = z.infer<typeof acpPendingEventSchema>;
211
+ export declare const sessionStateEventSchema: z.ZodObject<{
212
+ state: z.ZodUnion<readonly [z.ZodEnum<typeof AgentSessionState>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
213
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
214
+ stopReason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
215
+ }, z.core.$strip>;
216
+ export type SessionStateEventIface = z.infer<typeof sessionStateEventSchema>;
217
+ export declare const createSessionResponseSchema: z.ZodObject<{
218
+ session: z.ZodObject<{
219
+ id: z.ZodString;
220
+ organizationId: z.ZodString;
221
+ agentId: z.ZodString;
222
+ revisionId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
223
+ ownerUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
224
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
225
+ participantId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
226
+ state: z.ZodUnion<readonly [z.ZodEnum<typeof AgentSessionState>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
227
+ turnPolicy: z.ZodUnion<readonly [z.ZodEnum<typeof AgentTurnPolicy>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
228
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
229
+ headSeq: z.ZodDefault<z.ZodNumber>;
230
+ configOptions: z.ZodDefault<z.ZodArray<z.ZodObject<{
231
+ id: z.ZodOptional<z.ZodString>;
232
+ configId: z.ZodOptional<z.ZodString>;
233
+ name: z.ZodOptional<z.ZodString>;
234
+ category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ currentValue: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
236
+ }, z.core.$loose>>>;
237
+ lastPromptAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
238
+ closedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
239
+ createdAt: z.ZodString;
240
+ updatedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
241
+ }, z.core.$strip>;
242
+ turn: z.ZodDefault<z.ZodNullable<z.ZodObject<{
243
+ messageId: z.ZodString;
244
+ turnId: z.ZodString;
245
+ fromSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
246
+ }, z.core.$strip>>>;
247
+ }, z.core.$strip>;
248
+ export type CreateSessionResponseIface = z.infer<typeof createSessionResponseSchema>;
249
+ /** Seq of a session's first logged frame; the log is dense from here. */
250
+ export declare const FIRST_ACP_FRAME_SEQ = 1;
251
+ /**
252
+ * `GET /sessions/:id/frames?fromSeq&limit`: `fromSeq` is inclusive and clamped
253
+ * to `FIRST_ACP_FRAME_SEQ`; `hasMore` is set while the page is full and ends
254
+ * before `headSeq`.
255
+ */
256
+ export declare const sessionFramesPageSchema: z.ZodObject<{
257
+ frames: z.ZodArray<z.ZodObject<{
258
+ seq: z.ZodNumber;
259
+ frame: z.ZodObject<{
260
+ jsonrpc: z.ZodOptional<z.ZodString>;
261
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>>;
262
+ method: z.ZodOptional<z.ZodString>;
263
+ params: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
264
+ result: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
265
+ error: z.ZodOptional<z.ZodObject<{
266
+ code: z.ZodNumber;
267
+ message: z.ZodString;
268
+ data: z.ZodOptional<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>;
269
+ }, z.core.$loose>>;
270
+ }, z.core.$loose>;
271
+ direction: z.ZodUnion<readonly [z.ZodEnum<typeof AcpFrameDirection>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
272
+ at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
273
+ pendingId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
274
+ }, z.core.$strip>>;
275
+ headSeq: z.ZodDefault<z.ZodNumber>;
276
+ hasMore: z.ZodDefault<z.ZodBoolean>;
277
+ }, z.core.$strip>;
278
+ export type SessionFramesPageIface = z.infer<typeof sessionFramesPageSchema>;
279
+ export declare const pendingRequestListSchema: z.ZodObject<{
280
+ pending: z.ZodArray<z.ZodObject<{
281
+ id: z.ZodString;
282
+ sessionId: z.ZodString;
283
+ turnId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
284
+ conversationId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
285
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof PendingRequestKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
286
+ request: z.ZodObject<{
287
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
288
+ body: z.ZodDefault<z.ZodNullable<z.ZodString>>;
289
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
290
+ optionId: z.ZodString;
291
+ name: z.ZodString;
292
+ kind: z.ZodDefault<z.ZodNullable<z.ZodString>>;
293
+ }, z.core.$strip>>>;
294
+ schema: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
295
+ mode: z.ZodDefault<z.ZodNullable<z.ZodString>>;
296
+ url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
297
+ toolCall: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
298
+ }, z.core.$strip>;
299
+ audienceParticipantIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
300
+ audienceUserIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
301
+ logSeq: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
302
+ createdAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
303
+ expiresAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
304
+ resolvedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
305
+ resolvedByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
306
+ outcome: z.ZodDefault<z.ZodNullable<z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>>>;
307
+ }, z.core.$strip>>;
308
+ nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
309
+ }, z.core.$strip>;
310
+ export type PendingRequestListIface = z.infer<typeof pendingRequestListSchema>;
311
+ export declare const respondPendingResponseSchema: z.ZodObject<{
312
+ resolved: z.ZodBoolean;
313
+ }, z.core.$strip>;
314
+ export type RespondPendingResponseIface = z.infer<typeof respondPendingResponseSchema>;
315
+ export declare const createSessionRequestSchema: z.ZodObject<{
316
+ agent: z.ZodString;
317
+ revisionId: z.ZodOptional<z.ZodString>;
318
+ message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
319
+ type: z.ZodLiteral<"text">;
320
+ text: z.ZodString;
321
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
322
+ }, z.core.$strict>, z.ZodObject<{
323
+ type: z.ZodLiteral<"image">;
324
+ data: z.ZodOptional<z.ZodString>;
325
+ mimeType: z.ZodString;
326
+ uri: z.ZodOptional<z.ZodString>;
327
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ type: z.ZodLiteral<"audio">;
330
+ data: z.ZodString;
331
+ mimeType: z.ZodString;
332
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
333
+ }, z.core.$strict>, z.ZodObject<{
334
+ type: z.ZodLiteral<"resource_link">;
335
+ uri: z.ZodString;
336
+ name: z.ZodString;
337
+ title: z.ZodOptional<z.ZodString>;
338
+ description: z.ZodOptional<z.ZodString>;
339
+ mimeType: z.ZodOptional<z.ZodString>;
340
+ size: z.ZodOptional<z.ZodNumber>;
341
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
342
+ }, z.core.$strict>, z.ZodObject<{
343
+ type: z.ZodLiteral<"resource">;
344
+ resource: z.ZodObject<{
345
+ uri: z.ZodString;
346
+ mimeType: z.ZodOptional<z.ZodString>;
347
+ text: z.ZodOptional<z.ZodString>;
348
+ blob: z.ZodOptional<z.ZodString>;
349
+ }, z.core.$strict>;
350
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
351
+ }, z.core.$strict>], "type">>]>>;
352
+ turnPolicy: z.ZodOptional<z.ZodEnum<typeof AgentTurnPolicy>>;
353
+ idempotencyKey: z.ZodOptional<z.ZodString>;
354
+ title: z.ZodOptional<z.ZodString>;
355
+ meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
356
+ clientSubmittedAtMs: z.ZodOptional<z.ZodNumber>;
357
+ }, z.core.$strict>;
358
+ export type CreateSessionRequestIface = z.infer<typeof createSessionRequestSchema>;
359
+ export declare const forkSessionRequestSchema: z.ZodObject<{
360
+ idempotencyKey: z.ZodString;
361
+ title: z.ZodOptional<z.ZodString>;
362
+ }, z.core.$strict>;
363
+ export type ForkSessionRequestIface = z.infer<typeof forkSessionRequestSchema>;
364
+ export declare const promptSessionRequestSchema: z.ZodObject<{
365
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
366
+ type: z.ZodLiteral<"text">;
367
+ text: z.ZodString;
368
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
369
+ }, z.core.$strict>, z.ZodObject<{
370
+ type: z.ZodLiteral<"image">;
371
+ data: z.ZodOptional<z.ZodString>;
372
+ mimeType: z.ZodString;
373
+ uri: z.ZodOptional<z.ZodString>;
374
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
375
+ }, z.core.$strict>, z.ZodObject<{
376
+ type: z.ZodLiteral<"audio">;
377
+ data: z.ZodString;
378
+ mimeType: z.ZodString;
379
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
380
+ }, z.core.$strict>, z.ZodObject<{
381
+ type: z.ZodLiteral<"resource_link">;
382
+ uri: z.ZodString;
383
+ name: z.ZodString;
384
+ title: z.ZodOptional<z.ZodString>;
385
+ description: z.ZodOptional<z.ZodString>;
386
+ mimeType: z.ZodOptional<z.ZodString>;
387
+ size: z.ZodOptional<z.ZodNumber>;
388
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
389
+ }, z.core.$strict>, z.ZodObject<{
390
+ type: z.ZodLiteral<"resource">;
391
+ resource: z.ZodObject<{
392
+ uri: z.ZodString;
393
+ mimeType: z.ZodOptional<z.ZodString>;
394
+ text: z.ZodOptional<z.ZodString>;
395
+ blob: z.ZodOptional<z.ZodString>;
396
+ }, z.core.$strict>;
397
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
398
+ }, z.core.$strict>], "type">>]>;
399
+ turnPolicy: z.ZodOptional<z.ZodEnum<typeof AgentTurnPolicy>>;
400
+ idempotencyKey: z.ZodString;
401
+ meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
402
+ clientSubmittedAtMs: z.ZodOptional<z.ZodNumber>;
403
+ }, z.core.$strict>;
404
+ export type PromptSessionRequestIface = z.infer<typeof promptSessionRequestSchema>;
405
+ export declare const observeSessionRequestSchema: z.ZodObject<{
406
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
407
+ type: z.ZodLiteral<"text">;
408
+ text: z.ZodString;
409
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
410
+ }, z.core.$strict>, z.ZodObject<{
411
+ type: z.ZodLiteral<"image">;
412
+ data: z.ZodOptional<z.ZodString>;
413
+ mimeType: z.ZodString;
414
+ uri: z.ZodOptional<z.ZodString>;
415
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
416
+ }, z.core.$strict>, z.ZodObject<{
417
+ type: z.ZodLiteral<"audio">;
418
+ data: z.ZodString;
419
+ mimeType: z.ZodString;
420
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
421
+ }, z.core.$strict>, z.ZodObject<{
422
+ type: z.ZodLiteral<"resource_link">;
423
+ uri: z.ZodString;
424
+ name: z.ZodString;
425
+ title: z.ZodOptional<z.ZodString>;
426
+ description: z.ZodOptional<z.ZodString>;
427
+ mimeType: z.ZodOptional<z.ZodString>;
428
+ size: z.ZodOptional<z.ZodNumber>;
429
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
430
+ }, z.core.$strict>, z.ZodObject<{
431
+ type: z.ZodLiteral<"resource">;
432
+ resource: z.ZodObject<{
433
+ uri: z.ZodString;
434
+ mimeType: z.ZodOptional<z.ZodString>;
435
+ text: z.ZodOptional<z.ZodString>;
436
+ blob: z.ZodOptional<z.ZodString>;
437
+ }, z.core.$strict>;
438
+ _meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
439
+ }, z.core.$strict>], "type">>]>;
440
+ idempotencyKey: z.ZodOptional<z.ZodString>;
441
+ meta: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
442
+ }, z.core.$strict>;
443
+ export declare const cancelRequestSchema: z.ZodObject<{
444
+ reason: z.ZodOptional<z.ZodString>;
445
+ }, z.core.$strict>;
446
+ export declare const cancelConversationRequestSchema: z.ZodObject<{
447
+ reason: z.ZodOptional<z.ZodString>;
448
+ throughMessageSeq: z.ZodOptional<z.ZodNumber>;
449
+ }, z.core.$strict>;
450
+ /** ACP outcomes: `session/request_permission` and `elicitation/create` responses. */
451
+ export declare const pendingOutcomeInputSchema: z.ZodUnion<readonly [z.ZodObject<{
452
+ outcome: z.ZodLiteral<"selected">;
453
+ optionId: z.ZodString;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ outcome: z.ZodLiteral<"cancelled">;
456
+ }, z.core.$strict>, z.ZodObject<{
457
+ action: z.ZodLiteral<"accept">;
458
+ content: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ action: z.ZodLiteral<"decline">;
461
+ }, z.core.$strict>, z.ZodObject<{
462
+ action: z.ZodLiteral<"cancel">;
463
+ }, z.core.$strict>]>;
464
+ export type PendingOutcomeInput = z.infer<typeof pendingOutcomeInputSchema>;
465
+ export declare const respondPendingRequestSchema: z.ZodObject<{
466
+ pendingId: z.ZodString;
467
+ outcome: z.ZodUnion<readonly [z.ZodObject<{
468
+ outcome: z.ZodLiteral<"selected">;
469
+ optionId: z.ZodString;
470
+ }, z.core.$strict>, z.ZodObject<{
471
+ outcome: z.ZodLiteral<"cancelled">;
472
+ }, z.core.$strict>, z.ZodObject<{
473
+ action: z.ZodLiteral<"accept">;
474
+ content: z.ZodOptional<z.ZodType<import("./index.mjs").JsonObjectIface, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonObjectIface, unknown>>>;
475
+ }, z.core.$strict>, z.ZodObject<{
476
+ action: z.ZodLiteral<"decline">;
477
+ }, z.core.$strict>, z.ZodObject<{
478
+ action: z.ZodLiteral<"cancel">;
479
+ }, z.core.$strict>]>;
480
+ }, z.core.$strict>;
481
+ export type RespondPendingRequestIface = z.infer<typeof respondPendingRequestSchema>;
482
+ export declare const setConfigOptionRequestSchema: z.ZodObject<{
483
+ configId: z.ZodString;
484
+ value: z.ZodType<import("./index.mjs").JsonValue, unknown, z.core.$ZodTypeInternals<import("./index.mjs").JsonValue, unknown>>;
485
+ }, z.core.$strict>;
486
+ /** `GET /pending`: newest first; `cursor` is a previous page's `nextCursor`. */
487
+ export declare const listPendingQuerySchema: z.ZodObject<{
488
+ cursor: z.ZodOptional<z.ZodString>;
489
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
490
+ }, z.core.$strict>;
491
+ export declare const sessionFramesQuerySchema: z.ZodObject<{
492
+ fromSeq: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
493
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
494
+ }, z.core.$strict>;