@elevasis/core 0.24.1 → 0.25.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/index.d.ts +75 -3
- package/dist/index.js +332 -4
- package/dist/knowledge/index.d.ts +30 -1
- package/dist/organization-model/index.d.ts +75 -3
- package/dist/organization-model/index.js +332 -4
- package/dist/test-utils/index.d.ts +1 -0
- package/dist/test-utils/index.js +4 -3
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +94 -94
- package/src/execution/engine/llm/adapters/__tests__/openrouter.integration.test.ts +10 -10
- package/src/knowledge/__tests__/queries.test.ts +960 -546
- package/src/knowledge/format.ts +322 -100
- package/src/knowledge/index.ts +18 -5
- package/src/knowledge/queries.ts +1004 -239
- package/src/organization-model/__tests__/deprecate-helpers.test.ts +71 -0
- package/src/organization-model/__tests__/resolve.test.ts +9 -7
- package/src/organization-model/__tests__/scaffolders.test.ts +93 -0
- package/src/organization-model/defaults.ts +3 -3
- package/src/organization-model/helpers.ts +76 -9
- package/src/organization-model/icons.ts +1 -0
- package/src/organization-model/index.ts +3 -2
- package/src/organization-model/published.ts +15 -2
- package/src/organization-model/scaffolders/helpers.ts +84 -0
- package/src/organization-model/scaffolders/index.ts +19 -0
- package/src/organization-model/scaffolders/scaffoldKnowledgeNode.ts +48 -0
- package/src/organization-model/scaffolders/scaffoldOntologyRecord.ts +38 -0
- package/src/organization-model/scaffolders/scaffoldResource.ts +59 -0
- package/src/organization-model/scaffolders/scaffoldSystem.ts +110 -0
- package/src/organization-model/scaffolders/types.ts +81 -0
- package/src/platform/constants/versions.ts +1 -1
- package/src/reference/_generated/contracts.md +94 -94
- package/src/reference/glossary.md +71 -69
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { OrganizationModel } from '..'
|
|
2
|
+
import {
|
|
3
|
+
addProjectNextStep,
|
|
4
|
+
assertSystemPathAvailable,
|
|
5
|
+
localIdOf,
|
|
6
|
+
nextSystemOrder,
|
|
7
|
+
parentPathOf,
|
|
8
|
+
slugify,
|
|
9
|
+
titleize
|
|
10
|
+
} from './helpers'
|
|
11
|
+
import type { OmScaffoldPlan, SystemScaffoldSpec } from './types'
|
|
12
|
+
|
|
13
|
+
export function scaffoldSystem(model: OrganizationModel, spec: SystemScaffoldSpec): OmScaffoldPlan {
|
|
14
|
+
const systemPath = spec.parent !== undefined && !spec.id.includes('.') ? `${spec.parent}.${spec.id}` : spec.id
|
|
15
|
+
assertSystemPathAvailable(model, systemPath)
|
|
16
|
+
|
|
17
|
+
const parentPath = parentPathOf(systemPath)
|
|
18
|
+
const localId = localIdOf(systemPath)
|
|
19
|
+
const label = spec.label ?? titleize(localId)
|
|
20
|
+
const roleId = spec.role ?? 'role.ops-lead'
|
|
21
|
+
const uiPath = spec.uiPath ?? `/${localId}`
|
|
22
|
+
const featureSlug = slugify(systemPath.replaceAll('.', '-'))
|
|
23
|
+
const knowledgeId = `knowledge.${featureSlug}-system-overview`
|
|
24
|
+
const order = nextSystemOrder(model, parentPath)
|
|
25
|
+
const withProject = spec.withProject ?? !spec.noProject
|
|
26
|
+
|
|
27
|
+
const systemEntry = ` ${JSON.stringify(localId)}: {
|
|
28
|
+
id: ${JSON.stringify(systemPath)},
|
|
29
|
+
order: ${order},
|
|
30
|
+
label: ${JSON.stringify(label)},
|
|
31
|
+
description: ${JSON.stringify(spec.description ?? `${label} bounded context.`)},
|
|
32
|
+
kind: ${JSON.stringify(spec.kind ?? 'operational')},
|
|
33
|
+
${parentPath === undefined ? '' : `parentSystemId: ${JSON.stringify(parentPath)},\n `}responsibleRoleId: ${JSON.stringify(roleId)},
|
|
34
|
+
governedByKnowledge: [${JSON.stringify(knowledgeId)}],
|
|
35
|
+
drivesGoals: [],
|
|
36
|
+
lifecycle: 'draft',
|
|
37
|
+
ui: {
|
|
38
|
+
path: ${JSON.stringify(uiPath)},
|
|
39
|
+
surfaces: [],
|
|
40
|
+
${spec.icon === undefined ? '' : `icon: ${JSON.stringify(spec.icon)},`}
|
|
41
|
+
}${spec.withOntology ? `,
|
|
42
|
+
ontology: {
|
|
43
|
+
objectTypes: {}
|
|
44
|
+
}` : ''}
|
|
45
|
+
}`
|
|
46
|
+
|
|
47
|
+
const plan: OmScaffoldPlan = {
|
|
48
|
+
intent: 'system',
|
|
49
|
+
id: systemPath,
|
|
50
|
+
summary: `Scaffold System "${systemPath}" with nav, role wiring, governing knowledge, and a UI manifest stub.`,
|
|
51
|
+
writes: [
|
|
52
|
+
{
|
|
53
|
+
path: `packages/ui/src/features/${featureSlug}/manifest.stub.ts`,
|
|
54
|
+
mode: 'create',
|
|
55
|
+
description: 'SystemModule manifest stub. Route files are intentionally not generated.',
|
|
56
|
+
content: `import type { SystemModule } from '@repo/ui'\n\nexport const ${featureSlug.replaceAll('-', '_')}Manifest: SystemModule = {\n systemId: ${JSON.stringify(systemPath)},\n label: ${JSON.stringify(label)},\n routes: []\n}\n`
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: `packages/elevasis-core/src/knowledge/nodes/${featureSlug}-system-overview.mdx.stub`,
|
|
60
|
+
mode: 'create',
|
|
61
|
+
description: 'Governing knowledge skeleton for the new System.',
|
|
62
|
+
content: `---\nid: ${knowledgeId}\nkind: reference\ntitle: ${JSON.stringify(`${label} System Overview`)}\nsummary: ${JSON.stringify(`Governing context for the ${label} System.`)}\nlinks:\n - system:${systemPath}\nownerIds:\n - ${roleId}\nupdatedAt: 2026-05-15\n---\n\n## Purpose\n\nDocument the operating boundaries, decisions, and ownership for ${label}.\n`
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
edits: [
|
|
66
|
+
{
|
|
67
|
+
path: 'packages/elevasis-core/src/organization-model/systems.ts',
|
|
68
|
+
description:
|
|
69
|
+
parentPath === undefined
|
|
70
|
+
? 'Add this entry to platformSystems.'
|
|
71
|
+
: `Add this entry under platformSystems ${parentPath}.systems.`,
|
|
72
|
+
snippet: systemEntry
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
path: 'packages/elevasis-core/src/organization-model/navigation.ts',
|
|
76
|
+
description: 'Confirm sidebar placement derives from ui.path or add explicit surface targeting if needed.',
|
|
77
|
+
snippet: `// System "${systemPath}" declares ui.path ${JSON.stringify(uiPath)}. Do not add route files in /om create.`
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
path: 'packages/elevasis-core/src/organization-model/roles.ts',
|
|
81
|
+
description: `Confirm ${roleId} exists or add the owning role before merging.`,
|
|
82
|
+
snippet: `// responsibleRoleId: ${JSON.stringify(roleId)}`
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
path: 'packages/elevasis-core/src/organization-model/assembly.ts',
|
|
86
|
+
description: 'Confirm roleFor()/owner routing covers the new System.',
|
|
87
|
+
snippet: `case ${JSON.stringify(systemPath)}:\n return ${JSON.stringify(roleId)}`
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: 'packages/elevasis-core/src/organization-model/knowledge.ts',
|
|
91
|
+
description: 'Register the generated governing knowledge node after replacing the .stub suffix.',
|
|
92
|
+
snippet: `${JSON.stringify(knowledgeId)}`
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
warnings: spec.withOntology
|
|
96
|
+
? ['Ontology was requested; the default objectTypes block is intentionally empty until the domain language is known.']
|
|
97
|
+
: ['Ontology is opt-in. Re-run with --with-ontology when the object/action/catalog language is known.'],
|
|
98
|
+
nextSteps: [
|
|
99
|
+
'Review the planned OM edits and apply them in the listed source files.',
|
|
100
|
+
'Replace .stub suffixes only after the System entry is merged.',
|
|
101
|
+
`Run pnpm exec elevasis om:verify --scope ${systemPath}.`
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return addProjectNextStep(
|
|
106
|
+
plan,
|
|
107
|
+
withProject,
|
|
108
|
+
`pnpm exec elevasis project:create --link-om ${systemPath} --title "Build ${label} System" --kind system-build`
|
|
109
|
+
)
|
|
110
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
OrganizationModelIconToken,
|
|
3
|
+
OrganizationModelResourceKind,
|
|
4
|
+
OrganizationModelSystemKind
|
|
5
|
+
} from '../types'
|
|
6
|
+
import type { OntologyKind } from '../ontology'
|
|
7
|
+
|
|
8
|
+
export type OmScaffoldIntent = 'system' | 'ontology' | 'resource' | 'knowledge'
|
|
9
|
+
|
|
10
|
+
export interface OmScaffoldWrite {
|
|
11
|
+
path: string
|
|
12
|
+
content: string
|
|
13
|
+
description: string
|
|
14
|
+
mode: 'create'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface OmScaffoldEdit {
|
|
18
|
+
path: string
|
|
19
|
+
description: string
|
|
20
|
+
snippet: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface OmScaffoldPlan {
|
|
24
|
+
intent: OmScaffoldIntent
|
|
25
|
+
id: string
|
|
26
|
+
summary: string
|
|
27
|
+
writes: OmScaffoldWrite[]
|
|
28
|
+
edits: OmScaffoldEdit[]
|
|
29
|
+
warnings: string[]
|
|
30
|
+
nextSteps: string[]
|
|
31
|
+
projectCommand?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface BaseOmScaffoldSpec {
|
|
35
|
+
id: string
|
|
36
|
+
label?: string
|
|
37
|
+
description?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface SystemScaffoldSpec extends BaseOmScaffoldSpec {
|
|
41
|
+
intent: 'system'
|
|
42
|
+
parent?: string
|
|
43
|
+
kind?: OrganizationModelSystemKind
|
|
44
|
+
uiPath?: string
|
|
45
|
+
icon?: OrganizationModelIconToken
|
|
46
|
+
role?: string
|
|
47
|
+
withOntology?: boolean
|
|
48
|
+
noProject?: boolean
|
|
49
|
+
withProject?: boolean
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface OntologyRecordScaffoldSpec extends BaseOmScaffoldSpec {
|
|
53
|
+
intent: 'ontology'
|
|
54
|
+
systemPath: string
|
|
55
|
+
kind: OntologyKind
|
|
56
|
+
localId?: string
|
|
57
|
+
withProject?: boolean
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ResourceScaffoldSpec extends BaseOmScaffoldSpec {
|
|
61
|
+
intent: 'resource'
|
|
62
|
+
systemPath: string
|
|
63
|
+
kind?: OrganizationModelResourceKind
|
|
64
|
+
ownerRoleId?: string
|
|
65
|
+
withStubWorkflow?: boolean
|
|
66
|
+
withProject?: boolean
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface KnowledgeNodeScaffoldSpec extends BaseOmScaffoldSpec {
|
|
70
|
+
intent: 'knowledge'
|
|
71
|
+
systemPath?: string
|
|
72
|
+
kind?: 'playbook' | 'strategy' | 'reference'
|
|
73
|
+
ownerRoleId?: string
|
|
74
|
+
withProject?: boolean
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type OmScaffoldSpec =
|
|
78
|
+
| SystemScaffoldSpec
|
|
79
|
+
| OntologyRecordScaffoldSpec
|
|
80
|
+
| ResourceScaffoldSpec
|
|
81
|
+
| KnowledgeNodeScaffoldSpec
|
|
@@ -634,8 +634,8 @@ export type DeepPartial<T> =
|
|
|
634
634
|
### `ElevasisOrganizationModel`
|
|
635
635
|
|
|
636
636
|
```typescript
|
|
637
|
-
export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
|
|
638
|
-
knowledge?: OrganizationModel['knowledge']
|
|
637
|
+
export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
|
|
638
|
+
knowledge?: OrganizationModel['knowledge']
|
|
639
639
|
}
|
|
640
640
|
```
|
|
641
641
|
|
|
@@ -660,107 +660,107 @@ export type SystemSidebarWidthResolver = number | ((context: { currentPath: stri
|
|
|
660
660
|
### `SystemModule`
|
|
661
661
|
|
|
662
662
|
```typescript
|
|
663
|
-
export interface SystemModule {
|
|
664
|
-
/** Unique stable identifier for this UI system module. */
|
|
665
|
-
key: string
|
|
666
|
-
/** Organization Model system id this module presents. Omit for navigation-only app surfaces. */
|
|
667
|
-
systemId?: string
|
|
668
|
-
/** Route prefixes owned by navigation-only app surfaces. */
|
|
669
|
-
routePrefixes?: string[]
|
|
670
|
-
/** Capability identifiers contributed by this system module. */
|
|
671
|
-
capabilityIds?: string[]
|
|
672
|
-
/** Icon used when this system node appears in shell navigation. */
|
|
673
|
-
icon?: SystemIconComponent
|
|
674
|
-
/** Sidebar component rendered when this system's subtree route is active. */
|
|
675
|
-
sidebar?: SystemSidebarComponent
|
|
676
|
-
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
677
|
-
sidebarWidth?: SystemSidebarWidthResolver
|
|
678
|
-
/** Operations-only bridge connecting this system to the organization graph node. */
|
|
679
|
-
organizationGraph?: OrganizationGraphSystemBridge
|
|
663
|
+
export interface SystemModule {
|
|
664
|
+
/** Unique stable identifier for this UI system module. */
|
|
665
|
+
key: string
|
|
666
|
+
/** Organization Model system id this module presents. Omit for navigation-only app surfaces. */
|
|
667
|
+
systemId?: string
|
|
668
|
+
/** Route prefixes owned by navigation-only app surfaces. */
|
|
669
|
+
routePrefixes?: string[]
|
|
670
|
+
/** Capability identifiers contributed by this system module. */
|
|
671
|
+
capabilityIds?: string[]
|
|
672
|
+
/** Icon used when this system node appears in shell navigation. */
|
|
673
|
+
icon?: SystemIconComponent
|
|
674
|
+
/** Sidebar component rendered when this system's subtree route is active. */
|
|
675
|
+
sidebar?: SystemSidebarComponent
|
|
676
|
+
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
677
|
+
sidebarWidth?: SystemSidebarWidthResolver
|
|
678
|
+
/** Operations-only bridge connecting this system to the organization graph node. */
|
|
679
|
+
organizationGraph?: OrganizationGraphSystemBridge
|
|
680
680
|
}
|
|
681
681
|
```
|
|
682
682
|
|
|
683
683
|
### `ResolvedSystemAccess`
|
|
684
684
|
|
|
685
685
|
```typescript
|
|
686
|
-
export interface ResolvedSystemAccess {
|
|
687
|
-
|
|
688
|
-
systemId?: string
|
|
689
|
-
enabled: boolean
|
|
686
|
+
export interface ResolvedSystemAccess {
|
|
687
|
+
systemKey: string
|
|
688
|
+
systemId?: string
|
|
689
|
+
enabled: boolean
|
|
690
690
|
}
|
|
691
691
|
```
|
|
692
692
|
|
|
693
693
|
### `ResolvedSystemSemantics`
|
|
694
694
|
|
|
695
695
|
```typescript
|
|
696
|
-
export interface ResolvedSystemSemantics {
|
|
697
|
-
capabilityIds: string[]
|
|
696
|
+
export interface ResolvedSystemSemantics {
|
|
697
|
+
capabilityIds: string[]
|
|
698
698
|
}
|
|
699
699
|
```
|
|
700
700
|
|
|
701
701
|
### `ResolvedSystemModule`
|
|
702
702
|
|
|
703
703
|
```typescript
|
|
704
|
-
export interface ResolvedSystemModule extends SystemModule {
|
|
705
|
-
access: ResolvedSystemAccess
|
|
706
|
-
semantics: ResolvedSystemSemantics
|
|
704
|
+
export interface ResolvedSystemModule extends SystemModule {
|
|
705
|
+
access: ResolvedSystemAccess
|
|
706
|
+
semantics: ResolvedSystemSemantics
|
|
707
707
|
}
|
|
708
708
|
```
|
|
709
709
|
|
|
710
710
|
### `ResolvedShellSystem`
|
|
711
711
|
|
|
712
712
|
```typescript
|
|
713
|
-
export type ResolvedShellSystem = OrganizationModelSystemEntry & {
|
|
714
|
-
label: string
|
|
715
|
-
iconComponent?: SystemIconComponent
|
|
713
|
+
export type ResolvedShellSystem = OrganizationModelSystemEntry & {
|
|
714
|
+
label: string
|
|
715
|
+
iconComponent?: SystemIconComponent
|
|
716
716
|
}
|
|
717
717
|
```
|
|
718
718
|
|
|
719
719
|
### `ResolvedShellModel`
|
|
720
720
|
|
|
721
721
|
```typescript
|
|
722
|
-
export interface ResolvedShellModel {
|
|
723
|
-
systems: readonly ResolvedShellSystem[]
|
|
724
|
-
findByPath: (path: string) => ResolvedShellSystem | undefined
|
|
725
|
-
findById: (id: string) => ResolvedShellSystem | undefined
|
|
726
|
-
childrenOf: (id: string) => ResolvedShellSystem[]
|
|
727
|
-
ancestorsOf: (id: string) => ResolvedShellSystem[]
|
|
728
|
-
parentOf: (id: string) => ResolvedShellSystem | undefined
|
|
729
|
-
topLevel: () => ResolvedShellSystem[]
|
|
730
|
-
requiresAdminFor: (id: string) => boolean
|
|
731
|
-
devOnlyFor: (id: string) => boolean
|
|
722
|
+
export interface ResolvedShellModel {
|
|
723
|
+
systems: readonly ResolvedShellSystem[]
|
|
724
|
+
findByPath: (path: string) => ResolvedShellSystem | undefined
|
|
725
|
+
findById: (id: string) => ResolvedShellSystem | undefined
|
|
726
|
+
childrenOf: (id: string) => ResolvedShellSystem[]
|
|
727
|
+
ancestorsOf: (id: string) => ResolvedShellSystem[]
|
|
728
|
+
parentOf: (id: string) => ResolvedShellSystem | undefined
|
|
729
|
+
topLevel: () => ResolvedShellSystem[]
|
|
730
|
+
requiresAdminFor: (id: string) => boolean
|
|
731
|
+
devOnlyFor: (id: string) => boolean
|
|
732
732
|
}
|
|
733
733
|
```
|
|
734
734
|
|
|
735
735
|
### `ShellSidebarLinkItem`
|
|
736
736
|
|
|
737
737
|
```typescript
|
|
738
|
-
export interface ShellSidebarLinkItem {
|
|
739
|
-
label: string
|
|
740
|
-
link: string
|
|
741
|
-
exact?: boolean
|
|
742
|
-
activeMatchPaths?: string[]
|
|
738
|
+
export interface ShellSidebarLinkItem {
|
|
739
|
+
label: string
|
|
740
|
+
link: string
|
|
741
|
+
exact?: boolean
|
|
742
|
+
activeMatchPaths?: string[]
|
|
743
743
|
}
|
|
744
744
|
```
|
|
745
745
|
|
|
746
746
|
### `ShellSidebarLinkGroup`
|
|
747
747
|
|
|
748
748
|
```typescript
|
|
749
|
-
export interface ShellSidebarLinkGroup {
|
|
750
|
-
icon: SystemIconComponent
|
|
751
|
-
label: string
|
|
752
|
-
links?: ShellSidebarLinkItem[]
|
|
753
|
-
link?: string
|
|
749
|
+
export interface ShellSidebarLinkGroup {
|
|
750
|
+
icon: SystemIconComponent
|
|
751
|
+
label: string
|
|
752
|
+
links?: ShellSidebarLinkItem[]
|
|
753
|
+
link?: string
|
|
754
754
|
}
|
|
755
755
|
```
|
|
756
756
|
|
|
757
757
|
### `ShellSidebarProjectionOptions`
|
|
758
758
|
|
|
759
759
|
```typescript
|
|
760
|
-
export interface ShellSidebarProjectionOptions {
|
|
761
|
-
isPlatformAdmin?: boolean
|
|
762
|
-
isDev?: boolean
|
|
763
|
-
section?: 'primary' | 'bottom'
|
|
760
|
+
export interface ShellSidebarProjectionOptions {
|
|
761
|
+
isPlatformAdmin?: boolean
|
|
762
|
+
isDev?: boolean
|
|
763
|
+
section?: 'primary' | 'bottom'
|
|
764
764
|
}
|
|
765
765
|
```
|
|
766
766
|
|
|
@@ -773,75 +773,75 @@ export type ShellRouteMatchStatus = 'matched' | 'hidden' | 'unmatched'
|
|
|
773
773
|
### `ResolvedShellRouteMatch`
|
|
774
774
|
|
|
775
775
|
```typescript
|
|
776
|
-
export interface ResolvedShellRouteMatch {
|
|
777
|
-
status: ShellRouteMatchStatus
|
|
778
|
-
path: string
|
|
779
|
-
system?: ResolvedSystemModule
|
|
780
|
-
node?: ResolvedShellSystem
|
|
776
|
+
export interface ResolvedShellRouteMatch {
|
|
777
|
+
status: ShellRouteMatchStatus
|
|
778
|
+
path: string
|
|
779
|
+
system?: ResolvedSystemModule
|
|
780
|
+
node?: ResolvedShellSystem
|
|
781
781
|
}
|
|
782
782
|
```
|
|
783
783
|
|
|
784
784
|
### `ShellRuntime`
|
|
785
785
|
|
|
786
786
|
```typescript
|
|
787
|
-
export interface ShellRuntime {
|
|
788
|
-
resolveRoute: (path: string) => ResolvedShellRouteMatch
|
|
787
|
+
export interface ShellRuntime {
|
|
788
|
+
resolveRoute: (path: string) => ResolvedShellRouteMatch
|
|
789
789
|
}
|
|
790
790
|
```
|
|
791
791
|
|
|
792
792
|
### `OrganizationGraphSystemBridge`
|
|
793
793
|
|
|
794
794
|
```typescript
|
|
795
|
-
export interface OrganizationGraphSystemBridge {
|
|
796
|
-
systemId?: string
|
|
795
|
+
export interface OrganizationGraphSystemBridge {
|
|
796
|
+
systemId?: string
|
|
797
797
|
}
|
|
798
798
|
```
|
|
799
799
|
|
|
800
800
|
### `OrganizationGraphContextValue`
|
|
801
801
|
|
|
802
802
|
```typescript
|
|
803
|
-
export interface OrganizationGraphContextValue {
|
|
804
|
-
available: boolean
|
|
805
|
-
systemId?: string
|
|
806
|
-
systemPath?: string
|
|
803
|
+
export interface OrganizationGraphContextValue {
|
|
804
|
+
available: boolean
|
|
805
|
+
systemId?: string
|
|
806
|
+
systemPath?: string
|
|
807
807
|
}
|
|
808
808
|
```
|
|
809
809
|
|
|
810
810
|
### `ElevasisSystemsProviderProps`
|
|
811
811
|
|
|
812
812
|
```typescript
|
|
813
|
-
export interface ElevasisSystemsProviderProps {
|
|
814
|
-
systems?: SystemModule[]
|
|
815
|
-
organizationModel?: ElevasisOrganizationModel
|
|
816
|
-
timeRange?: TimeRange
|
|
817
|
-
operationsApiUrl?: string
|
|
818
|
-
operationsSSEManager?: SSEConnectionManagerLike
|
|
819
|
-
deliveryApiUrl?: string
|
|
820
|
-
deliverySSEManager?: SSEConnectionManagerLike
|
|
821
|
-
disabledSubsectionPaths?: string[]
|
|
822
|
-
children: ReactNode
|
|
813
|
+
export interface ElevasisSystemsProviderProps {
|
|
814
|
+
systems?: SystemModule[]
|
|
815
|
+
organizationModel?: ElevasisOrganizationModel
|
|
816
|
+
timeRange?: TimeRange
|
|
817
|
+
operationsApiUrl?: string
|
|
818
|
+
operationsSSEManager?: SSEConnectionManagerLike
|
|
819
|
+
deliveryApiUrl?: string
|
|
820
|
+
deliverySSEManager?: SSEConnectionManagerLike
|
|
821
|
+
disabledSubsectionPaths?: string[]
|
|
822
|
+
children: ReactNode
|
|
823
823
|
}
|
|
824
824
|
```
|
|
825
825
|
|
|
826
826
|
### `ElevasisSystemsContextValue`
|
|
827
827
|
|
|
828
828
|
```typescript
|
|
829
|
-
export interface ElevasisSystemsContextValue {
|
|
830
|
-
shellModel: ResolvedShellModel
|
|
831
|
-
shellRuntime: ShellRuntime
|
|
832
|
-
getSidebarLinks: (options?: ShellSidebarProjectionOptions) => ShellSidebarLinkGroup[]
|
|
833
|
-
enabledResolvedSystems: ResolvedSystemModule[]
|
|
834
|
-
resolvedSystems: ResolvedSystemModule[]
|
|
835
|
-
organizationGraph: OrganizationGraphContextValue
|
|
836
|
-
organizationModel?: OrganizationModel
|
|
837
|
-
timeRange?: TimeRange
|
|
838
|
-
operationsApiUrl?: string
|
|
839
|
-
operationsSSEManager?: SSEConnectionManagerLike
|
|
840
|
-
deliveryApiUrl?: string
|
|
841
|
-
deliverySSEManager?: SSEConnectionManagerLike
|
|
842
|
-
disabledSubsectionPaths: string[]
|
|
843
|
-
isSystemEnabled: (key: string) => boolean
|
|
844
|
-
getResolvedSystem: (key: string) => ResolvedSystemModule | undefined
|
|
829
|
+
export interface ElevasisSystemsContextValue {
|
|
830
|
+
shellModel: ResolvedShellModel
|
|
831
|
+
shellRuntime: ShellRuntime
|
|
832
|
+
getSidebarLinks: (options?: ShellSidebarProjectionOptions) => ShellSidebarLinkGroup[]
|
|
833
|
+
enabledResolvedSystems: ResolvedSystemModule[]
|
|
834
|
+
resolvedSystems: ResolvedSystemModule[]
|
|
835
|
+
organizationGraph: OrganizationGraphContextValue
|
|
836
|
+
organizationModel?: OrganizationModel
|
|
837
|
+
timeRange?: TimeRange
|
|
838
|
+
operationsApiUrl?: string
|
|
839
|
+
operationsSSEManager?: SSEConnectionManagerLike
|
|
840
|
+
deliveryApiUrl?: string
|
|
841
|
+
deliverySSEManager?: SSEConnectionManagerLike
|
|
842
|
+
disabledSubsectionPaths: string[]
|
|
843
|
+
isSystemEnabled: (key: string) => boolean
|
|
844
|
+
getResolvedSystem: (key: string) => ResolvedSystemModule | undefined
|
|
845
845
|
}
|
|
846
846
|
```
|
|
847
847
|
|
|
@@ -1,76 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Glossary
|
|
3
|
-
description: Terminology disambiguation for Organization OS concepts used in the template scaffold, core package, and published packages.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Glossary
|
|
7
|
-
|
|
8
|
-
## Terms
|
|
9
|
-
|
|
10
|
-
**AdminGuard** -- route-level admin wrapper from `@elevasis/ui/features/auth`. Must nest inside `ProtectedRoute`.
|
|
11
|
-
|
|
12
|
-
**Contract** -- the publishable boundary a consumer depends on: Zod schemas, TypeScript types, provider props, resource definitions, or workflow I/O schemas.
|
|
13
|
-
|
|
14
|
-
**DeploymentSpec** -- runtime/deploy assembly for one organization: workflows, agents, triggers, integrations, relationships, external resources, and human checkpoints. It assembles executable behavior around Organization Model resource descriptors; it is not the source of resource identity.
|
|
15
|
-
|
|
16
|
-
**Feature** -- legacy or UI-package wording for a platform capability area. In the current Organization Model, use **System** for semantic ownership and **navigation surface** for shell placement. Keep "feature" only when referring to existing UI package folders, exported manifest names, or legacy compatibility recipes.
|
|
17
|
-
|
|
18
|
-
**SystemGuard** -- route-level System gate from `@elevasis/ui/features/auth`.
|
|
19
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Glossary
|
|
3
|
+
description: Terminology disambiguation for Organization OS concepts used in the template scaffold, core package, and published packages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Glossary
|
|
7
|
+
|
|
8
|
+
## Terms
|
|
9
|
+
|
|
10
|
+
**AdminGuard** -- route-level admin wrapper from `@elevasis/ui/features/auth`. Must nest inside `ProtectedRoute`.
|
|
11
|
+
|
|
12
|
+
**Contract** -- the publishable boundary a consumer depends on: Zod schemas, TypeScript types, provider props, resource definitions, or workflow I/O schemas.
|
|
13
|
+
|
|
14
|
+
**DeploymentSpec** -- runtime/deploy assembly for one organization: workflows, agents, triggers, integrations, relationships, external resources, and human checkpoints. It assembles executable behavior around Organization Model resource descriptors; it is not the source of resource identity.
|
|
15
|
+
|
|
16
|
+
**Feature** -- legacy or UI-package wording for a platform capability area. In the current Organization Model, use **System** for semantic ownership and **navigation surface** for shell placement. Keep "feature" only when referring to existing UI package folders, exported manifest names, or legacy compatibility recipes.
|
|
17
|
+
|
|
18
|
+
**SystemGuard** -- route-level System gate from `@elevasis/ui/features/auth`.
|
|
19
|
+
|
|
20
20
|
**SystemModule** -- manifest contract a shell module provides to `ElevasisSystemsProvider`. Key fields are `key`, optional `systemId`, optional `routePrefixes`, optional `capabilityIds`, optional `icon`, optional `sidebar`, and optional `sidebarWidth`. Graph bridge metadata is compatibility-only; new semantic bindings belong in the Organization Model System, ontology, navigation, and Resource descriptors.
|
|
21
|
-
|
|
22
|
-
**systemId** -- the `SystemModule` field that points to an `OrganizationModel.systems` entry. Navigation-only app modules may omit it and use route prefixes/surface metadata instead.
|
|
23
|
-
|
|
24
|
-
**
|
|
25
|
-
|
|
26
|
-
**
|
|
27
|
-
|
|
28
|
-
**
|
|
29
|
-
|
|
21
|
+
|
|
22
|
+
**systemId** -- the `SystemModule` field that points to an `OrganizationModel.systems` entry. Navigation-only app modules may omit it and use route prefixes/surface metadata instead.
|
|
23
|
+
|
|
24
|
+
**systemId (resource — deprecated)** -- the legacy `resource.systemId` field on Organization Model resource descriptors. Removed from the target contract; the canonical attachment is **`resource.systemPath`** (dot-separated path resolved against the system tree). Some external templates still ship a `systemId` compatibility mirror while published `@elevasis/core` releases catch up; treat that field as legacy adapter data only and author new resource relationships against `systemPath`. Query with `getResourcesForSystem(model, path)`.
|
|
25
|
+
|
|
26
|
+
**Foundations** -- local adapter layer in external projects that exports `canonicalOrganizationModel`, `organizationModel`, and workflow I/O schemas.
|
|
27
|
+
|
|
28
|
+
**Graph node ID** -- kind-prefixed cross-collection identifier such as `system:sales.crm`, `integration:instantly`, or `resource:lead-import`.
|
|
29
|
+
|
|
30
|
+
**Manifest** -- a runtime declaration for a feature or resource collection.
|
|
31
|
+
|
|
30
32
|
**MembershipFeatureConfig** -- legacy per-member feature override config. Current System visibility should be authored through Organization Model System lifecycle/access metadata and resolved through provider compatibility layers for older consumers.
|
|
31
|
-
|
|
33
|
+
|
|
32
34
|
**OrganizationModel** -- top-level semantic contract for an organization. Current primary fields include `version`, `domainMetadata`, `branding`, `navigation`, `ontology`, `systems`, `resources`, `topology`, `identity`, `customers`, `offerings`, `roles`, `goals`, `policies`, `statuses`, and `knowledge`. Legacy domain keys such as `sales`, `prospecting`, `projects`, `actions`, and `entities` remain compatibility inputs while projects migrate to System-owned ontology/config/resource contracts.
|
|
33
|
-
|
|
35
|
+
|
|
34
36
|
**OrganizationModelSystemEntry** -- System node in `OrganizationModel.systems`. Primary authoring fields include `id`, `label`, `description`, `parentSystemId`, `systems`, `lifecycle`, `ui`, `requiresAdmin`, `devOnly`, `responsibleRoleId`, `governedByKnowledge`, `drivesGoals`, `actions`, `policies`, `ontology`, `config`, and `order`. `subsystems` and `content` are retained compatibility inputs for older projects and should not be used for new recursive Systems, schemas, catalogs, or config.
|
|
35
|
-
|
|
36
|
-
**Provider / ElevasisSystemsProvider** -- runtime that registers System modules, resolves System access against the org model, projects sidebar navigation, and exposes shell helpers through `useElevasisSystems()`.
|
|
37
|
-
|
|
38
|
-
**Resource** -- governance-only descriptor in `OrganizationModel.resources` for a workflow, agent, integration, or script. Runtime code derives `resourceId` and kind from the descriptor, then attaches executable behavior in operations.
|
|
39
|
-
|
|
37
|
+
|
|
38
|
+
**Provider / ElevasisSystemsProvider** -- runtime that registers System modules, resolves System access against the org model, projects sidebar navigation, and exposes shell helpers through `useElevasisSystems()`.
|
|
39
|
+
|
|
40
|
+
**Resource** -- governance-only descriptor in `OrganizationModel.resources` for a workflow, agent, integration, or script. Runtime code derives `resourceId` and kind from the descriptor, then attaches executable behavior in operations.
|
|
41
|
+
|
|
40
42
|
**Resource descriptor** -- OM entry with canonical `id`, required `systemPath`, descriptor `title` / `description`, governance `status`, optional role ownership, `codeRefs`, and nested `ontology` bindings for `actions`, optional `primaryAction`, read/write objects, used catalogs, and emitted events. Top-level `emits` remains a compatibility mirror for older descriptors.
|
|
41
|
-
|
|
43
|
+
|
|
42
44
|
**System** -- tenant-defined bounded context in `OrganizationModel.systems` that groups operational resources and carries governance metadata such as responsible role, governing knowledge, driven goals, kind, lifecycle, System-local ontology, and System-local config.
|
|
43
|
-
|
|
44
|
-
**ResourceCategory** -- resource metadata category: `production`, `diagnostic`, `internal`, or `testing`.
|
|
45
|
-
|
|
46
|
-
**ResourceLink** -- graph binding on resource metadata: `{ nodeId, kind }`.
|
|
47
|
-
|
|
48
|
-
**Settings asymmetry** -- Settings is a navigation/app surface whose individual pages are normally governed by admin checks rather than user-facing System toggles.
|
|
49
|
-
|
|
50
|
-
**Shell model** -- provider output used by sidebars and breadcrumbs. Includes `systems`, `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`, `requiresAdminFor`, and `devOnlyFor`.
|
|
51
|
-
|
|
52
|
-
**Subshell / Sidebar** -- System- or route-prefix-scoped UI region rendered when the current route matches a module whose manifest supplies a sidebar.
|
|
53
|
-
|
|
45
|
+
|
|
46
|
+
**ResourceCategory** -- resource metadata category: `production`, `diagnostic`, `internal`, or `testing`.
|
|
47
|
+
|
|
48
|
+
**ResourceLink** -- graph binding on resource metadata: `{ nodeId, kind }`.
|
|
49
|
+
|
|
50
|
+
**Settings asymmetry** -- Settings is a navigation/app surface whose individual pages are normally governed by admin checks rather than user-facing System toggles.
|
|
51
|
+
|
|
52
|
+
**Shell model** -- provider output used by sidebars and breadcrumbs. Includes `systems`, `childrenOf`, `ancestorsOf`, `parentOf`, `topLevel`, `findByPath`, `requiresAdminFor`, and `devOnlyFor`.
|
|
53
|
+
|
|
54
|
+
**Subshell / Sidebar** -- System- or route-prefix-scoped UI region rendered when the current route matches a module whose manifest supplies a sidebar.
|
|
55
|
+
|
|
54
56
|
**Topology** -- durable OM operational wiring declared in `OrganizationModel.topology.relationships`. Initial relationship kinds are `triggers`, `uses`, and `approval`; relationships use typed refs such as `{ kind: 'resource', id: 'lead-import' }`.
|
|
55
|
-
|
|
56
|
-
## Package Boundary
|
|
57
|
-
|
|
58
|
-
**`@elevasis/core`**
|
|
59
|
-
|
|
60
|
-
- `OrganizationModel`, `OrganizationModelSystemEntry`
|
|
61
|
-
- `SystemEntry`, `ResourceEntry`
|
|
62
|
-
- `resolveOrganizationModel`, `defineOrganizationModel`, `DEFAULT_ORGANIZATION_MODEL`
|
|
63
|
-
- `MembershipFeatureConfig`
|
|
64
|
-
- `DeploymentSpec`, `ResourceLink`, `ResourceCategory`
|
|
65
|
-
|
|
66
|
-
**`@elevasis/ui`**
|
|
67
|
-
|
|
68
|
-
- `SystemModule`
|
|
69
|
-
- `SystemGuard`, `AdminGuard`, `ProtectedRoute`
|
|
70
|
-
- `ElevasisSystemsProvider`, `ElevasisCoreProvider`, `useElevasisSystems`
|
|
71
|
-
|
|
72
|
-
**External project source**
|
|
73
|
-
|
|
74
|
-
- `canonicalOrganizationModel`
|
|
75
|
-
- `organizationModel`
|
|
76
|
-
- workflow I/O schemas
|
|
57
|
+
|
|
58
|
+
## Package Boundary
|
|
59
|
+
|
|
60
|
+
**`@elevasis/core`**
|
|
61
|
+
|
|
62
|
+
- `OrganizationModel`, `OrganizationModelSystemEntry`
|
|
63
|
+
- `SystemEntry`, `ResourceEntry`
|
|
64
|
+
- `resolveOrganizationModel`, `defineOrganizationModel`, `DEFAULT_ORGANIZATION_MODEL`
|
|
65
|
+
- `MembershipFeatureConfig`
|
|
66
|
+
- `DeploymentSpec`, `ResourceLink`, `ResourceCategory`
|
|
67
|
+
|
|
68
|
+
**`@elevasis/ui`**
|
|
69
|
+
|
|
70
|
+
- `SystemModule`
|
|
71
|
+
- `SystemGuard`, `AdminGuard`, `ProtectedRoute`
|
|
72
|
+
- `ElevasisSystemsProvider`, `ElevasisCoreProvider`, `useElevasisSystems`
|
|
73
|
+
|
|
74
|
+
**External project source**
|
|
75
|
+
|
|
76
|
+
- `canonicalOrganizationModel`
|
|
77
|
+
- `organizationModel`
|
|
78
|
+
- workflow I/O schemas
|