@elevasis/core 0.25.0 → 0.26.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.
Files changed (66) hide show
  1. package/dist/index.d.ts +166 -85
  2. package/dist/index.js +146 -1346
  3. package/dist/knowledge/index.d.ts +27 -38
  4. package/dist/knowledge/index.js +1 -1
  5. package/dist/organization-model/index.d.ts +166 -85
  6. package/dist/organization-model/index.js +146 -1346
  7. package/dist/test-utils/index.d.ts +23 -31
  8. package/dist/test-utils/index.js +75 -1238
  9. package/package.json +1 -1
  10. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +14 -2
  11. package/src/business/acquisition/api-schemas.test.ts +70 -77
  12. package/src/business/acquisition/api-schemas.ts +21 -42
  13. package/src/business/acquisition/derive-actions.test.ts +11 -21
  14. package/src/business/acquisition/derive-actions.ts +61 -14
  15. package/src/business/acquisition/ontology-validation.ts +4 -4
  16. package/src/business/acquisition/types.ts +7 -8
  17. package/src/knowledge/queries.ts +0 -1
  18. package/src/organization-model/__tests__/content-kinds-registry.test.ts +35 -210
  19. package/src/organization-model/__tests__/defaults.test.ts +4 -4
  20. package/src/organization-model/__tests__/domains/actions.test.ts +12 -36
  21. package/src/organization-model/__tests__/domains/offerings.test.ts +13 -6
  22. package/src/organization-model/__tests__/domains/resources.test.ts +497 -350
  23. package/src/organization-model/__tests__/domains/systems.test.ts +6 -7
  24. package/src/organization-model/__tests__/flatten-additive-merge.test.ts +68 -80
  25. package/src/organization-model/__tests__/foundation.test.ts +81 -14
  26. package/src/organization-model/__tests__/graph.test.ts +662 -694
  27. package/src/organization-model/__tests__/knowledge.test.ts +31 -17
  28. package/src/organization-model/__tests__/lookup-helpers.test.ts +128 -438
  29. package/src/organization-model/__tests__/migration-helpers.test.ts +362 -591
  30. package/src/organization-model/__tests__/prospecting-ssot.test.ts +68 -103
  31. package/src/organization-model/__tests__/published-zero-leak.test.ts +17 -0
  32. package/src/organization-model/__tests__/recursive-system-schema.test.ts +159 -532
  33. package/src/organization-model/__tests__/resolve.test.ts +79 -42
  34. package/src/organization-model/__tests__/schema.test.ts +65 -56
  35. package/src/organization-model/catalogs/lead-gen.ts +0 -103
  36. package/src/organization-model/defaults.ts +17 -702
  37. package/src/organization-model/domains/actions.ts +116 -333
  38. package/src/organization-model/domains/knowledge.ts +15 -7
  39. package/src/organization-model/domains/projects.ts +4 -4
  40. package/src/organization-model/domains/prospecting.ts +405 -395
  41. package/src/organization-model/domains/resources.ts +206 -135
  42. package/src/organization-model/domains/sales.ts +5 -5
  43. package/src/organization-model/domains/systems.ts +8 -23
  44. package/src/organization-model/graph/build.ts +223 -294
  45. package/src/organization-model/graph/schema.ts +2 -3
  46. package/src/organization-model/graph/types.ts +12 -14
  47. package/src/organization-model/helpers.ts +130 -218
  48. package/src/organization-model/index.ts +104 -124
  49. package/src/organization-model/migration-helpers.ts +211 -249
  50. package/src/organization-model/ontology.ts +0 -60
  51. package/src/organization-model/organization-graph.mdx +4 -5
  52. package/src/organization-model/organization-model.mdx +1 -1
  53. package/src/organization-model/published.ts +236 -226
  54. package/src/organization-model/resolve.ts +4 -5
  55. package/src/organization-model/schema.ts +610 -704
  56. package/src/organization-model/types.ts +167 -161
  57. package/src/platform/registry/__tests__/validation.test.ts +23 -0
  58. package/src/platform/registry/validation.ts +13 -2
  59. package/src/reference/_generated/contracts.md +14 -2
  60. package/src/organization-model/content-kinds/config.ts +0 -36
  61. package/src/organization-model/content-kinds/index.ts +0 -78
  62. package/src/organization-model/content-kinds/pipeline.ts +0 -68
  63. package/src/organization-model/content-kinds/registry.ts +0 -44
  64. package/src/organization-model/content-kinds/status.ts +0 -71
  65. package/src/organization-model/content-kinds/template.ts +0 -83
  66. package/src/organization-model/content-kinds/types.ts +0 -117
