@elevasis/sdk 0.5.12 → 0.5.13
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/cli.cjs +92 -81
- package/dist/index.d.ts +11 -253
- package/dist/index.js +5 -9
- package/dist/templates.js +26 -23
- package/dist/types/worker/adapters/index.d.ts +0 -1
- package/dist/worker/index.js +47 -53
- package/package.json +1 -1
- package/reference/_navigation.md +13 -57
- package/reference/concepts.mdx +203 -0
- package/reference/deployment/{command-center-ui.mdx → command-center.mdx} +229 -151
- package/reference/deployment/index.mdx +158 -153
- package/reference/framework/agent.mdx +168 -151
- package/reference/framework/index.mdx +182 -103
- package/reference/framework/memory.mdx +347 -347
- package/reference/framework/tutorial-system.mdx +253 -0
- package/reference/{getting-started/index.mdx → getting-started.mdx} +4 -4
- package/reference/index.mdx +117 -114
- package/reference/platform-tools/adapters.mdx +175 -32
- package/reference/platform-tools/index.mdx +354 -195
- package/reference/resources/index.mdx +5 -0
- package/reference/{roadmap/index.mdx → roadmap.mdx} +1 -1
- package/reference/{runtime/index.mdx → runtime.mdx} +196 -141
- package/dist/types/worker/adapters/trello.d.ts +0 -14
- package/reference/concepts/index.mdx +0 -203
- package/reference/deployment/command-view.mdx +0 -154
- package/reference/framework/documentation.mdx +0 -92
- package/reference/platform-tools/examples.mdx +0 -170
- package/reference/runtime/limits.mdx +0 -75
- package/reference/security/credentials.mdx +0 -141
- /package/reference/{cli/index.mdx → cli.mdx} +0 -0
- /package/reference/{developer → framework}/interaction-guidance.mdx +0 -0
- /package/reference/{troubleshooting/common-errors.mdx → troubleshooting.mdx} +0 -0
|
@@ -1,153 +1,158 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Deploying Resources
|
|
3
|
-
description: How to deploy your Elevasis SDK resources to the platform using elevasis-sdk deploy, including configuration, validation, and environment setup
|
|
4
|
-
loadWhen: "Preparing to deploy or debugging deploy failures"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Deploying your resources makes them live on the Elevasis platform and immediately available for execution. The deploy process validates your resource definitions, bundles your code into a single self-contained file, and uploads it to the platform -- no server-side dependency installation required.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## How Deployment Works
|
|
12
|
-
|
|
13
|
-
When you run `elevasis-sdk deploy`, the CLI performs these steps in order:
|
|
14
|
-
|
|
15
|
-
1. **Authenticate** -- calls the API with your `ELEVASIS_API_KEY` to verify credentials and resolve your organization name
|
|
16
|
-
2. **Validate** -- runs your `src/index.ts` through `ResourceRegistry`, catching the same errors as the platform
|
|
17
|
-
3. **Bundle** -- uses esbuild to produce a single self-contained `dist/bundle.js` file (~50-200 KB) containing your code and all dependencies
|
|
18
|
-
4. **Upload** -- sends the bundle and resource metadata to the platform via `POST /api/external/deploy`
|
|
19
|
-
5. **Go live** -- the platform registers your resources; they are immediately available for execution
|
|
20
|
-
|
|
21
|
-
There is no local dev server and no separate staging environment. Deployed resources run directly on the platform. Local testing uses `tsc --noEmit` and Vitest with direct handler calls.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Running a Deploy
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
elevasis-sdk deploy
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
**Successful deploy output:**
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
Authenticating... done (acme-corp)
|
|
35
|
-
Validating... done (4 resources, 0 errors)
|
|
36
|
-
Bundling... done (142 KB)
|
|
37
|
-
Uploading... done
|
|
38
|
-
|
|
39
|
-
Deployed! 4 resources live.
|
|
40
|
-
Deployment: deploy_abc123
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Each deploy creates a new deployment record. The previous active deployment is automatically stopped. You can view all deployments with `elevasis-sdk deployments`.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Validation
|
|
48
|
-
|
|
49
|
-
The CLI validates your resources before bundling. Validation uses the same `ResourceRegistry` as the platform, so errors caught locally are the same errors that would be caught at deploy time.
|
|
50
|
-
|
|
51
|
-
**Validation checks:**
|
|
52
|
-
|
|
53
|
-
- Duplicate `resourceId` within your organization
|
|
54
|
-
- Invalid model configuration (temperature and token bounds out of range)
|
|
55
|
-
- `ExecutionInterface` form fields not matching `inputSchema`
|
|
56
|
-
- Broken workflow step chains (`next` referencing a step that does not exist)
|
|
57
|
-
- Relationship declarations referencing resources that do not exist
|
|
58
|
-
|
|
59
|
-
**Validation failure output:**
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Authenticating... done (acme-corp)
|
|
63
|
-
Validating...
|
|
64
|
-
ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
|
|
65
|
-
ERROR Workflow step 'send-email' references non-existent next step 'notify'
|
|
66
|
-
|
|
67
|
-
2 errors. Deploy aborted.
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Run `elevasis-sdk check` at any time to validate without deploying.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Configuration
|
|
75
|
-
|
|
76
|
-
The CLI reads `elevasis.config.ts` from your project root. All fields are optional -- the organization name is resolved from your API key, not from config.
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
// elevasis.config.ts
|
|
80
|
-
import type { ElevasConfig } from '@elevasis/sdk'
|
|
81
|
-
|
|
82
|
-
export default {} satisfies ElevasConfig
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
The `ElevasConfig` type is exported from `@elevasis/sdk`. You can leave the config empty or extend it as options are added in future SDK versions.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Environment Variables
|
|
90
|
-
|
|
91
|
-
| Variable
|
|
92
|
-
|
|
|
93
|
-
| `ELEVASIS_API_KEY` | Yes
|
|
94
|
-
| `ELEVASIS_API_URL` | No
|
|
95
|
-
|
|
96
|
-
The CLI also accepts a `--api-url` flag on every command, which takes priority over `ELEVASIS_API_URL`.
|
|
97
|
-
|
|
98
|
-
**API URL resolution order:**
|
|
99
|
-
|
|
100
|
-
1. `--api-url` flag (highest priority)
|
|
101
|
-
2. `ELEVASIS_API_URL` environment variable
|
|
102
|
-
3. `NODE_ENV`-based default (production: `https://api.elevasis.io`, development: localhost)
|
|
103
|
-
|
|
104
|
-
**Setting `ELEVASIS_API_KEY` via `.env` file:**
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
ELEVASIS_API_KEY=sk_***
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Place `.env` in your project root. The CLI reads it automatically. Never commit this file.
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## Deployment Lifecycle
|
|
115
|
-
|
|
116
|
-
Each call to `elevasis-sdk deploy` creates a new deployment. The platform tracks all deployments for your organization.
|
|
117
|
-
|
|
118
|
-
| Status
|
|
119
|
-
|
|
|
120
|
-
| `deploying` | Bundle is being processed and resources are being registered |
|
|
121
|
-
| `active`
|
|
122
|
-
| `stopped`
|
|
123
|
-
| `failed`
|
|
124
|
-
|
|
125
|
-
Only one deployment can be `active` at a time. Deploying again automatically moves the previous active deployment to `stopped`.
|
|
126
|
-
|
|
127
|
-
**View deployment history:**
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
elevasis-sdk deployments
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
deploy_abc123 active 2026-02-25 14:00:00 4 resources
|
|
135
|
-
deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
|
|
136
|
-
deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Bundle Details
|
|
142
|
-
|
|
143
|
-
The deploy bundle is a single CJS file produced by esbuild. It includes:
|
|
144
|
-
|
|
145
|
-
- Your resource definitions from `src/index.ts`
|
|
146
|
-
- The `@elevasis/sdk/worker` runtime that handles execution messages from the platform
|
|
147
|
-
- All your npm dependencies (fully self-contained, no `node_modules` needed on the server)
|
|
148
|
-
|
|
149
|
-
The bundle is stored on the platform for durability and restart recovery. If the platform API restarts, it re-downloads your bundle and re-registers your resources automatically -- no action required on your part.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Deploying Resources
|
|
3
|
+
description: How to deploy your Elevasis SDK resources to the platform using elevasis-sdk deploy, including configuration, validation, and environment setup
|
|
4
|
+
loadWhen: "Preparing to deploy or debugging deploy failures"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Deploying your resources makes them live on the Elevasis platform and immediately available for execution. The deploy process validates your resource definitions, bundles your code into a single self-contained file, and uploads it to the platform -- no server-side dependency installation required.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## How Deployment Works
|
|
12
|
+
|
|
13
|
+
When you run `elevasis-sdk deploy`, the CLI performs these steps in order:
|
|
14
|
+
|
|
15
|
+
1. **Authenticate** -- calls the API with your `ELEVASIS_API_KEY` to verify credentials and resolve your organization name
|
|
16
|
+
2. **Validate** -- runs your `src/index.ts` through `ResourceRegistry`, catching the same errors as the platform
|
|
17
|
+
3. **Bundle** -- uses esbuild to produce a single self-contained `dist/bundle.js` file (~50-200 KB) containing your code and all dependencies
|
|
18
|
+
4. **Upload** -- sends the bundle and resource metadata to the platform via `POST /api/external/deploy`
|
|
19
|
+
5. **Go live** -- the platform registers your resources; they are immediately available for execution
|
|
20
|
+
|
|
21
|
+
There is no local dev server and no separate staging environment. Deployed resources run directly on the platform. Local testing uses `tsc --noEmit` and Vitest with direct handler calls.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Running a Deploy
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
elevasis-sdk deploy
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Successful deploy output:**
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Authenticating... done (acme-corp)
|
|
35
|
+
Validating... done (4 resources, 0 errors)
|
|
36
|
+
Bundling... done (142 KB)
|
|
37
|
+
Uploading... done
|
|
38
|
+
|
|
39
|
+
Deployed! 4 resources live.
|
|
40
|
+
Deployment: deploy_abc123
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each deploy creates a new deployment record. The previous active deployment is automatically stopped. You can view all deployments with `elevasis-sdk deployments`.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Validation
|
|
48
|
+
|
|
49
|
+
The CLI validates your resources before bundling. Validation uses the same `ResourceRegistry` as the platform, so errors caught locally are the same errors that would be caught at deploy time.
|
|
50
|
+
|
|
51
|
+
**Validation checks:**
|
|
52
|
+
|
|
53
|
+
- Duplicate `resourceId` within your organization
|
|
54
|
+
- Invalid model configuration (temperature and token bounds out of range)
|
|
55
|
+
- `ExecutionInterface` form fields not matching `inputSchema`
|
|
56
|
+
- Broken workflow step chains (`next` referencing a step that does not exist)
|
|
57
|
+
- Relationship declarations referencing resources that do not exist
|
|
58
|
+
|
|
59
|
+
**Validation failure output:**
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Authenticating... done (acme-corp)
|
|
63
|
+
Validating...
|
|
64
|
+
ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
|
|
65
|
+
ERROR Workflow step 'send-email' references non-existent next step 'notify'
|
|
66
|
+
|
|
67
|
+
2 errors. Deploy aborted.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Run `elevasis-sdk check` at any time to validate without deploying.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Configuration
|
|
75
|
+
|
|
76
|
+
The CLI reads `elevasis.config.ts` from your project root. All fields are optional -- the organization name is resolved from your API key, not from config.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
// elevasis.config.ts
|
|
80
|
+
import type { ElevasConfig } from '@elevasis/sdk'
|
|
81
|
+
|
|
82
|
+
export default {} satisfies ElevasConfig
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The `ElevasConfig` type is exported from `@elevasis/sdk`. You can leave the config empty or extend it as options are added in future SDK versions.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Environment Variables
|
|
90
|
+
|
|
91
|
+
| Variable | Required | Description |
|
|
92
|
+
| ------------------ | -------- | --------------------------------------------------------------------------- |
|
|
93
|
+
| `ELEVASIS_API_KEY` | Yes | Your `sk_...` API key. Used for authentication and organization resolution. |
|
|
94
|
+
| `ELEVASIS_API_URL` | No | Override the API base URL. Useful for pointing at a staging environment. |
|
|
95
|
+
|
|
96
|
+
The CLI also accepts a `--api-url` flag on every command, which takes priority over `ELEVASIS_API_URL`.
|
|
97
|
+
|
|
98
|
+
**API URL resolution order:**
|
|
99
|
+
|
|
100
|
+
1. `--api-url` flag (highest priority)
|
|
101
|
+
2. `ELEVASIS_API_URL` environment variable
|
|
102
|
+
3. `NODE_ENV`-based default (production: `https://api.elevasis.io`, development: localhost)
|
|
103
|
+
|
|
104
|
+
**Setting `ELEVASIS_API_KEY` via `.env` file:**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
ELEVASIS_API_KEY=sk_***
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Place `.env` in your project root. The CLI reads it automatically. Never commit this file.
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Deployment Lifecycle
|
|
115
|
+
|
|
116
|
+
Each call to `elevasis-sdk deploy` creates a new deployment. The platform tracks all deployments for your organization.
|
|
117
|
+
|
|
118
|
+
| Status | Meaning |
|
|
119
|
+
| ----------- | ------------------------------------------------------------ |
|
|
120
|
+
| `deploying` | Bundle is being processed and resources are being registered |
|
|
121
|
+
| `active` | Resources are live and available for execution |
|
|
122
|
+
| `stopped` | Superseded by a newer deployment |
|
|
123
|
+
| `failed` | Deploy did not complete (validation or bundle error) |
|
|
124
|
+
|
|
125
|
+
Only one deployment can be `active` at a time. Deploying again automatically moves the previous active deployment to `stopped`.
|
|
126
|
+
|
|
127
|
+
**View deployment history:**
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
elevasis-sdk deployments
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
deploy_abc123 active 2026-02-25 14:00:00 4 resources
|
|
135
|
+
deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
|
|
136
|
+
deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Bundle Details
|
|
142
|
+
|
|
143
|
+
The deploy bundle is a single CJS file produced by esbuild. It includes:
|
|
144
|
+
|
|
145
|
+
- Your resource definitions from `src/index.ts`
|
|
146
|
+
- The `@elevasis/sdk/worker` runtime that handles execution messages from the platform
|
|
147
|
+
- All your npm dependencies (fully self-contained, no `node_modules` needed on the server)
|
|
148
|
+
|
|
149
|
+
The bundle is stored on the platform for durability and restart recovery. If the platform API restarts, it re-downloads your bundle and re-registers your resources automatically -- no action required on your part.
|
|
150
|
+
|
|
151
|
+
## Documentation
|
|
152
|
+
|
|
153
|
+
- [Command Center](command-center.mdx) - Resource graph, relationships, node types, and post-deployment UI reference
|
|
154
|
+
- [Execution API](api.mdx) - REST endpoints for executing resources and managing deployments
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
**Last Updated:** 2026-02-25
|