@elevasis/sdk 1.20.2 → 1.22.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 (164) hide show
  1. package/dist/cli.cjs +4220 -1583
  2. package/dist/index.d.ts +1035 -481
  3. package/dist/index.js +7381 -4187
  4. package/dist/node/index.d.ts +1 -3
  5. package/dist/node/index.js +40 -49
  6. package/dist/test-utils/index.d.ts +699 -123
  7. package/dist/test-utils/index.js +3826 -630
  8. package/dist/worker/index.js +3616 -442
  9. package/package.json +3 -3
  10. package/reference/_navigation.md +9 -7
  11. package/reference/_reference-manifest.json +1 -1
  12. package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
  13. package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
  14. package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
  15. package/reference/claude-config/registries/graph-skills.json +4 -4
  16. package/reference/claude-config/registries/knowledge-flags.json +0 -2
  17. package/reference/claude-config/rules/active-change-index.md +80 -80
  18. package/reference/claude-config/rules/agent-start-here.md +277 -273
  19. package/reference/claude-config/rules/deployment.md +57 -57
  20. package/reference/claude-config/rules/error-handling.md +56 -56
  21. package/reference/claude-config/rules/execution.md +40 -40
  22. package/reference/claude-config/rules/frontend.md +4 -4
  23. package/reference/claude-config/rules/observability.md +31 -31
  24. package/reference/claude-config/rules/operations.md +29 -17
  25. package/reference/claude-config/rules/organization-model.md +108 -40
  26. package/reference/claude-config/rules/organization-os.md +115 -113
  27. package/reference/claude-config/rules/package-taxonomy.md +33 -33
  28. package/reference/claude-config/rules/platform.md +42 -42
  29. package/reference/claude-config/rules/shared-types.md +49 -46
  30. package/reference/claude-config/rules/task-tracking.md +47 -47
  31. package/reference/claude-config/rules/ui.md +200 -200
  32. package/reference/claude-config/rules/vibe.md +235 -231
  33. package/reference/claude-config/scripts/statusline-command.js +18 -18
  34. package/reference/claude-config/settings.json +34 -34
  35. package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
  36. package/reference/claude-config/skills/dsp/SKILL.md +66 -66
  37. package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
  38. package/reference/claude-config/skills/explore/SKILL.md +6 -6
  39. package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
  40. package/reference/claude-config/skills/knowledge/SKILL.md +330 -271
  41. package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
  42. package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -158
  43. package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
  44. package/reference/claude-config/skills/knowledge/operations/features.md +76 -113
  45. package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
  46. package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
  47. package/reference/claude-config/skills/knowledge/operations/labels.md +94 -89
  48. package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
  49. package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
  50. package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
  51. package/reference/claude-config/skills/project/SKILL.md +1088 -1088
  52. package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
  53. package/reference/claude-config/skills/save/SKILL.md +3 -3
  54. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  55. package/reference/claude-config/skills/status/SKILL.md +59 -59
  56. package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
  57. package/reference/claude-config/skills/sync/SKILL.md +47 -47
  58. package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
  59. package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
  60. package/reference/claude-config/skills/tutorial/technical.md +1303 -1306
  61. package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
  62. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
  63. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
  64. package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
  65. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
  66. package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
  67. package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
  68. package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
  69. package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
  70. package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
  71. package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
  72. package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
  73. package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
  74. package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
  75. package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
  76. package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
  77. package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
  78. package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
  79. package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
  80. package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
  81. package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
  82. package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
  83. package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
  84. package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +42 -0
  85. package/reference/claude-config/sync-notes/README.md +43 -43
  86. package/reference/cli.mdx +808 -668
  87. package/reference/concepts.mdx +146 -146
  88. package/reference/deployment/api.mdx +297 -297
  89. package/reference/deployment/command-center.mdx +209 -209
  90. package/reference/deployment/index.mdx +195 -195
  91. package/reference/deployment/provided-features.mdx +107 -93
  92. package/reference/deployment/ui-execution.mdx +250 -250
  93. package/reference/examples/organization-model.ts +147 -84
  94. package/reference/framework/agent.mdx +156 -156
  95. package/reference/framework/index.mdx +195 -195
  96. package/reference/framework/interaction-guidance.mdx +182 -182
  97. package/reference/framework/memory.mdx +326 -326
  98. package/reference/framework/project-structure.mdx +282 -282
  99. package/reference/framework/tutorial-system.mdx +135 -135
  100. package/reference/getting-started.mdx +142 -142
  101. package/reference/index.mdx +106 -106
  102. package/reference/packages/core/src/README.md +14 -14
  103. package/reference/packages/core/src/business/README.md +2 -2
  104. package/reference/packages/core/src/knowledge/README.md +33 -32
  105. package/reference/packages/core/src/organization-model/README.md +149 -109
  106. package/reference/packages/core/src/test-utils/README.md +37 -37
  107. package/reference/packages/ui/src/api/README.md +18 -18
  108. package/reference/packages/ui/src/app/README.md +24 -24
  109. package/reference/packages/ui/src/auth/README.md +18 -18
  110. package/reference/packages/ui/src/components/README.md +24 -24
  111. package/reference/packages/ui/src/execution/README.md +16 -16
  112. package/reference/packages/ui/src/features/README.md +28 -28
  113. package/reference/packages/ui/src/graph/README.md +16 -16
  114. package/reference/packages/ui/src/hooks/README.md +23 -23
  115. package/reference/packages/ui/src/initialization/README.md +19 -19
  116. package/reference/packages/ui/src/knowledge/README.md +31 -31
  117. package/reference/packages/ui/src/organization/README.md +18 -18
  118. package/reference/packages/ui/src/profile/README.md +19 -19
  119. package/reference/packages/ui/src/provider/README.md +32 -32
  120. package/reference/packages/ui/src/router/README.md +18 -18
  121. package/reference/packages/ui/src/sse/README.md +13 -13
  122. package/reference/packages/ui/src/test-utils/README.md +7 -7
  123. package/reference/packages/ui/src/theme/README.md +23 -23
  124. package/reference/packages/ui/src/theme/presets/README.md +19 -19
  125. package/reference/packages/ui/src/types/README.md +16 -16
  126. package/reference/packages/ui/src/utils/README.md +18 -18
  127. package/reference/packages/ui/src/zustand/README.md +18 -18
  128. package/reference/platform-tools/adapters-integration.mdx +301 -301
  129. package/reference/platform-tools/adapters-platform.mdx +553 -553
  130. package/reference/platform-tools/index.mdx +217 -217
  131. package/reference/platform-tools/type-safety.mdx +82 -82
  132. package/reference/resources/index.mdx +349 -349
  133. package/reference/resources/patterns.mdx +449 -449
  134. package/reference/resources/types.mdx +116 -116
  135. package/reference/roadmap.mdx +165 -165
  136. package/reference/runtime.mdx +173 -173
  137. package/reference/scaffold/core/organization-graph.mdx +110 -89
  138. package/reference/scaffold/core/organization-model.mdx +226 -171
  139. package/reference/scaffold/index.mdx +67 -67
  140. package/reference/scaffold/operations/propagation-pipeline.md +77 -77
  141. package/reference/scaffold/operations/scaffold-maintenance.md +10 -10
  142. package/reference/scaffold/operations/workflow-recipes.md +138 -138
  143. package/reference/scaffold/recipes/add-a-feature.md +310 -88
  144. package/reference/scaffold/recipes/add-a-resource.md +137 -117
  145. package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
  146. package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
  147. package/reference/scaffold/recipes/customize-organization-model.md +281 -118
  148. package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
  149. package/reference/scaffold/recipes/extend-crm.md +40 -39
  150. package/reference/scaffold/recipes/extend-lead-gen.md +400 -401
  151. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -114
  152. package/reference/scaffold/recipes/index.md +47 -46
  153. package/reference/scaffold/recipes/query-the-knowledge-graph.md +227 -0
  154. package/reference/scaffold/reference/contracts.md +2389 -2121
  155. package/reference/scaffold/reference/feature-registry.md +9 -20
  156. package/reference/scaffold/reference/glossary.md +76 -76
  157. package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
  158. package/reference/scaffold/ui/customization.md +243 -243
  159. package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
  160. package/reference/scaffold/ui/feature-shell.mdx +72 -72
  161. package/reference/scaffold/ui/recipes.md +221 -213
  162. package/reference/spine/spine-primer.md +96 -96
  163. package/reference/templates/index.mdx +47 -47
  164. package/reference/troubleshooting.mdx +223 -223
