bopodev-agent-sdk 0.1.12 → 0.1.13

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.
Files changed (100) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/dist/adapters/anthropic-api/src/cli/format-event.d.ts +1 -0
  4. package/dist/adapters/anthropic-api/src/cli/index.d.ts +1 -0
  5. package/dist/adapters/anthropic-api/src/index.d.ts +16 -0
  6. package/dist/adapters/anthropic-api/src/server/execute.d.ts +2 -0
  7. package/dist/adapters/anthropic-api/src/server/index.d.ts +6 -0
  8. package/dist/adapters/anthropic-api/src/server/parse.d.ts +1 -0
  9. package/dist/adapters/anthropic-api/src/server/test.d.ts +2 -0
  10. package/dist/adapters/anthropic-api/src/ui/build-config.d.ts +3 -0
  11. package/dist/adapters/anthropic-api/src/ui/index.d.ts +2 -0
  12. package/dist/adapters/anthropic-api/src/ui/parse-stdout.d.ts +6 -0
  13. package/dist/adapters/claude-code/src/cli/format-event.d.ts +1 -0
  14. package/dist/adapters/claude-code/src/cli/index.d.ts +1 -0
  15. package/dist/adapters/claude-code/src/index.d.ts +16 -0
  16. package/dist/adapters/claude-code/src/server/execute.d.ts +2 -0
  17. package/dist/adapters/claude-code/src/server/index.d.ts +6 -0
  18. package/dist/adapters/claude-code/src/server/parse.d.ts +2 -0
  19. package/dist/adapters/claude-code/src/server/test.d.ts +2 -0
  20. package/dist/adapters/claude-code/src/ui/build-config.d.ts +3 -0
  21. package/dist/adapters/claude-code/src/ui/index.d.ts +2 -0
  22. package/dist/adapters/claude-code/src/ui/parse-stdout.d.ts +6 -0
  23. package/dist/adapters/codex/src/cli/format-event.d.ts +1 -0
  24. package/dist/adapters/codex/src/cli/index.d.ts +1 -0
  25. package/dist/adapters/codex/src/index.d.ts +34 -0
  26. package/dist/adapters/codex/src/server/execute.d.ts +2 -0
  27. package/dist/adapters/codex/src/server/index.d.ts +6 -0
  28. package/dist/adapters/codex/src/server/parse.d.ts +2 -0
  29. package/dist/adapters/codex/src/server/test.d.ts +2 -0
  30. package/dist/adapters/codex/src/ui/build-config.d.ts +3 -0
  31. package/dist/adapters/codex/src/ui/index.d.ts +2 -0
  32. package/dist/adapters/codex/src/ui/parse-stdout.d.ts +6 -0
  33. package/dist/adapters/cursor/src/cli/format-event.d.ts +1 -0
  34. package/dist/adapters/cursor/src/cli/index.d.ts +1 -0
  35. package/dist/adapters/cursor/src/index.d.ts +22 -0
  36. package/dist/adapters/cursor/src/server/execute.d.ts +2 -0
  37. package/dist/adapters/cursor/src/server/index.d.ts +6 -0
  38. package/dist/adapters/cursor/src/server/parse.d.ts +2 -0
  39. package/dist/adapters/cursor/src/server/test.d.ts +2 -0
  40. package/dist/adapters/cursor/src/ui/build-config.d.ts +3 -0
  41. package/dist/adapters/cursor/src/ui/index.d.ts +2 -0
  42. package/dist/adapters/cursor/src/ui/parse-stdout.d.ts +6 -0
  43. package/dist/adapters/http/src/cli/format-event.d.ts +1 -0
  44. package/dist/adapters/http/src/cli/index.d.ts +1 -0
  45. package/dist/adapters/http/src/index.d.ts +7 -0
  46. package/dist/adapters/http/src/server/execute.d.ts +2 -0
  47. package/dist/adapters/http/src/server/index.d.ts +6 -0
  48. package/dist/adapters/http/src/server/parse.d.ts +1 -0
  49. package/dist/adapters/http/src/server/test.d.ts +2 -0
  50. package/dist/adapters/http/src/ui/build-config.d.ts +3 -0
  51. package/dist/adapters/http/src/ui/index.d.ts +2 -0
  52. package/dist/adapters/http/src/ui/parse-stdout.d.ts +6 -0
  53. package/dist/adapters/openai-api/src/cli/format-event.d.ts +1 -0
  54. package/dist/adapters/openai-api/src/cli/index.d.ts +1 -0
  55. package/dist/adapters/openai-api/src/index.d.ts +22 -0
  56. package/dist/adapters/openai-api/src/server/execute.d.ts +2 -0
  57. package/dist/adapters/openai-api/src/server/index.d.ts +6 -0
  58. package/dist/adapters/openai-api/src/server/parse.d.ts +1 -0
  59. package/dist/adapters/openai-api/src/server/test.d.ts +2 -0
  60. package/dist/adapters/openai-api/src/ui/build-config.d.ts +3 -0
  61. package/dist/adapters/openai-api/src/ui/index.d.ts +2 -0
  62. package/dist/adapters/openai-api/src/ui/parse-stdout.d.ts +6 -0
  63. package/dist/adapters/opencode/src/cli/format-event.d.ts +1 -0
  64. package/dist/adapters/opencode/src/cli/index.d.ts +1 -0
  65. package/dist/adapters/opencode/src/index.d.ts +7 -0
  66. package/dist/adapters/opencode/src/server/execute.d.ts +2 -0
  67. package/dist/adapters/opencode/src/server/index.d.ts +6 -0
  68. package/dist/adapters/opencode/src/server/parse.d.ts +1 -0
  69. package/dist/adapters/opencode/src/server/test.d.ts +2 -0
  70. package/dist/adapters/opencode/src/ui/build-config.d.ts +3 -0
  71. package/dist/adapters/opencode/src/ui/index.d.ts +2 -0
  72. package/dist/adapters/opencode/src/ui/parse-stdout.d.ts +6 -0
  73. package/dist/adapters/shell/src/cli/format-event.d.ts +1 -0
  74. package/dist/adapters/shell/src/cli/index.d.ts +1 -0
  75. package/dist/adapters/shell/src/index.d.ts +7 -0
  76. package/dist/adapters/shell/src/server/execute.d.ts +2 -0
  77. package/dist/adapters/shell/src/server/index.d.ts +6 -0
  78. package/dist/adapters/shell/src/server/parse.d.ts +1 -0
  79. package/dist/adapters/shell/src/server/test.d.ts +2 -0
  80. package/dist/adapters/shell/src/ui/build-config.d.ts +3 -0
  81. package/dist/adapters/shell/src/ui/index.d.ts +2 -0
  82. package/dist/adapters/shell/src/ui/parse-stdout.d.ts +6 -0
  83. package/dist/agent-sdk/src/adapters.d.ts +226 -1
  84. package/dist/agent-sdk/src/index.d.ts +2 -0
  85. package/dist/agent-sdk/src/registry.d.ts +2 -1
  86. package/dist/agent-sdk/src/runtime-core.d.ts +2 -0
  87. package/dist/agent-sdk/src/runtime-http.d.ts +38 -0
  88. package/dist/agent-sdk/src/runtime-parsers.d.ts +1 -0
  89. package/dist/agent-sdk/src/runtime.d.ts +36 -0
  90. package/dist/agent-sdk/src/types.d.ts +55 -0
  91. package/dist/contracts/src/index.d.ts +889 -12
  92. package/package.json +2 -2
  93. package/src/adapters.ts +385 -36
  94. package/src/index.ts +2 -0
  95. package/src/registry.ts +67 -18
  96. package/src/runtime-core.ts +7 -0
  97. package/src/runtime-http.ts +455 -0
  98. package/src/runtime-parsers.ts +6 -0
  99. package/src/runtime.ts +848 -33
  100. package/src/types.ts +61 -0
