@agent-os-sdk/client 0.9.25 → 0.9.27

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 (65) hide show
  1. package/dist/generated/openapi.d.ts +82 -0
  2. package/dist/generated/openapi.d.ts.map +1 -1
  3. package/dist/modules/runs.d.ts.map +1 -1
  4. package/dist/modules/templates.d.ts +23 -0
  5. package/dist/modules/templates.d.ts.map +1 -1
  6. package/dist/modules/templates.js +7 -0
  7. package/package.json +2 -2
  8. package/src/client/AgentOsClient.ts +0 -294
  9. package/src/client/HttpRequestBuilder.ts +0 -115
  10. package/src/client/OperationContext.ts +0 -22
  11. package/src/client/OperationContextProvider.ts +0 -89
  12. package/src/client/auth.ts +0 -136
  13. package/src/client/config.ts +0 -100
  14. package/src/client/helpers.ts +0 -98
  15. package/src/client/pagination.ts +0 -218
  16. package/src/client/raw.ts +0 -609
  17. package/src/client/retry.ts +0 -150
  18. package/src/client/sanitize.ts +0 -31
  19. package/src/client/timeout.ts +0 -59
  20. package/src/errors/factory.ts +0 -140
  21. package/src/errors/index.ts +0 -365
  22. package/src/generated/client.ts +0 -32
  23. package/src/generated/index.ts +0 -2
  24. package/src/generated/openapi.ts +0 -12302
  25. package/src/generated/swagger.json +0 -16851
  26. package/src/index.ts +0 -131
  27. package/src/modules/a2a.ts +0 -64
  28. package/src/modules/agents.ts +0 -604
  29. package/src/modules/apiTokens.ts +0 -101
  30. package/src/modules/approvals.ts +0 -151
  31. package/src/modules/audit.ts +0 -145
  32. package/src/modules/auth.ts +0 -33
  33. package/src/modules/catalog.ts +0 -241
  34. package/src/modules/chatwoot.ts +0 -242
  35. package/src/modules/checkpoints.ts +0 -87
  36. package/src/modules/contracts.ts +0 -80
  37. package/src/modules/credentials.ts +0 -216
  38. package/src/modules/crons.ts +0 -115
  39. package/src/modules/datasets.ts +0 -142
  40. package/src/modules/evaluation.ts +0 -269
  41. package/src/modules/files.ts +0 -208
  42. package/src/modules/improvements.ts +0 -71
  43. package/src/modules/info.ts +0 -143
  44. package/src/modules/me.ts +0 -74
  45. package/src/modules/members.ts +0 -199
  46. package/src/modules/memberships.ts +0 -42
  47. package/src/modules/metaAgent.ts +0 -131
  48. package/src/modules/metrics.ts +0 -34
  49. package/src/modules/observability.ts +0 -28
  50. package/src/modules/playground.ts +0 -68
  51. package/src/modules/presets.ts +0 -246
  52. package/src/modules/prompts.ts +0 -147
  53. package/src/modules/roles.ts +0 -112
  54. package/src/modules/runs.ts +0 -878
  55. package/src/modules/store.ts +0 -65
  56. package/src/modules/templates.ts +0 -40
  57. package/src/modules/tenants.ts +0 -79
  58. package/src/modules/threads.ts +0 -343
  59. package/src/modules/tools.ts +0 -91
  60. package/src/modules/traces.ts +0 -133
  61. package/src/modules/triggers.ts +0 -357
  62. package/src/modules/usage.ts +0 -117
  63. package/src/modules/vectorStores.ts +0 -257
  64. package/src/modules/workspaces.ts +0 -216
  65. package/src/sse/client.ts +0 -179
