asteroid-odyssey 1.8.77 → 1.8.94
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 +46 -7
- package/dist/index.d.mts +3147 -1356
- package/dist/index.d.ts +3147 -1356
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Asteroid Odyssey TypeScript SDK
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the Asteroid
|
|
3
|
+
TypeScript SDK for the Asteroid API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -13,9 +13,8 @@ pnpm add asteroid-odyssey
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import { client,
|
|
16
|
+
import { client, workflowExecutePost, executionGet } from 'asteroid-odyssey';
|
|
17
17
|
|
|
18
|
-
// Configure the client
|
|
19
18
|
client.setConfig({
|
|
20
19
|
baseUrl: 'https://odyssey.asteroid.ai/agents/v2',
|
|
21
20
|
headers: {
|
|
@@ -23,15 +22,13 @@ client.setConfig({
|
|
|
23
22
|
},
|
|
24
23
|
});
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
path: { agentId: 'your-agent-id' },
|
|
25
|
+
const { data } = await workflowExecutePost({
|
|
26
|
+
path: { workflowId: 'your-workflow-id' },
|
|
29
27
|
body: { inputs: { input: 'value' } },
|
|
30
28
|
});
|
|
31
29
|
|
|
32
30
|
console.log(`Execution ID: ${data?.executionId}`);
|
|
33
31
|
|
|
34
|
-
// Get execution status
|
|
35
32
|
const { data: execution } = await executionGet({
|
|
36
33
|
path: { executionId: data?.executionId },
|
|
37
34
|
});
|
|
@@ -39,6 +36,48 @@ const { data: execution } = await executionGet({
|
|
|
39
36
|
console.log(`Status: ${execution?.status}`);
|
|
40
37
|
```
|
|
41
38
|
|
|
39
|
+
## Migrating from the agent functions
|
|
40
|
+
|
|
41
|
+
A workflow is what you build and run. It used to be called an agent. A version is one immutable snapshot of a workflow. It used to be called a workflow. An agent is now the AI node inside a workflow.
|
|
42
|
+
|
|
43
|
+
The old functions still work and call the old `/agents` routes. They are marked deprecated and will be removed in a future major release. Move to the new functions:
|
|
44
|
+
|
|
45
|
+
| Old | New |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `agentList` | `workflowList` |
|
|
48
|
+
| `agentCreate` | `workflowCreate` |
|
|
49
|
+
| `availableToolsList` | `workflowAvailableToolsList` |
|
|
50
|
+
| `agentByIdUpdate` | `workflowByIdUpdate` |
|
|
51
|
+
| `agentByIdDelete` | `workflowByIdDelete` |
|
|
52
|
+
| `agentExecutePost` | `workflowExecutePost` |
|
|
53
|
+
| `agentExecuteSyncPost` | `workflowExecuteSyncPost` |
|
|
54
|
+
| `agentWorkflowHeadGetFiles` | `workflowHeadGetFiles` |
|
|
55
|
+
| `agentWorkflowHeadPatchFiles` | `workflowHeadPatchFiles` |
|
|
56
|
+
| `agentWorkflowHeadPublishHead` | `workflowHeadPublish` |
|
|
57
|
+
| `agentWorkflowsList` | `workflowVersionsList` |
|
|
58
|
+
| `agentWorkflowsCreate` | `workflowVersionsCreate` |
|
|
59
|
+
| `agentWorkflowsValidate` | `workflowVersionsValidate` |
|
|
60
|
+
| `agentWorkflowsGet` | `workflowVersionsGet` |
|
|
61
|
+
| `agentWorkflowsDeleteWorkflow` | `workflowVersionsDelete` |
|
|
62
|
+
| `agentWorkflowsExecute` | `workflowVersionsExecute` |
|
|
63
|
+
| `agentWorkflowsGetFilesByVersion` | `workflowVersionsGetFiles` |
|
|
64
|
+
| `agentWorkflowsGetInputs` | `workflowVersionsGetInputs` |
|
|
65
|
+
| `agentWorkflowsGetOutputSchemas` | `workflowVersionsGetOutputSchemas` |
|
|
66
|
+
| `agentWorkflowsPublish` | `workflowVersionsPublish` |
|
|
67
|
+
|
|
68
|
+
Field names follow the same rule:
|
|
69
|
+
|
|
70
|
+
| Where | Old | New |
|
|
71
|
+
|---|---|---|
|
|
72
|
+
| New `/workflows` routes | `agentId` | `workflowId` |
|
|
73
|
+
| New `/workflows` routes | version `workflowId` | `versionId` |
|
|
74
|
+
| Workflow detail | `agent`, `workflow`, `versionsMetadata` | `workflow`, `version`, `versions` |
|
|
75
|
+
| File tree | `workflowId`, `agentName` | `versionId`, `workflowName` |
|
|
76
|
+
| Execution, scheduled execution and batch responses | `agentId`, `agentName` | `workflowId`, `workflowName` |
|
|
77
|
+
| Execution, scheduled execution and batch responses | `workflowId` (the version) | `workflowVersionId` |
|
|
78
|
+
|
|
79
|
+
On execution, scheduled execution and batch responses, `workflowId` now holds the workflow ID, not the version ID. Read `workflowVersionId` for the version.
|
|
80
|
+
|
|
42
81
|
## Documentation
|
|
43
82
|
|
|
44
83
|
See [docs.asteroid.ai](https://docs.asteroid.ai) for full documentation.
|