@@ -70,10 +70,28 @@ export declare const IssueSchema: z.ZodObject<{
70
70
  createdAt: z.ZodString;
71
71
  updatedAt: z.ZodString;
72
72
  }, z.core.$strip>;
73
+ export declare const IssueAttachmentSchema: z.ZodObject<{
74
+ id: z.ZodString;
75
+ companyId: z.ZodString;
76
+ issueId: z.ZodString;
77
+ projectId: z.ZodString;
78
+ fileName: z.ZodString;
79
+ mimeType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ fileSizeBytes: z.ZodNumber;
81
+ relativePath: z.ZodString;
82
+ uploadedByActorType: z.ZodEnum<{
83
+ human: "human";
84
+ agent: "agent";
85
+ system: "system";
86
+ }>;
87
+ uploadedByActorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ createdAt: z.ZodString;
89
+ }, z.core.$strip>;
90
+ export type IssueAttachment = z.infer<typeof IssueAttachmentSchema>;
73
91
  export declare const GoalLevelSchema: z.ZodEnum<{
92
+ agent: "agent";
74
93
  company: "company";
75
94
  project: "project";
76
- agent: "agent";
77
95
  }>;
78
96
  export declare const GoalSchema: z.ZodObject<{
79
97
  id: z.ZodString;
@@ -81,9 +99,9 @@ export declare const GoalSchema: z.ZodObject<{
81
99
  projectId: z.ZodNullable<z.ZodString>;
82
100
  parentGoalId: z.ZodNullable<z.ZodString>;
83
101
  level: z.ZodEnum<{
102
+ agent: "agent";
84
103
  company: "company";
85
104
  project: "project";
86
- agent: "agent";
87
105
  }>;
88
106
  title: z.ZodString;
89
107
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -107,6 +125,8 @@ export declare const ProviderTypeSchema: z.ZodEnum<{
107
125
  codex: "codex";
108
126
  cursor: "cursor";
109
127
  opencode: "opencode";
128
+ openai_api: "openai_api";
129
+ anthropic_api: "anthropic_api";
110
130
  http: "http";
111
131
  shell: "shell";
112
132
  }>;
@@ -266,6 +286,148 @@ export declare const AgentRuntimeConfigSchema: z.ZodObject<{
266
286
  }, z.core.$strip>>;
267
287
  }, z.core.$strip>;
268
288
  export type AgentRuntimeConfig = z.infer<typeof AgentRuntimeConfigSchema>;
289
+ export declare const PluginKindSchema: z.ZodEnum<{
290
+ lifecycle: "lifecycle";
291
+ tool: "tool";
292
+ integration: "integration";
293
+ }>;
294
+ export type PluginKind = z.infer<typeof PluginKindSchema>;
295
+ export declare const PluginHookSchema: z.ZodEnum<{
296
+ beforeClaim: "beforeClaim";
297
+ afterClaim: "afterClaim";
298
+ beforeAdapterExecute: "beforeAdapterExecute";
299
+ afterAdapterExecute: "afterAdapterExecute";
300
+ beforePersist: "beforePersist";
301
+ afterPersist: "afterPersist";
302
+ onError: "onError";
303
+ }>;
304
+ export type PluginHook = z.infer<typeof PluginHookSchema>;
305
+ export declare const PluginCapabilitySchema: z.ZodEnum<{
306
+ emit_audit: "emit_audit";
307
+ read_memory: "read_memory";
308
+ write_memory: "write_memory";
309
+ queue_publish: "queue_publish";
310
+ network: "network";
311
+ tool_expose: "tool_expose";
312
+ issue_write: "issue_write";
313
+ }>;
314
+ export type PluginCapability = z.infer<typeof PluginCapabilitySchema>;
315
+ export declare const PluginRuntimeTypeSchema: z.ZodEnum<{
316
+ http: "http";
317
+ builtin: "builtin";
318
+ stdio: "stdio";
319
+ prompt: "prompt";
320
+ }>;
321
+ export type PluginRuntimeType = z.infer<typeof PluginRuntimeTypeSchema>;
322
+ export declare const PluginWebhookRequestSchema: z.ZodObject<{
323
+ url: z.ZodString;
324
+ method: z.ZodDefault<z.ZodEnum<{
325
+ GET: "GET";
326
+ POST: "POST";
327
+ PUT: "PUT";
328
+ PATCH: "PATCH";
329
+ DELETE: "DELETE";
330
+ }>>;
331
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
332
+ body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
333
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
334
+ }, z.core.$strip>;
335
+ export type PluginWebhookRequest = z.infer<typeof PluginWebhookRequestSchema>;
336
+ export declare const PluginTraceEventSchema: z.ZodObject<{
337
+ eventType: z.ZodString;
338
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
339
+ }, z.core.$strip>;
340
+ export type PluginTraceEvent = z.infer<typeof PluginTraceEventSchema>;
341
+ export declare const PluginManifestSchema: z.ZodObject<{
342
+ id: z.ZodString;
343
+ version: z.ZodString;
344
+ displayName: z.ZodString;
345
+ description: z.ZodOptional<z.ZodString>;
346
+ kind: z.ZodEnum<{
347
+ lifecycle: "lifecycle";
348
+ tool: "tool";
349
+ integration: "integration";
350
+ }>;
351
+ hooks: z.ZodDefault<z.ZodArray<z.ZodEnum<{
352
+ beforeClaim: "beforeClaim";
353
+ afterClaim: "afterClaim";
354
+ beforeAdapterExecute: "beforeAdapterExecute";
355
+ afterAdapterExecute: "afterAdapterExecute";
356
+ beforePersist: "beforePersist";
357
+ afterPersist: "afterPersist";
358
+ onError: "onError";
359
+ }>>>;
360
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<{
361
+ emit_audit: "emit_audit";
362
+ read_memory: "read_memory";
363
+ write_memory: "write_memory";
364
+ queue_publish: "queue_publish";
365
+ network: "network";
366
+ tool_expose: "tool_expose";
367
+ issue_write: "issue_write";
368
+ }>>>;
369
+ runtime: z.ZodObject<{
370
+ type: z.ZodEnum<{
371
+ http: "http";
372
+ builtin: "builtin";
373
+ stdio: "stdio";
374
+ prompt: "prompt";
375
+ }>;
376
+ entrypoint: z.ZodString;
377
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
378
+ retryCount: z.ZodDefault<z.ZodNumber>;
379
+ promptTemplate: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ configSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
382
+ minimumBopoVersion: z.ZodOptional<z.ZodString>;
383
+ }, z.core.$strip>;
384
+ export type PluginManifest = z.infer<typeof PluginManifestSchema>;
385
+ export declare const PluginPromptExecutionResultSchema: z.ZodObject<{
386
+ promptAppend: z.ZodOptional<z.ZodString>;
387
+ traceEvents: z.ZodDefault<z.ZodArray<z.ZodObject<{
388
+ eventType: z.ZodString;
389
+ payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
390
+ }, z.core.$strip>>>;
391
+ webhookRequests: z.ZodDefault<z.ZodArray<z.ZodObject<{
392
+ url: z.ZodString;
393
+ method: z.ZodDefault<z.ZodEnum<{
394
+ GET: "GET";
395
+ POST: "POST";
396
+ PUT: "PUT";
397
+ PATCH: "PATCH";
398
+ DELETE: "DELETE";
399
+ }>>;
400
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
401
+ body: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
402
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
403
+ }, z.core.$strip>>>;
404
+ diagnostics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
405
+ }, z.core.$strip>;
406
+ export type PluginPromptExecutionResult = z.infer<typeof PluginPromptExecutionResultSchema>;
407
+ export declare const PluginRunStatusSchema: z.ZodEnum<{
408
+ blocked: "blocked";
409
+ failed: "failed";
410
+ skipped: "skipped";
411
+ ok: "ok";
412
+ }>;
413
+ export type PluginRunStatus = z.infer<typeof PluginRunStatusSchema>;
414
+ export declare const PluginInvocationResultSchema: z.ZodObject<{
415
+ status: z.ZodEnum<{
416
+ blocked: "blocked";
417
+ failed: "failed";
418
+ skipped: "skipped";
419
+ ok: "ok";
420
+ }>;
421
+ summary: z.ZodDefault<z.ZodString>;
422
+ diagnostics: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
423
+ blockers: z.ZodDefault<z.ZodArray<z.ZodObject<{
424
+ code: z.ZodString;
425
+ message: z.ZodString;
426
+ retryable: z.ZodDefault<z.ZodBoolean>;
427
+ }, z.core.$strip>>>;
428
+ metadataPatch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
429
+ }, z.core.$strip>;
430
+ export type PluginInvocationResult = z.infer<typeof PluginInvocationResultSchema>;
269
431
  export declare const AgentCreateRequestSchema: z.ZodObject<{
270
432
  managerAgentId: z.ZodOptional<z.ZodString>;
271
433
  role: z.ZodString;
@@ -275,6 +437,8 @@ export declare const AgentCreateRequestSchema: z.ZodObject<{
275
437
  codex: "codex";
276
438
  cursor: "cursor";
277
439
  opencode: "opencode";
440
+ openai_api: "openai_api";
441
+ anthropic_api: "anthropic_api";
278
442
  http: "http";
279
443
  shell: "shell";
280
444
  }>;
@@ -316,6 +480,8 @@ export declare const AgentUpdateRequestSchema: z.ZodObject<{
316
480
  codex: "codex";
317
481
  cursor: "cursor";
318
482
  opencode: "opencode";
483
+ openai_api: "openai_api";
484
+ anthropic_api: "anthropic_api";
319
485
  http: "http";
320
486
  shell: "shell";
321
487
  }>>;
@@ -364,6 +530,8 @@ export declare const AgentSchema: z.ZodObject<{
364
530
  codex: "codex";
365
531
  cursor: "cursor";
366
532
  opencode: "opencode";
533
+ openai_api: "openai_api";
534
+ anthropic_api: "anthropic_api";
367
535
  http: "http";
368
536
  shell: "shell";
369
537
  }>;
@@ -601,15 +769,17 @@ export declare const OfficeOccupantSchema: z.ZodObject<{
601
769
  codex: "codex";
602
770
  cursor: "cursor";
603
771
  opencode: "opencode";
772
+ openai_api: "openai_api";
773
+ anthropic_api: "anthropic_api";
604
774
  http: "http";
605
775
  shell: "shell";
606
776
  }>>;
607
777
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
608
778
  focusEntityType: z.ZodNullable<z.ZodEnum<{
609
779
  agent: "agent";
780
+ system: "system";
610
781
  approval: "approval";
611
782
  issue: "issue";
612
- system: "system";
613
783
  }>>;
614
784
  focusEntityId: z.ZodNullable<z.ZodString>;
615
785
  updatedAt: z.ZodString;
@@ -645,15 +815,17 @@ export declare const OfficeSpaceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
645
815
  codex: "codex";
646
816
  cursor: "cursor";
647
817
  opencode: "opencode";
818
+ openai_api: "openai_api";
819
+ anthropic_api: "anthropic_api";
648
820
  http: "http";
649
821
  shell: "shell";
650
822
  }>>;
651
823
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
652
824
  focusEntityType: z.ZodNullable<z.ZodEnum<{
653
825
  agent: "agent";
826
+ system: "system";
654
827
  approval: "approval";
655
828
  issue: "issue";
656
- system: "system";
657
829
  }>>;
658
830
  focusEntityId: z.ZodNullable<z.ZodString>;
659
831
  updatedAt: z.ZodString;
@@ -688,15 +860,17 @@ export declare const OfficeSpaceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
688
860
  codex: "codex";
689
861
  cursor: "cursor";
690
862
  opencode: "opencode";
863
+ openai_api: "openai_api";
864
+ anthropic_api: "anthropic_api";
691
865
  http: "http";
692
866
  shell: "shell";
693
867
  }>>;
694
868
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
695
869
  focusEntityType: z.ZodNullable<z.ZodEnum<{
696
870
  agent: "agent";
871
+ system: "system";
697
872
  approval: "approval";
698
873
  issue: "issue";
699
- system: "system";
700
874
  }>>;
701
875
  focusEntityId: z.ZodNullable<z.ZodString>;
702
876
  updatedAt: z.ZodString;
@@ -706,9 +880,162 @@ export declare const OfficeSpaceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
706
880
  occupantId: z.ZodString;
707
881
  }, z.core.$strip>], "type">;
