bopodev-agent-sdk 0.1.1

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.
@@ -0,0 +1,995 @@
1
+ import { z } from "zod";
2
+ export declare const EntityIdSchema: z.ZodString;
3
+ export type EntityId = z.infer<typeof EntityIdSchema>;
4
+ export declare const CompanySchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ name: z.ZodString;
7
+ mission: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ createdAt: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const ProjectSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ companyId: z.ZodString;
13
+ name: z.ZodString;
14
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ status: z.ZodEnum<{
16
+ planned: "planned";
17
+ active: "active";
18
+ paused: "paused";
19
+ blocked: "blocked";
20
+ completed: "completed";
21
+ archived: "archived";
22
+ }>;
23
+ plannedStartAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ workspaceLocalPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ workspaceGithubRepo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ createdAt: z.ZodString;
27
+ }, z.core.$strip>;
28
+ export declare const IssueStatusSchema: z.ZodEnum<{
29
+ blocked: "blocked";
30
+ todo: "todo";
31
+ in_progress: "in_progress";
32
+ in_review: "in_review";
33
+ done: "done";
34
+ canceled: "canceled";
35
+ }>;
36
+ export type IssueStatus = z.infer<typeof IssueStatusSchema>;
37
+ export declare const IssuePrioritySchema: z.ZodEnum<{
38
+ none: "none";
39
+ low: "low";
40
+ medium: "medium";
41
+ high: "high";
42
+ urgent: "urgent";
43
+ }>;
44
+ export type IssuePriority = z.infer<typeof IssuePrioritySchema>;
45
+ export declare const IssueSchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ companyId: z.ZodString;
48
+ projectId: z.ZodString;
49
+ parentIssueId: z.ZodNullable<z.ZodString>;
50
+ title: z.ZodString;
51
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ status: z.ZodEnum<{
53
+ blocked: "blocked";
54
+ todo: "todo";
55
+ in_progress: "in_progress";
56
+ in_review: "in_review";
57
+ done: "done";
58
+ canceled: "canceled";
59
+ }>;
60
+ priority: z.ZodEnum<{
61
+ none: "none";
62
+ low: "low";
63
+ medium: "medium";
64
+ high: "high";
65
+ urgent: "urgent";
66
+ }>;
67
+ assigneeAgentId: z.ZodNullable<z.ZodString>;
68
+ labels: z.ZodDefault<z.ZodArray<z.ZodString>>;
69
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
70
+ createdAt: z.ZodString;
71
+ updatedAt: z.ZodString;
72
+ }, z.core.$strip>;
73
+ export declare const GoalLevelSchema: z.ZodEnum<{
74
+ company: "company";
75
+ project: "project";
76
+ agent: "agent";
77
+ }>;
78
+ export declare const GoalSchema: z.ZodObject<{
79
+ id: z.ZodString;
80
+ companyId: z.ZodString;
81
+ projectId: z.ZodNullable<z.ZodString>;
82
+ parentGoalId: z.ZodNullable<z.ZodString>;
83
+ level: z.ZodEnum<{
84
+ company: "company";
85
+ project: "project";
86
+ agent: "agent";
87
+ }>;
88
+ title: z.ZodString;
89
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
+ status: z.ZodEnum<{
91
+ active: "active";
92
+ completed: "completed";
93
+ archived: "archived";
94
+ draft: "draft";
95
+ }>;
96
+ createdAt: z.ZodString;
97
+ updatedAt: z.ZodString;
98
+ }, z.core.$strip>;
99
+ export declare const AgentStatusSchema: z.ZodEnum<{
100
+ paused: "paused";
101
+ idle: "idle";
102
+ running: "running";
103
+ terminated: "terminated";
104
+ }>;
105
+ export declare const ProviderTypeSchema: z.ZodEnum<{
106
+ claude_code: "claude_code";
107
+ codex: "codex";
108
+ http: "http";
109
+ shell: "shell";
110
+ }>;
111
+ export type ProviderType = z.infer<typeof ProviderTypeSchema>;
112
+ export declare const AgentSchema: z.ZodObject<{
113
+ id: z.ZodString;
114
+ companyId: z.ZodString;
115
+ managerAgentId: z.ZodNullable<z.ZodString>;
116
+ role: z.ZodString;
117
+ name: z.ZodString;
118
+ providerType: z.ZodEnum<{
119
+ claude_code: "claude_code";
120
+ codex: "codex";
121
+ http: "http";
122
+ shell: "shell";
123
+ }>;
124
+ status: z.ZodEnum<{
125
+ paused: "paused";
126
+ idle: "idle";
127
+ running: "running";
128
+ terminated: "terminated";
129
+ }>;
130
+ heartbeatCron: z.ZodString;
131
+ monthlyBudgetUsd: z.ZodNumber;
132
+ usedBudgetUsd: z.ZodDefault<z.ZodNumber>;
133
+ tokenUsage: z.ZodDefault<z.ZodNumber>;
134
+ canHireAgents: z.ZodDefault<z.ZodBoolean>;
135
+ createdAt: z.ZodString;
136
+ updatedAt: z.ZodString;
137
+ }, z.core.$strip>;
138
+ export declare const ApprovalActionSchema: z.ZodEnum<{
139
+ hire_agent: "hire_agent";
140
+ activate_goal: "activate_goal";
141
+ override_budget: "override_budget";
142
+ pause_agent: "pause_agent";
143
+ terminate_agent: "terminate_agent";
144
+ }>;
145
+ export declare const ApprovalRequestSchema: z.ZodObject<{
146
+ id: z.ZodString;
147
+ companyId: z.ZodString;
148
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
149
+ action: z.ZodEnum<{
150
+ hire_agent: "hire_agent";
151
+ activate_goal: "activate_goal";
152
+ override_budget: "override_budget";
153
+ pause_agent: "pause_agent";
154
+ terminate_agent: "terminate_agent";
155
+ }>;
156
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
157
+ status: z.ZodEnum<{
158
+ pending: "pending";
159
+ approved: "approved";
160
+ rejected: "rejected";
161
+ overridden: "overridden";
162
+ }>;
163
+ createdAt: z.ZodString;
164
+ resolvedAt: z.ZodNullable<z.ZodString>;
165
+ }, z.core.$strip>;
166
+ export type ApprovalRequest = z.infer<typeof ApprovalRequestSchema>;
167
+ export declare const ApprovalNotificationEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
168
+ type: z.ZodLiteral<"approvals.snapshot">;
169
+ approvals: z.ZodArray<z.ZodObject<{
170
+ id: z.ZodString;
171
+ companyId: z.ZodString;
172
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
173
+ action: z.ZodEnum<{
174
+ hire_agent: "hire_agent";
175
+ activate_goal: "activate_goal";
176
+ override_budget: "override_budget";
177
+ pause_agent: "pause_agent";
178
+ terminate_agent: "terminate_agent";
179
+ }>;
180
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
181
+ status: z.ZodEnum<{
182
+ pending: "pending";
183
+ approved: "approved";
184
+ rejected: "rejected";
185
+ overridden: "overridden";
186
+ }>;
187
+ createdAt: z.ZodString;
188
+ resolvedAt: z.ZodNullable<z.ZodString>;
189
+ }, z.core.$strip>>;
190
+ }, z.core.$strip>, z.ZodObject<{
191
+ type: z.ZodLiteral<"approval.created">;
192
+ approval: z.ZodObject<{
193
+ id: z.ZodString;
194
+ companyId: z.ZodString;
195
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
196
+ action: z.ZodEnum<{
197
+ hire_agent: "hire_agent";
198
+ activate_goal: "activate_goal";
199
+ override_budget: "override_budget";
200
+ pause_agent: "pause_agent";
201
+ terminate_agent: "terminate_agent";
202
+ }>;
203
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
204
+ status: z.ZodEnum<{
205
+ pending: "pending";
206
+ approved: "approved";
207
+ rejected: "rejected";
208
+ overridden: "overridden";
209
+ }>;
210
+ createdAt: z.ZodString;
211
+ resolvedAt: z.ZodNullable<z.ZodString>;
212
+ }, z.core.$strip>;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ type: z.ZodLiteral<"approval.resolved">;
215
+ approval: z.ZodObject<{
216
+ id: z.ZodString;
217
+ companyId: z.ZodString;
218
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
219
+ action: z.ZodEnum<{
220
+ hire_agent: "hire_agent";
221
+ activate_goal: "activate_goal";
222
+ override_budget: "override_budget";
223
+ pause_agent: "pause_agent";
224
+ terminate_agent: "terminate_agent";
225
+ }>;
226
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
227
+ status: z.ZodEnum<{
228
+ pending: "pending";
229
+ approved: "approved";
230
+ rejected: "rejected";
231
+ overridden: "overridden";
232
+ }>;
233
+ createdAt: z.ZodString;
234
+ resolvedAt: z.ZodNullable<z.ZodString>;
235
+ }, z.core.$strip>;
236
+ }, z.core.$strip>], "type">;
237
+ export type ApprovalNotificationEvent = z.infer<typeof ApprovalNotificationEventSchema>;
238
+ export declare const GovernanceInboxItemSchema: z.ZodObject<{
239
+ approval: z.ZodObject<{
240
+ id: z.ZodString;
241
+ companyId: z.ZodString;
242
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
243
+ action: z.ZodEnum<{
244
+ hire_agent: "hire_agent";
245
+ activate_goal: "activate_goal";
246
+ override_budget: "override_budget";
247
+ pause_agent: "pause_agent";
248
+ terminate_agent: "terminate_agent";
249
+ }>;
250
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
251
+ status: z.ZodEnum<{
252
+ pending: "pending";
253
+ approved: "approved";
254
+ rejected: "rejected";
255
+ overridden: "overridden";
256
+ }>;
257
+ createdAt: z.ZodString;
258
+ resolvedAt: z.ZodNullable<z.ZodString>;
259
+ }, z.core.$strip>;
260
+ seenAt: z.ZodNullable<z.ZodString>;
261
+ dismissedAt: z.ZodNullable<z.ZodString>;
262
+ isPending: z.ZodBoolean;
263
+ }, z.core.$strip>;
264
+ export type GovernanceInboxItem = z.infer<typeof GovernanceInboxItemSchema>;
265
+ export declare const GovernanceInboxResponseSchema: z.ZodObject<{
266
+ actorId: z.ZodString;
267
+ resolvedWindowDays: z.ZodNumber;
268
+ items: z.ZodArray<z.ZodObject<{
269
+ approval: z.ZodObject<{
270
+ id: z.ZodString;
271
+ companyId: z.ZodString;
272
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
273
+ action: z.ZodEnum<{
274
+ hire_agent: "hire_agent";
275
+ activate_goal: "activate_goal";
276
+ override_budget: "override_budget";
277
+ pause_agent: "pause_agent";
278
+ terminate_agent: "terminate_agent";
279
+ }>;
280
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
281
+ status: z.ZodEnum<{
282
+ pending: "pending";
283
+ approved: "approved";
284
+ rejected: "rejected";
285
+ overridden: "overridden";
286
+ }>;
287
+ createdAt: z.ZodString;
288
+ resolvedAt: z.ZodNullable<z.ZodString>;
289
+ }, z.core.$strip>;
290
+ seenAt: z.ZodNullable<z.ZodString>;
291
+ dismissedAt: z.ZodNullable<z.ZodString>;
292
+ isPending: z.ZodBoolean;
293
+ }, z.core.$strip>>;
294
+ }, z.core.$strip>;
295
+ export type GovernanceInboxResponse = z.infer<typeof GovernanceInboxResponseSchema>;
296
+ export declare const OfficeRoomSchema: z.ZodEnum<{
297
+ waiting_room: "waiting_room";
298
+ work_space: "work_space";
299
+ security: "security";
300
+ }>;
301
+ export type OfficeRoom = z.infer<typeof OfficeRoomSchema>;
302
+ export declare const OfficeOccupantKindSchema: z.ZodEnum<{
303
+ agent: "agent";
304
+ hire_candidate: "hire_candidate";
305
+ }>;
306
+ export type OfficeOccupantKind = z.infer<typeof OfficeOccupantKindSchema>;
307
+ export declare const OfficeOccupantStatusSchema: z.ZodEnum<{
308
+ paused: "paused";
309
+ idle: "idle";
310
+ working: "working";
311
+ waiting_for_approval: "waiting_for_approval";
312
+ }>;
313
+ export type OfficeOccupantStatus = z.infer<typeof OfficeOccupantStatusSchema>;
314
+ export declare const OfficeOccupantSchema: z.ZodObject<{
315
+ id: z.ZodString;
316
+ kind: z.ZodEnum<{
317
+ agent: "agent";
318
+ hire_candidate: "hire_candidate";
319
+ }>;
320
+ companyId: z.ZodString;
321
+ agentId: z.ZodNullable<z.ZodString>;
322
+ approvalId: z.ZodNullable<z.ZodString>;
323
+ displayName: z.ZodString;
324
+ role: z.ZodNullable<z.ZodString>;
325
+ room: z.ZodEnum<{
326
+ waiting_room: "waiting_room";
327
+ work_space: "work_space";
328
+ security: "security";
329
+ }>;
330
+ status: z.ZodEnum<{
331
+ paused: "paused";
332
+ idle: "idle";
333
+ working: "working";
334
+ waiting_for_approval: "waiting_for_approval";
335
+ }>;
336
+ taskLabel: z.ZodString;
337
+ providerType: z.ZodNullable<z.ZodEnum<{
338
+ claude_code: "claude_code";
339
+ codex: "codex";
340
+ http: "http";
341
+ shell: "shell";
342
+ }>>;
343
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
344
+ agent: "agent";
345
+ approval: "approval";
346
+ issue: "issue";
347
+ system: "system";
348
+ }>>;
349
+ focusEntityId: z.ZodNullable<z.ZodString>;
350
+ updatedAt: z.ZodString;
351
+ }, z.core.$strip>;
352
+ export type OfficeOccupant = z.infer<typeof OfficeOccupantSchema>;
353
+ export declare const OfficeSpaceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
354
+ type: z.ZodLiteral<"office.snapshot">;
355
+ occupants: z.ZodArray<z.ZodObject<{
356
+ id: z.ZodString;
357
+ kind: z.ZodEnum<{
358
+ agent: "agent";
359
+ hire_candidate: "hire_candidate";
360
+ }>;
361
+ companyId: z.ZodString;
362
+ agentId: z.ZodNullable<z.ZodString>;
363
+ approvalId: z.ZodNullable<z.ZodString>;
364
+ displayName: z.ZodString;
365
+ role: z.ZodNullable<z.ZodString>;
366
+ room: z.ZodEnum<{
367
+ waiting_room: "waiting_room";
368
+ work_space: "work_space";
369
+ security: "security";
370
+ }>;
371
+ status: z.ZodEnum<{
372
+ paused: "paused";
373
+ idle: "idle";
374
+ working: "working";
375
+ waiting_for_approval: "waiting_for_approval";
376
+ }>;
377
+ taskLabel: z.ZodString;
378
+ providerType: z.ZodNullable<z.ZodEnum<{
379
+ claude_code: "claude_code";
380
+ codex: "codex";
381
+ http: "http";
382
+ shell: "shell";
383
+ }>>;
384
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
385
+ agent: "agent";
386
+ approval: "approval";
387
+ issue: "issue";
388
+ system: "system";
389
+ }>>;
390
+ focusEntityId: z.ZodNullable<z.ZodString>;
391
+ updatedAt: z.ZodString;
392
+ }, z.core.$strip>>;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ type: z.ZodLiteral<"office.occupant.updated">;
395
+ occupant: z.ZodObject<{
396
+ id: z.ZodString;
397
+ kind: z.ZodEnum<{
398
+ agent: "agent";
399
+ hire_candidate: "hire_candidate";
400
+ }>;
401
+ companyId: z.ZodString;
402
+ agentId: z.ZodNullable<z.ZodString>;
403
+ approvalId: z.ZodNullable<z.ZodString>;
404
+ displayName: z.ZodString;
405
+ role: z.ZodNullable<z.ZodString>;
406
+ room: z.ZodEnum<{
407
+ waiting_room: "waiting_room";
408
+ work_space: "work_space";
409
+ security: "security";
410
+ }>;
411
+ status: z.ZodEnum<{
412
+ paused: "paused";
413
+ idle: "idle";
414
+ working: "working";
415
+ waiting_for_approval: "waiting_for_approval";
416
+ }>;
417
+ taskLabel: z.ZodString;
418
+ providerType: z.ZodNullable<z.ZodEnum<{
419
+ claude_code: "claude_code";
420
+ codex: "codex";
421
+ http: "http";
422
+ shell: "shell";
423
+ }>>;
424
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
425
+ agent: "agent";
426
+ approval: "approval";
427
+ issue: "issue";
428
+ system: "system";
429
+ }>>;
430
+ focusEntityId: z.ZodNullable<z.ZodString>;
431
+ updatedAt: z.ZodString;
432
+ }, z.core.$strip>;
433
+ }, z.core.$strip>, z.ZodObject<{
434
+ type: z.ZodLiteral<"office.occupant.left">;
435
+ occupantId: z.ZodString;
436
+ }, z.core.$strip>], "type">;
437
+ export type OfficeSpaceEvent = z.infer<typeof OfficeSpaceEventSchema>;
438
+ export declare const RealtimeChannelSchema: z.ZodEnum<{
439
+ governance: "governance";
440
+ "office-space": "office-space";
441
+ }>;
442
+ export type RealtimeChannel = z.infer<typeof RealtimeChannelSchema>;
443
+ export declare const RealtimeEventEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
444
+ channel: z.ZodLiteral<"governance">;
445
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ type: z.ZodLiteral<"approvals.snapshot">;
447
+ approvals: z.ZodArray<z.ZodObject<{
448
+ id: z.ZodString;
449
+ companyId: z.ZodString;
450
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
451
+ action: z.ZodEnum<{
452
+ hire_agent: "hire_agent";
453
+ activate_goal: "activate_goal";
454
+ override_budget: "override_budget";
455
+ pause_agent: "pause_agent";
456
+ terminate_agent: "terminate_agent";
457
+ }>;
458
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
459
+ status: z.ZodEnum<{
460
+ pending: "pending";
461
+ approved: "approved";
462
+ rejected: "rejected";
463
+ overridden: "overridden";
464
+ }>;
465
+ createdAt: z.ZodString;
466
+ resolvedAt: z.ZodNullable<z.ZodString>;
467
+ }, z.core.$strip>>;
468
+ }, z.core.$strip>, z.ZodObject<{
469
+ type: z.ZodLiteral<"approval.created">;
470
+ approval: z.ZodObject<{
471
+ id: z.ZodString;
472
+ companyId: z.ZodString;
473
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
474
+ action: z.ZodEnum<{
475
+ hire_agent: "hire_agent";
476
+ activate_goal: "activate_goal";
477
+ override_budget: "override_budget";
478
+ pause_agent: "pause_agent";
479
+ terminate_agent: "terminate_agent";
480
+ }>;
481
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
482
+ status: z.ZodEnum<{
483
+ pending: "pending";
484
+ approved: "approved";
485
+ rejected: "rejected";
486
+ overridden: "overridden";
487
+ }>;
488
+ createdAt: z.ZodString;
489
+ resolvedAt: z.ZodNullable<z.ZodString>;
490
+ }, z.core.$strip>;
491
+ }, z.core.$strip>, z.ZodObject<{
492
+ type: z.ZodLiteral<"approval.resolved">;
493
+ approval: z.ZodObject<{
494
+ id: z.ZodString;
495
+ companyId: z.ZodString;
496
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
497
+ action: z.ZodEnum<{
498
+ hire_agent: "hire_agent";
499
+ activate_goal: "activate_goal";
500
+ override_budget: "override_budget";
501
+ pause_agent: "pause_agent";
502
+ terminate_agent: "terminate_agent";
503
+ }>;
504
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
505
+ status: z.ZodEnum<{
506
+ pending: "pending";
507
+ approved: "approved";
508
+ rejected: "rejected";
509
+ overridden: "overridden";
510
+ }>;
511
+ createdAt: z.ZodString;
512
+ resolvedAt: z.ZodNullable<z.ZodString>;
513
+ }, z.core.$strip>;
514
+ }, z.core.$strip>], "type">;
515
+ }, z.core.$strip>, z.ZodObject<{
516
+ channel: z.ZodLiteral<"office-space">;
517
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
518
+ type: z.ZodLiteral<"office.snapshot">;
519
+ occupants: z.ZodArray<z.ZodObject<{
520
+ id: z.ZodString;
521
+ kind: z.ZodEnum<{
522
+ agent: "agent";
523
+ hire_candidate: "hire_candidate";
524
+ }>;
525
+ companyId: z.ZodString;
526
+ agentId: z.ZodNullable<z.ZodString>;
527
+ approvalId: z.ZodNullable<z.ZodString>;
528
+ displayName: z.ZodString;
529
+ role: z.ZodNullable<z.ZodString>;
530
+ room: z.ZodEnum<{
531
+ waiting_room: "waiting_room";
532
+ work_space: "work_space";
533
+ security: "security";
534
+ }>;
535
+ status: z.ZodEnum<{
536
+ paused: "paused";
537
+ idle: "idle";
538
+ working: "working";
539
+ waiting_for_approval: "waiting_for_approval";
540
+ }>;
541
+ taskLabel: z.ZodString;
542
+ providerType: z.ZodNullable<z.ZodEnum<{
543
+ claude_code: "claude_code";
544
+ codex: "codex";
545
+ http: "http";
546
+ shell: "shell";
547
+ }>>;
548
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
549
+ agent: "agent";
550
+ approval: "approval";
551
+ issue: "issue";
552
+ system: "system";
553
+ }>>;
554
+ focusEntityId: z.ZodNullable<z.ZodString>;
555
+ updatedAt: z.ZodString;
556
+ }, z.core.$strip>>;
557
+ }, z.core.$strip>, z.ZodObject<{
558
+ type: z.ZodLiteral<"office.occupant.updated">;
559
+ occupant: z.ZodObject<{
560
+ id: z.ZodString;
561
+ kind: z.ZodEnum<{
562
+ agent: "agent";
563
+ hire_candidate: "hire_candidate";
564
+ }>;
565
+ companyId: z.ZodString;
566
+ agentId: z.ZodNullable<z.ZodString>;
567
+ approvalId: z.ZodNullable<z.ZodString>;
568
+ displayName: z.ZodString;
569
+ role: z.ZodNullable<z.ZodString>;
570
+ room: z.ZodEnum<{
571
+ waiting_room: "waiting_room";
572
+ work_space: "work_space";
573
+ security: "security";
574
+ }>;
575
+ status: z.ZodEnum<{
576
+ paused: "paused";
577
+ idle: "idle";
578
+ working: "working";
579
+ waiting_for_approval: "waiting_for_approval";
580
+ }>;
581
+ taskLabel: z.ZodString;
582
+ providerType: z.ZodNullable<z.ZodEnum<{
583
+ claude_code: "claude_code";
584
+ codex: "codex";
585
+ http: "http";
586
+ shell: "shell";
587
+ }>>;
588
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
589
+ agent: "agent";
590
+ approval: "approval";
591
+ issue: "issue";
592
+ system: "system";
593
+ }>>;
594
+ focusEntityId: z.ZodNullable<z.ZodString>;
595
+ updatedAt: z.ZodString;
596
+ }, z.core.$strip>;
597
+ }, z.core.$strip>, z.ZodObject<{
598
+ type: z.ZodLiteral<"office.occupant.left">;
599
+ occupantId: z.ZodString;
600
+ }, z.core.$strip>], "type">;
601
+ }, z.core.$strip>], "channel">;
602
+ export type RealtimeEventEnvelope = z.infer<typeof RealtimeEventEnvelopeSchema>;
603
+ export declare const RealtimeSubscribedMessageSchema: z.ZodObject<{
604
+ kind: z.ZodLiteral<"subscribed">;
605
+ companyId: z.ZodString;
606
+ channels: z.ZodArray<z.ZodEnum<{
607
+ governance: "governance";
608
+ "office-space": "office-space";
609
+ }>>;
610
+ }, z.core.$strip>;
611
+ export declare const RealtimeEventMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
612
+ kind: z.ZodLiteral<"event">;
613
+ companyId: z.ZodString;
614
+ channel: z.ZodLiteral<"governance">;
615
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
616
+ type: z.ZodLiteral<"approvals.snapshot">;
617
+ approvals: z.ZodArray<z.ZodObject<{
618
+ id: z.ZodString;
619
+ companyId: z.ZodString;
620
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
621
+ action: z.ZodEnum<{
622
+ hire_agent: "hire_agent";
623
+ activate_goal: "activate_goal";
624
+ override_budget: "override_budget";
625
+ pause_agent: "pause_agent";
626
+ terminate_agent: "terminate_agent";
627
+ }>;
628
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
629
+ status: z.ZodEnum<{
630
+ pending: "pending";
631
+ approved: "approved";
632
+ rejected: "rejected";
633
+ overridden: "overridden";
634
+ }>;
635
+ createdAt: z.ZodString;
636
+ resolvedAt: z.ZodNullable<z.ZodString>;
637
+ }, z.core.$strip>>;
638
+ }, z.core.$strip>, z.ZodObject<{
639
+ type: z.ZodLiteral<"approval.created">;
640
+ approval: z.ZodObject<{
641
+ id: z.ZodString;
642
+ companyId: z.ZodString;
643
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
644
+ action: z.ZodEnum<{
645
+ hire_agent: "hire_agent";
646
+ activate_goal: "activate_goal";
647
+ override_budget: "override_budget";
648
+ pause_agent: "pause_agent";
649
+ terminate_agent: "terminate_agent";
650
+ }>;
651
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
652
+ status: z.ZodEnum<{
653
+ pending: "pending";
654
+ approved: "approved";
655
+ rejected: "rejected";
656
+ overridden: "overridden";
657
+ }>;
658
+ createdAt: z.ZodString;
659
+ resolvedAt: z.ZodNullable<z.ZodString>;
660
+ }, z.core.$strip>;
661
+ }, z.core.$strip>, z.ZodObject<{
662
+ type: z.ZodLiteral<"approval.resolved">;
663
+ approval: z.ZodObject<{
664
+ id: z.ZodString;
665
+ companyId: z.ZodString;
666
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
667
+ action: z.ZodEnum<{
668
+ hire_agent: "hire_agent";
669
+ activate_goal: "activate_goal";
670
+ override_budget: "override_budget";
671
+ pause_agent: "pause_agent";
672
+ terminate_agent: "terminate_agent";
673
+ }>;
674
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
675
+ status: z.ZodEnum<{
676
+ pending: "pending";
677
+ approved: "approved";
678
+ rejected: "rejected";
679
+ overridden: "overridden";
680
+ }>;
681
+ createdAt: z.ZodString;
682
+ resolvedAt: z.ZodNullable<z.ZodString>;
683
+ }, z.core.$strip>;
684
+ }, z.core.$strip>], "type">;
685
+ }, z.core.$strip>, z.ZodObject<{
686
+ kind: z.ZodLiteral<"event">;
687
+ companyId: z.ZodString;
688
+ channel: z.ZodLiteral<"office-space">;
689
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
690
+ type: z.ZodLiteral<"office.snapshot">;
691
+ occupants: z.ZodArray<z.ZodObject<{
692
+ id: z.ZodString;
693
+ kind: z.ZodEnum<{
694
+ agent: "agent";
695
+ hire_candidate: "hire_candidate";
696
+ }>;
697
+ companyId: z.ZodString;
698
+ agentId: z.ZodNullable<z.ZodString>;
699
+ approvalId: z.ZodNullable<z.ZodString>;
700
+ displayName: z.ZodString;
701
+ role: z.ZodNullable<z.ZodString>;
702
+ room: z.ZodEnum<{
703
+ waiting_room: "waiting_room";
704
+ work_space: "work_space";
705
+ security: "security";
706
+ }>;
707
+ status: z.ZodEnum<{
708
+ paused: "paused";
709
+ idle: "idle";
710
+ working: "working";
711
+ waiting_for_approval: "waiting_for_approval";
712
+ }>;
713
+ taskLabel: z.ZodString;
714
+ providerType: z.ZodNullable<z.ZodEnum<{
715
+ claude_code: "claude_code";
716
+ codex: "codex";
717
+ http: "http";
718
+ shell: "shell";
719
+ }>>;
720
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
721
+ agent: "agent";
722
+ approval: "approval";
723
+ issue: "issue";
724
+ system: "system";
725
+ }>>;
726
+ focusEntityId: z.ZodNullable<z.ZodString>;
727
+ updatedAt: z.ZodString;
728
+ }, z.core.$strip>>;
729
+ }, z.core.$strip>, z.ZodObject<{
730
+ type: z.ZodLiteral<"office.occupant.updated">;
731
+ occupant: z.ZodObject<{
732
+ id: z.ZodString;
733
+ kind: z.ZodEnum<{
734
+ agent: "agent";
735
+ hire_candidate: "hire_candidate";
736
+ }>;
737
+ companyId: z.ZodString;
738
+ agentId: z.ZodNullable<z.ZodString>;
739
+ approvalId: z.ZodNullable<z.ZodString>;
740
+ displayName: z.ZodString;
741
+ role: z.ZodNullable<z.ZodString>;
742
+ room: z.ZodEnum<{
743
+ waiting_room: "waiting_room";
744
+ work_space: "work_space";
745
+ security: "security";
746
+ }>;
747
+ status: z.ZodEnum<{
748
+ paused: "paused";
749
+ idle: "idle";
750
+ working: "working";
751
+ waiting_for_approval: "waiting_for_approval";
752
+ }>;
753
+ taskLabel: z.ZodString;
754
+ providerType: z.ZodNullable<z.ZodEnum<{
755
+ claude_code: "claude_code";
756
+ codex: "codex";
757
+ http: "http";
758
+ shell: "shell";
759
+ }>>;
760
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
761
+ agent: "agent";
762
+ approval: "approval";
763
+ issue: "issue";
764
+ system: "system";
765
+ }>>;
766
+ focusEntityId: z.ZodNullable<z.ZodString>;
767
+ updatedAt: z.ZodString;
768
+ }, z.core.$strip>;
769
+ }, z.core.$strip>, z.ZodObject<{
770
+ type: z.ZodLiteral<"office.occupant.left">;
771
+ occupantId: z.ZodString;
772
+ }, z.core.$strip>], "type">;
773
+ }, z.core.$strip>], "channel">;
774
+ export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
775
+ kind: z.ZodLiteral<"subscribed">;
776
+ companyId: z.ZodString;
777
+ channels: z.ZodArray<z.ZodEnum<{
778
+ governance: "governance";
779
+ "office-space": "office-space";
780
+ }>>;
781
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
782
+ kind: z.ZodLiteral<"event">;
783
+ companyId: z.ZodString;
784
+ channel: z.ZodLiteral<"governance">;
785
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
786
+ type: z.ZodLiteral<"approvals.snapshot">;
787
+ approvals: z.ZodArray<z.ZodObject<{
788
+ id: z.ZodString;
789
+ companyId: z.ZodString;
790
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
791
+ action: z.ZodEnum<{
792
+ hire_agent: "hire_agent";
793
+ activate_goal: "activate_goal";
794
+ override_budget: "override_budget";
795
+ pause_agent: "pause_agent";
796
+ terminate_agent: "terminate_agent";
797
+ }>;
798
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ status: z.ZodEnum<{
800
+ pending: "pending";
801
+ approved: "approved";
802
+ rejected: "rejected";
803
+ overridden: "overridden";
804
+ }>;
805
+ createdAt: z.ZodString;
806
+ resolvedAt: z.ZodNullable<z.ZodString>;
807
+ }, z.core.$strip>>;
808
+ }, z.core.$strip>, z.ZodObject<{
809
+ type: z.ZodLiteral<"approval.created">;
810
+ approval: z.ZodObject<{
811
+ id: z.ZodString;
812
+ companyId: z.ZodString;
813
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
814
+ action: z.ZodEnum<{
815
+ hire_agent: "hire_agent";
816
+ activate_goal: "activate_goal";
817
+ override_budget: "override_budget";
818
+ pause_agent: "pause_agent";
819
+ terminate_agent: "terminate_agent";
820
+ }>;
821
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
822
+ status: z.ZodEnum<{
823
+ pending: "pending";
824
+ approved: "approved";
825
+ rejected: "rejected";
826
+ overridden: "overridden";
827
+ }>;
828
+ createdAt: z.ZodString;
829
+ resolvedAt: z.ZodNullable<z.ZodString>;
830
+ }, z.core.$strip>;
831
+ }, z.core.$strip>, z.ZodObject<{
832
+ type: z.ZodLiteral<"approval.resolved">;
833
+ approval: z.ZodObject<{
834
+ id: z.ZodString;
835
+ companyId: z.ZodString;
836
+ requestedByAgentId: z.ZodNullable<z.ZodString>;
837
+ action: z.ZodEnum<{
838
+ hire_agent: "hire_agent";
839
+ activate_goal: "activate_goal";
840
+ override_budget: "override_budget";
841
+ pause_agent: "pause_agent";
842
+ terminate_agent: "terminate_agent";
843
+ }>;
844
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
845
+ status: z.ZodEnum<{
846
+ pending: "pending";
847
+ approved: "approved";
848
+ rejected: "rejected";
849
+ overridden: "overridden";
850
+ }>;
851
+ createdAt: z.ZodString;
852
+ resolvedAt: z.ZodNullable<z.ZodString>;
853
+ }, z.core.$strip>;
854
+ }, z.core.$strip>], "type">;
855
+ }, z.core.$strip>, z.ZodObject<{
856
+ kind: z.ZodLiteral<"event">;
857
+ companyId: z.ZodString;
858
+ channel: z.ZodLiteral<"office-space">;
859
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
860
+ type: z.ZodLiteral<"office.snapshot">;
861
+ occupants: z.ZodArray<z.ZodObject<{
862
+ id: z.ZodString;
863
+ kind: z.ZodEnum<{
864
+ agent: "agent";
865
+ hire_candidate: "hire_candidate";
866
+ }>;
867
+ companyId: z.ZodString;
868
+ agentId: z.ZodNullable<z.ZodString>;
869
+ approvalId: z.ZodNullable<z.ZodString>;
870
+ displayName: z.ZodString;
871
+ role: z.ZodNullable<z.ZodString>;
872
+ room: z.ZodEnum<{
873
+ waiting_room: "waiting_room";
874
+ work_space: "work_space";
875
+ security: "security";
876
+ }>;
877
+ status: z.ZodEnum<{
878
+ paused: "paused";
879
+ idle: "idle";
880
+ working: "working";
881
+ waiting_for_approval: "waiting_for_approval";
882
+ }>;
883
+ taskLabel: z.ZodString;
884
+ providerType: z.ZodNullable<z.ZodEnum<{
885
+ claude_code: "claude_code";
886
+ codex: "codex";
887
+ http: "http";
888
+ shell: "shell";
889
+ }>>;
890
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
891
+ agent: "agent";
892
+ approval: "approval";
893
+ issue: "issue";
894
+ system: "system";
895
+ }>>;
896
+ focusEntityId: z.ZodNullable<z.ZodString>;
897
+ updatedAt: z.ZodString;
898
+ }, z.core.$strip>>;
899
+ }, z.core.$strip>, z.ZodObject<{
900
+ type: z.ZodLiteral<"office.occupant.updated">;
901
+ occupant: z.ZodObject<{
902
+ id: z.ZodString;
903
+ kind: z.ZodEnum<{
904
+ agent: "agent";
905
+ hire_candidate: "hire_candidate";
906
+ }>;
907
+ companyId: z.ZodString;
908
+ agentId: z.ZodNullable<z.ZodString>;
909
+ approvalId: z.ZodNullable<z.ZodString>;
910
+ displayName: z.ZodString;
911
+ role: z.ZodNullable<z.ZodString>;
912
+ room: z.ZodEnum<{
913
+ waiting_room: "waiting_room";
914
+ work_space: "work_space";
915
+ security: "security";
916
+ }>;
917
+ status: z.ZodEnum<{
918
+ paused: "paused";
919
+ idle: "idle";
920
+ working: "working";
921
+ waiting_for_approval: "waiting_for_approval";
922
+ }>;
923
+ taskLabel: z.ZodString;
924
+ providerType: z.ZodNullable<z.ZodEnum<{
925
+ claude_code: "claude_code";
926
+ codex: "codex";
927
+ http: "http";
928
+ shell: "shell";
929
+ }>>;
930
+ focusEntityType: z.ZodNullable<z.ZodEnum<{
931
+ agent: "agent";
932
+ approval: "approval";
933
+ issue: "issue";
934
+ system: "system";
935
+ }>>;
936
+ focusEntityId: z.ZodNullable<z.ZodString>;
937
+ updatedAt: z.ZodString;
938
+ }, z.core.$strip>;
939
+ }, z.core.$strip>, z.ZodObject<{
940
+ type: z.ZodLiteral<"office.occupant.left">;
941
+ occupantId: z.ZodString;
942
+ }, z.core.$strip>], "type">;
943
+ }, z.core.$strip>], "channel">]>;
944
+ export type RealtimeMessage = z.infer<typeof RealtimeMessageSchema>;
945
+ export declare const CostLedgerEntrySchema: z.ZodObject<{
946
+ id: z.ZodString;
947
+ companyId: z.ZodString;
948
+ projectId: z.ZodNullable<z.ZodString>;
949
+ issueId: z.ZodNullable<z.ZodString>;
950
+ agentId: z.ZodNullable<z.ZodString>;
951
+ providerType: z.ZodEnum<{
952
+ claude_code: "claude_code";
953
+ codex: "codex";
954
+ http: "http";
955
+ shell: "shell";
956
+ }>;
957
+ tokenInput: z.ZodNumber;
958
+ tokenOutput: z.ZodNumber;
959
+ usdCost: z.ZodNumber;
960
+ createdAt: z.ZodString;
961
+ }, z.core.$strip>;
962
+ export declare const AuditEventSchema: z.ZodObject<{
963
+ id: z.ZodString;
964
+ companyId: z.ZodString;
965
+ actorType: z.ZodEnum<{
966
+ agent: "agent";
967
+ system: "system";
968
+ human: "human";
969
+ }>;
970
+ actorId: z.ZodNullable<z.ZodString>;
971
+ eventType: z.ZodString;
972
+ entityType: z.ZodString;
973
+ entityId: z.ZodString;
974
+ correlationId: z.ZodNullable<z.ZodString>;
975
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
976
+ createdAt: z.ZodString;
977
+ }, z.core.$strip>;
978
+ export declare const HeartbeatRunSchema: z.ZodObject<{
979
+ id: z.ZodString;
980
+ companyId: z.ZodString;
981
+ agentId: z.ZodString;
982
+ status: z.ZodEnum<{
983
+ completed: "completed";
984
+ started: "started";
985
+ failed: "failed";
986
+ skipped: "skipped";
987
+ }>;
988
+ startedAt: z.ZodString;
989
+ finishedAt: z.ZodNullable<z.ZodString>;
990
+ message: z.ZodOptional<z.ZodString>;
991
+ }, z.core.$strip>;
992
+ export declare const PaginatedSchema: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
993
+ items: z.ZodArray<T>;
994
+ nextCursor: z.ZodNullable<z.ZodString>;
995
+ }, z.core.$strip>;