@@ -1,257 +0,0 @@
1
- /**
2
- * Vector Stores Module - Fully Typed
3
- */
4
-
5
- import type { RawClient, APIResponse, components } from "../client/raw.js";
6
-
7
- type VectorStoreResponse = components["schemas"]["VectorStoreResponse"];
8
- type VectorQueryResponse = components["schemas"]["VectorQueryResponse"];
9
- type VectorStoreFileResponse = components["schemas"]["VectorStoreFileResponse"];
10
-
11
- export interface VectorStore {
12
- id: string;
13
- name: string;
14
- embedding_provider: string;
15
- embedding_model: string;
16
- dimension: number;
17
- credential_binding_key?: string;
18
- file_count: number;
19
- created_at: string;
20
- }
21
-
22
- export interface VectorStoreListResponse {
23
- items: VectorStore[];
24
- total: number;
25
- }
26
-
27
- export interface VectorSearchResult {
28
- id: string;
29
- chunk_index: number;
30
- content_text: string;
31
- score: number;
32
- file_id?: string;
33
- }
34
-
35
- export interface VectorQueryResult {
36
- query: string;
37
- results: VectorSearchResult[];
38
- total_results: number;
39
- }
40
-
41
- export interface VectorStoreFile {
42
- id: string;
43
- file_id: string;
44
- filename: string;
45
- status: "pending" | "processing" | "completed" | "failed";
46
- created_at: string;
47
- }
48
-
49
- export interface VectorStoreFilesResponse {
50
- items: VectorStoreFile[];
51
- total: number;
52
- }
53
-
54
- type VectorStoreLike = VectorStoreResponse & {
55
- embeddingProvider?: string;
56
- embeddingModel?: string;
57
- credentialBindingKey?: string;
58
- fileCount?: number;
59
- createdAt?: string;
60
- };
61
-
62
- type VectorStoreFileLike = VectorStoreFileResponse & {
63
- fileId?: string;
64
- createdAt?: string;
65
- };
66
-
67
- function toVectorStore(item: VectorStoreLike): VectorStore {
68
- return {
69
- id: item.id ?? "",
70
- name: item.name ?? "",
71
- embedding_provider: item.embedding_provider ?? item.embeddingProvider ?? "",
72
- embedding_model: item.embedding_model ?? item.embeddingModel ?? "",
73
- dimension: item.dimension ?? 0,
74
- credential_binding_key: item.credential_binding_key ?? item.credentialBindingKey ?? undefined,
75
- file_count: item.file_count ?? item.fileCount ?? 0,
76
- created_at: item.created_at ?? item.createdAt ?? "",
77
- };
78
- }
79
-
80
- function toVectorStoreFile(item: VectorStoreFileLike): VectorStoreFile {
81
- return {
82
- id: item.id ?? "",
83
- file_id: item.file_id ?? item.fileId ?? "",
84
- filename: item.filename ?? "",
85
- status: (item.status ?? "pending") as VectorStoreFile["status"],
86
- created_at: item.created_at ?? item.createdAt ?? "",
87
- };
88
- }
89
-
90
- export class VectorStoresModule {
91
- constructor(private client: RawClient, private headers: () => Record<string, string>) { }
92
-
93
- /**
94
- * List all vector stores.
95
- */
96
- async list(params?: {
97
- workspace_id?: string;
98
- limit?: number;
99
- offset?: number;
100
- }): Promise<APIResponse<VectorStoreListResponse>> {
101
- const response = await this.client.GET<VectorStoreResponse[]>("/v1/api/vector-stores", {
102
- params: { query: params },
103
- headers: this.headers(),
104
- });
105
-
106
- const items = Array.isArray(response.data)
107
- ? response.data.map((item) => toVectorStore(item))
108
- : [];
109
-
110
- return {
111
- ...response,
112
- data: {
113
- items,
114
- total: items.length,
115
- },
116
- };
117
- }
118
-
119
- /**
120
- * Get a vector store by ID.
121
- */
122
- async get(storeId: string): Promise<APIResponse<VectorStore>> {
123
- const response = await this.client.GET<VectorStoreResponse>("/v1/api/vector-stores/{vectorStoreId}", {
124
- params: { path: { vectorStoreId: storeId } },
125
- headers: this.headers(),
126
- });
127
-
128
- if (!response.data) {
129
- return response as APIResponse<VectorStore>;
130
- }
131
-
132
- return {
133
- ...response,
134
- data: toVectorStore(response.data),
135
- };
136
- }
137
-
138
- /**
139
- * Create a new vector store.
140
- */
141
- async create(body: {
142
- name: string;
143
- embedding_provider?: string;
144
- embedding_model?: string;
145
- dimension?: number;
146
- credential_binding_key?: string;
147
- }): Promise<APIResponse<VectorStore>> {
148
- const response = await this.client.POST<VectorStoreResponse>("/v1/api/vector-stores", {
149
- body,
150
- headers: this.headers(),
151
- });
152
-
153
- if (!response.data) {
154
- return response as APIResponse<VectorStore>;
155
- }
156
-
157
- return {
158
- ...response,
159
- data: toVectorStore(response.data),
160
- };
161
- }
162
-
163
- /**
164
- * Delete a vector store.
165
- */
166
- async delete(storeId: string): Promise<APIResponse<void>> {
167
- return this.client.DELETE<void>("/v1/api/vector-stores/{vectorStoreId}", {
168
- params: { path: { vectorStoreId: storeId } },
169
- headers: this.headers(),
170
- });
171
- }
172
-
173
- // ======================== Query ========================
174
-
175
- /**
176
- * Query a vector store for similar content.
177
- */
178
- async query(storeId: string, body: {
179
- query: string;
180
- top_k?: number;
181
- min_score?: number;
182
- }): Promise<APIResponse<VectorQueryResult>> {
183
- return this.client.POST<VectorQueryResponse>("/v1/api/vector-stores/{vectorStoreId}/query", {
184
- params: { path: { vectorStoreId: storeId } },
185
- body,
186
- headers: this.headers(),
187
- }) as Promise<APIResponse<VectorQueryResult>>;
188
- }
189
-
190
- // ======================== Files ========================
191
-
192
- /**
193
- * List files in a vector store.
194
- */
195
- async listFiles(storeId: string, params?: {
196
- skip?: number;
197
- take?: number;
198
- }): Promise<APIResponse<VectorStoreFilesResponse>> {
199
- const response = await this.client.GET<VectorStoreFileResponse[]>("/v1/api/vector-stores/{vectorStoreId}/files", {
200
- params: { path: { vectorStoreId: storeId }, query: params },
201
- headers: this.headers(),
202
- });
203
-
204
- const items = Array.isArray(response.data)
205
- ? response.data.map((item) => toVectorStoreFile(item))
206
- : [];
207
-
208
- return {
209
- ...response,
210
- data: {
211
- items,
212
- total: items.length,
213
- },
214
- };
215
- }
216
-
217
- /**
218
- * Attach a file to a vector store.
219
- */
220
- async attachFile(storeId: string, fileId: string): Promise<APIResponse<VectorStoreFile>> {
221
- const response = await this.client.POST<VectorStoreFileResponse>("/v1/api/vector-stores/{vectorStoreId}/files", {
222
- params: { path: { vectorStoreId: storeId } },
223
- body: { file_id: fileId },
224
- headers: this.headers(),
225
- });
226
-
227
- if (!response.data) {
228
- return response as APIResponse<VectorStoreFile>;
229
- }
230
-
231
- return {
232
- ...response,
233
- data: toVectorStoreFile(response.data),
234
- };
235
- }
236
-
237
- /**
238
- * Remove a file from a vector store.
239
- */
240
- async removeFile(storeId: string, fileId: string): Promise<APIResponse<void>> {
241
- return this.client.DELETE<void>("/v1/api/vector-stores/{vectorStoreId}/files/{fileId}", {
242
- params: { path: { vectorStoreId: storeId, fileId } },
243
- headers: this.headers(),
244
- });
245
- }
246
-
247
- /**
248
- * Bind a vector store to an agent.
249
- */
250
- async bindAgent(storeId: string, agentId: string): Promise<APIResponse<void>> {
251
- return this.client.POST<void>("/v1/api/vector-stores/{vectorStoreId}/bind-agent", {
252
- params: { path: { vectorStoreId: storeId } },
253
- body: { agent_id: agentId },
254
- headers: this.headers(),
255
- });
256
- }
257
- }
@@ -1,216 +0,0 @@
1
- /**
2
- * Workspaces Module - Fully Typed
3
- */
4
-
5
- import type { RawClient, APIResponse, components } from "../client/raw.js";
6
- import { parseSSE } from "../sse/client.js";
7
-
8
- type UpdateWorkspaceRequest = components["schemas"]["UpdateWorkspaceRequest"];
9
-
10
- // ─── Workspace Event Types ─────────────────────────────────────
11
-
12
- /** Event emitted by workspace-level SSE stream. */
13
- export interface WorkspaceEvent {
14
- type: string;
15
- workspace_id: string;
16
- run_id?: string;
17
- agent_id?: string;
18
- old_status?: string;
19
- new_status?: string;
20
- ts: number;
21
- }
22
-
23
- /** Options for followEvents(). */
24
- export interface WorkspaceFollowOptions {
25
- /** AbortSignal to kill the SSE connection. Required for cleanup. */
26
- signal?: AbortSignal;
27
- }
28
-
29
- export interface Workspace {
30
- id: string;
31
- tenant_id: string;
32
- name: string;
33
- is_default: boolean;
34
- settings?: Record<string, unknown>;
35
- created_at: string;
36
- updated_at: string;
37
- }
38
-
39
- export interface WorkspaceListResponse {
40
- items: Workspace[];
41
- total: number;
42
- }
43
-
44
- export class WorkspacesModule {
45
- constructor(
46
- private client: RawClient,
47
- private getTenantId: () => string,
48
- private headers: () => Record<string, string>
49
- ) { }
50
-
51
- /**
52
- * List all workspaces.
53
- */
54
- async list(params?: {
55
- limit?: number;
56
- offset?: number;
57
- }): Promise<APIResponse<WorkspaceListResponse>> {
58
- return this.client.GET<WorkspaceListResponse>("/v1/api/workspaces", {
59
- params: { query: params },
60
- headers: this.headers(),
61
- });
62
- }
63
-
64
- /**
65
- * Get a workspace by ID.
66
- */
67
- async get(workspaceId: string): Promise<APIResponse<Workspace>> {
68
- return this.client.GET<Workspace>("/v1/api/workspaces/{id}", {
69
- params: { path: { id: workspaceId } },
70
- headers: this.headers(),
71
- });
72
- }
73
-
74
- /**
75
- * Create a new workspace.
76
- */
77
- async create(body: {
78
- name: string;
79
- is_default?: boolean;
80
- }): Promise<APIResponse<Workspace>> {
81
- return this.client.POST<Workspace>("/v1/api/workspaces", {
82
- body,
83
- headers: this.headers(),
84
- });
85
- }
86
-
87
- /**
88
- * Update a workspace.
89
- */
90
- async update(workspaceId: string, body: {
91
- name?: string;
92
- }): Promise<APIResponse<Workspace>> {
93
- return this.client.PUT<Workspace>("/v1/api/workspaces/{id}", {
94
- params: { path: { id: workspaceId } },
95
- body,
96
- headers: this.headers(),
97
- });
98
- }
99
-
100
- /**
101
- * Delete a workspace.
102
- */
103
- async delete(workspaceId: string): Promise<APIResponse<void>> {
104
- return this.client.DELETE<void>("/v1/api/workspaces/{id}", {
105
- params: { path: { id: workspaceId } },
106
- headers: this.headers(),
107
- });
108
- }
109
-
110
- /**
111
- * Get workspace quotas.
112
- */
113
- async getQuotas(workspaceId: string): Promise<APIResponse<WorkspaceQuotaResponse>> {
114
- return this.client.GET<WorkspaceQuotaResponse>("/v1/api/workspaces/{workspaceId}/quotas", {
115
- params: { path: { workspaceId } },
116
- headers: this.headers(),
117
- });
118
- }
119
-
120
- /**
121
- * Get workspace usage.
122
- */
123
- async getUsage(workspaceId: string, params?: { from?: string; to?: string }): Promise<APIResponse<WorkspaceUsageResponse>> {
124
- return this.client.GET<WorkspaceUsageResponse>("/v1/api/workspaces/{workspaceId}/usage", {
125
- params: { path: { workspaceId }, query: params },
126
- headers: this.headers(),
127
- });
128
- }
129
-
130
- // ======================== FOLLOW (Workspace SSE) ========================
131
-
132
- /**
133
- * Stream workspace events via SSE.
134
- * Workspace identity flows via X-Workspace-Id header (same as all SDK methods).
135
- *
136
- * @param options - AbortSignal for cleanup (MUST be used to avoid leaking connections)
137
- *
138
- * @example
139
- * ```ts
140
- * const controller = new AbortController();
141
- * for await (const event of client.workspaces.followEvents({ signal: controller.signal })) {
142
- * if (event.type === 'run_status_changed') {
143
- * console.log(`Run ${event.run_id} → ${event.new_status}`);
144
- * }
145
- * }
146
- * // On cleanup:
147
- * controller.abort();
148
- * ```
149
- */
150
- async *followEvents(options?: WorkspaceFollowOptions): AsyncGenerator<WorkspaceEvent, void, unknown> {
151
- // Workspace identity flows via X-Workspace-Id header (set by this.headers()),
152
- // consistent with all other SDK endpoints. No path param needed.
153
- const response = await this.client.streamGet(
154
- "/v1/api/workspaces/events/stream",
155
- {
156
- headers: this.headers(),
157
- signal: options?.signal,
158
- }
159
- );
160
-
161
- try {
162
- for await (const rawEvent of parseSSE<WorkspaceEvent>(response)) {
163
- if (rawEvent.data != null) {
164
- yield rawEvent.data;
165
- }
166
- }
167
- } catch (err) {
168
- // Abort is normal cleanup — not an error worth surfacing.
169
- // Check both signal state and error name (covers proxy/wrapper edge cases).
170
- if (options?.signal?.aborted) return;
171
- if (err instanceof Error && err.name === "AbortError") return;
172
- throw err;
173
- }
174
- }
175
- }
176
-
177
- export interface WorkspaceQuotaResponse {
178
- workspace_id: string;
179
- quotas: {
180
- runs_per_month: Quota;
181
- tokens_per_month: Quota;
182
- agents_max: Quota;
183
- storage_mb: Quota;
184
- };
185
- reset_at: string;
186
- source: string;
187
- }
188
-
189
- export interface Quota {
190
- limit: number;
191
- used: number;
192
- remaining: number;
193
- }
194
-
195
- export interface WorkspaceUsageResponse {
196
- workspace_id: string;
197
- period: { from: string; to: string };
198
- usage: {
199
- total_runs: number;
200
- completed_runs: number;
201
- failed_runs: number;
202
- total_tokens: number;
203
- input_tokens: number;
204
- output_tokens: number;
205
- total_duration_ms: number;
206
- estimated_count: number;
207
- };
208
- daily_breakdown: Array<{
209
- date: string;
210
- runs: number;
211
- tokens_in: number;
212
- tokens_out: number;
213
- duration_ms: number;
214
- }>;
215
- source: string;
216
- }
package/src/sse/client.ts DELETED
@@ -1,179 +0,0 @@
1
- /**
2
- * Agent OS SDK - SSE Client
3
- *
4
- * Typed Server-Sent Events client for streaming endpoints.
5
- *
6
- * This module provides utilities for parsing SSE responses.
7
- * The actual HTTP request should be made via rawClient.streamGet/streamPost.
8
- */
9
-
10
- export type SSEEvent<T = unknown> = {
11
- id?: string;
12
- event: string;
13
- data: T;
14
- retry?: number;
15
- };
16
-
17
- export type SSEOptions = {
18
- headers?: Record<string, string>;
19
- onOpen?: () => void;
20
- onError?: (error: Error) => void;
21
- signal?: AbortSignal;
22
- };
23
-
24
- /**
25
- * Parse SSE events from a Response object.
26
- * Use this with rawClient.streamGet() or rawClient.streamPost().
27
- *
28
- * @example
29
- * ```ts
30
- * const response = await client.streamGet("/v1/api/runs/{runId}/events/stream", {
31
- * params: { path: { runId }, query: { attemptId, afterSeq: 0 } }
32
- * });
33
- * for await (const event of parseSSE<RunStreamEvent>(response)) {
34
- * console.log(event);
35
- * }
36
- * ```
37
- */
38
- export async function* parseSSE<T>(
39
- response: Response,
40
- options?: { onOpen?: () => void }
41
- ): AsyncGenerator<SSEEvent<T>> {
42
- if (!response.ok) {
43
- throw new Error(`SSE connection failed: ${response.status}`);
44
- }
45
-
46
- if (!response.body) {
47
- throw new Error("No response body");
48
- }
49
-
50
- options?.onOpen?.();
51
-
52
- const reader = response.body.getReader();
53
- const decoder = new TextDecoder();
54
-
55
- let buffer = "";
56
- // State must be maintained across chunks
57
- let currentEvent: Partial<SSEEvent<T>> = { event: "message" };
58
-
59
- try {
60
- while (true) {
61
- const { done, value } = await reader.read();
62
- if (done) break;
63
-
64
- buffer += decoder.decode(value, { stream: true });
65
- const lines = buffer.split("\n");
66
-
67
- // Keep the last partial line in the buffer
68
- buffer = lines.pop() ?? "";
69
-
70
- for (const line of lines) {
71
- const trimmed = line.trim();
72
-
73
- if (trimmed === "") {
74
- // Empty line triggers event dispatch if we have data
75
- if (currentEvent.data !== undefined) {
76
- yield currentEvent as SSEEvent<T>;
77
- }
78
- // Reset for next event
79
- currentEvent = { event: "message" };
80
- continue;
81
- }
82
-
83
- if (line.startsWith("event:")) {
84
- currentEvent.event = line.slice(6).trim();
85
- } else if (line.startsWith("data:")) {
86
- const dataStr = line.slice(5).trim();
87
- try {
88
- // Accumulate data if meaningful (though standard SSE usually has one data line per event,
89
- // multiline data is possible but rare in this specific protocol.
90
- // For simplicity and matching current backend, we overwrite or concatenation check could be stricter).
91
- // Given strict JSON protocol, we assume valid info per data line or single data line.
92
- currentEvent.data = JSON.parse(dataStr) as T;
93
- } catch {
94
- currentEvent.data = dataStr as T;
95
- }
96
- } else if (line.startsWith("id:")) {
97
- currentEvent.id = line.slice(3).trim();
98
- } else if (line.startsWith("retry:")) {
99
- currentEvent.retry = parseInt(line.slice(6).trim(), 10);
100
- }
101
- }
102
- }
103
- } finally {
104
- reader.releaseLock();
105
- }
106
- }
107
-
108
- /**
109
- * Legacy streamSSE function - DEPRECATED.
110
- * Use rawClient.streamGet() + parseSSE() instead.
111
- *
112
- * Kept for backward compatibility during migration.
113
- *
114
- * @deprecated Use rawClient.streamGet() + parseSSE() instead
115
- */
116
- export async function* streamSSE<T>(
117
- url: string,
118
- options: SSEOptions = {}
119
- ): AsyncGenerator<SSEEvent<T>> {
120
- const response = await fetch(url, {
121
- method: "GET",
122
- headers: {
123
- Accept: "text/event-stream",
124
- ...options.headers,
125
- },
126
- signal: options.signal,
127
- });
128
-
129
- yield* parseSSE<T>(response, { onOpen: options.onOpen });
130
- }
131
-
132
- /**
133
- * Run event from the execution ledger (Wave 2.3).
134
- * This is the actual payload sent within SSE `run_event` messages.
135
- */
136
- export interface RunEventDto {
137
- id: string;
138
- seq: number;
139
- type: string;
140
- timestamp: string;
141
- attempt_id: string;
142
- payload: Record<string, unknown> | null;
143
- truncated?: boolean;
144
- }
145
-
146
- /**
147
- * SSE Event types for Run streaming (V1.2 Cinema Mode).
148
- *
149
- * The server sends these event types:
150
- * - `connected`: Initial connection acknowledgment
151
- * - `run_event`: Individual run events from the ledger (with seq for resume)
152
- * - `heartbeat`: Keepalive every 15s
153
- * - `close`: Run reached terminal state (completed/failed/canceled)
154
- * - `error`: Stream error occurred
155
- *
156
- * Each event has an `id` field containing the seq number for Last-Event-ID resume support.
157
- */
158
- export type RunSSEEvent =
159
- | { event: "connected"; data: { run_id: string; start_seq: number } }
160
- | { event: "run_event"; data: RunEventDto }
161
- | { event: "heartbeat"; data: { timestamp: string } }
162
- | { event: "close"; data: { final_status: string; final_seq: number } }
163
- | { event: "error"; data: { code?: string; message: string } };
164
-
165
- /**
166
- * @deprecated Use RunSSEEvent for typed SSE events, or RunEventDto for event payloads.
167
- * Kept for backward compatibility.
168
- */
169
- export type RunStreamEvent =
170
- | { type: "run_started"; run_id: string; status: string }
171
- | { type: "node_started"; node_name: string; timestamp: string }
172
- | { type: "node_completed"; node_name: string; output: unknown }
173
- | { type: "tool_call"; tool_name: string; args: unknown }
174
- | { type: "tool_result"; tool_name: string; result: unknown }
175
- | { type: "checkpoint"; checkpoint_id: string; step_name: string }
176
- | { type: "waiting_for_human"; prompt: string }
177
- | { type: "run_completed"; output: unknown }
178
- | { type: "run_failed"; error: unknown }
179
- | { type: "heartbeat"; timestamp: string };