@@ -1,26 +1,22 @@
1
- import type { OrganizationModel, OrganizationModelSystemEntry } from './types'
2
- import type { ContentNode } from './content-kinds/types'
3
- import type { JsonValue } from './domains/systems'
4
- import type { ResourceEntry } from './domains/resources'
5
- import type { OmTopologyRelationship } from './domains/topology'
6
-
7
- // W1A has landed: ContentNode and SystemEntry (with content + subsystems) are now
8
- // defined in their canonical locations.
1
+ import type { OrganizationModel, OrganizationModelSystemEntry } from './types'
2
+ import type { JsonValue } from './domains/systems'
3
+ import type { ResourceEntry } from './domains/resources'
4
+ import type { OmTopologyRelationship } from './domains/topology'
5
+
9
6
  // Phase 4: removed locally-scoped inferred types for deleted compound-domain schemas
10
7
  // (SalesPipeline, ProspectingBuildTemplate, etc.). migration-helpers.ts imports them directly.
11
8
 
12
9
  /**
13
- * SystemEntry extended with the recursive tree slots (`content`, `subsystems`).
10
+ * SystemEntry extended with the recursive tree slots (`systems`, `subsystems`).
14
11
  * `OrganizationModelSystemEntry` is inferred from `SystemEntrySchema: ZodType<SystemEntry>`
15
12
  * so it already carries these fields; this alias re-exports it under the tree-walker name
16
13
  * for clarity at call sites.
17
14
  */
18
- export type { ContentNode }
19
- export type SystemEntryWithTree = OrganizationModelSystemEntry
20
-
21
- function childSystemsOf(system: SystemEntryWithTree): Record<string, SystemEntryWithTree> {
22
- return system.systems ?? system.subsystems ?? {}
23
- }
15
+ export type SystemEntryWithTree = OrganizationModelSystemEntry
16
+
17
+ function childSystemsOf(system: SystemEntryWithTree): Record<string, SystemEntryWithTree> {
18
+ return system.systems ?? system.subsystems ?? {}
19
+ }
24
20
 
25
21
  export function defaultPathFor(id: string): string {
26
22
  return `/${id.replaceAll('.', '/')}`
@@ -131,11 +127,11 @@ export function getSystem(model: OrganizationModel, path: string): SystemEntryWi
131
127
  // to SystemEntryWithTree (which extends it with optional content + subsystems).
132
128
  let current: Record<string, SystemEntryWithTree> = model.systems as Record<string, SystemEntryWithTree>
133
129
  let node: SystemEntryWithTree | undefined
134
- for (const seg of segments) {
135
- node = current[seg]
136
- if (node === undefined) return undefined
137
- current = childSystemsOf(node)
138
- }
130
+ for (const seg of segments) {
131
+ node = current[seg]
132
+ if (node === undefined) return undefined
133
+ current = childSystemsOf(node)
134
+ }
139
135
  return node
140
136
  }
141
137
 
@@ -152,11 +148,11 @@ export function getSystemAncestors(model: OrganizationModel, path: string): Syst
152
148
  const result: SystemEntryWithTree[] = []
153
149
  let current: Record<string, SystemEntryWithTree> = model.systems as Record<string, SystemEntryWithTree>
154
150
  for (const seg of segments) {
155
- const node = current[seg]
156
- if (node === undefined) return []
157
- result.push(node)
158
- current = childSystemsOf(node)
159
- }
151
+ const node = current[seg]
152
+ if (node === undefined) return []
153
+ result.push(node)
154
+ current = childSystemsOf(node)
155
+ }
160
156
  return result
