@elevasis/sdk 1.44.3 → 1.45.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 +991 -650
- package/dist/index.d.ts +1045 -509
- package/dist/index.js +738 -688
- package/dist/node/index.d.ts +105 -97
- package/dist/test-utils/index.d.ts +42 -28
- package/dist/test-utils/index.js +514 -783
- package/dist/worker/index.d.ts +12112 -0
- package/dist/worker/index.js +121 -182
- package/package.json +6 -9
- package/reference/_navigation.md +151 -21
- package/reference/_reference-manifest.json +186 -4
- package/reference/claude-config.md +8 -0
- package/reference/core/index.mdx +3 -3
- package/reference/examples/organization-model.ts +117 -111
- package/reference/index.mdx +4 -4
- 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 +15 -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 +111 -97
- package/reference/scaffold/core/organization-model.mdx +234 -214
- package/reference/scaffold/operations/propagation-pipeline.md +1 -1
- package/reference/scaffold/operations/scaffold-maintenance.md +19 -18
- package/reference/scaffold/operations/workflow-recipes.md +71 -19
- 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 +25 -10
- 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-crm.md +16 -11
- package/reference/scaffold/recipes/extend-lead-gen.md +25 -7
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +160 -118
- package/reference/scaffold/recipes/index.md +2 -2
- package/reference/scaffold/recipes/query-the-knowledge-graph.md +23 -23
- package/reference/scaffold/reference/contracts.md +12 -1
- package/reference/scaffold/reference/glossary.md +3 -3
- package/reference/scaffold/reference/system-interface-capabilities.md +5 -4
- package/reference/scaffold/ui/composition-extensibility.mdx +271 -232
- package/reference/scaffold/ui/feature-flags-and-gating.md +14 -6
- package/reference/scaffold/ui/feature-shell.mdx +279 -62
- package/reference/scaffold/ui/recipes.md +229 -197
- package/reference/sdk/cli-management.mdx +77 -29
- 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 +49 -119
- 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/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/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
|
@@ -1,63 +1,73 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: System Shell & Provider Runtime
|
|
3
|
-
description: Current system shell contract for Organization Model systems, manifests, route matching, sidebars, and breadcrumbs.
|
|
4
|
-
---
|
|
1
|
+
---
|
|
2
|
+
title: System Shell & Provider Runtime
|
|
3
|
+
description: Current system shell contract for Organization Model systems, manifests, route matching, sidebars, and breadcrumbs.
|
|
4
|
+
---
|
|
5
5
|
<!-- @generated by packages/sdk/scripts/copy-reference-docs.mjs -- DO NOT EDIT -->
|
|
6
6
|
<!-- Regenerate: pnpm scaffold:sync -->
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
## Overview
|
|
10
|
-
|
|
11
|
-
The system shell derives app navigation from `OrganizationModel.systems`. System manifests provide implementation hooks such as icons and sidebars; they do not own structural navigation.
|
|
12
|
-
|
|
13
|
-
## Source Of Truth
|
|
14
|
-
|
|
15
|
-
- `packages/core/src/organization-model/defaults.ts` -- default system list
|
|
16
|
-
- `packages/core/src/organization-model/helpers.ts` -- `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`
|
|
17
|
-
- `packages/ui/src/features/registry/types.ts` -- `SystemModule`
|
|
18
|
-
- `packages/ui/src/provider/ElevasisSystemsProvider.tsx` -- runtime resolver
|
|
19
|
-
- `packages/ui/src/components/navigation/useBreadcrumbs.ts` -- breadcrumb derivation
|
|
20
|
-
|
|
21
|
-
## SystemModule
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The system shell derives app navigation from `OrganizationModel.systems`. System manifests provide implementation hooks such as icons and sidebars; they do not own structural navigation.
|
|
12
|
+
|
|
13
|
+
## Source Of Truth
|
|
14
|
+
|
|
15
|
+
- `packages/core/src/organization-model/defaults.ts` -- default system list
|
|
16
|
+
- `packages/core/src/organization-model/helpers.ts` -- `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`
|
|
17
|
+
- `packages/ui/src/features/registry/types.ts` -- `SystemModule`
|
|
18
|
+
- `packages/ui/src/provider/ElevasisSystemsProvider.tsx` -- runtime resolver
|
|
19
|
+
- `packages/ui/src/components/navigation/useBreadcrumbs.ts` -- breadcrumb derivation
|
|
20
|
+
|
|
21
|
+
## SystemModule
|
|
22
|
+
|
|
23
|
+
{/* doc-snippet:skip: shape excerpt from features/registry/types.ts -- SystemIconComponent and SystemSidebarComponent are shown unimported here for readability */}
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
export interface SystemModule {
|
|
27
|
+
key: string
|
|
28
|
+
systemId?: string
|
|
29
|
+
routePrefixes?: string[]
|
|
30
|
+
capabilityIds?: string[]
|
|
31
|
+
icon?: SystemIconComponent
|
|
32
|
+
sidebar?: SystemSidebarComponent
|
|
33
|
+
sidebarWidth?: number | ((context: { currentPath: string }) => number)
|
|
34
|
+
organizationGraph?: OrganizationGraphSystemBridge
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface OrganizationGraphSystemBridge {
|
|
38
|
+
systemId?: string
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`systemId` must match an Organization Model system ID when present. Navigation-only app modules may omit `systemId` and use `routePrefixes` instead (see "Manifests for Navigation-Only Modules" below). `sidebarWidth` overrides the default 250px shell sidebar width. Structural fields such as route lists, nav labels, and nested links belong on `OrganizationModel.systems`.
|
|
43
|
+
|
|
44
|
+
## Shell Model
|
|
45
|
+
|
|
46
|
+
`useElevasisSystems()` exposes `shellModel`:
|
|
47
|
+
|
|
48
|
+
{/* doc-snippet:skip: shape excerpt shown as a bare field list, not a standalone object literal or interface */}
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
{
|
|
52
|
+
systems,
|
|
53
|
+
findByPath,
|
|
54
|
+
findById,
|
|
55
|
+
childrenOf,
|
|
56
|
+
ancestorsOf,
|
|
57
|
+
parentOf,
|
|
58
|
+
topLevel,
|
|
59
|
+
uiPositionFor,
|
|
60
|
+
requiresAdminFor,
|
|
61
|
+
devOnlyFor
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Sidebar rendering walks `topLevel()` and `childrenOf(id)`. Breadcrumbs resolve `findByPath(location.pathname)` and then map `ancestorsOf(id)`.
|
|
66
|
+
|
|
67
|
+
## Access
|
|
68
|
+
|
|
69
|
+
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.
|
|
70
|
+
|
|
61
71
|
Routes still need guards:
|
|
62
72
|
|
|
63
73
|
```tsx
|
|
@@ -68,8 +78,215 @@ Routes still need guards:
|
|
|
68
78
|
</ProtectedRoute>
|
|
69
79
|
```
|
|
70
80
|
|
|
71
|
-
Use `AccessKeys.platformAdmin` with `AccessGuard` for pages that require platform-admin privileges.
|
|
72
|
-
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
Use `AccessKeys.platformAdmin` with `AccessGuard` for pages that require platform-admin privileges. Use exported `AccessKeys` for permission-backed or diagnostic surfaces such as operations, monitoring, settings, and right-panel views.
|
|
82
|
+
|
|
83
|
+
## Manifests for Navigation-Only Modules
|
|
84
|
+
|
|
85
|
+
Shared feature manifests may omit `systemId` and own `routePrefixes` instead when the module covers a navigation-only area rather than a semantic System. Route authorization still belongs to `AccessGuard`:
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
// navigation-only module -- no systemId required
|
|
89
|
+
export const manifest = {
|
|
90
|
+
key: 'operations',
|
|
91
|
+
routePrefixes: ['/operations'],
|
|
92
|
+
capabilityIds: ['operations:view'],
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Manifest validation does not reject route-only modules. `ElevasisSystemsProvider` resolves surface route prefixes for app-area modules and uses `routePrefixes` for matching when `systemId` is absent. Access checks use System paths or `AccessKeys` constants, not manifest route prefixes.
|
|
97
|
+
|
|
98
|
+
## Navigation Shape Decisions
|
|
99
|
+
|
|
100
|
+
| Decision | Current outcome |
|
|
101
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
102
|
+
| Business | Navigation group only, not a System or URL namespace |
|
|
103
|
+
| Fake Systems | Dashboard, Finance, Operations, Monitoring, Knowledge, Settings, and Admin are demoted from canonical Systems |
|
|
104
|
+
| `platform` | Real canonical System owning cross-cutting diagnostics |
|
|
105
|
+
| `/clients` | Canonical route; legacy `/business/clients` routes redirect |
|
|
106
|
+
| Sidebar authoring | `navigation.sidebar` is the source of truth for shell navigation |
|
|
107
|
+
|
|
108
|
+
## Composition
|
|
109
|
+
|
|
110
|
+
Host apps pass a system manifest list and a canonical organization model into the provider:
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
<ElevasisSystemsProvider systems={SYSTEM_MANIFESTS} organizationModel={canonicalOrganizationModel}>
|
|
114
|
+
<SystemShell>{children}</SystemShell>
|
|
115
|
+
</ElevasisSystemsProvider>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Host apps still own route files, topbar behavior, app branding, and dashboard composition.
|
|
119
|
+
|
|
120
|
+
## Topbar Action Substrate
|
|
121
|
+
|
|
122
|
+
The topbar is governed by the Organization Model through a `navigation.topbar` region that is parallel to `navigation.sidebar`. Each entry is a `TopbarActionNode` -- a leaf with no `path` or `surfaceType` -- and a UI registry binds each node's behavior. This mirrors the sidebar manifest pattern exactly: **OM owns data + visibility; the registry owns behavior.**
|
|
123
|
+
|
|
124
|
+
### OM Schema -- `navigation.topbar`
|
|
125
|
+
|
|
126
|
+
Declared in `packages/core/src/organization-model/domains/navigation.ts`:
|
|
127
|
+
|
|
128
|
+
{/* doc-snippet:skip: shape excerpt from domains/navigation.ts -- z and the field schemas (ModelIdSchema, LabelSchema, etc.) are shown unimported here for readability */}
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
// A topbar action node -- no path, no surfaceType
|
|
132
|
+
const TopbarActionNodeSchema = z.object({
|
|
133
|
+
id: ModelIdSchema, // stable key the registry binds to
|
|
134
|
+
label: LabelSchema, // accessible name / menu fallback
|
|
135
|
+
tooltip: DescriptionSchema.optional(),
|
|
136
|
+
icon: IconNameSchema.optional(), // flat token, resolved via icon registry
|
|
137
|
+
order: z.number().int().optional(),
|
|
138
|
+
enabled: z.boolean().default(true),
|
|
139
|
+
devOnly: z.boolean().optional(),
|
|
140
|
+
requiresAdmin: z.boolean().optional(),
|
|
141
|
+
targets: SidebarSurfaceTargetsSchema.optional()
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
// OrganizationModelNavigationSchema gets a topbar field alongside sidebar
|
|
145
|
+
const OrganizationModelNavigationSchema = z.object({
|
|
146
|
+
sidebar: SidebarNavigationSchema,
|
|
147
|
+
topbar: z.record(z.string(), TopbarActionNodeSchema).default({})
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
The `topbar` field is an **append** -- `surfaceType`, surfaces, and the sidebar are untouched.
|
|
152
|
+
|
|
153
|
+
### UI Registry -- `TopbarActionModule`
|
|
154
|
+
|
|
155
|
+
Defined in `packages/ui/src/features/registry/types.ts`:
|
|
156
|
+
|
|
157
|
+
{/* doc-snippet:skip: shape excerpt from features/registry/types.ts -- TablerIconComponent and ReactNode are shown unimported here for readability */}
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
export interface ResolvedTopbarAction {
|
|
161
|
+
id: string
|
|
162
|
+
label: string
|
|
163
|
+
tooltip?: string
|
|
164
|
+
icon: TablerIconComponent // resolved from the OM token
|
|
165
|
+
order: number
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface TopbarActionModule {
|
|
169
|
+
key: string // matches navigation.topbar[key].id
|
|
170
|
+
render: (ctx: { node: ResolvedTopbarAction }) => ReactNode
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The manifest map lives in `packages/ui/src/features/registry/manifests.ts`:
|
|
175
|
+
|
|
176
|
+
{/* doc-snippet:skip: shape excerpt from features/registry/manifests.ts -- TopbarActionModule and requestTopbarActionManifest are shown unimported here for readability */}
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
export const TOPBAR_ACTION_MANIFESTS: Record<string, TopbarActionModule> = {
|
|
180
|
+
request: requestTopbarActionManifest
|
|
181
|
+
// docs, notifications, orgSwitcher, ... (migrated incrementally)
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Projection and Provider
|
|
186
|
+
|
|
187
|
+
`packages/ui/src/provider/topbarProjection.ts` mirrors `sidebarProjection.ts`:
|
|
188
|
+
|
|
189
|
+
- reads `navigation.topbar` from the resolved OM;
|
|
190
|
+
- drops items where `enabled === false`, `devOnly && !isDev`, or `requiresAdmin && !isPlatformAdmin`;
|
|
191
|
+
- resolves `icon` via `getSemanticIconComponent(node.icon)`;
|
|
192
|
+
- sorts by `order`, then id;
|
|
193
|
+
- joins each surviving OM node to its registered module by `node.id === module.key`; skips nodes with no module and modules with no OM node.
|
|
194
|
+
|
|
195
|
+
`ElevasisSystemsProvider` gains a `topbarActions?: TopbarActionModule[]` prop and exposes `getTopbarActions({ isPlatformAdmin, isDev })`. The provider **defaults `topbarActions` to `Object.values(TOPBAR_ACTION_MANIFESTS)`** when no explicit prop is passed -- so shell-based consumers (`ElevasisAuthenticatedShell`, tenants) get the OM-governed topbar with zero wiring. Pass an explicit array to override or extend.
|
|
196
|
+
|
|
197
|
+
This is an intentional asymmetry vs `systems`, which defaults to `[]` (tenant-assembled). Topbar behaviors are package-universal; sidebar systems are tenant-assembled.
|
|
198
|
+
|
|
199
|
+
### Consumer Component -- `<TopbarActions />`
|
|
200
|
+
|
|
201
|
+
Shipped from `@elevasis/ui/layout`:
|
|
202
|
+
|
|
203
|
+
```tsx
|
|
204
|
+
export function TopbarActions({ isPlatformAdmin, isDev }: { isPlatformAdmin?: boolean; isDev?: boolean }) {
|
|
205
|
+
const { getTopbarActions } = useElevasisSystems()
|
|
206
|
+
return (
|
|
207
|
+
<>
|
|
208
|
+
{getTopbarActions({ isPlatformAdmin, isDev }).map(({ node, render }) => (
|
|
209
|
+
<Fragment key={node.id}>{render({ node })}</Fragment>
|
|
210
|
+
))}
|
|
211
|
+
</>
|
|
212
|
+
)
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
`AppTopbar` drops `<TopbarActions />` in among its children. The theme switch and version `Code` remain hardcoded in `Topbar` -- they are not feature actions.
|
|
217
|
+
|
|
218
|
+
### Governance
|
|
219
|
+
|
|
220
|
+
Because topbar items are OM nodes with the same gating flags as sidebar surfaces, toggling them requires no new mechanism:
|
|
221
|
+
|
|
222
|
+
- Toggle: set `enabled: false` to hide an item per tenant.
|
|
223
|
+
- Reorder: change `order`.
|
|
224
|
+
- Gate: `requiresAdmin` / `devOnly` restrict who sees it.
|
|
225
|
+
- Add: declare a new `navigation.topbar` entry and register a matching module.
|
|
226
|
+
|
|
227
|
+
### Comparison Table
|
|
228
|
+
|
|
229
|
+
| Aspect | Sidebar | Topbar |
|
|
230
|
+
| ---------------- | ---------------------------------------- | ---------------------------------------- |
|
|
231
|
+
| OM region | `navigation.sidebar.primary` / `.bottom` | `navigation.topbar` |
|
|
232
|
+
| Node type | `SidebarSurfaceNode` (has `path`) | `TopbarActionNode` (no `path`) |
|
|
233
|
+
| Registry type | `SystemModule` | `TopbarActionModule` |
|
|
234
|
+
| Registry map | `SYSTEM_MANIFESTS` | `TOPBAR_ACTION_MANIFESTS` |
|
|
235
|
+
| Provider prop | `systems?: SystemModule[]` | `topbarActions?: TopbarActionModule[]` |
|
|
236
|
+
| Provider default | `[]` (tenant-assembled) | `Object.values(TOPBAR_ACTION_MANIFESTS)` |
|
|
237
|
+
| Context accessor | `getSidebarLinks(opts)` | `getTopbarActions(opts)` |
|
|
238
|
+
| Projection file | `sidebarProjection.ts` | `topbarProjection.ts` |
|
|
239
|
+
| UI consumer | `Sidebar` | `<TopbarActions />` |
|
|
240
|
+
|
|
241
|
+
### File Locations
|
|
242
|
+
|
|
243
|
+
| Concern | Path |
|
|
244
|
+
| -------------------- | ----------------------------------------------------------------- |
|
|
245
|
+
| OM navigation schema | `packages/core/src/organization-model/domains/navigation.ts` |
|
|
246
|
+
| Registry types | `packages/ui/src/features/registry/types.ts` |
|
|
247
|
+
| Registry map | `packages/ui/src/features/registry/manifests.ts` |
|
|
248
|
+
| Provider | `packages/ui/src/provider/ElevasisSystemsProvider.tsx` |
|
|
249
|
+
| Projection | `packages/ui/src/provider/topbarProjection.ts` |
|
|
250
|
+
| Consumer component | `packages/ui/src/components/layout/topbar/` (`<TopbarActions />`) |
|
|
251
|
+
| CC root wiring | `apps/command-center/src/routes/__root.tsx` + `AppTopbar.tsx` |
|
|
252
|
+
|
|
253
|
+
## External Shells
|
|
254
|
+
|
|
255
|
+
External templates pass `canonicalOrganizationModel` into `ElevasisSystemsProvider` and derive sidebar links locally from `shellModel`. There is no separate nav config file to keep in sync.
|
|
256
|
+
|
|
257
|
+
### Operations Subshell and Manifest Mounting
|
|
258
|
+
|
|
259
|
+
The Operations area uses a dedicated manifest rather than a raw `SystemModule`. `packages/ui/src/features/operations/manifest.ts` exports `operationsManifest`, which supplies `OperationsSidebarRouter`. That router dispatches to route-specific sidebar components by URL prefix:
|
|
260
|
+
|
|
261
|
+
- `ResourcesSidebar` for `/operations/resources`
|
|
262
|
+
- `ExecutionLogsSidebar` for resource detail pages
|
|
263
|
+
- `CommandQueueSidebarConnected` for `/operations/command-queue`
|
|
264
|
+
- `SystemsSidebar` for `/operations/systems`
|
|
265
|
+
- `SessionsSidebar` for `/operations/sessions`
|
|
266
|
+
|
|
267
|
+
External project root routes must include `operationsManifest` in the manifest array passed to `ElevasisAuthenticatedShell`/`ElevasisSystemsProvider`. Omitting it means no Operations sidebar appears, even though the Operations routes and API/SSE props (`operationsApiUrl`, `operationsSSEManager`) are wired correctly. The canonical reference is `external/_template/ui/src/routes/__root.tsx`.
|
|
268
|
+
|
|
269
|
+
The direct fix is always to mount the published manifest rather than duplicate sidebar routing locally. Whether tenant navigation exposes `/operations/systems` or `/operations/sessions` is a product/OM decision separate from the missing-sidebar substrate bug.
|
|
270
|
+
|
|
271
|
+
`monitoringManifest` and `settingsManifest` follow the same pattern and should be mounted in the same pass when those surfaces are enabled for a project.
|
|
272
|
+
|
|
273
|
+
## Ownership Boundaries
|
|
274
|
+
|
|
275
|
+
`ElevasisSystemsProvider` and `SystemShell` own system manifest registration, system-aware nav contribution, provider-scoped system context (`timeRange`, `operationsApiUrl`, `operationsSSEManager`), route-to-sidebar subshell dispatch, and shared shell/page/sidebar extraction for reusable systems.
|
|
276
|
+
|
|
277
|
+
They do **not** own TanStack file-based route registration, app-specific assistant context hooks, app-specific admin navigation, or project-specific branding and topbar behavior. Consumers keep thin route files and thin app-local wrappers that inject only genuinely app-specific behavior.
|
|
278
|
+
|
|
279
|
+
## Shared-First Extraction
|
|
280
|
+
|
|
281
|
+
When migrating a system surface from app-local to shared:
|
|
282
|
+
|
|
283
|
+
1. Move the reusable shell, sidebar, and page behavior into `packages/ui`.
|
|
284
|
+
2. Leave only thin route glue in consumers.
|
|
285
|
+
3. Keep assistant-context, tenant-guard, and app-specific branding glue local.
|
|
286
|
+
4. Delete dead local wrappers after verification.
|
|
287
|
+
|
|
288
|
+
Do not leave a duplicate app-local shell after the shared version exists unless there is a documented app-specific divergence.
|
|
289
|
+
|
|
290
|
+
## Router Standardization
|
|
291
|
+
|
|
292
|
+
Shared sidebars and shell components prefer `useRouterContext()` by default. Compatibility props such as `currentPath` or `onNavigate` are acceptable only to preserve published API compatibility. Where they remain, treat them as compatibility seams rather than the preferred usage path, default internally to router-context behavior, and do not remove them casually from published surfaces.
|