@elevasis/sdk 1.25.0 → 1.26.0

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.
Files changed (60) hide show
  1. package/dist/cli.cjs +18 -116
  2. package/dist/index.d.ts +165 -48
  3. package/dist/index.js +4 -435
  4. package/dist/node/index.d.ts +36 -36
  5. package/dist/test-utils/index.d.ts +99 -38
  6. package/dist/test-utils/index.js +27 -355
  7. package/dist/types/worker/adapters/clickup.d.ts +22 -0
  8. package/dist/types/worker/adapters/index.d.ts +1 -0
  9. package/dist/worker/index.js +32 -354
  10. package/package.json +2 -2
  11. package/reference/_navigation.md +11 -1
  12. package/reference/_reference-manifest.json +70 -0
  13. package/reference/claude-config/rules/organization-model.md +12 -1
  14. package/reference/claude-config/rules/organization-os.md +12 -1
  15. package/reference/claude-config/skills/om/SKILL.md +13 -5
  16. package/reference/claude-config/skills/om/operations/codify-level-a.md +109 -100
  17. package/reference/claude-config/skills/om/operations/customers.md +10 -6
  18. package/reference/claude-config/skills/om/operations/features.md +7 -3
  19. package/reference/claude-config/skills/om/operations/goals.md +10 -6
  20. package/reference/claude-config/skills/om/operations/identity.md +8 -5
  21. package/reference/claude-config/skills/om/operations/labels.md +17 -1
  22. package/reference/claude-config/skills/om/operations/offerings.md +11 -7
  23. package/reference/claude-config/skills/om/operations/roles.md +11 -7
  24. package/reference/claude-config/skills/om/operations/techStack.md +10 -2
  25. package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +32 -0
  26. package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +43 -0
  27. package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +40 -0
  28. package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +61 -0
  29. package/reference/cli-management.mdx +539 -0
  30. package/reference/cli.mdx +4 -532
  31. package/reference/concepts.mdx +134 -146
  32. package/reference/deployment/api.mdx +296 -297
  33. package/reference/deployment/command-center.mdx +208 -209
  34. package/reference/deployment/index.mdx +194 -195
  35. package/reference/deployment/provided-features.mdx +110 -107
  36. package/reference/deployment/ui-execution.mdx +249 -250
  37. package/reference/framework/index.mdx +111 -195
  38. package/reference/framework/resource-documentation.mdx +90 -0
  39. package/reference/framework/tutorial-system.mdx +135 -135
  40. package/reference/getting-started.mdx +141 -142
  41. package/reference/index.mdx +95 -106
  42. package/reference/packages/ui/src/auth/README.md +6 -6
  43. package/reference/platform-tools/adapters-integration.mdx +300 -301
  44. package/reference/platform-tools/adapters-platform.mdx +552 -553
  45. package/reference/platform-tools/index.mdx +216 -217
  46. package/reference/platform-tools/type-safety.mdx +82 -82
  47. package/reference/resources/index.mdx +348 -349
  48. package/reference/resources/patterns.mdx +446 -449
  49. package/reference/resources/types.mdx +115 -116
  50. package/reference/roadmap.mdx +164 -165
  51. package/reference/rules/organization-model.md +14 -0
  52. package/reference/runtime.mdx +172 -173
  53. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  54. package/reference/scaffold/recipes/extend-lead-gen.md +130 -77
  55. package/reference/scaffold/reference/contracts.md +376 -446
  56. package/reference/scaffold/reference/glossary.md +8 -6
  57. package/reference/scaffold/ui/feature-flags-and-gating.md +59 -46
  58. package/reference/scaffold/ui/feature-shell.mdx +11 -11
  59. package/reference/scaffold/ui/recipes.md +24 -24
  60. package/reference/troubleshooting.mdx +222 -223
