@agent-os-sdk/client 0.1.2 → 0.2.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.
Files changed (61) hide show
  1. package/dist/client/AgentOsClient.d.ts +39 -44
  2. package/dist/client/AgentOsClient.d.ts.map +1 -1
  3. package/dist/client/AgentOsClient.js +162 -44
  4. package/dist/client/auth.d.ts +102 -0
  5. package/dist/client/auth.d.ts.map +1 -0
  6. package/dist/client/auth.js +44 -0
  7. package/dist/generated/openapi.d.ts +914 -202
  8. package/dist/generated/openapi.d.ts.map +1 -1
  9. package/dist/index.d.ts +10 -9
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -1
  12. package/dist/modules/approvals.d.ts +8 -22
  13. package/dist/modules/approvals.d.ts.map +1 -1
  14. package/dist/modules/approvals.js +27 -130
  15. package/dist/modules/artifacts.d.ts +28 -79
  16. package/dist/modules/artifacts.d.ts.map +1 -1
  17. package/dist/modules/artifacts.js +30 -197
  18. package/dist/modules/budgets.d.ts +47 -70
  19. package/dist/modules/budgets.d.ts.map +1 -1
  20. package/dist/modules/budgets.js +28 -139
  21. package/dist/modules/builder.d.ts +21 -1
  22. package/dist/modules/builder.d.ts.map +1 -1
  23. package/dist/modules/builder.js +25 -3
  24. package/dist/modules/capabilities.d.ts +39 -50
  25. package/dist/modules/capabilities.d.ts.map +1 -1
  26. package/dist/modules/capabilities.js +32 -95
  27. package/dist/modules/deployments.d.ts +49 -92
  28. package/dist/modules/deployments.d.ts.map +1 -1
  29. package/dist/modules/deployments.js +37 -209
  30. package/dist/modules/flows.d.ts +11 -31
  31. package/dist/modules/flows.d.ts.map +1 -1
  32. package/dist/modules/flows.js +33 -157
  33. package/dist/modules/handoff.d.ts +7 -4
  34. package/dist/modules/handoff.d.ts.map +1 -1
  35. package/dist/modules/handoff.js +25 -88
  36. package/dist/modules/incidents.d.ts +40 -101
  37. package/dist/modules/incidents.d.ts.map +1 -1
  38. package/dist/modules/incidents.js +31 -208
  39. package/dist/modules/policies.d.ts +42 -69
  40. package/dist/modules/policies.d.ts.map +1 -1
  41. package/dist/modules/policies.js +25 -159
  42. package/dist/modules/runs.d.ts +89 -3
  43. package/dist/modules/runs.d.ts.map +1 -1
  44. package/dist/modules/runs.js +75 -4
  45. package/package.json +1 -1
  46. package/src/client/AgentOsClient.ts +185 -67
  47. package/src/client/auth.ts +148 -0
  48. package/src/generated/openapi.ts +914 -202
  49. package/src/generated/swagger.json +770 -630
  50. package/src/index.ts +22 -10
  51. package/src/modules/approvals.ts +31 -132
  52. package/src/modules/artifacts.ts +41 -245
  53. package/src/modules/budgets.ts +65 -181
  54. package/src/modules/builder.ts +25 -3
  55. package/src/modules/capabilities.ts +58 -139
  56. package/src/modules/deployments.ts +67 -271
  57. package/src/modules/flows.ts +37 -163
  58. package/src/modules/handoff.ts +29 -93
  59. package/src/modules/incidents.ts +56 -282
  60. package/src/modules/policies.ts +57 -203
  61. package/src/modules/runs.ts +123 -5
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Deployments Module - Release Management
3
- *
4
- * // MOCK - This module contains mock implementations for future features
5
- *
6
- * Provides deployment management, environment promotion,
7
- * rollback, canary releases, and change freezes.
2
+ * Deployments Module - Agent Lifecycle
3
+ *
4
+ * NOT IMPLEMENTED - Backend endpoint not available.
5
+ * All methods return 501 NotImplemented.
8
6
  */
9
7
 
10
8
  import type { RawClient, APIResponse } from "../client/raw.js";
@@ -13,59 +11,54 @@ import type { RawClient, APIResponse } from "../client/raw.js";
13
11
  // Types
14
12
  // ============================================================================
15
13
 