708
882
  export type OfficeSpaceEvent = z.infer<typeof OfficeSpaceEventSchema>;
883
+ export declare const HeartbeatRunTranscriptEventKindSchema: z.ZodEnum<{
884
+ system: "system";
885
+ assistant: "assistant";
886
+ thinking: "thinking";
887
+ tool_call: "tool_call";
888
+ tool_result: "tool_result";
889
+ result: "result";
890
+ stderr: "stderr";
891
+ }>;
892
+ export type HeartbeatRunTranscriptEventKind = z.infer<typeof HeartbeatRunTranscriptEventKindSchema>;
893
+ export declare const HeartbeatRunTranscriptSignalLevelSchema: z.ZodEnum<{
894
+ low: "low";
895
+ medium: "medium";
896
+ high: "high";
897
+ noise: "noise";
898
+ }>;
899
+ export type HeartbeatRunTranscriptSignalLevel = z.infer<typeof HeartbeatRunTranscriptSignalLevelSchema>;
900
+ export declare const HeartbeatRunTranscriptSourceSchema: z.ZodEnum<{
901
+ stderr: "stderr";
902
+ stdout: "stdout";
903
+ trace_fallback: "trace_fallback";
904
+ }>;
905
+ export type HeartbeatRunTranscriptSource = z.infer<typeof HeartbeatRunTranscriptSourceSchema>;
906
+ export declare const HeartbeatRunRealtimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
907
+ type: z.ZodLiteral<"runs.snapshot">;
908
+ runs: z.ZodArray<z.ZodObject<{
909
+ runId: z.ZodString;
910
+ status: z.ZodEnum<{
911
+ completed: "completed";
912
+ failed: "failed";
913
+ skipped: "skipped";
914
+ started: "started";
915
+ }>;
916
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
+ startedAt: z.ZodString;
918
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
919
+ }, z.core.$strip>>;
920
+ transcripts: z.ZodArray<z.ZodObject<{
921
+ runId: z.ZodString;
922
+ messages: z.ZodArray<z.ZodObject<{
923
+ id: z.ZodString;
924
+ runId: z.ZodString;
925
+ sequence: z.ZodNumber;
926
+ kind: z.ZodEnum<{
927
+ system: "system";
928
+ assistant: "assistant";
929
+ thinking: "thinking";
930
+ tool_call: "tool_call";
931
+ tool_result: "tool_result";
932
+ result: "result";
933
+ stderr: "stderr";
934
+ }>;
935
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
936
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
937
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
938
+ signalLevel: z.ZodOptional<z.ZodEnum<{
939
+ low: "low";
940
+ medium: "medium";
941
+ high: "high";
942
+ noise: "noise";
943
+ }>>;
944
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
945
+ source: z.ZodOptional<z.ZodEnum<{
946
+ stderr: "stderr";
947
+ stdout: "stdout";
948
+ trace_fallback: "trace_fallback";
949
+ }>>;
950
+ createdAt: z.ZodString;
951
+ }, z.core.$strip>>;
952
+ nextCursor: z.ZodNullable<z.ZodString>;
953
+ }, z.core.$strip>>;
954
+ }, z.core.$strip>, z.ZodObject<{
955
+ type: z.ZodLiteral<"run.status.updated">;
956
+ runId: z.ZodString;
957
+ status: z.ZodEnum<{
958
+ completed: "completed";
959
+ failed: "failed";
960
+ skipped: "skipped";
961
+ started: "started";
962
+ }>;
963
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ startedAt: z.ZodOptional<z.ZodString>;
965
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
966
+ }, z.core.$strip>, z.ZodObject<{
967
+ type: z.ZodLiteral<"run.transcript.append">;
968
+ runId: z.ZodString;
969
+ messages: z.ZodArray<z.ZodObject<{
970
+ id: z.ZodString;
971
+ runId: z.ZodString;
972
+ sequence: z.ZodNumber;
973
+ kind: z.ZodEnum<{
974
+ system: "system";
975
+ assistant: "assistant";
976
+ thinking: "thinking";
977
+ tool_call: "tool_call";
978
+ tool_result: "tool_result";
979
+ result: "result";
980
+ stderr: "stderr";
981
+ }>;
982
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
983
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
984
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
985
+ signalLevel: z.ZodOptional<z.ZodEnum<{
986
+ low: "low";
987
+ medium: "medium";
988
+ high: "high";
989
+ noise: "noise";
990
+ }>>;
991
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
992
+ source: z.ZodOptional<z.ZodEnum<{
993
+ stderr: "stderr";
994
+ stdout: "stdout";
995
+ trace_fallback: "trace_fallback";
996
+ }>>;
997
+ createdAt: z.ZodString;
998
+ }, z.core.$strip>>;
999
+ }, z.core.$strip>, z.ZodObject<{
1000
+ type: z.ZodLiteral<"run.transcript.snapshot">;
1001
+ runId: z.ZodString;
1002
+ messages: z.ZodArray<z.ZodObject<{
1003
+ id: z.ZodString;
1004
+ runId: z.ZodString;
1005
+ sequence: z.ZodNumber;
1006
+ kind: z.ZodEnum<{
1007
+ system: "system";
1008
+ assistant: "assistant";
1009
+ thinking: "thinking";
1010
+ tool_call: "tool_call";
1011
+ tool_result: "tool_result";
1012
+ result: "result";
1013
+ stderr: "stderr";
1014
+ }>;
1015
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1016
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1017
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1018
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1019
+ low: "low";
1020
+ medium: "medium";
1021
+ high: "high";
1022
+ noise: "noise";
1023
+ }>>;
1024
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1025
+ source: z.ZodOptional<z.ZodEnum<{
1026
+ stderr: "stderr";
1027
+ stdout: "stdout";
1028
+ trace_fallback: "trace_fallback";
1029
+ }>>;
1030
+ createdAt: z.ZodString;
1031
+ }, z.core.$strip>>;
1032
+ nextCursor: z.ZodNullable<z.ZodString>;
1033
+ }, z.core.$strip>], "type">;
1034
+ export type HeartbeatRunRealtimeEvent = z.infer<typeof HeartbeatRunRealtimeEventSchema>;
709
1035
  export declare const RealtimeChannelSchema: z.ZodEnum<{
710
1036
  governance: "governance";
711
1037
  "office-space": "office-space";
1038
+ "heartbeat-runs": "heartbeat-runs";
712
1039
  }>;