@@ -1,195 +1,195 @@
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. **Preflight** -- verifies a `.elevasis` marker is reachable from the current directory, that `.env` exists at the project root, and that `ELEVASIS_PLATFORM_KEY` is set. Fails before any side effect if any check fails.
16
- 2. **Authenticate** -- calls the API with your `ELEVASIS_PLATFORM_KEY` to verify credentials and resolve your organization name
17
- 3. **Validate** -- runs your `src/index.ts` through `ResourceRegistry`, catching the same errors as the platform
18
- 4. **Bundle** -- uses esbuild to produce a single self-contained `dist/bundle.js` file (~50-200 KB) containing your code and all dependencies
19
- 5. **Upload** -- sends the bundle and resource metadata to the platform via `POST /api/external/deploy`
20
- 6. **Go live** -- the platform registers your resources; they are immediately available for execution
21
-
22
- 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.
23
-
24
- ---
25
-
26
- ## Invocation CWD
27
-
28
- `elevasis-sdk` is valid from **any subdirectory inside a valid project**. Two separate anchors govern path resolution:
29
-
30
- - **Preflight / auth / env** -- anchors on the `.elevasis` project root, found by walking up from the invocation directory. If no `.elevasis` marker is reachable, the CLI exits non-zero before running the command.
31
- - **Build commands** (`deploy`, `check`) -- anchor on the **nearest `package.json`** (the package root). Bundle outputs land in that package's `dist/`, not the project root. The default entry point (`./src/index.ts`) also resolves from the package root.
32
-
33
- **Single-package project** (e.g. `external/acme/`): both anchors resolve to the same directory. Invoke from anywhere inside the project tree.
34
-
35
- **Multi-package workspace** (e.g. `external/_template/` with `operations/` as a sub-package):
36
-
37
- ```bash
38
- # Invoke from operations/ or any subdir inside it
39
- pnpm -C external/_template/operations exec elevasis-sdk deploy
40
-
41
- # Both CWDs work identically:
42
- # .elevasis root -> external/_template/ (auth / .env)
43
- # package root -> external/_template/operations/ (bundle, dist/)
44
- # bundle output -> external/_template/operations/dist/bundle.js
45
- ```
46
-
47
- Each package in a workspace produces its own `dist/bundle.js` when deployed. Run `elevasis-sdk deploy` from within each package separately.
48
-
49
- **Running outside a valid project** produces a hard failure before any network call:
50
-
51
- ```
52
- Not inside an Elevasis project. Run from a directory under one containing `.elevasis`.
53
- ```
54
-
55
- The only commands that bypass preflight are `--help` / `-h` / `--version` / `-V`.
56
-
57
- ---
58
-
59
- ## Running a Deploy
60
-
61
- ```bash
62
- elevasis-sdk deploy
63
- ```
64
-
65
- **Successful deploy output:**
66
-
67
- ```
68
- Authenticating... done (acme-corp)
69
- Validating... done (4 resources, 0 errors)
70
- Bundling... done (142 KB)
71
- Uploading... done
72
-
73
- Deployed! 4 resources live.
74
- Version: v1.0.0
75
- Duration: 4.2s
76
- ```
77
-
78
- Each deploy creates a new deployment record. The previous active deployment is automatically stopped. You can view all deployments with `elevasis-sdk deployments`.
79
-
80
- ---
81
-
82
- ## Validation
83
-
84
- 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.
85
-
86
- **Validation checks:**
87
-
88
- - Duplicate `resourceId` within your organization
89
- - Invalid model configuration (temperature and token bounds out of range)
90
- - `ExecutionInterface` form fields not matching `inputSchema`
91
- - Broken workflow step chains (`next` referencing a step that does not exist)
92
- - Relationship declarations referencing resources that do not exist
93
-
94
- **Validation failure output:**
95
-
96
- ```
97
- Authenticating... done (acme-corp)
98
- Validating...
99
- ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
100
-
101
- Deploy aborted.
102
- ```
103
-
104
- Run `elevasis-sdk check` at any time to validate without deploying.
105
-
106
- ---
107
-
108
- ## Configuration
109
-
110
- 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.
111
-
112
- ```typescript
113
- // elevasis.config.ts
114
- import type { ElevasConfig } from '@elevasis/sdk'
115
-
116
- export default {} satisfies ElevasConfig
117
- ```
118
-
119
- 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.
120
-
121
- ---
122
-
123
- ## Environment Variables
124
-
125
- | Variable | Required | Description |
126
- | ----------------------- | -------- | --------------------------------------------------------------------------- |
127
- | `ELEVASIS_PLATFORM_KEY` | Yes | Your `sk_...` API key. Used for authentication and organization resolution. |
128
- | `ELEVASIS_API_URL` | No | Override the API base URL. Useful for pointing at a staging environment. |
129
-
130
- The CLI also accepts a `--api-url` flag on every command, which takes priority over `ELEVASIS_API_URL`.
131
-
132
- **API URL resolution order:**
133
-
134
- 1. `--api-url` flag (highest priority)
135
- 2. `--prod` flag (forces production URL, overrides `NODE_ENV=development`)
136
- 3. `ELEVASIS_API_URL` environment variable
137
- 4. `NODE_ENV`-based default (production: `https://api.elevasis.io`, development: localhost)
138
-
139
- **Setting `ELEVASIS_PLATFORM_KEY` via `.env` file:**
140
-
141
- ```
142
- ELEVASIS_PLATFORM_KEY=sk_***
143
- ```
144
-
145
- Place `.env` in your project root (the directory containing `.elevasis`). The CLI walks up directories to find both the `.elevasis` marker and the `.env` file, so running from subdirectories like `operations/` works automatically. Never commit this file.
146
-
147
- ---
148
-
149
- ## Deployment Lifecycle
150
-
151
- Each call to `elevasis-sdk deploy` creates a new deployment. The platform tracks all deployments for your organization.
152
-
153
- | Status | Meaning |
154
- | ----------- | ------------------------------------------------------------ |
155
- | `deploying` | Bundle is being processed and resources are being registered |
156
- | `active` | Resources are live and available for execution |
157
- | `stopped` | Superseded by a newer deployment |
158
- | `failed` | Deploy did not complete (validation or bundle error) |
159
-
160
- Only one deployment can be `active` at a time. Deploying again automatically moves the previous active deployment to `stopped`.
161
-
162
- **View deployment history:**
163
-
164
- ```bash
165
- elevasis-sdk deployments
166
- ```
167
-
168
- ```
169
- deploy_abc123 active 2026-02-25 14:00:00 4 resources
170
- deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
171
- deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
172
- ```
173
-
174
- ---
175
-
176
- ## Bundle Details
177
-
178
- The deploy bundle is a single CJS file produced by esbuild. It includes:
179
-
180
- - Your resource definitions from `src/index.ts`
181
- - The `@elevasis/sdk/worker` runtime that handles execution messages from the platform
182
- - All your npm dependencies (fully self-contained, no `node_modules` needed on the server)
183
-
184
- 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.
185
-
186
- ## Documentation
187
-
188
- - [Command Center](command-center.mdx) - Resource graph, relationships, node types, and post-deployment UI reference
189
- - [Provided Features](provided-features.mdx) - Shared Lead Gen, CRM, Projects, and feature-shell surfaces for downstream apps and agents
190
- - [Execution API](api.mdx) - REST endpoints for executing resources and managing deployments
191
- - [UI Execution](ui-execution.mdx) - Custom React run dialogs, forms, and hooks for triggering resource executions
192
-
193
- ---
194
-
195
- **Last Updated:** 2026-04-23
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. **Preflight** -- verifies a `.elevasis` marker is reachable from the current directory, that `.env` exists at the project root, and that `ELEVASIS_PLATFORM_KEY` is set. Fails before any side effect if any check fails.
16
+ 2. **Authenticate** -- calls the API with your `ELEVASIS_PLATFORM_KEY` to verify credentials and resolve your organization name
17
+ 3. **Validate** -- runs your `src/index.ts` through `ResourceRegistry`, catching the same errors as the platform
18
+ 4. **Bundle** -- uses esbuild to produce a single self-contained `dist/bundle.js` file (~50-200 KB) containing your code and all dependencies
19
+ 5. **Upload** -- sends the bundle and resource metadata to the platform via `POST /api/external/deploy`
20
+ 6. **Go live** -- the platform registers your resources; they are immediately available for execution
21
+
22
+ 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.
23
+
24
+ ---
25
+
26
+ ## Invocation CWD
27
+
28
+ `elevasis-sdk` is valid from **any subdirectory inside a valid project**. Two separate anchors govern path resolution:
29
+
30
+ - **Preflight / auth / env** -- anchors on the `.elevasis` project root, found by walking up from the invocation directory. If no `.elevasis` marker is reachable, the CLI exits non-zero before running the command.
31
+ - **Build commands** (`deploy`, `check`) -- anchor on the **nearest `package.json`** (the package root). Bundle outputs land in that package's `dist/`, not the project root. The default entry point (`./src/index.ts`) also resolves from the package root.
32
+
33
+ **Single-package project** (e.g. `external/acme/`): both anchors resolve to the same directory. Invoke from anywhere inside the project tree.
34
+
35
+ **Multi-package workspace** (e.g. `external/_template/` with `operations/` as a sub-package):
36
+
37
+ ```bash
38
+ # Invoke from operations/ or any subdir inside it
39
+ pnpm -C external/_template/operations exec elevasis-sdk deploy
40
+
41
+ # Both CWDs work identically:
42
+ # .elevasis root -> external/_template/ (auth / .env)
43
+ # package root -> external/_template/operations/ (bundle, dist/)
44
+ # bundle output -> external/_template/operations/dist/bundle.js
45
+ ```
46
+
47
+ Each package in a workspace produces its own `dist/bundle.js` when deployed. Run `elevasis-sdk deploy` from within each package separately.
48
+
49
+ **Running outside a valid project** produces a hard failure before any network call:
50
+
51
+ ```
52
+ Not inside an Elevasis project. Run from a directory under one containing `.elevasis`.
53
+ ```
54
+
55
+ The only commands that bypass preflight are `--help` / `-h` / `--version` / `-V`.
56
+
57
+ ---
58
+
59
+ ## Running a Deploy
60
+
61
+ ```bash
62
+ elevasis-sdk deploy
63
+ ```
64
+
65
+ **Successful deploy output:**
66
+
67
+ ```
68
+ Authenticating... done (acme-corp)
69
+ Validating... done (4 resources, 0 errors)
70
+ Bundling... done (142 KB)
71
+ Uploading... done
72
+
73
+ Deployed! 4 resources live.
74
+ Version: v1.0.0
75
+ Duration: 4.2s
76
+ ```
77
+
78
+ Each deploy creates a new deployment record. The previous active deployment is automatically stopped. You can view all deployments with `elevasis-sdk deployments`.
79
+
80
+ ---
81
+
82
+ ## Validation
83
+
84
+ 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.
85
+
86
+ **Validation checks:**
87
+
88
+ - Duplicate `resourceId` within your organization
89
+ - Invalid model configuration (temperature and token bounds out of range)
90
+ - `ExecutionInterface` form fields not matching `inputSchema`
91
+ - Broken workflow step chains (`next` referencing a step that does not exist)
92
+ - Relationship declarations referencing resources that do not exist
93
+
94
+ **Validation failure output:**
95
+
96
+ ```
97
+ Authenticating... done (acme-corp)
98
+ Validating...
99
+ ERROR Duplicate resource ID 'onboard-client' in organization 'Acme Corp'
100
+
101
+ Deploy aborted.
102
+ ```
103
+
104
+ Run `elevasis-sdk check` at any time to validate without deploying.
105
+
106
+ ---
107
+
108
+ ## Configuration
109
+
110
+ 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.
111
+
112
+ ```typescript
113
+ // elevasis.config.ts
114
+ import type { ElevasConfig } from '@elevasis/sdk'
115
+
116
+ export default {} satisfies ElevasConfig
117
+ ```
118
+
119
+ 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.
120
+
121
+ ---
122
+
123
+ ## Environment Variables
124
+
125
+ | Variable | Required | Description |
126
+ | ----------------------- | -------- | --------------------------------------------------------------------------- |
127
+ | `ELEVASIS_PLATFORM_KEY` | Yes | Your `sk_...` API key. Used for authentication and organization resolution. |
128
+ | `ELEVASIS_API_URL` | No | Override the API base URL. Useful for pointing at a staging environment. |
129
+
130
+ The CLI also accepts a `--api-url` flag on every command, which takes priority over `ELEVASIS_API_URL`.
131
+
132
+ **API URL resolution order:**
133
+
134
+ 1. `--api-url` flag (highest priority)
135
+ 2. `--prod` flag (forces production URL, overrides `NODE_ENV=development`)
136
+ 3. `ELEVASIS_API_URL` environment variable
137
+ 4. `NODE_ENV`-based default (production: `https://api.elevasis.io`, development: localhost)
138
+
139
+ **Setting `ELEVASIS_PLATFORM_KEY` via `.env` file:**
140
+
141
+ ```
142
+ ELEVASIS_PLATFORM_KEY=sk_***
143
+ ```
144
+
145
+ Place `.env` in your project root (the directory containing `.elevasis`). The CLI walks up directories to find both the `.elevasis` marker and the `.env` file, so running from subdirectories like `operations/` works automatically. Never commit this file.
146
+
147
+ ---
148
+
149
+ ## Deployment Lifecycle
150
+
151
+ Each call to `elevasis-sdk deploy` creates a new deployment. The platform tracks all deployments for your organization.
152
+
153
+ | Status | Meaning |
154
+ | ----------- | ------------------------------------------------------------ |
155
+ | `deploying` | Bundle is being processed and resources are being registered |
156
+ | `active` | Resources are live and available for execution |
157
+ | `stopped` | Superseded by a newer deployment |
158
+ | `failed` | Deploy did not complete (validation or bundle error) |
159
+
160
+ Only one deployment can be `active` at a time. Deploying again automatically moves the previous active deployment to `stopped`.
161
+
162
+ **View deployment history:**
163
+
164
+ ```bash
165
+ elevasis-sdk deployments
166
+ ```
167
+
168
+ ```
169
+ deploy_abc123 active 2026-02-25 14:00:00 4 resources
170
+ deploy_abc122 stopped 2026-02-24 09:30:00 3 resources
171
+ deploy_abc121 stopped 2026-02-23 11:15:00 3 resources
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Bundle Details
177
+
178
+ The deploy bundle is a single CJS file produced by esbuild. It includes:
179
+
180
+ - Your resource definitions from `src/index.ts`
181
+ - The `@elevasis/sdk/worker` runtime that handles execution messages from the platform
182
+ - All your npm dependencies (fully self-contained, no `node_modules` needed on the server)
183
+
184
+ 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.
185
+
186
+ ## Documentation
187
+
188
+ - [Command Center](command-center.mdx) - Resource graph, relationships, node types, and post-deployment UI reference
189
+ - [Provided Features](provided-features.mdx) - Shared Lead Gen, CRM, Projects, and feature-shell surfaces for downstream apps and agents
190
+ - [Execution API](api.mdx) - REST endpoints for executing resources and managing deployments
191
+ - [UI Execution](ui-execution.mdx) - Custom React run dialogs, forms, and hooks for triggering resource executions
192
+
193
+ ---
194
+
195
+ **Last Updated:** 2026-04-23
@@ -1,93 +1,107 @@
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
- loadWhen: "Building against packaged app features, list-oriented lead gen, CRM, or project-management surfaces"
5
- ---
6
-
7
- The SDK includes more than workflow execution. The published `@elevasis/ui` package provides feature manifests, pages, hooks, and headless provider exports for building shell-aware applications.
8
-
9
- ## Shared Shell Contract
10
-
11
- `ElevasisFeaturesProvider` reads a flat `OrganizationModel.features` list and exposes a shell model with feature-tree helpers. Feature manifests provide implementation hooks such as icons and sidebars; they do not own structural navigation.
12
-
13
- ```tsx
14
- import { Outlet } from '@tanstack/react-router'
15
- import { ElevasisFeaturesProvider, FeatureShell } from '@elevasis/ui/provider'
16
- import { leadGenManifest } from '@elevasis/ui/features/lead-gen'
17
- import { crmManifest } from '@elevasis/ui/features/crm'
18
- import { deliveryManifest } from '@elevasis/ui/features/delivery'
19
- import { monitoringManifest } from '@elevasis/ui/features/monitoring'
20
- import { settingsManifest } from '@elevasis/ui/features/settings'
21
- import { canonicalOrganizationModel } from '@foundation/config/organization-model'
22
-
23
- const features = [
24
- leadGenManifest,
25
- crmManifest,
26
- deliveryManifest,
27
- monitoringManifest,
28
- settingsManifest
29
- ]
30
-
31
- export function AppShell() {
32
- return (
33
- <ElevasisFeaturesProvider features={features} organizationModel={canonicalOrganizationModel}>
34
- <FeatureShell>
35
- <Outlet />
36
- </FeatureShell>
37
- </ElevasisFeaturesProvider>
38
- )
39
- }
40
- ```
41
-
42
- Host apps still own TanStack route registration, topbar behavior, branding, auth wiring, and any root dashboard composition.
43
-
44
- ## Contract Matrix
45
-
46
- | Contract type | What is published | Current examples |
47
- | --- | --- | --- |
48
- | Manifest-backed shared subshell features | Feature manifest plus shared sidebar/pages, mounted through `@elevasis/ui/provider` | Lead Gen, CRM, Projects, Operations |
49
- | Shared feature pages and hooks | Pages, hooks, and helpers that can be composed inside host routes | Monitoring, Settings, Dashboard widgets |
50
- | Headless provider contract | Provider, hooks, and shell model helpers | `ElevasisFeaturesProvider`, `useElevasisFeatures`, `FeatureShell` |
51
- | Compatibility barrel | Existing imports remain available while newer integrations prefer feature/provider subpaths | `@elevasis/ui/components` |
52
-
53
- ## System Map
54
-
55
- | System | Primary route space | Shared UI surface | Best SDK entry point |
56
- | --- | --- | --- | --- |
57
- | Lead Gen | `/lead-gen/*` | Lead Gen pages, sidebars, list detail page, run dialogs | `@elevasis/ui/features/lead-gen`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
58
- | CRM | `/crm/*` | CRM sidebar, overview widgets, deal/detail pages, workbench panels | `@elevasis/ui/features/crm`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
59
- | Projects | `/projects/*` | Projects list page, milestones/tasks/notes sidebars and pages | `@elevasis/ui/features/delivery`, `@elevasis/ui/hooks/delivery`, `elevasis-sdk project:*` |
60
- | Operations | `/operations/*` | Command View, resources, organization graph, sessions | `@elevasis/ui/features/operations` |
61
- | Dashboard | `/` host-owned | Dashboard and overview components only | `@elevasis/ui/features/dashboard` |
62
- | Monitoring | `/monitoring/*` | Monitoring pages/components | `@elevasis/ui/features/monitoring` |
63
- | Settings | `/settings/*` | Settings/account/org components | `@elevasis/ui/features/settings` |
64
-
65
- ## Organization Model Alignment
66
-
67
- Feature IDs in manifests must match Organization Model feature IDs:
68
-
69
- ```ts
70
- features: [
71
- { id: 'dashboard', label: 'Dashboard', enabled: true, path: '/', uiPosition: 'sidebar-primary' },
72
- { id: 'sales', label: 'Sales', enabled: true, uiPosition: 'sidebar-primary' },
73
- { id: 'sales.crm', label: 'CRM', enabled: true, path: '/crm' },
74
- { id: 'operations.resources', label: 'Resources', enabled: true, path: '/operations/resources' }
75
- ]
76
- ```
77
-
78
- Sidebar hierarchy is derived from dotted IDs. Containers omit `path`; leaves provide `path`.
79
-
80
- ## Choosing The Right Surface
81
-
82
- - Need packaged sidebar/page composition? Use `ElevasisFeaturesProvider`, `FeatureShell`, and manifests from `@elevasis/ui/features/*`.
83
- - Need a root dashboard? Keep that route host-owned and compose dashboard components.
84
- - Need list-scoped lead-gen runtime behavior? Use the `list` adapter, then `acqDb` for broader acquisition CRUD.
85
- - Need project/task automation? Use `elevasis-sdk project:*`.
86
-
87
- ## Related
88
-
89
- - [Deployment](index.mdx)
90
- - [Command Center](command-center.mdx)
91
- - [UI Execution](ui-execution.mdx)
92
- - [Platform Adapters](../platform-tools/adapters-platform.mdx)
93
- - [CLI Reference](../cli.mdx)
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
+ loadWhen: "Building against packaged app features, list-oriented lead gen, CRM, or project-management surfaces"
5
+ ---
6
+
7
+ 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.
8
+
9
+ ## Shared Shell Contract
10
+
11
+ `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.
12
+
13
+ ```tsx
14
+ import { Outlet } from '@tanstack/react-router'
15
+ import { ElevasisSystemsProvider, SystemShell } from '@elevasis/ui/provider'
16
+ import { leadGenManifest } from '@elevasis/ui/features/lead-gen'
17
+ import { crmManifest } from '@elevasis/ui/features/crm'
18
+ import { deliveryManifest } from '@elevasis/ui/features/delivery'
19
+ import { monitoringManifest } from '@elevasis/ui/features/monitoring'
20
+ import { settingsManifest } from '@elevasis/ui/features/settings'
21
+ import { canonicalOrganizationModel } from '@core/config/organization-model'
22
+
23
+ const systems = [
24
+ leadGenManifest,
25
+ crmManifest,
26
+ deliveryManifest,
27
+ monitoringManifest,
28
+ settingsManifest
29
+ ]
30
+
31
+ export function AppShell() {
32
+ return (
33
+ <ElevasisSystemsProvider systems={systems} organizationModel={canonicalOrganizationModel}>
34
+ <SystemShell>
35
+ <Outlet />
36
+ </SystemShell>
37
+ </ElevasisSystemsProvider>
38
+ )
39
+ }
40
+ ```
41
+
42
+ Host apps still own TanStack route registration, topbar behavior, branding, auth wiring, and any root dashboard composition.
43
+
44
+ ## Contract Matrix
45
+
46
+ | Contract type | What is published | Current examples |
47
+ | --- | --- | --- |
48
+ | Manifest-backed shared subshell systems | System manifest plus shared sidebar/pages, mounted through `@elevasis/ui/provider` | Lead Gen, CRM, Projects, Operations |
49
+ | Shared feature pages and hooks | Pages, hooks, and helpers that can be composed inside host routes | Monitoring, Settings, Dashboard widgets |
50
+ | Headless provider contract | Provider, hooks, and shell model helpers | `ElevasisSystemsProvider`, `useElevasisSystems`, `SystemShell` |
51
+ | Compatibility barrel | Existing imports remain available while newer integrations prefer feature/provider subpaths | `@elevasis/ui/components` |
52
+
53
+ ## System Map
54
+
55
+ | System | Primary route space | Shared UI surface | Best SDK entry point |
56
+ | --- | --- | --- | --- |
57
+ | Lead Gen | `/lead-gen/*` | Lead Gen pages, sidebars, list detail page, run dialogs | `@elevasis/ui/features/lead-gen`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
58
+ | CRM | `/crm/*` | CRM sidebar, overview widgets, deal/detail pages, workbench panels | `@elevasis/ui/features/crm`, `@elevasis/ui/hooks`, `@elevasis/sdk/worker` |
59
+ | Projects | `/projects/*` | Projects list page, milestones/tasks/notes sidebars and pages | `@elevasis/ui/features/delivery`, `@elevasis/ui/hooks/delivery`, `elevasis-sdk project:*` |
60
+ | Operations | `/operations/*` | Command View, resources, organization graph, sessions | `@elevasis/ui/features/operations` |
61
+ | Dashboard | `/` host-owned | Dashboard and overview components only | `@elevasis/ui/features/dashboard` |
62
+ | Monitoring | `/monitoring/*` | Monitoring pages/components | `@elevasis/ui/features/monitoring` |
63
+ | Settings | `/settings/*` | Settings/account/org components | `@elevasis/ui/features/settings` |
64
+
65
+ ## Organization Model Alignment
66
+
67
+ Manifest `systemId` values must match Organization Model System IDs. Sidebar placement is authored in the Organization Model navigation domain:
68
+
69
+ ```ts
70
+ systems: {
71
+ dashboard: { id: 'dashboard', order: 10, label: 'Dashboard', lifecycle: 'active' },
72
+ clients: { id: 'clients', order: 20, label: 'Clients', lifecycle: 'active' }
73
+ },
74
+ navigation: {
75
+ sidebar: {
76
+ primary: {
77
+ dashboard: { type: 'surface', order: 10, label: 'Dashboard', path: '/', surfaceType: 'dashboard', targets: { systems: ['dashboard'] } },
78
+ business: {
79
+ type: 'group',
80
+ order: 20,
81
+ label: 'Business',
82
+ children: {
83
+ clients: { type: 'surface', order: 20, label: 'Clients', path: '/clients', surfaceType: 'list', targets: { systems: ['clients'] } }
84
+ }
85
+ }
86
+ },
87
+ bottom: {}
88
+ }
89
+ }
90
+ ```
91
+
92
+ Dashboard appears before Business in the primary sidebar. Business is a navigation group only; `/clients` is the canonical client route.
93
+
94
+ ## Choosing The Right Surface
95
+
96
+ - Need packaged sidebar/page composition? Use `ElevasisSystemsProvider`, `SystemShell`, and manifests from `@elevasis/ui/features/*`.
97
+ - Need a root dashboard? Keep that route host-owned and compose dashboard components.
98
+ - Need list-scoped lead-gen runtime behavior? Use the `list` adapter, then `acqDb` for broader acquisition CRUD.
99
+ - Need project/task automation? Use `elevasis-sdk project:*`.
100
+
101
+ ## Related
102
+
103
+ - [Deployment](index.mdx)
104
+ - [Command Center](command-center.mdx)
105
+ - [UI Execution](ui-execution.mdx)
106
+ - [Platform Adapters](../platform-tools/adapters-platform.mdx)
107
+ - [CLI Reference](../cli.mdx)