@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.
package/dist/index.js CHANGED
@@ -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 };
@@ -142,9 +142,9 @@ declare const SurfaceTypeSchema: z.ZodEnum<{
142
142
  dashboard: "dashboard";
143
143
  settings: "settings";
144
144
  graph: "graph";
145
- list: "list";
146
145
  page: "page";
147
146
  detail: "detail";
147
+ list: "list";
148
148
  }>;
149
149
  interface SidebarSurfaceNode {
150
150
  type: 'surface';
@@ -257,12 +257,12 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
257
257
  kind: z.ZodEnum<{
258
258
  knowledge: "knowledge";
259
259
  system: "system";
260
+ resource: "resource";
260
261
  action: "action";
261
262
  ontology: "ontology";
262
263
  role: "role";
263
- goal: "goal";
264
- resource: "resource";
265
264
  stage: "stage";
265
+ goal: "goal";
266
266
  "customer-segment": "customer-segment";
267
267
  offering: "offering";
268
268
  }>;
@@ -272,7 +272,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
272
272
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
273
273
  }, z.core.$strip>]>, z.ZodTransform<{
274
274
  target: {
275
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
275
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
276
276
  id: string;
277
277
  };
278
278
  nodeId: string;
@@ -280,7 +280,7 @@ declare const OrgKnowledgeNodeSchema: z.ZodObject<{
280
280
  nodeId: string;
281
281
  } | {
282
282
  target: {
283
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
283
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
284
284
  id: string;
285
285
  };
286
286
  }>>>>;
@@ -758,8 +758,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
758
758
  description: z.ZodOptional<z.ZodString>;
759
759
  ownerRoleId: z.ZodOptional<z.ZodString>;
760
760
  status: z.ZodEnum<{
761
- deprecated: "deprecated";
762
761
  active: "active";
762
+ deprecated: "deprecated";
763
763
  archived: "archived";
764
764
  }>;
765
765
  ontology: z.ZodOptional<z.ZodObject<{
@@ -777,12 +777,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
777
777
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
778
778
  path: z.ZodString;
779
779
  role: z.ZodEnum<{
780
- config: "config";
781
780
  entrypoint: "entrypoint";
782
781
  handler: "handler";
783
782
  schema: "schema";
784
783
  test: "test";
785
784
  docs: "docs";
785
+ config: "config";
786
786
  }>;
787
787
  symbol: z.ZodOptional<z.ZodString>;
788
788
  description: z.ZodOptional<z.ZodString>;
@@ -793,10 +793,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
793
793
  label: z.ZodString;
794
794
  payloadSchema: z.ZodOptional<z.ZodString>;
795
795
  lifecycle: z.ZodOptional<z.ZodEnum<{
796
+ active: "active";
796
797
  deprecated: "deprecated";
797
798
  draft: "draft";
798
799
  beta: "beta";
799
- active: "active";
800
800
  archived: "archived";
801
801
  }>>;
802
802
  }, z.core.$strip>>>;
@@ -808,8 +808,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
808
808
  description: z.ZodOptional<z.ZodString>;
809
809
  ownerRoleId: z.ZodOptional<z.ZodString>;
810
810
  status: z.ZodEnum<{
811
- deprecated: "deprecated";
812
811
  active: "active";
812
+ deprecated: "deprecated";
813
813
  archived: "archived";
814
814
  }>;
815
815
  ontology: z.ZodOptional<z.ZodObject<{
@@ -827,12 +827,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
827
827
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
828
828
  path: z.ZodString;
829
829
  role: z.ZodEnum<{
830
- config: "config";
831
830
  entrypoint: "entrypoint";
832
831
  handler: "handler";
833
832
  schema: "schema";
834
833
  test: "test";
835
834
  docs: "docs";
835
+ config: "config";
836
836
  }>;
837
837
  symbol: z.ZodOptional<z.ZodString>;
838
838
  description: z.ZodOptional<z.ZodString>;
@@ -874,10 +874,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
874
874
  label: z.ZodString;
875
875
  payloadSchema: z.ZodOptional<z.ZodString>;
876
876
  lifecycle: z.ZodOptional<z.ZodEnum<{
877
+ active: "active";
877
878
  deprecated: "deprecated";
878
879
  draft: "draft";
879
880
  beta: "beta";
880
- active: "active";
881
881
  archived: "archived";
882
882
  }>>;
883
883
  }, z.core.$strip>>>;
@@ -889,8 +889,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
889
889
  description: z.ZodOptional<z.ZodString>;
890
890
  ownerRoleId: z.ZodOptional<z.ZodString>;
891
891
  status: z.ZodEnum<{
892
- deprecated: "deprecated";
893
892
  active: "active";
893
+ deprecated: "deprecated";
894
894
  archived: "archived";
895
895
  }>;
896
896
  ontology: z.ZodOptional<z.ZodObject<{
@@ -908,12 +908,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
908
908
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
909
909
  path: z.ZodString;
910
910
  role: z.ZodEnum<{
911
- config: "config";
912
911
  entrypoint: "entrypoint";
913
912
  handler: "handler";
914
913
  schema: "schema";
915
914
  test: "test";
916
915
  docs: "docs";
916
+ config: "config";
917
917
  }>;
918
918
  symbol: z.ZodOptional<z.ZodString>;
919
919
  description: z.ZodOptional<z.ZodString>;
@@ -928,8 +928,8 @@ declare const OrganizationModelSchema: z.ZodObject<{
928
928
  description: z.ZodOptional<z.ZodString>;
929
929
  ownerRoleId: z.ZodOptional<z.ZodString>;
930
930
  status: z.ZodEnum<{
931
- deprecated: "deprecated";
932
931
  active: "active";
932
+ deprecated: "deprecated";
933
933
  archived: "archived";
934
934
  }>;
935
935
  ontology: z.ZodOptional<z.ZodObject<{
@@ -947,12 +947,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
947
947
  codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
948
948
  path: z.ZodString;
949
949
  role: z.ZodEnum<{
950
- config: "config";
951
950
  entrypoint: "entrypoint";
952
951
  handler: "handler";
953
952
  schema: "schema";
954
953
  test: "test";
955
954
  docs: "docs";
955
+ config: "config";
956
956
  }>;
957
957
  symbol: z.ZodOptional<z.ZodString>;
958
958
  description: z.ZodOptional<z.ZodString>;
@@ -997,9 +997,9 @@ declare const OrganizationModelSchema: z.ZodObject<{
997
997
  id: z.ZodString;
998
998
  }, z.core.$strip>], "kind">;
999
999
  kind: z.ZodEnum<{
1000
+ approval: "approval";
1000
1001
  triggers: "triggers";
1001
1002
  uses: "uses";
1002
- approval: "approval";
1003
1003
  }>;
1004
1004
  to: z.ZodDiscriminatedUnion<[z.ZodObject<{
1005
1005
  kind: z.ZodLiteral<"system">;
@@ -1066,10 +1066,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
1066
1066
  }, z.core.$strip>], "kind">>>;
1067
1067
  knowledge: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
1068
1068
  lifecycle: z.ZodDefault<z.ZodEnum<{
1069
+ active: "active";
1069
1070
  deprecated: "deprecated";
1070
1071
  draft: "draft";
1071
1072
  beta: "beta";
1072
- active: "active";
1073
1073
  archived: "archived";
1074
1074
  }>>;
1075
1075
  }, z.core.$strip>>>>;
@@ -1147,10 +1147,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
1147
1147
  roleIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1148
1148
  }, z.core.$strip>>;
1149
1149
  lifecycle: z.ZodDefault<z.ZodEnum<{
1150
+ active: "active";
1150
1151
  deprecated: "deprecated";
1151
1152
  draft: "draft";
1152
1153
  beta: "beta";
1153
- active: "active";
1154
1154
  archived: "archived";
1155
1155
  }>>;
1156
1156
  }, z.core.$strip>>>>;
