@elevasis/sdk 1.24.0 → 1.26.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 (66) hide show
  1. package/dist/cli.cjs +875 -834
  2. package/dist/index.d.ts +4857 -4547
  3. package/dist/index.js +564 -2338
  4. package/dist/node/index.d.ts +693 -1356
  5. package/dist/node/index.js +1 -1
  6. package/dist/test-utils/index.d.ts +4186 -4139
  7. package/dist/test-utils/index.js +694 -2769
  8. package/dist/types/worker/adapters/clickup.d.ts +22 -0
  9. package/dist/types/worker/adapters/index.d.ts +1 -0
  10. package/dist/types/worker/index.d.ts +3 -2
  11. package/dist/types/worker/platform.d.ts +2 -2
  12. package/dist/worker/index.js +427 -2803
  13. package/package.json +2 -2
  14. package/reference/_navigation.md +11 -1
  15. package/reference/_reference-manifest.json +70 -0
  16. package/reference/claude-config/rules/organization-model.md +12 -1
  17. package/reference/claude-config/rules/organization-os.md +12 -1
  18. package/reference/claude-config/skills/om/SKILL.md +13 -5
  19. package/reference/claude-config/skills/om/operations/codify-level-a.md +109 -100
  20. package/reference/claude-config/skills/om/operations/customers.md +10 -6
  21. package/reference/claude-config/skills/om/operations/features.md +7 -3
  22. package/reference/claude-config/skills/om/operations/goals.md +10 -6
  23. package/reference/claude-config/skills/om/operations/identity.md +8 -5
  24. package/reference/claude-config/skills/om/operations/labels.md +17 -1
  25. package/reference/claude-config/skills/om/operations/offerings.md +11 -7
  26. package/reference/claude-config/skills/om/operations/roles.md +11 -7
  27. package/reference/claude-config/skills/om/operations/techStack.md +10 -2
  28. package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +32 -0
  29. package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +43 -0
  30. package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +40 -0
  31. package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +61 -0
  32. package/reference/cli-management.mdx +539 -0
  33. package/reference/cli.mdx +579 -808
  34. package/reference/concepts.mdx +134 -146
  35. package/reference/deployment/api.mdx +296 -297
  36. package/reference/deployment/command-center.mdx +208 -209
  37. package/reference/deployment/index.mdx +194 -195
  38. package/reference/deployment/provided-features.mdx +110 -107
  39. package/reference/deployment/ui-execution.mdx +249 -250
  40. package/reference/framework/index.mdx +111 -195
  41. package/reference/framework/resource-documentation.mdx +90 -0
  42. package/reference/framework/tutorial-system.mdx +135 -135
  43. package/reference/getting-started.mdx +141 -142
  44. package/reference/index.mdx +95 -106
  45. package/reference/packages/ui/src/auth/README.md +6 -6
  46. package/reference/platform-tools/adapters-integration.mdx +300 -301
  47. package/reference/platform-tools/adapters-platform.mdx +552 -553
  48. package/reference/platform-tools/index.mdx +216 -217
  49. package/reference/platform-tools/type-safety.mdx +82 -82
  50. package/reference/resources/index.mdx +348 -349
  51. package/reference/resources/patterns.mdx +446 -449
  52. package/reference/resources/types.mdx +115 -116
  53. package/reference/roadmap.mdx +164 -165
  54. package/reference/rules/organization-model.md +14 -0
  55. package/reference/runtime.mdx +172 -173
  56. package/reference/scaffold/operations/propagation-pipeline.md +1 -1
  57. package/reference/scaffold/recipes/customize-crm-actions.md +45 -46
  58. package/reference/scaffold/recipes/extend-crm.md +253 -255
  59. package/reference/scaffold/recipes/extend-lead-gen.md +130 -77
  60. package/reference/scaffold/recipes/index.md +43 -44
  61. package/reference/scaffold/reference/contracts.md +1275 -1432
  62. package/reference/scaffold/reference/glossary.md +8 -6
  63. package/reference/scaffold/ui/feature-flags-and-gating.md +59 -46
  64. package/reference/scaffold/ui/feature-shell.mdx +11 -11
  65. package/reference/scaffold/ui/recipes.md +24 -24
  66. package/reference/troubleshooting.mdx +222 -223