16
- export type DeploymentStatus = "pending" | "deploying" | "active" | "rolling_back" | "rolled_back" | "failed";
17
- export type EnvironmentType = "development" | "staging" | "production" | "custom";
18
-
19
- export interface Environment {
20
- id: string;
21
- name: string;
22
- type: EnvironmentType;
23
- description?: string;
24
- is_frozen: boolean;
25
- frozen_until?: string;
26
- frozen_reason?: string;
27
- config: Record<string, unknown>;
28
- created_at: string;
29
- updated_at: string;
30
- }
14
+ export type DeploymentStatus = "pending" | "building" | "deploying" | "active" | "failed" | "rolled_back" | "deactivated";
15
+ export type Environment = "development" | "staging" | "production";
31
16
 
32
17
  export interface Deployment {
33
18
  id: string;
34
19
  agent_id: string;
35
- agent_version_id: string;
36
- environment_id: string;
37
- environment_name: string;
20
+ version_id: string;
21
+ environment: Environment;
38
22
  status: DeploymentStatus;
39
- promoted_by: string;
40
- promoted_at: string;
41
- completed_at?: string;
23
+ endpoint_url?: string;
24
+ deployed_at?: string;
25
+ created_at: string;
26
+ created_by: string;
42
27
  rollback_version_id?: string;
43
- canary_percent?: number;
44
- notes?: string;
45
28
  }
46
29
 
