@elevasis/sdk 1.20.1 → 1.21.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 +3388 -1530
- package/dist/index.d.ts +412 -149
- package/dist/index.js +955 -721
- package/dist/node/index.d.ts +0 -3
- package/dist/node/index.js +22 -49
- package/dist/test-utils/index.d.ts +395 -128
- package/dist/test-utils/index.js +599 -368
- package/dist/worker/index.js +536 -323
- package/package.json +4 -4
- package/reference/_navigation.md +9 -7
- package/reference/_reference-manifest.json +1 -1
- package/reference/claude-config/rules/agent-start-here.md +4 -0
- package/reference/claude-config/rules/frontend.md +2 -2
- package/reference/claude-config/rules/organization-model.md +44 -2
- package/reference/claude-config/rules/organization-os.md +12 -12
- package/reference/claude-config/rules/ui.md +14 -14
- package/reference/claude-config/rules/vibe.md +37 -33
- package/reference/claude-config/skills/explore/SKILL.md +6 -6
- package/reference/claude-config/skills/knowledge/SKILL.md +73 -29
- package/reference/claude-config/skills/knowledge/operations/codify-level-a.md +1 -1
- package/reference/claude-config/skills/knowledge/operations/codify-level-b.md +25 -24
- package/reference/claude-config/skills/knowledge/operations/features.md +56 -93
- package/reference/claude-config/skills/knowledge/operations/labels.md +19 -14
- package/reference/claude-config/skills/knowledge/operations/offerings.md +6 -6
- package/reference/claude-config/skills/save/SKILL.md +2 -2
- package/reference/claude-config/skills/setup/SKILL.md +1 -1
- package/reference/claude-config/skills/tutorial/technical.md +23 -26
- package/reference/claude-config/skills/tutorial/vibe-coder.md +9 -9
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +30 -0
- package/reference/cli.mdx +140 -0
- package/reference/deployment/provided-features.mdx +29 -15
- package/reference/examples/organization-model.ts +1 -1
- package/reference/packages/core/src/knowledge/README.md +8 -7
- package/reference/packages/core/src/organization-model/README.md +66 -26
- package/reference/packages/ui/src/provider/README.md +5 -5
- package/reference/scaffold/core/organization-graph.mdx +16 -15
- package/reference/scaffold/core/organization-model.mdx +89 -41
- package/reference/scaffold/index.mdx +9 -9
- package/reference/scaffold/operations/propagation-pipeline.md +3 -3
- package/reference/scaffold/operations/scaffold-maintenance.md +11 -11
- package/reference/scaffold/recipes/add-a-feature.md +26 -24
- package/reference/scaffold/recipes/add-a-resource.md +10 -14
- package/reference/scaffold/recipes/customize-crm-actions.md +439 -439
- package/reference/scaffold/recipes/customize-knowledge-browser.md +384 -0
- package/reference/scaffold/recipes/customize-organization-model.md +72 -44
- package/reference/scaffold/recipes/extend-crm.md +40 -39
- package/reference/scaffold/recipes/extend-lead-gen.md +15 -16
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +34 -30
- package/reference/scaffold/recipes/index.md +13 -12
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +200 -0
- package/reference/scaffold/reference/contracts.md +362 -99
- package/reference/scaffold/reference/feature-registry.md +9 -20
- package/reference/scaffold/reference/glossary.md +18 -18
- package/reference/scaffold/ui/composition-extensibility.mdx +23 -23
- package/reference/scaffold/ui/customization.md +11 -11
- package/reference/scaffold/ui/feature-flags-and-gating.md +8 -8
- package/reference/scaffold/ui/feature-shell.mdx +19 -19
- package/reference/scaffold/ui/recipes.md +29 -28
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Add a Feature
|
|
3
|
-
description: Add a shell feature using the flat Organization Model feature list, manifest registration, routes, and guards.
|
|
4
|
-
---
|
|
5
1
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
2
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
3
|
|
|
4
|
+
---
|
|
5
|
+
title: Add a System
|
|
6
|
+
description: Add a shell system using the Organization Model system list, manifest registration, routes, and guards.
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
# Add a
|
|
9
|
+
# Add a System
|
|
10
10
|
|
|
11
|
-
Shell navigation is derived from `OrganizationModel.
|
|
11
|
+
Shell navigation is derived from `OrganizationModel.systems`. System manifests attach implementation details to those system IDs; they do not declare sidebar nav structure.
|
|
12
12
|
|
|
13
|
-
## 1. Add the
|
|
13
|
+
## 1. Add the system node
|
|
14
14
|
|
|
15
|
-
Edit `core/config/organization-model.ts` and add a
|
|
15
|
+
Edit `core/config/organization-model.ts` and add a system to the id-keyed `systems` override.
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
const organizationOverride = defineOrganizationModel({
|
|
19
|
-
|
|
20
|
-
{
|
|
19
|
+
systems: {
|
|
20
|
+
analytics: {
|
|
21
21
|
id: 'analytics',
|
|
22
|
+
order: 10,
|
|
22
23
|
label: 'Analytics',
|
|
23
24
|
enabled: true,
|
|
24
25
|
path: '/analytics',
|
|
25
26
|
icon: 'custom.analytics',
|
|
26
27
|
uiPosition: 'sidebar-primary'
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
+
}
|
|
29
30
|
})
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
Use dotted IDs for hierarchy:
|
|
33
34
|
|
|
34
35
|
```ts
|
|
35
|
-
{ id: 'analytics', label: 'Analytics', enabled: true, uiPosition: 'sidebar-primary' },
|
|
36
|
-
{ id: 'analytics.reports', label: 'Reports', enabled: true, path: '/analytics/reports' }
|
|
36
|
+
analytics: { id: 'analytics', order: 10, label: 'Analytics', enabled: true, uiPosition: 'sidebar-primary' },
|
|
37
|
+
'analytics.reports': { id: 'analytics.reports', order: 20, label: 'Reports', enabled: true, path: '/analytics/reports' }
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
Containers omit `path`; leaves provide `path`.
|
|
@@ -43,27 +44,27 @@ Containers omit `path`; leaves provide `path`.
|
|
|
43
44
|
Create `ui/src/features/analytics/manifest.ts`.
|
|
44
45
|
|
|
45
46
|
```ts
|
|
46
|
-
import type {
|
|
47
|
+
import type { SystemModule } from '@elevasis/ui/provider'
|
|
47
48
|
import { IconChartBar } from '@tabler/icons-react'
|
|
48
49
|
import { AnalyticsSidebar } from './sidebar'
|
|
49
50
|
|
|
50
|
-
export const analyticsManifest:
|
|
51
|
+
export const analyticsManifest: SystemModule = {
|
|
51
52
|
key: 'analytics',
|
|
52
|
-
|
|
53
|
+
systemId: 'analytics',
|
|
53
54
|
icon: IconChartBar,
|
|
54
55
|
sidebar: AnalyticsSidebar
|
|
55
56
|
}
|
|
56
57
|
```
|
|
57
58
|
|
|
58
|
-
Register it in the `
|
|
59
|
+
Register it in the `SYSTEM_MANIFESTS` array in `ui/src/routes/__root.tsx`.
|
|
59
60
|
|
|
60
61
|
## 3. Add routes
|
|
61
62
|
|
|
62
|
-
Create TanStack routes whose paths match the
|
|
63
|
+
Create TanStack routes whose paths match the system nodes.
|
|
63
64
|
|
|
64
65
|
```tsx
|
|
65
66
|
import { createFileRoute, Outlet } from '@tanstack/react-router'
|
|
66
|
-
import { ProtectedRoute,
|
|
67
|
+
import { ProtectedRoute, SystemGuard } from '@elevasis/ui/features/auth'
|
|
67
68
|
|
|
68
69
|
export const Route = createFileRoute('/analytics')({
|
|
69
70
|
component: AnalyticsLayout
|
|
@@ -72,9 +73,9 @@ export const Route = createFileRoute('/analytics')({
|
|
|
72
73
|
function AnalyticsLayout() {
|
|
73
74
|
return (
|
|
74
75
|
<ProtectedRoute>
|
|
75
|
-
<
|
|
76
|
+
<SystemGuard systemKey="analytics">
|
|
76
77
|
<Outlet />
|
|
77
|
-
</
|
|
78
|
+
</SystemGuard>
|
|
78
79
|
</ProtectedRoute>
|
|
79
80
|
)
|
|
80
81
|
}
|
|
@@ -82,7 +83,7 @@ function AnalyticsLayout() {
|
|
|
82
83
|
|
|
83
84
|
## 4. Add backing resources
|
|
84
85
|
|
|
85
|
-
For workflows or agents that power the
|
|
86
|
+
For workflows or agents that power the system, author an OM Resource descriptor first, then derive runtime metadata from it:
|
|
86
87
|
|
|
87
88
|
```ts
|
|
88
89
|
// core/config/organization-model.ts
|
|
@@ -91,8 +92,9 @@ import { defineResources } from '@elevasis/core/organization-model'
|
|
|
91
92
|
export const resourceDescriptors = defineResources({
|
|
92
93
|
analyticsRefresh: {
|
|
93
94
|
id: 'analytics-refresh',
|
|
95
|
+
order: 10,
|
|
94
96
|
kind: 'workflow',
|
|
95
|
-
systemId: '
|
|
97
|
+
systemId: 'analytics',
|
|
96
98
|
ownerRoleId: 'role-ops-lead',
|
|
97
99
|
status: 'active'
|
|
98
100
|
}
|
|
@@ -106,7 +108,6 @@ config: {
|
|
|
106
108
|
type: resourceDescriptors.analyticsRefresh.kind,
|
|
107
109
|
version: '1.0.0',
|
|
108
110
|
status: 'prod',
|
|
109
|
-
links: [{ nodeId: 'feature:analytics', kind: 'operates-on' }],
|
|
110
111
|
category: 'production'
|
|
111
112
|
}
|
|
112
113
|
```
|
|
@@ -118,3 +119,4 @@ pnpm -C ui check-types
|
|
|
118
119
|
pnpm -C ui test
|
|
119
120
|
pnpm -C operations check
|
|
120
121
|
```
|
|
122
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Add a Resource
|
|
3
|
-
description: Add an OM-owned workflow or agent descriptor, bind executable behavior in operations, and verify descriptor-backed deployment.
|
|
4
|
-
---
|
|
5
1
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
2
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
3
|
|
|
4
|
+
---
|
|
5
|
+
title: Add a Resource
|
|
6
|
+
description: Add an OM-owned workflow or agent descriptor, bind executable behavior in operations, and verify descriptor-backed deployment.
|
|
7
|
+
---
|
|
8
8
|
|
|
9
9
|
# Add a Resource
|
|
10
10
|
|
|
@@ -22,11 +22,12 @@ import { defineResources } from '@elevasis/core/organization-model'
|
|
|
22
22
|
export const resourceDescriptors = defineResources({
|
|
23
23
|
myWorkflow: {
|
|
24
24
|
id: 'my-workflow',
|
|
25
|
+
order: 10,
|
|
25
26
|
kind: 'workflow',
|
|
26
|
-
|
|
27
|
+
systemPath: 'sys.operations',
|
|
27
28
|
ownerRoleId: 'role-ops-lead',
|
|
28
29
|
status: 'active',
|
|
29
|
-
|
|
30
|
+
actionKey: 'operations.my-workflow'
|
|
30
31
|
}
|
|
31
32
|
})
|
|
32
33
|
```
|
|
@@ -35,16 +36,12 @@ Then expose the descriptor catalog through the Organization Model:
|
|
|
35
36
|
|
|
36
37
|
```ts
|
|
37
38
|
export const resourceGovernanceModel = {
|
|
38
|
-
systems
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
resources: {
|
|
42
|
-
entries: Object.values(resourceDescriptors)
|
|
43
|
-
}
|
|
39
|
+
systems,
|
|
40
|
+
resources: resourceDescriptors
|
|
44
41
|
} as const
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
Use `organizationModel.resources
|
|
44
|
+
Use `organizationModel.resources` as the Resources descriptor catalog. Graph references still use kind-prefixed IDs, such as `system:sales.crm`, `resource:lead-import`, or `action:operations.queue.review`, when runtime behavior needs semantic graph binding.
|
|
48
45
|
|
|
49
46
|
## 2. Author executable behavior
|
|
50
47
|
|
|
@@ -62,7 +59,6 @@ export const myWorkflow: WorkflowDefinition = {
|
|
|
62
59
|
type: resourceDescriptors.myWorkflow.kind,
|
|
63
60
|
version: '1.0.0',
|
|
64
61
|
status: 'dev',
|
|
65
|
-
links: [{ nodeId: 'feature:operations', kind: 'operates-on' }],
|
|
66
62
|
category: 'production'
|
|
67
63
|
},
|
|
68
64
|
contract: {
|