@agent-os-sdk/client 0.1.2 → 0.2.2
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.
- package/dist/client/AgentOsClient.d.ts +39 -44
- package/dist/client/AgentOsClient.d.ts.map +1 -1
- package/dist/client/AgentOsClient.js +162 -44
- package/dist/client/auth.d.ts +102 -0
- package/dist/client/auth.d.ts.map +1 -0
- package/dist/client/auth.js +44 -0
- package/dist/generated/openapi.d.ts +914 -202
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/modules/approvals.d.ts +8 -22
- package/dist/modules/approvals.d.ts.map +1 -1
- package/dist/modules/approvals.js +27 -130
- package/dist/modules/artifacts.d.ts +28 -79
- package/dist/modules/artifacts.d.ts.map +1 -1
- package/dist/modules/artifacts.js +30 -197
- package/dist/modules/budgets.d.ts +47 -70
- package/dist/modules/budgets.d.ts.map +1 -1
- package/dist/modules/budgets.js +28 -139
- package/dist/modules/builder.d.ts +21 -1
- package/dist/modules/builder.d.ts.map +1 -1
- package/dist/modules/builder.js +25 -3
- package/dist/modules/capabilities.d.ts +39 -50
- package/dist/modules/capabilities.d.ts.map +1 -1
- package/dist/modules/capabilities.js +32 -95
- package/dist/modules/deployments.d.ts +49 -92
- package/dist/modules/deployments.d.ts.map +1 -1
- package/dist/modules/deployments.js +37 -209
- package/dist/modules/flows.d.ts +11 -31
- package/dist/modules/flows.d.ts.map +1 -1
- package/dist/modules/flows.js +33 -157
- package/dist/modules/handoff.d.ts +7 -4
- package/dist/modules/handoff.d.ts.map +1 -1
- package/dist/modules/handoff.js +25 -88
- package/dist/modules/incidents.d.ts +40 -101
- package/dist/modules/incidents.d.ts.map +1 -1
- package/dist/modules/incidents.js +31 -208
- package/dist/modules/policies.d.ts +42 -69
- package/dist/modules/policies.d.ts.map +1 -1
- package/dist/modules/policies.js +25 -159
- package/dist/modules/runs.d.ts +89 -3
- package/dist/modules/runs.d.ts.map +1 -1
- package/dist/modules/runs.js +75 -4
- package/package.json +1 -1
- package/src/client/AgentOsClient.ts +185 -67
- package/src/client/auth.ts +148 -0
- package/src/generated/openapi.ts +914 -202
- package/src/generated/swagger.json +770 -630
- package/src/index.ts +22 -10
- package/src/modules/approvals.ts +31 -132
- package/src/modules/artifacts.ts +41 -245
- package/src/modules/budgets.ts +65 -181
- package/src/modules/builder.ts +25 -3
- package/src/modules/capabilities.ts +58 -139
- package/src/modules/deployments.ts +67 -271
- package/src/modules/flows.ts +37 -163
- package/src/modules/handoff.ts +29 -93
- package/src/modules/incidents.ts +56 -282
- package/src/modules/policies.ts +57 -203
- package/src/modules/runs.ts +123 -5
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Deployments Module -
|
|
2
|
+
* Deployments Module - Agent Lifecycle
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides deployment management, environment promotion,
|
|
7
|
-
* rollback, canary releases, and change freezes.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `DeploymentsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
10
21
|
// Module
|
|
11
22
|
// ============================================================================
|
|
12
23
|
export class DeploymentsModule {
|
|
@@ -16,215 +27,32 @@ export class DeploymentsModule {
|
|
|
16
27
|
this.client = client;
|
|
17
28
|
this.headers = headers;
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
* List all environments.
|
|
23
|
-
*/
|
|
24
|
-
async listEnvironments() {
|
|
25
|
-
// MOCK - Returns simulated data
|
|
26
|
-
const mockEnvs = {
|
|
27
|
-
items: [
|
|
28
|
-
{
|
|
29
|
-
id: "env_dev",
|
|
30
|
-
name: "Development",
|
|
31
|
-
type: "development",
|
|
32
|
-
description: "Development environment for testing",
|
|
33
|
-
is_frozen: false,
|
|
34
|
-
config: { logging_level: "debug" },
|
|
35
|
-
created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
|
|
36
|
-
updated_at: new Date().toISOString(),
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: "env_staging",
|
|
40
|
-
name: "Staging",
|
|
41
|
-
type: "staging",
|
|
42
|
-
description: "Pre-production testing",
|
|
43
|
-
is_frozen: false,
|
|
44
|
-
config: { logging_level: "info" },
|
|
45
|
-
created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
|
|
46
|
-
updated_at: new Date().toISOString(),
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "env_prod",
|
|
50
|
-
name: "Production",
|
|
51
|
-
type: "production",
|
|
52
|
-
description: "Live production environment",
|
|
53
|
-
is_frozen: false,
|
|
54
|
-
config: { logging_level: "warning" },
|
|
55
|
-
created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
|
|
56
|
-
updated_at: new Date().toISOString(),
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
total: 3,
|
|
60
|
-
};
|
|
61
|
-
return { data: mockEnvs, error: undefined, response: new Response() };
|
|
62
|
-
}
|
|
63
|
-
// MOCK - Simulated createEnvironment
|
|
64
|
-
/**
|
|
65
|
-
* Create a new environment.
|
|
66
|
-
*/
|
|
67
|
-
async createEnvironment(body) {
|
|
68
|
-
// MOCK - Returns simulated data
|
|
69
|
-
const mockEnv = {
|
|
70
|
-
id: `env_${Date.now()}`,
|
|
71
|
-
name: body.name,
|
|
72
|
-
type: body.type,
|
|
73
|
-
description: body.description,
|
|
74
|
-
is_frozen: false,
|
|
75
|
-
config: body.config || {},
|
|
76
|
-
created_at: new Date().toISOString(),
|
|
77
|
-
updated_at: new Date().toISOString(),
|
|
78
|
-
};
|
|
79
|
-
return { data: mockEnv, error: undefined, response: new Response() };
|
|
80
|
-
}
|
|
81
|
-
// ========== Deployments ==========
|
|
82
|
-
// MOCK - Simulated history
|
|
83
|
-
/**
|
|
84
|
-
* Get deployment history for an environment.
|
|
85
|
-
*/
|
|
86
|
-
async history(environmentId) {
|
|
87
|
-
// MOCK - Returns simulated data
|
|
88
|
-
const mockHistory = {
|
|
89
|
-
items: [
|
|
90
|
-
{
|
|
91
|
-
id: "deploy_3",
|
|
92
|
-
agent_id: "agent_support",
|
|
93
|
-
agent_version_id: "v3",
|
|
94
|
-
environment_id: environmentId,
|
|
95
|
-
environment_name: "Production",
|
|
96
|
-
status: "active",
|
|
97
|
-
promoted_by: "user_admin",
|
|
98
|
-
promoted_at: new Date(Date.now() - 3600000).toISOString(),
|
|
99
|
-
completed_at: new Date(Date.now() - 3500000).toISOString(),
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "deploy_2",
|
|
103
|
-
agent_id: "agent_support",
|
|
104
|
-
agent_version_id: "v2",
|
|
105
|
-
environment_id: environmentId,
|
|
106
|
-
environment_name: "Production",
|
|
107
|
-
status: "rolled_back",
|
|
108
|
-
promoted_by: "user_admin",
|
|
109
|
-
promoted_at: new Date(Date.now() - 86400000).toISOString(),
|
|
110
|
-
completed_at: new Date(Date.now() - 86000000).toISOString(),
|
|
111
|
-
rollback_version_id: "v1",
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
total: 2,
|
|
115
|
-
};
|
|
116
|
-
return { data: mockHistory, error: undefined, response: new Response() };
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
31
|
+
async list(params) {
|
|
32
|
+
return notImplemented("list");
|
|
117
33
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*/
|
|
122
|
-
async promote(agentVersionId, environmentId, options) {
|
|
123
|
-
// MOCK - Returns simulated data
|
|
124
|
-
const mockDeploy = {
|
|
125
|
-
id: `deploy_${Date.now()}`,
|
|
126
|
-
agent_id: "agent_123",
|
|
127
|
-
agent_version_id: agentVersionId,
|
|
128
|
-
environment_id: environmentId,
|
|
129
|
-
environment_name: "Production",
|
|
130
|
-
status: "deploying",
|
|
131
|
-
promoted_by: "user_current",
|
|
132
|
-
promoted_at: new Date().toISOString(),
|
|
133
|
-
notes: options?.notes,
|
|
134
|
-
};
|
|
135
|
-
return { data: mockDeploy, error: undefined, response: new Response() };
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
35
|
+
async get(deploymentId) {
|
|
36
|
+
return notImplemented("get");
|
|
136
37
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
*/
|
|
141
|
-
async rollback(environmentId, toVersionId) {
|
|
142
|
-
// MOCK - Returns simulated data
|
|
143
|
-
const mockDeploy = {
|
|
144
|
-
id: `deploy_rollback_${Date.now()}`,
|
|
145
|
-
agent_id: "agent_123",
|
|
146
|
-
agent_version_id: toVersionId || "v2",
|
|
147
|
-
environment_id: environmentId,
|
|
148
|
-
environment_name: "Production",
|
|
149
|
-
status: "rolling_back",
|
|
150
|
-
promoted_by: "user_current",
|
|
151
|
-
promoted_at: new Date().toISOString(),
|
|
152
|
-
rollback_version_id: "v3",
|
|
153
|
-
};
|
|
154
|
-
return { data: mockDeploy, error: undefined, response: new Response() };
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
39
|
+
async deploy(agentId, environment, config) {
|
|
40
|
+
return notImplemented("deploy");
|
|
155
41
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*/
|
|
160
|
-
async canary(environmentId, agentVersionId, percent) {
|
|
161
|
-
// MOCK - Returns simulated data
|
|
162
|
-
const mockDeploy = {
|
|
163
|
-
id: `deploy_canary_${Date.now()}`,
|
|
164
|
-
agent_id: "agent_123",
|
|
165
|
-
agent_version_id: agentVersionId,
|
|
166
|
-
environment_id: environmentId,
|
|
167
|
-
environment_name: "Production",
|
|
168
|
-
status: "deploying",
|
|
169
|
-
promoted_by: "user_current",
|
|
170
|
-
promoted_at: new Date().toISOString(),
|
|
171
|
-
canary_percent: percent,
|
|
172
|
-
};
|
|
173
|
-
return { data: mockDeploy, error: undefined, response: new Response() };
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
43
|
+
async promote(deploymentId, toEnvironment) {
|
|
44
|
+
return notImplemented("promote");
|
|
174
45
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
*/
|
|
179
|
-
async freeze(environmentId, options) {
|
|
180
|
-
// MOCK - Returns simulated data
|
|
181
|
-
const mockEnv = {
|
|
182
|
-
id: environmentId,
|
|
183
|
-
name: "Production",
|
|
184
|
-
type: "production",
|
|
185
|
-
is_frozen: true,
|
|
186
|
-
frozen_until: options?.until,
|
|
187
|
-
frozen_reason: options?.reason || "Change freeze in effect",
|
|
188
|
-
config: {},
|
|
189
|
-
created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
|
|
190
|
-
updated_at: new Date().toISOString(),
|
|
191
|
-
};
|
|
192
|
-
return { data: mockEnv, error: undefined, response: new Response() };
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
47
|
+
async rollback(deploymentId) {
|
|
48
|
+
return notImplemented("rollback");
|
|
193
49
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
*/
|
|
198
|
-
async unfreeze(environmentId) {
|
|
199
|
-
// MOCK - Returns simulated data
|
|
200
|
-
const mockEnv = {
|
|
201
|
-
id: environmentId,
|
|
202
|
-
name: "Production",
|
|
203
|
-
type: "production",
|
|
204
|
-
is_frozen: false,
|
|
205
|
-
config: {},
|
|
206
|
-
created_at: new Date(Date.now() - 86400000 * 30).toISOString(),
|
|
207
|
-
updated_at: new Date().toISOString(),
|
|
208
|
-
};
|
|
209
|
-
return { data: mockEnv, error: undefined, response: new Response() };
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
51
|
+
async health(deploymentId) {
|
|
52
|
+
return notImplemented("health");
|
|
210
53
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*/
|
|
215
|
-
async diff(fromVersionId, toVersionId) {
|
|
216
|
-
// MOCK - Returns simulated diff
|
|
217
|
-
const mockDiff = {
|
|
218
|
-
from_version: fromVersionId,
|
|
219
|
-
to_version: toVersionId,
|
|
220
|
-
changes: [
|
|
221
|
-
{ category: "config", field: "max_tokens", old_value: 4000, new_value: 8000 },
|
|
222
|
-
{ category: "prompt", field: "system_prompt", old_value: "You are a helpful assistant", new_value: "You are an expert assistant" },
|
|
223
|
-
],
|
|
224
|
-
config_changes: 1,
|
|
225
|
-
prompt_changes: 1,
|
|
226
|
-
graph_changes: 0,
|
|
227
|
-
};
|
|
228
|
-
return { data: mockDiff, error: undefined, response: new Response() };
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
55
|
+
async deactivate(deploymentId) {
|
|
56
|
+
return notImplemented("deactivate");
|
|
229
57
|
}
|
|
230
58
|
}
|
package/dist/modules/flows.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flows Module - Workflow Orchestration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides lightweight workflow/orchestration between agents.
|
|
7
|
-
* "Graphs between agents" - the control plane of agents.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
10
8
|
export type FlowStatus = "draft" | "active" | "paused" | "completed" | "failed" | "cancelled";
|
|
@@ -57,48 +55,30 @@ export declare class FlowsModule {
|
|
|
57
55
|
private client;
|
|
58
56
|
private headers;
|
|
59
57
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
60
|
-
/**
|
|
61
|
-
* List all flows.
|
|
62
|
-
*/
|
|
58
|
+
/** @returns 501 Not Implemented */
|
|
63
59
|
list(params?: {
|
|
64
60
|
limit?: number;
|
|
65
61
|
offset?: number;
|
|
66
62
|
}): Promise<APIResponse<FlowListResponse>>;
|
|
67
|
-
/**
|
|
68
|
-
* Get a flow by ID.
|
|
69
|
-
*/
|
|
63
|
+
/** @returns 501 Not Implemented */
|
|
70
64
|
get(flowId: string): Promise<APIResponse<Flow>>;
|
|
71
|
-
/**
|
|
72
|
-
* Create a new flow.
|
|
73
|
-
*/
|
|
65
|
+
/** @returns 501 Not Implemented */
|
|
74
66
|
create(body: {
|
|
75
67
|
name: string;
|
|
76
68
|
description?: string;
|
|
77
69
|
steps: FlowStep[];
|
|
78
70
|
}): Promise<APIResponse<Flow>>;
|
|
79
|
-
/**
|
|
80
|
-
* Start a flow run.
|
|
81
|
-
*/
|
|
71
|
+
/** @returns 501 Not Implemented */
|
|
82
72
|
run(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowRun>>;
|
|
83
|
-
/**
|
|
84
|
-
* Pause a running flow.
|
|
85
|
-
*/
|
|
73
|
+
/** @returns 501 Not Implemented */
|
|
86
74
|
pause(flowRunId: string): Promise<APIResponse<FlowRun>>;
|
|
87
|
-
/**
|
|
88
|
-
* Resume a paused flow.
|
|
89
|
-
*/
|
|
75
|
+
/** @returns 501 Not Implemented */
|
|
90
76
|
resume(flowRunId: string): Promise<APIResponse<FlowRun>>;
|
|
91
|
-
/**
|
|
92
|
-
* Cancel a flow run.
|
|
93
|
-
*/
|
|
77
|
+
/** @returns 501 Not Implemented */
|
|
94
78
|
cancel(flowRunId: string): Promise<APIResponse<FlowRun>>;
|
|
95
|
-
/**
|
|
96
|
-
* Get flow visualization (Mermaid diagram).
|
|
97
|
-
*/
|
|
79
|
+
/** @returns 501 Not Implemented */
|
|
98
80
|
visualize(flowId: string): Promise<APIResponse<FlowVisualization>>;
|
|
99
|
-
/**
|
|
100
|
-
* Simulate a flow run (dry run).
|
|
101
|
-
*/
|
|
81
|
+
/** @returns 501 Not Implemented */
|
|
102
82
|
simulate(flowId: string, input?: Record<string, unknown>): Promise<APIResponse<FlowSimulationResult>>;
|
|
103
83
|
}
|
|
104
84
|
//# sourceMappingURL=flows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/modules/flows.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/modules/flows.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE9F,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,gBAAgB,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,IAAI;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE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AC;IAIrD,mCAAmC;IAC7B,MAAM,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,QAAQ,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAIzG,mCAAmC;IAC7B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAIzF,mCAAmC;IAC7B,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAI7D,mCAAmC;IAC7B,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAI9D,mCAAmC;IAC7B,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAI9D,mCAAmC;IAC7B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAIxE,mCAAmC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;CAG9G"}
|
package/dist/modules/flows.js
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flows Module - Workflow Orchestration
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides lightweight workflow/orchestration between agents.
|
|
7
|
-
* "Graphs between agents" - the control plane of agents.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
// ============================================================================
|
|
8
|
+
// Helper for 501 responses
|
|
9
|
+
// ============================================================================
|
|
10
|
+
function notImplemented(method) {
|
|
11
|
+
return {
|
|
12
|
+
data: undefined,
|
|
13
|
+
error: {
|
|
14
|
+
code: "NOT_IMPLEMENTED",
|
|
15
|
+
message: `FlowsModule.${method}() is not implemented. Backend endpoint not available.`,
|
|
16
|
+
},
|
|
17
|
+
response: new Response(null, { status: 501, statusText: "Not Implemented" }),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
10
21
|
// Module
|
|
11
22
|
// ============================================================================
|
|
12
23
|
export class FlowsModule {
|
|
@@ -16,175 +27,40 @@ export class FlowsModule {
|
|
|
16
27
|
this.client = client;
|
|
17
28
|
this.headers = headers;
|
|
18
29
|
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List all flows.
|
|
22
|
-
*/
|
|
30
|
+
/** @returns 501 Not Implemented */
|
|
23
31
|
async list(params) {
|
|
24
|
-
|
|
25
|
-
const mockFlows = {
|
|
26
|
-
items: [
|
|
27
|
-
{
|
|
28
|
-
id: "flow_1",
|
|
29
|
-
name: "Customer Onboarding",
|
|
30
|
-
description: "Multi-step customer onboarding workflow",
|
|
31
|
-
steps: [
|
|
32
|
-
{ id: "step_1", name: "Collect Info", agent_id: "agent_intake", type: "agent", next_steps: ["step_2"] },
|
|
33
|
-
{ id: "step_2", name: "Verify Identity", agent_id: "agent_kyc", type: "agent", next_steps: ["step_3"] },
|
|
34
|
-
{ id: "step_3", name: "Create Account", agent_id: "agent_account", type: "agent" },
|
|
35
|
-
],
|
|
36
|
-
status: "active",
|
|
37
|
-
version: 1,
|
|
38
|
-
created_at: new Date(Date.now() - 86400000).toISOString(),
|
|
39
|
-
updated_at: new Date().toISOString(),
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
total: 1,
|
|
43
|
-
};
|
|
44
|
-
return { data: mockFlows, error: undefined, response: new Response() };
|
|
32
|
+
return notImplemented("list");
|
|
45
33
|
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Get a flow by ID.
|
|
49
|
-
*/
|
|
34
|
+
/** @returns 501 Not Implemented */
|
|
50
35
|
async get(flowId) {
|
|
51
|
-
|
|
52
|
-
const mockFlow = {
|
|
53
|
-
id: flowId,
|
|
54
|
-
name: "Customer Onboarding",
|
|
55
|
-
description: "Multi-step customer onboarding workflow",
|
|
56
|
-
steps: [
|
|
57
|
-
{ id: "step_1", name: "Collect Info", agent_id: "agent_intake", type: "agent", next_steps: ["step_2"] },
|
|
58
|
-
{ id: "step_2", name: "Verify Identity", agent_id: "agent_kyc", type: "agent", next_steps: ["step_3"] },
|
|
59
|
-
{ id: "step_3", name: "Approve", agent_id: "", type: "human_approval", next_steps: ["step_4"] },
|
|
60
|
-
{ id: "step_4", name: "Create Account", agent_id: "agent_account", type: "agent" },
|
|
61
|
-
],
|
|
62
|
-
status: "active",
|
|
63
|
-
version: 1,
|
|
64
|
-
created_at: new Date(Date.now() - 86400000).toISOString(),
|
|
65
|
-
updated_at: new Date().toISOString(),
|
|
66
|
-
};
|
|
67
|
-
return { data: mockFlow, error: undefined, response: new Response() };
|
|
36
|
+
return notImplemented("get");
|
|
68
37
|
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Create a new flow.
|
|
72
|
-
*/
|
|
38
|
+
/** @returns 501 Not Implemented */
|
|
73
39
|
async create(body) {
|
|
74
|
-
|
|
75
|
-
const mockFlow = {
|
|
76
|
-
id: `flow_${Date.now()}`,
|
|
77
|
-
name: body.name,
|
|
78
|
-
description: body.description,
|
|
79
|
-
steps: body.steps,
|
|
80
|
-
status: "draft",
|
|
81
|
-
version: 1,
|
|
82
|
-
created_at: new Date().toISOString(),
|
|
83
|
-
updated_at: new Date().toISOString(),
|
|
84
|
-
};
|
|
85
|
-
return { data: mockFlow, error: undefined, response: new Response() };
|
|
40
|
+
return notImplemented("create");
|
|
86
41
|
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Start a flow run.
|
|
90
|
-
*/
|
|
42
|
+
/** @returns 501 Not Implemented */
|
|
91
43
|
async run(flowId, input) {
|
|
92
|
-
|
|
93
|
-
const mockRun = {
|
|
94
|
-
id: `flowrun_${Date.now()}`,
|
|
95
|
-
flow_id: flowId,
|
|
96
|
-
status: "active",
|
|
97
|
-
current_step_id: "step_1",
|
|
98
|
-
completed_steps: [],
|
|
99
|
-
failed_steps: [],
|
|
100
|
-
context: input || {},
|
|
101
|
-
started_at: new Date().toISOString(),
|
|
102
|
-
};
|
|
103
|
-
return { data: mockRun, error: undefined, response: new Response() };
|
|
44
|
+
return notImplemented("run");
|
|
104
45
|
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Pause a running flow.
|
|
108
|
-
*/
|
|
46
|
+
/** @returns 501 Not Implemented */
|
|
109
47
|
async pause(flowRunId) {
|
|
110
|
-
|
|
111
|
-
const mockRun = {
|
|
112
|
-
id: flowRunId,
|
|
113
|
-
flow_id: "flow_1",
|
|
114
|
-
status: "paused",
|
|
115
|
-
current_step_id: "step_2",
|
|
116
|
-
completed_steps: ["step_1"],
|
|
117
|
-
failed_steps: [],
|
|
118
|
-
context: {},
|
|
119
|
-
started_at: new Date(Date.now() - 30000).toISOString(),
|
|
120
|
-
};
|
|
121
|
-
return { data: mockRun, error: undefined, response: new Response() };
|
|
48
|
+
return notImplemented("pause");
|
|
122
49
|
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Resume a paused flow.
|
|
126
|
-
*/
|
|
50
|
+
/** @returns 501 Not Implemented */
|
|
127
51
|
async resume(flowRunId) {
|
|
128
|
-
|
|
129
|
-
const mockRun = {
|
|
130
|
-
id: flowRunId,
|
|
131
|
-
flow_id: "flow_1",
|
|
132
|
-
status: "active",
|
|
133
|
-
current_step_id: "step_2",
|
|
134
|
-
completed_steps: ["step_1"],
|
|
135
|
-
failed_steps: [],
|
|
136
|
-
context: {},
|
|
137
|
-
started_at: new Date(Date.now() - 30000).toISOString(),
|
|
138
|
-
};
|
|
139
|
-
return { data: mockRun, error: undefined, response: new Response() };
|
|
52
|
+
return notImplemented("resume");
|
|
140
53
|
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Cancel a flow run.
|
|
144
|
-
*/
|
|
54
|
+
/** @returns 501 Not Implemented */
|
|
145
55
|
async cancel(flowRunId) {
|
|
146
|
-
|
|
147
|
-
const mockRun = {
|
|
148
|
-
id: flowRunId,
|
|
149
|
-
flow_id: "flow_1",
|
|
150
|
-
status: "cancelled",
|
|
151
|
-
current_step_id: "step_2",
|
|
152
|
-
completed_steps: ["step_1"],
|
|
153
|
-
failed_steps: [],
|
|
154
|
-
context: {},
|
|
155
|
-
started_at: new Date(Date.now() - 30000).toISOString(),
|
|
156
|
-
completed_at: new Date().toISOString(),
|
|
157
|
-
};
|
|
158
|
-
return { data: mockRun, error: undefined, response: new Response() };
|
|
56
|
+
return notImplemented("cancel");
|
|
159
57
|
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Get flow visualization (Mermaid diagram).
|
|
163
|
-
*/
|
|
58
|
+
/** @returns 501 Not Implemented */
|
|
164
59
|
async visualize(flowId) {
|
|
165
|
-
|
|
166
|
-
const mockViz = {
|
|
167
|
-
mermaid: `graph TD
|
|
168
|
-
A[Collect Info] --> B[Verify Identity]
|
|
169
|
-
B --> C{Approve?}
|
|
170
|
-
C -->|Yes| D[Create Account]
|
|
171
|
-
C -->|No| E[Reject]`,
|
|
172
|
-
};
|
|
173
|
-
return { data: mockViz, error: undefined, response: new Response() };
|
|
60
|
+
return notImplemented("visualize");
|
|
174
61
|
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Simulate a flow run (dry run).
|
|
178
|
-
*/
|
|
62
|
+
/** @returns 501 Not Implemented */
|
|
179
63
|
async simulate(flowId, input) {
|
|
180
|
-
|
|
181
|
-
const mockResult = {
|
|
182
|
-
success: true,
|
|
183
|
-
steps_executed: ["step_1", "step_2", "step_3", "step_4"],
|
|
184
|
-
estimated_duration_seconds: 120,
|
|
185
|
-
estimated_cost: 0.15,
|
|
186
|
-
potential_issues: [],
|
|
187
|
-
};
|
|
188
|
-
return { data: mockResult, error: undefined, response: new Response() };
|
|
64
|
+
return notImplemented("simulate");
|
|
189
65
|
}
|
|
190
66
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Handoff Module - Multi-Agent Delegation
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Provides first-class support for agent handoffs, delegation,
|
|
7
|
-
* thread forking, and run chain management.
|
|
4
|
+
* NOT IMPLEMENTED - Backend endpoint not available.
|
|
5
|
+
* All methods return 501 NotImplemented.
|
|
8
6
|
*/
|
|
9
7
|
import type { RawClient, APIResponse } from "../client/raw.js";
|
|
10
8
|
export type HandoffMode = "same_thread" | "subthread" | "new_thread";
|
|
@@ -66,22 +64,27 @@ export declare class HandoffModule {
|
|
|
66
64
|
constructor(client: RawClient, headers: () => Record<string, string>);
|
|
67
65
|
/**
|
|
68
66
|
* Hand off current run to another agent.
|
|
67
|
+
* @returns 501 Not Implemented - Backend not available
|
|
69
68
|
*/
|
|
70
69
|
handoff(runId: string, toAgentId: string, options?: HandoffOptions): Promise<APIResponse<HandoffResult>>;
|
|
71
70
|
/**
|
|
72
71
|
* Fork a thread into a new conversation branch.
|
|
72
|
+
* @returns 501 Not Implemented - Backend not available
|
|
73
73
|
*/
|
|
74
74
|
fork(threadId: string, options?: ForkOptions): Promise<APIResponse<ForkResult>>;
|
|
75
75
|
/**
|
|
76
76
|
* Get the full run chain (delegation tree).
|
|
77
|
+
* @returns 501 Not Implemented - Backend not available
|
|
77
78
|
*/
|
|
78
79
|
getChain(runId: string): Promise<APIResponse<RunChain>>;
|
|
79
80
|
/**
|
|
80
81
|
* Get parent runs in the chain.
|
|
82
|
+
* @returns 501 Not Implemented - Backend not available
|
|
81
83
|
*/
|
|
82
84
|
getParents(runId: string): Promise<APIResponse<RunChainNode[]>>;
|
|
83
85
|
/**
|
|
84
86
|
* Get child runs in the chain.
|
|
87
|
+
* @returns 501 Not Implemented - Backend not available
|
|
85
88
|
*/
|
|
86
89
|
getChildren(runId: string): Promise<APIResponse<RunChainNode[]>>;
|
|
87
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../../src/modules/handoff.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"handoff.d.ts","sourceRoot":"","sources":["../../src/modules/handoff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM/D,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,CAAC;AAErE,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAA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