@elevasis/sdk 1.44.3 → 1.46.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 +35026 -30226
- package/dist/index.d.ts +1786 -808
- package/dist/index.js +789 -739
- package/dist/node/index.d.ts +105 -181
- package/dist/node/index.js +2 -2
- package/dist/test-utils/index.d.ts +901 -359
- package/dist/test-utils/index.js +587 -824
- package/dist/worker/index.d.ts +12685 -0
- package/dist/worker/index.js +188 -216
- package/package.json +4 -7
- package/reference/_navigation.md +161 -22
- package/reference/_reference-manifest.json +228 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/exports.mdx +2 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- package/reference/packages/core/src/business/README.md +4 -1
- package/reference/packages/core/src/content/README.md +19 -0
- package/reference/packages/core/src/organization-model/README.md +148 -149
- package/reference/packages/core/src/organization-model/readiness/README.md +42 -0
- package/reference/packages/ui/src/features/README.md +28 -28
- package/reference/rules/active-change-index.md +40 -54
- package/reference/rules/agent-runtime.md +81 -0
- package/reference/rules/agent-start-here.md +71 -163
- package/reference/rules/deployment.md +33 -10
- package/reference/rules/error-handling.md +26 -0
- package/reference/rules/execution.md +13 -0
- package/reference/rules/frontend.md +10 -3
- package/reference/rules/observability.md +9 -1
- package/reference/rules/operations.md +26 -17
- package/reference/rules/organization-model.md +74 -88
- package/reference/rules/organization-os.md +71 -88
- package/reference/rules/package-taxonomy.md +11 -2
- package/reference/rules/platform.md +13 -7
- package/reference/rules/shared-types.md +36 -0
- package/reference/rules/task-tracking.md +30 -5
- package/reference/rules/ui.md +145 -3
- package/reference/rules/vibe-intents.md +271 -0
- package/reference/rules/vibe.md +17 -243
- package/reference/scaffold/core/organization-graph.mdx +112 -99
- package/reference/scaffold/core/organization-model.mdx +231 -215
- package/reference/scaffold/operations/propagation-pipeline.md +16 -17
- package/reference/scaffold/operations/scaffold-maintenance.md +22 -20
- package/reference/scaffold/operations/workflow-recipes.md +72 -20
- package/reference/scaffold/recipes/add-a-feature.md +156 -146
- package/reference/scaffold/recipes/add-a-resource.md +123 -117
- package/reference/scaffold/recipes/customize-crm-actions.md +28 -13
- package/reference/scaffold/recipes/customize-knowledge-browser.md +52 -117
- package/reference/scaffold/recipes/customize-organization-model.md +161 -149
- package/reference/scaffold/recipes/extend-a-base-entity.md +156 -140
- package/reference/scaffold/recipes/extend-content.md +265 -0
- package/reference/scaffold/recipes/extend-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +37 -21
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +6 -3
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +30 -56
- package/reference/scaffold/reference/feature-registry.md +3 -0
- package/reference/scaffold/reference/glossary.md +4 -4
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/customization.md +2 -2
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +277 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +166 -33
- package/reference/sdk/cli.mdx +90 -13
- package/reference/sdk/concepts.mdx +2 -0
- package/reference/sdk/define-builders.mdx +76 -0
- package/reference/sdk/deployment/command-center.mdx +6 -2
- package/reference/sdk/deployment/execution-reference.mdx +64 -186
- package/reference/sdk/deployment/index.mdx +2 -0
- package/reference/sdk/exports.mdx +4 -4
- package/reference/sdk/framework/agent.mdx +52 -116
- package/reference/sdk/framework/index.mdx +46 -65
- package/reference/sdk/framework/project-structure.mdx +150 -205
- package/reference/sdk/framework/tutorial-system.mdx +2 -2
- package/reference/sdk/human-in-the-loop.mdx +152 -0
- package/reference/sdk/index.mdx +6 -7
- package/reference/sdk/platform-tools/adapters-platform.mdx +3 -1
- package/reference/sdk/platform-tools/index.mdx +12 -0
- package/reference/sdk/platform-tools/type-safety.mdx +4 -0
- package/reference/sdk/project-deployment-spec.mdx +131 -0
- package/reference/sdk/resources/index.mdx +21 -7
- package/reference/sdk/resources/patterns.mdx +54 -24
- package/reference/sdk/resources/types.mdx +7 -4
- package/reference/sdk/templates/data-enrichment.mdx +7 -3
- package/reference/sdk/templates/email-sender.mdx +139 -135
- package/reference/sdk/templates/lead-scorer.mdx +5 -1
- package/reference/sdk/templates/pdf-generator.mdx +155 -151
- package/reference/sdk/templates/recurring-job.mdx +195 -189
- package/reference/sdk/templates/text-classifier.mdx +4 -0
- package/reference/sdk/templates/web-scraper.mdx +139 -135
- package/reference/spine/spine-primer.md +135 -96
- package/reference/ui/exports.mdx +1 -0
- package/reference/ui/index.mdx +14 -7
- package/dist/types/worker/adapters/anymailfinder.d.ts +0 -14
- package/dist/types/worker/adapters/apify.d.ts +0 -14
- package/dist/types/worker/adapters/approval.d.ts +0 -23
- package/dist/types/worker/adapters/attio.d.ts +0 -22
- package/dist/types/worker/adapters/clickup.d.ts +0 -22
- package/dist/types/worker/adapters/create-adapter.d.ts +0 -41
- package/dist/types/worker/adapters/crm.d.ts +0 -20
- package/dist/types/worker/adapters/dropbox.d.ts +0 -14
- package/dist/types/worker/adapters/email.d.ts +0 -25
- package/dist/types/worker/adapters/execution.d.ts +0 -22
- package/dist/types/worker/adapters/gmail.d.ts +0 -14
- package/dist/types/worker/adapters/google-sheets.d.ts +0 -14
- package/dist/types/worker/adapters/index.d.ts +0 -33
- package/dist/types/worker/adapters/instantly.d.ts +0 -14
- package/dist/types/worker/adapters/lead.d.ts +0 -28
- package/dist/types/worker/adapters/list.d.ts +0 -9
- package/dist/types/worker/adapters/llm.d.ts +0 -45
- package/dist/types/worker/adapters/millionverifier.d.ts +0 -14
- package/dist/types/worker/adapters/notification.d.ts +0 -28
- package/dist/types/worker/adapters/pdf.d.ts +0 -22
- package/dist/types/worker/adapters/projects.d.ts +0 -20
- package/dist/types/worker/adapters/resend.d.ts +0 -14
- package/dist/types/worker/adapters/scheduler.d.ts +0 -25
- package/dist/types/worker/adapters/signature-api.d.ts +0 -14
- package/dist/types/worker/adapters/storage.d.ts +0 -33
- package/dist/types/worker/adapters/stripe.d.ts +0 -14
- package/dist/types/worker/adapters/tomba.d.ts +0 -14
- package/dist/types/worker/index.d.ts +0 -60
- package/dist/types/worker/platform.d.ts +0 -90
- package/dist/types/worker/utils.d.ts +0 -9
- package/reference/claude-config/Overview.md +0 -230
- package/reference/claude-config/hooks/post-edit-validate.mjs +0 -98
- package/reference/claude-config/hooks/scaffold-registry-reminder.mjs +0 -187
- package/reference/claude-config/hooks/tool-failure-recovery.mjs +0 -73
- package/reference/claude-config/registries/graph-skills.json +0 -4
- package/reference/claude-config/registries/knowledge-flags.json +0 -154
- package/reference/claude-config/registries/skill-coverage.json +0 -20
- package/reference/claude-config/rules/active-change-index.md +0 -22
- package/reference/claude-config/rules/agent-start-here.md +0 -22
- package/reference/claude-config/rules/deployment.md +0 -22
- package/reference/claude-config/rules/error-handling.md +0 -22
- package/reference/claude-config/rules/execution.md +0 -22
- package/reference/claude-config/rules/frontend.md +0 -22
- package/reference/claude-config/rules/observability.md +0 -22
- package/reference/claude-config/rules/operations.md +0 -22
- package/reference/claude-config/rules/organization-model.md +0 -22
- package/reference/claude-config/rules/organization-os.md +0 -22
- package/reference/claude-config/rules/package-taxonomy.md +0 -22
- package/reference/claude-config/rules/platform.md +0 -22
- package/reference/claude-config/rules/shared-types.md +0 -22
- package/reference/claude-config/rules/task-tracking.md +0 -22
- package/reference/claude-config/rules/topbar-actions.md +0 -70
- package/reference/claude-config/rules/ui.md +0 -22
- package/reference/claude-config/rules/vibe.md +0 -22
- package/reference/claude-config/scripts/statusline-command.js +0 -18
- package/reference/claude-config/settings.json +0 -30
- package/reference/claude-config/skills/client/SKILL.md +0 -201
- package/reference/claude-config/skills/deploy/SKILL.md +0 -159
- package/reference/claude-config/skills/dsp/SKILL.md +0 -66
- package/reference/claude-config/skills/elevasis/SKILL.md +0 -251
- package/reference/claude-config/skills/explore/SKILL.md +0 -78
- package/reference/claude-config/skills/git-sync/SKILL.md +0 -166
- package/reference/claude-config/skills/om/SKILL.md +0 -475
- package/reference/claude-config/skills/om/operations/build.md +0 -237
- package/reference/claude-config/skills/om/operations/codify-level-a.md +0 -109
- package/reference/claude-config/skills/om/operations/codify-level-b.md +0 -159
- package/reference/claude-config/skills/om/operations/customers.md +0 -114
- package/reference/claude-config/skills/om/operations/features.md +0 -88
- package/reference/claude-config/skills/om/operations/goals.md +0 -123
- package/reference/claude-config/skills/om/operations/identity.md +0 -97
- package/reference/claude-config/skills/om/operations/labels.md +0 -110
- package/reference/claude-config/skills/om/operations/offerings.md +0 -114
- package/reference/claude-config/skills/om/operations/roles.md +0 -104
- package/reference/claude-config/skills/om/operations/scaffold.md +0 -163
- package/reference/claude-config/skills/om/operations/techStack.md +0 -38
- package/reference/claude-config/skills/project/SKILL.md +0 -1114
- package/reference/claude-config/skills/run-ui/SKILL.md +0 -73
- package/reference/claude-config/skills/save/SKILL.md +0 -183
- package/reference/claude-config/skills/setup/SKILL.md +0 -290
- package/reference/claude-config/skills/status/SKILL.md +0 -59
- package/reference/claude-config/skills/submit-request/SKILL.md +0 -180
- package/reference/claude-config/skills/sync/SKILL.md +0 -47
- package/reference/claude-config/skills/tutorial/SKILL.md +0 -259
- package/reference/claude-config/skills/tutorial/progress-template.md +0 -74
- package/reference/claude-config/skills/tutorial/technical.md +0 -1303
- package/reference/claude-config/skills/tutorial/vibe-coder.md +0 -890
- package/reference/claude-config/sync-notes/2026-04-22-git-sync-and-sync-notes.md +0 -27
- package/reference/claude-config/sync-notes/2026-04-22-lead-gen-deliverability-removal.md +0 -30
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +0 -73
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +0 -86
- package/reference/claude-config/sync-notes/2026-04-25-auth-role-system-and-settings-roles.md +0 -55
- package/reference/claude-config/sync-notes/2026-04-27-crm-hitl-action-layer-cutover.md +0 -97
- package/reference/claude-config/sync-notes/2026-04-27-lead-gen-substrate-train.md +0 -112
- package/reference/claude-config/sync-notes/2026-04-29-crm-state-and-lead-gen-processing-status.md +0 -93
- package/reference/claude-config/sync-notes/2026-05-02-crm-ownership-next-action.md +0 -58
- package/reference/claude-config/sync-notes/2026-05-02-template-hardcode-workos-config.md +0 -56
- package/reference/claude-config/sync-notes/2026-05-04-elevasis-workspace.md +0 -71
- package/reference/claude-config/sync-notes/2026-05-04-knowledge-bundle.md +0 -83
- package/reference/claude-config/sync-notes/2026-05-04-template-skills-run-ui-and-tutorial.md +0 -59
- package/reference/claude-config/sync-notes/2026-05-05-list-builder.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-06-crm-spine.md +0 -60
- package/reference/claude-config/sync-notes/2026-05-06-sdk-changes-release-train.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-07-sdk-changes-release-train.md +0 -34
- package/reference/claude-config/sync-notes/2026-05-08-resource-governance-scaffold-guidance.md +0 -38
- package/reference/claude-config/sync-notes/2026-05-09-clients-domain.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-09-command-system.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-09-resource-governance-and-misc.md +0 -69
- package/reference/claude-config/sync-notes/2026-05-12-sdk-ready-release-train.md +0 -30
- package/reference/claude-config/sync-notes/2026-05-14-organization-model-ontology-refactor.md +0 -45
- package/reference/claude-config/sync-notes/2026-05-15-om-skill-rename-and-write-family.md +0 -52
- package/reference/claude-config/sync-notes/2026-05-17-sdk-boundary-consolidation.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-20-om-define-helpers.md +0 -32
- package/reference/claude-config/sync-notes/2026-05-22-access-model-and-right-panel.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-22-lead-gen-tenant-config.md +0 -40
- package/reference/claude-config/sync-notes/2026-05-22-org-model-multi-file-split.md +0 -61
- package/reference/claude-config/sync-notes/2026-05-23-branding-names-to-identity.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-23-lead-gen-manage-access.md +0 -31
- package/reference/claude-config/sync-notes/2026-05-23-om-deployment-drift-detection.md +0 -42
- package/reference/claude-config/sync-notes/2026-05-23-om-full-model-deploy-contract.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-23-ui-sdk-package-fixes.md +0 -37
- package/reference/claude-config/sync-notes/2026-05-24-platform-invite-router-core-baseline.md +0 -28
- package/reference/claude-config/sync-notes/2026-05-24-system-interface-readiness.md +0 -43
- package/reference/claude-config/sync-notes/2026-05-25-invitation-login-loader.md +0 -26
- package/reference/claude-config/sync-notes/2026-05-25-om-topbar-requests.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-25-system-interface-profile-registry-and-substrate.md +0 -35
- package/reference/claude-config/sync-notes/2026-05-25-tenant-om-scaffold-cli.md +0 -49
- package/reference/claude-config/sync-notes/2026-05-25-vibe-operate-intent.md +0 -47
- package/reference/claude-config/sync-notes/2026-05-28-om-snapshot-sdk-workflow-config.md +0 -33
- package/reference/claude-config/sync-notes/2026-05-30-client-source-and-om-profiles.md +0 -39
- package/reference/claude-config/sync-notes/2026-06-02-knowledge-nested-group-routing.md +0 -27
- package/reference/claude-config/sync-notes/2026-06-02-nest-projects-under-platform.md +0 -45
- package/reference/claude-config/sync-notes/2026-06-03-skill-autogen-and-client-skill.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-04-scaffold-registry-lane-severity.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-05-appearance-app-mode-decouple.md +0 -29
- package/reference/claude-config/sync-notes/2026-06-05-ontology-endpoint-rename-and-knowledge-browser-ui.md +0 -86
- package/reference/claude-config/sync-notes/2026-06-06-om-build-systems-scaffold.md +0 -47
- package/reference/claude-config/sync-notes/2026-06-06-om-item-copy-references.md +0 -50
- package/reference/claude-config/sync-notes/2026-06-08-knowledge-base-page-not-found-fix.md +0 -76
- package/reference/claude-config/sync-notes/2026-06-09-agent-sessions-public-agent-chat-route.md +0 -75
- package/reference/claude-config/sync-notes/2026-06-09-sdk-cli-load-org-model-resolution.md +0 -42
- package/reference/claude-config/sync-notes/2026-06-12-agent-grants-visualizer-operations.md +0 -30
- package/reference/claude-config/sync-notes/2026-06-14-session-ux-and-project-cli-json.md +0 -33
- package/reference/claude-config/sync-notes/2026-06-14-shared-session-conversation-view.md +0 -26
- package/reference/claude-config/sync-notes/2026-06-15-session-chat-zero-wiring.md +0 -46
- package/reference/claude-config/sync-notes/2026-06-17-agent-session-ux-features.md +0 -34
- package/reference/claude-config/sync-notes/2026-06-25-shared-page-scroll-contract-guard.md +0 -52
- package/reference/claude-config/sync-notes/2026-06-26-leadgen-overview-om-telemetry.md +0 -47
- package/reference/claude-config/sync-notes/2026-07-21-agent-scaffold-hardening.md +0 -75
- package/reference/claude-config/sync-notes/2026-07-23-agent-session-memory.md +0 -49
- package/reference/claude-config/sync-notes/2026-07-23-workos-org-marker.md +0 -50
- package/reference/claude-config/sync-notes/2026-07-24-claude-5-models-and-session-surface-fixes.md +0 -116
- package/reference/claude-config/sync-notes/2026-07-27-agent-strict-output-and-turn-drift.md +0 -73
- package/reference/claude-config/sync-notes/2026-07-28-agent-reply-is-its-own-field.md +0 -84
- package/reference/claude-config/sync-notes/2026-07-30-login-screen-and-member-provisioning-state.md +0 -114
- package/reference/claude-config/sync-notes/2026-08-02-auth-guard-defaults-and-truncation-fix.md +0 -122
- package/reference/claude-config/sync-notes/2026-08-03-agent-prose-escape-normalization.md +0 -88
- package/reference/claude-config/sync-notes/2026-08-03-cli-gateway-errors-and-request-timeout.md +0 -120
- package/reference/claude-config/sync-notes/README.md +0 -43
- package/reference/sdk/framework/interaction-guidance.mdx +0 -182
- package/reference/sdk/framework/memory.mdx +0 -326
- package/reference/sdk/framework/resource-documentation.mdx +0 -90
- package/reference/sdk/roadmap.mdx +0 -164
|
@@ -14,6 +14,8 @@ The Knowledge Browser is a built-in feature surface that renders MDX documents c
|
|
|
14
14
|
|
|
15
15
|
In template-derived projects, `ui/vite.config.ts` imports `elevasisVite` from `@elevasis/ui/vite` and spreads it into the plugins array:
|
|
16
16
|
|
|
17
|
+
<!-- doc-snippet:skip: illustrative excerpt from the ui/ project's own vite.config.ts -- `defineConfig` and `react` are shown unimported, and this doc-snippet check project (external/_template/operations) does not depend on the ui/ project's vite plugins or @elevasis/ui -->
|
|
18
|
+
|
|
17
19
|
```ts
|
|
18
20
|
// ui/vite.config.ts
|
|
19
21
|
import { tanstackRouter } from '@tanstack/router-plugin/vite'
|
|
@@ -105,7 +107,7 @@ The template's `ui/src/routes/__root.tsx` registers `knowledgeManifest` from `@e
|
|
|
105
107
|
```tsx
|
|
106
108
|
// ui/src/routes/__root.tsx
|
|
107
109
|
import { knowledgeManifest } from '@elevasis/ui/features/knowledge'
|
|
108
|
-
import { ElevasisSystemsProvider } from '@elevasis/ui'
|
|
110
|
+
import { ElevasisSystemsProvider } from '@elevasis/ui/provider'
|
|
109
111
|
|
|
110
112
|
<ElevasisSystemsProvider
|
|
111
113
|
organizationModel={canonicalOrganizationModel}
|
|
@@ -117,34 +119,21 @@ import { ElevasisSystemsProvider } from '@elevasis/ui'
|
|
|
117
119
|
|
|
118
120
|
A "Knowledge" sidebar entry appears, routes resolve under `/knowledge`, and the Browser renders with the default tree and node viewer. No additional code required.
|
|
119
121
|
|
|
120
|
-
### Extend (Custom
|
|
122
|
+
### Extend (Custom Sidebar, Default Routes)
|
|
123
|
+
|
|
124
|
+
Spread the manifest and override `sidebar` with a project-owned component. `SystemModule.sidebar` is the supported extension point; everything else in `knowledgeManifest` — routes, the node viewer, the main pane — keeps working unchanged.
|
|
121
125
|
|
|
122
|
-
|
|
126
|
+
The platform's own sidebar internals are **not** part of the published surface. `@elevasis/ui/features/knowledge` exports `knowledgeManifest` and nothing else, so a custom sidebar is project-owned markup. Build it from the knowledge primitives that _are_ published on `@elevasis/ui/knowledge` — `KnowledgeTree`, `KnowledgeNodeList`, `KnowledgeSearchBar`, `KnowledgeBrowser`, and `getSharedOrganizationGraph` — rather than from the default sidebar's parts.
|
|
123
127
|
|
|
124
128
|
```tsx
|
|
125
129
|
// ui/src/features/knowledge/sidebar.tsx
|
|
126
|
-
import {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const customItems = [
|
|
134
|
-
...KNOWLEDGE_ITEMS,
|
|
135
|
-
{
|
|
136
|
-
label: 'Internal Runbooks',
|
|
137
|
-
to: '/knowledge/by-owner/internal',
|
|
138
|
-
icon: IconBook,
|
|
139
|
-
exact: false,
|
|
140
|
-
},
|
|
141
|
-
]
|
|
142
|
-
|
|
143
|
-
const CustomKnowledgeSidebar = () => (
|
|
144
|
-
<KnowledgeSidebar>
|
|
145
|
-
<KnowledgeSidebarMiddle items={customItems} />
|
|
146
|
-
</KnowledgeSidebar>
|
|
147
|
-
)
|
|
130
|
+
import { knowledgeManifest } from '@elevasis/ui/features/knowledge'
|
|
131
|
+
import { useElevasisSystems } from '@elevasis/ui/provider'
|
|
132
|
+
|
|
133
|
+
const CustomKnowledgeSidebar = () => {
|
|
134
|
+
const { organizationModel } = useElevasisSystems()
|
|
135
|
+
return <MyProjectSidebar organizationModel={organizationModel} />
|
|
136
|
+
}
|
|
148
137
|
|
|
149
138
|
export const customKnowledgeManifest = {
|
|
150
139
|
...knowledgeManifest,
|
|
@@ -165,7 +154,7 @@ import { customKnowledgeManifest } from '../features/knowledge/sidebar'
|
|
|
165
154
|
</ElevasisSystemsProvider>
|
|
166
155
|
```
|
|
167
156
|
|
|
168
|
-
`KNOWLEDGE_ITEMS` is
|
|
157
|
+
`KNOWLEDGE_ITEMS` is still exported from `@elevasis/ui/knowledge` as a starting nav-item array, but it is deprecated — it exists for the legacy nav-items sidebar variant. Prefer deriving your nav entries from the organization model.
|
|
169
158
|
|
|
170
159
|
### Replace (Project-Owned UI)
|
|
171
160
|
|
|
@@ -174,10 +163,14 @@ Skip `knowledgeManifest` entirely and build a project-owned route that calls `@e
|
|
|
174
163
|
```tsx
|
|
175
164
|
// ui/src/routes/knowledge/index.tsx
|
|
176
165
|
import { bySystem } from '@elevasis/core/knowledge'
|
|
177
|
-
import {
|
|
166
|
+
import { getSharedOrganizationGraph } from '@elevasis/ui/knowledge'
|
|
167
|
+
import { useElevasisSystems } from '@elevasis/ui/provider'
|
|
178
168
|
|
|
179
169
|
function MyCustomKnowledgeView() {
|
|
180
|
-
const {
|
|
170
|
+
const { organizationModel } = useElevasisSystems()
|
|
171
|
+
if (!organizationModel) return null
|
|
172
|
+
|
|
173
|
+
const graph = getSharedOrganizationGraph(organizationModel)
|
|
181
174
|
const nodes = bySystem(graph, 'sales.crm')
|
|
182
175
|
return <MyOwnLayout nodes={nodes} />
|
|
183
176
|
}
|
|
@@ -189,20 +182,19 @@ The `knowledgePlugin()` Vite plugin is still needed in this path because it gene
|
|
|
189
182
|
|
|
190
183
|
## Exports Reference
|
|
191
184
|
|
|
192
|
-
| Export
|
|
193
|
-
|
|
|
194
|
-
| `elevasisVite`
|
|
195
|
-
| `knowledgeManifest`
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `knowledgePlugin` | `@elevasis/ui/vite-plugin-knowledge` | Vite plugin for build-time MDX codegen + HMR (direct use) |
|
|
185
|
+
| Export | Package | Purpose |
|
|
186
|
+
| ---------------------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------- |
|
|
187
|
+
| `elevasisVite` | `@elevasis/ui/vite` | Umbrella plugin factory; includes `knowledgePlugin` |
|
|
188
|
+
| `knowledgeManifest` | `@elevasis/ui/features/knowledge` | Default `SystemModule` manifest; spread or pass directly |
|
|
189
|
+
| `getSharedOrganizationGraph` | `@elevasis/ui/knowledge` | Memoized graph for the current organization model |
|
|
190
|
+
| `KNOWLEDGE_ITEMS` | `@elevasis/ui/knowledge` | Deprecated legacy nav-items array |
|
|
191
|
+
| `KnowledgeBrowser` | `@elevasis/ui/knowledge` | Composed browser: search bar + detail view |
|
|
192
|
+
| `KnowledgeTree` | `@elevasis/ui/knowledge` | Tree for one mount axis |
|
|
193
|
+
| `KnowledgeNodeList` | `@elevasis/ui/knowledge` | Flat list of node cards |
|
|
194
|
+
| `KnowledgeNodeView` | `@elevasis/ui/knowledge` | Single node: title, kind badge, body, edge sidecar |
|
|
195
|
+
| `KnowledgeSearchBar` | `@elevasis/ui/knowledge` | FlexSearch over title, summary, and body |
|
|
196
|
+
| `KnowledgeMDXProvider` | `@elevasis/ui/knowledge` | React context supplying the component allowlist |
|
|
197
|
+
| `knowledgePlugin` | `@elevasis/ui/vite-plugin-knowledge` | Vite plugin for build-time MDX codegen + HMR (direct use) |
|
|
206
198
|
| `bySystem`, `byOntology`, `byKind`, `byOwner`, `governs`, `governedBy` | `@elevasis/core/knowledge` | Pure query functions for project-owned custom UI |
|
|
207
199
|
|
|
208
200
|
For template-derived projects, import `elevasisVite` from `@elevasis/ui/vite` rather than `knowledgePlugin` directly. The direct `knowledgePlugin` import from `@elevasis/ui/vite-plugin-knowledge` remains available for advanced or non-template wiring.
|
|
@@ -210,77 +202,16 @@ For template-derived projects, import `elevasisVite` from `@elevasis/ui/vite` ra
|
|
|
210
202
|
## Decision Tree
|
|
211
203
|
|
|
212
204
|
- **Just want knowledge nodes to show up?** Author `.mdx` files under `core/config/knowledge/nodes/`. That is it.
|
|
213
|
-
- **Need
|
|
205
|
+
- **Need different sidebar navigation?** Spread the manifest and override `sidebar` with a project-owned component. The default sidebar's own parts are not published.
|
|
214
206
|
- **Need a completely different layout, data sources, or knowledge UX?** Skip the manifest, own the route, call `@elevasis/core/knowledge` directly.
|
|
215
207
|
- **Need to extend the MDX component allowlist for custom body components?** Pass `extraComponents` to `KnowledgeMDXProvider` in your custom renderer.
|
|
216
|
-
- **Need to add a 6th segment to the sidebar strip?** See the SegmentedControl extension section below.
|
|
217
208
|
- **Need a custom main-pane dispatcher?** See the DescribeNodeView section below.
|
|
218
209
|
|
|
219
210
|
## Phase 1.5 Extensions
|
|
220
211
|
|
|
221
|
-
Phase 1.5 adds
|
|
222
|
-
|
|
223
|
-
### Extending the SegmentedControl (add a 6th segment)
|
|
224
|
-
|
|
225
|
-
Phase 1.5 ships `KnowledgeSidebarMiddle` with a five-segment strip above the search bar:
|
|
226
|
-
|
|
227
|
-
```
|
|
228
|
-
[ By System ] [ By Kind ] [ By Owner ] [ Governs ] [ Governed By ]
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
Each segment maps to a mount axis exposed by `@elevasis/core/knowledge`. The strip is a `SegmentedControl` from `@mantine/core`; selected axis is local sidebar state and does NOT affect the URL.
|
|
212
|
+
Phase 1.5 adds a `DescribeNodeView` dispatcher in the main pane. It is composable -- you can extend the default or replace it entirely.
|
|
232
213
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
```tsx
|
|
236
|
-
import {
|
|
237
|
-
KnowledgeSidebar,
|
|
238
|
-
KnowledgeSidebarMiddle,
|
|
239
|
-
KNOWLEDGE_SEGMENTS,
|
|
240
|
-
} from '@elevasis/ui/knowledge'
|
|
241
|
-
import { knowledgeManifest } from '@elevasis/ui/features/knowledge'
|
|
242
|
-
import { byOwner } from '@elevasis/core/knowledge'
|
|
243
|
-
|
|
244
|
-
// KNOWLEDGE_SEGMENTS is the default five-item array; spread and append.
|
|
245
|
-
const customSegments = [
|
|
246
|
-
...KNOWLEDGE_SEGMENTS,
|
|
247
|
-
{
|
|
248
|
-
value: 'by-team',
|
|
249
|
-
label: 'By Team',
|
|
250
|
-
// renderBody receives (graph, knowledgeNodes, selectedNodeId, onSelectNode).
|
|
251
|
-
// Return any ReactNode -- the strip swaps the tree area for your component.
|
|
252
|
-
renderBody: ({ graph, knowledgeNodes, onSelectNode, selectedNodeId }) => {
|
|
253
|
-
const teamNodes = byOwner(graph, 'team:product', knowledgeNodes)
|
|
254
|
-
return (
|
|
255
|
-
<MyTeamList
|
|
256
|
-
nodes={teamNodes}
|
|
257
|
-
onSelect={onSelectNode}
|
|
258
|
-
activeId={selectedNodeId}
|
|
259
|
-
/>
|
|
260
|
-
)
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
]
|
|
264
|
-
|
|
265
|
-
const CustomKnowledgeSidebar = () => (
|
|
266
|
-
<KnowledgeSidebar>
|
|
267
|
-
<KnowledgeSidebarMiddle segments={customSegments} />
|
|
268
|
-
</KnowledgeSidebar>
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
export const customKnowledgeManifest = {
|
|
272
|
-
...knowledgeManifest,
|
|
273
|
-
sidebar: CustomKnowledgeSidebar,
|
|
274
|
-
}
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
Rules and constraints:
|
|
278
|
-
|
|
279
|
-
- `value` must be unique across all segments in the array.
|
|
280
|
-
- `label` is the display string inside the `SegmentedControl`; keep it short (under 10 characters) to fit the 320 px sidebar width.
|
|
281
|
-
- `renderBody` receives the same props as the built-in axis renderers. The tree area is replaced by whatever the function returns while that segment is active.
|
|
282
|
-
- The first segment in the array is the default selection on mount.
|
|
283
|
-
- Segment selection is reset to the first item whenever the user navigates to `/knowledge/command-view*` (the command-view sub-route bypasses the strip entirely and renders `CommandViewSidebarContent` instead).
|
|
214
|
+
The default sidebar renders a mount-axis strip above the search bar, but that strip is internal: it is not configurable through a prop and its parts are not published. Projects that need different sidebar axes own the sidebar, per the Extend tier above.
|
|
284
215
|
|
|
285
216
|
### Replacing `DescribeNodeView` Entirely
|
|
286
217
|
|
|
@@ -303,11 +234,15 @@ function DescribeNodeView({ node, graph, onNavigateToNode }) {
|
|
|
303
234
|
```tsx
|
|
304
235
|
// ui/src/routes/knowledge/$nodeId.tsx
|
|
305
236
|
import { useParams } from '@tanstack/react-router'
|
|
306
|
-
import {
|
|
237
|
+
import { getSharedOrganizationGraph } from '@elevasis/ui/knowledge'
|
|
238
|
+
import { useElevasisSystems } from '@elevasis/ui/provider'
|
|
307
239
|
|
|
308
240
|
export default function KnowledgeNodeRoute() {
|
|
309
241
|
const { nodeId } = useParams({ from: '/knowledge/$nodeId' })
|
|
310
|
-
const {
|
|
242
|
+
const { organizationModel } = useElevasisSystems()
|
|
243
|
+
if (!organizationModel) return null
|
|
244
|
+
|
|
245
|
+
const graph = getSharedOrganizationGraph(organizationModel)
|
|
311
246
|
const node = graph.nodes.find((n) => n.id === nodeId)
|
|
312
247
|
|
|
313
248
|
if (!node) return <MyNotFoundView />
|
|
@@ -363,16 +298,16 @@ function MyDescribeNodeView(props: DescribeNodeViewProps) {
|
|
|
363
298
|
|
|
364
299
|
The following exports are added in Phase 1.5 on top of the exports table above:
|
|
365
300
|
|
|
366
|
-
| Export
|
|
367
|
-
|
|
|
368
|
-
| `DescribeNodeView`
|
|
369
|
-
| `SystemDescribeView`
|
|
370
|
-
| `ResourceDescribeView`
|
|
371
|
-
| `OrganizationDescribeView`
|
|
372
|
-
| `GenericDescribeView`
|
|
373
|
-
| `
|
|
301
|
+
| Export | Package | Purpose |
|
|
302
|
+
| -------------------------- | ------------------------ | ----------------------------------------------------------------- |
|
|
303
|
+
| `DescribeNodeView` | `@elevasis/ui/knowledge` | Default graph-node dispatcher; routes by `node.kind` |
|
|
304
|
+
| `SystemDescribeView` | `@elevasis/ui/knowledge` | Minimal System node view: path, icon, lifecycle, hierarchy, edges |
|
|
305
|
+
| `ResourceDescribeView` | `@elevasis/ui/knowledge` | Minimal resource node view: resourceType, description, edges |
|
|
306
|
+
| `OrganizationDescribeView` | `@elevasis/ui/knowledge` | Minimal organization node view: label, edges |
|
|
307
|
+
| `GenericDescribeView` | `@elevasis/ui/knowledge` | Key/value fallback for unknown kinds |
|
|
308
|
+
| `DomainPanelDispatcher` | `@elevasis/ui/knowledge` | Per-domain panel dispatcher used inside the describe views |
|
|
374
309
|
|
|
375
|
-
|
|
310
|
+
Each view also exports its props type (`DescribeNodeViewProps`, `SystemDescribeViewProps`, and so on) from the same subpath.
|
|
376
311
|
|
|
377
312
|
## See Also
|
|
378
313
|
|
|
@@ -1,102 +1,104 @@
|
|
|
1
1
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
2
2
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
3
3
|
|
|
4
|
-
---
|
|
5
|
-
title: Customize organization-model.ts
|
|
6
|
-
description: Annotated walkthrough for customizing the System-backed Organization Model in template-derived projects.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Customize organization-model.ts
|
|
10
|
-
|
|
11
|
-
`core/config/organization-model.ts` is the semantic contract between the UI shell and platform operations. The shell reads the id-keyed `systems` map for semantic ownership and access, reads `navigation.sidebar` for shell navigation, and binds resources through the id-keyed `resources` map.
|
|
12
|
-
|
|
13
|
-
## Imports
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import {
|
|
17
|
-
createFoundationOrganizationModel,
|
|
18
|
-
defineOrganizationModel,
|
|
19
|
-
type OrganizationModel
|
|
20
|
-
} from '@elevasis/core/organization-model'
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
- `defineOrganizationModel` gives a typed override shape.
|
|
24
|
-
- `createFoundationOrganizationModel` resolves defaults and returns the canonical model plus UI-facing helpers.
|
|
25
|
-
- `OrganizationModel` is the fully resolved model type.
|
|
26
|
-
|
|
27
|
-
## Systems
|
|
28
|
-
|
|
29
|
-
The `systems` map is the source of truth for semantic hierarchy, lifecycle, admin visibility, and governed ownership.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- `
|
|
95
|
-
- `
|
|
96
|
-
- `
|
|
97
|
-
- `
|
|
98
|
-
- `
|
|
99
|
-
- `
|
|
4
|
+
---
|
|
5
|
+
title: Customize organization-model.ts
|
|
6
|
+
description: Annotated walkthrough for customizing the System-backed Organization Model in template-derived projects.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Customize organization-model.ts
|
|
10
|
+
|
|
11
|
+
`core/config/organization-model.ts` is the semantic contract between the UI shell and platform operations. The shell reads the id-keyed `systems` map for semantic ownership and access, reads `navigation.sidebar` for shell navigation, and binds resources through the id-keyed `resources` map.
|
|
12
|
+
|
|
13
|
+
## Imports
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import {
|
|
17
|
+
createFoundationOrganizationModel,
|
|
18
|
+
defineOrganizationModel,
|
|
19
|
+
type OrganizationModel
|
|
20
|
+
} from '@elevasis/core/organization-model'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `defineOrganizationModel` gives a typed override shape.
|
|
24
|
+
- `createFoundationOrganizationModel` resolves defaults and returns the canonical model plus UI-facing helpers.
|
|
25
|
+
- `OrganizationModel` is the fully resolved model type.
|
|
26
|
+
|
|
27
|
+
## Systems
|
|
28
|
+
|
|
29
|
+
The `systems` map is the source of truth for semantic hierarchy, lifecycle, admin visibility, and governed ownership.
|
|
30
|
+
|
|
31
|
+
<!-- doc-snippet:skip: continues from the Imports section above -- `defineOrganizationModel` is shown unimported here -->
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
const override = defineOrganizationModel({
|
|
35
|
+
systems: {
|
|
36
|
+
dashboard: {
|
|
37
|
+
id: 'dashboard',
|
|
38
|
+
order: 10,
|
|
39
|
+
label: 'Dashboard',
|
|
40
|
+
lifecycle: 'active',
|
|
41
|
+
description: 'Command Center home'
|
|
42
|
+
},
|
|
43
|
+
sales: {
|
|
44
|
+
id: 'sales',
|
|
45
|
+
order: 20,
|
|
46
|
+
label: 'Sales',
|
|
47
|
+
lifecycle: 'active'
|
|
48
|
+
},
|
|
49
|
+
'sales.crm': {
|
|
50
|
+
id: 'sales.crm',
|
|
51
|
+
order: 30,
|
|
52
|
+
label: 'CRM',
|
|
53
|
+
parentSystemId: 'sales',
|
|
54
|
+
lifecycle: 'active',
|
|
55
|
+
description: 'CRM pipeline and deal operations'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
navigation: {
|
|
59
|
+
sidebar: {
|
|
60
|
+
primary: {
|
|
61
|
+
dashboard: {
|
|
62
|
+
type: 'surface',
|
|
63
|
+
order: 10,
|
|
64
|
+
label: 'Dashboard',
|
|
65
|
+
path: '/',
|
|
66
|
+
surfaceType: 'dashboard',
|
|
67
|
+
icon: 'feature.dashboard',
|
|
68
|
+
targets: { systems: ['dashboard'] }
|
|
69
|
+
},
|
|
70
|
+
business: {
|
|
71
|
+
type: 'group',
|
|
72
|
+
order: 20,
|
|
73
|
+
label: 'Business',
|
|
74
|
+
children: {
|
|
75
|
+
crm: {
|
|
76
|
+
type: 'surface',
|
|
77
|
+
order: 10,
|
|
78
|
+
label: 'CRM',
|
|
79
|
+
path: '/crm',
|
|
80
|
+
surfaceType: 'page',
|
|
81
|
+
targets: { systems: ['sales.crm'] }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
bottom: {}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
System field reference:
|
|
93
|
+
|
|
94
|
+
- `id` -- lowercase dotted path. Parent Systems are inferred from prefix segments or declared through `parentSystemId`.
|
|
95
|
+
- `order` -- deterministic map iteration order. Use multiples of 10 for easy insertion.
|
|
96
|
+
- `label` -- sidebar and breadcrumb label.
|
|
97
|
+
- `description` -- optional settings/help text.
|
|
98
|
+
- `kind` -- product, operational, platform, or diagnostic.
|
|
99
|
+
- `parentSystemId` -- explicit parent System link.
|
|
100
|
+
- `lifecycle` -- draft, beta, active, deprecated, or archived.
|
|
101
|
+
- `ui` -- optional route metadata used by shell matching during migration.
|
|
100
102
|
- `requiresAdmin` -- hides the node for non-admin members; descendants inherit it.
|
|
101
103
|
- `actions` / `policies` -- references to cross-cutting domains.
|
|
102
104
|
- `ontology` -- System-owned object, link, action, catalog, event, surface, interface, value-type, property, or group records.
|
|
@@ -107,6 +109,8 @@ System field reference:
|
|
|
107
109
|
|
|
108
110
|
Use top-level `ontology` for global/shared primitives and `System.ontology` for owned contracts. The resolved ontology index is compiled from root and System scopes and validated for ID shape, kind mismatch, and duplicate IDs.
|
|
109
111
|
|
|
112
|
+
<!-- doc-snippet:skip: continues from the Imports section above -- `defineOrganizationModel` is shown unimported here -->
|
|
113
|
+
|
|
110
114
|
```ts
|
|
111
115
|
const override = defineOrganizationModel({
|
|
112
116
|
ontology: {
|
|
@@ -154,12 +158,14 @@ const override = defineOrganizationModel({
|
|
|
154
158
|
})
|
|
155
159
|
```
|
|
156
160
|
|
|
157
|
-
Top-level `entities
|
|
161
|
+
Top-level `entities` and top-level `actions` remain accepted for existing consumers and are projected into compiled ontology indexes. `System.content` is **not** — it is retired, and the strict System schema rejects it. Author object, action, and catalog contracts in `System.ontology`.
|
|
158
162
|
|
|
159
163
|
## System Config
|
|
160
164
|
|
|
161
165
|
Use `systems[*].config` for local settings and defaults that are not semantic contracts:
|
|
162
166
|
|
|
167
|
+
<!-- doc-snippet:skip: continues from the Imports section above -- `defineOrganizationModel` is shown unimported here -->
|
|
168
|
+
|
|
163
169
|
```ts
|
|
164
170
|
const override = defineOrganizationModel({
|
|
165
171
|
systems: {
|
|
@@ -190,19 +196,21 @@ const override = defineOrganizationModel({
|
|
|
190
196
|
```
|
|
191
197
|
|
|
192
198
|
Keep semantic nouns, verbs, relationships, events, catalogs, interfaces, and value types in ontology. Keep secrets, credentials, per-run execution state, logs, and external service state outside the Organization Model.
|
|
193
|
-
|
|
194
|
-
## Sidebar Navigation
|
|
195
|
-
|
|
196
|
-
Author shell navigation under `navigation.sidebar`. Groups can contain nested nodes; routeable surface leaves provide `path`, `surfaceType`, and `targets`. Dashboard should appear before Business, Business is a navigation group only, and `/clients` is the canonical clients route.
|
|
197
|
-
|
|
198
|
-
## Resource Binding
|
|
199
|
-
|
|
200
|
-
Resource identity and governance metadata live in `OrganizationModel` under `resources`. Workflows, agents, integrations, and scripts import those descriptors and derive runtime `resourceId` / `type` from them. The graph derives System membership from `ResourceEntry.systemPath`.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
|
|
200
|
+
## Sidebar Navigation
|
|
201
|
+
|
|
202
|
+
Author shell navigation under `navigation.sidebar`. Groups can contain nested nodes; routeable surface leaves provide `path`, `surfaceType`, and `targets`. Dashboard should appear before Business, Business is a navigation group only, and `/clients` is the canonical clients route.
|
|
203
|
+
|
|
204
|
+
## Resource Binding
|
|
205
|
+
|
|
206
|
+
Resource identity and governance metadata live in `OrganizationModel` under `resources`. Workflows, agents, integrations, and scripts import those descriptors and derive runtime `resourceId` / `type` from them. The graph derives System membership from `ResourceEntry.systemPath`.
|
|
207
|
+
|
|
208
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
// core/config/organization-model.ts
|
|
212
|
+
import { defineResources } from '@elevasis/core/organization-model'
|
|
213
|
+
|
|
206
214
|
export const resourceDescriptors = defineResources({
|
|
207
215
|
leadImport: {
|
|
208
216
|
id: 'lead-import',
|
|
@@ -223,26 +231,26 @@ export const resourceDescriptors = defineResources({
|
|
|
223
231
|
}
|
|
224
232
|
}
|
|
225
233
|
})
|
|
226
|
-
|
|
227
|
-
// operations/src/lead-import/index.ts
|
|
228
|
-
config: {
|
|
229
|
-
resource: resourceDescriptors.leadImport,
|
|
230
|
-
resourceId: resourceDescriptors.leadImport.id,
|
|
231
|
-
name: 'Lead Import',
|
|
232
|
-
type: resourceDescriptors.leadImport.kind,
|
|
233
|
-
version: '1.0.0',
|
|
234
|
-
status: 'prod',
|
|
235
|
-
category: 'production'
|
|
236
|
-
}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
Use kind-prefixed graph IDs for cross-collection links:
|
|
240
|
-
|
|
241
|
-
- `system:sales.crm`
|
|
242
|
-
- `integration:instantly`
|
|
243
|
-
- `resource:lead-import`
|
|
244
|
-
- `action:operations.queue.review`
|
|
245
|
-
|
|
234
|
+
|
|
235
|
+
// operations/src/lead-import/index.ts
|
|
236
|
+
config: {
|
|
237
|
+
resource: resourceDescriptors.leadImport,
|
|
238
|
+
resourceId: resourceDescriptors.leadImport.id,
|
|
239
|
+
name: 'Lead Import',
|
|
240
|
+
type: resourceDescriptors.leadImport.kind,
|
|
241
|
+
version: '1.0.0',
|
|
242
|
+
status: 'prod',
|
|
243
|
+
category: 'production'
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Use kind-prefixed graph IDs for cross-collection links:
|
|
248
|
+
|
|
249
|
+
- `system:sales.crm`
|
|
250
|
+
- `integration:instantly`
|
|
251
|
+
- `resource:lead-import`
|
|
252
|
+
- `action:operations.queue.review`
|
|
253
|
+
|
|
246
254
|
`category` is one of `production`, `diagnostic`, `internal`, or `testing`.
|
|
247
255
|
|
|
248
256
|
Descriptor `title` and `description` own executable display metadata. Use nested `resource.ontology` bindings to declare which ontology actions, objects, catalogs, and events the resource performs, reads, writes, uses, or emits. `resource.ontology.primaryAction` names the default/selectable action and must be included in `resource.ontology.actions`. Resource event emissions can still be declared through top-level `emits` for older descriptors, but new descriptors should use `resource.ontology.emits`.
|
|
@@ -255,7 +263,9 @@ The old `sales`, `prospecting`, and `projects` top-level keys are not part of th
|
|
|
255
263
|
- stable verbs -> `System.ontology.actionTypes`
|
|
256
264
|
- pipelines, stages, templates, and status vocabularies -> `System.ontology.catalogTypes`
|
|
257
265
|
- local settings and defaults -> `System.config`
|
|
258
|
-
-
|
|
266
|
+
- legacy `content-node:*` graph IDs from pre-migration projects -> compatibility catalog projections (authoring new `System.content` is rejected)
|
|
267
|
+
|
|
268
|
+
<!-- doc-snippet:skip: illustrative excerpt, not a standalone compilable file -->
|
|
259
269
|
|
|
260
270
|
```ts
|
|
261
271
|
systems: {
|
|
@@ -290,27 +300,29 @@ systems: {
|
|
|
290
300
|
}
|
|
291
301
|
}
|
|
292
302
|
```
|
|
293
|
-
|
|
303
|
+
|
|
294
304
|
Keep `semanticClass` values stable; platform analytics and triggers depend on them.
|
|
295
305
|
|
|
296
306
|
Policy and role integration remains outside ontology in this pass. Use `roles`, `policies`, `responsibleRoleId`, and `ownerRoleId` for accountability and access semantics until a dedicated policy/role ontology design is published.
|
|
297
|
-
|
|
298
|
-
## Export Pattern
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
export const
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
307
|
+
|
|
308
|
+
## Export Pattern
|
|
309
|
+
|
|
310
|
+
<!-- doc-snippet:skip: continues from the Imports section above -- `createFoundationOrganizationModel`, `override`, and `OrganizationModel` are shown unimported here -->
|
|
311
|
+
|
|
312
|
+
```ts
|
|
313
|
+
const foundation = createFoundationOrganizationModel(override)
|
|
314
|
+
|
|
315
|
+
export const canonicalOrganizationModel: OrganizationModel = foundation.canonical
|
|
316
|
+
export const organizationModel = foundation.model
|
|
317
|
+
export const { getOrganizationSurface } = foundation
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Pass `canonicalOrganizationModel` to `ElevasisSystemsProvider` in `ui/src/routes/__root.tsx`.
|
|
321
|
+
|
|
322
|
+
## Resolve Behavior
|
|
323
|
+
|
|
324
|
+
`createFoundationOrganizationModel(override)` resolves defaults, validates System hierarchy, and exposes helper functions used by the shell. Id-keyed domain maps merge additively by key, so tenant overrides can add one System or resource without re-authoring every default entry.
|
|
325
|
+
|
|
314
326
|
Validation catches duplicate System IDs, missing parent Systems, invalid graph IDs, invalid UI paths, invalid ontology IDs, ontology kind mismatches, and duplicate ontology IDs.
|
|
315
327
|
|
|
316
328
|
## Refresh Generated Scaffold Copies
|