asteroid-odyssey 1.0.12 → 1.0.16
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/README.md +5 -42
- package/dist/generated/agents/client.gen.d.ts +12 -0
- package/dist/generated/agents/client.gen.js +6 -0
- package/dist/generated/agents/index.d.ts +2 -16
- package/dist/generated/agents/index.js +17 -24
- package/dist/generated/agents/sdk.gen.d.ts +95 -0
- package/dist/generated/agents/sdk.gen.js +195 -0
- package/dist/generated/agents/types.gen.d.ts +597 -0
- package/dist/generated/agents/types.gen.js +3 -0
- package/dist/index.d.ts +99 -68
- package/dist/index.js +202 -92
- package/package.json +7 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,70 +1,101 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type { Agent } from './generated/agents/models/Agent';
|
|
4
|
-
import type { CreateWorkflowRequest } from './generated/agents/models/CreateWorkflowRequest';
|
|
5
|
-
import type { WorkflowExecutionRequest } from './generated/agents/models/WorkflowExecutionRequest';
|
|
6
|
-
import type { WorkflowExecution } from './generated/agents/models/WorkflowExecution';
|
|
7
|
-
import type { Status } from './generated/platform/models/Status';
|
|
8
|
-
import type { FeedbackRequest } from './generated/platform/models/FeedbackRequest';
|
|
9
|
-
import type { Feedback } from './generated/platform/models/Feedback';
|
|
1
|
+
import type { Client } from '@hey-api/client-fetch';
|
|
2
|
+
import type { CreateWorkflowRequest, WorkflowExecutionRequest, Execution } from './generated/agents/types.gen';
|
|
10
3
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
4
|
+
* Create an API client with a provided API key.
|
|
5
|
+
*
|
|
6
|
+
* @param apiKey - Your API key.
|
|
7
|
+
* @returns A configured API client.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* const client = AsteroidClient('your-api-key');
|
|
13
11
|
*/
|
|
14
|
-
export declare
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
12
|
+
export declare const AsteroidClient: (apiKey: string) => Client;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new workflow for a given agent.
|
|
15
|
+
*
|
|
16
|
+
* @param client - The API client.
|
|
17
|
+
* @param agentName - The name of the agent.
|
|
18
|
+
* @param workflowDetails - The workflow details.
|
|
19
|
+
* @returns The ID of the created workflow.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* const workflowId = await createNewWorkflow(client, 'my-agent', {
|
|
23
|
+
* name: "Example Workflow",
|
|
24
|
+
* result_schema: {},
|
|
25
|
+
* fields: { exampleField: "value" },
|
|
26
|
+
* prompts: ["Enter some data:"],
|
|
27
|
+
* provider: 'openai'
|
|
28
|
+
* });
|
|
29
|
+
*/
|
|
30
|
+
export declare const createNewWorkflow: (client: Client, agentName: string, workflowDetails: CreateWorkflowRequest) => Promise<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Execute an existing workflow.
|
|
33
|
+
*
|
|
34
|
+
* @param client - The API client.
|
|
35
|
+
* @param workflowId - The workflow identifier.
|
|
36
|
+
* @param executionData - The dynamic data to merge with the workflow.
|
|
37
|
+
* @returns The execution ID.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* const executionId = await executeWorkflowById(client, workflowId, { input: "some dynamic value" });
|
|
41
|
+
*/
|
|
42
|
+
export declare const executeWorkflowById: (client: Client, workflowId: string, executionData: WorkflowExecutionRequest) => Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Get the current status and details for a workflow execution.
|
|
45
|
+
*
|
|
46
|
+
* @param client - The API client.
|
|
47
|
+
* @param executionId - The execution identifier.
|
|
48
|
+
* @returns The execution details.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* const execution = await getExecutionStatus(client, executionId);
|
|
52
|
+
* console.log(execution.status);
|
|
53
|
+
*/
|
|
54
|
+
export declare const getExecutionStatus: (client: Client, executionId: string) => Promise<Execution>;
|
|
55
|
+
/**
|
|
56
|
+
* Get the progress updates for an execution.
|
|
57
|
+
*
|
|
58
|
+
* @param client - The API client.
|
|
59
|
+
* @param executionId - The execution identifier.
|
|
60
|
+
* @returns Array of progress update objects.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* const progressUpdates = await getWorkflowExecutionProgress(client, executionId);
|
|
64
|
+
* console.log(progressUpdates);
|
|
65
|
+
*/
|
|
66
|
+
export declare const getWorkflowExecutionProgress: (client: Client, executionId: string) => Promise<Array<{
|
|
67
|
+
execution_id: string;
|
|
68
|
+
progress: string;
|
|
69
|
+
created_at: string;
|
|
70
|
+
}>>;
|
|
71
|
+
/**
|
|
72
|
+
* Get the final result of a workflow execution.
|
|
73
|
+
*
|
|
74
|
+
* @param client - The API client.
|
|
75
|
+
* @param executionId - The execution identifier.
|
|
76
|
+
* @returns The result object of the execution.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* const result = await getWorkflowResult(client, executionId);
|
|
80
|
+
* console.log(result);
|
|
81
|
+
*/
|
|
82
|
+
export declare const getWorkflowResult: (client: Client, executionId: string) => Promise<Record<string, unknown>>;
|
|
83
|
+
/**
|
|
84
|
+
* Waits for a workflow execution to reach a terminal state and returns the result.
|
|
85
|
+
* Continuously polls the execution status until it's either "completed", "cancelled", or "failed".
|
|
86
|
+
*
|
|
87
|
+
* @param client - The API client.
|
|
88
|
+
* @param executionId - The execution identifier.
|
|
89
|
+
* @param interval - Polling interval in milliseconds (default is 1000ms).
|
|
90
|
+
* @returns A promise that resolves with the workflow execution result if completed.
|
|
91
|
+
* @throws An error if the execution ends as "cancelled" or "failed".
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* const result = await waitForExecutionResult(client, executionId, 2000);
|
|
95
|
+
*/
|
|
96
|
+
export declare const waitForExecutionResult: (client: Client, executionId: string, interval?: number, timeout?: number) => Promise<Record<string, unknown>>;
|
|
97
|
+
/**
|
|
98
|
+
* Optionally, re-export all generated functions and types.
|
|
99
|
+
*/
|
|
100
|
+
export * from './generated/agents/sdk.gen';
|
|
101
|
+
export * from './generated/agents/types.gen';
|
package/dist/index.js
CHANGED
|
@@ -1,104 +1,214 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
2
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
const
|
|
39
|
+
exports.waitForExecutionResult = exports.getWorkflowResult = exports.getWorkflowExecutionProgress = exports.getExecutionStatus = exports.executeWorkflowById = exports.createNewWorkflow = exports.AsteroidClient = void 0;
|
|
40
|
+
const client_fetch_1 = require("@hey-api/client-fetch");
|
|
41
|
+
const AgentsSDK = __importStar(require("./generated/agents/sdk.gen"));
|
|
6
42
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
43
|
+
* Create an API client with a provided API key.
|
|
44
|
+
*
|
|
45
|
+
* @param apiKey - Your API key.
|
|
46
|
+
* @returns A configured API client.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* const client = AsteroidClient('your-api-key');
|
|
9
50
|
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// We use a custom headers for the API keys
|
|
17
|
-
platform_1.OpenAPI.HEADERS = { 'X-Asteroid-Api-Key': apiKey };
|
|
18
|
-
agents_1.OpenAPI.HEADERS = { 'X-Asteroid-Agents-Api-Key': apiKey };
|
|
19
|
-
agents_1.OpenAPI.BASE = 'https://odyssey.asteroid.ai/api/v1';
|
|
20
|
-
platform_1.OpenAPI.BASE = 'https://platform.asteroid.ai/api/v1';
|
|
21
|
-
if (agentsConfig) {
|
|
22
|
-
Object.assign(agents_1.OpenAPI, agentsConfig);
|
|
23
|
-
}
|
|
24
|
-
if (platformConfig) {
|
|
25
|
-
Object.assign(platform_1.OpenAPI, platformConfig);
|
|
51
|
+
const AsteroidClient = (apiKey) => {
|
|
52
|
+
return (0, client_fetch_1.createClient)({
|
|
53
|
+
baseUrl: 'http://localhost:9090/api/v1',
|
|
54
|
+
// baseUrl: 'https://odyssey.asteroid.ai/api/v1',
|
|
55
|
+
headers: {
|
|
56
|
+
'X-Asteroid-Agents-Api-Key': apiKey
|
|
26
57
|
}
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.AsteroidClient = AsteroidClient;
|
|
61
|
+
/**
|
|
62
|
+
* Create a new workflow for a given agent.
|
|
63
|
+
*
|
|
64
|
+
* @param client - The API client.
|
|
65
|
+
* @param agentName - The name of the agent.
|
|
66
|
+
* @param workflowDetails - The workflow details.
|
|
67
|
+
* @returns The ID of the created workflow.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* const workflowId = await createNewWorkflow(client, 'my-agent', {
|
|
71
|
+
* name: "Example Workflow",
|
|
72
|
+
* result_schema: {},
|
|
73
|
+
* fields: { exampleField: "value" },
|
|
74
|
+
* prompts: ["Enter some data:"],
|
|
75
|
+
* provider: 'openai'
|
|
76
|
+
* });
|
|
77
|
+
*/
|
|
78
|
+
const createNewWorkflow = async (client, agentName, workflowDetails) => {
|
|
79
|
+
// Add a workflow_name key to the workflowDetails.fields object
|
|
80
|
+
// This field is deprecated and will be removed in a future version.
|
|
81
|
+
workflowDetails.fields.workflow_name = workflowDetails.name;
|
|
82
|
+
const response = await AgentsSDK.createWorkflow({
|
|
83
|
+
client,
|
|
84
|
+
path: { agent_name: agentName },
|
|
85
|
+
body: workflowDetails,
|
|
86
|
+
});
|
|
87
|
+
if (response.error) {
|
|
88
|
+
console.log(response.error);
|
|
89
|
+
throw new Error(response.error);
|
|
27
90
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* Creates a new workflow for a given agent.
|
|
51
|
-
* @param agentName The name of the agent for which the workflow is created.
|
|
52
|
-
* @param request The workflow creation request.
|
|
53
|
-
* @returns The ID of the newly created workflow.
|
|
54
|
-
*/
|
|
55
|
-
async createWorkflow(agentName, request) {
|
|
56
|
-
return agents_1.DefaultService.createWorkflow(agentName, request);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Executes a saved workflow for an agent.
|
|
60
|
-
* @param workflowId The ID of the workflow to execute.
|
|
61
|
-
* @param request The execution request containing dynamic values.
|
|
62
|
-
* @returns A string indicating that the job was queued.
|
|
63
|
-
*/
|
|
64
|
-
async runWorkflow(workflowId, request) {
|
|
65
|
-
return agents_1.WorkflowService.executeWorkflow(workflowId, request);
|
|
91
|
+
return response.data;
|
|
92
|
+
};
|
|
93
|
+
exports.createNewWorkflow = createNewWorkflow;
|
|
94
|
+
/**
|
|
95
|
+
* Execute an existing workflow.
|
|
96
|
+
*
|
|
97
|
+
* @param client - The API client.
|
|
98
|
+
* @param workflowId - The workflow identifier.
|
|
99
|
+
* @param executionData - The dynamic data to merge with the workflow.
|
|
100
|
+
* @returns The execution ID.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* const executionId = await executeWorkflowById(client, workflowId, { input: "some dynamic value" });
|
|
104
|
+
*/
|
|
105
|
+
const executeWorkflowById = async (client, workflowId, executionData) => {
|
|
106
|
+
const response = await AgentsSDK.executeWorkflow({
|
|
107
|
+
client,
|
|
108
|
+
path: { workflow_id: workflowId },
|
|
109
|
+
body: executionData,
|
|
110
|
+
});
|
|
111
|
+
if (response.error) {
|
|
112
|
+
throw new Error(response.error);
|
|
66
113
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
114
|
+
return response.data;
|
|
115
|
+
};
|
|
116
|
+
exports.executeWorkflowById = executeWorkflowById;
|
|
117
|
+
/**
|
|
118
|
+
* Get the current status and details for a workflow execution.
|
|
119
|
+
*
|
|
120
|
+
* @param client - The API client.
|
|
121
|
+
* @param executionId - The execution identifier.
|
|
122
|
+
* @returns The execution details.
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* const execution = await getExecutionStatus(client, executionId);
|
|
126
|
+
* console.log(execution.status);
|
|
127
|
+
*/
|
|
128
|
+
const getExecutionStatus = async (client, executionId) => {
|
|
129
|
+
const execution = await AgentsSDK.getExecution({
|
|
130
|
+
client,
|
|
131
|
+
path: { id: executionId },
|
|
132
|
+
});
|
|
133
|
+
if (execution.error) {
|
|
134
|
+
throw new Error(execution.error);
|
|
73
135
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
136
|
+
return execution.data;
|
|
137
|
+
};
|
|
138
|
+
exports.getExecutionStatus = getExecutionStatus;
|
|
139
|
+
/**
|
|
140
|
+
* Get the progress updates for an execution.
|
|
141
|
+
*
|
|
142
|
+
* @param client - The API client.
|
|
143
|
+
* @param executionId - The execution identifier.
|
|
144
|
+
* @returns Array of progress update objects.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* const progressUpdates = await getWorkflowExecutionProgress(client, executionId);
|
|
148
|
+
* console.log(progressUpdates);
|
|
149
|
+
*/
|
|
150
|
+
const getWorkflowExecutionProgress = async (client, executionId) => {
|
|
151
|
+
const progressUpdates = await AgentsSDK.getExecutionProgress({
|
|
152
|
+
client,
|
|
153
|
+
path: { id: executionId },
|
|
154
|
+
});
|
|
155
|
+
if (progressUpdates.error) {
|
|
156
|
+
throw new Error(progressUpdates.error);
|
|
81
157
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
158
|
+
return progressUpdates.data;
|
|
159
|
+
};
|
|
160
|
+
exports.getWorkflowExecutionProgress = getWorkflowExecutionProgress;
|
|
161
|
+
/**
|
|
162
|
+
* Get the final result of a workflow execution.
|
|
163
|
+
*
|
|
164
|
+
* @param client - The API client.
|
|
165
|
+
* @param executionId - The execution identifier.
|
|
166
|
+
* @returns The result object of the execution.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* const result = await getWorkflowResult(client, executionId);
|
|
170
|
+
* console.log(result);
|
|
171
|
+
*/
|
|
172
|
+
const getWorkflowResult = async (client, executionId) => {
|
|
173
|
+
const execution = await (0, exports.getExecutionStatus)(client, executionId);
|
|
174
|
+
return execution.result;
|
|
175
|
+
};
|
|
176
|
+
exports.getWorkflowResult = getWorkflowResult;
|
|
177
|
+
/**
|
|
178
|
+
* Waits for a workflow execution to reach a terminal state and returns the result.
|
|
179
|
+
* Continuously polls the execution status until it's either "completed", "cancelled", or "failed".
|
|
180
|
+
*
|
|
181
|
+
* @param client - The API client.
|
|
182
|
+
* @param executionId - The execution identifier.
|
|
183
|
+
* @param interval - Polling interval in milliseconds (default is 1000ms).
|
|
184
|
+
* @returns A promise that resolves with the workflow execution result if completed.
|
|
185
|
+
* @throws An error if the execution ends as "cancelled" or "failed".
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* const result = await waitForExecutionResult(client, executionId, 2000);
|
|
189
|
+
*/
|
|
190
|
+
const waitForExecutionResult = async (client, executionId, interval = 1000, timeout = 3600000 // 1 hour
|
|
191
|
+
) => {
|
|
192
|
+
var steps = Math.floor(timeout / interval);
|
|
193
|
+
// Keep polling the execution status until it's either "completed", "cancelled", or "failed".
|
|
194
|
+
while (steps > 0) {
|
|
195
|
+
const execution = await (0, exports.getExecutionStatus)(client, executionId);
|
|
196
|
+
const currentStatus = execution.status?.status;
|
|
197
|
+
if (currentStatus === 'completed') {
|
|
198
|
+
return await (0, exports.getWorkflowResult)(client, executionId);
|
|
87
199
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
throw new Error('Run result not found');
|
|
200
|
+
else if (currentStatus === 'failed' || currentStatus === 'cancelled') {
|
|
201
|
+
throw new Error(`Execution ${executionId} ended with status: ${currentStatus}${execution.status?.reason ? ' - ' + execution.status.reason : ''}`);
|
|
91
202
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* Creates feedback for a run.
|
|
96
|
-
* @param runId The ID of the run to create feedback for.
|
|
97
|
-
* @param request The feedback request.
|
|
98
|
-
* @returns The feedback created.
|
|
99
|
-
*/
|
|
100
|
-
async createRunFeedback(runId, request) {
|
|
101
|
-
return platform_1.ImproveService.createFeedback(runId, request);
|
|
203
|
+
// Wait for the specified interval before polling again
|
|
204
|
+
await new Promise(resolve => setTimeout(resolve, interval));
|
|
205
|
+
steps--;
|
|
102
206
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
207
|
+
throw new Error(`Execution ${executionId} timed out after ${timeout}ms`);
|
|
208
|
+
};
|
|
209
|
+
exports.waitForExecutionResult = waitForExecutionResult;
|
|
210
|
+
/**
|
|
211
|
+
* Optionally, re-export all generated functions and types.
|
|
212
|
+
*/
|
|
213
|
+
__exportStar(require("./generated/agents/sdk.gen"), exports);
|
|
214
|
+
__exportStar(require("./generated/agents/types.gen"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asteroid-odyssey",
|
|
3
|
-
"version": "v1.0.
|
|
3
|
+
"version": "v1.0.16",
|
|
4
4
|
"description": "SDK for interacting with Asteroid Agents API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"generate-platform": "openapi -i ../platform/server/openapi.yaml -o src/generated/platform",
|
|
13
13
|
"generate": "npm run generate-agents && npm run generate-platform",
|
|
14
14
|
"build": "tsc",
|
|
15
|
-
"prepare": "npm run build"
|
|
15
|
+
"prepare": "npm run build",
|
|
16
|
+
"openapi-ts": "openapi-ts"
|
|
16
17
|
},
|
|
17
18
|
"keywords": [
|
|
18
19
|
"asteroid",
|
|
@@ -23,8 +24,12 @@
|
|
|
23
24
|
"author": "Asteroid",
|
|
24
25
|
"license": "MIT",
|
|
25
26
|
"devDependencies": {
|
|
27
|
+
"@hey-api/openapi-ts": "^0.64.12",
|
|
26
28
|
"@types/node": "^22.13.4",
|
|
27
29
|
"openapi-typescript-codegen": "^0.29.0",
|
|
28
30
|
"typescript": "^5.7.3"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@hey-api/client-fetch": "^0.8.3"
|
|
29
34
|
}
|
|
30
35
|
}
|