713
1040
  export type RealtimeChannel = z.infer<typeof RealtimeChannelSchema>;
714
1041
  export declare const RealtimeEventEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -815,15 +1142,17 @@ export declare const RealtimeEventEnvelopeSchema: z.ZodDiscriminatedUnion<[z.Zod
815
1142
  codex: "codex";
816
1143
  cursor: "cursor";
817
1144
  opencode: "opencode";
1145
+ openai_api: "openai_api";
1146
+ anthropic_api: "anthropic_api";
818
1147
  http: "http";
819
1148
  shell: "shell";
820
1149
  }>>;
821
1150
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
822
1151
  focusEntityType: z.ZodNullable<z.ZodEnum<{
823
1152
  agent: "agent";
1153
+ system: "system";
824
1154
  approval: "approval";
825
1155
  issue: "issue";
826
- system: "system";
827
1156
  }>>;
828
1157
  focusEntityId: z.ZodNullable<z.ZodString>;
829
1158
  updatedAt: z.ZodString;
@@ -858,15 +1187,17 @@ export declare const RealtimeEventEnvelopeSchema: z.ZodDiscriminatedUnion<[z.Zod
858
1187
  codex: "codex";
859
1188
  cursor: "cursor";
860
1189
  opencode: "opencode";
1190
+ openai_api: "openai_api";
1191
+ anthropic_api: "anthropic_api";
861
1192
  http: "http";
862
1193
  shell: "shell";
863
1194
  }>>;