@@ -10,7 +10,9 @@ description: Terminology disambiguation for Organization OS concepts used in the
10
10
 
11
11
  ## Terms
12
12
 
13
- **AdminGuard** -- route-level admin wrapper from `@elevasis/ui/features/auth`. Must nest inside `ProtectedRoute`.
13
+ **AccessGuard** -- route-level and section-level access wrapper from `@elevasis/ui/auth`. It consumes the unified Access Model and gates on an `accessKey`.
14
+
15
+ **AccessKeys** -- exported access-key constants from `@elevasis/core/auth` / `@repo/core/auth` for platform-admin, diagnostic, and permission-backed gates.
14
16
 
15
17
  **Contract** -- the publishable boundary a consumer depends on: Zod schemas, TypeScript types, provider props, resource definitions, or workflow I/O schemas.
16
18
 
@@ -18,7 +20,7 @@ description: Terminology disambiguation for Organization OS concepts used in the
18
20
 
19
21
  **Feature** -- legacy or UI-package wording for a platform capability area. In the current Organization Model, use **System** for semantic ownership and **navigation surface** for shell placement. Keep "feature" only when referring to existing UI package folders, exported manifest names, or legacy compatibility recipes.
20
22
 
21
- **SystemGuard** -- route-level System gate from `@elevasis/ui/features/auth`.
23
+ **SystemGuard** -- retired route-level System gate. Use **AccessGuard** with a System path or `AccessKeys` constant.
22
24
 
23
25
  **SystemModule** -- manifest contract a shell module provides to `ElevasisSystemsProvider`. Key fields are `key`, optional `systemId`, optional `routePrefixes`, optional `capabilityIds`, optional `icon`, optional `sidebar`, and optional `sidebarWidth`. Graph bridge metadata is compatibility-only; new semantic bindings belong in the Organization Model System, ontology, navigation, and Resource descriptors.
24
26
 
@@ -32,13 +34,13 @@ description: Terminology disambiguation for Organization OS concepts used in the
32
34
 
33
35
  **Manifest** -- a runtime declaration for a feature or resource collection.
34
36
 
35
- **MembershipFeatureConfig** -- legacy per-member feature override config. Current System visibility should be authored through Organization Model System lifecycle/access metadata and resolved through provider compatibility layers for older consumers.
37
+ **MembershipFeatureConfig** -- retired per-member feature override config. The migration is complete: access is resolved through the unified Access Model using Organization Model System lifecycle, role permissions, diagnostic allowlists, membership scope, and platform-admin bypass.
36
38
 
37
39
  **OrganizationModel** -- top-level semantic contract for an organization. Current primary fields include `version`, `domainMetadata`, `branding`, `navigation`, `ontology`, `systems`, `resources`, `topology`, `identity`, `customers`, `offerings`, `roles`, `goals`, `policies`, `statuses`, and `knowledge`. Legacy domain keys such as `sales`, `prospecting`, `projects`, `actions`, and `entities` remain compatibility inputs while projects migrate to System-owned ontology/config/resource contracts.
38
40
 
39
41
  **OrganizationModelSystemEntry** -- System node in `OrganizationModel.systems`. Primary authoring fields include `id`, `label`, `description`, `parentSystemId`, `systems`, `lifecycle`, `ui`, `requiresAdmin`, `devOnly`, `responsibleRoleId`, `governedByKnowledge`, `drivesGoals`, `actions`, `policies`, `ontology`, `config`, and `order`. `subsystems` and `content` are retained compatibility inputs for older projects and should not be used for new recursive Systems, schemas, catalogs, or config.
40
42
 
41
- **Provider / ElevasisSystemsProvider** -- runtime that registers System modules, resolves System access against the org model, projects sidebar navigation, and exposes shell helpers through `useElevasisSystems()`.
43
+ **Provider / ElevasisSystemsProvider** -- runtime that registers System modules, resolves System lifecycle against the org model, projects sidebar navigation, and exposes shell helpers through `useElevasisSystems()`.
42
44
 
43
45
  **Resource** -- governance-only descriptor in `OrganizationModel.resources` for a workflow, agent, integration, or script. Runtime code derives `resourceId` and kind from the descriptor, then attaches executable behavior in operations.
