@elevasis/sdk 0.5.10 → 0.5.12
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 +249 -280
- package/dist/index.d.ts +3 -4
- package/dist/index.js +5 -29
- package/dist/templates.js +191 -187
- package/dist/worker/index.js +79 -22
- package/package.json +1 -3
- package/reference/_navigation.md +3 -3
- package/reference/cli/index.mdx +51 -45
- package/reference/concepts/index.mdx +2 -2
- package/reference/deployment/api.mdx +8 -8
- package/reference/deployment/command-center-ui.mdx +4 -4
- package/reference/deployment/command-view.mdx +3 -3
- package/reference/deployment/index.mdx +7 -7
- package/reference/framework/agent.mdx +4 -4
- package/reference/framework/documentation.mdx +7 -7
- package/reference/framework/index.mdx +2 -2
- package/reference/framework/memory.mdx +1 -1
- package/reference/framework/project-structure.mdx +20 -30
- package/reference/getting-started/index.mdx +20 -32
- package/reference/index.mdx +6 -5
- package/reference/platform-tools/index.mdx +4 -4
- package/reference/resources/index.mdx +3 -3
- package/reference/resources/patterns.mdx +3 -3
- package/reference/resources/types.mdx +2 -2
- package/reference/roadmap/index.mdx +1 -1
- package/reference/runtime/index.mdx +3 -3
- package/reference/security/credentials.mdx +3 -3
- package/reference/troubleshooting/common-errors.mdx +3 -3
|
@@ -10,7 +10,7 @@ Nothing here requires configuration. The agent reads these files at session star
|
|
|
10
10
|
|
|
11
11
|
## CLAUDE.md
|
|
12
12
|
|
|
13
|
-
`CLAUDE.md` is the project instruction file for Claude Code. It is read at the start of every session and governs all agent behavior. In an Elevasis SDK project, it is generated by `elevasis init` and lives at the project root.
|
|
13
|
+
`CLAUDE.md` is the project instruction file for Claude Code. It is read at the start of every session and governs all agent behavior. In an Elevasis SDK project, it is generated by `elevasis-sdk init` and lives at the project root.
|
|
14
14
|
|
|
15
15
|
The file is instruction-driven by design. Non-technical developers should never need to edit it. When the agent learns a new rule worth preserving -- such as an error pattern that recurs three times -- it promotes that rule into `CLAUDE.md` automatically.
|
|
16
16
|
|
|
@@ -42,7 +42,7 @@ At the start of every session the agent runs these steps silently before respond
|
|
|
42
42
|
|
|
43
43
|
Slash commands are short Markdown instruction files in `.claude/commands/`. When you type `/command-name` in a Claude Code session, the agent reads the corresponding file and follows its instructions.
|
|
44
44
|
|
|
45
|
-
Four commands and one skill are scaffolded by `elevasis init` and committed to version control so collaborators get the same experience:
|
|
45
|
+
Four commands and one skill are scaffolded by `elevasis-sdk init` and committed to version control so collaborators get the same experience:
|
|
46
46
|
|
|
47
47
|
| Command | File | Purpose |
|
|
48
48
|
| --- | --- | --- |
|
|
@@ -57,7 +57,7 @@ The `/creds` skill (`.claude/skills/creds/SKILL.md`) is also scaffolded. It auto
|
|
|
57
57
|
|
|
58
58
|
The `/meta` command namespace manages the full project lifecycle. It has five operations:
|
|
59
59
|
|
|
60
|
-
- **`/meta init`** -- First-run guided setup. Runs after `elevasis init` to install dependencies, configure `.env`, run the competency assessment onboarding flow, seed `memory/profile/`, verify the project, and optionally do a first deploy.
|
|
60
|
+
- **`/meta init`** -- First-run guided setup. Runs after `elevasis-sdk init` to install dependencies, configure `.env`, run the competency assessment onboarding flow, seed `memory/profile/`, verify the project, and optionally do a first deploy.
|
|
61
61
|
- **`/meta`** (no arguments) -- Project health status. Shows current template version, SDK version, profile summary, a quick drift check, and last deployment status.
|
|
62
62
|
- **`/meta fix`** -- SDK upgrade check and drift repair. Step 0 offers to run `pnpm update @elevasis/sdk` and merge template changes. Steps 1-8 repair drift: missing managed files, gitignore entries, CLAUDE.md sections, memory structure, doc cross-references, settings, rules health, and project map freshness.
|
|
63
63
|
- **`/meta deploy`** -- Full 9-step deploy pipeline: validate, type-check, verify docs, commit, deploy (auto-regenerates `docs/project-map.mdx`), verify platform, update deployment state, and optionally push.
|
|
@@ -132,7 +132,7 @@ Six rule files are scaffolded in `.claude/rules/`. Rule files are auto-injected
|
|
|
132
132
|
| `task-tracking.md` | MANAGED | Any file in `docs/in-progress/` | `/work` command, task doc format, status values |
|
|
133
133
|
| `workspace-patterns.md` | INIT_ONLY | Any file in the project | Project-specific patterns (starts empty, grows via error promotion) |
|
|
134
134
|
|
|
135
|
-
MANAGED rules are updated by `elevasis update` when the SDK ships a new version. `workspace-patterns.md` is INIT_ONLY -- it belongs to the project and is never overwritten. When an error recurs 3+ times, the agent promotes a fix into this file so future sessions learn from past mistakes.
|
|
135
|
+
MANAGED rules are updated by `elevasis-sdk update` when the SDK ships a new version. `workspace-patterns.md` is INIT_ONLY -- it belongs to the project and is never overwritten. When an error recurs 3+ times, the agent promotes a fix into this file so future sessions learn from past mistakes.
|
|
136
136
|
|
|
137
137
|
## Interaction Guidance
|
|
138
138
|
|
|
@@ -4,11 +4,11 @@ description: Write and deploy MDX documentation alongside your Elevasis resource
|
|
|
4
4
|
loadWhen: "Writing or updating project documentation"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
`elevasis deploy` ships your code and your documentation atomically -- one command, no version drift. Documentation files live in a `docs/` directory at your project root and render in the Elevasis platform UI for operators using your resources.
|
|
7
|
+
`elevasis-sdk deploy` ships your code and your documentation atomically -- one command, no version drift. Documentation files live in a `docs/` directory at your project root and render in the Elevasis platform UI for operators using your resources.
|
|
8
8
|
|
|
9
9
|
## Directory Structure
|
|
10
10
|
|
|
11
|
-
Create `.mdx` files inside a `docs/` directory at your project root. `elevasis init` scaffolds a starter structure:
|
|
11
|
+
Create `.mdx` files inside a `docs/` directory at your project root. `elevasis-sdk init` scaffolds a starter structure:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
my-project/
|
|
@@ -50,7 +50,7 @@ These limits are enforced by the CLI before the deploy request is sent. Validati
|
|
|
50
50
|
|
|
51
51
|
## Starter Template
|
|
52
52
|
|
|
53
|
-
`elevasis init` writes this starter file to `docs/index.mdx`:
|
|
53
|
+
`elevasis-sdk init` writes this starter file to `docs/index.mdx`:
|
|
54
54
|
|
|
55
55
|
```mdx
|
|
56
56
|
---
|
|
@@ -70,15 +70,15 @@ code and rendered in the Elevasis platform UI.
|
|
|
70
70
|
## Getting Started
|
|
71
71
|
|
|
72
72
|
\`\`\`bash
|
|
73
|
-
elevasis check # Validate resources
|
|
74
|
-
elevasis deploy # Deploy to platform
|
|
75
|
-
elevasis exec <resourceId> --input '{"key": "value"}'
|
|
73
|
+
elevasis-sdk check # Validate resources
|
|
74
|
+
elevasis-sdk deploy # Deploy to platform
|
|
75
|
+
elevasis-sdk exec <resourceId> --input '{"key": "value"}'
|
|
76
76
|
\`\`\`
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
## Deploy Behavior
|
|
80
80
|
|
|
81
|
-
When you run `elevasis deploy`:
|
|
81
|
+
When you run `elevasis-sdk deploy`:
|
|
82
82
|
|
|
83
83
|
1. The CLI scans `docs/` recursively for `.mdx` files
|
|
84
84
|
2. Each file's frontmatter (title, description, order) is parsed and stripped from the content
|
|
@@ -4,13 +4,13 @@ description: The SDK scaffolds a complete development environment for Claude Cod
|
|
|
4
4
|
loadWhen: "Understanding the agent framework structure"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
`elevasis init` scaffolds more than code. It builds a development environment designed around Claude Code as the primary interface. Most external SDK developers are non-technical -- they write workflows through conversation, not by reading API docs. The framework gives the agent everything it needs to guide those users effectively from the first session onward.
|
|
7
|
+
`elevasis-sdk init` scaffolds more than code. It builds a development environment designed around Claude Code as the primary interface. Most external SDK developers are non-technical -- they write workflows through conversation, not by reading API docs. The framework gives the agent everything it needs to guide those users effectively from the first session onward.
|
|
8
8
|
|
|
9
9
|
The framework lives entirely in `.claude/`. It is never deployed and never touches the `docs/` directory, which ships to the platform.
|
|
10
10
|
|
|
11
11
|
## What Gets Scaffolded
|
|
12
12
|
|
|
13
|
-
Running `elevasis init my-project` produces the following agent infrastructure alongside your source files:
|
|
13
|
+
Running `elevasis-sdk init my-project` produces the following agent infrastructure alongside your source files:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
.claude/
|
|
@@ -260,7 +260,7 @@ Runtime errors include the resource name since the same error in different resou
|
|
|
260
260
|
|
|
261
261
|
| Last Seen | Resource | Error | Resolution | Occurrences |
|
|
262
262
|
| --- | --- | --- | --- | --- |
|
|
263
|
-
| 2026-02-26 | lead-scorer | `PlatformToolError: credential not found` | Set credential via `elevasis env set` | 1 |
|
|
263
|
+
| 2026-02-26 | lead-scorer | `PlatformToolError: credential not found` | Set credential via `elevasis-sdk env set` | 1 |
|
|
264
264
|
```
|
|
265
265
|
|
|
266
266
|
### Error Resolution Flow
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Project Structure
|
|
3
|
-
description: Each file scaffolded by elevasis init and its purpose in the development workflow
|
|
3
|
+
description: Each file scaffolded by elevasis-sdk init and its purpose in the development workflow
|
|
4
4
|
loadWhen: "Understanding scaffolded files or project layout"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
`elevasis init` creates a complete workspace structure. This page explains what each file does and when you will interact with it.
|
|
7
|
+
`elevasis-sdk init` creates a complete workspace structure. This page explains what each file does and when you will interact with it.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
} satisfies ElevasConfig
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Leave this file minimal -- the platform provides sensible defaults. Do not remove `templateVersion`; it is read by `elevasis update` to determine which template changes need to be applied to your project.
|
|
63
|
+
Leave this file minimal -- the platform provides sensible defaults. Do not remove `templateVersion`; it is read by `elevasis-sdk update` to determine which template changes need to be applied to your project.
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ Leave this file minimal -- the platform provides sensible defaults. Do not remov
|
|
|
68
68
|
|
|
69
69
|
### `docs/index.mdx`
|
|
70
70
|
|
|
71
|
-
The entry point for your workspace's documentation. Documentation files in `docs/` are deployed alongside your code during `elevasis deploy` and rendered in the Elevasis platform UI.
|
|
71
|
+
The entry point for your workspace's documentation. Documentation files in `docs/` are deployed alongside your code during `elevasis-sdk deploy` and rendered in the Elevasis platform UI.
|
|
72
72
|
|
|
73
73
|
Use MDX frontmatter to set page metadata:
|
|
74
74
|
|
|
@@ -84,7 +84,7 @@ Add more pages by creating additional `.mdx` files in `docs/`. Nested directorie
|
|
|
84
84
|
|
|
85
85
|
### `docs/project-map.mdx`
|
|
86
86
|
|
|
87
|
-
Auto-generated by `elevasis deploy` on every deploy and by `/meta fix` step 8. Contains a full project snapshot: organization, SDK version, template version, last deploy date, source domains, resource tables (workflows and agents), documentation index, SDK reference summary, commands/rules/skills, memory system listing, and configuration state. The agent reads this file at session start for project orientation.
|
|
87
|
+
Auto-generated by `elevasis-sdk deploy` on every deploy and by `/meta fix` step 8. Contains a full project snapshot: organization, SDK version, template version, last deploy date, source domains, resource tables (workflows and agents), documentation index, SDK reference summary, commands/rules/skills, memory system listing, and configuration state. The agent reads this file at session start for project orientation.
|
|
88
88
|
|
|
89
89
|
This file is fully auto-generated -- do not edit manually. Changes are overwritten on the next deploy.
|
|
90
90
|
|
|
@@ -98,22 +98,22 @@ This file is NOT scaffolded by default. The agent creates it the first time you
|
|
|
98
98
|
|
|
99
99
|
Work-in-progress task documents created by `/work create`. Each file represents an active work item with objective, plan, progress markers, and resume context. `/work complete` moves finished items to their permanent location in `docs/`.
|
|
100
100
|
|
|
101
|
-
This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis deploy`.
|
|
101
|
+
This directory is NOT deployed -- it is filtered out during the doc scan in `elevasis-sdk deploy`.
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
|
105
105
|
## Progressive Disclosure Directories
|
|
106
106
|
|
|
107
|
-
Only `src/` and `docs/` are scaffolded by `elevasis init`. The following directories are NOT created by default -- they appear when a specific need arises:
|
|
107
|
+
Only `src/` and `docs/` are scaffolded by `elevasis-sdk init`. The following directories are NOT created by default -- they appear when a specific need arises:
|
|
108
108
|
|
|
109
109
|
| Directory | Created by | When |
|
|
110
110
|
|-----------|-----------|------|
|
|
111
|
-
| `src/operations/` | `elevasis init` (default) | Always -- platform-status workflow lives here |
|
|
112
|
-
| `src/example/` | `elevasis init` (default) | Always -- echo starter workflow lives here (replace with your own) |
|
|
113
|
-
| `src/shared/` | `elevasis init` (default) | Always -- cross-domain shared utilities (starts empty) |
|
|
114
|
-
| `docs/` | `elevasis init` (default) | Always |
|
|
111
|
+
| `src/operations/` | `elevasis-sdk init` (default) | Always -- platform-status workflow lives here |
|
|
112
|
+
| `src/example/` | `elevasis-sdk init` (default) | Always -- echo starter workflow lives here (replace with your own) |
|
|
113
|
+
| `src/shared/` | `elevasis-sdk init` (default) | Always -- cross-domain shared utilities (starts empty) |
|
|
114
|
+
| `docs/` | `elevasis-sdk init` (default) | Always |
|
|
115
115
|
| `docs/in-progress/` | Agent (on first `/work create`) | When you create a task doc for in-progress work |
|
|
116
|
-
| `docs/project-map.mdx` | `elevasis deploy` | Auto-generated on every deploy |
|
|
116
|
+
| `docs/project-map.mdx` | `elevasis-sdk deploy` | Auto-generated on every deploy |
|
|
117
117
|
| `docs/priorities.mdx` | Agent (on first goal discussion) | When you discuss project goals or priorities |
|
|
118
118
|
| `data/` | Agent (on demand) | When you connect a database |
|
|
119
119
|
| `scripts/` | Agent (on demand) | When you need local scripts not deployed to the platform |
|
|
@@ -135,9 +135,9 @@ Local utility scripts for tasks that do not run on the platform: database seeds,
|
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
|
-
## `elevasis deploy` Scope
|
|
138
|
+
## `elevasis-sdk deploy` Scope
|
|
139
139
|
|
|
140
|
-
`elevasis deploy` touches only two directories:
|
|
140
|
+
`elevasis-sdk deploy` touches only two directories:
|
|
141
141
|
|
|
142
142
|
| Directory | Action | Deployed? |
|
|
143
143
|
|-----------|--------|-----------|
|
|
@@ -156,16 +156,6 @@ Local utility scripts for tasks that do not run on the platform: database seeds,
|
|
|
156
156
|
|
|
157
157
|
Contains your `ELEVASIS_API_KEY`. This file is gitignored. Never commit it.
|
|
158
158
|
|
|
159
|
-
### `.env.example`
|
|
160
|
-
|
|
161
|
-
A git-safe template showing which variables are needed:
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
ELEVASIS_API_KEY=sk_your_key_here
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Commit this file so collaborators know what to configure.
|
|
168
|
-
|
|
169
159
|
### `.npmrc`
|
|
170
160
|
|
|
171
161
|
Sets `auto-install-peers = true`. The SDK uses Zod as a peer dependency, so this ensures Zod installs automatically.
|
|
@@ -269,23 +259,23 @@ A 7-lesson guided learning path adapted to the user's skill profile. Lessons cov
|
|
|
269
259
|
|
|
270
260
|
Not all scaffolded files participate in template updates. Files fall into two categories:
|
|
271
261
|
|
|
272
|
-
**SCAFFOLD_FILES total:
|
|
262
|
+
**SCAFFOLD_FILES total: 29**
|
|
273
263
|
|
|
274
|
-
**INIT_ONLY** (
|
|
264
|
+
**INIT_ONLY** (14 files) -- Written once during `elevasis-sdk init`, never updated by `elevasis-sdk update`:
|
|
275
265
|
- `package.json`, `pnpm-workspace.yaml`, `tsconfig.json`
|
|
276
|
-
- `.env`, `.
|
|
266
|
+
- `.env`, `.npmrc`
|
|
277
267
|
- `src/index.ts`, `src/operations/platform-status.ts`, `src/operations/index.ts`, `src/example/echo.ts`, `src/example/index.ts`, `src/shared/.gitkeep`
|
|
278
268
|
- `docs/index.mdx`, `docs/in-progress/.gitkeep`
|
|
279
269
|
- `.claude/rules/workspace-patterns.md`
|
|
280
270
|
|
|
281
|
-
**MANAGED** (15 files) -- Written during `elevasis init` and checked/updatable by `elevasis update`:
|
|
271
|
+
**MANAGED** (15 files) -- Written during `elevasis-sdk init` and checked/updatable by `elevasis-sdk update`:
|
|
282
272
|
- `elevasis.config.ts`, `.gitignore`, `CLAUDE.md`, `.claude/settings.json`
|
|
283
273
|
- One hook: `.claude/hooks/enforce-sdk-boundary.mjs`
|
|
284
274
|
- Four command files: `.claude/commands/meta.md`, `.claude/commands/docs.md`, `.claude/commands/tutorial.md`, `.claude/commands/work.md`
|
|
285
275
|
- One skill: `.claude/skills/creds/SKILL.md`
|
|
286
276
|
- Five rule files: `.claude/rules/sdk-patterns.md`, `.claude/rules/docs-authoring.md`, `.claude/rules/memory-conventions.md`, `.claude/rules/project-map.md`, `.claude/rules/task-tracking.md`
|
|
287
277
|
|
|
288
|
-
Run `elevasis update` after installing a new SDK version to bring managed files up to date. The command adds missing files directly and flags files that differ from the new template for agent-assisted review via `/meta fix`.
|
|
278
|
+
Run `elevasis-sdk update` after installing a new SDK version to bring managed files up to date. The command adds missing files directly and flags files that differ from the new template for agent-assisted review via `/meta fix`.
|
|
289
279
|
|
|
290
280
|
---
|
|
291
281
|
|
|
@@ -296,7 +286,7 @@ Run `elevasis update` after installing a new SDK version to bring managed files
|
|
|
296
286
|
| `src/index.ts` | Adding or removing resources (the `/resource` command does this automatically) |
|
|
297
287
|
| `src/<domain>/*.ts` | Writing and modifying workflow logic (organized by business domain) |
|
|
298
288
|
| `docs/index.mdx` | Updating project documentation |
|
|
299
|
-
| `docs/project-map.mdx` | Never -- auto-generated by `elevasis deploy` |
|
|
289
|
+
| `docs/project-map.mdx` | Never -- auto-generated by `elevasis-sdk deploy` |
|
|
300
290
|
| `docs/priorities.mdx` | When goals or priorities change |
|
|
301
291
|
| `elevasis.config.ts` | Changing project-level settings |
|
|
302
292
|
| `.env` | Adding environment variables |
|
|
@@ -4,32 +4,21 @@ description: Install the Elevasis SDK, scaffold a project, and run your first de
|
|
|
4
4
|
loadWhen: "Setting up a new project or onboarding"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Prerequisites:** Node.js 20+ and pnpm (`npm install -g pnpm`).
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Create a Project
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Scaffold a new project and install dependencies:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
|
|
15
|
-
# or
|
|
16
|
-
pnpm add @elevasis/sdk zod
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
The `.npmrc` file scaffolded by `elevasis init` sets `auto-install-peers = true`, so peer dependencies are handled automatically on subsequent installs.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Scaffold a Project
|
|
24
|
-
|
|
25
|
-
Run `elevasis init` to create a new project directory with all required files:
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
elevasis init my-project
|
|
14
|
+
pnpm dlx @elevasis/sdk init my-project
|
|
29
15
|
cd my-project
|
|
16
|
+
pnpm install
|
|
30
17
|
```
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
`pnpm dlx` downloads the SDK temporarily to run `elevasis-sdk init`, which scaffolds your project with a working echo workflow, TypeScript config, and Claude Code integration. `pnpm install` then installs the SDK and its dependencies locally -- after that, all `elevasis-sdk` commands work directly via the scripts in `package.json` or `pnpm exec elevasis-sdk <command>`.
|
|
20
|
+
|
|
21
|
+
The command scaffolds 28 files covering configuration, source, documentation, and Claude Code integration:
|
|
33
22
|
|
|
34
23
|
```
|
|
35
24
|
my-project/
|
|
@@ -69,12 +58,11 @@ my-project/
|
|
|
69
58
|
├── tsconfig.json # TypeScript config (app-focused)
|
|
70
59
|
├── pnpm-workspace.yaml # Standalone project workspace
|
|
71
60
|
├── .env # API key only
|
|
72
|
-
├── .env.example # Git-safe template
|
|
73
61
|
├── .npmrc # auto-install-peers
|
|
74
62
|
└── .gitignore # Excludes worker temp file, claude files
|
|
75
63
|
```
|
|
76
64
|
|
|
77
|
-
The scaffolded `elevasis.config.ts` includes a `templateVersion` field that tracks which template generation your project uses. Leave it as-is -- it is managed automatically by `elevasis update`:
|
|
65
|
+
The scaffolded `elevasis.config.ts` includes a `templateVersion` field that tracks which template generation your project uses. Leave it as-is -- it is managed automatically by `elevasis-sdk update`:
|
|
78
66
|
|
|
79
67
|
```ts
|
|
80
68
|
import type { ElevasConfig } from '@elevasis/sdk'
|
|
@@ -92,7 +80,7 @@ Open `.env` and set your API key:
|
|
|
92
80
|
ELEVASIS_API_KEY=sk_your_key_here
|
|
93
81
|
```
|
|
94
82
|
|
|
95
|
-
The `.env
|
|
83
|
+
The `.env` file is gitignored -- never commit it.
|
|
96
84
|
|
|
97
85
|
**Note:** Do not add `NODE_ENV` to your `.env`. The SDK treats `undefined` as production by default, which means your project connects to the hosted Elevasis API. Adding `NODE_ENV=development` is the most common setup mistake.
|
|
98
86
|
|
|
@@ -109,19 +97,19 @@ If the automatic setup doesn't trigger, you can start it manually with `/meta in
|
|
|
109
97
|
Validate your resources and deploy:
|
|
110
98
|
|
|
111
99
|
```bash
|
|
112
|
-
elevasis check # Validate resource definitions
|
|
113
|
-
elevasis deploy # Bundle and deploy to the platform
|
|
100
|
+
elevasis-sdk check # Validate resource definitions
|
|
101
|
+
elevasis-sdk deploy # Bundle and deploy to the platform
|
|
114
102
|
```
|
|
115
103
|
|
|
116
|
-
`elevasis check` runs validation without deploying. Fix any errors it reports before running `elevasis deploy`.
|
|
104
|
+
`elevasis-sdk check` runs validation without deploying. Fix any errors it reports before running `elevasis-sdk deploy`.
|
|
117
105
|
|
|
118
|
-
`elevasis deploy` bundles your `src/` code and `docs/` documentation into a single deployment transaction. Both ship atomically -- there is no separate upload step for documentation.
|
|
106
|
+
`elevasis-sdk deploy` bundles your `src/` code and `docs/` documentation into a single deployment transaction. Both ship atomically -- there is no separate upload step for documentation.
|
|
119
107
|
|
|
120
108
|
After a successful deploy, confirm the resources are live:
|
|
121
109
|
|
|
122
110
|
```bash
|
|
123
|
-
elevasis resources # List deployed resources
|
|
124
|
-
elevasis deployments # Show deployment history
|
|
111
|
+
elevasis-sdk resources # List deployed resources
|
|
112
|
+
elevasis-sdk deployments # Show deployment history
|
|
125
113
|
```
|
|
126
114
|
|
|
127
115
|
---
|
|
@@ -131,14 +119,14 @@ elevasis deployments # Show deployment history
|
|
|
131
119
|
Execute the scaffolded echo workflow to verify end-to-end connectivity:
|
|
132
120
|
|
|
133
121
|
```bash
|
|
134
|
-
elevasis exec echo --input '{"message": "hello"}'
|
|
122
|
+
elevasis-sdk exec echo --input '{"message": "hello"}'
|
|
135
123
|
```
|
|
136
124
|
|
|
137
125
|
View the execution result:
|
|
138
126
|
|
|
139
127
|
```bash
|
|
140
|
-
elevasis executions echo # Execution history
|
|
141
|
-
elevasis execution echo \<execution-id\> # Full detail for one execution
|
|
128
|
+
elevasis-sdk executions echo # Execution history
|
|
129
|
+
elevasis-sdk execution echo \<execution-id\> # Full detail for one execution
|
|
142
130
|
```
|
|
143
131
|
|
|
144
132
|
Replace `<execution-id>` with the ID returned from the executions list.
|
|
@@ -153,7 +141,7 @@ Replace `<execution-id>` with the ID returned from the executions list.
|
|
|
153
141
|
- [CLI Reference](../cli/index.mdx) -- Full command reference with flags
|
|
154
142
|
- [Deployment](../deployment/index.mdx) -- Deployment lifecycle and environment variables
|
|
155
143
|
|
|
156
|
-
When a new SDK version is released, run `/meta fix` in Claude Code for an interactive upgrade that includes SDK update, drift repair, and documentation verification. Alternatively, run `elevasis update` from the terminal to update managed files (CLAUDE.md, slash commands, `.gitignore`) without agent interaction.
|
|
144
|
+
When a new SDK version is released, run `/meta fix` in Claude Code for an interactive upgrade that includes SDK update, drift repair, and documentation verification. Alternatively, run `elevasis-sdk update` from the terminal to update managed files (CLAUDE.md, slash commands, `.gitignore`) without agent interaction. To update the SDK package itself, run `pnpm update @elevasis/sdk`.
|
|
157
145
|
|
|
158
146
|
---
|
|
159
147
|
|
package/reference/index.mdx
CHANGED
|
@@ -9,12 +9,13 @@ loadWhen: "First session or new to the SDK"
|
|
|
9
9
|
## Quick Start
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
pnpm dlx @elevasis/sdk init my-project
|
|
13
|
+
cd my-project
|
|
14
|
+
pnpm install
|
|
15
|
+
elevasis-sdk deploy
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
After `elevasis init`, your project is scaffolded with a working echo workflow, config file, TypeScript setup, and a `CLAUDE.md` that gives Claude Code full awareness of the SDK. After `elevasis deploy`, your resources appear in AI Studio and are available to run immediately.
|
|
18
|
+
After `pnpm dlx @elevasis/sdk init`, your project is scaffolded with a working echo workflow, config file, TypeScript setup, and a `CLAUDE.md` that gives Claude Code full awareness of the SDK. After `elevasis-sdk deploy`, your resources appear in AI Studio and are available to run immediately.
|
|
18
19
|
|
|
19
20
|
Here is a minimal workflow definition:
|
|
20
21
|
|
|
@@ -77,7 +78,7 @@ See [Platform Tools](platform-tools/index.mdx) for the full catalog.
|
|
|
77
78
|
## Known Limitations
|
|
78
79
|
|
|
79
80
|
- **No streaming logs** -- Execution logs are returned in the response body after completion. Real-time log streaming is not available.
|
|
80
|
-
- **Agent HTTP timeouts** -- Use `elevasis exec --async` for agent executions. Agents can run for minutes; the synchronous endpoint will time out for long-running runs. The `--async` flag returns an execution ID immediately and polls for the result.
|
|
81
|
+
- **Agent HTTP timeouts** -- Use `elevasis-sdk exec --async` for agent executions. Agents can run for minutes; the synchronous endpoint will time out for long-running runs. The `--async` flag returns an execution ID immediately and polls for the result.
|
|
81
82
|
|
|
82
83
|
## Documentation
|
|
83
84
|
|
|
@@ -136,12 +136,12 @@ The invoked resource must belong to the same organization. The `organizationId`
|
|
|
136
136
|
|
|
137
137
|
## Managing Environment Variables
|
|
138
138
|
|
|
139
|
-
Use the `elevasis env` CLI to manage environment variables for your deployed workers:
|
|
139
|
+
Use the `elevasis-sdk env` CLI to manage environment variables for your deployed workers:
|
|
140
140
|
|
|
141
141
|
```bash
|
|
142
|
-
elevasis env list
|
|
143
|
-
elevasis env set KEY value
|
|
144
|
-
elevasis env remove KEY
|
|
142
|
+
elevasis-sdk env list
|
|
143
|
+
elevasis-sdk env set KEY value
|
|
144
|
+
elevasis-sdk env remove KEY
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
Environment variables set this way are injected into your worker process at startup and are available via `process.env`.
|
|
@@ -266,7 +266,7 @@ const myStep: StepHandler = async (input, context) => {
|
|
|
266
266
|
|
|
267
267
|
Agents are autonomous resources that use an LLM and tools to complete a goal. You define them with `AgentDefinition`.
|
|
268
268
|
|
|
269
|
-
**Note:** Use `elevasis exec --async` when executing agents. Agents can run for minutes or longer, and the synchronous execute endpoint will time out for long-running runs. The `--async` flag returns an execution ID immediately and polls for the result.
|
|
269
|
+
**Note:** Use `elevasis-sdk exec --async` when executing agents. Agents can run for minutes or longer, and the synchronous execute endpoint will time out for long-running runs. The `--async` flag returns an execution ID immediately and polls for the result.
|
|
270
270
|
|
|
271
271
|
```typescript
|
|
272
272
|
import type { AgentDefinition } from '@elevasis/sdk';
|
|
@@ -308,13 +308,13 @@ const org: OrganizationResources = {
|
|
|
308
308
|
export default org;
|
|
309
309
|
```
|
|
310
310
|
|
|
311
|
-
The keys under `workflows` and `agents` are used as resource identifiers on the platform. They appear in CLI output (`elevasis resources`), execution commands (`elevasis exec`), and the dashboard.
|
|
311
|
+
The keys under `workflows` and `agents` are used as resource identifiers on the platform. They appear in CLI output (`elevasis-sdk resources`), execution commands (`elevasis-sdk exec`), and the dashboard.
|
|
312
312
|
|
|
313
313
|
### Resource Status
|
|
314
314
|
|
|
315
315
|
Set `config.status` to control whether the platform accepts execution requests:
|
|
316
316
|
|
|
317
|
-
- `'dev'` - Resource is visible in the dashboard but the platform will not route scheduled or webhook-triggered executions to it. You can still trigger it manually via `elevasis exec`.
|
|
317
|
+
- `'dev'` - Resource is visible in the dashboard but the platform will not route scheduled or webhook-triggered executions to it. You can still trigger it manually via `elevasis-sdk exec`.
|
|
318
318
|
- `'production'` - Resource is live and accepts all execution sources.
|
|
319
319
|
|
|
320
320
|
Use `'dev'` while you are building and testing. Switch to `'production'` when you are ready to go live.
|
|
@@ -131,7 +131,7 @@ const sendEmailStep: WorkflowStep = {
|
|
|
131
131
|
**Key points:**
|
|
132
132
|
|
|
133
133
|
- `platform.call()` is async and times out after 60 seconds
|
|
134
|
-
- `credential` is the name of a platform environment variable set via `elevasis env set`
|
|
134
|
+
- `credential` is the name of a platform environment variable set via `elevasis-sdk env set`
|
|
135
135
|
- On failure, `platform.call()` throws `PlatformToolError` (not `ToolingError`)
|
|
136
136
|
- Always log success so executions are easy to debug in the dashboard
|
|
137
137
|
|
|
@@ -274,8 +274,8 @@ const myWorkflow: WorkflowDefinition = {
|
|
|
274
274
|
|
|
275
275
|
Dev resources:
|
|
276
276
|
|
|
277
|
-
- Appear in `elevasis resources` output
|
|
278
|
-
- Can be triggered with `elevasis exec my-workflow --input '{...}'`
|
|
277
|
+
- Appear in `elevasis-sdk resources` output
|
|
278
|
+
- Can be triggered with `elevasis-sdk exec my-workflow --input '{...}'`
|
|
279
279
|
- Will NOT receive scheduled or webhook-triggered executions
|
|
280
280
|
- Will NOT appear as available to external callers
|
|
281
281
|
|
|
@@ -6,8 +6,8 @@ loadWhen: "Looking up type signatures or SDK exports"
|
|
|
6
6
|
|
|
7
7
|
`@elevasis/sdk` is published to the public npm registry. It bundles all platform types from `@repo/core` into a single self-contained type declaration file with zero internal monorepo references. External developers install the package and get full TypeScript support without any monorepo tooling.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @elevasis/sdk zod
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Zod is a peer dependency and must be installed separately.
|
|
@@ -108,7 +108,7 @@ Metrics are aggregated at multiple levels:
|
|
|
108
108
|
- **Per-execution:** Total AI spend and total duration
|
|
109
109
|
- **Per-resource:** Aggregated over configurable time periods (daily, weekly, monthly)
|
|
110
110
|
- **Per-organization:** Total platform cost (execution time + AI spend + managed hosting compute)
|
|
111
|
-
- **Visibility:** Platform dashboard and the CLI via `elevasis executions <resourceId>`
|
|
111
|
+
- **Visibility:** Platform dashboard and the CLI via `elevasis-sdk executions <resourceId>`
|
|
112
112
|
|
|
113
113
|
### Developer-Defined Metrics
|
|
114
114
|
|
|
@@ -59,7 +59,7 @@ Cancellation is initiated by the platform and requires no special code in your h
|
|
|
59
59
|
Errors are displayed depending on the surface you use to inspect them:
|
|
60
60
|
|
|
61
61
|
- **AI Studio:** Shows the error message and execution status. Example: `Remote resource 'onboard-client' failed: Email delivery failed: invalid address`
|
|
62
|
-
- **CLI (`elevasis execution <resourceId> <id>`):** Shows full execution detail including the error message. The `--json` flag includes an `error` field in structured output.
|
|
62
|
+
- **CLI (`elevasis-sdk execution <resourceId> <id>`):** Shows full execution detail including the error message. The `--json` flag includes an `error` field in structured output.
|
|
63
63
|
- **Error message source:** The error string comes directly from your handler's catch block (`String(err)`). The platform stores this verbatim and displays it as-is. Write descriptive error messages in your handlers -- they surface directly to users.
|
|
64
64
|
|
|
65
65
|
### What Causes a Failed Execution
|
|
@@ -92,7 +92,7 @@ Logs are delivered to the platform atomically with the execution result:
|
|
|
92
92
|
|
|
93
93
|
- **Retention:** 30 days by default (configurable per plan).
|
|
94
94
|
- **Real-time fanout:** After execution completes, logs are stored and fanned out to AI Studio and CLI subscribers. AI Studio shows them in the execution detail view.
|
|
95
|
-
- **CLI access:** Use `elevasis execution <resourceId> <id>` to view execution details including logs.
|
|
95
|
+
- **CLI access:** Use `elevasis-sdk execution <resourceId> <id>` to view execution details including logs.
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
@@ -114,7 +114,7 @@ v1 versioning is intentionally simple:
|
|
|
114
114
|
|
|
115
115
|
### Deletion
|
|
116
116
|
|
|
117
|
-
- **Via CLI:** Remove the resource from your `OrganizationResources` export and run `elevasis deploy`. Resources absent from the new bundle are automatically deregistered from the platform.
|
|
117
|
+
- **Via CLI:** Remove the resource from your `OrganizationResources` export and run `elevasis-sdk deploy`. Resources absent from the new bundle are automatically deregistered from the platform.
|
|
118
118
|
- **Via AI Studio:** The delete button unregisters the resource immediately and marks the deployment stopped.
|
|
119
119
|
- **In-flight executions:** Workers already running complete normally. Deletion affects only new execution attempts.
|
|
120
120
|
- **Data retention:** Execution logs and history for a deleted resource are retained for 30 days, then purged.
|
|
@@ -115,7 +115,7 @@ Credential names are case-sensitive. A mismatch causes a `PlatformToolError` wit
|
|
|
115
115
|
ELEVASIS_API_KEY=sk_your_key_here
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
This key authenticates CLI operations (`elevasis deploy`, `elevasis check`, `elevasis exec`). It is never uploaded to the platform and never injected into workers.
|
|
118
|
+
This key authenticates CLI operations (`elevasis-sdk deploy`, `elevasis-sdk check`, `elevasis-sdk exec`). It is never uploaded to the platform and never injected into workers.
|
|
119
119
|
|
|
120
120
|
Do not put integration API keys in `.env`. They will not be available inside workflows.
|
|
121
121
|
|
|
@@ -132,9 +132,9 @@ Do not put integration API keys in `.env`. They will not be available inside wor
|
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
|
|
135
|
-
## Migrating from elevasis env
|
|
135
|
+
## Migrating from elevasis-sdk env
|
|
136
136
|
|
|
137
|
-
If you previously set integration credentials via `elevasis env set`, that command no longer exists. Use `elevasis env list` to see what was set, then recreate each entry as a platform credential in the command center. Update workflow code from `process.env.KEY` to `platform.call({ tool: 'http', credential: '...', ... })` or `platform.getCredential('...')`, then redeploy. The `.env` file remains but is scoped to `ELEVASIS_API_KEY` only.
|
|
137
|
+
If you previously set integration credentials via `elevasis-sdk env set`, that command no longer exists. Use `elevasis-sdk env list` to see what was set, then recreate each entry as a platform credential in the command center. Update workflow code from `process.env.KEY` to `platform.call({ tool: 'http', credential: '...', ... })` or `platform.getCredential('...')`, then redeploy. The `.env` file remains but is scoped to `ELEVASIS_API_KEY` only.
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
@@ -18,7 +18,7 @@ This is the static SDK-level error catalog. Check `.claude/memory/errors/` first
|
|
|
18
18
|
1. Check that `.env` exists in the workspace root
|
|
19
19
|
2. Confirm it contains `ELEVASIS_API_KEY=sk_...`
|
|
20
20
|
3. Make sure you are running the CLI from the workspace directory (where `.env` is located)
|
|
21
|
-
4. If the file exists with the right content, run `elevasis check` again
|
|
21
|
+
4. If the file exists with the right content, run `elevasis-sdk check` again
|
|
22
22
|
|
|
23
23
|
### Cannot connect to API
|
|
24
24
|
|
|
@@ -37,7 +37,7 @@ This is the static SDK-level error catalog. Check `.claude/memory/errors/` first
|
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
|
-
## Validation Errors (elevasis check)
|
|
40
|
+
## Validation Errors (elevasis-sdk check)
|
|
41
41
|
|
|
42
42
|
### Duplicate resource ID
|
|
43
43
|
|
|
@@ -187,7 +187,7 @@ This is the static SDK-level error catalog. Check `.claude/memory/errors/` first
|
|
|
187
187
|
**Cause:** An import in your workflow bundle cannot be resolved.
|
|
188
188
|
|
|
189
189
|
**Fix:**
|
|
190
|
-
1. Run `elevasis check` -- it catches most resolution errors before deploy
|
|
190
|
+
1. Run `elevasis-sdk check` -- it catches most resolution errors before deploy
|
|
191
191
|
2. If the import is a built-in Node.js module, ensure it is compatible with the worker environment
|
|
192
192
|
3. Avoid imports that require file system access or native modules
|
|
193
193
|
|