864
1195
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
865
1196
  focusEntityType: z.ZodNullable<z.ZodEnum<{
866
1197
  agent: "agent";
1198
+ system: "system";
867
1199
  approval: "approval";
868
1200
  issue: "issue";
869
- system: "system";
870
1201
  }>>;
871
1202
  focusEntityId: z.ZodNullable<z.ZodString>;
872
1203
  updatedAt: z.ZodString;
@@ -875,6 +1206,136 @@ export declare const RealtimeEventEnvelopeSchema: z.ZodDiscriminatedUnion<[z.Zod
875
1206
  type: z.ZodLiteral<"office.occupant.left">;
876
1207
  occupantId: z.ZodString;
877
1208
  }, z.core.$strip>], "type">;
1209
+ }, z.core.$strip>, z.ZodObject<{
1210
+ channel: z.ZodLiteral<"heartbeat-runs">;
1211
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
1212
+ type: z.ZodLiteral<"runs.snapshot">;
1213
+ runs: z.ZodArray<z.ZodObject<{
1214
+ runId: z.ZodString;
1215
+ status: z.ZodEnum<{
1216
+ completed: "completed";
1217
+ failed: "failed";
1218
+ skipped: "skipped";
1219
+ started: "started";
1220
+ }>;
1221
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1222
+ startedAt: z.ZodString;
1223
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1224
+ }, z.core.$strip>>;
1225
+ transcripts: z.ZodArray<z.ZodObject<{
1226
+ runId: z.ZodString;
1227
+ messages: z.ZodArray<z.ZodObject<{
1228
+ id: z.ZodString;
1229
+ runId: z.ZodString;
1230
+ sequence: z.ZodNumber;
1231
+ kind: z.ZodEnum<{
1232
+ system: "system";
1233
+ assistant: "assistant";
1234
+ thinking: "thinking";
1235
+ tool_call: "tool_call";
1236
+ tool_result: "tool_result";
1237
+ result: "result";
1238
+ stderr: "stderr";
1239
+ }>;
1240
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1241
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1242
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1243
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1244
+ low: "low";
1245
+ medium: "medium";
1246
+ high: "high";
1247
+ noise: "noise";
1248
+ }>>;
1249
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1250
+ source: z.ZodOptional<z.ZodEnum<{
1251
+ stderr: "stderr";
1252
+ stdout: "stdout";
1253
+ trace_fallback: "trace_fallback";
1254
+ }>>;
1255
+ createdAt: z.ZodString;
1256
+ }, z.core.$strip>>;
1257
+ nextCursor: z.ZodNullable<z.ZodString>;
1258
+ }, z.core.$strip>>;
1259
+ }, z.core.$strip>, z.ZodObject<{
1260
+ type: z.ZodLiteral<"run.status.updated">;
1261
+ runId: z.ZodString;
1262
+ status: z.ZodEnum<{
1263
+ completed: "completed";
1264
+ failed: "failed";
1265
+ skipped: "skipped";
1266
+ started: "started";
1267
+ }>;
1268
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1269
+ startedAt: z.ZodOptional<z.ZodString>;
1270
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1271
+ }, z.core.$strip>, z.ZodObject<{
1272
+ type: z.ZodLiteral<"run.transcript.append">;
1273
+ runId: z.ZodString;
1274
+ messages: z.ZodArray<z.ZodObject<{
1275
+ id: z.ZodString;
1276
+ runId: z.ZodString;
1277
+ sequence: z.ZodNumber;
1278
+ kind: z.ZodEnum<{
1279
+ system: "system";
1280
+ assistant: "assistant";
1281
+ thinking: "thinking";
1282
+ tool_call: "tool_call";
1283
+ tool_result: "tool_result";
1284
+ result: "result";
1285
+ stderr: "stderr";
1286
+ }>;
1287
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1288
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1289
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1290
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1291
+ low: "low";
1292
+ medium: "medium";
1293
+ high: "high";
1294
+ noise: "noise";
1295
+ }>>;
1296
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1297
+ source: z.ZodOptional<z.ZodEnum<{
1298
+ stderr: "stderr";
1299
+ stdout: "stdout";
1300
+ trace_fallback: "trace_fallback";
1301
+ }>>;
1302
+ createdAt: z.ZodString;
1303
+ }, z.core.$strip>>;
1304
+ }, z.core.$strip>, z.ZodObject<{
1305
+ type: z.ZodLiteral<"run.transcript.snapshot">;
1306
+ runId: z.ZodString;
1307
+ messages: z.ZodArray<z.ZodObject<{
1308
+ id: z.ZodString;
1309
+ runId: z.ZodString;
1310
+ sequence: z.ZodNumber;
1311
+ kind: z.ZodEnum<{
1312
+ system: "system";
1313
+ assistant: "assistant";
1314
+ thinking: "thinking";
1315
+ tool_call: "tool_call";
1316
+ tool_result: "tool_result";
1317
+ result: "result";
1318
+ stderr: "stderr";
1319
+ }>;
1320
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1321
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1322
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1323
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1324
+ low: "low";
1325
+ medium: "medium";
1326
+ high: "high";
1327
+ noise: "noise";
1328
+ }>>;
1329
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1330
+ source: z.ZodOptional<z.ZodEnum<{
1331
+ stderr: "stderr";
1332
+ stdout: "stdout";
1333
+ trace_fallback: "trace_fallback";
1334
+ }>>;
1335
+ createdAt: z.ZodString;
1336
+ }, z.core.$strip>>;
1337
+ nextCursor: z.ZodNullable<z.ZodString>;
1338
+ }, z.core.$strip>], "type">;
878
1339
  }, z.core.$strip>], "channel">;
879
1340
  export type RealtimeEventEnvelope = z.infer<typeof RealtimeEventEnvelopeSchema>;
880
1341
  export declare const RealtimeSubscribedMessageSchema: z.ZodObject<{
@@ -883,6 +1344,7 @@ export declare const RealtimeSubscribedMessageSchema: z.ZodObject<{
883
1344
  channels: z.ZodArray<z.ZodEnum<{
884
1345
  governance: "governance";
885
1346
  "office-space": "office-space";
1347
+ "heartbeat-runs": "heartbeat-runs";
886
1348
  }>>;
887
1349
  }, z.core.$strip>;
888
1350
  export declare const RealtimeEventMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -993,15 +1455,17 @@ export declare const RealtimeEventMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
993
1455
  codex: "codex";
994
1456
  cursor: "cursor";
995
1457
  opencode: "opencode";
1458
+ openai_api: "openai_api";
1459
+ anthropic_api: "anthropic_api";
996
1460
  http: "http";
997
1461
  shell: "shell";
998
1462
  }>>;
999
1463
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1000
1464
  focusEntityType: z.ZodNullable<z.ZodEnum<{
1001
1465
  agent: "agent";
1466
+ system: "system";
1002
1467
  approval: "approval";
1003
1468
  issue: "issue";
1004
- system: "system";
1005
1469
  }>>;
1006
1470
  focusEntityId: z.ZodNullable<z.ZodString>;
1007
1471
  updatedAt: z.ZodString;
