@elevasis/sdk 1.8.2 → 1.9.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 (62) hide show
  1. package/dist/cli.cjs +289 -105
  2. package/dist/index.d.ts +90 -39
  3. package/dist/types/worker/adapters/lead.d.ts +1 -1
  4. package/dist/worker/index.js +2 -0
  5. package/package.json +2 -2
  6. package/reference/_navigation.md +7 -1
  7. package/reference/_reference-manifest.json +14 -0
  8. package/reference/claude-config/logs/scaffold-registry-reminder.log +3 -0
  9. package/reference/claude-config/rules/agent-start-here.md +254 -254
  10. package/reference/claude-config/rules/frontend.md +43 -43
  11. package/reference/claude-config/rules/operations.md +64 -64
  12. package/reference/claude-config/rules/organization-model.md +42 -43
  13. package/reference/claude-config/rules/organization-os.md +107 -107
  14. package/reference/claude-config/rules/shared-types.md +2 -2
  15. package/reference/claude-config/rules/task-tracking.md +1 -1
  16. package/reference/claude-config/rules/ui.md +202 -202
  17. package/reference/claude-config/rules/vibe.md +202 -202
  18. package/reference/claude-config/skills/configure/SKILL.md +98 -98
  19. package/reference/claude-config/skills/configure/operations/codify-level-a.md +100 -100
  20. package/reference/claude-config/skills/configure/operations/codify-level-b.md +158 -158
  21. package/reference/claude-config/skills/configure/operations/customers.md +150 -150
  22. package/reference/claude-config/skills/configure/operations/features.md +162 -162
  23. package/reference/claude-config/skills/configure/operations/goals.md +147 -147
  24. package/reference/claude-config/skills/configure/operations/identity.md +133 -133
  25. package/reference/claude-config/skills/configure/operations/labels.md +128 -128
  26. package/reference/claude-config/skills/configure/operations/offerings.md +159 -159
  27. package/reference/claude-config/skills/configure/operations/roles.md +153 -153
  28. package/reference/claude-config/skills/configure/operations/techStack.md +139 -139
  29. package/reference/claude-config/skills/explore/SKILL.md +78 -78
  30. package/reference/claude-config/skills/git-sync/SKILL.md +126 -0
  31. package/reference/claude-config/skills/save/SKILL.md +183 -183
  32. package/reference/claude-config/skills/setup/SKILL.md +275 -275
  33. package/reference/claude-config/skills/sync/SKILL.md +10 -44
  34. package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +27 -0
  35. package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +30 -0
  36. package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +86 -0
  37. package/reference/claude-config/sync-notes/README.md +43 -0
  38. package/reference/deployment/index.mdx +42 -7
  39. package/reference/examples/organization-model.ts +689 -0
  40. package/reference/index.mdx +6 -5
  41. package/reference/packages/core/src/README.md +39 -36
  42. package/reference/packages/core/src/business/README.md +52 -52
  43. package/reference/packages/core/src/organization-model/README.md +97 -97
  44. package/reference/packages/core/src/test-utils/README.md +42 -0
  45. package/reference/scaffold/core/organization-graph.mdx +272 -272
  46. package/reference/scaffold/core/organization-model.mdx +320 -320
  47. package/reference/scaffold/index.mdx +64 -64
  48. package/reference/scaffold/operations/propagation-pipeline.md +125 -104
  49. package/reference/scaffold/operations/scaffold-maintenance.md +122 -122
  50. package/reference/scaffold/operations/workflow-recipes.md +436 -436
  51. package/reference/scaffold/recipes/add-a-feature.md +158 -158
  52. package/reference/scaffold/recipes/add-a-resource.md +158 -158
  53. package/reference/scaffold/recipes/customize-organization-model.md +400 -400
  54. package/reference/scaffold/recipes/extend-a-base-entity.md +140 -140
  55. package/reference/scaffold/recipes/gate-by-feature-or-admin.md +158 -158
  56. package/reference/scaffold/recipes/index.md +32 -32
  57. package/reference/scaffold/reference/contracts.md +608 -607
  58. package/reference/scaffold/reference/feature-registry.md +2 -0
  59. package/reference/scaffold/reference/glossary.md +105 -105
  60. package/reference/scaffold/ui/composition-extensibility.mdx +1 -1
  61. package/reference/scaffold/ui/feature-flags-and-gating.md +1 -1
  62. package/reference/claude-config/commands/submit-request.md +0 -11