161
157
  }
162
158
 
@@ -172,133 +168,49 @@ export function listAllSystems(model: OrganizationModel): Array<{ path: string;
172
168
 
173
169
  function walk(map: Record<string, SystemEntryWithTree>, prefix: string): void {
174
170
  for (const [localId, system] of Object.entries(map)) {
175
- const fullPath = prefix ? `${prefix}.${localId}` : localId
176
- results.push({ path: fullPath, system })
177
- const childSystems = childSystemsOf(system)
178
- if (Object.keys(childSystems).length > 0) {
179
- walk(childSystems, fullPath)
180
- }
181
- }
182
- }
171
+ const fullPath = prefix ? `${prefix}.${localId}` : localId
172
+ results.push({ path: fullPath, system })
173
+ const childSystems = childSystemsOf(system)
174
+ if (Object.keys(childSystems).length > 0) {
175
+ walk(childSystems, fullPath)
176
+ }
177
+ }
178
+ }
183
179
 
184
180
  walk(model.systems as Record<string, SystemEntryWithTree>, '')
185
181
  return results
186
182
  }
187
183
 
188
- /**
189
- * Resolve a content node by its qualified id (`<system-path>:<local-content-id>`).
190
- *
191
- * `getContent(model, 'sales.crm:default-pipeline')` resolves the `sales.crm`
192
- * system and then looks up `system.content['default-pipeline']`.
193
- *
194
- * Returns `undefined` if the system or local id is not found, or if the
195
- * qualified id does not contain exactly one `:` separator.
196
- */
197
- export function getContent(model: OrganizationModel, qualifiedId: string): ContentNode | undefined {
198
- const colonIndex = qualifiedId.indexOf(':')
199
- if (colonIndex === -1) return undefined
200
- const systemPath = qualifiedId.slice(0, colonIndex)
201
- const localId = qualifiedId.slice(colonIndex + 1)
202
- if (!systemPath || !localId) return undefined
203
- const system = getSystem(model, systemPath)
204
- return system?.content?.[localId]
184
+
185
+ function isPlainJsonObject(value: JsonValue | undefined): value is Record<string, JsonValue> {
186
+ return typeof value === 'object' && value !== null && !Array.isArray(value)
205
187
  }
206
188
 
207
- /**
208
- * Resolve the layered content view for a system.
209
- *
210
- * Returns:
211
- * - `own`: the system's direct `content` map (empty record if none).
212
- * - `inherited`: ancestor content nodes that are NOT shadowed by `own` or by a
213
- * closer ancestor (depth-wins cascade, same as CSS specificity).
214
- *
215
- * Shadow rule: if two ancestors both declare `content['x']`, the deeper one
216
- * wins. If the system itself declares `content['x']`, neither ancestor entry
217
- * for `'x'` appears in `inherited`.
218
- *
219
- * `resolveSystemContent(model, 'sales.crm')` with both `sales.content['x']`
220
- * and `sales.crm.content['x']` defined → `own` contains `'x'`, `inherited`
221
- * contains NO entry for `'x'` from `sales`.
222
- */
223
- export function resolveSystemContent(
224
- model: OrganizationModel,
225
- path: string
226
- ): { own: Record<string, ContentNode>; inherited: Array<{ fromPath: string; node: ContentNode; localId: string }> } {
227
- const ancestors = getSystemAncestors(model, path)
228
- if (ancestors.length === 0) return { own: {}, inherited: [] }
229
-
230
- const system = ancestors[ancestors.length - 1]
231
- const own: Record<string, ContentNode> = { ...(system.content ?? {}) }
232
-
233
- // Collect ancestor entries depth-first (deepest ancestor first, excluding self).
234
- // We reconstruct paths for each ancestor by slicing the path segments.
235
- const segments = path.split('.')
236
- const shadowedIds = new Set(Object.keys(own))
237
- const inherited: Array<{ fromPath: string; node: ContentNode; localId: string }> = []
238
-
239
- // Iterate ancestors from deepest-parent to root so deeper wins.
240
- for (let i = ancestors.length - 2; i >= 0; i--) {
241
- const ancestor = ancestors[i]
242
- const ancestorPath = segments.slice(0, i + 1).join('.')
243
- const contentMap = ancestor.content ?? {}
244
- for (const [localId, node] of Object.entries(contentMap)) {
245
- if (!shadowedIds.has(localId)) {
246
- shadowedIds.add(localId)
247
- inherited.push({ fromPath: ancestorPath, node, localId })
248
- }
249
- }
189
+ function mergeJsonConfig(
190
+ base: Record<string, JsonValue>,
191
+ override: Record<string, JsonValue>
192
+ ): Record<string, JsonValue> {
193
+ const result: Record<string, JsonValue> = { ...base }
194
+
195
+ for (const [key, value] of Object.entries(override)) {
196
+ const existing = result[key]
197
+ result[key] =
198
+ isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value
250
199
  }
251
200
 
252
- // Re-order inherited so shallower ancestors come first (root-first display order).
253
- inherited.reverse()
254
-
255
- return { own, inherited }
256
- }
257
-
258
- function isPlainJsonObject(value: JsonValue | undefined): value is Record<string, JsonValue> {
259
- return typeof value === 'object' && value !== null && !Array.isArray(value)
260
- }
261
-
262
- function mergeJsonConfig(
263
- base: Record<string, JsonValue>,
264
- override: Record<string, JsonValue>
265
- ): Record<string, JsonValue> {
266
- const result: Record<string, JsonValue> = { ...base }
267
-
268
- for (const [key, value] of Object.entries(override)) {
269
- const existing = result[key]
270
- result[key] =
271
- isPlainJsonObject(existing) && isPlainJsonObject(value) ? mergeJsonConfig(existing, value) : value
272
- }
273
-
274
- return result
275
- }
276
-
277
- /**
278
- * Resolve a system's effective local config.
279
- *
280
- * Bridge-era `content` entries with `(kind, type) === ('config', 'kv')` are
281
- * projected first, then first-class `system.config` overlays them. This keeps
282
- * direct config authoring authoritative while continuing to read old content.
283
- */
284
- export function resolveSystemConfig(model: OrganizationModel, path: string): Record<string, JsonValue> {
285
- const system = getSystem(model, path)
286
- if (system === undefined) return {}
287
-
288
- let resolved: Record<string, JsonValue> = {}
289
- for (const node of Object.values(system.content ?? {})) {
290
- if (node.kind !== 'config' || node.type !== 'kv') continue
291
- const entries = node.data?.entries
292
- if (isPlainJsonObject(entries as JsonValue)) {
293
- resolved = mergeJsonConfig(resolved, entries as Record<string, JsonValue>)
294
- }
295
- }
296
-
297
- return mergeJsonConfig(resolved, system.config ?? {})
298
- }
299
-
300
- /**
301
- * Return all resources whose `systemPath` belongs to the given system.
201
+ return result
202
+ }
203
+
204
+ /** Resolve a system's effective local config from first-class `System.config`. */
205
+ export function resolveSystemConfig(model: OrganizationModel, path: string): Record<string, JsonValue> {
206
+ const system = getSystem(model, path)
207
+ if (system === undefined) return {}
208
+
209
+ return mergeJsonConfig({}, system.config ?? {})
210
+ }
211
+
212
+ /**
213
+ * Return all resources whose `systemPath` belongs to the given system.
302
214
  *
303
215
  * When `includeDescendants` is false (default), only resources whose
304
216
  * `systemPath` exactly matches `systemPath` are returned.
@@ -315,80 +227,80 @@ export function resolveSystemConfig(model: OrganizationModel, path: string): Rec
315
227
  * getResourcesForSystem(model, 'sales', { includeDescendants: true })
316
228
  * // → resources where systemPath === 'sales' OR systemPath starts with 'sales.'
317
229
  */
318
- export function getResourcesForSystem(
319
- model: OrganizationModel,
320
- systemPath: string,
321
- options: { includeDescendants?: boolean } = {}
322
- ): ResourceEntry[] {
230
+ export function getResourcesForSystem(
231
+ model: OrganizationModel,
232
+ systemPath: string,
233
+ options: { includeDescendants?: boolean } = {}
234
+ ): ResourceEntry[] {
323
235
  const { includeDescendants = false } = options
324
236
  const prefix = systemPath + '.'
325
- return Object.values(model.resources ?? {}).filter(
326
- (r) => r.systemPath === systemPath || (includeDescendants && r.systemPath.startsWith(prefix))
327
- )
328
- }
329
-
330
- export interface SystemTopologyEdge {
331
- id: string
332
- relationship: OmTopologyRelationship
333
- }
334
-
335
- export interface SystemDeprecationDependents {
336
- resources: ResourceEntry[]
337
- topologyEdges: SystemTopologyEdge[]
338
- }
339
-
340
- function systemPathIsInScope(candidate: string, systemPath: string, includeDescendants: boolean): boolean {
341
- return candidate === systemPath || (includeDescendants && candidate.startsWith(`${systemPath}.`))
342
- }
343
-
344
- function topologyRelationshipTouchesSystem(
345
- relationship: OmTopologyRelationship,
346
- systemPath: string,
347
- resourceIds: Set<string>,
348
- includeDescendants: boolean
349
- ): boolean {
350
- if (
351
- relationship.systemPath !== undefined &&
352
- systemPathIsInScope(relationship.systemPath, systemPath, includeDescendants)
353
- ) {
354
- return true
355
- }
356
-
357
- for (const ref of [relationship.from, relationship.to]) {
358
- if (ref.kind === 'system' && systemPathIsInScope(ref.id, systemPath, includeDescendants)) return true
359
- if (ref.kind === 'resource' && resourceIds.has(ref.id)) return true
360
- }
361
-
362
- return false
363
- }
364
-
365
- export function getTopologyEdgesForSystem(
366
- model: OrganizationModel,
367
- systemPath: string,
368
- options: { includeDescendants?: boolean; resourceIds?: Iterable<string> } = {}
369
- ): SystemTopologyEdge[] {
370
- const { includeDescendants = false } = options
371
- const resourceIds = new Set(
372
- options.resourceIds ?? getResourcesForSystem(model, systemPath, { includeDescendants }).map((r) => r.id)
373
- )
374
-
375
- return Object.entries(model.topology?.relationships ?? {})
376
- .filter(([, relationship]) =>
377
- topologyRelationshipTouchesSystem(relationship, systemPath, resourceIds, includeDescendants)
378
- )
379
- .map(([id, relationship]) => ({ id, relationship }))
380
- }
381
-
382
- export function getSystemDeprecationDependents(
383
- model: OrganizationModel,
384
- systemPath: string,
385
- options: { includeDescendants?: boolean } = {}
386
- ): SystemDeprecationDependents {
387
- const resources = getResourcesForSystem(model, systemPath, options).filter((resource) => resource.status === 'active')
388
- const resourceIds = new Set(resources.map((resource) => resource.id))
389
-
390
- return {
391
- resources,
392
- topologyEdges: getTopologyEdgesForSystem(model, systemPath, { ...options, resourceIds })
393
- }
394
- }
237
+ return Object.values(model.resources ?? {}).filter(
238
+ (r) => r.systemPath === systemPath || (includeDescendants && r.systemPath.startsWith(prefix))
239
+ )
240
+ }
241
+
242
+ export interface SystemTopologyEdge {
243
+ id: string
244
+ relationship: OmTopologyRelationship
245
+ }
246
+
247
+ export interface SystemDeprecationDependents {
248
+ resources: ResourceEntry[]
249
+ topologyEdges: SystemTopologyEdge[]
250
+ }
251
+
252
+ function systemPathIsInScope(candidate: string, systemPath: string, includeDescendants: boolean): boolean {
253
+ return candidate === systemPath || (includeDescendants && candidate.startsWith(`${systemPath}.`))
254
+ }
255
+
256
+ function topologyRelationshipTouchesSystem(
257
+ relationship: OmTopologyRelationship,
258
+ systemPath: string,
259
+ resourceIds: Set<string>,
260
+ includeDescendants: boolean
261
+ ): boolean {
262
+ if (
263
+ relationship.systemPath !== undefined &&
264
+ systemPathIsInScope(relationship.systemPath, systemPath, includeDescendants)
265
+ ) {
266
+ return true
267
+ }
268
+
269
+ for (const ref of [relationship.from, relationship.to]) {
270
+ if (ref.kind === 'system' && systemPathIsInScope(ref.id, systemPath, includeDescendants)) return true
271
+ if (ref.kind === 'resource' && resourceIds.has(ref.id)) return true
272
+ }
273
+
274
+ return false
275
+ }
276
+
277
+ export function getTopologyEdgesForSystem(
278
+ model: OrganizationModel,
279
+ systemPath: string,
280
+ options: { includeDescendants?: boolean; resourceIds?: Iterable<string> } = {}
281
+ ): SystemTopologyEdge[] {
282
+ const { includeDescendants = false } = options
283
+ const resourceIds = new Set(
284
+ options.resourceIds ?? getResourcesForSystem(model, systemPath, { includeDescendants }).map((r) => r.id)
285
+ )
286
+
287
+ return Object.entries(model.topology?.relationships ?? {})
288
+ .filter(([, relationship]) =>
289
+ topologyRelationshipTouchesSystem(relationship, systemPath, resourceIds, includeDescendants)
290
+ )
291
+ .map(([id, relationship]) => ({ id, relationship }))
292
+ }
293
+
294
+ export function getSystemDeprecationDependents(
295
+ model: OrganizationModel,
296
+ systemPath: string,
297
+ options: { includeDescendants?: boolean } = {}
298
+ ): SystemDeprecationDependents {
299
+ const resources = getResourcesForSystem(model, systemPath, options).filter((resource) => resource.status === 'active')
300
+ const resourceIds = new Set(resources.map((resource) => resource.id))
301
+
302
+ return {
303
+ resources,
304
+ topologyEdges: getTopologyEdgesForSystem(model, systemPath, { ...options, resourceIds })
305
+ }
306
+ }
@@ -1,135 +1,115 @@
1
- export * from './content-kinds/index'
2
1
  export * from './schema'
3
2
  export * from './types'
4
3
  export * from './ontology'
5
4
  export * from './contracts'
6
- export {
7
- ORGANIZATION_MODEL_ICON_TOKENS,
8
- OrganizationModelBuiltinIconTokenSchema,
9
- OrganizationModelIconTokenSchema
10
- } from './icons'
11
- export * from './defaults'
12
- export * from './resolve'
13
- export * from './foundation'
14
- export * from './surface-projection'
15
- export * from './helpers'
5
+ export {
6
+ ORGANIZATION_MODEL_ICON_TOKENS,
7
+ OrganizationModelBuiltinIconTokenSchema,
8
+ OrganizationModelIconTokenSchema
9
+ } from './icons'
10
+ export * from './defaults'
11
+ export * from './resolve'
12
+ export * from './foundation'
13
+ export * from './surface-projection'
14
+ export * from './helpers'
16
15
  export * from './migration-helpers'
17
16
  export * from './scaffolders'
18
17
  export * from './graph'
19
- export * from './catalogs/lead-gen'
20
- export * from './domains/branding'
21
- // Phase 4: OrganizationModelSalesSchema, OrganizationModelProspectingSchema,
22
- // OrganizationModelProjectsSchema removed. Business-logic exports (StatefulPipelineDefinition,
23
- // CRM_PIPELINE_DEFINITION, ProspectingBuildTemplateSchema, etc.) still re-exported below.
24
- export {
25
- SalesStageSemanticClassSchema,
26
- SalesStageSchema,
27
- SalesPipelineSchema,
28
- CRM_DISCOVERY_REPLIED_STATE,
29
- CRM_DISCOVERY_LINK_SENT_STATE,
30
- CRM_DISCOVERY_NUDGING_STATE,
31
- CRM_DISCOVERY_BOOKING_CANCELLED_STATE,
32
- CRM_REPLY_SENT_STATE,
33
- CRM_FOLLOWUP_1_SENT_STATE,
34
- CRM_FOLLOWUP_2_SENT_STATE,
35
- CRM_FOLLOWUP_3_SENT_STATE,
36
- CRM_PIPELINE_DEFINITION,
37
- CRM_PRIORITY_BUCKETS,
38
- DEFAULT_CRM_PRIORITY_RULE_CONFIG,
39
- DEFAULT_CRM_NEXT_ACTION_RULE_CONFIG,
40
- ACQ_LIST_MEMBERS_LEAD_GEN_PIPELINE,
41
- ACQ_LIST_COMPANIES_LEAD_GEN_PIPELINE,
42
- LEAD_GEN_PIPELINE_DEFINITIONS,
43
- findPipeline,
44
- getValidStatesForStage,
45
- LEAD_GEN_STAGE_CATALOG
46
- } from './domains/sales'
47
- export type {
48
- StatefulStateDefinition,
49
- StatefulStageDefinition,
50
- StatefulPipelineDefinition,
51
- CrmPriorityBucketKey,
52
- CrmPriorityBucketDefinition,
53
- CrmPriorityRuleConfig,
54
- CrmNextActionMapping,
55
- CrmNextActionRuleConfig
56
- } from './domains/sales'
57
- export {
58
- ProspectingLifecycleStageSchema,
59
- RecordColumnConfigSchema,
60
- RecordColumnsConfigSchema,
61
- CredentialRequirementSchema,
62
- ProspectingBuildTemplateStepSchema,
63
- ProspectingBuildTemplateSchema,
64
- PROSPECTING_STEPS,
65
- ACTION_REGISTRY,
66
- findActionById
67
- } from './domains/prospecting'
68
- export type {
69
- ListBuilderStep,
70
- RecordColumnConfig,
71
- CredentialRequirement,
72
- TemplateName,
73
- StepName,
74
- ActionRegistry
75
- } from './domains/prospecting'
76
- export { ProjectsDomainStateSchema } from './domains/projects'
18
+ export * from './catalogs/lead-gen'
19
+ export * from './domains/branding'
20
+ // Phase 4: OrganizationModelSalesSchema, OrganizationModelProspectingSchema,
21
+ // OrganizationModelProjectsSchema removed. Business-logic exports (StatefulPipelineDefinition,
22
+ // ProspectingBuildTemplateSchema, StatefulPipelineDefinition, etc.) still re-exported below.
23
+ export {
24
+ SalesStageSemanticClassSchema,
25
+ SalesStageSchema,
26
+ SalesPipelineSchema,
27
+ findPipeline,
28
+ getValidStatesForStage
29
+ } from './domains/sales'
30
+ export type {
31
+ StatefulStateDefinition,
32
+ StatefulStageDefinition,
33
+ StatefulPipelineDefinition,
34
+ CrmPriorityBucketKey,
35
+ CrmPriorityBucketDefinition,
36
+ CrmPriorityRuleConfig,
37
+ CrmNextActionMapping,
38
+ CrmNextActionRuleConfig
39
+ } from './domains/sales'
40
+ export {
41
+ ProspectingLifecycleStageSchema,
42
+ RecordColumnConfigSchema,
43
+ RecordColumnsConfigSchema,
44
+ CredentialRequirementSchema,
45
+ ProspectingBuildTemplateStepSchema,
46
+ ProspectingBuildTemplateSchema,
47
+ ACTION_REGISTRY,
48
+ findActionById
49
+ } from './domains/prospecting'
50
+ export type {
51
+ ListBuilderStep,
52
+ RecordColumnConfig,
53
+ CredentialRequirement,
54
+ TemplateName,
55
+ StepName,
56
+ ActionRegistry
57
+ } from './domains/prospecting'
58
+ export { ProjectsDomainStateSchema } from './domains/projects'
77
59
  export * from './domains/systems'
78
60
  export * from './domains/resources'
79
61
  export * from './domains/topology'
80
62
  export {
81
- DEFAULT_ORGANIZATION_MODEL_NAVIGATION,
82
- getSortedSidebarEntries,
83
- NavigationGroupSchema,
84
- OrganizationModelNavigationSchema,
85
- SidebarNavigationSchema,
86
- SidebarNodeSchema,
87
- SidebarSectionSchema,
88
- SidebarSurfaceTargetsSchema,
89
- SurfaceDefinitionSchema,
90
- SurfaceTypeSchema
91
- } from './domains/navigation'
92
- export {
93
- EntitiesDomainSchema,
94
- EntityIdSchema,
95
- EntityLinkKindSchema,
96
- EntityLinkSchema,
97
- EntitySchema
98
- } from './domains/entities'
99
- export {
100
- KnowledgeDomainSchema,
101
- KnowledgeLinkSchema,
102
- KnowledgeTargetKindSchema,
103
- KnowledgeTargetRefSchema,
104
- OrgKnowledgeKindSchema,
105
- OrgKnowledgeNodeSchema
106
- } from './domains/knowledge'
107
- export * from './domains/roles'
108
- export * from './domains/identity'
109
- export * from './domains/policies'
110
- export {
111
- ActionsDomainSchema,
112
- ActionIdSchema,
113
- ActionInvocationKindSchema,
114
- ActionInvocationSchema,
115
- ActionRefSchema,
116
- ActionSchema,
117
- ActionScopeSchema,
118
- ApiEndpointInvocationSchema,
119
- CRM_ACTION_ENTRIES,
120
- DEFAULT_ORGANIZATION_MODEL_ACTIONS,
121
- findOrganizationActionById,
122
- LEAD_GEN_ACTION_ENTRIES,
123
- McpToolInvocationSchema,
124
- ScriptExecutionInvocationSchema,
125
- SlashCommandInvocationSchema
126
- } from './domains/actions'
127
- export type {
128
- ActionsDomain,
129
- Action as OrganizationAction,
130
- ActionId,
131
- ActionInvocation,
132
- ActionInvocationKind,
133
- ActionRef,
134
- ActionScope
135
- } from './domains/actions'
63
+ DEFAULT_ORGANIZATION_MODEL_NAVIGATION,
64
+ getSortedSidebarEntries,
65
+ NavigationGroupSchema,
66
+ OrganizationModelNavigationSchema,
67
+ SidebarNavigationSchema,
68
+ SidebarNodeSchema,
69
+ SidebarSectionSchema,
70
+ SidebarSurfaceTargetsSchema,
71
+ SurfaceDefinitionSchema,
72
+ SurfaceTypeSchema
73
+ } from './domains/navigation'
74
+ export {
75
+ EntitiesDomainSchema,
76
+ EntityIdSchema,
77
+ EntityLinkKindSchema,
78
+ EntityLinkSchema,
79
+ EntitySchema
80
+ } from './domains/entities'
81
+ export {
82
+ KnowledgeDomainSchema,
83
+ KnowledgeLinkSchema,
84
+ KnowledgeTargetKindSchema,
85
+ KnowledgeTargetRefSchema,
86
+ OrgKnowledgeKindSchema,
87
+ OrgKnowledgeNodeSchema
88
+ } from './domains/knowledge'
89
+ export * from './domains/roles'
90
+ export * from './domains/identity'
91
+ export * from './domains/policies'
92
+ export {
93
+ ActionsDomainSchema,
94
+ ActionIdSchema,
95
+ ActionInvocationKindSchema,
96
+ ActionInvocationSchema,
97
+ ActionRefSchema,
98
+ ActionSchema,
99
+ ActionScopeSchema,
100
+ ApiEndpointInvocationSchema,
101
+ DEFAULT_ORGANIZATION_MODEL_ACTIONS,
102
+ findOrganizationActionById,
103
+ McpToolInvocationSchema,
104
+ ScriptExecutionInvocationSchema,
105
+ SlashCommandInvocationSchema
106
+ } from './domains/actions'
107
+ export type {
108
+ ActionsDomain,
109
+ Action as OrganizationAction,
110
+ ActionId,
111
+ ActionInvocation,
112
+ ActionInvocationKind,
113
+ ActionRef,
114
+ ActionScope
115
+ } from './domains/actions'