@elevasis/sdk 0.5.12 → 0.5.14
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 +144 -118
- package/dist/index.d.ts +19 -253
- package/dist/index.js +20 -9
- package/dist/templates.js +62 -59
- 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/{cli/index.mdx → cli.mdx} +568 -505
- package/reference/concepts.mdx +164 -0
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +226 -0
- package/reference/deployment/index.mdx +158 -153
- package/reference/framework/agent.mdx +156 -151
- package/reference/framework/index.mdx +182 -103
- package/reference/{developer → framework}/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -347
- package/reference/framework/project-structure.mdx +277 -298
- package/reference/framework/tutorial-system.mdx +222 -0
- package/reference/{getting-started/index.mdx → getting-started.mdx} +152 -148
- package/reference/index.mdx +131 -114
- package/reference/platform-tools/adapters.mdx +868 -929
- package/reference/platform-tools/index.mdx +354 -195
- package/reference/resources/index.mdx +339 -336
- package/reference/resources/patterns.mdx +355 -354
- package/reference/resources/types.mdx +207 -207
- package/reference/{roadmap/index.mdx → roadmap.mdx} +163 -147
- package/reference/{runtime/index.mdx → runtime.mdx} +173 -141
- package/reference/{troubleshooting/common-errors.mdx → troubleshooting.mdx} +223 -210
- package/dist/types/worker/adapters/trello.d.ts +0 -14
- package/reference/concepts/index.mdx +0 -203
- package/reference/deployment/command-center-ui.mdx +0 -151
- 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
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Command Center
|
|
3
|
+
description: Post-deployment UI reference -- what each page does, the resource graph model, relationships, validation, and how SDK concepts map to Command Center actions
|
|
4
|
+
loadWhen: "User asks about the Command Center UI, post-deployment workflow, monitoring, or the resource graph"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The Command Center is the browser UI for interacting with deployed resources. After you run `elevasis-sdk deploy`, this is where you run workflows, monitor executions, manage approvals, schedule tasks, and review logs.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Quick Reference
|
|
12
|
+
|
|
13
|
+
| Task | Page | Path |
|
|
14
|
+
| -------------------------------------------------- | -------------- | ----------------------- |
|
|
15
|
+
| Browse deployed resources, view the resource graph | Command View | `/command-view` |
|
|
16
|
+
| Approve or reject pending HITL requests | Command Queue | `/queue` |
|
|
17
|
+
| Browse deployed documentation | Knowledge Base | `/knowledge-base` |
|
|
18
|
+
| Search execution history across all resources | Execution Logs | `/logs` |
|
|
19
|
+
| Create API key and OAuth credentials | Credentials | `/settings/credentials` |
|
|
20
|
+
| View deployment history and active version | Deployments | `/settings/deployments` |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Command View
|
|
25
|
+
|
|
26
|
+
The Command View is a visual graph of your deployed resources. Each node is a resource (workflow, agent, trigger, integration). Edges are the relationships you declared in `OrganizationResources`.
|
|
27
|
+
|
|
28
|
+
**What you can do here:**
|
|
29
|
+
|
|
30
|
+
- See all deployed resources at a glance
|
|
31
|
+
- Trace data flow between resources via declared relationships
|
|
32
|
+
- Identify which resources depend on which integrations
|
|
33
|
+
- Click a node to view resource details (ID, status, type)
|
|
34
|
+
|
|
35
|
+
### Node Types
|
|
36
|
+
|
|
37
|
+
Every resource you deploy becomes a node in the graph. Some nodes are executable; others are visual-only.
|
|
38
|
+
|
|
39
|
+
**Executable nodes:**
|
|
40
|
+
|
|
41
|
+
| Type | What It Does | Deployed By |
|
|
42
|
+
| -------- | ------------------------------------------------- | --------------------- |
|
|
43
|
+
| Workflow | Runs step handlers in sequence or branching paths | `elevasis-sdk deploy` |
|
|
44
|
+
| Agent | Autonomous LLM-powered resource with tools | `elevasis-sdk deploy` |
|
|
45
|
+
|
|
46
|
+
**Visual-only nodes** (no runtime behavior -- exist for the graph):
|
|
47
|
+
|
|
48
|
+
| Type | What It Represents | Why It Exists |
|
|
49
|
+
| ----------------- | --------------------------------------------------- | --------------------------------------------- |
|
|
50
|
+
| Trigger | A webhook or schedule that starts a workflow | Shows how executions begin |
|
|
51
|
+
| Integration | A credential reference (provider + credential name) | Shows which external services a resource uses |
|
|
52
|
+
| External Resource | A third-party automation (n8n, Make, Zapier) | Documents automations outside the platform |
|
|
53
|
+
| Human Checkpoint | A point where a human makes a decision | Shows where HITL approval gates exist |
|
|
54
|
+
|
|
55
|
+
### Relationships
|
|
56
|
+
|
|
57
|
+
Relationships are edges in the graph. Declare them in `OrganizationResources`:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const org: OrganizationResources = {
|
|
61
|
+
workflows: [scoreLeadWorkflow, sendProposalWorkflow],
|
|
62
|
+
relationships: {
|
|
63
|
+
'score-lead': {
|
|
64
|
+
triggers: {
|
|
65
|
+
workflows: ['send-proposal'],
|
|
66
|
+
},
|
|
67
|
+
uses: {
|
|
68
|
+
integrations: ['attio-integration'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
| Field | Type | Meaning |
|
|
76
|
+
| -------------------- | ---------- | ------------------------------------- |
|
|
77
|
+
| `triggers.workflows` | `string[]` | Workflows this resource starts |
|
|
78
|
+
| `triggers.agents` | `string[]` | Agents this resource starts |
|
|
79
|
+
| `uses.integrations` | `string[]` | Integrations this resource depends on |
|
|
80
|
+
|
|
81
|
+
**Relationships are declarations, not routing.** Declaring that workflow A triggers workflow B does not route A's output to B -- your handler must explicitly invoke B via the `execution` adapter. The graph can drift from reality if declarations don't match code.
|
|
82
|
+
|
|
83
|
+
### What Is Enforced vs Decorative
|
|
84
|
+
|
|
85
|
+
| Category | Validated at Deploy | Matches Runtime | Status |
|
|
86
|
+
| ---------------------------------------- | ---------------------------- | --------------- | -------------- |
|
|
87
|
+
| Resource IDs unique | Yes | Yes | **Enforced** |
|
|
88
|
+
| Input schema matches execution interface | Yes | Yes | **Enforced** |
|
|
89
|
+
| Relationship targets exist | Yes | No | **Decorative** |
|
|
90
|
+
| Trigger routing | No | No | **Decorative** |
|
|
91
|
+
| Tool availability per agent | No | No | **Decorative** |
|
|
92
|
+
| Model config | Yes (provider + model valid) | No | **Decorative** |
|
|
93
|
+
|
|
94
|
+
Keep relationships in sync with your handler code. When you add an `execution.trigger()` call, add the corresponding relationship declaration.
|
|
95
|
+
|
|
96
|
+
### Deploy-Time Validation
|
|
97
|
+
|
|
98
|
+
`elevasis-sdk deploy` and `elevasis-sdk check` both validate:
|
|
99
|
+
|
|
100
|
+
- Duplicate resource IDs
|
|
101
|
+
- Relationship targets must exist in the same `OrganizationResources`
|
|
102
|
+
- Agent model params (provider, model name, temperature bounds)
|
|
103
|
+
- Workflow step chains (`next.target` must point to existing step names)
|
|
104
|
+
|
|
105
|
+
**Validation error examples:**
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
ERROR Relationship target 'send-proposal' not found in organization resources
|
|
109
|
+
ERROR Duplicate resource ID 'score-lead' in organization
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Graph Serialization
|
|
113
|
+
|
|
114
|
+
The platform converts your definitions into `CommandViewNode` (one per resource) and `CommandViewEdge` (one per relationship) structures. `buildEdges()` reads your `relationships` declarations and produces edges as a pure transformation -- no runtime behavior is inferred.
|
|
115
|
+
|
|
116
|
+
> **SDK takeaway:** Declare relationships in `OrganizationResources` to keep the Command View accurate as your system grows. Update declarations whenever you add or remove `execution.trigger()` calls.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Command Queue
|
|
121
|
+
|
|
122
|
+
The Command Queue surfaces all pending Human-in-the-Loop (HITL) approval requests from running workflows.
|
|
123
|
+
|
|
124
|
+
**What you can do here:**
|
|
125
|
+
|
|
126
|
+
- View pending approval requests with context provided by the workflow
|
|
127
|
+
- Filter by resource, status, or date
|
|
128
|
+
- Approve or reject with an optional comment
|
|
129
|
+
- See the history of past decisions
|
|
130
|
+
|
|
131
|
+
**How it connects to your code:** Approval requests appear when a workflow step calls `approval.create()`. The workflow pauses at that step and waits for a decision.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { approval } from '@elevasis/sdk/worker'
|
|
135
|
+
|
|
136
|
+
const task = await approval.create({
|
|
137
|
+
actions: [
|
|
138
|
+
{ id: 'approve', label: 'Approve', type: 'primary' },
|
|
139
|
+
{ id: 'reject', label: 'Reject', type: 'danger' },
|
|
140
|
+
],
|
|
141
|
+
context: { dealId, proposalUrl },
|
|
142
|
+
description: 'Approve proposal before sending',
|
|
143
|
+
})
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
> **SDK takeaway:** Use `approval.create()` to create approval gates. Provide rich `context` so reviewers have what they need to decide.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Knowledge Base
|
|
151
|
+
|
|
152
|
+
The Knowledge Base renders the `docs/` directory of your deployed workspace as browsable documentation.
|
|
153
|
+
|
|
154
|
+
**What you can do here:**
|
|
155
|
+
|
|
156
|
+
- Browse pages you created in `docs/*.mdx`
|
|
157
|
+
- Search across all documentation
|
|
158
|
+
- Share links to specific pages with team members
|
|
159
|
+
|
|
160
|
+
**How it connects to your code:** Every `.mdx` file in your workspace's `docs/` directory is bundled at deploy time and rendered here.
|
|
161
|
+
|
|
162
|
+
> **SDK takeaway:** Write `docs/*.mdx` pages for your team -- business process docs, schema references, usage guides. They appear here automatically after each deploy.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Execution Logs
|
|
167
|
+
|
|
168
|
+
The Execution Logs page shows the history of all executions across every deployed resource.
|
|
169
|
+
|
|
170
|
+
**What you can do here:**
|
|
171
|
+
|
|
172
|
+
- Search and filter by resource, status (completed/failed/running), date range
|
|
173
|
+
- Click any execution to view full detail: input, output, step-level trace, duration
|
|
174
|
+
- Identify failed executions and see error messages with stack traces
|
|
175
|
+
- Navigate from a log entry directly to the resource in Command View
|
|
176
|
+
|
|
177
|
+
**Filtering tips:**
|
|
178
|
+
|
|
179
|
+
- Filter by resource name to debug a specific workflow
|
|
180
|
+
- Filter by `failed` status to triage production issues
|
|
181
|
+
- Use date range to narrow down incidents
|
|
182
|
+
|
|
183
|
+
> **SDK takeaway:** Every `elevasis-sdk exec` and every scheduled run appears here. Use this page to verify behavior after deploy and to diagnose failures before opening code.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Credentials
|
|
188
|
+
|
|
189
|
+
The Credentials page manages encrypted API keys and OAuth tokens used by your workflows at runtime.
|
|
190
|
+
|
|
191
|
+
**What you can do here:**
|
|
192
|
+
|
|
193
|
+
- Create API key and webhook-secret credentials via a form
|
|
194
|
+
- Connect OAuth providers (Notion, Google Sheets, Dropbox) via browser flow
|
|
195
|
+
- View existing credentials (values are never shown after creation)
|
|
196
|
+
- Delete credentials that are no longer needed
|
|
197
|
+
|
|
198
|
+
**Two credential types:**
|
|
199
|
+
|
|
200
|
+
| Type | Created via | Notes |
|
|
201
|
+
| ------------------------ | -------------------------------------------- | ------------------------------------------------------ |
|
|
202
|
+
| API key / webhook secret | CLI (`elevasis-sdk creds create`) or UI form | Either method works |
|
|
203
|
+
| OAuth | UI only | Requires browser redirect -- cannot be created via CLI |
|
|
204
|
+
|
|
205
|
+
> **SDK takeaway:** Reference credentials in your code by name (`credential: 'my-cred-name'`). Create API keys via CLI or UI; OAuth credentials require this page.
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Deployments
|
|
210
|
+
|
|
211
|
+
The Deployments page shows the history of all deployments for your organization.
|
|
212
|
+
|
|
213
|
+
**What you can do here:**
|
|
214
|
+
|
|
215
|
+
- View a chronological list of past deployments
|
|
216
|
+
- See which resources changed in each deployment
|
|
217
|
+
- Identify the currently active version
|
|
218
|
+
- Compare resource counts across deployments
|
|
219
|
+
|
|
220
|
+
**How it connects to your code:** Each `elevasis-sdk deploy` run creates a new deployment entry. The platform activates the new version atomically -- in-flight executions complete against the previous version while new executions start against the new one.
|
|
221
|
+
|
|
222
|
+
> **SDK takeaway:** Check this page after `elevasis-sdk deploy` to confirm your resources are active.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
**Last Updated:** 2026-03-06
|
|
@@ -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 `
|
|
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
|
-
| `
|
|
94
|
-
| `ELEVASIS_API_URL`
|
|
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 `
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
|
|
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_PLATFORM_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_PLATFORM_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_PLATFORM_KEY` via `.env` file:**
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
ELEVASIS_PLATFORM_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
|