@@ -0,0 +1,30 @@
1
+ # Lead Gen Deliverability Page Removal
2
+
3
+ ## Why this note exists
4
+
5
+ `LeadGenDeliverabilityPage` has been removed from the published `@elevasis/ui` package. The deliverability route and sidebar nav item were removed from the shared lead-gen surface. Template-derived projects that still import or route to this page will fail to compile after pulling this train.
6
+
7
+ ## Applies to
8
+
9
+ All template-derived projects that use the lead-gen feature and have a `ui/src/routes/lead-gen/deliverability.tsx` route file or a deliverability entry in their lead-gen sidebar.
10
+
11
+ Known affected projects: `nirvana-marketing`, `ZentaraHQ`.
12
+
13
+ ## Required actions
14
+
15
+ 1. Delete `ui/src/routes/lead-gen/deliverability.tsx` — this file is completely removed (no redirect replacement).
16
+ 2. Remove the deliverability nav item from any project-local lead-gen sidebar overrides that reference it by ID or label.
17
+ 3. Remove any import of `LeadGenDeliverabilityPage` from route trees, lazy-loaded chunks, or custom page wrappers.
18
+ 4. Regenerate the TanStack Router route tree (`pnpm -C ui exec tsr generate` or equivalent) after removing the route file so the generated routeTree no longer references the deleted route.
19
+ 5. Run `pnpm -C ui build` to confirm the build is clean.
20
+
21
+ ## Verification
22
+
23
+ - `pnpm -C ui build` passes with no import or route errors.
24
+ - Navigating to `/lead-gen` works; navigating to `/lead-gen/deliverability` either 404s or redirects as expected by the project's router config.
25
+
26
+ ## Not handled by /git-sync
27
+
28
+ - `/git-sync` pulls the template source change (removal of `deliverability.tsx` from `_template/ui/src/routes/lead-gen/`), but it does not automatically delete project-owned route files that still import `LeadGenDeliverabilityPage`.
29
+ - Any project-local sidebar override that hard-references the deliverability nav entry must be manually cleaned up.
30
+ - The route tree regeneration step must be run manually after route file removal.
@@ -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` and `_template/operations/package.json` by the release train.
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.
@@ -0,0 +1,43 @@
1
+ # Sync Notes
2
+
3
+ Template-owned downstream migration guidance lives in this directory.
4
+
5
+ ## File Contract
6
+
7
+ - Operative note files must be named `YYYY-MM-DD-<slug>.md`
8
+ - `README.md` explains the contract and is ignored by `/git-sync`
9
+ - Notes are append-only. Add a new dated file for each downstream-affecting release train instead of rewriting an older note
10
+
11
+ ## When A Note Is Mandatory
12
+
13
+ Add a new operative note whenever a train affects derived projects beyond a normal pull, install, and baseline verify. Common triggers:
14
+
15
+ - template dependency-baseline changes
16
+ - scaffold or sync-contract changes
17
+ - rename or migration work
18
+ - verifier or behavior changes that downstream maintainers need to understand
19
+ - any release train that will ask maintainers to do manual follow-up after pulling
20
+
21
+ ## Required Sections
22
+
23
+ Every operative note must include these exact headings:
24
+
25
+ ## Why this note exists
26
+
27
+ Explain what changed and why downstream maintainers are seeing this note.
28
+
29
+ ## Applies to
30
+
31
+ State which projects, app modes, or versions need the follow-up.
32
+
33
+ ## Required actions
34
+
35
+ List the manual work maintainers need to do after `/git-sync`.
36
+
37
+ ## Verification
38
+
39
+ List the commands or flows that confirm the migration landed correctly.
40
+
41
+ ## Not handled by /git-sync
42
+
43
+ Call out what remains manual so maintainers do not assume the pull/install/verify flow reconciled everything.
@@ -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. **Authenticate** -- calls the API with your `ELEVASIS_PLATFORM_KEY` to verify credentials and resolve your organization name
16
- 2. **Validate** -- runs your `src/index.ts` through `ResourceRegistry`, catching the same errors as the platform
17
- 3. **Bundle** -- uses esbuild to produce a single self-contained `dist/bundle.js` file (~50-200 KB) containing your code and all dependencies
18
- 4. **Upload** -- sends the bundle and resource metadata to the platform via `POST /api/external/deploy`
19
- 5. **Go live** -- the platform registers your resources; they are immediately available for execution
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 it, so running from subdirectories like `operations/` works automatically. Never commit this file.
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-15
195
+ **Last Updated:** 2026-04-23