44
46
 
@@ -65,13 +67,13 @@ description: Terminology disambiguation for Organization OS concepts used in the
65
67
  - `OrganizationModel`, `OrganizationModelSystemEntry`
66
68
  - `SystemEntry`, `ResourceEntry`
67
69
  - `resolveOrganizationModel`, `defineOrganizationModel`, `DEFAULT_ORGANIZATION_MODEL`
68
- - `MembershipFeatureConfig`
70
+ - `AccessKeys`, `checkAccess`, `createAccessModel`
69
71
  - `DeploymentSpec`, `ResourceLink`, `ResourceCategory`
70
72
 
71
73
  **`@elevasis/ui`**
72
74
 
73
75
  - `SystemModule`
74
- - `SystemGuard`, `AdminGuard`, `ProtectedRoute`
76
+ - `AccessGuard`, `ProtectedRoute`
75
77
  - `ElevasisSystemsProvider`, `ElevasisCoreProvider`, `useElevasisSystems`
76
78
 
77
79
  **External project source**
@@ -1,49 +1,62 @@
1
1
  <!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
2
2
  <!-- Regenerate: pnpm scaffold:sync -->
3
3
 
4
- # System Flags And Gating
5
-
6
- System visibility is keyed by Organization Model system ID.
7
-
8
- ## Where Visibility Comes From
9
-
10
- - `systems.systems[].enabled` in the organization model defines the baseline.
11
- - Membership system config can override individual system IDs.
12
- - `requiresAdmin` hides sidebar entries from non-admins.
13
- - `devOnly` hides sidebar entries outside development mode.
14
-
15
- The shell derives visible sidebar entries from `shellModel.topLevel()` and `shellModel.childrenOf(id)`.
16
-
17
- ## Route Guards
18
-
19
- Navigation visibility is cosmetic. Always guard routes directly:
20
-
21
- ```tsx
22
- <ProtectedRoute>
23
- <SystemGuard systemKey="sales.crm">
24
- <Outlet />
25
- </SystemGuard>
26
- </ProtectedRoute>
27
- ```
28
-
29
- For admin-only routes:
30
-
31
- ```tsx
32
- <AdminGuard>
33
- <SystemHealthPage />
34
- </AdminGuard>
35
- ```
36
-
37
- ## Adding A Gated System
38
-
39
- ```ts
40
- {
41
- id: 'analytics',
42
- label: 'Analytics',
43
- enabled: true,
44
- path: '/analytics',
45
- uiPosition: 'sidebar-primary'
46
- }
47
- ```
48
-
49
- Use the same ID in `SystemGuard systemKey` and `SystemModule.systemId`.
4
+ # System Flags And Gating
5
+
6
+ System access is keyed by Organization Model system path and resolved through the unified Access Model.
7
+
8
+ ## Where Visibility Comes From
9
+
10
+ - `systems` entries in the organization model define available System paths.
11
+ - `lifecycle: 'active'` enables normal access.
12
+ - `lifecycle: 'beta'` is allowed only when the runtime enables beta access or runs in development mode.
13
+ - `lifecycle: 'draft'`, `'deprecated'`, and `'archived'` deny access.
14
+ - Role permissions such as `org.manage` and `operations.read` are represented by permission-backed `AccessKeys`.
15
+ - Platform admins bypass through `checkAccess` with `reason: 'platform-admin-bypass'`.
16
+
17
+ The shell derives visible sidebar entries from `shellModel.topLevel()` and `shellModel.childrenOf(id)`.
18
+
19
+ ## Route Guards
20
+
21
+ Navigation visibility is cosmetic. Always guard routes directly:
22
+
23
+ ```tsx
24
+ import { AccessGuard } from '@elevasis/ui/auth'
25
+
26
+ <ProtectedRoute>
27
+ <AccessGuard accessKey="sales.crm">
28
+ <Outlet />
29
+ </AccessGuard>
30
+ </ProtectedRoute>
31
+ ```
32
+
33
+ For admin-only routes:
34
+
35
+ ```tsx
36
+ import { AccessKeys } from '@elevasis/core/auth'
37
+ import { AccessGuard } from '@elevasis/ui/auth'
38
+
39
+ <AccessGuard accessKey={AccessKeys.platformAdmin}>
40
+ <SystemHealthPage />
41
+ </AccessGuard>
42
+ ```
43
+
44
+ ## Adding A Gated System
45
+
46
+ ```ts
47
+ {
48
+ id: 'analytics',
49
+ label: 'Analytics',
50
+ lifecycle: 'active',
51
+ path: '/analytics',
52
+ uiPosition: 'sidebar-primary'
53
+ }
54
+ ```
55
+
56
+ Use the same System path in `AccessGuard accessKey` and `SystemModule.systemId`. For action-level checks, use the structured key shape:
57
+
58
+ ```ts
59
+ { systemPath: 'analytics', action: 'manage' }
60
+ ```
61
+
62
+ Prefer exported `AccessKeys` for permission-backed or diagnostic access keys.
@@ -58,17 +58,17 @@ Sidebar rendering walks `topLevel()` and `childrenOf(id)`. Breadcrumbs resolve `
58
58
 
59
59
  System access is keyed by Organization Model system ID. `requiresAdmin` and `devOnly` inherit from ancestor system nodes and are applied when deriving visible sidebar entries.
60
60
 
61
- Routes still need guards:
62
-
63
- ```tsx
64
- <ProtectedRoute>
65
- <SystemGuard systemKey="sales.crm">
66
- <Outlet />
67
- </SystemGuard>
68
- </ProtectedRoute>
69
- ```
70
-
71
- Use `AdminGuard` for pages that require platform-admin privileges.
61
+ Routes still need guards:
62
+
63
+ ```tsx
64
+ <ProtectedRoute>
65
+ <AccessGuard accessKey="sales.crm">
66
+ <Outlet />
67
+ </AccessGuard>
68
+ </ProtectedRoute>
69
+ ```
70
+
71
+ Use `AccessKeys.platformAdmin` with `AccessGuard` for pages that require platform-admin privileges.
72
72
 
73
73
  ## External Shells
74
74
 
@@ -56,31 +56,31 @@ systems: {
56
56
 
57
57
  TanStack Router derives the path from the filename. The sidebar is derived from `OrganizationModel.systems`.
58
58
 
59
- ## 2. Add a System-Gated Page
60
-
61
- Wrap the route with `SystemGuard` and use the same system ID as the org model node.
62
-
63
- ```tsx
64
- import { SystemGuard } from '@elevasis/ui/features/auth'
65
-
66
- function MySystemRouteComponent() {
67
- return (
68
- <ProtectedRoute>
69
- <SystemGuard systemKey="my-system">
70
- <AppTopbarAdjusterWrapper>
71
- <AppShellContentContainer>
72
- <PageContainer>
59
+ ## 2. Add an Access-Gated Page
60
+
61
+ Wrap the route with `AccessGuard` and use the same system path as the org model node.
62
+
63
+ ```tsx
64
+ import { AccessGuard } from '@elevasis/ui/auth'
65
+
66
+ function MySystemRouteComponent() {
67
+ return (
68
+ <ProtectedRoute>
69
+ <AccessGuard accessKey="my-system">
70
+ <AppTopbarAdjusterWrapper>
71
+ <AppShellContentContainer>
72
+ <PageContainer>
73
73
  <MySystemPage />
74
- </PageContainer>
75
- </AppShellContentContainer>
76
- </AppTopbarAdjusterWrapper>
77
- </SystemGuard>
78
- </ProtectedRoute>
79
- )
80
- }
81
- ```
82
-
83
- Set `enabled: false` in the system node to hide it by default. Use `requiresAdmin: true` on the system node plus `AdminGuard` in the route for admin-only pages.
74
+ </PageContainer>
75
+ </AppShellContentContainer>
76
+ </AppTopbarAdjusterWrapper>
77
+ </AccessGuard>
78
+ </ProtectedRoute>
79
+ )
80
+ }
81
+ ```
82
+
83
+ Set `lifecycle` to an inactive state in the system node to hide or deny access by default. Use `AccessKeys.platformAdmin` with `AccessGuard` for platform-admin-only pages.
84
84
 
85
85
  ## 3. Add a Nested Page
86
86