@elevasis/sdk 1.26.0 → 1.26.2

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.
@@ -1,296 +0,0 @@
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
@@ -1,110 +0,0 @@
1
- ---
2
- title: Provided Features
3
- description: Shared UI and API surfaces for packaged business systems like Lead Gen, CRM, Projects, Operations, Monitoring, and Settings via @elevasis/ui/features/*.
4
- ---
5
-
6
- The SDK includes more than workflow execution. The published `@elevasis/ui` package provides system manifests, pages, hooks, and headless provider exports for building shell-aware applications.
7
-
8
- ## Shared Shell Contract
9
-
10
- `ElevasisSystemsProvider` reads the canonical `OrganizationModel`, including `navigation.sidebar`, and exposes a shell model plus sidebar projection helpers. System manifests provide implementation hooks such as icons and subshell sidebars; they do not own structural navigation.
11
-
12
- ```tsx
13
- import { Outlet } from '@tanstack/react-router'
14
- import { ElevasisSystemsProvider, SystemShell } from '@elevasis/ui/provider'
15
- import { leadGenManifest } from '@elevasis/ui/features/lead-gen'
16
- import { crmManifest } from '@elevasis/ui/features/crm'
17
- import { deliveryManifest } from '@elevasis/ui/features/delivery'
18
- import { monitoringManifest } from '@elevasis/ui/features/monitoring'
19
- import { settingsManifest } from '@elevasis/ui/features/settings'
20
- import { canonicalOrganizationModel } from '@core/config/organization-model'
21
-
22
- const systems = [
23
- leadGenManifest,
24
- crmManifest,
25
- deliveryManifest,
26
- monitoringManifest,
27
- settingsManifest
28
- ]
29
-
30
- export function AppShell() {
31
- return (
32
- <ElevasisSystemsProvider systems={systems} organizationModel={canonicalOrganizationModel}>
33
- <SystemShell>
34
- <Outlet />
35
- </SystemShell>
36
- </ElevasisSystemsProvider>
37
- )
38
- }
39
- ```
40
-
41
- Host apps still own TanStack route registration, topbar behavior, branding, auth wiring, and any root dashboard composition.
42
-
43
- ## Contract Matrix
44
-
45
- | Contract type | What is published | Current examples |
46
- | --------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
47
- | Manifest-backed shared subshell systems | System manifest plus shared sidebar/pages, mounted through `@elevasis/ui/provider` | Lead Gen, CRM, Projects, Operations |
48
- | Shared feature pages and hooks | Pages, hooks, and helpers that can be composed inside host routes | Monitoring, Settings, Dashboard widgets |
49
- | Headless provider contract | Provider, hooks, and shell model helpers | `ElevasisSystemsProvider`, `useElevasisSystems`, `SystemShell` |
50
- | Compatibility barrel | Existing imports remain available while newer integrations prefer feature/provider subpaths | `@elevasis/ui/components` |
51
-
52
- ## System Map
53
-
54
- | System | Primary route space | Shared UI surface | Best SDK entry point |
55
- | ---------- | ------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
56
- | Lead Gen | `/lead-gen/*` | Lead Gen pages, sidebars, list detail page, run dialogs | `@elevasis/ui/features/lead-gen`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
57
- | CRM | `/crm/*` | CRM sidebar, overview widgets, deal/detail pages, workbench panels | `@elevasis/ui/features/crm`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
58
- | Projects | `/projects/*` | Projects list page, milestones/tasks/notes sidebars and pages | `@elevasis/ui/features/delivery`, `@elevasis/ui/hooks/delivery`, `elevasis-sdk project:*` |
59
- | Operations | `/operations/*` | Command View, resources, organization graph, sessions | `@elevasis/ui/features/operations` |
60
- | Dashboard | `/` host-owned | Dashboard and overview components only | `@elevasis/ui/features/dashboard` |
61
- | Monitoring | `/monitoring/*` | Monitoring pages/components | `@elevasis/ui/features/monitoring` |
62
- | Settings | `/settings/*` | Settings/account/org components | `@elevasis/ui/features/settings` |
63
-
64
- ## Organization Model Alignment
65
-
66
- Manifest `systemId` values must match Organization Model System IDs. Sidebar placement is authored in the Organization Model navigation domain:
67
-
68
- ```ts
69
- systems: {
70
- dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
71
- clients: { id: 'clients', order: 20, label: 'Clients', lifecycle: 'active' }
72
- },
73
- navigation: {
74
- sidebar: {
75
- primary: {
76
- dashboard: { type: 'surface', order: 10, label: 'Dashboard', path: '/', surfaceType: 'dashboard', targets: { systems: ['dashboard'] } },
77
- business: {
78
- type: 'group',
79
- order: 20,
80
- label: 'Business',
81
- children: {
82
- clients: { type: 'surface', order: 20, label: 'Clients', path: '/clients', surfaceType: 'list', targets: { systems: ['clients'] } }
83
- }
84
- }
85
- },
86
- bottom: {}
87
- }
88
- }
89
- ```
90
-
91
- Dashboard appears before Business in the primary sidebar. Business is a navigation group only; `/clients` is the canonical client route.
92
-
93
- ## Choosing The Right Surface
94
-
95
- - Need packaged sidebar/page composition? Use `ElevasisSystemsProvider`, `SystemShell`, and manifests from `@elevasis/ui/features/*`.
96
- - Need a root dashboard? Keep that route host-owned and compose dashboard components.
97
- - Need list-scoped lead-gen runtime behavior? Use the `list` adapter, then `acqDb` for broader acquisition CRUD.
98
- - Need project/task automation? Use `elevasis-sdk project:*`.
99
-
100
- ## Related
101
-
102
- - [Deployment](index.mdx)
103
- - [Command Center](command-center.mdx)
104
- - [UI Execution](ui-execution.mdx)
105
- - [Platform Adapters](../platform-tools/adapters-platform.mdx)
106
- - [CLI Reference](../cli.mdx)
107
-
108
- ---
109
-
110
- **Last Updated:** 2026-03-06