@elevasis/core 0.24.1 → 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.
- package/dist/index.d.ts +239 -86
- package/dist/index.js +474 -1346
- package/dist/knowledge/index.d.ts +57 -39
- package/dist/knowledge/index.js +1 -1
- package/dist/organization-model/index.d.ts +239 -86
- package/dist/organization-model/index.js +474 -1346
- package/dist/test-utils/index.d.ts +24 -31
- package/dist/test-utils/index.js +76 -1238
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +108 -96
- package/src/business/acquisition/api-schemas.test.ts +70 -77
- package/src/business/acquisition/api-schemas.ts +21 -42
- package/src/business/acquisition/derive-actions.test.ts +11 -21
- package/src/business/acquisition/derive-actions.ts +61 -14
- package/src/business/acquisition/ontology-validation.ts +4 -4
- package/src/business/acquisition/types.ts +7 -8
- package/src/execution/engine/llm/adapters/__tests__/openrouter.integration.test.ts +10 -10
- package/src/knowledge/__tests__/queries.test.ts +960 -546
- package/src/knowledge/format.ts +322 -100
- package/src/knowledge/index.ts +18 -5
- package/src/knowledge/queries.ts +1004 -240
- package/src/organization-model/__tests__/content-kinds-registry.test.ts +35 -210
- package/src/organization-model/__tests__/defaults.test.ts +4 -4
- package/src/organization-model/__tests__/deprecate-helpers.test.ts +71 -0
- 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 +17 -0
- package/src/organization-model/__tests__/recursive-system-schema.test.ts +159 -532
- package/src/organization-model/__tests__/resolve.test.ts +88 -49
- package/src/organization-model/__tests__/scaffolders.test.ts +93 -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/defaults.ts +17 -702
- package/src/organization-model/domains/actions.ts +116 -333
- 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.ts +5 -5
- 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 +120 -141
- package/src/organization-model/icons.ts +1 -0
- package/src/organization-model/index.ts +107 -126
- 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 +251 -228
- package/src/organization-model/resolve.ts +4 -5
- package/src/organization-model/scaffolders/helpers.ts +84 -0
- package/src/organization-model/scaffolders/index.ts +19 -0
- package/src/organization-model/scaffolders/scaffoldKnowledgeNode.ts +48 -0
- package/src/organization-model/scaffolders/scaffoldOntologyRecord.ts +38 -0
- package/src/organization-model/scaffolders/scaffoldResource.ts +59 -0
- package/src/organization-model/scaffolders/scaffoldSystem.ts +110 -0
- package/src/organization-model/scaffolders/types.ts +81 -0
- package/src/organization-model/schema.ts +610 -704
- package/src/organization-model/types.ts +167 -161
- package/src/platform/constants/versions.ts +1 -1
- package/src/platform/registry/__tests__/validation.test.ts +23 -0
- package/src/platform/registry/validation.ts +13 -2
- package/src/reference/_generated/contracts.md +108 -96
- package/src/reference/glossary.md +71 -69
- 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
|
@@ -3671,24 +3671,6 @@ declare const OntologyScopeSchema: z.ZodDefault<z.ZodObject<{
|
|
|
3671
3671
|
}, z.core.$strip>>;
|
|
3672
3672
|
type OntologyScope = z.infer<typeof OntologyScopeSchema>;
|
|
3673
3673
|
|
|
3674
|
-
/**
|
|
3675
|
-
* Placeholder discriminated union for ContentNode (Wave 1A).
|
|
3676
|
-
* Wave 2A wires concrete (kind, type) pairs via the registry.
|
|
3677
|
-
*
|
|
3678
|
-
* Per D2: unregistered (kind, type) pairs are allowed and pass through validation.
|
|
3679
|
-
* Per L14: every node carries BOTH `kind` and `type`.
|
|
3680
|
-
*/
|
|
3681
|
-
declare const ContentNodeSchema: z.ZodObject<{
|
|
3682
|
-
label: z.ZodString;
|
|
3683
|
-
description: z.ZodOptional<z.ZodString>;
|
|
3684
|
-
order: z.ZodOptional<z.ZodNumber>;
|
|
3685
|
-
parentContentId: z.ZodOptional<z.ZodString>;
|
|
3686
|
-
kind: z.ZodString;
|
|
3687
|
-
type: z.ZodString;
|
|
3688
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3689
|
-
}, z.core.$strip>;
|
|
3690
|
-
type ContentNode = z.infer<typeof ContentNodeSchema>;
|
|
3691
|
-
|
|
3692
3674
|
type JsonPrimitive = string | number | boolean | null;
|
|
3693
3675
|
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3694
3676
|
[key: string]: JsonValue;
|
|
@@ -3730,11 +3712,6 @@ interface SystemEntry {
|
|
|
3730
3712
|
config?: Record<string, JsonValue>;
|
|
3731
3713
|
ontology?: OntologyScope;
|
|
3732
3714
|
systems?: Record<string, SystemEntry>;
|
|
3733
|
-
/**
|
|
3734
|
-
* @deprecated Compatibility-only bridge for old tenant data and migration readers.
|
|
3735
|
-
* Author new semantic catalogs in `ontology` and local settings in `config`.
|
|
3736
|
-
*/
|
|
3737
|
-
content?: Record<string, ContentNode>;
|
|
3738
3715
|
subsystems?: Record<string, SystemEntry>;
|
|
3739
3716
|
}
|
|
3740
3717
|
|
|
@@ -4193,14 +4170,18 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4193
4170
|
writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4194
4171
|
usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4195
4172
|
emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4173
|
+
contract: z.ZodOptional<z.ZodObject<{
|
|
4174
|
+
input: z.ZodOptional<z.ZodString>;
|
|
4175
|
+
output: z.ZodOptional<z.ZodString>;
|
|
4176
|
+
}, z.core.$strip>>;
|
|
4196
4177
|
}, z.core.$strip>>;
|
|
4197
4178
|
codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4198
4179
|
path: z.ZodString;
|
|
4199
4180
|
role: z.ZodEnum<{
|
|
4200
|
-
schema: "schema";
|
|
4201
4181
|
config: "config";
|
|
4202
4182
|
entrypoint: "entrypoint";
|
|
4203
4183
|
handler: "handler";
|
|
4184
|
+
schema: "schema";
|
|
4204
4185
|
test: "test";
|
|
4205
4186
|
docs: "docs";
|
|
4206
4187
|
}>;
|
|
@@ -4239,14 +4220,18 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4239
4220
|
writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4240
4221
|
usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4241
4222
|
emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4223
|
+
contract: z.ZodOptional<z.ZodObject<{
|
|
4224
|
+
input: z.ZodOptional<z.ZodString>;
|
|
4225
|
+
output: z.ZodOptional<z.ZodString>;
|
|
4226
|
+
}, z.core.$strip>>;
|
|
4242
4227
|
}, z.core.$strip>>;
|
|
4243
4228
|
codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4244
4229
|
path: z.ZodString;
|
|
4245
4230
|
role: z.ZodEnum<{
|
|
4246
|
-
schema: "schema";
|
|
4247
4231
|
config: "config";
|
|
4248
4232
|
entrypoint: "entrypoint";
|
|
4249
4233
|
handler: "handler";
|
|
4234
|
+
schema: "schema";
|
|
4250
4235
|
test: "test";
|
|
4251
4236
|
docs: "docs";
|
|
4252
4237
|
}>;
|
|
@@ -4316,14 +4301,18 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4316
4301
|
writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4317
4302
|
usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4318
4303
|
emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4304
|
+
contract: z.ZodOptional<z.ZodObject<{
|
|
4305
|
+
input: z.ZodOptional<z.ZodString>;
|
|
4306
|
+
output: z.ZodOptional<z.ZodString>;
|
|
4307
|
+
}, z.core.$strip>>;
|
|
4319
4308
|
}, z.core.$strip>>;
|
|
4320
4309
|
codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4321
4310
|
path: z.ZodString;
|
|
4322
4311
|
role: z.ZodEnum<{
|
|
4323
|
-
schema: "schema";
|
|
4324
4312
|
config: "config";
|
|
4325
4313
|
entrypoint: "entrypoint";
|
|
4326
4314
|
handler: "handler";
|
|
4315
|
+
schema: "schema";
|
|
4327
4316
|
test: "test";
|
|
4328
4317
|
docs: "docs";
|
|
4329
4318
|
}>;
|
|
@@ -4351,14 +4340,18 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4351
4340
|
writes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4352
4341
|
usesCatalogs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4353
4342
|
emits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4343
|
+
contract: z.ZodOptional<z.ZodObject<{
|
|
4344
|
+
input: z.ZodOptional<z.ZodString>;
|
|
4345
|
+
output: z.ZodOptional<z.ZodString>;
|
|
4346
|
+
}, z.core.$strip>>;
|
|
4354
4347
|
}, z.core.$strip>>;
|
|
4355
4348
|
codeRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
4356
4349
|
path: z.ZodString;
|
|
4357
4350
|
role: z.ZodEnum<{
|
|
4358
|
-
schema: "schema";
|
|
4359
4351
|
config: "config";
|
|
4360
4352
|
entrypoint: "entrypoint";
|
|
4361
4353
|
handler: "handler";
|
|
4354
|
+
schema: "schema";
|
|
4362
4355
|
test: "test";
|
|
4363
4356
|
docs: "docs";
|
|
4364
4357
|
}>;
|
|
@@ -4583,6 +4576,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4583
4576
|
crm: "crm";
|
|
4584
4577
|
"lead-gen": "lead-gen";
|
|
4585
4578
|
projects: "projects";
|
|
4579
|
+
clients: "clients";
|
|
4586
4580
|
operations: "operations";
|
|
4587
4581
|
monitoring: "monitoring";
|
|
4588
4582
|
knowledge: "knowledge";
|
|
@@ -4644,11 +4638,10 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4644
4638
|
ontology: "ontology";
|
|
4645
4639
|
role: "role";
|
|
4646
4640
|
goal: "goal";
|
|
4647
|
-
stage: "stage";
|
|
4648
4641
|
resource: "resource";
|
|
4642
|
+
stage: "stage";
|
|
4649
4643
|
"customer-segment": "customer-segment";
|
|
4650
4644
|
offering: "offering";
|
|
4651
|
-
"content-node": "content-node";
|
|
4652
4645
|
}>;
|
|
4653
4646
|
id: z.ZodString;
|
|
4654
4647
|
}, z.core.$strip>;
|
|
@@ -4656,7 +4649,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4656
4649
|
nodeId: z.ZodUnion<readonly [z.ZodString, z.ZodTemplateLiteral<`ontology:${string}`>]>;
|
|
4657
4650
|
}, z.core.$strip>]>, z.ZodTransform<{
|
|
4658
4651
|
target: {
|
|
4659
|
-
kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "
|
|
4652
|
+
kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
|
|
4660
4653
|
id: string;
|
|
4661
4654
|
};
|
|
4662
4655
|
nodeId: string;
|
|
@@ -4664,7 +4657,7 @@ declare const OrganizationModelSchema: z.ZodObject<{
|
|
|
4664
4657
|
nodeId: string;
|
|
4665
4658
|
} | {
|
|
4666
4659
|
target: {
|
|
4667
|
-
kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "
|
|
4660
|
+
kind: "knowledge" | "system" | "action" | "ontology" | "role" | "goal" | "resource" | "stage" | "customer-segment" | "offering";
|
|
4668
4661
|
id: string;
|
|
4669
4662
|
};
|
|
4670
4663
|
}>>>>;
|