@@ -1,297 +1,296 @@
1
- ---
2
- title: Execution API
3
- description: REST endpoints for executing resources, querying execution history, and managing deployments via the Elevasis external API
4
- loadWhen: "Calling the API directly or debugging API responses"
5
- ---
6
-
7
- The Elevasis external API exposes REST endpoints under `/api/external/` for executing your deployed resources and inspecting results. All endpoints require your `ELEVASIS_PLATFORM_KEY` sent as a Bearer token. Organization is resolved server-side from the API key -- you never pass an org identifier in requests.
8
-
9
- **Authentication header:**
10
-
11
- ```
12
- Authorization: Bearer sk_...
13
- ```
14
-
15
- ---
16
-
17
- ## API Base URL
18
-
19
- | Environment | Base URL |
20
- | ----------- | --------------------------- |
21
- | Production | `https://api.elevasis.io` |
22
- | Development | `http://localhost:<port>` |
23
-
24
- Override the base URL by setting `ELEVASIS_API_URL` in your environment or passing `--api-url` to any CLI command.
25
-
26
- ---
27
-
28
- ## Endpoints
29
-
30
- | Method | Path | Purpose |
31
- | ------ | ---------------------------------------------------------- | ---------------------------------------- |
32
- | `GET` | `/api/external/resources` | List all resources for your organization |
33
- | `GET` | `/api/external/resources/:resourceId/definition` | Get resource metadata and schemas |
34
- | `POST` | `/api/external/execute` | Execute a resource synchronously |
35
- | `POST` | `/api/external/execute-async` | Execute a resource asynchronously |
36
- | `POST` | `/api/external/executions/:resourceId/:executionId/cancel` | Cancel a running execution |
37
- | `GET` | `/api/external/executions/:resourceId` | List execution history for a resource |
38
- | `GET` | `/api/external/executions/:resourceId/:executionId` | Get full execution detail |
39
- | `POST` | `/api/external/deploy` | Upload bundle and deploy resources |
40
- | `GET` | `/api/external/deployments` | List all deployments |
41
- | `GET` | `/api/external/deployments/:id` | Get a deployment by ID |
42
-
43
- ---
44
-
45
- ## Execution Endpoints
46
-
47
- ### POST /api/external/execute
48
-
49
- Execute a resource synchronously. The request waits for the resource to complete and returns the full result.
50
-
51
- **Request body:**
52
-
53
- ```json
54
- {
55
- "resourceId": "onboard-client",
56
- "input": {
57
- "clientName": "Jane",
58
- "email": "jane@example.com"
59
- }
60
- }
61
- ```
62
-
63
- **Response:**
64
-
65
- ```json
66
- {
67
- "executionId": "550e8400-e29b-41d4-a716-446655440000",
68
- "success": true,
69
- "data": {
70
- "success": true,
71
- "clientId": "client_1708521600000",
72
- "welcomeEmailSent": true
73
- }
74
- }
75
- ```
76
-
77
- ### POST /api/external/execute-async
78
-
79
- Execute a resource asynchronously. Returns immediately with an `executionId`. Poll `GET /executions/:resourceId/:executionId` to check status and retrieve output.
80
-
81
- **Request body:**
82
-
83
- ```json
84
- {
85
- "resourceId": "onboard-client",
86
- "input": { "clientName": "Jane" }
87
- }
88
- ```
89
-
90
- **Response:**
91
-
92
- ```json
93
- {
94
- "executionId": "550e8400-e29b-41d4-a716-446655440000",
95
- "status": "running"
96
- }
97
- ```
98
-
99
- ### POST /api/external/executions/:resourceId/:executionId/cancel
100
-
101
- Cancel a running execution. If the execution is found in memory, sends a cancellation signal immediately. Falls back to a database status update if no in-memory signal is found.
102
-
103
- **Response:**
104
-
105
- ```json
106
- {
107
- "success": true
108
- }
109
- ```
110
-
111
- ---
112
-
113
- ## Resource Endpoints
114
-
115
- ### GET /api/external/resources
116
-
117
- List all resources registered to your organization. In production, only `status: 'prod'` resources are returned.
118
-
119
- **Response:**
120
-
121
- ```json
122
- [
123
- {
124
- "resourceId": "onboard-client",
125
- "resourceType": "workflow",
126
- "name": "Onboard Client",
127
- "status": "prod"
128
- },
129
- {
130
- "resourceId": "email-assistant",
131
- "resourceType": "agent",
132
- "name": "Email Assistant",
133
- "status": "prod"
134
- }
135
- ]
136
- ```
137
-
138
- ### GET /api/external/resources/:resourceId/definition
139
-
140
- Get the full definition for a single resource: metadata, input schema, and output schema.
141
-
142
- **Response:**
143
-
144
- ```json
145
- {
146
- "resourceId": "onboard-client",
147
- "resourceType": "workflow",
148
- "name": "Onboard Client",
149
- "description": "Creates a client record and sends a welcome email",
150
- "status": "prod",
151
- "inputSchema": {
152
- "type": "object",
153
- "properties": {
154
- "clientName": { "type": "string" },
155
- "email": { "type": "string", "format": "email" }
156
- },
157
- "required": ["clientName", "email"]
158
- },
159
- "outputSchema": {
160
- "type": "object",
161
- "properties": {
162
- "success": { "type": "boolean" },
163
- "clientId": { "type": "string" }
164
- }
165
- }
166
- }
167
- ```
168
-
169
- Returns `404` if the resource is not found.
170
-
171
- ---
172
-
173
- ## Execution History Endpoints
174
-
175
- ### GET /api/external/executions/:resourceId
176
-
177
- List execution history for a resource.
178
-
179
- **Query parameters:**
180
-
181
- | Parameter | Description |
182
- | --------- | --------------------------------------------------------------- |
183
- | `limit` | Maximum number of results (default: 20) |
184
- | `status` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
185
-
186
- **Response:**
187
-
188
- ```json
189
- [
190
- {
191
- "executionId": "550e8400-e29b-41d4-a716-446655440000",
192
- "resourceId": "onboard-client",
193
- "status": "completed",
194
- "createdAt": "2026-02-25T14:32:01Z",
195
- "durationMs": 1234
196
- }
197
- ]
198
- ```
199
-
200
- ### GET /api/external/executions/:resourceId/:executionId
201
-
202
- Get the full detail for a single execution including input, output, logs, and error.
203
-
204
- **Response:**
205
-
206
- ```json
207
- {
208
- "executionId": "550e8400-e29b-41d4-a716-446655440000",
209
- "resourceId": "onboard-client",
210
- "status": "completed",
211
- "createdAt": "2026-02-25T14:32:01Z",
212
- "durationMs": 1234,
213
- "input": {
214
- "clientName": "Jane",
215
- "email": "jane@example.com"
216
- },
217
- "output": {
218
- "success": true,
219
- "clientId": "client_1708521600000",
220
- "welcomeEmailSent": true
221
- },
222
- "logs": [
223
- { "timestamp": "2026-02-25T14:32:01.123Z", "message": "Starting onboard-client workflow" },
224
- { "timestamp": "2026-02-25T14:32:01.456Z", "message": "Created client record" }
225
- ],
226
- "error": null
227
- }
228
- ```
229
-
230
- ---
231
-
232
- ## Deployment Endpoints
233
-
234
- ### POST /api/external/deploy
235
-
236
- Upload a resource bundle and deploy it. Accepts a multipart request with the compiled bundle and resource metadata.
237
-
238
- **Response:**
239
-
240
- ```json
241
- {
242
- "deployId": "deploy_abc123",
243
- "status": "active",
244
- "resources": 4
245
- }
246
- ```
247
-
248
- Use `elevasis-sdk deploy` from the CLI rather than calling this endpoint directly -- the CLI handles bundling, metadata generation, and status streaming automatically.
249
-
250
- ### GET /api/external/deployments
251
-
252
- List all deployments for your organization.
253
-
254
- **Response:**
255
-
256
- ```json
257
- [
258
- {
259
- "id": "deploy_abc123",
260
- "status": "active",
261
- "createdAt": "2026-02-25T14:00:00Z",
262
- "resources": 4
263
- },
264
- {
265
- "id": "deploy_abc122",
266
- "status": "stopped",
267
- "createdAt": "2026-02-24T09:30:00Z",
268
- "resources": 3
269
- }
270
- ]
271
- ```
272
-
273
- ### GET /api/external/deployments/:id
274
-
275
- Get a single deployment by ID.
276
-
277
- **Response shape:** Same as a single item from `GET /deployments`.
278
-
279
- ---
280
-
281
- ## CLI Execution Commands
282
-
283
- The SDK CLI wraps all execution endpoints. Use these commands instead of calling the API directly during development:
284
-
285
- | Command | API call | Purpose |
286
- | ------------------------------------------------------ | -------------------------------------------- | ------------------------ |
287
- | `elevasis-sdk resources` | `GET /api/external/resources` | List all resources |
288
- | `elevasis-sdk describe <resource>` | `GET /api/external/resources/:id/definition` | Show resource definition |
289
- | `elevasis-sdk exec <resource> --input '...'` | `POST /api/external/execute` | Execute synchronously |
290
- | `elevasis-sdk exec <resource> --input '...' --async` | `POST /api/external/execute-async` | Execute asynchronously |
291
- | `elevasis-sdk executions <resource>` | `GET /api/external/executions/:id` | List execution history |
292
- | `elevasis-sdk execution <resource> <id>` | `GET /api/external/executions/:id/:execId` | Get execution detail |
293
- | `elevasis-sdk deployments` | `GET /api/external/deployments` | List deployments |
294
-
295
- ---
296
-
297
- **Last Updated:** 2026-02-25
1
+ ---
2
+ title: Execution API
3
+ description: REST endpoints for executing resources, querying execution history, and managing deployments via the Elevasis external API
4
+ ---
5
+
6
+ The Elevasis external API exposes REST endpoints under `/api/external/` for executing your deployed resources and inspecting results. All endpoints require your `ELEVASIS_PLATFORM_KEY` sent as a Bearer token. Organization is resolved server-side from the API key -- you never pass an org identifier in requests.
7
+
8
+ **Authentication header:**
9
+
10
+ ```
11
+ Authorization: Bearer sk_...
12
+ ```
13
+
14
+ ---
15
+
16
+ ## API Base URL
17
+
18
+ | Environment | Base URL |
19
+ | ----------- | --------------------------- |
20
+ | Production | `https://api.elevasis.io` |
21
+ | Development | `http://localhost:<port>` |
22
+
23
+ Override the base URL by setting `ELEVASIS_API_URL` in your environment or passing `--api-url` to any CLI command.
24
+
25
+ ---
26
+
27
+ ## Endpoints
28
+
29
+ | Method | Path | Purpose |
30
+ | ------ | ---------------------------------------------------------- | ---------------------------------------- |
31
+ | `GET` | `/api/external/resources` | List all resources for your organization |
32
+ | `GET` | `/api/external/resources/:resourceId/definition` | Get resource metadata and schemas |
33
+ | `POST` | `/api/external/execute` | Execute a resource synchronously |
34
+ | `POST` | `/api/external/execute-async` | Execute a resource asynchronously |
35
+ | `POST` | `/api/external/executions/:resourceId/:executionId/cancel` | Cancel a running execution |
36
+ | `GET` | `/api/external/executions/:resourceId` | List execution history for a resource |
37
+ | `GET` | `/api/external/executions/:resourceId/:executionId` | Get full execution detail |
38
+ | `POST` | `/api/external/deploy` | Upload bundle and deploy resources |
39
+ | `GET` | `/api/external/deployments` | List all deployments |
40
+ | `GET` | `/api/external/deployments/:id` | Get a deployment by ID |
41
+
42
+ ---
43
+
44
+ ## Execution Endpoints
45
+
46
+ ### POST /api/external/execute
47
+
48
+ Execute a resource synchronously. The request waits for the resource to complete and returns the full result.
49
+
50
+ **Request body:**
51
+
52
+ ```json
53
+ {
54
+ "resourceId": "onboard-client",
55
+ "input": {
56
+ "clientName": "Jane",
57
+ "email": "jane@example.com"
58
+ }
59
+ }
60
+ ```
61
+
62
+ **Response:**
63
+
64
+ ```json
65
+ {
66
+ "executionId": "550e8400-e29b-41d4-a716-446655440000",
67
+ "success": true,
68
+ "data": {
69
+ "success": true,
70
+ "clientId": "client_1708521600000",
71
+ "welcomeEmailSent": true
72
+ }
73
+ }
74
+ ```
75
+
76
+ ### POST /api/external/execute-async
77
+
78
+ Execute a resource asynchronously. Returns immediately with an `executionId`. Poll `GET /executions/:resourceId/:executionId` to check status and retrieve output.
79
+
80
+ **Request body:**
81
+
82
+ ```json
83
+ {
84
+ "resourceId": "onboard-client",
85
+ "input": { "clientName": "Jane" }
86
+ }
87
+ ```
88
+
89
+ **Response:**
90
+
91
+ ```json
92
+ {
93
+ "executionId": "550e8400-e29b-41d4-a716-446655440000",
94
+ "status": "running"
95
+ }
96
+ ```
97
+
98
+ ### POST /api/external/executions/:resourceId/:executionId/cancel
99
+
100
+ Cancel a running execution. If the execution is found in memory, sends a cancellation signal immediately. Falls back to a database status update if no in-memory signal is found.
101
+
102
+ **Response:**
103
+
104
+ ```json
105
+ {
106
+ "success": true
107
+ }
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Resource Endpoints
113
+
114
+ ### GET /api/external/resources
115
+
116
+ List all resources registered to your organization. In production, only `status: 'prod'` resources are returned.
117
+
118
+ **Response:**
119
+
120
+ ```json
121
+ [
122
+ {
123
+ "resourceId": "onboard-client",
124
+ "resourceType": "workflow",
125
+ "name": "Onboard Client",
126
+ "status": "prod"
127
+ },
128
+ {
129
+ "resourceId": "email-assistant",
130
+ "resourceType": "agent",
131
+ "name": "Email Assistant",
132
+ "status": "prod"
133
+ }
134
+ ]
135
+ ```
136
+
137
+ ### GET /api/external/resources/:resourceId/definition
138
+
139
+ Get the full definition for a single resource: metadata, input schema, and output schema.
140
+
141
+ **Response:**
142
+
143
+ ```json
144
+ {
145
+ "resourceId": "onboard-client",
146
+ "resourceType": "workflow",
147
+ "name": "Onboard Client",
148
+ "description": "Creates a client record and sends a welcome email",
149
+ "status": "prod",
150
+ "inputSchema": {
151
+ "type": "object",
152
+ "properties": {
153
+ "clientName": { "type": "string" },
154
+ "email": { "type": "string", "format": "email" }
155
+ },
156
+ "required": ["clientName", "email"]
157
+ },
158
+ "outputSchema": {
159
+ "type": "object",
160
+ "properties": {
161
+ "success": { "type": "boolean" },
162
+ "clientId": { "type": "string" }
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ Returns `404` if the resource is not found.
169
+
170
+ ---
171
+
172
+ ## Execution History Endpoints
173
+
174
+ ### GET /api/external/executions/:resourceId
175
+
176
+ List execution history for a resource.
177
+
178
+ **Query parameters:**
179
+
180
+ | Parameter | Description |
181
+ | --------- | --------------------------------------------------------------- |
182
+ | `limit` | Maximum number of results (default: 20) |
183
+ | `status` | Filter by status: `running`, `completed`, `failed`, `cancelled` |
184
+
185
+ **Response:**
186
+
187
+ ```json
188
+ [
189
+ {
190
+ "executionId": "550e8400-e29b-41d4-a716-446655440000",
191
+ "resourceId": "onboard-client",
192
+ "status": "completed",
193
+ "createdAt": "2026-02-25T14:32:01Z",
194
+ "durationMs": 1234
195
+ }
196
+ ]
197
+ ```
198
+
199
+ ### GET /api/external/executions/:resourceId/:executionId
200
+
201
+ Get the full detail for a single execution including input, output, logs, and error.
202
+
203
+ **Response:**
204
+
205
+ ```json
206
+ {
207
+ "executionId": "550e8400-e29b-41d4-a716-446655440000",
208
+ "resourceId": "onboard-client",
209
+ "status": "completed",
210
+ "createdAt": "2026-02-25T14:32:01Z",
211
+ "durationMs": 1234,
212
+ "input": {
213
+ "clientName": "Jane",
214
+ "email": "jane@example.com"
215
+ },
216
+ "output": {
217
+ "success": true,
218
+ "clientId": "client_1708521600000",
219
+ "welcomeEmailSent": true
220
+ },
221
+ "logs": [
222
+ { "timestamp": "2026-02-25T14:32:01.123Z", "message": "Starting onboard-client workflow" },
223
+ { "timestamp": "2026-02-25T14:32:01.456Z", "message": "Created client record" }
224
+ ],
225
+ "error": null
226
+ }
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Deployment Endpoints
232
+
233
+ ### POST /api/external/deploy
234
+
235
+ Upload a resource bundle and deploy it. Accepts a multipart request with the compiled bundle and resource metadata.
236
+
237
+ **Response:**
238
+
239
+ ```json
240
+ {
241
+ "deployId": "deploy_abc123",
242
+ "status": "active",
243
+ "resources": 4
244
+ }
245
+ ```
246
+
247
+ Use `elevasis-sdk deploy` from the CLI rather than calling this endpoint directly -- the CLI handles bundling, metadata generation, and status streaming automatically.
248
+
249
+ ### GET /api/external/deployments
250
+
251
+ List all deployments for your organization.
252
+
253
+ **Response:**
254
+
255
+ ```json
256
+ [
257
+ {
258
+ "id": "deploy_abc123",
259
+ "status": "active",
260
+ "createdAt": "2026-02-25T14:00:00Z",
261
+ "resources": 4
262
+ },
263
+ {
264
+ "id": "deploy_abc122",
265
+ "status": "stopped",
266
+ "createdAt": "2026-02-24T09:30:00Z",
267
+ "resources": 3
268
+ }
269
+ ]
270
+ ```
271
+
272
+ ### GET /api/external/deployments/:id
273
+
274
+ Get a single deployment by ID.
275
+
276
+ **Response shape:** Same as a single item from `GET /deployments`.
277
+
278
+ ---
279
+
280
+ ## CLI Execution Commands
281
+
282
+ The SDK CLI wraps all execution endpoints. Use these commands instead of calling the API directly during development:
283
+
284
+ | Command | API call | Purpose |
285
+ | ------------------------------------------------------ | -------------------------------------------- | ------------------------ |
286
+ | `elevasis-sdk resources` | `GET /api/external/resources` | List all resources |
287
+ | `elevasis-sdk describe <resource>` | `GET /api/external/resources/:id/definition` | Show resource definition |
288
+ | `elevasis-sdk exec <resource> --input '...'` | `POST /api/external/execute` | Execute synchronously |
289
+ | `elevasis-sdk exec <resource> --input '...' --async` | `POST /api/external/execute-async` | Execute asynchronously |
290
+ | `elevasis-sdk executions <resource>` | `GET /api/external/executions/:id` | List execution history |
291
+ | `elevasis-sdk execution <resource> <id>` | `GET /api/external/executions/:id/:execId` | Get execution detail |
292
+ | `elevasis-sdk deployments` | `GET /api/external/deployments` | List deployments |
293
+
294
+ ---
295
+
296
+ **Last Updated:** 2026-02-25