@@ -1036,15 +1500,17 @@ export declare const RealtimeEventMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
1036
1500
  codex: "codex";
1037
1501
  cursor: "cursor";
1038
1502
  opencode: "opencode";
1503
+ openai_api: "openai_api";
1504
+ anthropic_api: "anthropic_api";
1039
1505
  http: "http";
1040
1506
  shell: "shell";
1041
1507
  }>>;
1042
1508
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1043
1509
  focusEntityType: z.ZodNullable<z.ZodEnum<{
1044
1510
  agent: "agent";
1511
+ system: "system";
1045
1512
  approval: "approval";
1046
1513
  issue: "issue";
1047
- system: "system";
1048
1514
  }>>;
1049
1515
  focusEntityId: z.ZodNullable<z.ZodString>;
1050
1516
  updatedAt: z.ZodString;
@@ -1053,6 +1519,138 @@ export declare const RealtimeEventMessageSchema: z.ZodDiscriminatedUnion<[z.ZodO
1053
1519
  type: z.ZodLiteral<"office.occupant.left">;
1054
1520
  occupantId: z.ZodString;
1055
1521
  }, z.core.$strip>], "type">;
1522
+ }, z.core.$strip>, z.ZodObject<{
1523
+ kind: z.ZodLiteral<"event">;
1524
+ companyId: z.ZodString;
1525
+ channel: z.ZodLiteral<"heartbeat-runs">;
1526
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
1527
+ type: z.ZodLiteral<"runs.snapshot">;
1528
+ runs: z.ZodArray<z.ZodObject<{
1529
+ runId: z.ZodString;
1530
+ status: z.ZodEnum<{
1531
+ completed: "completed";
1532
+ failed: "failed";
1533
+ skipped: "skipped";
1534
+ started: "started";
1535
+ }>;
1536
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1537
+ startedAt: z.ZodString;
1538
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1539
+ }, z.core.$strip>>;
1540
+ transcripts: z.ZodArray<z.ZodObject<{
1541
+ runId: z.ZodString;
1542
+ messages: z.ZodArray<z.ZodObject<{
1543
+ id: z.ZodString;
1544
+ runId: z.ZodString;
1545
+ sequence: z.ZodNumber;
1546
+ kind: z.ZodEnum<{
1547
+ system: "system";
1548
+ assistant: "assistant";
1549
+ thinking: "thinking";
1550
+ tool_call: "tool_call";
1551
+ tool_result: "tool_result";
1552
+ result: "result";
1553
+ stderr: "stderr";
1554
+ }>;
1555
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1556
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1557
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1558
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1559
+ low: "low";
1560
+ medium: "medium";
1561
+ high: "high";
1562
+ noise: "noise";
1563
+ }>>;
1564
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1565
+ source: z.ZodOptional<z.ZodEnum<{
1566
+ stderr: "stderr";
1567
+ stdout: "stdout";
1568
+ trace_fallback: "trace_fallback";
1569
+ }>>;
1570
+ createdAt: z.ZodString;
1571
+ }, z.core.$strip>>;
1572
+ nextCursor: z.ZodNullable<z.ZodString>;
1573
+ }, z.core.$strip>>;
1574
+ }, z.core.$strip>, z.ZodObject<{
1575
+ type: z.ZodLiteral<"run.status.updated">;
1576
+ runId: z.ZodString;
1577
+ status: z.ZodEnum<{
1578
+ completed: "completed";
1579
+ failed: "failed";
1580
+ skipped: "skipped";
1581
+ started: "started";
1582
+ }>;
1583
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1584
+ startedAt: z.ZodOptional<z.ZodString>;
1585
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1586
+ }, z.core.$strip>, z.ZodObject<{
1587
+ type: z.ZodLiteral<"run.transcript.append">;
1588
+ runId: z.ZodString;
1589
+ messages: z.ZodArray<z.ZodObject<{
1590
+ id: z.ZodString;
1591
+ runId: z.ZodString;
1592
+ sequence: z.ZodNumber;
1593
+ kind: z.ZodEnum<{
1594
+ system: "system";
1595
+ assistant: "assistant";
1596
+ thinking: "thinking";
1597
+ tool_call: "tool_call";
1598
+ tool_result: "tool_result";
1599
+ result: "result";
1600
+ stderr: "stderr";
1601
+ }>;
1602
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1603
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1604
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1605
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1606
+ low: "low";
1607
+ medium: "medium";
1608
+ high: "high";
1609
+ noise: "noise";
1610
+ }>>;
1611
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1612
+ source: z.ZodOptional<z.ZodEnum<{
1613
+ stderr: "stderr";
1614
+ stdout: "stdout";
1615
+ trace_fallback: "trace_fallback";
1616
+ }>>;
1617
+ createdAt: z.ZodString;
1618
+ }, z.core.$strip>>;
1619
+ }, z.core.$strip>, z.ZodObject<{
1620
+ type: z.ZodLiteral<"run.transcript.snapshot">;
1621
+ runId: z.ZodString;
1622
+ messages: z.ZodArray<z.ZodObject<{
1623
+ id: z.ZodString;
1624
+ runId: z.ZodString;
1625
+ sequence: z.ZodNumber;
1626
+ kind: z.ZodEnum<{
1627
+ system: "system";
1628
+ assistant: "assistant";
1629
+ thinking: "thinking";
1630
+ tool_call: "tool_call";
1631
+ tool_result: "tool_result";
1632
+ result: "result";
1633
+ stderr: "stderr";
1634
+ }>;
1635
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1636
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1637
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1638
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1639
+ low: "low";
1640
+ medium: "medium";
1641
+ high: "high";
1642
+ noise: "noise";
1643
+ }>>;
1644
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1645
+ source: z.ZodOptional<z.ZodEnum<{
1646
+ stderr: "stderr";
1647
+ stdout: "stdout";
1648
+ trace_fallback: "trace_fallback";
1649
+ }>>;
1650
+ createdAt: z.ZodString;
1651
+ }, z.core.$strip>>;
1652
+ nextCursor: z.ZodNullable<z.ZodString>;
1653
+ }, z.core.$strip>], "type">;
1056
1654
  }, z.core.$strip>], "channel">;
1057
1655
  export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
1058
1656
  kind: z.ZodLiteral<"subscribed">;
@@ -1060,6 +1658,7 @@ export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
1060
1658
  channels: z.ZodArray<z.ZodEnum<{
1061
1659
  governance: "governance";
1062
1660
  "office-space": "office-space";
1661
+ "heartbeat-runs": "heartbeat-runs";
1063
1662
  }>>;
1064
1663
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1065
1664
  kind: z.ZodLiteral<"event">;
@@ -1169,15 +1768,17 @@ export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
1169
1768
  codex: "codex";
1170
1769
  cursor: "cursor";
1171
1770
  opencode: "opencode";
1771
+ openai_api: "openai_api";
1772
+ anthropic_api: "anthropic_api";
1172
1773
  http: "http";
1173
1774
  shell: "shell";
1174
1775
  }>>;