47
- export interface DeploymentDiff {
48
- from_version: string;
49
- to_version: string;
50
- changes: {
51
- category: string;
52
- field: string;
53
- old_value: unknown;
54
- new_value: unknown;
55
- }[];
56
- config_changes: number;
57
- prompt_changes: number;
58
- graph_changes: number;
30
+ export interface DeploymentConfig {
31
+ replicas?: number;
32
+ memory_mb?: number;
33
+ timeout_seconds?: number;
34
+ env_vars?: Record<string, string>;
35
+ auto_scale?: boolean;
36
+ min_replicas?: number;
37
+ max_replicas?: number;
59
38
  }
60
39
 
61
- export interface EnvironmentListResponse {
62
- items: Environment[];
63
- total: number;
40
+ export interface DeploymentHealth {
41
+ deployment_id: string;
42
+ healthy: boolean;
43
+ replicas_running: number;
44
+ replicas_desired: number;
45
+ last_check: string;
46
+ error?: string;
64
47
  }
65
48
 
66
- export interface DeploymentListResponse {
67
- items: Deployment[];
68
- total: number;
49
+ // ============================================================================
50
+ // Helper for 501 responses
51
+ // ============================================================================
52
+
53
+ function notImplemented<T>(method: string): APIResponse<T> {
54
+ return {
55
+ data: undefined,
56
+ error: {
57
+ code: "NOT_IMPLEMENTED",
58
+ message: `DeploymentsModule.${method}() is not implemented. Backend endpoint not available.`,
59
+ },
60
+ response: new Response(null, { status: 501, statusText: "Not Implemented" }),
61
+ };
69
62
  }
70
63
 
71
64
  // ============================================================================
@@ -75,241 +68,44 @@ export interface DeploymentListResponse {
75
68
  export class DeploymentsModule {
76
69
  constructor(private client: RawClient, private headers: () => Record<string, string>) { }
77
70
 
78
- // ========== Environments ==========
79
-
80
- // MOCK - Simulated listEnvironments
81
- /**
82
- * List all environments.
83
- */
84
- async listEnvironments(): Promise<APIResponse<EnvironmentListResponse>> {
85
- // MOCK - Returns simulated data
86
- const mockEnvs: EnvironmentListResponse = {
87
- items: [
88
- {
89
- id: "env_dev",
90
- name: "Development",
91
- type: "development",
92
- description: "Development environment for testing",
93
- is_frozen: false,
94
- config: { logging_level: "debug" },
95
- created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
96
- updated_at: new Date().toISOString(),
97
- },
98
- {
99
- id: "env_staging",
100
- name: "Staging",
101
- type: "staging",
102
- description: "Pre-production testing",
103
- is_frozen: false,
104
- config: { logging_level: "info" },
105
- created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
106
- updated_at: new Date().toISOString(),
107
- },
108
- {
109
- id: "env_prod",
110
- name: "Production",
111
- type: "production",
112
- description: "Live production environment",
113
- is_frozen: false,
114
- config: { logging_level: "warning" },
115
- created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
116
- updated_at: new Date().toISOString(),
117
- },
118
- ],
119
- total: 3,
120
- };
121
- return { data: mockEnvs, error: undefined, response: new Response() };
122
- }
123
-
124
- // MOCK - Simulated createEnvironment
125
- /**
126
- * Create a new environment.
127
- */
128
- async createEnvironment(body: {
129
- name: string;
130
- type: EnvironmentType;
131
- description?: string;
132
- config?: Record<string, unknown>;
133
- }): Promise<APIResponse<Environment>> {
134
- // MOCK - Returns simulated data
135
- const mockEnv: Environment = {
136
- id: `env_${Date.now()}`,
137
- name: body.name,
138
- type: body.type,
139
- description: body.description,
140
- is_frozen: false,
141
- config: body.config || {},
142
- created_at: new Date().toISOString(),
143
- updated_at: new Date().toISOString(),
144
- };
145
- return { data: mockEnv, error: undefined, response: new Response() };
146
- }
147
-
148
- // ========== Deployments ==========
149
-
150
- // MOCK - Simulated history
151
- /**
152
- * Get deployment history for an environment.
153
- */
154
- async history(environmentId: string): Promise<APIResponse<DeploymentListResponse>> {
155
- // MOCK - Returns simulated data
156
- const mockHistory: DeploymentListResponse = {
157
- items: [
158
- {
159
- id: "deploy_3",
160
- agent_id: "agent_support",
161
- agent_version_id: "v3",
162
- environment_id: environmentId,
163
- environment_name: "Production",
164
- status: "active",
165
- promoted_by: "user_admin",
166
- promoted_at: new Date(Date.now() - 3600000).toISOString(),
167
- completed_at: new Date(Date.now() - 3500000).toISOString(),
168
- },
169
- {
170
- id: "deploy_2",
171
- agent_id: "agent_support",
172
- agent_version_id: "v2",
173
- environment_id: environmentId,
174
- environment_name: "Production",
175
- status: "rolled_back",
176
- promoted_by: "user_admin",
177
- promoted_at: new Date(Date.now() - 86400000).toISOString(),
178
- completed_at: new Date(Date.now() - 86000000).toISOString(),
179
- rollback_version_id: "v1",
180
- },
181
- ],
182
- total: 2,
183
- };
184
- return { data: mockHistory, error: undefined, response: new Response() };
71
+ /** @returns 501 Not Implemented */
72
+ async list(params?: {
73
+ agent_id?: string;
74
+ environment?: Environment;
75
+ status?: DeploymentStatus;
76
+ limit?: number;
77
+ offset?: number;
78
+ }): Promise<APIResponse<{ items: Deployment[]; total: number }>> {
79
+ return notImplemented<{ items: Deployment[]; total: number }>("list");
185
80
  }
186
81
 
187
- // MOCK - Simulated promote
188
- /**
189
- * Promote an agent version to an environment.
190
- */
191
- async promote(
192
- agentVersionId: string,
193
- environmentId: string,
194
- options?: { notes?: string }
195
- ): Promise<APIResponse<Deployment>> {
196
- // MOCK - Returns simulated data
197
- const mockDeploy: Deployment = {
198
- id: `deploy_${Date.now()}`,
199
- agent_id: "agent_123",
200
- agent_version_id: agentVersionId,
201
- environment_id: environmentId,
202
- environment_name: "Production",
203
- status: "deploying",
204
- promoted_by: "user_current",
205
- promoted_at: new Date().toISOString(),
206
- notes: options?.notes,
207
- };
208
- return { data: mockDeploy, error: undefined, response: new Response() };
82
+ /** @returns 501 Not Implemented */
83
+ async get(deploymentId: string): Promise<APIResponse<Deployment>> {
84
+ return notImplemented<Deployment>("get");
209
85
  }
210
86
 
211
- // MOCK - Simulated rollback
212
- /**
213
- * Rollback an environment to a previous version.
214
- */
215
- async rollback(environmentId: string, toVersionId?: string): Promise<APIResponse<Deployment>> {
216
- // MOCK - Returns simulated data
217
- const mockDeploy: Deployment = {
218
- id: `deploy_rollback_${Date.now()}`,
219
- agent_id: "agent_123",
220
- agent_version_id: toVersionId || "v2",
221
- environment_id: environmentId,
222
- environment_name: "Production",
223
- status: "rolling_back",
224
- promoted_by: "user_current",
225
- promoted_at: new Date().toISOString(),
226
- rollback_version_id: "v3",
227
- };
228
- return { data: mockDeploy, error: undefined, response: new Response() };
87
+ /** @returns 501 Not Implemented */
88
+ async deploy(agentId: string, environment: Environment, config?: DeploymentConfig): Promise<APIResponse<Deployment>> {
89
+ return notImplemented<Deployment>("deploy");
229
90
  }
230
91
 
231
- // MOCK - Simulated canary
232
- /**
233
- * Start a canary deployment.
234
- */
235
- async canary(
236
- environmentId: string,
237
- agentVersionId: string,
238
- percent: number
239
- ): Promise<APIResponse<Deployment>> {
240
- // MOCK - Returns simulated data
241
- const mockDeploy: Deployment = {
242
- id: `deploy_canary_${Date.now()}`,
243
- agent_id: "agent_123",
244
- agent_version_id: agentVersionId,
245
- environment_id: environmentId,
246
- environment_name: "Production",
247
- status: "deploying",
248
- promoted_by: "user_current",
249
- promoted_at: new Date().toISOString(),
250
- canary_percent: percent,
251
- };
252
- return { data: mockDeploy, error: undefined, response: new Response() };
92
+ /** @returns 501 Not Implemented */
93
+ async promote(deploymentId: string, toEnvironment: Environment): Promise<APIResponse<Deployment>> {
94
+ return notImplemented<Deployment>("promote");
253
95
  }
254
96
 
255
- // MOCK - Simulated freeze
256
- /**
257
- * Freeze an environment (change freeze).
258
- */
259
- async freeze(
260
- environmentId: string,
261
- options?: { until?: string; reason?: string }
262
- ): Promise<APIResponse<Environment>> {
263
- // MOCK - Returns simulated data
264
- const mockEnv: Environment = {
265
- id: environmentId,
266
- name: "Production",
267
- type: "production",
268
- is_frozen: true,
269
- frozen_until: options?.until,
270
- frozen_reason: options?.reason || "Change freeze in effect",
271
- config: {},
272
- created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
273
- updated_at: new Date().toISOString(),
274
- };
275
- return { data: mockEnv, error: undefined, response: new Response() };
97
+ /** @returns 501 Not Implemented */
98
+ async rollback(deploymentId: string): Promise<APIResponse<Deployment>> {
99
+ return notImplemented<Deployment>("rollback");
276
100
  }
277
101
 
278
- // MOCK - Simulated unfreeze
279
- /**
280
- * Unfreeze an environment.
281
- */
282
- async unfreeze(environmentId: string): Promise<APIResponse<Environment>> {
283
- // MOCK - Returns simulated data
284
- const mockEnv: Environment = {
285
- id: environmentId,
286
- name: "Production",
287
- type: "production",
288
- is_frozen: false,
289
- config: {},
290
- created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
291
- updated_at: new Date().toISOString(),
292
- };
293
- return { data: mockEnv, error: undefined, response: new Response() };
102
+ /** @returns 501 Not Implemented */
103
+ async health(deploymentId: string): Promise<APIResponse<DeploymentHealth>> {
104
+ return notImplemented<DeploymentHealth>("health");
294
105
  }
295
106
 
296
- // MOCK - Simulated diff
297
- /**
298
- * Get diff between two versions.
299
- */
300
- async diff(fromVersionId: string, toVersionId: string): Promise<APIResponse<DeploymentDiff>> {
301
- // MOCK - Returns simulated diff
302
- const mockDiff: DeploymentDiff = {
303
- from_version: fromVersionId,
304
- to_version: toVersionId,
305
- changes: [
306
- { category: "config", field: "max_tokens", old_value: 4000, new_value: 8000 },
307
- { category: "prompt", field: "system_prompt", old_value: "You are a helpful assistant", new_value: "You are an expert assistant" },
308
- ],
309
- config_changes: 1,
310
- prompt_changes: 1,
311
- graph_changes: 0,
312
- };
313
- return { data: mockDiff, error: undefined, response: new Response() };
107
+ /** @returns 501 Not Implemented */
108
+ async deactivate(deploymentId: string): Promise<APIResponse<void>> {
109
+ return notImplemented<void>("deactivate");
314
110
  }
315
111
  }
@@ -1,10 +1,8 @@
1
1
  /**
2
2
  * Flows Module - Workflow Orchestration
3
- *
4
- * // MOCK - This module contains mock implementations for future features
5
- *
6
- * Provides lightweight workflow/orchestration between agents.
7
- * "Graphs between agents" - the control plane of agents.
3
+ *
4
+ * NOT IMPLEMENTED - Backend endpoint not available.
5
+ * All methods return 501 NotImplemented.
8
6
  */
9
7
 
10
8
  import type { RawClient, APIResponse } from "../client/raw.js";
@@ -66,6 +64,21 @@ export interface FlowListResponse {
66
64
  total: number;
67
65
  }
68
66
 
67
+ // ============================================================================
68
+ // Helper for 501 responses
69
+ // ============================================================================
70
+
71
+ function notImplemented<T>(method: string): APIResponse<T> {
72
+ return {
73
+ data: undefined,
74
+ error: {
75
+ code: "NOT_IMPLEMENTED",
76
+ message: `FlowsModule.${method}() is not implemented. Backend endpoint not available.`,
77
+ },
78
+ response: new Response(null, { status: 501, statusText: "Not Implemented" }),
79
+ };
80
+ }
81
+
69
82
  // ============================================================================
70
83
  // Module
71
84
  // ============================================================================
@@ -73,187 +86,48 @@ export interface FlowListResponse {
73
86
  export class FlowsModule {
74
87
  constructor(private client: RawClient, private headers: () => Record<string, string>) { }
75
88
 
76
- // MOCK - Simulated list
77
- /**
78
- * List all flows.
79
- */
89
+ /** @returns 501 Not Implemented */
80
90
  async list(params?: { limit?: number; offset?: number }): Promise<APIResponse<FlowListResponse>> {
81
- // MOCK - Returns simulated data
82
- const mockFlows: FlowListResponse = {
83
- items: [
84
- {
85
- id: "flow_1",
86
- name: "Customer Onboarding",
87
- description: "Multi-step customer onboarding workflow",
88
- steps: [
89
- { id: "step_1", name: "Collect Info", agent_id: "agent_intake", type: "agent", next_steps: ["step_2"] },
90
- { id: "step_2", name: "Verify Identity", agent_id: "agent_kyc", type: "agent", next_steps: ["step_3"] },
91
- { id: "step_3", name: "Create Account", agent_id: "agent_account", type: "agent" },
92
- ],
93
- status: "active",
94
- version: 1,
95
- created_at: new Date(Date.now() - 86400000).toISOString(),
96
- updated_at: new Date().toISOString(),
97
- },
98
- ],
99
- total: 1,
100
- };
101
- return { data: mockFlows, error: undefined, response: new Response() };
91
+ return notImplemented<FlowListResponse>("list");
102
92
  }
103
93
 
104
- // MOCK - Simulated get
105
- /**
106
- * Get a flow by ID.
107
- */
94
+ /** @returns 501 Not Implemented */
108
95
  async get(flowId: string): Promise<APIResponse<Flow>> {
109
- // MOCK - Returns simulated data
110
- const mockFlow: Flow = {
111
- id: flowId,
112
- name: "Customer Onboarding",
113
- description: "Multi-step customer onboarding workflow",
114
- steps: [
115
- { id: "step_1", name: "Collect Info", agent_id: "agent_intake", type: "agent", next_steps: ["step_2"] },
116
- { id: "step_2", name: "Verify Identity", agent_id: "agent_kyc", type: "agent", next_steps: ["step_3"] },
117
- { id: "step_3", name: "Approve", agent_id: "", type: "human_approval", next_steps: ["step_4"] },
118
- { id: "step_4", name: "Create Account", agent_id: "agent_account", type: "agent" },
119
- ],
120
- status: "active",
121
- version: 1,
122
- created_at: new Date(Date.now() - 86400000).toISOString(),
123
- updated_at: new Date().toISOString(),
124
- };
125
- return { data: mockFlow, error: undefined, response: new Response() };
96
+ return notImplemented<Flow>("get");
126
97
  }
127
98
 
128
- // MOCK - Simulated create
129
- /**
130
- * Create a new flow.
131
- */
132
- async create(body: {
133
- name: string;
134
- description?: string;
135
- steps: FlowStep[];
136
- }): Promise<APIResponse<Flow>> {
137
- // MOCK - Returns simulated data
138
- const mockFlow: Flow = {
139
- id: `flow_${Date.now()}`,
140
- name: body.name,
141
- description: body.description,
142
- steps: body.steps,
143
- status: "draft",
144
- version: 1,
145
- created_at: new Date().toISOString(),
146
- updated_at: new Date().toISOString(),
147
- };
148
- return { data: mockFlow, error: undefined, response: new Response() };
99
+ /** @returns 501 Not Implemented */
100
+ async create(body: { name: string; description?: string; steps: FlowStep[] }): Promise<APIResponse<Flow>> {
101
+ return notImplemented<Flow>("create");
149
102
  }
150
103
 
151
- // MOCK - Simulated run
152
- /**
153
- * Start a flow run.
154
- */
104
+ /** @returns 501 Not Implemented */
155
105
  async run(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowRun>> {
156
- // MOCK - Returns simulated data
157
- const mockRun: FlowRun = {
158
- id: `flowrun_${Date.now()}`,
159
- flow_id: flowId,
160
- status: "active",
161
- current_step_id: "step_1",
162
- completed_steps: [],
163
- failed_steps: [],
164
- context: input || {},
165
- started_at: new Date().toISOString(),
166
- };
167
- return { data: mockRun, error: undefined, response: new Response() };
106
+ return notImplemented<FlowRun>("run");
168
107
  }
169
108
 
170
- // MOCK - Simulated pause
171
- /**
172
- * Pause a running flow.
173
- */
109
+ /** @returns 501 Not Implemented */
174
110
  async pause(flowRunId: string): Promise<APIResponse<FlowRun>> {
175
- // MOCK - Returns simulated data
176
- const mockRun: FlowRun = {
177
- id: flowRunId,
178
- flow_id: "flow_1",
179
- status: "paused",
180
- current_step_id: "step_2",
181
- completed_steps: ["step_1"],
182
- failed_steps: [],
183
- context: {},
184
- started_at: new Date(Date.now() - 30000).toISOString(),
185
- };
186
- return { data: mockRun, error: undefined, response: new Response() };
111
+ return notImplemented<FlowRun>("pause");
187
112
  }
188
113
 
189
- // MOCK - Simulated resume
190
- /**
191
- * Resume a paused flow.
192
- */
114
+ /** @returns 501 Not Implemented */
193
115
  async resume(flowRunId: string): Promise<APIResponse<FlowRun>> {
194
- // MOCK - Returns simulated data
195
- const mockRun: FlowRun = {
196
- id: flowRunId,
197
- flow_id: "flow_1",
198
- status: "active",
199
- current_step_id: "step_2",
200
- completed_steps: ["step_1"],
201
- failed_steps: [],
202
- context: {},
203
- started_at: new Date(Date.now() - 30000).toISOString(),
204
- };
205
- return { data: mockRun, error: undefined, response: new Response() };
116
+ return notImplemented<FlowRun>("resume");
206
117
  }
207
118
 
208
- // MOCK - Simulated cancel
209
- /**
210
- * Cancel a flow run.
211
- */
119
+ /** @returns 501 Not Implemented */
212
120
  async cancel(flowRunId: string): Promise<APIResponse<FlowRun>> {
213
- // MOCK - Returns simulated data
214
- const mockRun: FlowRun = {
215
- id: flowRunId,
216
- flow_id: "flow_1",
217
- status: "cancelled",
218
- current_step_id: "step_2",
219
- completed_steps: ["step_1"],
220
- failed_steps: [],
221
- context: {},
222
- started_at: new Date(Date.now() - 30000).toISOString(),
223
- completed_at: new Date().toISOString(),
224
- };
225
- return { data: mockRun, error: undefined, response: new Response() };
121
+ return notImplemented<FlowRun>("cancel");
226
122
  }
227
123
 
228
- // MOCK - Simulated visualize
229
- /**
230
- * Get flow visualization (Mermaid diagram).
231
- */
124
+ /** @returns 501 Not Implemented */
232
125
  async visualize(flowId: string): Promise<APIResponse<FlowVisualization>> {
233
- // MOCK - Returns simulated mermaid
234
- const mockViz: FlowVisualization = {
235
- mermaid: `graph TD
236
- A[Collect Info] --> B[Verify Identity]
237
- B --> C{Approve?}
238
- C -->|Yes| D[Create Account]
239
- C -->|No| E[Reject]`,
240
- };
241
- return { data: mockViz, error: undefined, response: new Response() };
126
+ return notImplemented<FlowVisualization>("visualize");
242
127
  }
243
128
 
244
- // MOCK - Simulated simulate
245
- /**
246
- * Simulate a flow run (dry run).
247
- */
129
+ /** @returns 501 Not Implemented */
248
130
  async simulate(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowSimulationResult>> {
249
- // MOCK - Returns simulated result
250
- const mockResult: FlowSimulationResult = {
251
- success: true,
252
- steps_executed: ["step_1", "step_2", "step_3", "step_4"],
253
- estimated_duration_seconds: 120,
254
- estimated_cost: 0.15,
255
- potential_issues: [],
256
- };
257
- return { data: mockResult, error: undefined, response: new Response() };
131
+ return notImplemented<FlowSimulationResult>("simulate");
258
132
  }
259
133
  }