@elevasis/core 0.25.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +171 -90
- package/dist/index.js +377 -1541
- package/dist/knowledge/index.d.ts +48 -59
- package/dist/knowledge/index.js +1 -1
- package/dist/organization-model/index.d.ts +171 -90
- package/dist/organization-model/index.js +377 -1541
- package/dist/test-utils/index.d.ts +25 -33
- package/dist/test-utils/index.js +250 -1357
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +990 -1065
- package/src/business/acquisition/api-schemas.test.ts +1996 -1882
- package/src/business/acquisition/api-schemas.ts +1478 -1502
- package/src/business/acquisition/crm-next-action.test.ts +45 -25
- package/src/business/acquisition/crm-next-action.ts +227 -220
- package/src/business/acquisition/crm-priority.test.ts +41 -8
- package/src/business/acquisition/crm-priority.ts +365 -349
- package/src/business/acquisition/crm-state-actions.test.ts +208 -153
- package/src/business/acquisition/derive-actions.test.ts +101 -34
- package/src/business/acquisition/derive-actions.ts +8 -92
- package/src/business/acquisition/ontology-validation.ts +76 -162
- package/src/business/acquisition/types.ts +7 -8
- package/src/business/pdf/sections/investment.ts +1 -1
- package/src/business/pdf/sections/summary-investment.ts +1 -1
- package/src/execution/engine/tools/tool-maps.ts +872 -831
- package/src/knowledge/queries.ts +0 -1
- package/src/organization-model/__tests__/content-kinds-registry.test.ts +35 -210
- package/src/organization-model/__tests__/cross-ref.test.ts +167 -0
- package/src/organization-model/__tests__/defaults.test.ts +4 -4
- package/src/organization-model/__tests__/domains/actions.test.ts +12 -36
- package/src/organization-model/__tests__/domains/offerings.test.ts +13 -6
- package/src/organization-model/__tests__/domains/resources.test.ts +497 -350
- package/src/organization-model/__tests__/domains/systems.test.ts +6 -7
- package/src/organization-model/__tests__/flatten-additive-merge.test.ts +68 -80
- package/src/organization-model/__tests__/foundation.test.ts +81 -14
- package/src/organization-model/__tests__/graph.test.ts +662 -694
- package/src/organization-model/__tests__/knowledge.test.ts +31 -17
- package/src/organization-model/__tests__/lookup-helpers.test.ts +128 -438
- package/src/organization-model/__tests__/migration-helpers.test.ts +362 -591
- package/src/organization-model/__tests__/prospecting-ssot.test.ts +68 -103
- package/src/organization-model/__tests__/published-zero-leak.test.ts +76 -0
- package/src/organization-model/__tests__/recursive-system-schema.test.ts +159 -532
- package/src/organization-model/__tests__/resolve.test.ts +79 -42
- package/src/organization-model/__tests__/schema-refinements.test.ts +72 -0
- package/src/organization-model/__tests__/schema.test.ts +65 -56
- package/src/organization-model/catalogs/lead-gen.ts +0 -103
- package/src/organization-model/cross-ref.ts +175 -0
- package/src/organization-model/defaults.ts +17 -702
- package/src/organization-model/domains/actions.ts +116 -333
- package/src/organization-model/domains/branding.ts +6 -6
- package/src/organization-model/domains/knowledge.ts +15 -7
- package/src/organization-model/domains/projects.ts +4 -4
- package/src/organization-model/domains/prospecting.ts +405 -395
- package/src/organization-model/domains/resources.ts +206 -135
- package/src/organization-model/domains/sales.test.ts +104 -218
- package/src/organization-model/domains/sales.ts +217 -380
- package/src/organization-model/domains/systems.ts +8 -23
- package/src/organization-model/graph/build.ts +223 -294
- package/src/organization-model/graph/schema.ts +2 -3
- package/src/organization-model/graph/types.ts +12 -14
- package/src/organization-model/helpers.ts +130 -218
- package/src/organization-model/index.ts +105 -124
- package/src/organization-model/migration-helpers.ts +211 -249
- package/src/organization-model/ontology.ts +0 -60
- package/src/organization-model/organization-graph.mdx +4 -5
- package/src/organization-model/organization-model.mdx +1 -1
- package/src/organization-model/published.ts +236 -226
- package/src/organization-model/resolve.ts +4 -5
- package/src/organization-model/schema-refinements.ts +667 -0
- package/src/organization-model/schema.ts +88 -889
- package/src/organization-model/types.ts +167 -161
- package/src/platform/registry/__tests__/validation.test.ts +23 -0
- package/src/platform/registry/validation.ts +13 -2
- package/src/reference/_generated/contracts.md +990 -1065
- package/src/organization-model/content-kinds/config.ts +0 -36
- package/src/organization-model/content-kinds/index.ts +0 -78
- package/src/organization-model/content-kinds/pipeline.ts +0 -68
- package/src/organization-model/content-kinds/registry.ts +0 -44
- package/src/organization-model/content-kinds/status.ts +0 -71
- package/src/organization-model/content-kinds/template.ts +0 -83
- package/src/organization-model/content-kinds/types.ts +0 -117
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
PathSchema,
|
|
10
10
|
ReferenceIdsSchema
|
|
11
11
|
} from './shared'
|
|
12
|
-
import { ContentNodeSchema } from '../content-kinds/types'
|
|
13
12
|
import { OntologyScopeSchema, type OntologyScope } from '../ontology'
|
|
14
13
|
|
|
15
14
|
// ---------------------------------------------------------------------------
|
|
@@ -48,12 +47,11 @@ export const NodeIdStringSchema = z
|
|
|
48
47
|
.trim()
|
|
49
48
|
.min(1)
|
|
50
49
|
.max(200)
|
|
51
|
-
//
|
|
52
|
-
// qualified content-node references ('content-node:sales.crm:default-pipeline').
|
|
50
|
+
// Kind prefix allows hyphens; id allows scoped references such as ontology targets.
|
|
53
51
|
.regex(
|
|
54
52
|
/^[a-z][a-z-]*:([a-z0-9-]+)(\.[a-z0-9-]+)*(:[a-z0-9.-]+)*$/,
|
|
55
|
-
'Node references must use kind:dotted-path (e.g. system:sales.crm or
|
|
56
|
-
)
|
|
53
|
+
'Node references must use kind:dotted-path (e.g. system:sales.crm or resource:lead-gen.company.qualify)'
|
|
54
|
+
)
|
|
57
55
|
|
|
58
56
|
export const SystemUiSchema = z.object({
|
|
59
57
|
path: PathSchema,
|
|
@@ -72,8 +70,6 @@ export const SystemUiSchema = z.object({
|
|
|
72
70
|
// the declared interface instead of trying to infer through the cycle.
|
|
73
71
|
// ---------------------------------------------------------------------------
|
|
74
72
|
|
|
75
|
-
import type { ContentNode } from '../content-kinds/types'
|
|
76
|
-
|
|
77
73
|
export type JsonPrimitive = string | number | boolean | null
|
|
78
74
|
export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue }
|
|
79
75
|
|
|
@@ -121,16 +117,11 @@ export interface SystemEntry {
|
|
|
121
117
|
config?: Record<string, JsonValue>
|
|
122
118
|
ontology?: OntologyScope
|
|
123
119
|
systems?: Record<string, SystemEntry>
|
|
124
|
-
/**
|
|
125
|
-
* @deprecated Compatibility-only bridge for old tenant data and migration readers.
|
|
126
|
-
* Author new semantic catalogs in `ontology` and local settings in `config`.
|
|
127
|
-
*/
|
|
128
|
-
content?: Record<string, ContentNode>
|
|
129
120
|
subsystems?: Record<string, SystemEntry>
|
|
130
121
|
}
|
|
131
122
|
|
|
132
|
-
export const SystemEntrySchema: ZodType<SystemEntry> = z
|
|
133
|
-
.object({
|
|
123
|
+
export const SystemEntrySchema: ZodType<SystemEntry> = z
|
|
124
|
+
.object({
|
|
134
125
|
/** Stable tenant-defined system id (e.g. "sys.lead-gen" or "sales.crm"). */
|
|
135
126
|
id: SystemIdSchema,
|
|
136
127
|
/** Human-readable system label shown in UI, governance, and operations surfaces. */
|
|
@@ -195,14 +186,7 @@ export const SystemEntrySchema: ZodType<SystemEntry> = z
|
|
|
195
186
|
*/
|
|
196
187
|
ontology: OntologyScopeSchema.optional(),
|
|
197
188
|
/**
|
|
198
|
-
*
|
|
199
|
-
* migration readers. New schema/catalog authoring belongs in ontology;
|
|
200
|
-
* new system-local settings belong in config. Bridge nodes are keyed by
|
|
201
|
-
* local NodeId and may still project to content-node:* graph IDs.
|
|
202
|
-
*/
|
|
203
|
-
content: z.record(z.string().trim().min(1).max(200), ContentNodeSchema).optional(),
|
|
204
|
-
/**
|
|
205
|
-
* Recursive child systems, authored via nesting (per L11).
|
|
189
|
+
* Recursive child systems, authored via nesting (per L11).
|
|
206
190
|
* The key is the local system id; the full path is computed by joining
|
|
207
191
|
* ancestor keys with `.` (e.g. parent key `'sales'` + child key `'crm'` → `'sales.crm'`).
|
|
208
192
|
* Per Phase 4: `id` and `parentSystemId` fields will be removed in favour of
|
|
@@ -212,7 +196,8 @@ export const SystemEntrySchema: ZodType<SystemEntry> = z
|
|
|
212
196
|
/** @deprecated Use systems. Accepted as a compatibility alias during the ontology bridge. */
|
|
213
197
|
subsystems: z.lazy(() => z.record(z.string().trim().min(1).max(100), SystemEntrySchema)).optional()
|
|
214
198
|
})
|
|
215
|
-
.
|
|
199
|
+
.strict()
|
|
200
|
+
.refine((system: SystemEntry) => system.label !== undefined || system.title !== undefined, {
|
|
216
201
|
path: ['label'],
|
|
217
202
|
message: 'System must provide label or title'
|
|
218
203
|
})
|