@elevasis/sdk 1.21.0 → 1.22.1
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 +1239 -173
- package/dist/index.d.ts +1752 -464
- package/dist/index.js +3477 -143
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +19 -1
- package/dist/test-utils/index.d.ts +1188 -127
- package/dist/test-utils/index.js +3359 -152
- package/dist/worker/index.js +3148 -80
- package/package.json +2 -2
- package/reference/claude-config/hooks/post-edit-validate.mjs +98 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +188 -188
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +73 -73
- package/reference/claude-config/registries/graph-skills.json +4 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -2
- package/reference/claude-config/rules/active-change-index.md +80 -80
- package/reference/claude-config/rules/agent-start-here.md +277 -277
- package/reference/claude-config/rules/deployment.md +57 -57
- package/reference/claude-config/rules/error-handling.md +56 -56
- package/reference/claude-config/rules/execution.md +40 -40
- package/reference/claude-config/rules/frontend.md +4 -4
- package/reference/claude-config/rules/observability.md +31 -31
- package/reference/claude-config/rules/operations.md +29 -17
- package/reference/claude-config/rules/organization-model.md +113 -81
- package/reference/claude-config/rules/organization-os.md +115 -113
- package/reference/claude-config/rules/package-taxonomy.md +33 -33
- package/reference/claude-config/rules/platform.md +42 -42
- package/reference/claude-config/rules/shared-types.md +49 -46
- package/reference/claude-config/rules/task-tracking.md +47 -47
- package/reference/claude-config/rules/ui.md +200 -200
- package/reference/claude-config/rules/vibe.md +235 -235
- package/reference/claude-config/scripts/statusline-command.js +18 -18
- package/reference/claude-config/settings.json +34 -34
- package/reference/claude-config/skills/deploy/{SKILL.md → skill.md} +156 -156
- package/reference/claude-config/skills/dsp/SKILL.md +66 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +235 -235
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/git-sync/SKILL.md +126 -126
- package/reference/claude-config/skills/knowledge/SKILL.md +314 -299
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +100 -100
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +159 -159
- package/reference/claude-config/skills/knowledge/operations/customers.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/features.md +76 -76
- package/reference/claude-config/skills/knowledge/operations/goals.md +118 -118
- package/reference/claude-config/skills/knowledge/operations/identity.md +93 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +94 -94
- package/reference/claude-config/skills/knowledge/operations/offerings.md +109 -109
- package/reference/claude-config/skills/knowledge/operations/roles.md +99 -99
- package/reference/claude-config/skills/knowledge/operations/techStack.md +30 -30
- package/reference/claude-config/skills/project/SKILL.md +1088 -1088
- package/reference/claude-config/skills/run-ui/SKILL.md +73 -73
- package/reference/claude-config/skills/save/SKILL.md +3 -3
- package/reference/claude-config/skills/setup/SKILL.md +275 -275
- package/reference/claude-config/skills/status/SKILL.md +59 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +180 -180
- package/reference/claude-config/skills/sync/SKILL.md +47 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +259 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +74 -74
- package/reference/claude-config/skills/tutorial/technical.md +1303 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +890 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +55 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +97 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +112 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +93 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +58 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +56 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +71 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +83 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +59 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +42 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +60 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +37 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +34 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +38 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +32 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +33 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +69 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +45 -0
- package/reference/claude-config/sync-notes/README.md +43 -43
- package/reference/cli.mdx +808 -808
- package/reference/concepts.mdx +146 -146
- package/reference/deployment/api.mdx +297 -297
- package/reference/deployment/command-center.mdx +209 -209
- package/reference/deployment/index.mdx +195 -195
- package/reference/deployment/provided-features.mdx +107 -107
- package/reference/deployment/ui-execution.mdx +250 -250
- package/reference/examples/organization-model.ts +171 -84
- package/reference/framework/agent.mdx +156 -156
- package/reference/framework/index.mdx +195 -195
- package/reference/framework/interaction-guidance.mdx +182 -182
- package/reference/framework/memory.mdx +326 -326
- package/reference/framework/project-structure.mdx +282 -282
- package/reference/framework/tutorial-system.mdx +135 -135
- package/reference/getting-started.mdx +142 -142
- package/reference/index.mdx +106 -106
- package/reference/packages/core/src/README.md +14 -14
- package/reference/packages/core/src/business/README.md +2 -2
- package/reference/packages/core/src/knowledge/README.md +32 -32
- package/reference/packages/core/src/organization-model/README.md +149 -149
- package/reference/packages/core/src/test-utils/README.md +37 -37
- package/reference/packages/ui/src/api/README.md +18 -18
- package/reference/packages/ui/src/app/README.md +24 -24
- package/reference/packages/ui/src/auth/README.md +18 -18
- package/reference/packages/ui/src/components/README.md +24 -24
- package/reference/packages/ui/src/execution/README.md +16 -16
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/packages/ui/src/graph/README.md +16 -16
- package/reference/packages/ui/src/hooks/README.md +23 -23
- package/reference/packages/ui/src/initialization/README.md +19 -19
- package/reference/packages/ui/src/knowledge/README.md +31 -31
- package/reference/packages/ui/src/organization/README.md +18 -18
- package/reference/packages/ui/src/profile/README.md +19 -19
- package/reference/packages/ui/src/provider/README.md +32 -32
- package/reference/packages/ui/src/router/README.md +18 -18
- package/reference/packages/ui/src/sse/README.md +13 -13
- package/reference/packages/ui/src/test-utils/README.md +7 -7
- package/reference/packages/ui/src/theme/README.md +23 -23
- package/reference/packages/ui/src/theme/presets/README.md +19 -19
- package/reference/packages/ui/src/types/README.md +16 -16
- package/reference/packages/ui/src/utils/README.md +18 -18
- package/reference/packages/ui/src/zustand/README.md +18 -18
- package/reference/platform-tools/adapters-integration.mdx +301 -301
- package/reference/platform-tools/adapters-platform.mdx +553 -553
- package/reference/platform-tools/index.mdx +217 -217
- package/reference/platform-tools/type-safety.mdx +82 -82
- package/reference/resources/index.mdx +349 -349
- package/reference/resources/patterns.mdx +449 -449
- package/reference/resources/types.mdx +116 -116
- package/reference/roadmap.mdx +165 -165
- package/reference/runtime.mdx +173 -173
- package/reference/scaffold/core/organization-graph.mdx +110 -90
- package/reference/scaffold/core/organization-model.mdx +225 -213
- package/reference/scaffold/index.mdx +67 -67
- package/reference/scaffold/operations/propagation-pipeline.md +77 -77
- package/reference/scaffold/operations/scaffold-maintenance.md +12 -12
- package/reference/scaffold/operations/workflow-recipes.md +138 -138
- package/reference/scaffold/recipes/add-a-feature.md +307 -85
- package/reference/scaffold/recipes/add-a-resource.md +137 -103
- package/reference/scaffold/recipes/customize-knowledge-browser.md +5 -5
- package/reference/scaffold/recipes/customize-organization-model.md +275 -138
- package/reference/scaffold/recipes/extend-a-base-entity.md +8 -8
- package/reference/scaffold/recipes/extend-crm.md +3 -3
- package/reference/scaffold/recipes/extend-lead-gen.md +394 -394
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +118 -118
- package/reference/scaffold/recipes/index.md +46 -46
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +197 -170
- package/reference/scaffold/reference/contracts.md +2136 -2093
- package/reference/scaffold/reference/glossary.md +76 -76
- package/reference/scaffold/ui/composition-extensibility.mdx +233 -233
- package/reference/scaffold/ui/customization.md +243 -243
- package/reference/scaffold/ui/feature-flags-and-gating.md +46 -46
- package/reference/scaffold/ui/feature-shell.mdx +72 -72
- package/reference/scaffold/ui/recipes.md +221 -214
- package/reference/spine/spine-primer.md +96 -96
- package/reference/templates/index.mdx +47 -47
- package/reference/troubleshooting.mdx +223 -223
|
@@ -1,235 +1,235 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: elevasis
|
|
3
|
-
description: Elevasis platform operations -- check, deploy, execute, inspect, and debug SDK resources
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Elevasis Platform Operations
|
|
7
|
-
|
|
8
|
-
Manage SDK resources in the `operations/` workspace via the `elevasis-sdk` CLI.
|
|
9
|
-
|
|
10
|
-
**Usage:**
|
|
11
|
-
|
|
12
|
-
- `/elevasis` -- Show available operations
|
|
13
|
-
- `/elevasis check` -- Validate resource definitions
|
|
14
|
-
- `/elevasis deploy [--prod]` -- Deploy resources
|
|
15
|
-
- `/elevasis exec <resourceId> [--input '...']` -- Execute a resource
|
|
16
|
-
- `/elevasis describe <resourceId>` -- Show resource schema
|
|
17
|
-
- `/elevasis logs <resourceId>` -- View recent executions
|
|
18
|
-
- `/elevasis creds` -- Manage credentials
|
|
19
|
-
|
|
20
|
-
## Critical Rules
|
|
21
|
-
|
|
22
|
-
- **Always describe before exec** -- run `describe` first to see the exact input schema
|
|
23
|
-
- **Use `-f` for complex inputs** -- write JSON to a temp file to avoid shell escaping issues
|
|
24
|
-
- **Always `check` before `deploy`** -- catches schema and config errors early
|
|
25
|
-
|
|
26
|
-
## Environment
|
|
27
|
-
|
|
28
|
-
The CLI authenticates via `ELEVASIS_PLATFORM_KEY` in the root `.env` file. The CLI walks up directories to find `.env`, so it works from both the project root and `operations/`.
|
|
29
|
-
|
|
30
|
-
For dev vs prod targeting:
|
|
31
|
-
|
|
32
|
-
- Default: production (`https://api.elevasis.io`)
|
|
33
|
-
- `--prod` flag: explicitly targets production (overrides `NODE_ENV=development`)
|
|
34
|
-
- `ELEVASIS_API_URL` env var: override to any custom URL
|
|
35
|
-
|
|
36
|
-
## Operations
|
|
37
|
-
|
|
38
|
-
### Check
|
|
39
|
-
|
|
40
|
-
Validate all resource definitions (schemas, contracts, config):
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
pnpm elevasis-sdk check
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Reports: resource count, validation errors, schema serialization warnings. Exit code 0 = pass.
|
|
47
|
-
|
|
48
|
-
### Deploy
|
|
49
|
-
|
|
50
|
-
Bundle and deploy resources to the Elevasis platform.
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
pnpm elevasis-sdk deploy [--prod]
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Replace `[--prod]` with `--prod` when targeting production.
|
|
57
|
-
|
|
58
|
-
**Version bumping flags** (written back to `src/index.ts`):
|
|
59
|
-
|
|
60
|
-
- `--major` -- bump major (1.0.0 to 2.0.0) for breaking contract changes
|
|
61
|
-
- `--minor` -- bump minor (1.0.0 to 1.1.0) for new features
|
|
62
|
-
- `--patch` -- bump patch (1.0.0 to 1.0.1) for fixes
|
|
63
|
-
|
|
64
|
-
Deploy replaces the previous active deployment. Resources become executable immediately.
|
|
65
|
-
|
|
66
|
-
### Describe
|
|
67
|
-
|
|
68
|
-
**Always run before executing.** Shows resource metadata, input/output schemas, and step chain:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
pnpm elevasis-sdk describe <resourceId>
|
|
72
|
-
|
|
73
|
-
# JSON output for programmatic use
|
|
74
|
-
pnpm elevasis-sdk describe <resourceId> --json
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Output includes: type, name, version, status, domains, input schema (required/optional fields with types), output schema, step definitions with entry point and routing.
|
|
78
|
-
|
|
79
|
-
### Execute
|
|
80
|
-
|
|
81
|
-
Run a deployed resource. **Always `describe` first to see the input schema.**
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# Simple input (inline JSON)
|
|
85
|
-
pnpm elevasis-sdk exec <resourceId> -i '{"key": "value"}'
|
|
86
|
-
|
|
87
|
-
# Complex input (temp file -- PREFERRED for non-trivial payloads)
|
|
88
|
-
# Write input to a temp file first, then reference it with -f
|
|
89
|
-
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json
|
|
90
|
-
|
|
91
|
-
# Async execution (for long-running workflows -- polls until complete)
|
|
92
|
-
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json --async
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**When to use `-f` (file input):**
|
|
96
|
-
|
|
97
|
-
- Input contains nested objects, arrays, or special characters
|
|
98
|
-
- Input has quotes that conflict with shell escaping
|
|
99
|
-
- Input is reused across multiple executions
|
|
100
|
-
- Any time inline `-i` causes parsing errors
|
|
101
|
-
|
|
102
|
-
**Temp file pattern:**
|
|
103
|
-
|
|
104
|
-
1. Write the JSON to a temp file inside the project (e.g., `operations/.tmp-input.json`)
|
|
105
|
-
2. Execute with `-f .tmp-input.json`
|
|
106
|
-
3. Delete the temp file after
|
|
107
|
-
|
|
108
|
-
**Sync vs async:**
|
|
109
|
-
|
|
110
|
-
- Sync (default): blocks until execution completes, shows result inline
|
|
111
|
-
- Async (`--async`): returns execution ID immediately, polls every 3s with elapsed timer
|
|
112
|
-
- Use `--async` for workflows that may exceed 30 seconds
|
|
113
|
-
|
|
114
|
-
**Connection failure recovery:** If the connection drops during sync execution, the CLI automatically searches recent executions for a running one and resumes polling.
|
|
115
|
-
|
|
116
|
-
### List Resources
|
|
117
|
-
|
|
118
|
-
View all deployed resources:
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
pnpm elevasis-sdk resources
|
|
122
|
-
|
|
123
|
-
# JSON output
|
|
124
|
-
pnpm elevasis-sdk resources --json
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Shows: resource ID, type (workflow/agent), name, description, status.
|
|
128
|
-
|
|
129
|
-
### Execution History
|
|
130
|
-
|
|
131
|
-
View past executions for a resource:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
# List recent executions (default: last 50)
|
|
135
|
-
pnpm elevasis-sdk executions <resourceId>
|
|
136
|
-
|
|
137
|
-
# Filter by status
|
|
138
|
-
pnpm elevasis-sdk executions <resourceId> --status failed --limit 10
|
|
139
|
-
|
|
140
|
-
# View specific execution (full detail with logs)
|
|
141
|
-
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
142
|
-
|
|
143
|
-
# Logs only (skip metadata)
|
|
144
|
-
pnpm elevasis-sdk execution <resourceId> <executionId> --logs-only
|
|
145
|
-
|
|
146
|
-
# Include input and result data
|
|
147
|
-
pnpm elevasis-sdk execution <resourceId> <executionId> --input --result
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**`executions` flags:** `--limit <n>` (default 50), `--status running|completed|failed`, `--json`
|
|
151
|
-
|
|
152
|
-
**`execution` flags:** `--logs-only`, `--input`, `--result`, `--json`
|
|
153
|
-
|
|
154
|
-
Execution detail shows: status, start/end times, duration, input, result, error (if failed), and timestamped logs with level (ERROR/WARN/INFO/DEBUG).
|
|
155
|
-
|
|
156
|
-
### Deployments
|
|
157
|
-
|
|
158
|
-
View deployment history:
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
pnpm elevasis-sdk deployments
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Shows: deployment ID, SDK version, status (active/deploying/failed/stopped), created timestamp.
|
|
165
|
-
|
|
166
|
-
### Credentials
|
|
167
|
-
|
|
168
|
-
Manage integration credentials (API keys, webhook secrets):
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
# List credentials (metadata only, secrets not exposed)
|
|
172
|
-
pnpm elevasis-sdk creds list
|
|
173
|
-
|
|
174
|
-
# Create a credential
|
|
175
|
-
pnpm elevasis-sdk creds create --name my-api-key --type api-key --value '{"apiKey":"sk-..."}'
|
|
176
|
-
|
|
177
|
-
# Update a credential value
|
|
178
|
-
pnpm elevasis-sdk creds update my-api-key --value '{"apiKey":"new-key"}'
|
|
179
|
-
|
|
180
|
-
# Rename a credential
|
|
181
|
-
pnpm elevasis-sdk creds rename old-name --to new-name
|
|
182
|
-
|
|
183
|
-
# Delete a credential
|
|
184
|
-
pnpm elevasis-sdk creds delete my-api-key --force
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
Credential names: lowercase, digits, hyphens only (`^[a-z0-9]+(-[a-z0-9]+)*$`). Types: `api-key`, `webhook-secret`.
|
|
188
|
-
|
|
189
|
-
### Rename Resource
|
|
190
|
-
|
|
191
|
-
Rename a resource ID across all platform tables:
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
# Dry run (preview only)
|
|
195
|
-
pnpm elevasis-sdk rename old-id --to new-id
|
|
196
|
-
|
|
197
|
-
# Apply rename
|
|
198
|
-
pnpm elevasis-sdk rename old-id --to new-id --execute
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
Always dry-run first to see affected tables and row counts.
|
|
202
|
-
|
|
203
|
-
### Error Resolution
|
|
204
|
-
|
|
205
|
-
Mark execution errors as resolved:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
# Resolve a specific error
|
|
209
|
-
pnpm elevasis-sdk error resolve <errorId>
|
|
210
|
-
|
|
211
|
-
# Resolve all errors for an execution
|
|
212
|
-
pnpm elevasis-sdk error resolve-execution <executionId>
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
## Standard Workflow
|
|
216
|
-
|
|
217
|
-
```
|
|
218
|
-
1. Write/modify resources operations/src/
|
|
219
|
-
2. Type-check pnpm -C operations run check-types
|
|
220
|
-
3. Validate /elevasis check
|
|
221
|
-
4. Deploy /elevasis deploy --prod
|
|
222
|
-
5. Describe /elevasis describe <id>
|
|
223
|
-
6. Execute /elevasis exec <id> -f input.json
|
|
224
|
-
7. Inspect logs /elevasis logs <id>
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Debugging Checklist
|
|
228
|
-
|
|
229
|
-
When an execution fails:
|
|
230
|
-
|
|
231
|
-
1. **Get the execution ID** from the exec output or `executions <resourceId> --status failed`
|
|
232
|
-
2. **Read the logs**: `execution <resourceId> <executionId> --logs-only`
|
|
233
|
-
3. **Check the input**: `execution <resourceId> <executionId> --input`
|
|
234
|
-
4. **Check the error**: `execution <resourceId> <executionId> --result`
|
|
235
|
-
5. **Fix the handler**, redeploy, re-execute
|
|
1
|
+
---
|
|
2
|
+
name: elevasis
|
|
3
|
+
description: Elevasis platform operations -- check, deploy, execute, inspect, and debug SDK resources
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Elevasis Platform Operations
|
|
7
|
+
|
|
8
|
+
Manage SDK resources in the `operations/` workspace via the `elevasis-sdk` CLI.
|
|
9
|
+
|
|
10
|
+
**Usage:**
|
|
11
|
+
|
|
12
|
+
- `/elevasis` -- Show available operations
|
|
13
|
+
- `/elevasis check` -- Validate resource definitions
|
|
14
|
+
- `/elevasis deploy [--prod]` -- Deploy resources
|
|
15
|
+
- `/elevasis exec <resourceId> [--input '...']` -- Execute a resource
|
|
16
|
+
- `/elevasis describe <resourceId>` -- Show resource schema
|
|
17
|
+
- `/elevasis logs <resourceId>` -- View recent executions
|
|
18
|
+
- `/elevasis creds` -- Manage credentials
|
|
19
|
+
|
|
20
|
+
## Critical Rules
|
|
21
|
+
|
|
22
|
+
- **Always describe before exec** -- run `describe` first to see the exact input schema
|
|
23
|
+
- **Use `-f` for complex inputs** -- write JSON to a temp file to avoid shell escaping issues
|
|
24
|
+
- **Always `check` before `deploy`** -- catches schema and config errors early
|
|
25
|
+
|
|
26
|
+
## Environment
|
|
27
|
+
|
|
28
|
+
The CLI authenticates via `ELEVASIS_PLATFORM_KEY` in the root `.env` file. The CLI walks up directories to find `.env`, so it works from both the project root and `operations/`.
|
|
29
|
+
|
|
30
|
+
For dev vs prod targeting:
|
|
31
|
+
|
|
32
|
+
- Default: production (`https://api.elevasis.io`)
|
|
33
|
+
- `--prod` flag: explicitly targets production (overrides `NODE_ENV=development`)
|
|
34
|
+
- `ELEVASIS_API_URL` env var: override to any custom URL
|
|
35
|
+
|
|
36
|
+
## Operations
|
|
37
|
+
|
|
38
|
+
### Check
|
|
39
|
+
|
|
40
|
+
Validate all resource definitions (schemas, contracts, config):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pnpm elevasis-sdk check
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Reports: resource count, validation errors, schema serialization warnings. Exit code 0 = pass.
|
|
47
|
+
|
|
48
|
+
### Deploy
|
|
49
|
+
|
|
50
|
+
Bundle and deploy resources to the Elevasis platform.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pnpm elevasis-sdk deploy [--prod]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Replace `[--prod]` with `--prod` when targeting production.
|
|
57
|
+
|
|
58
|
+
**Version bumping flags** (written back to `src/index.ts`):
|
|
59
|
+
|
|
60
|
+
- `--major` -- bump major (1.0.0 to 2.0.0) for breaking contract changes
|
|
61
|
+
- `--minor` -- bump minor (1.0.0 to 1.1.0) for new features
|
|
62
|
+
- `--patch` -- bump patch (1.0.0 to 1.0.1) for fixes
|
|
63
|
+
|
|
64
|
+
Deploy replaces the previous active deployment. Resources become executable immediately.
|
|
65
|
+
|
|
66
|
+
### Describe
|
|
67
|
+
|
|
68
|
+
**Always run before executing.** Shows resource metadata, input/output schemas, and step chain:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
pnpm elevasis-sdk describe <resourceId>
|
|
72
|
+
|
|
73
|
+
# JSON output for programmatic use
|
|
74
|
+
pnpm elevasis-sdk describe <resourceId> --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Output includes: type, name, version, status, domains, input schema (required/optional fields with types), output schema, step definitions with entry point and routing.
|
|
78
|
+
|
|
79
|
+
### Execute
|
|
80
|
+
|
|
81
|
+
Run a deployed resource. **Always `describe` first to see the input schema.**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Simple input (inline JSON)
|
|
85
|
+
pnpm elevasis-sdk exec <resourceId> -i '{"key": "value"}'
|
|
86
|
+
|
|
87
|
+
# Complex input (temp file -- PREFERRED for non-trivial payloads)
|
|
88
|
+
# Write input to a temp file first, then reference it with -f
|
|
89
|
+
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json
|
|
90
|
+
|
|
91
|
+
# Async execution (for long-running workflows -- polls until complete)
|
|
92
|
+
pnpm elevasis-sdk exec <resourceId> -f .tmp-input.json --async
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**When to use `-f` (file input):**
|
|
96
|
+
|
|
97
|
+
- Input contains nested objects, arrays, or special characters
|
|
98
|
+
- Input has quotes that conflict with shell escaping
|
|
99
|
+
- Input is reused across multiple executions
|
|
100
|
+
- Any time inline `-i` causes parsing errors
|
|
101
|
+
|
|
102
|
+
**Temp file pattern:**
|
|
103
|
+
|
|
104
|
+
1. Write the JSON to a temp file inside the project (e.g., `operations/.tmp-input.json`)
|
|
105
|
+
2. Execute with `-f .tmp-input.json`
|
|
106
|
+
3. Delete the temp file after
|
|
107
|
+
|
|
108
|
+
**Sync vs async:**
|
|
109
|
+
|
|
110
|
+
- Sync (default): blocks until execution completes, shows result inline
|
|
111
|
+
- Async (`--async`): returns execution ID immediately, polls every 3s with elapsed timer
|
|
112
|
+
- Use `--async` for workflows that may exceed 30 seconds
|
|
113
|
+
|
|
114
|
+
**Connection failure recovery:** If the connection drops during sync execution, the CLI automatically searches recent executions for a running one and resumes polling.
|
|
115
|
+
|
|
116
|
+
### List Resources
|
|
117
|
+
|
|
118
|
+
View all deployed resources:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pnpm elevasis-sdk resources
|
|
122
|
+
|
|
123
|
+
# JSON output
|
|
124
|
+
pnpm elevasis-sdk resources --json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Shows: resource ID, type (workflow/agent), name, description, status.
|
|
128
|
+
|
|
129
|
+
### Execution History
|
|
130
|
+
|
|
131
|
+
View past executions for a resource:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# List recent executions (default: last 50)
|
|
135
|
+
pnpm elevasis-sdk executions <resourceId>
|
|
136
|
+
|
|
137
|
+
# Filter by status
|
|
138
|
+
pnpm elevasis-sdk executions <resourceId> --status failed --limit 10
|
|
139
|
+
|
|
140
|
+
# View specific execution (full detail with logs)
|
|
141
|
+
pnpm elevasis-sdk execution <resourceId> <executionId>
|
|
142
|
+
|
|
143
|
+
# Logs only (skip metadata)
|
|
144
|
+
pnpm elevasis-sdk execution <resourceId> <executionId> --logs-only
|
|
145
|
+
|
|
146
|
+
# Include input and result data
|
|
147
|
+
pnpm elevasis-sdk execution <resourceId> <executionId> --input --result
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**`executions` flags:** `--limit <n>` (default 50), `--status running|completed|failed`, `--json`
|
|
151
|
+
|
|
152
|
+
**`execution` flags:** `--logs-only`, `--input`, `--result`, `--json`
|
|
153
|
+
|
|
154
|
+
Execution detail shows: status, start/end times, duration, input, result, error (if failed), and timestamped logs with level (ERROR/WARN/INFO/DEBUG).
|
|
155
|
+
|
|
156
|
+
### Deployments
|
|
157
|
+
|
|
158
|
+
View deployment history:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
pnpm elevasis-sdk deployments
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Shows: deployment ID, SDK version, status (active/deploying/failed/stopped), created timestamp.
|
|
165
|
+
|
|
166
|
+
### Credentials
|
|
167
|
+
|
|
168
|
+
Manage integration credentials (API keys, webhook secrets):
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# List credentials (metadata only, secrets not exposed)
|
|
172
|
+
pnpm elevasis-sdk creds list
|
|
173
|
+
|
|
174
|
+
# Create a credential
|
|
175
|
+
pnpm elevasis-sdk creds create --name my-api-key --type api-key --value '{"apiKey":"sk-..."}'
|
|
176
|
+
|
|
177
|
+
# Update a credential value
|
|
178
|
+
pnpm elevasis-sdk creds update my-api-key --value '{"apiKey":"new-key"}'
|
|
179
|
+
|
|
180
|
+
# Rename a credential
|
|
181
|
+
pnpm elevasis-sdk creds rename old-name --to new-name
|
|
182
|
+
|
|
183
|
+
# Delete a credential
|
|
184
|
+
pnpm elevasis-sdk creds delete my-api-key --force
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Credential names: lowercase, digits, hyphens only (`^[a-z0-9]+(-[a-z0-9]+)*$`). Types: `api-key`, `webhook-secret`.
|
|
188
|
+
|
|
189
|
+
### Rename Resource
|
|
190
|
+
|
|
191
|
+
Rename a resource ID across all platform tables:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# Dry run (preview only)
|
|
195
|
+
pnpm elevasis-sdk rename old-id --to new-id
|
|
196
|
+
|
|
197
|
+
# Apply rename
|
|
198
|
+
pnpm elevasis-sdk rename old-id --to new-id --execute
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Always dry-run first to see affected tables and row counts.
|
|
202
|
+
|
|
203
|
+
### Error Resolution
|
|
204
|
+
|
|
205
|
+
Mark execution errors as resolved:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Resolve a specific error
|
|
209
|
+
pnpm elevasis-sdk error resolve <errorId>
|
|
210
|
+
|
|
211
|
+
# Resolve all errors for an execution
|
|
212
|
+
pnpm elevasis-sdk error resolve-execution <executionId>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Standard Workflow
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
1. Write/modify resources operations/src/
|
|
219
|
+
2. Type-check pnpm -C operations run check-types
|
|
220
|
+
3. Validate /elevasis check
|
|
221
|
+
4. Deploy /elevasis deploy --prod
|
|
222
|
+
5. Describe /elevasis describe <id>
|
|
223
|
+
6. Execute /elevasis exec <id> -f input.json
|
|
224
|
+
7. Inspect logs /elevasis logs <id>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Debugging Checklist
|
|
228
|
+
|
|
229
|
+
When an execution fails:
|
|
230
|
+
|
|
231
|
+
1. **Get the execution ID** from the exec output or `executions <resourceId> --status failed`
|
|
232
|
+
2. **Read the logs**: `execution <resourceId> <executionId> --logs-only`
|
|
233
|
+
3. **Check the input**: `execution <resourceId> <executionId> --input`
|
|
234
|
+
4. **Check the error**: `execution <resourceId> <executionId> --result`
|
|
235
|
+
5. **Fix the handler**, redeploy, re-execute
|
|
@@ -17,9 +17,9 @@ Before orienting, scan the user's query for Organization OS terminology. If any
|
|
|
17
17
|
|
|
18
18
|
**OS vocabulary triggers:**
|
|
19
19
|
|
|
20
|
-
- System layer: `system`, `systems`, `SystemModule`, `system key`, `system gate`, `system access`, `gate`, `gating`, `access`, `enable`, `disable`
|
|
20
|
+
- System layer: `system`, `systems`, `SystemModule`, `system key`, `system gate`, `system access`, `gate`, `gating`, `access`, `enable`, `disable`
|
|
21
21
|
- Shell / nav: `manifest`, `shell`, `sub-shell`, `sidebar`, `nav`, `navigation`, `route`
|
|
22
|
-
- Auth / guards: `guard`, `SystemGuard`, `AdminGuard`, `ProtectedRoute`, `admin`
|
|
22
|
+
- Auth / guards: `guard`, `SystemGuard`, `AdminGuard`, `ProtectedRoute`, `admin`
|
|
23
23
|
- Org model: `organization`, `org model`, `organization model`, `domain`, `surface`
|
|
24
24
|
- Foundations: `foundation`, `foundations`, `@core/`, `adapter`
|
|
25
25
|
- Platform ops: `workflow`, `agent`, `deployment`, `resource`
|
|
@@ -29,7 +29,7 @@ Before orienting, scan the user's query for Organization OS terminology. If any
|
|
|
29
29
|
1. Read `.claude/rules/active-change-index.md` immediately. If the target area is flagged as under active refactor, surface the watch-area warning to the user before proceeding — include the "Load:" doc paths listed in that entry so investigation does not rely on stale scaffold prose.
|
|
30
30
|
2. Build the OS context bundle to pass into Step 3:
|
|
31
31
|
- Always: `node_modules/@elevasis/sdk/reference/scaffold/reference/glossary.md`, `.claude/rules/active-change-index.md`, `.claude/rules/agent-start-here.md`
|
|
32
|
-
- Systems / Shell / Gating queries: add `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` + `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
32
|
+
- Systems / Shell / Gating queries: add `node_modules/@elevasis/sdk/reference/scaffold/ui/feature-flags-and-gating.md` + `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md`
|
|
33
33
|
- Workflow / Operations queries: add `.claude/rules/operations.md` + glob `operations/src/**`
|
|
34
34
|
- Organization-model queries: add `node_modules/@elevasis/sdk/reference/scaffold/reference/contracts.md` + `core/config/README.md`
|
|
35
35
|
|
|
@@ -37,9 +37,9 @@ Before orienting, scan the user's query for Organization OS terminology. If any
|
|
|
37
37
|
|
|
38
38
|
| Query intent | Primary OS layers | Key reference |
|
|
39
39
|
| ---------------------------------------- | -------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
40
|
-
| "Why doesn't my system show up?" | Systems + UI Shell Runtime | `glossary.md` (SystemModule, SystemGuard), `feature-flags-and-gating.md` |
|
|
41
|
-
| "How do I add a nav item?" | Systems + Toolkit | `feature-flags-and-gating.md`, `contracts.md` |
|
|
42
|
-
| "How does admin gating work?" | Systems + UI Shell Runtime | `glossary.md` (AdminGuard, requiresAdmin, ProtectedRoute), `feature-flags-and-gating.md` |
|
|
40
|
+
| "Why doesn't my system show up?" | Systems + UI Shell Runtime | `glossary.md` (SystemModule, SystemGuard), `feature-flags-and-gating.md` |
|
|
41
|
+
| "How do I add a nav item?" | Systems + Toolkit | `feature-flags-and-gating.md`, `contracts.md` |
|
|
42
|
+
| "How does admin gating work?" | Systems + UI Shell Runtime | `glossary.md` (AdminGuard, requiresAdmin, ProtectedRoute), `feature-flags-and-gating.md` |
|
|
43
43
|
| "What runs when this workflow triggers?" | Platform Public API + Operations | `.claude/rules/operations.md`, `resources.md` |
|
|
44
44
|
| "Why does the foundations adapter fail?" | Foundations | `glossary.md` (domain vs surface, settings asymmetry), `core/config/README.md` |
|
|
45
45
|
|