@elevasis/core 0.27.0 → 0.28.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.
@@ -647,6 +647,63 @@ var DEFAULT_ORGANIZATION_MODEL_IDENTITY = {
647
647
  businessHours: {},
648
648
  clientBrief: ""
649
649
  };
650
+
651
+ // src/organization-model/helpers.ts
652
+ function defineDomainRecord(schema, entries) {
653
+ return Object.fromEntries(
654
+ entries.map((entry) => {
655
+ const parsed = schema.parse(entry);
656
+ return [parsed.id, parsed];
657
+ })
658
+ );
659
+ }
660
+ function childSystemsOf2(system) {
661
+ return system.systems ?? system.subsystems ?? {};
662
+ }
663
+ function getSystem(model, path) {
664
+ const segments = path.split(".");
665
+ let current = model.systems;
666
+ let node;
667
+ for (const seg of segments) {
668
+ node = current[seg];
669
+ if (node === void 0) return void 0;
670
+ current = childSystemsOf2(node);
671
+ }
672
+ return node;
673
+ }
674
+ function listAllSystems(model) {
675
+ const results = [];
676
+ function walk(map, prefix) {
677
+ for (const [localId, system] of Object.entries(map)) {
678
+ const fullPath = prefix ? `${prefix}.${localId}` : localId;
679
+ results.push({ path: fullPath, system });
680
+ const childSystems = childSystemsOf2(system);
681
+ if (Object.keys(childSystems).length > 0) {
682
+ walk(childSystems, fullPath);
683
+ }
684
+ }
685
+ }
686
+ walk(model.systems, "");
687
+ return results;
688
+ }
689
+ function isPlainJsonObject(value) {
690
+ return typeof value === "object" && value !== null && !Array.isArray(value);
691
+ }
692
+ function mergeJsonConfig(base, override) {
693
+ const result = { ...base };
694
+ for (const [key, value] of Object.entries(override)) {
695
+ const existing = result[key];
696
+ result[key] = isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value;
697
+ }
698
+ return result;
699
+ }
700
+ function resolveSystemConfig(model, path) {
701
+ const system = getSystem(model, path);
702
+ if (system === void 0) return {};
703
+ return mergeJsonConfig({}, system.config ?? {});
704
+ }
705
+
706
+ // src/organization-model/domains/customers.ts
650
707
  var FirmographicsSchema = z.object({
651
708
  /** Industry vertical (e.g. "Marketing Agency", "Legal", "Real Estate"). */
652
709
  industry: z.string().trim().max(200).optional(),
@@ -697,6 +754,12 @@ var CustomersDomainSchema = z.record(z.string(), CustomerSegmentSchema).refine((
697
754
  message: "Each segment entry id must match its map key"
698
755
  }).default({});
699
756
  var DEFAULT_ORGANIZATION_MODEL_CUSTOMERS = {};
757
+ function defineCustomer(entry) {
758
+ return CustomerSegmentSchema.parse(entry);
759
+ }
760
+ function defineCustomers(entries) {
761
+ return defineDomainRecord(CustomerSegmentSchema, entries);
762
+ }
700
763
  var PricingModelSchema = z.enum(["one-time", "subscription", "usage-based", "custom"]).meta({ label: "Pricing model", color: "green" });
701
764
  var ProductSchema = z.object({
702
765
  /** Stable unique identifier for the product (e.g. "product-starter-plan"). */
@@ -739,6 +802,12 @@ var OfferingsDomainSchema = z.record(z.string(), ProductSchema).refine((record)
739
802
  message: "Each product entry id must match its map key"
740
803
  }).default({});
741
804
  var DEFAULT_ORGANIZATION_MODEL_OFFERINGS = {};
805
+ function defineOffering(entry) {
806
+ return ProductSchema.parse(entry);
807
+ }
808
+ function defineOfferings(entries) {
809
+ return defineDomainRecord(ProductSchema, entries);
810
+ }
742
811
  var EntityIdSchema = ModelIdSchema;
743
812
  var EntityLinkKindSchema = z.enum(["belongs-to", "has-many", "has-one", "many-to-many"]).meta({ label: "Link kind" });
744
813
  var EntityLinkSchema = z.object({
@@ -863,6 +932,12 @@ var DEFAULT_ORGANIZATION_MODEL_ENTITIES = Object.fromEntries(
863
932
  return [parsed.id, parsed];
864
933
  })
865
934
  );
935
+ function defineEntity(entry) {
936
+ return EntitySchema.parse(entry);
937
+ }
938
+ function defineEntities(entries) {
939
+ return defineDomainRecord(EntitySchema, entries);
940
+ }
866
941
 
867
942
  // src/organization-model/domains/actions.ts
868
943
  var ActionResourceIdSchema = z.string().trim().min(1).max(255).regex(/^[A-Za-z0-9]+(?:[-._][A-Za-z0-9]+)*$/, "Resource IDs must use letters, numbers, -, _, or . separators");
@@ -925,6 +1000,12 @@ var DEFAULT_ORGANIZATION_MODEL_ACTIONS = {};
925
1000
  function findOrganizationActionById(id, actions = DEFAULT_ORGANIZATION_MODEL_ACTIONS) {
926
1001
  return actions[id];
927
1002
  }
1003
+ function defineAction(entry) {
1004
+ return ActionSchema.parse(entry);
1005
+ }
1006
+ function defineActions(entries) {
1007
+ return defineDomainRecord(ActionSchema, entries);
1008
+ }
928
1009
 
929
1010
  // src/organization-model/domains/systems.ts
930
1011
  var SystemKindSchema = z.enum(["product", "operational", "platform", "diagnostic"]).meta({ label: "System kind", color: "blue" });
@@ -1036,6 +1117,12 @@ var SystemsDomainSchema = z.record(z.string(), SystemEntrySchema).refine((record
1036
1117
  message: "Each system entry id must match its map key"
1037
1118
  }).default({});
1038
1119
  var DEFAULT_ORGANIZATION_MODEL_SYSTEMS = {};
1120
+ function defineSystem(entry) {
1121
+ return SystemEntrySchema.parse(entry);
1122
+ }
1123
+ function defineSystems(entries) {
1124
+ return defineDomainRecord(SystemEntrySchema, entries);
1125
+ }
1039
1126
 
1040
1127
  // src/organization-model/domains/resources.ts
1041
1128
  var ContractRefSchema = z.string().trim().min(1).max(500).regex(
@@ -1256,6 +1343,12 @@ var RolesDomainSchema = z.record(z.string(), RoleSchema).refine((record) => Obje
1256
1343
  message: "Each role entry id must match its map key"
1257
1344
  }).default({});
1258
1345
  var DEFAULT_ORGANIZATION_MODEL_ROLES = {};
1346
+ function defineRole(entry) {
1347
+ return RoleSchema.parse(entry);
1348
+ }
1349
+ function defineRoles(entries) {
1350
+ return defineDomainRecord(RoleSchema, entries);
1351
+ }
1259
1352
  var KeyResultSchema = z.object({
1260
1353
  /** Stable unique identifier for the measurable outcome (e.g. "kr-revenue-q1"). */
1261
1354
  id: z.string().trim().min(1).max(100),
@@ -1304,6 +1397,12 @@ var GoalsDomainSchema = z.record(z.string(), ObjectiveSchema).refine((record) =>
1304
1397
  message: "Each objective entry id must match its map key"
1305
1398
  }).default({});
1306
1399
  var DEFAULT_ORGANIZATION_MODEL_GOALS = {};
1400
+ function defineGoal(entry) {
1401
+ return ObjectiveSchema.parse(entry);
1402
+ }
1403
+ function defineGoals(entries) {
1404
+ return defineDomainRecord(ObjectiveSchema, entries);
1405
+ }
1307
1406
  var KnowledgeTargetKindSchema = z.enum([
1308
1407
  "system",
1309
1408
  "resource",
@@ -1388,6 +1487,12 @@ var OrgKnowledgeNodeSchema = z.object({
1388
1487
  updatedAt: z.string().trim().min(1).max(50)
1389
1488
  });
1390
1489
  var KnowledgeDomainSchema = z.record(ModelIdSchema, OrgKnowledgeNodeSchema).default({});
1490
+ function defineKnowledgeNode(entry) {
1491
+ return OrgKnowledgeNodeSchema.parse(entry);
1492
+ }
1493
+ function defineKnowledgeNodes(entries) {
1494
+ return defineDomainRecord(OrgKnowledgeNodeSchema, entries);
1495
+ }
1391
1496
  var SecretLikeMetadataKeySchema = /(?:secret|password|passwd|token|api[-_]?key|credential|private[-_]?key)/i;
1392
1497
  var SecretLikeMetadataValueSchema = /(?:sk-[A-Za-z0-9_-]{12,}|pk_live_[A-Za-z0-9_-]{12,}|eyJ[A-Za-z0-9_-]{20,}|-----BEGIN (?:RSA |OPENSSH |EC )?PRIVATE KEY-----)/;
1393
1498
  var OmTopologyNodeKindSchema = z.enum([
@@ -1638,52 +1743,11 @@ var PoliciesDomainSchema = z.record(z.string(), PolicySchema).refine((record) =>
1638
1743
  message: "Each policy entry id must match its map key"
1639
1744
  }).default({});
1640
1745
  var DEFAULT_ORGANIZATION_MODEL_POLICIES = {};
1641
-
1642
- // src/organization-model/helpers.ts
1643
- function childSystemsOf2(system) {
1644
- return system.systems ?? system.subsystems ?? {};
1746
+ function definePolicy(entry) {
1747
+ return PolicySchema.parse(entry);
1645
1748
  }
1646
- function getSystem(model, path) {
1647
- const segments = path.split(".");
1648
- let current = model.systems;
1649
- let node;
1650
- for (const seg of segments) {
1651
- node = current[seg];
1652
- if (node === void 0) return void 0;
1653
- current = childSystemsOf2(node);
1654
- }
1655
- return node;
1656
- }
1657
- function listAllSystems(model) {
1658
- const results = [];
1659
- function walk(map, prefix) {
1660
- for (const [localId, system] of Object.entries(map)) {
1661
- const fullPath = prefix ? `${prefix}.${localId}` : localId;
1662
- results.push({ path: fullPath, system });
1663
- const childSystems = childSystemsOf2(system);
1664
- if (Object.keys(childSystems).length > 0) {
1665
- walk(childSystems, fullPath);
1666
- }
1667
- }
1668
- }
1669
- walk(model.systems, "");
1670
- return results;
1671
- }
1672
- function isPlainJsonObject(value) {
1673
- return typeof value === "object" && value !== null && !Array.isArray(value);
1674
- }
1675
- function mergeJsonConfig(base, override) {
1676
- const result = { ...base };
1677
- for (const [key, value] of Object.entries(override)) {
1678
- const existing = result[key];
1679
- result[key] = isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value;
1680
- }
1681
- return result;
1682
- }
1683
- function resolveSystemConfig(model, path) {
1684
- const system = getSystem(model, path);
1685
- if (system === void 0) return {};
1686
- return mergeJsonConfig({}, system.config ?? {});
1749
+ function definePolicies(entries) {
1750
+ return defineDomainRecord(PolicySchema, entries);
1687
1751
  }
1688
1752
 
1689
1753
  // src/organization-model/cross-ref.ts
@@ -2523,6 +2587,12 @@ var StatusEntrySchema = z.object({
2523
2587
  var StatusesDomainSchema = z.record(z.string(), StatusEntrySchema).refine((record) => Object.entries(record).every(([key, entry]) => entry.id === key), {
2524
2588
  message: "Each status entry id must match its map key"
2525
2589
  }).default({});
2590
+ function defineStatus(entry) {
2591
+ return StatusEntrySchema.parse(entry);
2592
+ }
2593
+ function defineStatuses(entries) {
2594
+ return defineDomainRecord(StatusEntrySchema, entries);
2595
+ }
2526
2596
  var DEFAULT_ORGANIZATION_MODEL_STATUSES = {
2527
2597
  // --- delivery.task (TaskStatus — 9 values) ---
2528
2598
  "delivery.task.planned": {
@@ -3372,4 +3442,4 @@ function scaffoldOrganizationModel(model, spec) {
3372
3442
  return scaffoldKnowledgeNode(model, spec);
3373
3443
  }
3374
3444
 
3375
- export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_ENTITIES, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemEntrySchema, SystemIdSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineOrganizationModel, defineResource, defineResourceOntology, defineResources, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
3445
+ export { ActionIdSchema, ActionInvocationKindSchema, ActionInvocationSchema, ActionRefSchema, ActionSchema, ActionScopeSchema, ActionsDomainSchema, AgentKindSchema, AgentResourceEntrySchema, AgentRoleHolderSchema, ApiEndpointInvocationSchema, CodeReferenceRoleSchema, CodeReferenceSchema, ContractRefSchema, CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ONTOLOGY_SCOPE, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_ACTIONS, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA, DEFAULT_ORGANIZATION_MODEL_ENTITIES, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_NAVIGATION, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_POLICIES, DEFAULT_ORGANIZATION_MODEL_RESOURCES, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, DEFAULT_ORGANIZATION_MODEL_SYSTEMS, DEFAULT_ORGANIZATION_MODEL_TOPOLOGY, EntitiesDomainSchema, EntityIdSchema, EntityLinkKindSchema, EntityLinkSchema, EntitySchema, EventDescriptorSchema, EventEmissionDescriptorSchema, EventIdSchema, FirmographicsSchema, GoalsDomainSchema, HumanRoleHolderSchema, IconNameSchema, IntegrationResourceEntrySchema, KNOWLEDGE_FEATURE_ID, KNOWLEDGE_SYSTEM_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, KnowledgeTargetKindSchema, KnowledgeTargetRefSchema, LinkSchema, MONITORING_FEATURE_ID, MONITORING_SYSTEM_ID, McpToolInvocationSchema, NavigationGroupSchema, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, OPERATIONS_SYSTEM_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OmTopologyDomainSchema, OmTopologyMetadataSchema, OmTopologyNodeKindSchema, OmTopologyNodeRefSchema, OmTopologyRelationshipKindSchema, OmTopologyRelationshipSchema, OntologyActionTypeSchema, OntologyCatalogTypeSchema, OntologyEventTypeSchema, OntologyGroupSchema, OntologyIdSchema, OntologyInterfaceTypeSchema, OntologyKindSchema, OntologyLinkTypeSchema, OntologyObjectTypeSchema, OntologyScopeSchema, OntologySharedPropertySchema, OntologySurfaceTypeSchema, OntologyValueTypeSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelDomainKeySchema, OrganizationModelDomainMetadataByDomainSchema, OrganizationModelDomainMetadataSchema, OrganizationModelIconTokenSchema, OrganizationModelNavigationSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_SYSTEM_ID, PROJECTS_VIEW_ACTION_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PROSPECTING_SYSTEM_ID, PoliciesDomainSchema, PolicyApplicabilitySchema, PolicyEffectSchema, PolicyIdSchema, PolicyPredicateSchema, PolicySchema, PolicyTriggerSchema, PricingModelSchema, ProductSchema, ResourceEntrySchema, ResourceGovernanceStatusSchema, ResourceIdSchema, ResourceKindSchema, ResourceOntologyBindingSchema, ResourcesDomainSchema, RoleHolderSchema, RoleHoldersSchema, RoleIdSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SALES_SYSTEM_ID, SEO_FEATURE_ID, SEO_SYSTEM_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, SETTINGS_SYSTEM_ID, ScriptExecutionInvocationSchema, ScriptResourceEntrySchema, ScriptResourceLanguageSchema, ScriptResourceSourceSchema, SidebarNavigationSchema, SidebarNodeSchema, SidebarSectionSchema, SidebarSurfaceTargetsSchema, SlashCommandInvocationSchema, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, SurfaceDefinitionSchema, SurfaceTypeSchema, SystemEntrySchema, SystemIdSchema, SystemKindSchema, SystemLifecycleSchema, SystemPathSchema, SystemStatusSchema, SystemUiSchema, SystemsDomainSchema, TeamRoleHolderSchema, TechStackEntrySchema, UiPositionSchema, WorkflowResourceEntrySchema, compileOrganizationOntology, compileTopologyNodeRef, createFoundationOrganizationModel, defineAction, defineActions, defineCustomer, defineCustomers, defineDomainRecord, defineEntities, defineEntity, defineGoal, defineGoals, defineKnowledgeNode, defineKnowledgeNodes, defineOffering, defineOfferings, defineOrganizationModel, definePolicies, definePolicy, defineResource, defineResourceOntology, defineResources, defineRole, defineRoles, defineStatus, defineStatuses, defineSystem, defineSystems, defineTopology, defineTopologyRelationship, findOrganizationActionById, formatOntologyId, getOntologyDiagnostics, getSortedSidebarEntries, isOntologyGraphNodeId, isOntologyTopologyRef, listAllSystems, listResolvedOntologyRecords, ontologyGraphNodeId, ontologyIdFromGraphNodeId, parseContractRef, parseOntologyId, parseTopologyNodeRef, projectOrganizationSurfaces, resolveOrganizationModel, resolveOrganizationModelWithResources, scaffoldOrganizationModel, topologyRef, topologyRelationship, validateOrganizationSurfaceProjection };
@@ -3719,9 +3719,9 @@ declare const SurfaceTypeSchema: z.ZodEnum<{
3719
3719
  dashboard: "dashboard";
3720
3720
  settings: "settings";
3721
3721
  graph: "graph";
3722
- list: "list";
3723
3722
  page: "page";
3724
3723
  detail: "detail";
3724
+ list: "list";
3725
3725
  }>;
3726
3726
  interface SidebarSurfaceNode {
3727
3727
  type: 'surface';
@@ -4159,8 +4159,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
4159
4159
  description: z.ZodOptional<z.ZodString>;
4160
4160
  ownerRoleId: z.ZodOptional<z.ZodString>;
4161
4161
  status: z.ZodEnum<{
4162
- deprecated: "deprecated";
4163
4162
  active: "active";
4163
+ deprecated: "deprecated";
4164
4164
  archived: "archived";
4165
4165
  }>;
4166
4166
  ontology: z.ZodOptional<z.ZodObject<{
@@ -4178,12 +4178,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
4178
4178
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4179
4179
  path: z.ZodString;
4180
4180
  role: z.ZodEnum<{
4181
- config: "config";
4182
4181
  entrypoint: "entrypoint";
4183
4182
  handler: "handler";
4184
4183
  schema: "schema";
4185
4184
  test: "test";
4186
4185
  docs: "docs";
4186
+ config: "config";
4187
4187
  }>;
4188
4188
  symbol: z.ZodOptional<z.ZodString>;
4189
4189
  description: z.ZodOptional<z.ZodString>;
@@ -4194,10 +4194,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
4194
4194
  label: z.ZodString;
4195
4195
  payloadSchema: z.ZodOptional<z.ZodString>;
4196
4196
  lifecycle: z.ZodOptional<z.ZodEnum<{
4197
+ active: "active";
4197
4198
  deprecated: "deprecated";
4198
4199
  draft: "draft";
4199
4200
  beta: "beta";
4200
- active: "active";
4201
4201
  archived: "archived";
4202
4202
  }>>;
4203
4203
  }, z.core.$strip>>>;
@@ -4209,8 +4209,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
4209
4209
  description: z.ZodOptional<z.ZodString>;
4210
4210
  ownerRoleId: z.ZodOptional<z.ZodString>;
4211
4211
  status: z.ZodEnum<{
4212
- deprecated: "deprecated";
4213
4212
  active: "active";
4213
+ deprecated: "deprecated";
4214
4214
  archived: "archived";
4215
4215
  }>;
4216
4216
  ontology: z.ZodOptional<z.ZodObject<{
@@ -4228,12 +4228,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
4228
4228
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4229
4229
  path: z.ZodString;
4230
4230
  role: z.ZodEnum<{
4231
- config: "config";
4232
4231
  entrypoint: "entrypoint";
4233
4232
  handler: "handler";
4234
4233
  schema: "schema";
4235
4234
  test: "test";
4236
4235
  docs: "docs";
4236
+ config: "config";
4237
4237
  }>;
4238
4238
  symbol: z.ZodOptional<z.ZodString>;
4239
4239
  description: z.ZodOptional<z.ZodString>;
@@ -4275,10 +4275,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
4275
4275
  label: z.ZodString;
4276
4276
  payloadSchema: z.ZodOptional<z.ZodString>;
4277
4277
  lifecycle: z.ZodOptional<z.ZodEnum<{
4278
+ active: "active";
4278
4279
  deprecated: "deprecated";
4279
4280
  draft: "draft";
4280
4281
  beta: "beta";
4281
- active: "active";
4282
4282
  archived: "archived";
4283
4283
  }>>;
4284
4284
  }, z.core.$strip>>>;
@@ -4290,8 +4290,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
4290
4290
  description: z.ZodOptional<z.ZodString>;
4291
4291
  ownerRoleId: z.ZodOptional<z.ZodString>;
4292
4292
  status: z.ZodEnum<{
4293
- deprecated: "deprecated";
4294
4293
  active: "active";
4294
+ deprecated: "deprecated";
4295
4295
  archived: "archived";
4296
4296
  }>;
4297
4297
  ontology: z.ZodOptional<z.ZodObject<{
@@ -4309,12 +4309,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
4309
4309
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4310
4310
  path: z.ZodString;
4311
4311
  role: z.ZodEnum<{
4312
- config: "config";
4313
4312
  entrypoint: "entrypoint";
4314
4313
  handler: "handler";
4315
4314
  schema: "schema";
4316
4315
  test: "test";
4317
4316
  docs: "docs";
4317
+ config: "config";
4318
4318
  }>;
4319
4319
  symbol: z.ZodOptional<z.ZodString>;
4320
4320
  description: z.ZodOptional<z.ZodString>;
@@ -4329,8 +4329,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
4329
4329
  description: z.ZodOptional<z.ZodString>;
4330
4330
  ownerRoleId: z.ZodOptional<z.ZodString>;
4331
4331
  status: z.ZodEnum<{
4332
- deprecated: "deprecated";
4333
4332
  active: "active";
4333
+ deprecated: "deprecated";
4334
4334
  archived: "archived";
4335
4335
  }>;
4336
4336
  ontology: z.ZodOptional<z.ZodObject<{
@@ -4348,12 +4348,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
4348
4348
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
4349
4349
  path: z.ZodString;
4350
4350
  role: z.ZodEnum<{
4351
- config: "config";
4352
4351
  entrypoint: "entrypoint";
4353
4352
  handler: "handler";
4354
4353
  schema: "schema";
4355
4354
  test: "test";
4356
4355
  docs: "docs";
4356
+ config: "config";
4357
4357
  }>;
4358
4358
  symbol: z.ZodOptional<z.ZodString>;
4359
4359
  description: z.ZodOptional<z.ZodString>;
@@ -4398,9 +4398,9 @@ declare const OrganizationModelSchema: z.ZodObject<{
4398
4398
  id: z.ZodString;
4399
4399
  }, z.core.$strip>], "kind">;
4400
4400
  kind: z.ZodEnum<{
4401
+ approval: "approval";
4401
4402
  triggers: "triggers";
4402
4403
  uses: "uses";
4403
- approval: "approval";
4404
4404
  }>;
4405
4405
  to: z.ZodDiscriminatedUnion<[z.ZodObject<{
4406
4406
  kind: z.ZodLiteral<"system">;
@@ -4467,10 +4467,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
4467
4467
  }, z.core.$strip>], "kind">>>;
4468
4468
  knowledge: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
4469
4469
  lifecycle: z.ZodDefault<z.ZodEnum<{
4470
+ active: "active";
4470
4471
  deprecated: "deprecated";
4471
4472
  draft: "draft";
4472
4473
  beta: "beta";
4473
- active: "active";
4474
4474
  archived: "archived";
4475
4475
  }>>;
4476
4476
  }, z.core.$strip>>>>;
@@ -4548,10 +4548,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
4548
4548
  roleIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
4549
4549
  }, z.core.$strip>>;
4550
4550
  lifecycle: z.ZodDefault<z.ZodEnum<{
4551
+ active: "active";
4551
4552
  deprecated: "deprecated";
4552
4553
  draft: "draft";
4553
4554
  beta: "beta";
4554
- active: "active";
4555
4555
  archived: "archived";
4556
4556
  }>>;
4557
4557
  }, z.core.$strip>>>>;
@@ -4634,12 +4634,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
4634
4634
  kind: z.ZodEnum<{
4635
4635
  knowledge: "knowledge";
4636
4636
  system: "system";
4637
+ resource: "resource";
4637
4638
  action: "action";
4638
4639
  ontology: "ontology";
4639
4640
  role: "role";
4640
- goal: "goal";
4641
- resource: "resource";
4642
4641
  stage: "stage";
4642
+ goal: "goal";
4643
4643
  "customer-segment": "customer-segment";
4644
4644
  offering: "offering";
4645
4645
  }>;
@@ -4649,7 +4649,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
4649
4649
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
4650
4650
  }, z.core.$strip>]>, z.ZodTransform<{
4651
4651
  target: {
4652
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
4652
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
4653
4653
  id: string;
4654
4654
  };
4655
4655
  nodeId: string;
@@ -4657,7 +4657,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
4657
4657
  nodeId: string;
4658
4658
  } | {
4659
4659
  target: {
4660
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
4660
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
4661
4661
  id: string;
4662
4662
  };
4663
4663
  }>>>>;
@@ -20036,6 +20036,28 @@ var DEFAULT_ORGANIZATION_MODEL_IDENTITY = {
20036
20036
  businessHours: {},
20037
20037
  clientBrief: ""
20038
20038
  };
20039
+
20040
+ // src/organization-model/helpers.ts
20041
+ function childSystemsOf2(system) {
20042
+ return system.systems ?? system.subsystems ?? {};
20043
+ }
20044
+ function listAllSystems(model) {
20045
+ const results = [];
20046
+ function walk(map2, prefix) {
20047
+ for (const [localId, system] of Object.entries(map2)) {
20048
+ const fullPath = prefix ? `${prefix}.${localId}` : localId;
20049
+ results.push({ path: fullPath, system });
20050
+ const childSystems = childSystemsOf2(system);
20051
+ if (Object.keys(childSystems).length > 0) {
20052
+ walk(childSystems, fullPath);
20053
+ }
20054
+ }
20055
+ }
20056
+ walk(model.systems, "");
20057
+ return results;
20058
+ }
20059
+
20060
+ // src/organization-model/domains/customers.ts
20039
20061
  var FirmographicsSchema = z.object({
20040
20062
  /** Industry vertical (e.g. "Marketing Agency", "Legal", "Real Estate"). */
20041
20063
  industry: z.string().trim().max(200).optional(),
@@ -20879,26 +20901,6 @@ var PoliciesDomainSchema = z.record(z.string(), PolicySchema).refine((record) =>
20879
20901
  }).default({});
20880
20902
  var DEFAULT_ORGANIZATION_MODEL_POLICIES = {};
20881
20903
 
20882
- // src/organization-model/helpers.ts
20883
- function childSystemsOf2(system) {
20884
- return system.systems ?? system.subsystems ?? {};
20885
- }
20886
- function listAllSystems(model) {
20887
- const results = [];
20888
- function walk(map2, prefix) {
20889
- for (const [localId, system] of Object.entries(map2)) {
20890
- const fullPath = prefix ? `${prefix}.${localId}` : localId;
20891
- results.push({ path: fullPath, system });
20892
- const childSystems = childSystemsOf2(system);
20893
- if (Object.keys(childSystems).length > 0) {
20894
- walk(childSystems, fullPath);
20895
- }
20896
- }
20897
- }
20898
- walk(model.systems, "");
20899
- return results;
20900
- }
20901
-
20902
20904
  // src/organization-model/cross-ref.ts
20903
20905
  var ONTOLOGY_REFERENCE_KEY_KINDS = {
20904
20906
  valueType: "value-type",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevasis/core",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "license": "MIT",
5
5
  "description": "Minimal shared constants across Elevasis monorepo",
6
6
  "sideEffects": false,
@@ -41,8 +41,8 @@
41
41
  "rollup-plugin-dts": "^6.3.0",
42
42
  "tsup": "^8.0.0",
43
43
  "typescript": "5.9.2",
44
- "@repo/eslint-config": "0.0.0",
45
- "@repo/typescript-config": "0.0.0"
44
+ "@repo/typescript-config": "0.0.0",
45
+ "@repo/eslint-config": "0.0.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "@anthropic-ai/sdk": "^0.62.0",