@@ -1233,12 +1233,12 @@ declare const OrganizationModelSchema: z.ZodObject<{
1233
1233
  kind: z.ZodEnum<{
1234
1234
  knowledge: "knowledge";
1235
1235
  system: "system";
1236
+ resource: "resource";
1236
1237
  action: "action";
1237
1238
  ontology: "ontology";
1238
1239
  role: "role";
1239
- goal: "goal";
1240
- resource: "resource";
1241
1240
  stage: "stage";
1241
+ goal: "goal";
1242
1242
  "customer-segment": "customer-segment";
1243
1243
  offering: "offering";
1244
1244
  }>;
@@ -1248,7 +1248,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
1248
1248
  nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
1249
1249
  }, z.core.$strip>]>, z.ZodTransform<{
1250
1250
  target: {
1251
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
1251
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
1252
1252
  id: string;
1253
1253
  };
1254
1254
  nodeId: string;
@@ -1256,7 +1256,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
1256
1256
  nodeId: string;
1257
1257
  } | {
1258
1258
  target: {
1259
- kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
1259
+ kind: "knowledge" | "system" | "resource" | "action" | "ontology" | "role" | "stage" | "goal" | "customer-segment" | "offering";
1260
1260
  id: string;
1261
1261
  };
1262
1262
  }>>>>;