@elevasis/sdk 1.8.3 → 1.10.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.
- package/dist/cli.cjs +495 -153
- package/dist/index.d.ts +2 -0
- package/dist/test-utils/index.d.ts +8273 -0
- package/dist/test-utils/index.js +20070 -0
- package/dist/types/worker/index.d.ts +20 -1
- package/dist/worker/index.js +3 -2
- package/package.json +8 -2
- package/reference/_navigation.md +15 -1
- package/reference/_reference-manifest.json +56 -0
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -0
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -0
- package/reference/deployment/index.mdx +42 -7
- package/reference/examples/organization-model.ts +689 -0
- package/reference/index.mdx +6 -5
- package/reference/packages/core/src/test-utils/README.md +5 -10
- package/reference/packages/ui/src/test-utils/README.md +5 -0
- package/reference/scaffold/operations/workflow-recipes.md +94 -1
- package/reference/scaffold/recipes/add-a-feature.md +4 -4
- package/reference/scaffold/recipes/add-a-resource.md +1 -1
- package/reference/scaffold/recipes/customize-organization-model.md +2 -2
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +2 -2
- package/reference/claude-config/commands/submit-request.md +0 -11
|
@@ -26,8 +26,27 @@
|
|
|
26
26
|
* Worker -> Parent: { type: 'credential-request', id, name }
|
|
27
27
|
* Parent -> Worker: { type: 'credential-result', id, provider?, credentials?, error?, code? }
|
|
28
28
|
*/
|
|
29
|
-
import type { DeploymentSpec } from '../index.js';
|
|
29
|
+
import type { DeploymentSpec, WorkflowDefinition } from '../index.js';
|
|
30
30
|
export { platform, PlatformToolError } from './platform.js';
|
|
31
31
|
export type { PlatformCredential } from './platform.js';
|
|
32
32
|
export * from './adapters/index.js';
|
|
33
|
+
export interface LogEntry {
|
|
34
|
+
level: 'debug' | 'info' | 'warn' | 'error';
|
|
35
|
+
message: string;
|
|
36
|
+
timestamp: string;
|
|
37
|
+
context?: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
export declare function executeWorkflow(workflow: WorkflowDefinition, input: unknown, context: {
|
|
40
|
+
executionId: string;
|
|
41
|
+
organizationId: string;
|
|
42
|
+
organizationName: string;
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
sessionTurnNumber?: number;
|
|
45
|
+
parentExecutionId?: string;
|
|
46
|
+
executionDepth: number;
|
|
47
|
+
adapters?: Record<string, unknown>;
|
|
48
|
+
}): Promise<{
|
|
49
|
+
output: unknown;
|
|
50
|
+
logs: LogEntry[];
|
|
51
|
+
}>;
|
|
33
52
|
export declare function startWorker(org: DeploymentSpec): void;
|
package/dist/worker/index.js
CHANGED
|
@@ -5083,7 +5083,7 @@ function captureConsole(executionId, logs) {
|
|
|
5083
5083
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
5084
5084
|
const entry = { level, message, timestamp, context: logContext };
|
|
5085
5085
|
logs.push(entry);
|
|
5086
|
-
parentPort
|
|
5086
|
+
parentPort?.postMessage({
|
|
5087
5087
|
type: "log",
|
|
5088
5088
|
entry: { level, message, timestamp, executionId, context: logContext }
|
|
5089
5089
|
});
|
|
@@ -5177,6 +5177,7 @@ async function executeWorkflow(workflow, input, context) {
|
|
|
5177
5177
|
sessionTurnNumber: context.sessionTurnNumber,
|
|
5178
5178
|
parentExecutionId: context.parentExecutionId,
|
|
5179
5179
|
executionDepth: context.executionDepth,
|
|
5180
|
+
adapters: context.adapters,
|
|
5180
5181
|
store: /* @__PURE__ */ new Map(),
|
|
5181
5182
|
logger: {
|
|
5182
5183
|
debug: (msg) => console.log(`[debug] ${msg}`),
|
|
@@ -5434,4 +5435,4 @@ function startWorker(org) {
|
|
|
5434
5435
|
});
|
|
5435
5436
|
}
|
|
5436
5437
|
|
|
5437
|
-
export { PlatformToolError, acqDb, approval, createAdapter, createAnymailfinderAdapter, createApifyAdapter, createAttioAdapter, createDropboxAdapter, createGmailAdapter, createGoogleSheetsAdapter, createInstantlyAdapter, createMillionVerifierAdapter, createResendAdapter, createSignatureApiAdapter, createStripeAdapter, createTombaAdapter, crm, email, execution, list, llm, notifications, pdf, platform, projects, scheduler, startWorker, storage };
|
|
5438
|
+
export { PlatformToolError, acqDb, approval, createAdapter, createAnymailfinderAdapter, createApifyAdapter, createAttioAdapter, createDropboxAdapter, createGmailAdapter, createGoogleSheetsAdapter, createInstantlyAdapter, createMillionVerifierAdapter, createResendAdapter, createSignatureApiAdapter, createStripeAdapter, createTombaAdapter, crm, email, executeWorkflow, execution, list, llm, notifications, pdf, platform, projects, scheduler, startWorker, storage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
"./worker": {
|
|
15
15
|
"types": "./dist/types/worker/index.d.ts",
|
|
16
16
|
"import": "./dist/worker/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./test-utils": {
|
|
19
|
+
"types": "./dist/test-utils/index.d.ts",
|
|
20
|
+
"import": "./dist/test-utils/index.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"files": [
|
|
@@ -23,6 +27,8 @@
|
|
|
23
27
|
"dist/types/worker/index.d.ts",
|
|
24
28
|
"dist/types/worker/platform.d.ts",
|
|
25
29
|
"dist/types/worker/adapters/",
|
|
30
|
+
"dist/test-utils/index.js",
|
|
31
|
+
"dist/test-utils/index.d.ts",
|
|
26
32
|
"dist/cli.cjs",
|
|
27
33
|
"reference/"
|
|
28
34
|
],
|
|
@@ -44,7 +50,7 @@
|
|
|
44
50
|
"tsup": "^8.0.0",
|
|
45
51
|
"typescript": "5.9.2",
|
|
46
52
|
"zod": "^4.1.0",
|
|
47
|
-
"@repo/core": "0.
|
|
53
|
+
"@repo/core": "0.10.0",
|
|
48
54
|
"@repo/typescript-config": "0.0.0"
|
|
49
55
|
},
|
|
50
56
|
"scripts": {
|
package/reference/_navigation.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated from the package reference manifests.
|
|
4
4
|
|
|
5
|
-
Package entries indexed:
|
|
5
|
+
Package entries indexed: 47.
|
|
6
6
|
|
|
7
7
|
## @elevasis/core / Core
|
|
8
8
|
|
|
@@ -40,6 +40,12 @@ Package entries indexed: 43.
|
|
|
40
40
|
| --- | --- | --- | --- |
|
|
41
41
|
| Worker Runtime | `runtime.mdx` | Worker runtime entrypoint, adapters, and platform execution surface. | (not specified) |
|
|
42
42
|
|
|
43
|
+
## @elevasis/sdk / Testing
|
|
44
|
+
|
|
45
|
+
| Resource | Location | Description | When to Load |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| Test Utils | `runtime.mdx` | Workflow runner, registry assertion, and typed adapter mocks for SDK consumers. | (not specified) |
|
|
48
|
+
|
|
43
49
|
## @elevasis/ui / Components
|
|
44
50
|
|
|
45
51
|
| Resource | Location | Description | When to Load |
|
|
@@ -100,6 +106,14 @@ Package entries indexed: 43.
|
|
|
100
106
|
| Provider UI | `packages/ui/src/provider/README.md` | Published provider UI entry for downstream applications. | (not specified) |
|
|
101
107
|
| Elevasis Service Context | `packages/ui/src/provider/README.md` | Standalone service context and provider that supplies apiRequest, organizationId, and isReady to child components. | (not specified) |
|
|
102
108
|
|
|
109
|
+
## @elevasis/ui / Testing
|
|
110
|
+
|
|
111
|
+
| Resource | Location | Description | When to Load |
|
|
112
|
+
| --- | --- | --- | --- |
|
|
113
|
+
| Test Utils | `packages/ui/src/test-utils/README.md` | Published rendering helpers, auth mocks, MSW handlers, and test provider utilities. | (not specified) |
|
|
114
|
+
| Test Utils Setup | `packages/ui/src/test-utils/README.md` | Vitest setup file for UI consumers using browser mocks and MSW. | (not specified) |
|
|
115
|
+
| Test Utils Integration Setup | `packages/ui/src/test-utils/README.md` | Vitest setup file for integration tests that avoid MSW and use real network boundaries. | (not specified) |
|
|
116
|
+
|
|
103
117
|
## @elevasis/ui / Visual
|
|
104
118
|
|
|
105
119
|
| Resource | Location | Description | When to Load |
|
|
@@ -85,6 +85,20 @@
|
|
|
85
85
|
"referencePath": "runtime.mdx",
|
|
86
86
|
"publishedExportPath": "./dist/worker/index.js"
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
"packageName": "@elevasis/sdk",
|
|
90
|
+
"packageDir": "packages/sdk",
|
|
91
|
+
"subpath": "./test-utils",
|
|
92
|
+
"kind": "subpath",
|
|
93
|
+
"title": "Test Utils",
|
|
94
|
+
"description": "Workflow runner, registry assertion, and typed adapter mocks for SDK consumers.",
|
|
95
|
+
"group": "Testing",
|
|
96
|
+
"order": 1,
|
|
97
|
+
"sourcePath": "packages/sdk/src/test-utils/index.ts",
|
|
98
|
+
"docPath": "apps/docs/content/docs/sdk/runtime.mdx",
|
|
99
|
+
"referencePath": "runtime.mdx",
|
|
100
|
+
"publishedExportPath": "./dist/test-utils/index.js"
|
|
101
|
+
},
|
|
88
102
|
{
|
|
89
103
|
"packageName": "@elevasis/ui",
|
|
90
104
|
"packageDir": "packages/ui",
|
|
@@ -575,6 +589,48 @@
|
|
|
575
589
|
"referencePath": "packages/ui/src/provider/README.md",
|
|
576
590
|
"publishedExportPath": "./dist/provider/ElevasisServiceContext.js"
|
|
577
591
|
},
|
|
592
|
+
{
|
|
593
|
+
"packageName": "@elevasis/ui",
|
|
594
|
+
"packageDir": "packages/ui",
|
|
595
|
+
"subpath": "./test-utils",
|
|
596
|
+
"kind": "subpath",
|
|
597
|
+
"title": "Test Utils",
|
|
598
|
+
"description": "Published rendering helpers, auth mocks, MSW handlers, and test provider utilities.",
|
|
599
|
+
"group": "Testing",
|
|
600
|
+
"order": 1,
|
|
601
|
+
"sourcePath": "packages/ui/src/test-utils/index.ts",
|
|
602
|
+
"docPath": "packages/ui/src/test-utils/README.md",
|
|
603
|
+
"referencePath": "packages/ui/src/test-utils/README.md",
|
|
604
|
+
"publishedExportPath": "./dist/test-utils/index.js"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"packageName": "@elevasis/ui",
|
|
608
|
+
"packageDir": "packages/ui",
|
|
609
|
+
"subpath": "./test-utils/setup",
|
|
610
|
+
"kind": "subpath",
|
|
611
|
+
"title": "Test Utils Setup",
|
|
612
|
+
"description": "Vitest setup file for UI consumers using browser mocks and MSW.",
|
|
613
|
+
"group": "Testing",
|
|
614
|
+
"order": 2,
|
|
615
|
+
"sourcePath": "packages/ui/src/test-utils/setup.ts",
|
|
616
|
+
"docPath": "packages/ui/src/test-utils/README.md",
|
|
617
|
+
"referencePath": "packages/ui/src/test-utils/README.md",
|
|
618
|
+
"publishedExportPath": "./dist/test-utils/setup.js"
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"packageName": "@elevasis/ui",
|
|
622
|
+
"packageDir": "packages/ui",
|
|
623
|
+
"subpath": "./test-utils/setup-integration",
|
|
624
|
+
"kind": "subpath",
|
|
625
|
+
"title": "Test Utils Integration Setup",
|
|
626
|
+
"description": "Vitest setup file for integration tests that avoid MSW and use real network boundaries.",
|
|
627
|
+
"group": "Testing",
|
|
628
|
+
"order": 3,
|
|
629
|
+
"sourcePath": "packages/ui/src/test-utils/setup-integration.ts",
|
|
630
|
+
"docPath": "packages/ui/src/test-utils/README.md",
|
|
631
|
+
"referencePath": "packages/ui/src/test-utils/README.md",
|
|
632
|
+
"publishedExportPath": "./dist/test-utils/setup-integration.js"
|
|
633
|
+
},
|
|
578
634
|
{
|
|
579
635
|
"packageName": "@elevasis/ui",
|
|
580
636
|
"packageDir": "packages/ui",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Test Utils And Template Tests
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This update adds meaningful package, template, and downstream test coverage while keeping ownership boundaries clear. Package-owned contracts live in package tests/test-utils; `_template` keeps scaffold smoke tests and examples; downstream projects keep custom tests for project-specific workflows and routes.
|
|
6
|
+
|
|
7
|
+
The new package-level test-utils subpaths are being prepared in the monorepo packages:
|
|
8
|
+
|
|
9
|
+
- `@elevasis/core/test-utils`
|
|
10
|
+
- `@elevasis/ui/test-utils`
|
|
11
|
+
- `@elevasis/sdk/test-utils`
|
|
12
|
+
|
|
13
|
+
Until the bundled release train publishes those expanded package surfaces, `_template` keeps small local compatibility wrappers for tests that need the new helpers. Do not replace those wrappers with local `file:` dependencies.
|
|
14
|
+
|
|
15
|
+
## Applies to
|
|
16
|
+
|
|
17
|
+
All template-derived projects that sync from `external/_template`.
|
|
18
|
+
|
|
19
|
+
Known affected projects: `nirvana-marketing`, `ZentaraHQ`.
|
|
20
|
+
|
|
21
|
+
## Required actions
|
|
22
|
+
|
|
23
|
+
### Step 1 -- Pull template changes via `/git-sync`
|
|
24
|
+
|
|
25
|
+
Accept the new tests under sync-managed scaffold surfaces:
|
|
26
|
+
|
|
27
|
+
- `ui/src/routes/__tests__/`
|
|
28
|
+
- `core/types/**`
|
|
29
|
+
- `core/config/**`
|
|
30
|
+
- local core compatibility helpers under `core/test-utils/`
|
|
31
|
+
|
|
32
|
+
Operations tests are intentionally narrower. Treat `operations/src/**` as project-owned runtime code. Only keep or add Operations tests in a downstream project when the project owns the workflow/module being tested. The template's email-notification tests are examples, not a requirement for every derived project.
|
|
33
|
+
|
|
34
|
+
### Step 2 -- Run the expanded test chain
|
|
35
|
+
|
|
36
|
+
From project root:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm test
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The root test script now runs `operations check` between UI and operations tests so resource-registry drift fails during ordinary test runs.
|
|
43
|
+
|
|
44
|
+
### Step 3 -- Keep compatibility wrappers until the bundled release lands
|
|
45
|
+
|
|
46
|
+
Do not delete any local compatibility wrapper that is still used by a project-owned custom test until the project has upgraded to package versions that publish the expanded test-utils subpaths.
|
|
47
|
+
|
|
48
|
+
After the release train lands, projects can migrate local compatibility imports to:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { renderWithProviders } from '@elevasis/ui/test-utils'
|
|
52
|
+
import { makeProject } from '@elevasis/core/test-utils'
|
|
53
|
+
import { runWorkflow } from '@elevasis/sdk/test-utils'
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 4 -- Adjust only for intentionally removed features
|
|
57
|
+
|
|
58
|
+
If a derived project intentionally removed a feature route or workflow, skip or adjust the specific synced test case. For Operations, prefer project-owned tests that import package helpers over copied template workflow tests.
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
|
|
62
|
+
- `pnpm -C ui test` passes.
|
|
63
|
+
- `pnpm -C operations check` passes.
|
|
64
|
+
- `pnpm -C operations test` passes.
|
|
65
|
+
- `pnpm -C core test` passes.
|
|
66
|
+
- `pnpm test` passes from project root.
|
|
67
|
+
|
|
68
|
+
## Not handled by /git-sync
|
|
69
|
+
|
|
70
|
+
- `/git-sync` does not publish or upgrade `@elevasis/*` package versions.
|
|
71
|
+
- `/git-sync` does not remove compatibility wrappers after the release train.
|
|
72
|
+
- `/git-sync` does not decide how a project-specific removed feature should be represented in tests.
|
|
73
|
+
- `/git-sync` does not force template-only Operations example tests into downstream projects that do not own the matching workflow files.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# UI Consolidation And SDK CLI Train
|
|
2
|
+
|
|
3
|
+
## Why this note exists
|
|
4
|
+
|
|
5
|
+
This release train combines three changes that affect derived projects after `pnpm up`:
|
|
6
|
+
|
|
7
|
+
1. `@elevasis/ui` 2.18.x consolidates previously-duplicated template surface (hooks, components, constants, utilities, test-utils, org-model examples) into the published package. Files that lived in `_template/ui/src/lib/**`, `_template/ui/src/test-utils/**`, and `_template/scripts/use-*-ui.mjs` are deleted from the template and re-exported from `@elevasis/ui`. A `useDeleteRequest` hook and a rollup dts fix also land in this `@elevasis/ui` version.
|
|
8
|
+
2. `@elevasis/sdk` hardens project-root and CWD resolution in the `elevasis-sdk` CLI. Unsupported invocation directories now fail fast with a clear error instead of silently using `process.cwd()`.
|
|
9
|
+
3. `@elevasis/sdk` + `@elevasis/core` + `@elevasis/ui` close three `project:*` / `request:submit` CLI gaps: `--description` on `project:milestone:update`, `agent_learning` note-type enum alignment between `/project` skill docs and the server, and enum values surfaced in `request:submit --help`.
|
|
10
|
+
|
|
11
|
+
## Applies to
|
|
12
|
+
|
|
13
|
+
All template-derived projects that:
|
|
14
|
+
|
|
15
|
+
- import from `@elevasis/ui` (nearly all of them),
|
|
16
|
+
- run the `elevasis-sdk` CLI from any project directory (all of them),
|
|
17
|
+
- invoke `project:milestone:update`, `project:note:create --type agent_learning`, or `request:submit`.
|
|
18
|
+
|
|
19
|
+
Known affected projects: `nirvana-marketing`, `ZentaraHQ`.
|
|
20
|
+
|
|
21
|
+
## Required actions
|
|
22
|
+
|
|
23
|
+
### Step 1 -- Pull the train via `/git-sync`
|
|
24
|
+
|
|
25
|
+
`/git-sync` surfaces this note and applies template-source changes (deletions of `ui/src/lib/**`, `ui/src/test-utils/**`, `scripts/use-*-ui.mjs`).
|
|
26
|
+
|
|
27
|
+
### Step 2 -- Update package dependencies
|
|
28
|
+
|
|
29
|
+
Run from project root:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
pnpm up @elevasis/ui @elevasis/core @elevasis/sdk --latest
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Dep bumps are already written into `_template/ui/package.json`, `_template/operations/package.json`, and `_template/core/package.json` by the release train (`@elevasis/core` ^0.9.0, `@elevasis/ui` ^2.19.0, `@elevasis/sdk` ^1.9.0).
|
|
36
|
+
|
|
37
|
+
### Step 3 -- Replace inlined type defs with package imports
|
|
38
|
+
|
|
39
|
+
Projects that copied the Phase-1 workaround carry six inlined symbols in `ui/src/lib/platform-utils.ts` that should now come from `@elevasis/ui`:
|
|
40
|
+
|
|
41
|
+
- `CredentialSchema`, `CredentialField`, `OAuthProviderConfig`, `OAuthToken`, `OAuthState` -> `@elevasis/ui/types`
|
|
42
|
+
- `DOMAIN_MAP` -> `@elevasis/ui/utils`
|
|
43
|
+
|
|
44
|
+
Delete the inlined copies and replace with named imports from the appropriate subpaths. After the edit, `ui/src/lib/platform-utils.ts` should only contain Elevasis-specific symbols and the new imports.
|
|
45
|
+
|
|
46
|
+
### Step 4 -- Re-verify `elevasis-sdk` invocations
|
|
47
|
+
|
|
48
|
+
From any dir you routinely invoke the SDK CLI, run:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pnpm exec elevasis-sdk doctor
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If the command fails with a "no `.elevasis` marker reachable" error, re-run from a supported directory (project root, `operations/`, or any nested path under a valid project). Previously-silent misfires now surface as hard errors; this is intentional.
|
|
55
|
+
|
|
56
|
+
### Step 5 -- Audit `project:note:create --type agent_learning` call sites
|
|
57
|
+
|
|
58
|
+
If any project scripts or agent prompts call `project:note:create --type agent_learning`, verify they match the server enum decision (the train either adds `agent_learning` to the enum or strips it from `/project` skill docs -- check the landed behavior in `pnpm exec elevasis-sdk project:note:create --help` and in the project's synced `/project` SKILL).
|
|
59
|
+
|
|
60
|
+
### Step 6 -- Rebuild and type-check
|
|
61
|
+
|
|
62
|
+
Run from project root:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
pnpm -C ui build
|
|
66
|
+
pnpm -C ui exec tsc --noEmit
|
|
67
|
+
pnpm -C operations exec tsc --noEmit
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
All three must pass before the update is complete.
|
|
71
|
+
|
|
72
|
+
## Verification
|
|
73
|
+
|
|
74
|
+
- `pnpm up` completes cleanly.
|
|
75
|
+
- `ui/src/lib/platform-utils.ts` contains no inlined `CredentialSchema | CredentialField | OAuthProviderConfig | OAuthToken | OAuthState | DOMAIN_MAP` definitions -- only imports from `@elevasis/ui`.
|
|
76
|
+
- `pnpm -C ui exec tsc --noEmit` passes with no missing-module errors for `@elevasis/ui/hooks`, `@elevasis/ui/components`, `@elevasis/ui/constants`, `@elevasis/ui/utils`, `@elevasis/ui/test-utils`.
|
|
77
|
+
- `pnpm exec elevasis-sdk doctor` reports project root correctly from the directories you use.
|
|
78
|
+
- `pnpm exec elevasis-sdk project:milestone:update --help` lists `--description`.
|
|
79
|
+
- `pnpm exec elevasis-sdk request:submit --help` shows enum values for `--type`, `--category`, `--severity`.
|
|
80
|
+
|
|
81
|
+
## Not handled by /git-sync
|
|
82
|
+
|
|
83
|
+
- `/git-sync` does not run `pnpm up` -- Step 2 is manual.
|
|
84
|
+
- `/git-sync` does not rewrite project-owned `ui/src/lib/platform-utils.ts` -- the inlined-to-imports swap in Step 3 is manual per project.
|
|
85
|
+
- `/git-sync` does not validate SDK CLI behavior from project terminals -- Step 4 verification is manual.
|
|
86
|
+
- Any project-local override that hard-references the deleted `_template/ui/src/lib/**` paths must be cleaned up manually.
|
|
@@ -12,16 +12,50 @@ Deploying your resources makes them live on the Elevasis platform and immediatel
|
|
|
12
12
|
|
|
13
13
|
When you run `elevasis-sdk deploy`, the CLI performs these steps in order:
|
|
14
14
|
|
|
15
|
-
1. **
|
|
16
|
-
2. **
|
|
17
|
-
3. **
|
|
18
|
-
4. **
|
|
19
|
-
5. **
|
|
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
|
|
20
21
|
|
|
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.
|
|
22
23
|
|
|
23
24
|
---
|
|
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/elevasis/` with `operations/` as a sub-package):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Invoke from operations/ or any subdir inside it
|
|
39
|
+
pnpm -C external/elevasis/operations exec elevasis-sdk deploy
|
|
40
|
+
|
|
41
|
+
# Both CWDs work identically:
|
|
42
|
+
# .elevasis root -> external/elevasis/ (auth / .env)
|
|
43
|
+
# package root -> external/elevasis/operations/ (bundle, dist/)
|
|
44
|
+
# bundle output -> external/elevasis/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
|
+
|
|
25
59
|
## Running a Deploy
|
|
26
60
|
|
|
27
61
|
```bash
|
|
@@ -108,7 +142,7 @@ The CLI also accepts a `--api-url` flag on every command, which takes priority o
|
|
|
108
142
|
ELEVASIS_PLATFORM_KEY=sk_***
|
|
109
143
|
```
|
|
110
144
|
|
|
111
|
-
Place `.env` in your project root. The CLI walks up directories to find
|
|
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.
|
|
112
146
|
|
|
113
147
|
---
|
|
114
148
|
|
|
@@ -154,7 +188,8 @@ The bundle is stored on the platform for durability and restart recovery. If the
|
|
|
154
188
|
- [Command Center](command-center.mdx) - Resource graph, relationships, node types, and post-deployment UI reference
|
|
155
189
|
- [Provided Features](provided-features.mdx) - Shared Lead Gen, CRM, Projects, and feature-shell surfaces for downstream apps and agents
|
|
156
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
|
|
157
192
|
|
|
158
193
|
---
|
|
159
194
|
|
|
160
|
-
**Last Updated:** 2026-04-
|
|
195
|
+
**Last Updated:** 2026-04-23
|