1175
1776
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1176
1777
  focusEntityType: z.ZodNullable<z.ZodEnum<{
1177
1778
  agent: "agent";
1779
+ system: "system";
1178
1780
  approval: "approval";
1179
1781
  issue: "issue";
1180
- system: "system";
1181
1782
  }>>;
1182
1783
  focusEntityId: z.ZodNullable<z.ZodString>;
1183
1784
  updatedAt: z.ZodString;
@@ -1212,15 +1813,17 @@ export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
1212
1813
  codex: "codex";
1213
1814
  cursor: "cursor";
1214
1815
  opencode: "opencode";
1816
+ openai_api: "openai_api";
1817
+ anthropic_api: "anthropic_api";
1215
1818
  http: "http";
1216
1819
  shell: "shell";
1217
1820
  }>>;
1218
1821
  avatarSeed: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1219
1822
  focusEntityType: z.ZodNullable<z.ZodEnum<{
1220
1823
  agent: "agent";
1824
+ system: "system";
1221
1825
  approval: "approval";
1222
1826
  issue: "issue";
1223
- system: "system";
1224
1827
  }>>;
1225
1828
  focusEntityId: z.ZodNullable<z.ZodString>;
1226
1829
  updatedAt: z.ZodString;
@@ -1229,6 +1832,138 @@ export declare const RealtimeMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
1229
1832
  type: z.ZodLiteral<"office.occupant.left">;
1230
1833
  occupantId: z.ZodString;
1231
1834
  }, z.core.$strip>], "type">;
1835
+ }, z.core.$strip>, z.ZodObject<{
1836
+ kind: z.ZodLiteral<"event">;
1837
+ companyId: z.ZodString;
1838
+ channel: z.ZodLiteral<"heartbeat-runs">;
1839
+ event: z.ZodDiscriminatedUnion<[z.ZodObject<{
1840
+ type: z.ZodLiteral<"runs.snapshot">;
1841
+ runs: z.ZodArray<z.ZodObject<{
1842
+ runId: z.ZodString;
1843
+ status: z.ZodEnum<{
1844
+ completed: "completed";
1845
+ failed: "failed";
1846
+ skipped: "skipped";
1847
+ started: "started";
1848
+ }>;
1849
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1850
+ startedAt: z.ZodString;
1851
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1852
+ }, z.core.$strip>>;
1853
+ transcripts: z.ZodArray<z.ZodObject<{
1854
+ runId: z.ZodString;
1855
+ messages: z.ZodArray<z.ZodObject<{
1856
+ id: z.ZodString;
1857
+ runId: z.ZodString;
1858
+ sequence: z.ZodNumber;
1859
+ kind: z.ZodEnum<{
1860
+ system: "system";
1861
+ assistant: "assistant";
1862
+ thinking: "thinking";
1863
+ tool_call: "tool_call";
1864
+ tool_result: "tool_result";
1865
+ result: "result";
1866
+ stderr: "stderr";
1867
+ }>;
1868
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1869
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1870
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1871
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1872
+ low: "low";
1873
+ medium: "medium";
1874
+ high: "high";
1875
+ noise: "noise";
1876
+ }>>;
1877
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1878
+ source: z.ZodOptional<z.ZodEnum<{
1879
+ stderr: "stderr";
1880
+ stdout: "stdout";
1881
+ trace_fallback: "trace_fallback";
1882
+ }>>;
1883
+ createdAt: z.ZodString;
1884
+ }, z.core.$strip>>;
1885
+ nextCursor: z.ZodNullable<z.ZodString>;
1886
+ }, z.core.$strip>>;
1887
+ }, z.core.$strip>, z.ZodObject<{
1888
+ type: z.ZodLiteral<"run.status.updated">;
1889
+ runId: z.ZodString;
1890
+ status: z.ZodEnum<{
1891
+ completed: "completed";
1892
+ failed: "failed";
1893
+ skipped: "skipped";
1894
+ started: "started";
1895
+ }>;
1896
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1897
+ startedAt: z.ZodOptional<z.ZodString>;
1898
+ finishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1899
+ }, z.core.$strip>, z.ZodObject<{
1900
+ type: z.ZodLiteral<"run.transcript.append">;
1901
+ runId: z.ZodString;
1902
+ messages: z.ZodArray<z.ZodObject<{
1903
+ id: z.ZodString;
1904
+ runId: z.ZodString;
1905
+ sequence: z.ZodNumber;
1906
+ kind: z.ZodEnum<{
1907
+ system: "system";
1908
+ assistant: "assistant";
1909
+ thinking: "thinking";
1910
+ tool_call: "tool_call";
1911
+ tool_result: "tool_result";
1912
+ result: "result";
1913
+ stderr: "stderr";
1914
+ }>;
1915
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1916
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1917
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1918
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1919
+ low: "low";
1920
+ medium: "medium";
1921
+ high: "high";
1922
+ noise: "noise";
1923
+ }>>;
1924
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1925
+ source: z.ZodOptional<z.ZodEnum<{
1926
+ stderr: "stderr";
1927
+ stdout: "stdout";
1928
+ trace_fallback: "trace_fallback";
1929
+ }>>;
1930
+ createdAt: z.ZodString;
1931
+ }, z.core.$strip>>;
1932
+ }, z.core.$strip>, z.ZodObject<{
1933
+ type: z.ZodLiteral<"run.transcript.snapshot">;
1934
+ runId: z.ZodString;
1935
+ messages: z.ZodArray<z.ZodObject<{
1936
+ id: z.ZodString;
1937
+ runId: z.ZodString;
1938
+ sequence: z.ZodNumber;
1939
+ kind: z.ZodEnum<{
1940
+ system: "system";
1941
+ assistant: "assistant";
1942
+ thinking: "thinking";
1943
+ tool_call: "tool_call";
1944
+ tool_result: "tool_result";
1945
+ result: "result";
1946
+ stderr: "stderr";
1947
+ }>;
1948
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1949
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1950
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1951
+ signalLevel: z.ZodOptional<z.ZodEnum<{
1952
+ low: "low";
1953
+ medium: "medium";
1954
+ high: "high";
1955
+ noise: "noise";
1956
+ }>>;
1957
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1958
+ source: z.ZodOptional<z.ZodEnum<{
1959
+ stderr: "stderr";
1960
+ stdout: "stdout";
1961
+ trace_fallback: "trace_fallback";
1962
+ }>>;
1963
+ createdAt: z.ZodString;
1964
+ }, z.core.$strip>>;
1965
+ nextCursor: z.ZodNullable<z.ZodString>;
1966
+ }, z.core.$strip>], "type">;
1232
1967
  }, z.core.$strip>], "channel">]>;
1233
1968
  export type RealtimeMessage = z.infer<typeof RealtimeMessageSchema>;
