@elevasis/core 0.24.0 → 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 +3117 -2166
- package/dist/index.js +574 -16
- package/dist/knowledge/index.d.ts +122 -7
- package/dist/organization-model/index.d.ts +3117 -2166
- package/dist/organization-model/index.js +574 -16
- package/dist/test-utils/index.d.ts +135 -45
- package/dist/test-utils/index.js +122 -14
- package/package.json +3 -3
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +139 -101
- package/src/execution/engine/llm/adapters/__tests__/openrouter.integration.test.ts +10 -10
- package/src/execution/engine/workflow/types.ts +5 -7
- 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__/domains/resources.test.ts +19 -8
- package/src/organization-model/__tests__/domains/topology.test.ts +188 -0
- package/src/organization-model/__tests__/graph.test.ts +98 -7
- package/src/organization-model/__tests__/resolve.test.ts +9 -7
- package/src/organization-model/__tests__/scaffolders.test.ts +93 -0
- package/src/organization-model/__tests__/schema.test.ts +14 -4
- package/src/organization-model/defaults.ts +5 -3
- package/src/organization-model/domains/resources.ts +63 -20
- package/src/organization-model/domains/topology.ts +261 -0
- package/src/organization-model/graph/build.ts +63 -15
- package/src/organization-model/graph/schema.ts +4 -3
- package/src/organization-model/graph/types.ts +5 -4
- package/src/organization-model/helpers.ts +76 -9
- package/src/organization-model/icons.ts +1 -0
- package/src/organization-model/index.ts +7 -5
- package/src/organization-model/ontology.ts +2 -5
- package/src/organization-model/organization-model.mdx +16 -11
- package/src/organization-model/published.ts +51 -15
- 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/organization-model/schema.ts +51 -11
- package/src/organization-model/types.ts +25 -11
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/registry/__tests__/validation.test.ts +199 -14
- package/src/platform/registry/resource-registry.ts +11 -11
- package/src/platform/registry/validation.ts +226 -34
- package/src/reference/_generated/contracts.md +139 -101
- package/src/reference/glossary.md +74 -72
- package/src/supabase/database.types.ts +3156 -3153
|
@@ -10,9 +10,11 @@ import type { ModelConfig } from '../../execution/engine/llm/model-info'
|
|
|
10
10
|
import { validateModelConfig, ModelConfigError } from '../../execution/engine/llm/errors'
|
|
11
11
|
import type { DeploymentSpec } from './resource-registry'
|
|
12
12
|
import type { ResourceEntry } from '../../organization-model/domains/resources'
|
|
13
|
-
import type { SystemEntry } from '../../organization-model/domains/systems'
|
|
14
|
-
import type { OrganizationModel } from '../../organization-model/types'
|
|
15
|
-
import { listAllSystems } from '../../organization-model/helpers'
|
|
13
|
+
import type { SystemEntry } from '../../organization-model/domains/systems'
|
|
14
|
+
import type { OrganizationModel } from '../../organization-model/types'
|
|
15
|
+
import { listAllSystems } from '../../organization-model/helpers'
|
|
16
|
+
import { compileOrganizationOntology, type OntologyKind, type ResolvedOntologyIndex } from '../../organization-model/ontology'
|
|
17
|
+
import type { OmTopologyNodeRef } from '../../organization-model/domains/topology'
|
|
16
18
|
import type {
|
|
17
19
|
TriggerDefinition,
|
|
18
20
|
ResourceRelationships,
|
|
@@ -44,13 +46,24 @@ export type ResourceGovernanceValidationIssueType =
|
|
|
44
46
|
| 'missing-om-resource'
|
|
45
47
|
| 'type-mismatch'
|
|
46
48
|
| 'system-mismatch'
|
|
47
|
-
| 'missing-om-system'
|
|
48
|
-
| 'raw-resource-id'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
| 'missing-om-system'
|
|
50
|
+
| 'raw-resource-id'
|
|
51
|
+
| 'descriptor-mismatch'
|
|
52
|
+
| 'missing-ontology-actions'
|
|
53
|
+
| 'ontology-reference-missing'
|
|
54
|
+
| 'primary-action-mismatch'
|
|
55
|
+
| 'topology-reference-missing'
|
|
56
|
+
|
|
57
|
+
export interface ResourceGovernanceModel {
|
|
58
|
+
systems?: Record<string, SystemEntry>
|
|
59
|
+
resources?: Record<string, ResourceEntry>
|
|
60
|
+
ontology?: OrganizationModel['ontology']
|
|
61
|
+
topology?: OrganizationModel['topology']
|
|
62
|
+
roles?: OrganizationModel['roles']
|
|
63
|
+
policies?: OrganizationModel['policies']
|
|
64
|
+
entities?: OrganizationModel['entities']
|
|
65
|
+
actions?: OrganizationModel['actions']
|
|
66
|
+
}
|
|
54
67
|
|
|
55
68
|
export interface ResourceGovernanceValidationIssue {
|
|
56
69
|
type: ResourceGovernanceValidationIssueType
|
|
@@ -109,7 +122,7 @@ function emitGovernanceIssues(
|
|
|
109
122
|
}
|
|
110
123
|
}
|
|
111
124
|
|
|
112
|
-
function getRuntimeResources(resources: DeploymentSpec): Array<{
|
|
125
|
+
function getRuntimeResources(resources: DeploymentSpec): Array<{
|
|
113
126
|
resourceId: string
|
|
114
127
|
type: ResourceType
|
|
115
128
|
descriptor?: ResourceEntry
|
|
@@ -130,8 +143,159 @@ function getRuntimeResources(resources: DeploymentSpec): Array<{
|
|
|
130
143
|
type: integration.type,
|
|
131
144
|
descriptor: (integration as { resource?: ResourceEntry }).resource
|
|
132
145
|
}))
|
|
133
|
-
]
|
|
134
|
-
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function hasOntologySources(organizationModel: ResourceGovernanceModel): boolean {
|
|
150
|
+
return (
|
|
151
|
+
organizationModel.ontology !== undefined ||
|
|
152
|
+
organizationModel.entities !== undefined ||
|
|
153
|
+
organizationModel.actions !== undefined ||
|
|
154
|
+
Object.values(organizationModel.systems ?? {}).some(systemHasOntologySource)
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function systemHasOntologySource(system: SystemEntry): boolean {
|
|
159
|
+
if (system.ontology !== undefined || (system.content !== undefined && Object.keys(system.content).length > 0)) return true
|
|
160
|
+
return Object.values(system.systems ?? system.subsystems ?? {}).some(systemHasOntologySource)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function ontologyIndexForKind(index: ResolvedOntologyIndex, kind: OntologyKind): Record<string, unknown> {
|
|
164
|
+
switch (kind) {
|
|
165
|
+
case 'object':
|
|
166
|
+
return index.objectTypes
|
|
167
|
+
case 'link':
|
|
168
|
+
return index.linkTypes
|
|
169
|
+
case 'action':
|
|
170
|
+
return index.actionTypes
|
|
171
|
+
case 'catalog':
|
|
172
|
+
return index.catalogTypes
|
|
173
|
+
case 'event':
|
|
174
|
+
return index.eventTypes
|
|
175
|
+
case 'interface':
|
|
176
|
+
return index.interfaceTypes
|
|
177
|
+
case 'value-type':
|
|
178
|
+
return index.valueTypes
|
|
179
|
+
case 'property':
|
|
180
|
+
return index.sharedProperties
|
|
181
|
+
case 'group':
|
|
182
|
+
return index.groups
|
|
183
|
+
case 'surface':
|
|
184
|
+
return index.surfaces
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function sameJson(left: unknown, right: unknown): boolean {
|
|
189
|
+
return JSON.stringify(left ?? null) === JSON.stringify(right ?? null)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function addOntologyBindingIssues(
|
|
193
|
+
issues: ResourceGovernanceValidationIssue[],
|
|
194
|
+
orgName: string,
|
|
195
|
+
resource: ResourceEntry,
|
|
196
|
+
ontologyIndex: ResolvedOntologyIndex | undefined
|
|
197
|
+
): void {
|
|
198
|
+
const binding = resource.ontology
|
|
199
|
+
if (binding === undefined) return
|
|
200
|
+
|
|
201
|
+
if ((resource.kind === 'workflow' || resource.kind === 'agent') && (binding.actions?.length ?? 0) === 0) {
|
|
202
|
+
addGovernanceIssue(
|
|
203
|
+
issues,
|
|
204
|
+
'missing-ontology-actions',
|
|
205
|
+
orgName,
|
|
206
|
+
resource.id,
|
|
207
|
+
`[${orgName}] Resource '${resource.id}' declares ontology bindings but no ontology actions.`
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (binding.primaryAction !== undefined && !binding.actions?.includes(binding.primaryAction)) {
|
|
212
|
+
addGovernanceIssue(
|
|
213
|
+
issues,
|
|
214
|
+
'primary-action-mismatch',
|
|
215
|
+
orgName,
|
|
216
|
+
resource.id,
|
|
217
|
+
`[${orgName}] Resource '${resource.id}' primaryAction '${binding.primaryAction}' must be included in ontology.actions.`
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (ontologyIndex === undefined) return
|
|
222
|
+
|
|
223
|
+
const validateRefs = (
|
|
224
|
+
bindingKey: 'actions' | 'primaryAction' | 'reads' | 'writes' | 'usesCatalogs' | 'emits',
|
|
225
|
+
expectedKind: OntologyKind,
|
|
226
|
+
refs: string[] | string | undefined
|
|
227
|
+
) => {
|
|
228
|
+
const values = refs === undefined ? [] : Array.isArray(refs) ? refs : [refs]
|
|
229
|
+
const index = ontologyIndexForKind(ontologyIndex, expectedKind)
|
|
230
|
+
|
|
231
|
+
for (const ref of values) {
|
|
232
|
+
if (index[ref] !== undefined) continue
|
|
233
|
+
addGovernanceIssue(
|
|
234
|
+
issues,
|
|
235
|
+
'ontology-reference-missing',
|
|
236
|
+
orgName,
|
|
237
|
+
resource.id,
|
|
238
|
+
`[${orgName}] Resource '${resource.id}' ontology.${bindingKey} references missing ${expectedKind} ontology record '${ref}'.`
|
|
239
|
+
)
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
validateRefs('actions', 'action', binding.actions)
|
|
244
|
+
validateRefs('primaryAction', 'action', binding.primaryAction)
|
|
245
|
+
validateRefs('reads', 'object', binding.reads)
|
|
246
|
+
validateRefs('writes', 'object', binding.writes)
|
|
247
|
+
validateRefs('usesCatalogs', 'catalog', binding.usesCatalogs)
|
|
248
|
+
validateRefs('emits', 'event', binding.emits)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function addTopologyIssues(
|
|
252
|
+
issues: ResourceGovernanceValidationIssue[],
|
|
253
|
+
orgName: string,
|
|
254
|
+
deployment: DeploymentSpec,
|
|
255
|
+
organizationModel: ResourceGovernanceModel,
|
|
256
|
+
systemsById: Map<string, SystemEntry>,
|
|
257
|
+
omResourcesById: Map<string, ResourceEntry>,
|
|
258
|
+
ontologyIndex: ResolvedOntologyIndex | undefined
|
|
259
|
+
): void {
|
|
260
|
+
const relationships = organizationModel.topology?.relationships
|
|
261
|
+
if (relationships === undefined) return
|
|
262
|
+
|
|
263
|
+
const rolesById = new Set(Object.keys(organizationModel.roles ?? {}))
|
|
264
|
+
const policiesById = new Set(Object.keys(organizationModel.policies ?? {}))
|
|
265
|
+
const triggerIds = new Set(deployment.triggers?.map((trigger) => trigger.resourceId) ?? [])
|
|
266
|
+
const humanCheckpointIds = new Set(deployment.humanCheckpoints?.map((checkpoint) => checkpoint.resourceId) ?? [])
|
|
267
|
+
const externalResourceIds = new Set(deployment.externalResources?.map((external) => external.resourceId) ?? [])
|
|
268
|
+
|
|
269
|
+
const topologyRefExists = (ref: OmTopologyNodeRef): boolean => {
|
|
270
|
+
if (ref.kind === 'system') return systemsById.has(ref.id)
|
|
271
|
+
if (ref.kind === 'resource') return omResourcesById.has(ref.id)
|
|
272
|
+
if (ref.kind === 'policy') return policiesById.has(ref.id)
|
|
273
|
+
if (ref.kind === 'role') return rolesById.has(ref.id)
|
|
274
|
+
if (ref.kind === 'trigger') return triggerIds.has(ref.id)
|
|
275
|
+
if (ref.kind === 'humanCheckpoint') return humanCheckpointIds.has(ref.id)
|
|
276
|
+
if (ref.kind === 'externalResource') return externalResourceIds.has(ref.id)
|
|
277
|
+
if (ref.kind === 'ontology') {
|
|
278
|
+
if (ontologyIndex === undefined) return true
|
|
279
|
+
return Object.values(ontologyIndex).some((records) => records[ref.id] !== undefined)
|
|
280
|
+
}
|
|
281
|
+
return false
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
for (const [relationshipId, relationship] of Object.entries(relationships)) {
|
|
285
|
+
;(['from', 'to'] as const).forEach((side) => {
|
|
286
|
+
const ref = relationship[side]
|
|
287
|
+
if (topologyRefExists(ref)) return
|
|
288
|
+
|
|
289
|
+
addGovernanceIssue(
|
|
290
|
+
issues,
|
|
291
|
+
'topology-reference-missing',
|
|
292
|
+
orgName,
|
|
293
|
+
ref.id,
|
|
294
|
+
`[${orgName}] Topology relationship '${relationshipId}' ${side} references missing ${ref.kind} '${ref.id}'.`
|
|
295
|
+
)
|
|
296
|
+
})
|
|
297
|
+
}
|
|
298
|
+
}
|
|
135
299
|
|
|
136
300
|
/**
|
|
137
301
|
* Validates runtime resource definitions against OM Resources and Systems.
|
|
@@ -147,9 +311,9 @@ export function validateResourceGovernance(
|
|
|
147
311
|
options: ResourceGovernanceValidationOptions = {}
|
|
148
312
|
): ResourceGovernanceValidationResult {
|
|
149
313
|
const mode = getResourceValidatorMode(options.mode)
|
|
150
|
-
const omResourcesMap = organizationModel?.resources
|
|
151
|
-
const omSystemsMap = organizationModel?.systems
|
|
152
|
-
const issues: ResourceGovernanceValidationIssue[] = []
|
|
314
|
+
const omResourcesMap = organizationModel?.resources
|
|
315
|
+
const omSystemsMap = organizationModel?.systems
|
|
316
|
+
const issues: ResourceGovernanceValidationIssue[] = []
|
|
153
317
|
|
|
154
318
|
if (!omResourcesMap || !omSystemsMap) {
|
|
155
319
|
return { valid: true, mode, issues }
|
|
@@ -160,12 +324,26 @@ export function validateResourceGovernance(
|
|
|
160
324
|
const systemsById = new Map(
|
|
161
325
|
listAllSystems({ systems: omSystemsMap } as OrganizationModel).map(({ path, system }) => [path, system])
|
|
162
326
|
)
|
|
163
|
-
const activeOmResources = Object.values(omResourcesMap).filter((resource) => resource.status === 'active')
|
|
164
|
-
const omResourcesById = new Map(activeOmResources.map((resource) => [resource.id, resource]))
|
|
165
|
-
const runtimeResources = getRuntimeResources(deployment)
|
|
166
|
-
const runtimeResourcesById = new Map(runtimeResources.map((resource) => [resource.resourceId, resource]))
|
|
167
|
-
|
|
168
|
-
|
|
327
|
+
const activeOmResources = Object.values(omResourcesMap).filter((resource) => resource.status === 'active')
|
|
328
|
+
const omResourcesById = new Map(activeOmResources.map((resource) => [resource.id, resource]))
|
|
329
|
+
const runtimeResources = getRuntimeResources(deployment)
|
|
330
|
+
const runtimeResourcesById = new Map(runtimeResources.map((resource) => [resource.resourceId, resource]))
|
|
331
|
+
const ontologyCompilation = hasOntologySources(organizationModel)
|
|
332
|
+
? compileOrganizationOntology(organizationModel)
|
|
333
|
+
: undefined
|
|
334
|
+
const ontologyIndex = ontologyCompilation?.ontology
|
|
335
|
+
|
|
336
|
+
for (const diagnostic of ontologyCompilation?.diagnostics ?? []) {
|
|
337
|
+
addGovernanceIssue(
|
|
338
|
+
issues,
|
|
339
|
+
'ontology-reference-missing',
|
|
340
|
+
orgName,
|
|
341
|
+
diagnostic.id,
|
|
342
|
+
`[${orgName}] ${diagnostic.message}`
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
for (const resource of activeOmResources) {
|
|
169
347
|
if (!systemsById.has(resource.systemPath)) {
|
|
170
348
|
addGovernanceIssue(
|
|
171
349
|
issues,
|
|
@@ -198,16 +376,28 @@ export function validateResourceGovernance(
|
|
|
198
376
|
)
|
|
199
377
|
}
|
|
200
378
|
|
|
201
|
-
if (runtimeResource.descriptor && runtimeResource.descriptor.systemPath !== resource.systemPath) {
|
|
202
|
-
addGovernanceIssue(
|
|
379
|
+
if (runtimeResource.descriptor && runtimeResource.descriptor.systemPath !== resource.systemPath) {
|
|
380
|
+
addGovernanceIssue(
|
|
203
381
|
issues,
|
|
204
382
|
'system-mismatch',
|
|
205
383
|
orgName,
|
|
206
384
|
resource.id,
|
|
207
385
|
`[${orgName}] Resource '${resource.id}' system mismatch: code descriptor has '${runtimeResource.descriptor.systemPath}', OM has '${resource.systemPath}'.`
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
|
|
386
|
+
)
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
if (runtimeResource.descriptor && !sameJson(runtimeResource.descriptor.ontology, resource.ontology)) {
|
|
390
|
+
addGovernanceIssue(
|
|
391
|
+
issues,
|
|
392
|
+
'descriptor-mismatch',
|
|
393
|
+
orgName,
|
|
394
|
+
resource.id,
|
|
395
|
+
`[${orgName}] Resource '${resource.id}' ontology descriptor mismatch between code and OM.`
|
|
396
|
+
)
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
addOntologyBindingIssues(issues, orgName, resource, ontologyIndex)
|
|
400
|
+
}
|
|
211
401
|
|
|
212
402
|
for (const runtimeResource of runtimeResources) {
|
|
213
403
|
const omResource = omResourcesById.get(runtimeResource.resourceId)
|
|
@@ -242,18 +432,20 @@ export function validateResourceGovernance(
|
|
|
242
432
|
)
|
|
243
433
|
}
|
|
244
434
|
|
|
245
|
-
if (runtimeResource.descriptor.kind !== runtimeResource.type) {
|
|
246
|
-
addGovernanceIssue(
|
|
435
|
+
if (runtimeResource.descriptor.kind !== runtimeResource.type) {
|
|
436
|
+
addGovernanceIssue(
|
|
247
437
|
issues,
|
|
248
438
|
'type-mismatch',
|
|
249
439
|
orgName,
|
|
250
440
|
runtimeResource.resourceId,
|
|
251
441
|
`[${orgName}] Code-side resource '${runtimeResource.resourceId}' descriptor kind '${runtimeResource.descriptor.kind}' does not match runtime type '${runtimeResource.type}'.`
|
|
252
|
-
)
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
442
|
+
)
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
addTopologyIssues(issues, orgName, deployment, organizationModel, systemsById, omResourcesById, ontologyIndex)
|
|
447
|
+
|
|
448
|
+
emitGovernanceIssues(issues, mode, options.onWarning)
|
|
257
449
|
|
|
258
450
|
return {
|
|
259
451
|
valid: issues.length === 0,
|
|
@@ -418,6 +418,42 @@ export type OrganizationModelIntegrationResourceEntry = z.infer<typeof Integrati
|
|
|
418
418
|
export type OrganizationModelScriptResourceEntry = z.infer<typeof ScriptResourceEntrySchema>
|
|
419
419
|
```
|
|
420
420
|
|
|
421
|
+
### `OrganizationModelTopology`
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
export type OrganizationModelTopology = z.infer<typeof OmTopologyDomainSchema>
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### `OrganizationModelTopologyNodeKind`
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
export type OrganizationModelTopologyNodeKind = z.infer<typeof OmTopologyNodeKindSchema>
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### `OrganizationModelTopologyNodeRef`
|
|
434
|
+
|
|
435
|
+
```typescript
|
|
436
|
+
export type OrganizationModelTopologyNodeRef = z.infer<typeof OmTopologyNodeRefSchema>
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### `OrganizationModelTopologyRelationshipKind`
|
|
440
|
+
|
|
441
|
+
```typescript
|
|
442
|
+
export type OrganizationModelTopologyRelationshipKind = z.infer<typeof OmTopologyRelationshipKindSchema>
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
### `OrganizationModelTopologyRelationship`
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
export type OrganizationModelTopologyRelationship = z.infer<typeof OmTopologyRelationshipSchema>
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### `OrganizationModelTopologyMetadata`
|
|
452
|
+
|
|
453
|
+
```typescript
|
|
454
|
+
export type OrganizationModelTopologyMetadata = z.infer<typeof OmTopologyMetadataSchema>
|
|
455
|
+
```
|
|
456
|
+
|
|
421
457
|
### `OrganizationModelActions`
|
|
422
458
|
|
|
423
459
|
```typescript
|
|
@@ -598,8 +634,8 @@ export type DeepPartial<T> =
|
|
|
598
634
|
### `ElevasisOrganizationModel`
|
|
599
635
|
|
|
600
636
|
```typescript
|
|
601
|
-
export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
|
|
602
|
-
knowledge?: OrganizationModel['knowledge']
|
|
637
|
+
export type ElevasisOrganizationModel = Omit<OrganizationModel, 'knowledge'> & {
|
|
638
|
+
knowledge?: OrganizationModel['knowledge']
|
|
603
639
|
}
|
|
604
640
|
```
|
|
605
641
|
|
|
@@ -624,107 +660,107 @@ export type SystemSidebarWidthResolver = number | ((context: { currentPath: stri
|
|
|
624
660
|
### `SystemModule`
|
|
625
661
|
|
|
626
662
|
```typescript
|
|
627
|
-
export interface SystemModule {
|
|
628
|
-
/** Unique stable identifier for this UI system module. */
|
|
629
|
-
key: string
|
|
630
|
-
/** Organization Model system id this module presents. Omit for navigation-only app surfaces. */
|
|
631
|
-
systemId?: string
|
|
632
|
-
/** Route prefixes owned by navigation-only app surfaces. */
|
|
633
|
-
routePrefixes?: string[]
|
|
634
|
-
/** Capability identifiers contributed by this system module. */
|
|
635
|
-
capabilityIds?: string[]
|
|
636
|
-
/** Icon used when this system node appears in shell navigation. */
|
|
637
|
-
icon?: SystemIconComponent
|
|
638
|
-
/** Sidebar component rendered when this system's subtree route is active. */
|
|
639
|
-
sidebar?: SystemSidebarComponent
|
|
640
|
-
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
641
|
-
sidebarWidth?: SystemSidebarWidthResolver
|
|
642
|
-
/** Operations-only bridge connecting this system to the organization graph node. */
|
|
643
|
-
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
|
|
644
680
|
}
|
|
645
681
|
```
|
|
646
682
|
|
|
647
683
|
### `ResolvedSystemAccess`
|
|
648
684
|
|
|
649
685
|
```typescript
|
|
650
|
-
export interface ResolvedSystemAccess {
|
|
651
|
-
|
|
652
|
-
systemId?: string
|
|
653
|
-
enabled: boolean
|
|
686
|
+
export interface ResolvedSystemAccess {
|
|
687
|
+
systemKey: string
|
|
688
|
+
systemId?: string
|
|
689
|
+
enabled: boolean
|
|
654
690
|
}
|
|
655
691
|
```
|
|
656
692
|
|
|
657
693
|
### `ResolvedSystemSemantics`
|
|
658
694
|
|
|
659
695
|
```typescript
|
|
660
|
-
export interface ResolvedSystemSemantics {
|
|
661
|
-
capabilityIds: string[]
|
|
696
|
+
export interface ResolvedSystemSemantics {
|
|
697
|
+
capabilityIds: string[]
|
|
662
698
|
}
|
|
663
699
|
```
|
|
664
700
|
|
|
665
701
|
### `ResolvedSystemModule`
|
|
666
702
|
|
|
667
703
|
```typescript
|
|
668
|
-
export interface ResolvedSystemModule extends SystemModule {
|
|
669
|
-
access: ResolvedSystemAccess
|
|
670
|
-
semantics: ResolvedSystemSemantics
|
|
704
|
+
export interface ResolvedSystemModule extends SystemModule {
|
|
705
|
+
access: ResolvedSystemAccess
|
|
706
|
+
semantics: ResolvedSystemSemantics
|
|
671
707
|
}
|
|
672
708
|
```
|
|
673
709
|
|
|
674
710
|
### `ResolvedShellSystem`
|
|
675
711
|
|
|
676
712
|
```typescript
|
|
677
|
-
export type ResolvedShellSystem = OrganizationModelSystemEntry & {
|
|
678
|
-
label: string
|
|
679
|
-
iconComponent?: SystemIconComponent
|
|
713
|
+
export type ResolvedShellSystem = OrganizationModelSystemEntry & {
|
|
714
|
+
label: string
|
|
715
|
+
iconComponent?: SystemIconComponent
|
|
680
716
|
}
|
|
681
717
|
```
|
|
682
718
|
|
|
683
719
|
### `ResolvedShellModel`
|
|
684
720
|
|
|
685
721
|
```typescript
|
|
686
|
-
export interface ResolvedShellModel {
|
|
687
|
-
systems: readonly ResolvedShellSystem[]
|
|
688
|
-
findByPath: (path: string) => ResolvedShellSystem | undefined
|
|
689
|
-
findById: (id: string) => ResolvedShellSystem | undefined
|
|
690
|
-
childrenOf: (id: string) => ResolvedShellSystem[]
|
|
691
|
-
ancestorsOf: (id: string) => ResolvedShellSystem[]
|
|
692
|
-
parentOf: (id: string) => ResolvedShellSystem | undefined
|
|
693
|
-
topLevel: () => ResolvedShellSystem[]
|
|
694
|
-
requiresAdminFor: (id: string) => boolean
|
|
695
|
-
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
|
|
696
732
|
}
|
|
697
733
|
```
|
|
698
734
|
|
|
699
735
|
### `ShellSidebarLinkItem`
|
|
700
736
|
|
|
701
737
|
```typescript
|
|
702
|
-
export interface ShellSidebarLinkItem {
|
|
703
|
-
label: string
|
|
704
|
-
link: string
|
|
705
|
-
exact?: boolean
|
|
706
|
-
activeMatchPaths?: string[]
|
|
738
|
+
export interface ShellSidebarLinkItem {
|
|
739
|
+
label: string
|
|
740
|
+
link: string
|
|
741
|
+
exact?: boolean
|
|
742
|
+
activeMatchPaths?: string[]
|
|
707
743
|
}
|
|
708
744
|
```
|
|
709
745
|
|
|
710
746
|
### `ShellSidebarLinkGroup`
|
|
711
747
|
|
|
712
748
|
```typescript
|
|
713
|
-
export interface ShellSidebarLinkGroup {
|
|
714
|
-
icon: SystemIconComponent
|
|
715
|
-
label: string
|
|
716
|
-
links?: ShellSidebarLinkItem[]
|
|
717
|
-
link?: string
|
|
749
|
+
export interface ShellSidebarLinkGroup {
|
|
750
|
+
icon: SystemIconComponent
|
|
751
|
+
label: string
|
|
752
|
+
links?: ShellSidebarLinkItem[]
|
|
753
|
+
link?: string
|
|
718
754
|
}
|
|
719
755
|
```
|
|
720
756
|
|
|
721
757
|
### `ShellSidebarProjectionOptions`
|
|
722
758
|
|
|
723
759
|
```typescript
|
|
724
|
-
export interface ShellSidebarProjectionOptions {
|
|
725
|
-
isPlatformAdmin?: boolean
|
|
726
|
-
isDev?: boolean
|
|
727
|
-
section?: 'primary' | 'bottom'
|
|
760
|
+
export interface ShellSidebarProjectionOptions {
|
|
761
|
+
isPlatformAdmin?: boolean
|
|
762
|
+
isDev?: boolean
|
|
763
|
+
section?: 'primary' | 'bottom'
|
|
728
764
|
}
|
|
729
765
|
```
|
|
730
766
|
|
|
@@ -737,75 +773,75 @@ export type ShellRouteMatchStatus = 'matched' | 'hidden' | 'unmatched'
|
|
|
737
773
|
### `ResolvedShellRouteMatch`
|
|
738
774
|
|
|
739
775
|
```typescript
|
|
740
|
-
export interface ResolvedShellRouteMatch {
|
|
741
|
-
status: ShellRouteMatchStatus
|
|
742
|
-
path: string
|
|
743
|
-
system?: ResolvedSystemModule
|
|
744
|
-
node?: ResolvedShellSystem
|
|
776
|
+
export interface ResolvedShellRouteMatch {
|
|
777
|
+
status: ShellRouteMatchStatus
|
|
778
|
+
path: string
|
|
779
|
+
system?: ResolvedSystemModule
|
|
780
|
+
node?: ResolvedShellSystem
|
|
745
781
|
}
|
|
746
782
|
```
|
|
747
783
|
|
|
748
784
|
### `ShellRuntime`
|
|
749
785
|
|
|
750
786
|
```typescript
|
|
751
|
-
export interface ShellRuntime {
|
|
752
|
-
resolveRoute: (path: string) => ResolvedShellRouteMatch
|
|
787
|
+
export interface ShellRuntime {
|
|
788
|
+
resolveRoute: (path: string) => ResolvedShellRouteMatch
|
|
753
789
|
}
|
|
754
790
|
```
|
|
755
791
|
|
|
756
792
|
### `OrganizationGraphSystemBridge`
|
|
757
793
|
|
|
758
794
|
```typescript
|
|
759
|
-
export interface OrganizationGraphSystemBridge {
|
|
760
|
-
systemId?: string
|
|
795
|
+
export interface OrganizationGraphSystemBridge {
|
|
796
|
+
systemId?: string
|
|
761
797
|
}
|
|
762
798
|
```
|
|
763
799
|
|
|
764
800
|
### `OrganizationGraphContextValue`
|
|
765
801
|
|
|
766
802
|
```typescript
|
|
767
|
-
export interface OrganizationGraphContextValue {
|
|
768
|
-
available: boolean
|
|
769
|
-
systemId?: string
|
|
770
|
-
systemPath?: string
|
|
803
|
+
export interface OrganizationGraphContextValue {
|
|
804
|
+
available: boolean
|
|
805
|
+
systemId?: string
|
|
806
|
+
systemPath?: string
|
|
771
807
|
}
|
|
772
808
|
```
|
|
773
809
|
|
|
774
810
|
### `ElevasisSystemsProviderProps`
|
|
775
811
|
|
|
776
812
|
```typescript
|
|
777
|
-
export interface ElevasisSystemsProviderProps {
|
|
778
|
-
systems?: SystemModule[]
|
|
779
|
-
organizationModel?: ElevasisOrganizationModel
|
|
780
|
-
timeRange?: TimeRange
|
|
781
|
-
operationsApiUrl?: string
|
|
782
|
-
operationsSSEManager?: SSEConnectionManagerLike
|
|
783
|
-
deliveryApiUrl?: string
|
|
784
|
-
deliverySSEManager?: SSEConnectionManagerLike
|
|
785
|
-
disabledSubsectionPaths?: string[]
|
|
786
|
-
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
|
|
787
823
|
}
|
|
788
824
|
```
|
|
789
825
|
|
|
790
826
|
### `ElevasisSystemsContextValue`
|
|
791
827
|
|
|
792
828
|
```typescript
|
|
793
|
-
export interface ElevasisSystemsContextValue {
|
|
794
|
-
shellModel: ResolvedShellModel
|
|
795
|
-
shellRuntime: ShellRuntime
|
|
796
|
-
getSidebarLinks: (options?: ShellSidebarProjectionOptions) => ShellSidebarLinkGroup[]
|
|
797
|
-
enabledResolvedSystems: ResolvedSystemModule[]
|
|
798
|
-
resolvedSystems: ResolvedSystemModule[]
|
|
799
|
-
organizationGraph: OrganizationGraphContextValue
|
|
800
|
-
organizationModel?: OrganizationModel
|
|
801
|
-
timeRange?: TimeRange
|
|
802
|
-
operationsApiUrl?: string
|
|
803
|
-
operationsSSEManager?: SSEConnectionManagerLike
|
|
804
|
-
deliveryApiUrl?: string
|
|
805
|
-
deliverySSEManager?: SSEConnectionManagerLike
|
|
806
|
-
disabledSubsectionPaths: string[]
|
|
807
|
-
isSystemEnabled: (key: string) => boolean
|
|
808
|
-
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
|
|
809
845
|
}
|
|
810
846
|
```
|
|
811
847
|
|
|
@@ -1287,13 +1323,15 @@ export interface HumanCheckpointDefinition extends ResourceDefinition {
|
|
|
1287
1323
|
* Used by ResourceRegistry for discovery and Command View for visualization.
|
|
1288
1324
|
*/
|
|
1289
1325
|
export interface DeploymentSpec {
|
|
1290
|
-
/** Deployment version (semver) */
|
|
1291
|
-
version: string
|
|
1292
|
-
/** Optional Organization Model governance catalog used for OM-code validation */
|
|
1293
|
-
organizationModel?:
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1326
|
+
/** Deployment version (semver) */
|
|
1327
|
+
version: string
|
|
1328
|
+
/** Optional Organization Model governance catalog used for OM-code validation */
|
|
1329
|
+
organizationModel?: Partial<
|
|
1330
|
+
Pick<
|
|
1331
|
+
OrganizationModel,
|
|
1332
|
+
'systems' | 'resources' | 'ontology' | 'topology' | 'roles' | 'policies' | 'entities' | 'actions'
|
|
1333
|
+
>
|
|
1334
|
+
>
|
|
1297
1335
|
/** Workflow definitions */
|
|
1298
1336
|
workflows?: WorkflowDefinition[]
|
|
1299
1337
|
/** Agent definitions */
|