@elevasis/core 0.24.0 → 0.24.1

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.
Files changed (32) hide show
  1. package/dist/index.d.ts +3192 -2313
  2. package/dist/index.js +243 -13
  3. package/dist/knowledge/index.d.ts +92 -6
  4. package/dist/organization-model/index.d.ts +3192 -2313
  5. package/dist/organization-model/index.js +243 -13
  6. package/dist/test-utils/index.d.ts +134 -45
  7. package/dist/test-utils/index.js +118 -11
  8. package/package.json +3 -3
  9. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +45 -7
  10. package/src/execution/engine/workflow/types.ts +5 -7
  11. package/src/organization-model/__tests__/domains/resources.test.ts +19 -8
  12. package/src/organization-model/__tests__/domains/topology.test.ts +188 -0
  13. package/src/organization-model/__tests__/graph.test.ts +98 -7
  14. package/src/organization-model/__tests__/schema.test.ts +14 -4
  15. package/src/organization-model/defaults.ts +2 -0
  16. package/src/organization-model/domains/resources.ts +63 -20
  17. package/src/organization-model/domains/topology.ts +261 -0
  18. package/src/organization-model/graph/build.ts +63 -15
  19. package/src/organization-model/graph/schema.ts +4 -3
  20. package/src/organization-model/graph/types.ts +5 -4
  21. package/src/organization-model/index.ts +4 -3
  22. package/src/organization-model/ontology.ts +2 -5
  23. package/src/organization-model/organization-model.mdx +16 -11
  24. package/src/organization-model/published.ts +36 -13
  25. package/src/organization-model/schema.ts +51 -11
  26. package/src/organization-model/types.ts +25 -11
  27. package/src/platform/registry/__tests__/validation.test.ts +199 -14
  28. package/src/platform/registry/resource-registry.ts +11 -11
  29. package/src/platform/registry/validation.ts +226 -34
  30. package/src/reference/_generated/contracts.md +45 -7
  31. package/src/reference/glossary.md +3 -3
  32. package/src/supabase/database.types.ts +3156 -3153
@@ -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
@@ -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
- systems?: OrganizationModelSystems
1295
- resources?: OrganizationModelResources
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 */
@@ -29,7 +29,7 @@ description: Terminology disambiguation for Organization OS concepts used in the
29
29
 
30
30
  **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
31
 
32
- **OrganizationModel** -- top-level semantic contract for an organization. Current primary fields include `version`, `domainMetadata`, `branding`, `navigation`, `ontology`, `systems`, `resources`, `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.
32
+ **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
33
 
34
34
  **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
35
 
@@ -37,7 +37,7 @@ description: Terminology disambiguation for Organization OS concepts used in the
37
37
 
38
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
39
 
40
- **Resource descriptor** -- OM entry with canonical `id`, required `systemPath`, governance `status`, optional role ownership, optional `actionKey`, `codeRefs`, and nested `ontology` bindings for implemented actions, read/write objects, used catalogs, and emitted events. Top-level `emits` remains a compatibility mirror for older descriptors.
40
+ **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
41
 
42
42
  **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
43
 
@@ -51,7 +51,7 @@ description: Terminology disambiguation for Organization OS concepts used in the
51
51
 
52
52
  **Subshell / Sidebar** -- System- or route-prefix-scoped UI region rendered when the current route matches a module whose manifest supplies a sidebar.
53
53
 
54
- **Topology** -- runtime resource relationships declared in `DeploymentSpec.relationships`.
54
+ **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
55
 
56
56
  ## Package Boundary
57
57