1234
1969
  export declare const CostLedgerEntrySchema: z.ZodObject<{
@@ -1242,6 +1977,8 @@ export declare const CostLedgerEntrySchema: z.ZodObject<{
1242
1977
  codex: "codex";
1243
1978
  cursor: "cursor";
1244
1979
  opencode: "opencode";
1980
+ openai_api: "openai_api";
1981
+ anthropic_api: "anthropic_api";
1245
1982
  http: "http";
1246
1983
  shell: "shell";
1247
1984
  }>;
@@ -1254,9 +1991,9 @@ export declare const AuditEventSchema: z.ZodObject<{
1254
1991
  id: z.ZodString;
1255
1992
  companyId: z.ZodString;
1256
1993
  actorType: z.ZodEnum<{
1994
+ human: "human";
1257
1995
  agent: "agent";
1258
1996
  system: "system";
1259
- human: "human";
1260
1997
  }>;
1261
1998
  actorId: z.ZodNullable<z.ZodString>;
1262
1999
  eventType: z.ZodString;
@@ -1280,6 +2017,146 @@ export declare const HeartbeatRunSchema: z.ZodObject<{
1280
2017
  finishedAt: z.ZodNullable<z.ZodString>;
1281
2018
  message: z.ZodOptional<z.ZodString>;
1282
2019
  }, z.core.$strip>;
2020
+ export declare const HeartbeatRunMessageSchema: z.ZodObject<{
2021
+ id: z.ZodString;
2022
+ companyId: z.ZodString;
2023
+ runId: z.ZodString;
2024
+ sequence: z.ZodNumber;
2025
+ kind: z.ZodEnum<{
2026
+ system: "system";
2027
+ assistant: "assistant";
2028
+ thinking: "thinking";
2029
+ tool_call: "tool_call";
2030
+ tool_result: "tool_result";
2031
+ result: "result";
2032
+ stderr: "stderr";
2033
+ }>;
2034
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2035
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2036
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2037
+ signalLevel: z.ZodOptional<z.ZodEnum<{
2038
+ low: "low";
2039
+ medium: "medium";
2040
+ high: "high";
2041
+ noise: "noise";
2042
+ }>>;
2043
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2044
+ source: z.ZodOptional<z.ZodEnum<{
2045
+ stderr: "stderr";
2046
+ stdout: "stdout";
2047
+ trace_fallback: "trace_fallback";
2048
+ }>>;
2049
+ createdAt: z.ZodString;
2050
+ }, z.core.$strip>;
2051
+ export type HeartbeatRunMessage = z.infer<typeof HeartbeatRunMessageSchema>;
2052
+ export declare const ListHeartbeatRunMessagesResponseSchema: z.ZodObject<{
2053
+ runId: z.ZodString;
2054
+ items: z.ZodArray<z.ZodObject<{
2055
+ id: z.ZodString;
2056
+ companyId: z.ZodString;
2057
+ runId: z.ZodString;
2058
+ sequence: z.ZodNumber;
2059
+ kind: z.ZodEnum<{
2060
+ system: "system";
2061
+ assistant: "assistant";
2062
+ thinking: "thinking";
2063
+ tool_call: "tool_call";
2064
+ tool_result: "tool_result";
2065
+ result: "result";
2066
+ stderr: "stderr";
2067
+ }>;
2068
+ label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2069
+ text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2070
+ payload: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2071
+ signalLevel: z.ZodOptional<z.ZodEnum<{
2072
+ low: "low";
2073
+ medium: "medium";
2074
+ high: "high";
2075
+ noise: "noise";
2076
+ }>>;
2077
+ groupKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2078
+ source: z.ZodOptional<z.ZodEnum<{
2079
+ stderr: "stderr";
2080
+ stdout: "stdout";
2081
+ trace_fallback: "trace_fallback";
2082
+ }>>;
2083
+ createdAt: z.ZodString;
2084
+ }, z.core.$strip>>;
2085
+ nextCursor: z.ZodNullable<z.ZodString>;
2086
+ }, z.core.$strip>;
2087
+ export type ListHeartbeatRunMessagesResponse = z.infer<typeof ListHeartbeatRunMessagesResponseSchema>;
2088
+ export declare const HeartbeatRunDetailSchema: z.ZodObject<{
2089
+ run: z.ZodObject<{
2090
+ id: z.ZodString;
2091
+ companyId: z.ZodString;
2092
+ agentId: z.ZodString;
2093
+ status: z.ZodEnum<{
2094
+ completed: "completed";
2095
+ failed: "failed";
2096
+ skipped: "skipped";
2097
+ started: "started";
2098
+ }>;
2099
+ startedAt: z.ZodString;
2100
+ finishedAt: z.ZodNullable<z.ZodString>;
2101
+ message: z.ZodOptional<z.ZodString>;
2102
+ }, z.core.$strip>;
2103
+ details: z.ZodNullable<z.ZodObject<{
2104
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2105
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2106
+ errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2107
+ result: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2108
+ issueIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2109
+ outcome: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2110
+ kind: z.ZodEnum<{
2111
+ blocked: "blocked";
2112
+ completed: "completed";
2113
+ failed: "failed";
2114
+ skipped: "skipped";
2115
+ }>;
2116
+ issueIdsTouched: z.ZodDefault<z.ZodArray<z.ZodString>>;
2117
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodObject<{
2118
+ path: z.ZodString;
2119
+ kind: z.ZodString;
2120
+ }, z.core.$strip>>>;
2121
+ actions: z.ZodDefault<z.ZodArray<z.ZodObject<{
2122
+ type: z.ZodString;
2123
+ targetId: z.ZodOptional<z.ZodString>;
2124
+ status: z.ZodEnum<{
2125
+ error: "error";
2126
+ ok: "ok";
2127
+ warn: "warn";
2128
+ }>;
2129
+ detail: z.ZodOptional<z.ZodString>;
2130
+ }, z.core.$strip>>>;
2131
+ blockers: z.ZodDefault<z.ZodArray<z.ZodObject<{
2132
+ code: z.ZodString;
2133
+ message: z.ZodString;
2134
+ retryable: z.ZodBoolean;
2135
+ }, z.core.$strip>>>;
2136
+ nextSuggestedState: z.ZodOptional<z.ZodEnum<{
2137
+ blocked: "blocked";
2138
+ todo: "todo";
2139
+ in_progress: "in_progress";
2140
+ in_review: "in_review";
2141
+ done: "done";
2142
+ }>>;
2143
+ }, z.core.$strip>>>;
2144
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2145
+ tokenInput: z.ZodOptional<z.ZodNumber>;
2146
+ tokenOutput: z.ZodOptional<z.ZodNumber>;
2147
+ usdCost: z.ZodOptional<z.ZodNumber>;
2148
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2149
+ }, z.core.$strip>>>;
2150
+ trace: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2151
+ diagnostics: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
2152
+ }, z.core.$strip>>;
2153
+ transcript: z.ZodObject<{
2154
+ hasPersistedMessages: z.ZodBoolean;
2155
+ fallbackFromTrace: z.ZodBoolean;
2156
+ truncated: z.ZodBoolean;
2157
+ }, z.core.$strip>;
2158
+ }, z.core.$strip>;
2159
+ export type HeartbeatRunDetail = z.infer<typeof HeartbeatRunDetailSchema>;
1283
2160
  export declare const PaginatedSchema: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
1284
2161
  items: z.ZodArray<T>;
1285
2162
  nextCursor: z.ZodNullable<z.ZodString>;