@elevasis/sdk 0.5.13 → 0.5.15
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 +745 -409
- package/dist/index.d.ts +32 -0
- package/dist/index.js +68 -0
- package/dist/templates.js +254 -37
- package/dist/worker/index.js +3 -7
- package/package.json +1 -1
- package/reference/cli.mdx +568 -505
- package/reference/concepts.mdx +4 -43
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +9 -12
- package/reference/deployment/index.mdx +7 -7
- package/reference/framework/agent.mdx +6 -18
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +3 -24
- package/reference/framework/project-structure.mdx +277 -298
- package/reference/framework/tutorial-system.mdx +13 -44
- package/reference/getting-started.mdx +152 -148
- package/reference/index.mdx +28 -14
- package/reference/platform-tools/adapters.mdx +868 -1072
- package/reference/platform-tools/index.mdx +3 -3
- package/reference/resources/index.mdx +339 -341
- package/reference/resources/patterns.mdx +355 -354
- package/reference/resources/types.mdx +207 -207
- package/reference/roadmap.mdx +163 -147
- package/reference/runtime.mdx +2 -25
- package/reference/troubleshooting.mdx +223 -210
|
@@ -1,210 +1,223 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Common Errors"
|
|
3
|
-
description: "Static SDK-level error catalog -- CLI errors, deployment errors, schema validation, platform tool failures, and runtime errors with diagnostic steps"
|
|
4
|
-
loadWhen: "Debugging an unknown error not found in workspace memory"
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
This is the static SDK-level error catalog. Check `.claude/memory/errors/` first for workspace-specific fixes. Use this file when the error is new to the workspace or when the memory has no match.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## CLI Errors
|
|
12
|
-
|
|
13
|
-
###
|
|
14
|
-
|
|
15
|
-
**Cause:** The `.env` file is missing the API key, or the file was not loaded.
|
|
16
|
-
|
|
17
|
-
**Fix:**
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
**
|
|
73
|
-
|
|
74
|
-
**
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
1. Check the
|
|
161
|
-
2.
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
**
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "Common Errors"
|
|
3
|
+
description: "Static SDK-level error catalog -- CLI errors, deployment errors, schema validation, platform tool failures, and runtime errors with diagnostic steps"
|
|
4
|
+
loadWhen: "Debugging an unknown error not found in workspace memory"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This is the static SDK-level error catalog. Check `.claude/memory/errors/` first for workspace-specific fixes. Use this file when the error is new to the workspace or when the memory has no match.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## CLI Errors
|
|
12
|
+
|
|
13
|
+
### ELEVASIS_PLATFORM_KEY not set
|
|
14
|
+
|
|
15
|
+
**Cause:** The `.env` file is missing the API key, or the file was not loaded.
|
|
16
|
+
|
|
17
|
+
**Fix:**
|
|
18
|
+
|
|
19
|
+
1. Check that `.env` exists in the workspace root
|
|
20
|
+
2. Confirm it contains `ELEVASIS_PLATFORM_KEY=sk_...`
|
|
21
|
+
3. Make sure you are running the CLI from the workspace directory (where `.env` is located)
|
|
22
|
+
4. If the file exists with the right content, run `elevasis-sdk check` again
|
|
23
|
+
|
|
24
|
+
### Cannot connect to API
|
|
25
|
+
|
|
26
|
+
**Cause:** Network issue or the API URL is incorrect.
|
|
27
|
+
|
|
28
|
+
**Fix:**
|
|
29
|
+
|
|
30
|
+
1. Check your internet connection
|
|
31
|
+
2. If using a custom API URL via `--api-url` or `ELEVASIS_API_URL`, verify it is correct
|
|
32
|
+
3. Remove `NODE_ENV=development` from `.env` if you are not running a local API server
|
|
33
|
+
|
|
34
|
+
### NODE_ENV=development in .env
|
|
35
|
+
|
|
36
|
+
**Cause:** The SDK is pointing at a local API server (port 5170 by default) instead of the hosted platform.
|
|
37
|
+
|
|
38
|
+
**Fix:** Remove `NODE_ENV=development` from `.env`. The CLI connects to the hosted platform by default.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Validation Errors (elevasis-sdk check)
|
|
43
|
+
|
|
44
|
+
### Duplicate resource ID
|
|
45
|
+
|
|
46
|
+
**Message:** `Duplicate resource ID 'name' in organization 'org'`
|
|
47
|
+
|
|
48
|
+
**Cause:** Two resources in `src/` share the same `resourceId`.
|
|
49
|
+
|
|
50
|
+
**Fix:** Each resource must have a unique `resourceId` within your organization. Check all domain directories in `src/` and rename the duplicate.
|
|
51
|
+
|
|
52
|
+
### Workflow step references non-existent next step
|
|
53
|
+
|
|
54
|
+
**Message:** `Workflow step 'stepA' references non-existent next step 'stepB'`
|
|
55
|
+
|
|
56
|
+
**Cause:** A step's `next.target` or `next.routes[*].target` points to a step name that does not exist in the `steps` record.
|
|
57
|
+
|
|
58
|
+
**Fix:** Check the spelling of the target step name. All target values must exactly match keys in the `steps` object.
|
|
59
|
+
|
|
60
|
+
### Missing entryPoint
|
|
61
|
+
|
|
62
|
+
**Cause:** The workflow's `entryPoint` field names a step that does not exist in `steps`.
|
|
63
|
+
|
|
64
|
+
**Fix:** Confirm `entryPoint` matches an exact key in your `steps` record.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Schema Validation Errors
|
|
69
|
+
|
|
70
|
+
### Schema validation failed (input)
|
|
71
|
+
|
|
72
|
+
**Message:** `Schema validation failed` with field-level details
|
|
73
|
+
|
|
74
|
+
**Cause:** The input passed to the workflow does not match the `inputSchema`.
|
|
75
|
+
|
|
76
|
+
**Fix:**
|
|
77
|
+
|
|
78
|
+
1. Read the error's field details -- it names the failing field and expected type
|
|
79
|
+
2. Compare against your `inputSchema` definition
|
|
80
|
+
3. Common causes: wrong type (string vs number), missing required field, extra field not in schema, misspelled field name
|
|
81
|
+
4. Check that `z.infer` types match what your handler actually receives
|
|
82
|
+
|
|
83
|
+
### outputSchema validation failed
|
|
84
|
+
|
|
85
|
+
**Cause:** Your handler's return value does not match the workflow's `outputSchema`.
|
|
86
|
+
|
|
87
|
+
**Fix:**
|
|
88
|
+
|
|
89
|
+
1. Compare what your handler returns to what `outputSchema` expects
|
|
90
|
+
2. Check field names for typos (the schema says `companyName`, handler returns `company_name`)
|
|
91
|
+
3. Check types -- the schema says `z.number()` but the handler returns a string
|
|
92
|
+
4. Check required vs optional -- do not return undefined for a required field
|
|
93
|
+
|
|
94
|
+
### Cannot find name 'z'
|
|
95
|
+
|
|
96
|
+
**Cause:** Missing Zod import.
|
|
97
|
+
|
|
98
|
+
**Fix:** Add `import { z } from 'zod'` at the top of the file.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## TypeScript Errors
|
|
103
|
+
|
|
104
|
+
### Type 'X' is not assignable to type 'Y'
|
|
105
|
+
|
|
106
|
+
**Cause:** The data flowing into a step or returned from a handler does not match the declared type.
|
|
107
|
+
|
|
108
|
+
**Fix:**
|
|
109
|
+
|
|
110
|
+
1. Check the input type annotation on the handler: `async (input: MyInput) => ...`
|
|
111
|
+
2. Confirm the `z.infer<typeof mySchema>` type matches what the previous step returns
|
|
112
|
+
3. Check that all optional fields are handled (do not assume they are always present)
|
|
113
|
+
|
|
114
|
+
### Cannot find module '@elevasis/sdk'
|
|
115
|
+
|
|
116
|
+
**Cause:** Dependencies are not installed.
|
|
117
|
+
|
|
118
|
+
**Fix:** Run `pnpm install` in the workspace root.
|
|
119
|
+
|
|
120
|
+
### Cannot find module '@elevasis/sdk/worker'
|
|
121
|
+
|
|
122
|
+
**Cause:** Dependencies not installed, or using an old SDK version that does not export the `worker` subpath.
|
|
123
|
+
|
|
124
|
+
**Fix:**
|
|
125
|
+
|
|
126
|
+
1. Run `pnpm install`
|
|
127
|
+
2. Check that `@elevasis/sdk` version is recent enough to include `worker` export
|
|
128
|
+
3. Confirm your `tsconfig.json` has `"moduleResolution": "Bundler"` or `"NodeNext"`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Platform Tool Errors
|
|
133
|
+
|
|
134
|
+
### PlatformToolError: credential not found
|
|
135
|
+
|
|
136
|
+
**Cause:** The credential name passed to `platform.call()` does not match any credential stored in the platform.
|
|
137
|
+
|
|
138
|
+
**Fix:**
|
|
139
|
+
|
|
140
|
+
1. Check spelling and case -- credential names are case-sensitive
|
|
141
|
+
2. Open the command center and confirm the credential exists and is named exactly as referenced
|
|
142
|
+
3. Check that the credential belongs to the correct organization
|
|
143
|
+
|
|
144
|
+
### PlatformToolError: credentials_invalid
|
|
145
|
+
|
|
146
|
+
**Cause:** The credential exists but has the wrong shape for the tool being called.
|
|
147
|
+
|
|
148
|
+
**Fix:**
|
|
149
|
+
|
|
150
|
+
1. For the `http` tool: verify the credential type matches the API's auth method (bearer, api-key-header, basic, etc.)
|
|
151
|
+
2. For the Supabase tool: verify the credential contains `url` and `serviceRoleKey` fields
|
|
152
|
+
3. Re-create the credential in the command center if the format is wrong
|
|
153
|
+
|
|
154
|
+
### PlatformToolError: timeout_error
|
|
155
|
+
|
|
156
|
+
**Cause:** The platform tool call took longer than 60 seconds.
|
|
157
|
+
|
|
158
|
+
**Fix:**
|
|
159
|
+
|
|
160
|
+
1. Check if the external API is slow or down
|
|
161
|
+
2. Reduce the amount of data being processed in a single call
|
|
162
|
+
3. For `http` tool: the external endpoint may be unresponsive -- check directly
|
|
163
|
+
|
|
164
|
+
### PlatformToolError: service_unavailable
|
|
165
|
+
|
|
166
|
+
**Cause:** The platform service or integration adapter is not available.
|
|
167
|
+
|
|
168
|
+
**Fix:**
|
|
169
|
+
|
|
170
|
+
1. Check the Elevasis status page
|
|
171
|
+
2. Retry -- transient availability issues resolve quickly
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Runtime Errors
|
|
176
|
+
|
|
177
|
+
### Execution timeout (300s)
|
|
178
|
+
|
|
179
|
+
**Cause:** The entire workflow execution exceeded the 300-second limit.
|
|
180
|
+
|
|
181
|
+
**Fix:**
|
|
182
|
+
|
|
183
|
+
1. Identify which step is slow -- check execution logs for step timing
|
|
184
|
+
2. Reduce work per step or parallelize if possible
|
|
185
|
+
3. For long-running operations, consider breaking into multiple workflows with the `execution` platform tool to chain them
|
|
186
|
+
|
|
187
|
+
### Worker ran out of memory (256MB limit)
|
|
188
|
+
|
|
189
|
+
**Cause:** The workflow processed too much data in memory at once.
|
|
190
|
+
|
|
191
|
+
**Fix:**
|
|
192
|
+
|
|
193
|
+
1. Reduce the size of data loaded per execution
|
|
194
|
+
2. Use pagination for large data sets (fetch in chunks, process one at a time)
|
|
195
|
+
3. Avoid loading large files or arrays entirely into memory
|
|
196
|
+
|
|
197
|
+
### Module resolution error at runtime
|
|
198
|
+
|
|
199
|
+
**Cause:** An import in your workflow bundle cannot be resolved.
|
|
200
|
+
|
|
201
|
+
**Fix:**
|
|
202
|
+
|
|
203
|
+
1. Run `elevasis-sdk check` -- it catches most resolution errors before deploy
|
|
204
|
+
2. If the import is a built-in Node.js module, ensure it is compatible with the worker environment
|
|
205
|
+
3. Avoid imports that require file system access or native modules
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Memory Error Structure
|
|
210
|
+
|
|
211
|
+
When recording a new error in `.claude/memory/errors/`, use this table format:
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
| Error | Context | Fix | Count | Last Seen | Status |
|
|
215
|
+
| --- | --- | --- | --- | --- | --- |
|
|
216
|
+
| `Schema validation failed` on lead-scorer | Added score field | Changed score from z.string() to z.number() | 1 | 2026-02-26 | Resolved |
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Status values: `Resolved` (fixed this session), `Recurring` (seen 2+ times), `Promoted` (3+ times, now in Rules).
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
**Last Updated:** 2026-02-26
|