@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,306 @@
1
+ var AgentSessionState = /* @__PURE__ */ ((AgentSessionState2) => {
2
+ AgentSessionState2["Idle"] = "idle";
3
+ AgentSessionState2["Running"] = "running";
4
+ AgentSessionState2["RequiresAction"] = "requires_action";
5
+ AgentSessionState2["Parked"] = "parked";
6
+ AgentSessionState2["Closed"] = "closed";
7
+ AgentSessionState2["Failed"] = "failed";
8
+ return AgentSessionState2;
9
+ })(AgentSessionState || {});
10
+ var AgentTurnPolicy = /* @__PURE__ */ ((AgentTurnPolicy2) => {
11
+ AgentTurnPolicy2["Steer"] = "steer";
12
+ AgentTurnPolicy2["Queue"] = "queue";
13
+ return AgentTurnPolicy2;
14
+ })(AgentTurnPolicy || {});
15
+ var AcpFrameDirection = /* @__PURE__ */ ((AcpFrameDirection2) => {
16
+ AcpFrameDirection2["ClientToAgent"] = "client_to_agent";
17
+ AcpFrameDirection2["AgentToClient"] = "agent_to_client";
18
+ return AcpFrameDirection2;
19
+ })(AcpFrameDirection || {});
20
+ var PendingRequestKind = /* @__PURE__ */ ((PendingRequestKind2) => {
21
+ PendingRequestKind2["Permission"] = "permission";
22
+ PendingRequestKind2["Elicitation"] = "elicitation";
23
+ return PendingRequestKind2;
24
+ })(PendingRequestKind || {});
25
+ var PendingEventState = /* @__PURE__ */ ((PendingEventState2) => {
26
+ PendingEventState2["Created"] = "created";
27
+ PendingEventState2["Resolved"] = "resolved";
28
+ return PendingEventState2;
29
+ })(PendingEventState || {});
30
+ var AcpPreviewKind = /* @__PURE__ */ ((AcpPreviewKind2) => {
31
+ AcpPreviewKind2["AgentMessage"] = "agent_message";
32
+ AcpPreviewKind2["AgentThought"] = "agent_thought";
33
+ return AcpPreviewKind2;
34
+ })(AcpPreviewKind || {});
35
+ var ConversationKind = /* @__PURE__ */ ((ConversationKind2) => {
36
+ ConversationKind2["Direct"] = "direct";
37
+ ConversationKind2["Group"] = "group";
38
+ return ConversationKind2;
39
+ })(ConversationKind || {});
40
+ var ParticipantKind = /* @__PURE__ */ ((ParticipantKind2) => {
41
+ ParticipantKind2["User"] = "user";
42
+ ParticipantKind2["Agent"] = "agent";
43
+ ParticipantKind2["System"] = "system";
44
+ return ParticipantKind2;
45
+ })(ParticipantKind || {});
46
+ var SystemParticipantKind = /* @__PURE__ */ ((SystemParticipantKind2) => {
47
+ SystemParticipantKind2["Schedule"] = "schedule";
48
+ SystemParticipantKind2["Webhook"] = "webhook";
49
+ SystemParticipantKind2["Goal"] = "goal";
50
+ SystemParticipantKind2["Tool"] = "tool";
51
+ SystemParticipantKind2["ApiKey"] = "api-key";
52
+ return SystemParticipantKind2;
53
+ })(SystemParticipantKind || {});
54
+ var ParticipantRole = /* @__PURE__ */ ((ParticipantRole2) => {
55
+ ParticipantRole2["Owner"] = "owner";
56
+ ParticipantRole2["Admin"] = "admin";
57
+ ParticipantRole2["Member"] = "member";
58
+ return ParticipantRole2;
59
+ })(ParticipantRole || {});
60
+ var RoutingMode = /* @__PURE__ */ ((RoutingMode2) => {
61
+ RoutingMode2["Mention"] = "mention";
62
+ RoutingMode2["All"] = "all";
63
+ RoutingMode2["Default"] = "default";
64
+ return RoutingMode2;
65
+ })(RoutingMode || {});
66
+ var ConversationMessageKind = /* @__PURE__ */ ((ConversationMessageKind2) => {
67
+ ConversationMessageKind2["Message"] = "message";
68
+ ConversationMessageKind2["System"] = "system";
69
+ ConversationMessageKind2["Card"] = "card";
70
+ return ConversationMessageKind2;
71
+ })(ConversationMessageKind || {});
72
+ var MessageThreadFilter = /* @__PURE__ */ ((MessageThreadFilter2) => {
73
+ MessageThreadFilter2["All"] = "all";
74
+ return MessageThreadFilter2;
75
+ })(MessageThreadFilter || {});
76
+ var MessageDeliveryState = /* @__PURE__ */ ((MessageDeliveryState2) => {
77
+ MessageDeliveryState2["Pending"] = "pending";
78
+ MessageDeliveryState2["Delivered"] = "delivered";
79
+ MessageDeliveryState2["Failed"] = "failed";
80
+ return MessageDeliveryState2;
81
+ })(MessageDeliveryState || {});
82
+ var MessageStreamingState = /* @__PURE__ */ ((MessageStreamingState2) => {
83
+ MessageStreamingState2["Streaming"] = "streaming";
84
+ MessageStreamingState2["Final"] = "final";
85
+ return MessageStreamingState2;
86
+ })(MessageStreamingState || {});
87
+ var CardKind = /* @__PURE__ */ ((CardKind2) => {
88
+ CardKind2["Permission"] = "permission";
89
+ CardKind2["Elicitation"] = "elicitation";
90
+ CardKind2["Notice"] = "notice";
91
+ return CardKind2;
92
+ })(CardKind || {});
93
+ var CardState = /* @__PURE__ */ ((CardState2) => {
94
+ CardState2["Open"] = "open";
95
+ CardState2["Resolved"] = "resolved";
96
+ CardState2["Answered"] = "answered";
97
+ CardState2["Cancelled"] = "cancelled";
98
+ CardState2["Expired"] = "expired";
99
+ return CardState2;
100
+ })(CardState || {});
101
+ var ParticipantChange = /* @__PURE__ */ ((ParticipantChange2) => {
102
+ ParticipantChange2["Joined"] = "joined";
103
+ ParticipantChange2["Left"] = "left";
104
+ ParticipantChange2["Updated"] = "updated";
105
+ return ParticipantChange2;
106
+ })(ParticipantChange || {});
107
+ var ConversationListChange = /* @__PURE__ */ ((ConversationListChange2) => {
108
+ ConversationListChange2["Created"] = "created";
109
+ ConversationListChange2["Updated"] = "updated";
110
+ ConversationListChange2["Removed"] = "removed";
111
+ return ConversationListChange2;
112
+ })(ConversationListChange || {});
113
+ var AgentHealthStatus = /* @__PURE__ */ ((AgentHealthStatus2) => {
114
+ AgentHealthStatus2["Ready"] = "ready";
115
+ AgentHealthStatus2["Degraded"] = "degraded";
116
+ AgentHealthStatus2["Starting"] = "starting";
117
+ return AgentHealthStatus2;
118
+ })(AgentHealthStatus || {});
119
+ var ProviderRefKind = /* @__PURE__ */ ((ProviderRefKind2) => {
120
+ ProviderRefKind2["Package"] = "package";
121
+ ProviderRefKind2["Bundle"] = "bundle";
122
+ return ProviderRefKind2;
123
+ })(ProviderRefKind || {});
124
+ var ProviderKind = /* @__PURE__ */ ((ProviderKind2) => {
125
+ ProviderKind2["Harness"] = "harness";
126
+ ProviderKind2["Sandbox"] = "sandbox";
127
+ ProviderKind2["Channel"] = "channel";
128
+ return ProviderKind2;
129
+ })(ProviderKind || {});
130
+ var ToolApproval = /* @__PURE__ */ ((ToolApproval2) => {
131
+ ToolApproval2["Allow"] = "allow";
132
+ ToolApproval2["Ask"] = "ask";
133
+ return ToolApproval2;
134
+ })(ToolApproval || {});
135
+ var SandboxAccess = /* @__PURE__ */ ((SandboxAccess2) => {
136
+ SandboxAccess2["Read"] = "read";
137
+ SandboxAccess2["Execute"] = "execute";
138
+ SandboxAccess2["Write"] = "write";
139
+ return SandboxAccess2;
140
+ })(SandboxAccess || {});
141
+ var SandboxAttach = /* @__PURE__ */ ((SandboxAttach2) => {
142
+ SandboxAttach2["Lazy"] = "lazy";
143
+ SandboxAttach2["OnPrompt"] = "on-prompt";
144
+ return SandboxAttach2;
145
+ })(SandboxAttach || {});
146
+ var DefinitionRepositoryKind = /* @__PURE__ */ ((DefinitionRepositoryKind2) => {
147
+ DefinitionRepositoryKind2["CodeStorage"] = "code-storage";
148
+ DefinitionRepositoryKind2["GitHub"] = "github";
149
+ return DefinitionRepositoryKind2;
150
+ })(DefinitionRepositoryKind || {});
151
+ var DefinitionStarterTemplate = /* @__PURE__ */ ((DefinitionStarterTemplate2) => {
152
+ DefinitionStarterTemplate2["Assistant"] = "assistant";
153
+ DefinitionStarterTemplate2["Coding"] = "coding";
154
+ return DefinitionStarterTemplate2;
155
+ })(DefinitionStarterTemplate || {});
156
+ var CommitFileEncoding = /* @__PURE__ */ ((CommitFileEncoding2) => {
157
+ CommitFileEncoding2["Utf8"] = "utf8";
158
+ CommitFileEncoding2["Base64"] = "base64";
159
+ return CommitFileEncoding2;
160
+ })(CommitFileEncoding || {});
161
+ var ManifestChangeKind = /* @__PURE__ */ ((ManifestChangeKind2) => {
162
+ ManifestChangeKind2["Added"] = "added";
163
+ ManifestChangeKind2["Removed"] = "removed";
164
+ ManifestChangeKind2["Changed"] = "changed";
165
+ return ManifestChangeKind2;
166
+ })(ManifestChangeKind || {});
167
+ var DiagnosticSeverity = /* @__PURE__ */ ((DiagnosticSeverity2) => {
168
+ DiagnosticSeverity2["Error"] = "error";
169
+ DiagnosticSeverity2["Warning"] = "warning";
170
+ DiagnosticSeverity2["Info"] = "info";
171
+ return DiagnosticSeverity2;
172
+ })(DiagnosticSeverity || {});
173
+ var CompatibilityCategory = /* @__PURE__ */ ((CompatibilityCategory2) => {
174
+ CompatibilityCategory2["HarnessConfig"] = "harness-config";
175
+ CompatibilityCategory2["McpServer"] = "mcp-server";
176
+ CompatibilityCategory2["BaseTool"] = "base-tool";
177
+ CompatibilityCategory2["Platform"] = "platform";
178
+ CompatibilityCategory2["UnusedFile"] = "unused-file";
179
+ return CompatibilityCategory2;
180
+ })(CompatibilityCategory || {});
181
+ var CompatibilityResult = /* @__PURE__ */ ((CompatibilityResult2) => {
182
+ CompatibilityResult2["Valid"] = "valid";
183
+ CompatibilityResult2["Applies"] = "applies";
184
+ CompatibilityResult2["Degraded"] = "degraded";
185
+ CompatibilityResult2["Invalid"] = "invalid";
186
+ CompatibilityResult2["Unsupported"] = "unsupported";
187
+ CompatibilityResult2["Unused"] = "unused";
188
+ CompatibilityResult2["Transformed"] = "transformed";
189
+ CompatibilityResult2["Unavailable"] = "unavailable";
190
+ CompatibilityResult2["Host"] = "host";
191
+ CompatibilityResult2["Absent"] = "absent";
192
+ CompatibilityResult2["Dynamic"] = "dynamic";
193
+ return CompatibilityResult2;
194
+ })(CompatibilityResult || {});
195
+ var CompatibilitySummary = /* @__PURE__ */ ((CompatibilitySummary2) => {
196
+ CompatibilitySummary2["Compatible"] = "compatible";
197
+ CompatibilitySummary2["Degraded"] = "degraded";
198
+ CompatibilitySummary2["Incompatible"] = "incompatible";
199
+ return CompatibilitySummary2;
200
+ })(CompatibilitySummary || {});
201
+ var SetupGuideBuildState = /* @__PURE__ */ ((SetupGuideBuildState2) => {
202
+ SetupGuideBuildState2["Pending"] = "pending";
203
+ SetupGuideBuildState2["Building"] = "building";
204
+ SetupGuideBuildState2["Ready"] = "ready";
205
+ SetupGuideBuildState2["Failed"] = "failed";
206
+ return SetupGuideBuildState2;
207
+ })(SetupGuideBuildState || {});
208
+ var ScheduleTarget = /* @__PURE__ */ ((ScheduleTarget2) => {
209
+ ScheduleTarget2["OwnerDirect"] = "owner-direct";
210
+ ScheduleTarget2["BoundConversation"] = "bound-conversation";
211
+ return ScheduleTarget2;
212
+ })(ScheduleTarget || {});
213
+ var ScheduleTriggerType = /* @__PURE__ */ ((ScheduleTriggerType2) => {
214
+ ScheduleTriggerType2["Once"] = "once";
215
+ ScheduleTriggerType2["Cron"] = "cron";
216
+ return ScheduleTriggerType2;
217
+ })(ScheduleTriggerType || {});
218
+ var ScheduleDelivery = /* @__PURE__ */ ((ScheduleDelivery2) => {
219
+ ScheduleDelivery2["Always"] = "always";
220
+ ScheduleDelivery2["IfNeeded"] = "if_needed";
221
+ return ScheduleDelivery2;
222
+ })(ScheduleDelivery || {});
223
+ var ScheduleSource = /* @__PURE__ */ ((ScheduleSource2) => {
224
+ ScheduleSource2["Definition"] = "definition";
225
+ ScheduleSource2["Runtime"] = "runtime";
226
+ return ScheduleSource2;
227
+ })(ScheduleSource || {});
228
+ var AgentApiErrorCode = /* @__PURE__ */ ((AgentApiErrorCode2) => {
229
+ AgentApiErrorCode2["Unauthorized"] = "unauthorized";
230
+ AgentApiErrorCode2["Forbidden"] = "forbidden";
231
+ AgentApiErrorCode2["NotFound"] = "not_found";
232
+ AgentApiErrorCode2["InvalidRequest"] = "invalid_request";
233
+ AgentApiErrorCode2["Conflict"] = "conflict";
234
+ AgentApiErrorCode2["RateLimited"] = "rate_limited";
235
+ AgentApiErrorCode2["Internal"] = "internal";
236
+ AgentApiErrorCode2["TurnRejected"] = "turn_rejected";
237
+ AgentApiErrorCode2["PendingNotFound"] = "pending_not_found";
238
+ AgentApiErrorCode2["PendingNotInAudience"] = "pending_not_in_audience";
239
+ AgentApiErrorCode2["PendingAlreadyResolved"] = "pending_already_resolved";
240
+ AgentApiErrorCode2["PendingExpired"] = "pending_expired";
241
+ AgentApiErrorCode2["CredentialUnavailable"] = "credential_unavailable";
242
+ return AgentApiErrorCode2;
243
+ })(AgentApiErrorCode || {});
244
+ var AgentRealtimeKind = /* @__PURE__ */ ((AgentRealtimeKind2) => {
245
+ AgentRealtimeKind2["AcpFrame"] = "acp.frame";
246
+ AgentRealtimeKind2["AcpLiveFrame"] = "acp.frame.live";
247
+ AgentRealtimeKind2["AcpLiveReset"] = "acp.live.reset";
248
+ AgentRealtimeKind2["AcpPreview"] = "acp.preview";
249
+ AgentRealtimeKind2["AcpPending"] = "acp.pending";
250
+ AgentRealtimeKind2["SessionState"] = "session.state";
251
+ AgentRealtimeKind2["MessageCreated"] = "conversation.message.created";
252
+ AgentRealtimeKind2["MessageUpdated"] = "conversation.message.updated";
253
+ AgentRealtimeKind2["MessageDeleted"] = "conversation.message.deleted";
254
+ AgentRealtimeKind2["ReactionChanged"] = "conversation.reaction.changed";
255
+ AgentRealtimeKind2["ParticipantChanged"] = "conversation.participant.changed";
256
+ AgentRealtimeKind2["ConversationUpdated"] = "conversation.updated";
257
+ AgentRealtimeKind2["ConversationRead"] = "conversation.read";
258
+ AgentRealtimeKind2["ConversationTyping"] = "conversation.typing";
259
+ AgentRealtimeKind2["TurnStarted"] = "conversation.turn.started";
260
+ AgentRealtimeKind2["TurnEnded"] = "conversation.turn.ended";
261
+ AgentRealtimeKind2["ConversationListChanged"] = "conversation.list.changed";
262
+ return AgentRealtimeKind2;
263
+ })(AgentRealtimeKind || {});
264
+ export {
265
+ AcpFrameDirection,
266
+ AcpPreviewKind,
267
+ AgentApiErrorCode,
268
+ AgentHealthStatus,
269
+ AgentRealtimeKind,
270
+ AgentSessionState,
271
+ AgentTurnPolicy,
272
+ CardKind,
273
+ CardState,
274
+ CommitFileEncoding,
275
+ CompatibilityCategory,
276
+ CompatibilityResult,
277
+ CompatibilitySummary,
278
+ ConversationKind,
279
+ ConversationListChange,
280
+ ConversationMessageKind,
281
+ DefinitionRepositoryKind,
282
+ DefinitionStarterTemplate,
283
+ DiagnosticSeverity,
284
+ ManifestChangeKind,
285
+ MessageDeliveryState,
286
+ MessageStreamingState,
287
+ MessageThreadFilter,
288
+ ParticipantChange,
289
+ ParticipantKind,
290
+ ParticipantRole,
291
+ PendingEventState,
292
+ PendingRequestKind,
293
+ ProviderKind,
294
+ ProviderRefKind,
295
+ RoutingMode,
296
+ SandboxAccess,
297
+ SandboxAttach,
298
+ ScheduleDelivery,
299
+ ScheduleSource,
300
+ ScheduleTarget,
301
+ ScheduleTriggerType,
302
+ SetupGuideBuildState,
303
+ SystemParticipantKind,
304
+ ToolApproval
305
+ };
306
+ //# sourceMappingURL=enums.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/agent-platform/enums.ts"],
4
+ "sourcesContent": ["// Wire vocabularies of the agent platform API (`/api/v1/*`) and its realtime\n// topics. Values mirror `@finalai/agent-provider` and the `agent` schema's enums\n// as strings; clients parse every one through `tolerantStringEnum`, so a value\n// a bundle predates becomes `WireFallback.Unrecognized`.\n\nexport enum AgentSessionState {\n Idle = 'idle',\n Running = 'running',\n RequiresAction = 'requires_action',\n Parked = 'parked',\n Closed = 'closed',\n Failed = 'failed',\n}\n\nexport enum AgentTurnPolicy {\n Steer = 'steer',\n Queue = 'queue',\n}\n\nexport enum AcpFrameDirection {\n ClientToAgent = 'client_to_agent',\n AgentToClient = 'agent_to_client',\n}\n\nexport enum PendingRequestKind {\n Permission = 'permission',\n Elicitation = 'elicitation',\n}\n\nexport enum PendingEventState {\n Created = 'created',\n Resolved = 'resolved',\n}\n\nexport enum AcpPreviewKind {\n AgentMessage = 'agent_message',\n AgentThought = 'agent_thought',\n}\n\nexport enum ConversationKind {\n Direct = 'direct',\n Group = 'group',\n}\n\nexport enum ParticipantKind {\n User = 'user',\n Agent = 'agent',\n System = 'system',\n}\n\nexport enum SystemParticipantKind {\n Schedule = 'schedule',\n Webhook = 'webhook',\n Goal = 'goal',\n Tool = 'tool',\n ApiKey = 'api-key',\n}\n\nexport enum ParticipantRole {\n Owner = 'owner',\n Admin = 'admin',\n Member = 'member',\n}\n\nexport enum RoutingMode {\n Mention = 'mention',\n All = 'all',\n Default = 'default',\n}\n\nexport enum ConversationMessageKind {\n Message = 'message',\n System = 'system',\n Card = 'card',\n}\n\n/** Special values of `GET /conversations/:id/messages?thread=`. */\nexport enum MessageThreadFilter {\n All = 'all',\n}\n\n/** Whether an agent recipient got a conversation message. */\nexport enum MessageDeliveryState {\n Pending = 'pending',\n Delivered = 'delivered',\n Failed = 'failed',\n}\n\nexport enum MessageStreamingState {\n Streaming = 'streaming',\n Final = 'final',\n}\n\nexport enum CardKind {\n Permission = 'permission',\n Elicitation = 'elicitation',\n Notice = 'notice',\n}\n\nexport enum CardState {\n Open = 'open',\n Resolved = 'resolved',\n Answered = 'answered',\n Cancelled = 'cancelled',\n Expired = 'expired',\n}\n\nexport enum ParticipantChange {\n Joined = 'joined',\n Left = 'left',\n Updated = 'updated',\n}\n\nexport enum ConversationListChange {\n Created = 'created',\n Updated = 'updated',\n Removed = 'removed',\n}\n\nexport enum AgentHealthStatus {\n Ready = 'ready',\n Degraded = 'degraded',\n Starting = 'starting',\n}\n\nexport enum ProviderRefKind {\n Package = 'package',\n Bundle = 'bundle',\n}\n\nexport enum ProviderKind {\n Harness = 'harness',\n Sandbox = 'sandbox',\n Channel = 'channel',\n}\n\nexport enum ToolApproval {\n Allow = 'allow',\n Ask = 'ask',\n}\n\nexport enum SandboxAccess {\n Read = 'read',\n // Runs processes without writing files.\n Execute = 'execute',\n Write = 'write',\n}\n\nexport enum SandboxAttach {\n Lazy = 'lazy',\n OnPrompt = 'on-prompt',\n}\n\nexport enum DefinitionRepositoryKind {\n CodeStorage = 'code-storage',\n GitHub = 'github',\n}\n\n/** The starter a new Final-hosted definition's repository is created from (Build's templates). */\nexport enum DefinitionStarterTemplate {\n /** Chats and uses its tools; no base tools. */\n Assistant = 'assistant',\n /** Shell and file tools on a computer. */\n Coding = 'coding',\n}\n\nexport enum CommitFileEncoding {\n Utf8 = 'utf8',\n Base64 = 'base64',\n}\n\n/** One path of a revision diff (`GET /definitions/:id/revisions/diff`). */\nexport enum ManifestChangeKind {\n Added = 'added',\n Removed = 'removed',\n Changed = 'changed',\n}\n\nexport enum DiagnosticSeverity {\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n}\n\nexport enum CompatibilityCategory {\n HarnessConfig = 'harness-config',\n McpServer = 'mcp-server',\n BaseTool = 'base-tool',\n Platform = 'platform',\n UnusedFile = 'unused-file',\n}\n\nexport enum CompatibilityResult {\n Valid = 'valid',\n Applies = 'applies',\n Degraded = 'degraded',\n Invalid = 'invalid',\n Unsupported = 'unsupported',\n Unused = 'unused',\n Transformed = 'transformed',\n Unavailable = 'unavailable',\n Host = 'host',\n Absent = 'absent',\n Dynamic = 'dynamic',\n}\n\nexport enum CompatibilitySummary {\n Compatible = 'compatible',\n Degraded = 'degraded',\n Incompatible = 'incompatible',\n}\n\nexport enum SetupGuideBuildState {\n Pending = 'pending',\n Building = 'building',\n Ready = 'ready',\n Failed = 'failed',\n}\n\nexport enum ScheduleTarget {\n OwnerDirect = 'owner-direct',\n BoundConversation = 'bound-conversation',\n}\n\n// The values of Final's legacy scheduled tasks, which agents already use.\nexport enum ScheduleTriggerType {\n Once = 'once',\n Cron = 'cron',\n}\n\nexport enum ScheduleDelivery {\n // Every firing gets a visible reply (reminders).\n Always = 'always',\n // The agent replies only when there is something to say (checks).\n IfNeeded = 'if_needed',\n}\n\nexport enum ScheduleSource {\n // Declared by the agent definition; materialized on publish.\n Definition = 'definition',\n // Created in a conversation through the schedules API.\n Runtime = 'runtime',\n}\n\n/** Error codes the API returns in `{ error: { code } }`; unknown codes are kept as strings. */\nexport enum AgentApiErrorCode {\n Unauthorized = 'unauthorized',\n Forbidden = 'forbidden',\n NotFound = 'not_found',\n InvalidRequest = 'invalid_request',\n Conflict = 'conflict',\n RateLimited = 'rate_limited',\n Internal = 'internal',\n TurnRejected = 'turn_rejected',\n PendingNotFound = 'pending_not_found',\n PendingNotInAudience = 'pending_not_in_audience',\n PendingAlreadyResolved = 'pending_already_resolved',\n PendingExpired = 'pending_expired',\n // No credential in the agent's chain can pay for the turn; `reason` says why\n // (subscription_not_connected, usage_exhausted, budget_exceeded, ...).\n CredentialUnavailable = 'credential_unavailable',\n}\n\n/** Realtime event kinds (SPEC 4.2); the gateway envelope's `kind`. */\nexport enum AgentRealtimeKind {\n AcpFrame = 'acp.frame',\n AcpLiveFrame = 'acp.frame.live',\n AcpLiveReset = 'acp.live.reset',\n AcpPreview = 'acp.preview',\n AcpPending = 'acp.pending',\n SessionState = 'session.state',\n MessageCreated = 'conversation.message.created',\n MessageUpdated = 'conversation.message.updated',\n MessageDeleted = 'conversation.message.deleted',\n ReactionChanged = 'conversation.reaction.changed',\n ParticipantChanged = 'conversation.participant.changed',\n ConversationUpdated = 'conversation.updated',\n ConversationRead = 'conversation.read',\n ConversationTyping = 'conversation.typing',\n TurnStarted = 'conversation.turn.started',\n TurnEnded = 'conversation.turn.ended',\n ConversationListChanged = 'conversation.list.changed',\n}\n"],
5
+ "mappings": "AAKO,IAAK,oBAAL,kBAAKA,uBAAL;AACL,EAAAA,mBAAA,UAAO;AACP,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,oBAAiB;AACjB,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,YAAS;AACT,EAAAA,mBAAA,YAAS;AANC,SAAAA;AAAA,GAAA;AASL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,WAAQ;AACR,EAAAA,iBAAA,WAAQ;AAFE,SAAAA;AAAA,GAAA;AAKL,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,mBAAA,mBAAgB;AAChB,EAAAA,mBAAA,mBAAgB;AAFN,SAAAA;AAAA,GAAA;AAKL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,gBAAa;AACb,EAAAA,oBAAA,iBAAc;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,cAAW;AAFD,SAAAA;AAAA,GAAA;AAKL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,kBAAe;AACf,EAAAA,gBAAA,kBAAe;AAFL,SAAAA;AAAA,GAAA;AAKL,IAAK,mBAAL,kBAAKC,sBAAL;AACL,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,WAAQ;AAFE,SAAAA;AAAA,GAAA;AAKL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mBAAA,oBAAiB;AACjB,EAAAA,mBAAA,qBAAkB;AAClB,EAAAA,mBAAA,wBAAqB;AACrB,EAAAA,mBAAA,yBAAsB;AACtB,EAAAA,mBAAA,sBAAmB;AACnB,EAAAA,mBAAA,wBAAqB;AACrB,EAAAA,mBAAA,iBAAc;AACd,EAAAA,mBAAA,eAAY;AACZ,EAAAA,mBAAA,6BAA0B;AAjBhB,SAAAA;AAAA,GAAA;",
6
+ "names": ["AgentSessionState", "AgentTurnPolicy", "AcpFrameDirection", "PendingRequestKind", "PendingEventState", "AcpPreviewKind", "ConversationKind", "ParticipantKind", "SystemParticipantKind", "ParticipantRole", "RoutingMode", "ConversationMessageKind", "MessageThreadFilter", "MessageDeliveryState", "MessageStreamingState", "CardKind", "CardState", "ParticipantChange", "ConversationListChange", "AgentHealthStatus", "ProviderRefKind", "ProviderKind", "ToolApproval", "SandboxAccess", "SandboxAttach", "DefinitionRepositoryKind", "DefinitionStarterTemplate", "CommitFileEncoding", "ManifestChangeKind", "DiagnosticSeverity", "CompatibilityCategory", "CompatibilityResult", "CompatibilitySummary", "SetupGuideBuildState", "ScheduleTarget", "ScheduleTriggerType", "ScheduleDelivery", "ScheduleSource", "AgentApiErrorCode", "AgentRealtimeKind"]
7
+ }
@@ -0,0 +1,13 @@
1
+ export * from "./agents.mjs";
2
+ export * from "./build.mjs";
3
+ export * from "./common.mjs";
4
+ export * from "./conversation-schedules.mjs";
5
+ export * from "./conversations.mjs";
6
+ export * from "./enums.mjs";
7
+ export * from "./links.mjs";
8
+ export * from "./people.mjs";
9
+ export * from "./realtime.mjs";
10
+ export * from "./sandboxes.mjs";
11
+ export * from "./sessions.mjs";
12
+ export { WireFallback } from "../tolerance.mjs";
13
+ export type { JsonObjectIface, JsonValue } from "../json.mjs";
@@ -0,0 +1,16 @@
1
+ export * from "./agents.mjs";
2
+ export * from "./build.mjs";
3
+ export * from "./common.mjs";
4
+ export * from "./conversation-schedules.mjs";
5
+ export * from "./conversations.mjs";
6
+ export * from "./enums.mjs";
7
+ export * from "./links.mjs";
8
+ export * from "./people.mjs";
9
+ export * from "./realtime.mjs";
10
+ export * from "./sandboxes.mjs";
11
+ export * from "./sessions.mjs";
12
+ import { WireFallback } from "../tolerance.mjs";
13
+ export {
14
+ WireFallback
15
+ };
16
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/agent-platform/index.ts"],
4
+ "sourcesContent": ["export * from \"./agents.mjs\";\nexport * from \"./build.mjs\";\nexport * from \"./common.mjs\";\nexport * from \"./conversation-schedules.mjs\";\nexport * from \"./conversations.mjs\";\nexport * from \"./enums.mjs\";\nexport * from \"./links.mjs\";\nexport * from \"./people.mjs\";\nexport * from \"./realtime.mjs\";\nexport * from \"./sandboxes.mjs\";\nexport * from \"./sessions.mjs\";\nexport { WireFallback } from \"../tolerance.mjs\";\nexport type { JsonObjectIface, JsonValue } from \"../json.mjs\";\n"],
5
+ "mappings": "AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,oBAAoB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,77 @@
1
+ import * as z from 'zod';
2
+ /** What the linked conversation's agents are doing now. */
3
+ export declare enum LinkedConversationActivity {
4
+ Working = "working",
5
+ WaitingForPerson = "waiting_for_person",
6
+ Failed = "failed",
7
+ Idle = "idle"
8
+ }
9
+ export declare const conversationLinkSchema: z.ZodObject<{
10
+ id: z.ZodString;
11
+ parentConversationId: z.ZodString;
12
+ conversation: z.ZodObject<{
13
+ id: z.ZodString;
14
+ organizationId: z.ZodString;
15
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").ConversationKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
16
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
17
+ isHome: z.ZodDefault<z.ZodBoolean>;
18
+ turnPolicy: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").AgentTurnPolicy>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
19
+ lastMessageSeq: z.ZodDefault<z.ZodNumber>;
20
+ lastMessagePreview: z.ZodDefault<z.ZodNullable<z.ZodString>>;
21
+ lastMessageAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
22
+ unreadCount: z.ZodDefault<z.ZodNumber>;
23
+ participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").ParticipantKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
26
+ displayName: z.ZodString;
27
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
28
+ userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
29
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
30
+ }, z.core.$strip>>>;
31
+ archivedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
32
+ createdAt: z.ZodString;
33
+ updatedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
34
+ }, z.core.$strip>;
35
+ activity: z.ZodUnion<readonly [z.ZodEnum<typeof LinkedConversationActivity>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
36
+ createdByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
37
+ createdAt: z.ZodString;
38
+ }, z.core.$strip>;
39
+ export type ConversationLinkIface = z.infer<typeof conversationLinkSchema>;
40
+ export declare const conversationLinkListSchema: z.ZodObject<{
41
+ links: z.ZodArray<z.ZodObject<{
42
+ id: z.ZodString;
43
+ parentConversationId: z.ZodString;
44
+ conversation: z.ZodObject<{
45
+ id: z.ZodString;
46
+ organizationId: z.ZodString;
47
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").ConversationKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
48
+ title: z.ZodDefault<z.ZodNullable<z.ZodString>>;
49
+ isHome: z.ZodDefault<z.ZodBoolean>;
50
+ turnPolicy: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").AgentTurnPolicy>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
51
+ lastMessageSeq: z.ZodDefault<z.ZodNumber>;
52
+ lastMessagePreview: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
+ lastMessageAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
54
+ unreadCount: z.ZodDefault<z.ZodNumber>;
55
+ participants: z.ZodDefault<z.ZodArray<z.ZodObject<{
56
+ id: z.ZodString;
57
+ kind: z.ZodUnion<readonly [z.ZodEnum<typeof import("./enums.mjs").ParticipantKind>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
58
+ displayName: z.ZodString;
59
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
60
+ userId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
61
+ agentId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
62
+ }, z.core.$strip>>>;
63
+ archivedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
64
+ createdAt: z.ZodString;
65
+ updatedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
66
+ }, z.core.$strip>;
67
+ activity: z.ZodUnion<readonly [z.ZodEnum<typeof LinkedConversationActivity>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("./index.mjs").WireFallback, unknown>>]>;
68
+ createdByUserId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
69
+ createdAt: z.ZodString;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>;
72
+ export type ConversationLinkListIface = z.infer<typeof conversationLinkListSchema>;
73
+ /** Links a conversation the caller is also a member of; linking it again returns the link. */
74
+ export declare const createConversationLinkRequestSchema: z.ZodObject<{
75
+ conversationId: z.ZodString;
76
+ }, z.core.$strict>;
77
+ export type CreateConversationLinkRequestIface = z.infer<typeof createConversationLinkRequestSchema>;
@@ -0,0 +1,34 @@
1
+ import * as z from "zod";
2
+ import { tolerantStringEnum } from "../tolerance.mjs";
3
+ import { nullableString } from "./common.mjs";
4
+ import { conversationSchema } from "./conversations.mjs";
5
+ var LinkedConversationActivity = /* @__PURE__ */ ((LinkedConversationActivity2) => {
6
+ LinkedConversationActivity2["Working"] = "working";
7
+ LinkedConversationActivity2["WaitingForPerson"] = "waiting_for_person";
8
+ LinkedConversationActivity2["Failed"] = "failed";
9
+ LinkedConversationActivity2["Idle"] = "idle";
10
+ return LinkedConversationActivity2;
11
+ })(LinkedConversationActivity || {});
12
+ const conversationLinkSchema = z.object({
13
+ id: z.string(),
14
+ /** The conversation that linked it. */
15
+ parentConversationId: z.string(),
16
+ /** The linked conversation. */
17
+ conversation: conversationSchema,
18
+ activity: tolerantStringEnum(LinkedConversationActivity),
19
+ createdByUserId: nullableString(),
20
+ createdAt: z.string()
21
+ });
22
+ const conversationLinkListSchema = z.object({
23
+ links: z.array(conversationLinkSchema)
24
+ });
25
+ const createConversationLinkRequestSchema = z.strictObject({
26
+ conversationId: z.string().min(1)
27
+ });
28
+ export {
29
+ LinkedConversationActivity,
30
+ conversationLinkListSchema,
31
+ conversationLinkSchema,
32
+ createConversationLinkRequestSchema
33
+ };
34
+ //# sourceMappingURL=links.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/agent-platform/links.ts"],
4
+ "sourcesContent": ["import * as z from 'zod';\n\nimport { tolerantStringEnum } from \"../tolerance.mjs\";\n\nimport { nullableString } from \"./common.mjs\";\n\nimport { conversationSchema } from \"./conversations.mjs\";\n\n// Linked conversations (`/api/v1/conversations/:id/links`): conversations a\n// conversation handed work to. When a linked conversation's agent ends a turn\n// with a reply, fails, or waits for a person, a system message about it is\n// posted to the conversation that linked it (an agent-events message, routed\n// like any other).\n\n/** What the linked conversation's agents are doing now. */\nexport enum LinkedConversationActivity {\n Working = 'working',\n WaitingForPerson = 'waiting_for_person',\n Failed = 'failed',\n Idle = 'idle',\n}\n\nexport const conversationLinkSchema = z.object({\n id: z.string(),\n /** The conversation that linked it. */\n parentConversationId: z.string(),\n /** The linked conversation. */\n conversation: conversationSchema,\n activity: tolerantStringEnum(LinkedConversationActivity),\n createdByUserId: nullableString(),\n createdAt: z.string(),\n});\n\nexport type ConversationLinkIface = z.infer<typeof conversationLinkSchema>;\n\nexport const conversationLinkListSchema = z.object({\n links: z.array(conversationLinkSchema),\n});\n\nexport type ConversationLinkListIface = z.infer<typeof conversationLinkListSchema>;\n\n/** Links a conversation the caller is also a member of; linking it again returns the link. */\nexport const createConversationLinkRequestSchema = z.strictObject({\n conversationId: z.string().min(1),\n});\n\nexport type CreateConversationLinkRequestIface = z.infer<\n typeof createConversationLinkRequestSchema\n>;\n"],
5
+ "mappings": "AAAA,YAAY,OAAO;AAEnB,SAAS,0BAA0B;AAEnC,SAAS,sBAAsB;AAE/B,SAAS,0BAA0B;AAS5B,IAAK,6BAAL,kBAAKA,gCAAL;AACL,EAAAA,4BAAA,aAAU;AACV,EAAAA,4BAAA,sBAAmB;AACnB,EAAAA,4BAAA,YAAS;AACT,EAAAA,4BAAA,UAAO;AAJG,SAAAA;AAAA,GAAA;AAOL,MAAM,yBAAyB,EAAE,OAAO;AAAA,EAC7C,IAAI,EAAE,OAAO;AAAA;AAAA,EAEb,sBAAsB,EAAE,OAAO;AAAA;AAAA,EAE/B,cAAc;AAAA,EACd,UAAU,mBAAmB,0BAA0B;AAAA,EACvD,iBAAiB,eAAe;AAAA,EAChC,WAAW,EAAE,OAAO;AACtB,CAAC;AAIM,MAAM,6BAA6B,EAAE,OAAO;AAAA,EACjD,OAAO,EAAE,MAAM,sBAAsB;AACvC,CAAC;AAKM,MAAM,sCAAsC,EAAE,aAAa;AAAA,EAChE,gBAAgB,EAAE,OAAO,EAAE,IAAI,CAAC;AAClC,CAAC;",
6
+ "names": ["LinkedConversationActivity"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import * as z from 'zod';
2
+ export declare const personSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
+ }, z.core.$strip>;
7
+ export type PersonIface = z.infer<typeof personSchema>;
8
+ export declare const personListSchema: z.ZodObject<{
9
+ people: z.ZodArray<z.ZodObject<{
10
+ id: z.ZodString;
11
+ name: z.ZodString;
12
+ avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
13
+ }, z.core.$strip>>;
14
+ nextCursor: z.ZodDefault<z.ZodNullable<z.ZodString>>;
15
+ }, z.core.$strip>;
16
+ export type PersonListIface = z.infer<typeof personListSchema>;
17
+ export declare const listPeopleQuerySchema: z.ZodObject<{
18
+ cursor: z.ZodOptional<z.ZodString>;
19
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
20
+ }, z.core.$strict>;
21
+ export type ListPeopleQueryIface = z.infer<typeof listPeopleQuerySchema>;
@@ -0,0 +1,22 @@
1
+ import * as z from "zod";
2
+ import { nullableString } from "./common.mjs";
3
+ const personSchema = z.object({
4
+ /** Wire user id, the form participants carry as `userId`. */
5
+ id: z.string(),
6
+ name: z.string(),
7
+ avatarUrl: nullableString()
8
+ });
9
+ const personListSchema = z.object({
10
+ people: z.array(personSchema),
11
+ nextCursor: nullableString()
12
+ });
13
+ const listPeopleQuerySchema = z.strictObject({
14
+ cursor: z.string().min(1).max(500).optional(),
15
+ limit: z.coerce.number().int().positive().max(200).optional()
16
+ });
17
+ export {
18
+ listPeopleQuerySchema,
19
+ personListSchema,
20
+ personSchema
21
+ };
22
+ //# sourceMappingURL=people.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/agent-platform/people.ts"],
4
+ "sourcesContent": ["import * as z from 'zod';\n\nimport { nullableString } from \"./common.mjs\";\n\n// `GET /api/v1/people`: the active members of the caller's organization, the\n// users a conversation admits as `{ user }` participants. Agents come from\n// `/api/v1/agents`.\n\nexport const personSchema = z.object({\n /** Wire user id, the form participants carry as `userId`. */\n id: z.string(),\n name: z.string(),\n avatarUrl: nullableString(),\n});\n\nexport type PersonIface = z.infer<typeof personSchema>;\n\nexport const personListSchema = z.object({\n people: z.array(personSchema),\n nextCursor: nullableString(),\n});\n\nexport type PersonListIface = z.infer<typeof personListSchema>;\n\nexport const listPeopleQuerySchema = z.strictObject({\n cursor: z.string().min(1).max(500).optional(),\n limit: z.coerce.number().int().positive().max(200).optional(),\n});\n\nexport type ListPeopleQueryIface = z.infer<typeof listPeopleQuerySchema>;\n"],
5
+ "mappings": "AAAA,YAAY,OAAO;AAEnB,SAAS,sBAAsB;AAMxB,MAAM,eAAe,EAAE,OAAO;AAAA;AAAA,EAEnC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO;AAAA,EACf,WAAW,eAAe;AAC5B,CAAC;AAIM,MAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,QAAQ,EAAE,MAAM,YAAY;AAAA,EAC5B,YAAY,eAAe;AAC7B,CAAC;AAIM,MAAM,wBAAwB,EAAE,aAAa;AAAA,EAClD,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EAC5C,OAAO,EAAE,OAAO,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,EAAE,SAAS;AAC9D,CAAC;",
6
+ "names": []
7
+ }