@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.
- package/dist/index.d.ts +166 -85
- package/dist/index.js +146 -1346
- package/dist/knowledge/index.d.ts +27 -38
- package/dist/knowledge/index.js +1 -1
- package/dist/organization-model/index.d.ts +166 -85
- package/dist/organization-model/index.js +146 -1346
- package/dist/test-utils/index.d.ts +23 -31
- package/dist/test-utils/index.js +75 -1238
- package/package.json +1 -1
- package/src/_gen/__tests__/__snapshots__/contracts.md.snap +14 -2
- 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/knowledge/queries.ts +0 -1
- 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__/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 +79 -42
- 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 +130 -218
- package/src/organization-model/index.ts +104 -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.ts +610 -704
- 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 +14 -2
- 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
package/dist/test-utils/index.js
CHANGED
|
@@ -19744,40 +19744,6 @@ function addLegacyActionProjections(index2, diagnostics, sourcesById, actions, e
|
|
|
19744
19744
|
});
|
|
19745
19745
|
}
|
|
19746
19746
|
}
|
|
19747
|
-
function addSystemContentProjections(index2, diagnostics, sourcesById, systemPath, system, schemaPath) {
|
|
19748
|
-
const content = system.content ?? {};
|
|
19749
|
-
for (const [localId, node] of Object.entries(content)) {
|
|
19750
|
-
if (node.kind !== "schema") continue;
|
|
19751
|
-
const entries = Object.fromEntries(
|
|
19752
|
-
Object.entries(content).filter(([, candidate]) => candidate.parentContentId === localId).map(([entryId, candidate]) => [
|
|
19753
|
-
entryId,
|
|
19754
|
-
{
|
|
19755
|
-
label: candidate.label ?? entryId,
|
|
19756
|
-
type: candidate.type,
|
|
19757
|
-
...candidate.description !== void 0 ? { description: candidate.description } : {},
|
|
19758
|
-
...candidate.data !== void 0 ? candidate.data : {}
|
|
19759
|
-
}
|
|
19760
|
-
])
|
|
19761
|
-
);
|
|
19762
|
-
const catalogType = {
|
|
19763
|
-
id: formatOntologyId({ scope: systemPath, kind: "catalog", localId }),
|
|
19764
|
-
label: node.label ?? localId,
|
|
19765
|
-
description: node.description,
|
|
19766
|
-
ownerSystemId: systemPath,
|
|
19767
|
-
kind: node.type,
|
|
19768
|
-
...typeof node.data?.["entityId"] === "string" ? { appliesTo: formatOntologyId({ scope: systemPath, kind: "object", localId: node.data["entityId"] }) } : {},
|
|
19769
|
-
...Object.keys(entries).length > 0 ? { entries } : {},
|
|
19770
|
-
...node.data !== void 0 ? { data: node.data } : {}
|
|
19771
|
-
};
|
|
19772
|
-
addRecord(index2, diagnostics, sourcesById, "catalogTypes", catalogType, {
|
|
19773
|
-
source: "legacy.system.content",
|
|
19774
|
-
path: [...schemaPath, "content", localId],
|
|
19775
|
-
kind: "projected",
|
|
19776
|
-
systemPath,
|
|
19777
|
-
legacyId: `${systemPath}:${localId}`
|
|
19778
|
-
});
|
|
19779
|
-
}
|
|
19780
|
-
}
|
|
19781
19747
|
function addSystemScopes(index2, diagnostics, sourcesById, systems, prefix, schemaPath) {
|
|
19782
19748
|
for (const [key, system] of Object.entries(systems)) {
|
|
19783
19749
|
const systemPath = prefix ? `${prefix}.${key}` : key;
|
|
@@ -19786,7 +19752,6 @@ function addSystemScopes(index2, diagnostics, sourcesById, systems, prefix, sche
|
|
|
19786
19752
|
...currentPath,
|
|
19787
19753
|
"ontology"
|
|
19788
19754
|
]);
|
|
19789
|
-
addSystemContentProjections(index2, diagnostics, sourcesById, systemPath, system, currentPath);
|
|
19790
19755
|
addSystemScopes(index2, diagnostics, sourcesById, childSystemsOf(system), systemPath, [
|
|
19791
19756
|
...currentPath,
|
|
19792
19757
|
system.systems !== void 0 ? "systems" : "subsystems"
|
|
@@ -19803,190 +19768,6 @@ function compileOrganizationOntology(model) {
|
|
|
19803
19768
|
addLegacyActionProjections(ontology, diagnostics, sourcesById, model.actions ?? {}, model.entities ?? {});
|
|
19804
19769
|
return { ontology: sortResolvedOntologyIndex(ontology), diagnostics };
|
|
19805
19770
|
}
|
|
19806
|
-
|
|
19807
|
-
// src/organization-model/content-kinds/registry.ts
|
|
19808
|
-
function defineContentType(def) {
|
|
19809
|
-
return def;
|
|
19810
|
-
}
|
|
19811
|
-
var ContentNodeBaseSchema = z.object({
|
|
19812
|
-
/** Human-readable label for the content node. */
|
|
19813
|
-
label: z.string().trim().min(1).max(120).meta({ label: "Label" }),
|
|
19814
|
-
/** Optional one-paragraph description. */
|
|
19815
|
-
description: z.string().trim().min(1).max(2e3).optional().meta({ label: "Description" }),
|
|
19816
|
-
/** Optional display order within the system content map. */
|
|
19817
|
-
order: z.number().int().optional().meta({ label: "Order" }),
|
|
19818
|
-
/**
|
|
19819
|
-
* Local NodeId of the parent content node within the SAME system.
|
|
19820
|
-
* Per B4/L9: MUST resolve to a sibling in the same `system.content` map.
|
|
19821
|
-
* Per L19: parent and child MUST share the same `kind` (meta-category).
|
|
19822
|
-
*/
|
|
19823
|
-
parentContentId: z.string().trim().min(1).max(200).optional().meta({ label: "Parent content id" })
|
|
19824
|
-
});
|
|
19825
|
-
var ContentNodeSchema = ContentNodeBaseSchema.extend({
|
|
19826
|
-
/** Meta-category (e.g. 'schema', 'config', 'knowledge', tenant-defined). */
|
|
19827
|
-
kind: z.string().trim().min(1).max(100).meta({ label: "Kind" }),
|
|
19828
|
-
/** Specific family within the meta-category (e.g. 'pipeline', 'kv'). */
|
|
19829
|
-
type: z.string().trim().min(1).max(100).meta({ label: "Type" }),
|
|
19830
|
-
/** Payload data; validated against registered payloadSchema when (kind, type) is known. */
|
|
19831
|
-
data: z.record(z.string(), z.unknown()).optional().meta({ label: "Data" })
|
|
19832
|
-
});
|
|
19833
|
-
z.object({
|
|
19834
|
-
/** Meta-category (tenant-defined or registry-shipped). */
|
|
19835
|
-
kind: z.string().trim().min(1).max(100).meta({ label: "Kind" }),
|
|
19836
|
-
/** Specific family within the meta-category. */
|
|
19837
|
-
type: z.string().trim().min(1).max(100).meta({ label: "Type" }),
|
|
19838
|
-
/** Human-readable label shown in the KB tree and describe views. */
|
|
19839
|
-
label: z.string().trim().min(1).max(120).meta({ label: "Label" }),
|
|
19840
|
-
/** Optional description. */
|
|
19841
|
-
description: z.string().trim().min(1).max(2e3).optional().meta({ label: "Description" }),
|
|
19842
|
-
/**
|
|
19843
|
-
* Which KB tree group this extension renders in.
|
|
19844
|
-
* Per L6: 'business-model' places it alongside Customers / Offerings / Goals.
|
|
19845
|
-
*/
|
|
19846
|
-
treeGroup: z.union([z.enum(["profile", "business-model", "systems", "graph", "governance-wiring"]), z.string().min(1).max(100)]).meta({ label: "Tree group" }),
|
|
19847
|
-
/** Untyped payload; shape governed by the registered payloadSchema when available. */
|
|
19848
|
-
data: z.record(z.string(), z.unknown()).optional().meta({ label: "Data" })
|
|
19849
|
-
});
|
|
19850
|
-
var PipelinePayloadSchema = z.object({
|
|
19851
|
-
/**
|
|
19852
|
-
* Local NodeId of the entity this pipeline applies to (e.g. 'crm.deal').
|
|
19853
|
-
* `.meta({ ref: 'entity' })` enables SchemaDrivenFieldList to render a
|
|
19854
|
-
* clickable graph link to the referenced entity node.
|
|
19855
|
-
*/
|
|
19856
|
-
entityId: z.string().trim().min(1).max(200).meta({ label: "Entity", ref: "entity", hint: "The entity type this pipeline tracks" }),
|
|
19857
|
-
/**
|
|
19858
|
-
* Optional Kanban column color token for UI rendering.
|
|
19859
|
-
*/
|
|
19860
|
-
kanbanColor: z.string().trim().min(1).max(40).optional().meta({ label: "Kanban color", hint: "UI color token" })
|
|
19861
|
-
});
|
|
19862
|
-
var pipelineKind = defineContentType({
|
|
19863
|
-
kind: "schema",
|
|
19864
|
-
type: "pipeline",
|
|
19865
|
-
label: "Pipeline",
|
|
19866
|
-
description: "A named progression pipeline that applies to a specific entity type.",
|
|
19867
|
-
payloadSchema: PipelinePayloadSchema,
|
|
19868
|
-
parentTypes: []
|
|
19869
|
-
});
|
|
19870
|
-
var StagePayloadSchema = z.object({
|
|
19871
|
-
/**
|
|
19872
|
-
* Semantic classification for this stage.
|
|
19873
|
-
* Drives color, icon, and CRM-priority logic in consuming views.
|
|
19874
|
-
* Optional — prospecting stages use data.entityKind instead.
|
|
19875
|
-
* Enum aligned with SalesStageSemanticClassSchema (sales.ts).
|
|
19876
|
-
*/
|
|
19877
|
-
semanticClass: z.enum(["open", "active", "nurturing", "closed_won", "closed_lost", "won", "lost", "closed"]).optional().meta({ label: "Semantic class", hint: "Semantic meaning of this stage", color: "blue" })
|
|
19878
|
-
});
|
|
19879
|
-
var stageKind = defineContentType({
|
|
19880
|
-
kind: "schema",
|
|
19881
|
-
type: "stage",
|
|
19882
|
-
label: "Stage",
|
|
19883
|
-
description: "A stage within a pipeline. Must be parented under a schema:pipeline content node.",
|
|
19884
|
-
payloadSchema: StagePayloadSchema,
|
|
19885
|
-
parentTypes: ["schema:pipeline"]
|
|
19886
|
-
});
|
|
19887
|
-
var TemplatePayloadSchema = z.object({
|
|
19888
|
-
/**
|
|
19889
|
-
* Optional description surfaced in the KB describe view and tooling.
|
|
19890
|
-
*/
|
|
19891
|
-
description: z.string().trim().min(1).max(2e3).optional().meta({ label: "Description", hint: "What this template is used for" })
|
|
19892
|
-
});
|
|
19893
|
-
var templateKind = defineContentType({
|
|
19894
|
-
kind: "schema",
|
|
19895
|
-
type: "template",
|
|
19896
|
-
label: "Template",
|
|
19897
|
-
description: "A named build template (e.g. a prospecting pipeline sequence).",
|
|
19898
|
-
payloadSchema: TemplatePayloadSchema,
|
|
19899
|
-
parentTypes: []
|
|
19900
|
-
});
|
|
19901
|
-
var TemplateStepPayloadSchema = z.object({
|
|
19902
|
-
/**
|
|
19903
|
-
* Which entity type this step primarily operates on.
|
|
19904
|
-
*/
|
|
19905
|
-
primaryEntity: z.enum(["company", "contact"]).meta({ label: "Primary entity", hint: "Entity type this step processes", color: "blue" }),
|
|
19906
|
-
/**
|
|
19907
|
-
* Action key identifying the workflow action executed by this step.
|
|
19908
|
-
* `.meta({ ref: 'action' })` enables SchemaDrivenFieldList to render a
|
|
19909
|
-
* clickable graph link.
|
|
19910
|
-
*/
|
|
19911
|
-
actionKey: z.string().trim().min(1).max(200).meta({ label: "Action", ref: "action", hint: "Workflow action executed by this step" }),
|
|
19912
|
-
/**
|
|
19913
|
-
* IDs of sibling step local NodeIds this step depends on.
|
|
19914
|
-
*/
|
|
19915
|
-
dependsOn: z.array(z.string().trim().min(1).max(200)).optional().meta({ label: "Depends on", hint: "Local NodeIds of prerequisite steps" })
|
|
19916
|
-
});
|
|
19917
|
-
var templateStepKind = defineContentType({
|
|
19918
|
-
kind: "schema",
|
|
19919
|
-
type: "template-step",
|
|
19920
|
-
label: "Template Step",
|
|
19921
|
-
description: "A step within a build template. Must be parented under a schema:template content node.",
|
|
19922
|
-
payloadSchema: TemplateStepPayloadSchema,
|
|
19923
|
-
parentTypes: ["schema:template"]
|
|
19924
|
-
});
|
|
19925
|
-
var StatusFlowPayloadSchema = z.object({
|
|
19926
|
-
/**
|
|
19927
|
-
* Which entity scope this status flow governs.
|
|
19928
|
-
*/
|
|
19929
|
-
appliesTo: z.enum(["project", "milestone", "task"]).meta({ label: "Applies to", hint: "Entity scope governed by this status flow", color: "blue" })
|
|
19930
|
-
});
|
|
19931
|
-
var statusFlowKind = defineContentType({
|
|
19932
|
-
kind: "schema",
|
|
19933
|
-
type: "status-flow",
|
|
19934
|
-
label: "Status Flow",
|
|
19935
|
-
description: "A named set of statuses governing a project, milestone, or task entity.",
|
|
19936
|
-
payloadSchema: StatusFlowPayloadSchema,
|
|
19937
|
-
parentTypes: []
|
|
19938
|
-
});
|
|
19939
|
-
var StatusPayloadSchema = z.object({
|
|
19940
|
-
/**
|
|
19941
|
-
* Semantic classification string for this status.
|
|
19942
|
-
* Free-form to allow tenant-defined classifications (e.g. 'active', 'blocked',
|
|
19943
|
-
* 'completed'). Used by UI to apply color and icon fallbacks.
|
|
19944
|
-
* Optional — status nodes may omit this when the label is self-descriptive.
|
|
19945
|
-
*/
|
|
19946
|
-
semanticClass: z.string().trim().min(1).max(100).optional().meta({ label: "Semantic class", hint: "Semantic meaning of this status (e.g. active, blocked, completed)" }),
|
|
19947
|
-
/**
|
|
19948
|
-
* Optional UI color token override for this status.
|
|
19949
|
-
*/
|
|
19950
|
-
color: z.string().trim().min(1).max(40).optional().meta({ label: "Color", hint: "UI color token" })
|
|
19951
|
-
});
|
|
19952
|
-
var statusKind = defineContentType({
|
|
19953
|
-
kind: "schema",
|
|
19954
|
-
type: "status",
|
|
19955
|
-
label: "Status",
|
|
19956
|
-
description: "A single status within a status flow. Must be parented under a schema:status-flow content node.",
|
|
19957
|
-
payloadSchema: StatusPayloadSchema,
|
|
19958
|
-
parentTypes: ["schema:status-flow"]
|
|
19959
|
-
});
|
|
19960
|
-
var ConfigKvPayloadSchema = z.object({
|
|
19961
|
-
/**
|
|
19962
|
-
* Flat key-value entries. Values are JSON primitives.
|
|
19963
|
-
* Keys are short identifiers (e.g. 'maxBatchSize', 'featureEnabled').
|
|
19964
|
-
*/
|
|
19965
|
-
entries: z.record(z.string().trim().min(1).max(200), z.union([z.string(), z.number(), z.boolean(), z.null()])).meta({ label: "Entries", hint: "Key-value configuration entries (string, number, boolean, or null values)" })
|
|
19966
|
-
});
|
|
19967
|
-
var configKvKind = defineContentType({
|
|
19968
|
-
kind: "config",
|
|
19969
|
-
type: "kv",
|
|
19970
|
-
label: "Key-Value Config",
|
|
19971
|
-
description: "A flat key-value configuration store co-located with a system. Values are JSON primitives.",
|
|
19972
|
-
payloadSchema: ConfigKvPayloadSchema,
|
|
19973
|
-
parentTypes: []
|
|
19974
|
-
});
|
|
19975
|
-
|
|
19976
|
-
// src/organization-model/content-kinds/index.ts
|
|
19977
|
-
var CONTENT_KIND_REGISTRY = {
|
|
19978
|
-
"schema:pipeline": pipelineKind,
|
|
19979
|
-
"schema:stage": stageKind,
|
|
19980
|
-
"schema:template": templateKind,
|
|
19981
|
-
"schema:template-step": templateStepKind,
|
|
19982
|
-
"schema:status-flow": statusFlowKind,
|
|
19983
|
-
"schema:status": statusKind,
|
|
19984
|
-
"config:kv": configKvKind
|
|
19985
|
-
};
|
|
19986
|
-
function lookupContentType(kind, type3) {
|
|
19987
|
-
const key = `${kind}:${type3}`;
|
|
19988
|
-
return CONTENT_KIND_REGISTRY[key];
|
|
19989
|
-
}
|
|
19990
19771
|
var ORGANIZATION_MODEL_ICON_TOKENS = [
|
|
19991
19772
|
// Navigation / app areas
|
|
19992
19773
|
"dashboard",
|
|
@@ -20529,226 +20310,7 @@ var ActionSchema = z.object({
|
|
|
20529
20310
|
var ActionsDomainSchema = z.record(z.string(), ActionSchema).refine((record) => Object.entries(record).every(([key, entry]) => entry.id === key), {
|
|
20530
20311
|
message: "Each action entry id must match its map key"
|
|
20531
20312
|
}).default({});
|
|
20532
|
-
var
|
|
20533
|
-
{
|
|
20534
|
-
id: "lead-gen.company.source",
|
|
20535
|
-
order: 10,
|
|
20536
|
-
label: "Source companies",
|
|
20537
|
-
description: "Import source companies from a list provider.",
|
|
20538
|
-
scope: { domain: "sales" },
|
|
20539
|
-
resourceId: "lgn-import-workflow",
|
|
20540
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/source" }]
|
|
20541
|
-
},
|
|
20542
|
-
{
|
|
20543
|
-
id: "lead-gen.company.apollo-import",
|
|
20544
|
-
order: 20,
|
|
20545
|
-
label: "Import from Apollo",
|
|
20546
|
-
description: "Pull companies and seed contact data from an Apollo search or list.",
|
|
20547
|
-
scope: { domain: "sales" },
|
|
20548
|
-
resourceId: "lgn-01c-apollo-import-workflow",
|
|
20549
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/apollo-import" }]
|
|
20550
|
-
},
|
|
20551
|
-
{
|
|
20552
|
-
id: "lead-gen.contact.discover",
|
|
20553
|
-
order: 30,
|
|
20554
|
-
label: "Discover contact emails",
|
|
20555
|
-
description: "Find email addresses for contacts at qualified companies.",
|
|
20556
|
-
scope: { domain: "sales" },
|
|
20557
|
-
resourceId: "lgn-04-email-discovery-workflow",
|
|
20558
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/contacts/discover" }]
|
|
20559
|
-
},
|
|
20560
|
-
{
|
|
20561
|
-
id: "lead-gen.contact.verify-email",
|
|
20562
|
-
order: 40,
|
|
20563
|
-
label: "Verify emails",
|
|
20564
|
-
description: "Check email deliverability before outreach.",
|
|
20565
|
-
scope: { domain: "sales" },
|
|
20566
|
-
resourceId: "lgn-05-email-verification-workflow",
|
|
20567
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/contacts/verify-email" }]
|
|
20568
|
-
},
|
|
20569
|
-
{
|
|
20570
|
-
id: "lead-gen.company.apify-crawl",
|
|
20571
|
-
order: 50,
|
|
20572
|
-
label: "Crawl websites",
|
|
20573
|
-
description: "Crawl company websites via Apify and store raw page markdown in enrichmentData.websiteCrawl.pages for downstream LLM analysis.",
|
|
20574
|
-
scope: { domain: "sales" },
|
|
20575
|
-
resourceId: "lgn-02a-apify-website-crawl-workflow",
|
|
20576
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/apify-crawl" }]
|
|
20577
|
-
},
|
|
20578
|
-
{
|
|
20579
|
-
id: "lead-gen.company.website-extract",
|
|
20580
|
-
order: 60,
|
|
20581
|
-
label: "Extract website signals",
|
|
20582
|
-
description: "Scrape and analyze company websites for qualification signals.",
|
|
20583
|
-
scope: { domain: "sales" },
|
|
20584
|
-
resourceId: "lgn-02-website-extract-workflow",
|
|
20585
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/website-extract" }]
|
|
20586
|
-
},
|
|
20587
|
-
{
|
|
20588
|
-
id: "lead-gen.company.qualify",
|
|
20589
|
-
order: 70,
|
|
20590
|
-
label: "Qualify companies",
|
|
20591
|
-
description: "Score and filter companies against the ICP rubric.",
|
|
20592
|
-
scope: { domain: "sales" },
|
|
20593
|
-
resourceId: "lgn-03-company-qualification-workflow",
|
|
20594
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/qualify" }]
|
|
20595
|
-
},
|
|
20596
|
-
{
|
|
20597
|
-
id: "lead-gen.company.dtc-subscription-qualify",
|
|
20598
|
-
order: 80,
|
|
20599
|
-
label: "Qualify DTC subscription fit",
|
|
20600
|
-
description: "Classify subscription potential and consumable-product fit for DTC brands.",
|
|
20601
|
-
scope: { domain: "sales" },
|
|
20602
|
-
resourceId: "lgn-03b-dtc-subscription-score-workflow",
|
|
20603
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/dtc-subscription-qualify" }]
|
|
20604
|
-
},
|
|
20605
|
-
{
|
|
20606
|
-
id: "lead-gen.contact.apollo-decision-maker-enrich",
|
|
20607
|
-
order: 90,
|
|
20608
|
-
label: "Enrich decision-makers",
|
|
20609
|
-
description: "Find and enrich qualified contacts at qualified companies via Apollo.",
|
|
20610
|
-
scope: { domain: "sales" },
|
|
20611
|
-
resourceId: "lgn-04b-apollo-decision-maker-enrich-workflow",
|
|
20612
|
-
invocations: [
|
|
20613
|
-
{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/contacts/apollo-decision-maker-enrich" }
|
|
20614
|
-
]
|
|
20615
|
-
},
|
|
20616
|
-
{
|
|
20617
|
-
id: "lead-gen.contact.personalize",
|
|
20618
|
-
order: 100,
|
|
20619
|
-
label: "Personalize outreach",
|
|
20620
|
-
description: "Generate personalized opening lines for each contact.",
|
|
20621
|
-
scope: { domain: "sales" },
|
|
20622
|
-
resourceId: "ist-personalization-workflow",
|
|
20623
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/contacts/personalize" }]
|
|
20624
|
-
},
|
|
20625
|
-
{
|
|
20626
|
-
id: "lead-gen.review.outreach-ready",
|
|
20627
|
-
order: 110,
|
|
20628
|
-
label: "Upload to outreach",
|
|
20629
|
-
description: "Upload approved contacts to the outreach sequence after QC review.",
|
|
20630
|
-
scope: { domain: "sales" },
|
|
20631
|
-
resourceId: "ist-upload-contacts-workflow",
|
|
20632
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/review/outreach-ready" }]
|
|
20633
|
-
},
|
|
20634
|
-
{
|
|
20635
|
-
id: "lead-gen.export.list",
|
|
20636
|
-
order: 120,
|
|
20637
|
-
label: "Export lead list",
|
|
20638
|
-
description: "Export approved leads as a downloadable lead list.",
|
|
20639
|
-
scope: { domain: "sales" },
|
|
20640
|
-
resourceId: "lgn-06-export-list-workflow",
|
|
20641
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/export/list" }]
|
|
20642
|
-
},
|
|
20643
|
-
{
|
|
20644
|
-
id: "lead-gen.company.cleanup",
|
|
20645
|
-
order: 130,
|
|
20646
|
-
label: "Clean up companies",
|
|
20647
|
-
description: "Remove disqualified or duplicate companies from the list.",
|
|
20648
|
-
scope: { domain: "sales" },
|
|
20649
|
-
resourceId: "lgn-company-cleanup-workflow",
|
|
20650
|
-
invocations: [{ kind: "api-endpoint", method: "POST", path: "/api/prospecting/companies/cleanup" }]
|
|
20651
|
-
}
|
|
20652
|
-
];
|
|
20653
|
-
var LEAD_GEN_ACTION_ENTRIES = Object.fromEntries(
|
|
20654
|
-
LEAD_GEN_ACTION_ENTRY_INPUTS.map((action) => {
|
|
20655
|
-
const parsed = ActionSchema.parse(action);
|
|
20656
|
-
return [parsed.id, parsed];
|
|
20657
|
-
})
|
|
20658
|
-
);
|
|
20659
|
-
var CRM_ACTION_ENTRY_INPUTS = [
|
|
20660
|
-
{
|
|
20661
|
-
id: "send_reply",
|
|
20662
|
-
order: 210,
|
|
20663
|
-
label: "Send Reply",
|
|
20664
|
-
description: "Send a contextual reply for an active CRM deal.",
|
|
20665
|
-
scope: { domain: "sales" },
|
|
20666
|
-
resourceId: "crm-send-reply-workflow",
|
|
20667
|
-
affects: ["crm.deal"]
|
|
20668
|
-
},
|
|
20669
|
-
{
|
|
20670
|
-
id: "send_link",
|
|
20671
|
-
order: 220,
|
|
20672
|
-
label: "Send Booking Link",
|
|
20673
|
-
description: "Send a booking link to move a deal toward a scheduled call.",
|
|
20674
|
-
scope: { domain: "sales" },
|
|
20675
|
-
resourceId: "crm-send-booking-link-workflow",
|
|
20676
|
-
affects: ["crm.deal"]
|
|
20677
|
-
},
|
|
20678
|
-
{
|
|
20679
|
-
id: "send_nudge",
|
|
20680
|
-
order: 230,
|
|
20681
|
-
label: "Send Nudge",
|
|
20682
|
-
description: "Send a follow-up nudge for a stalled CRM deal.",
|
|
20683
|
-
scope: { domain: "sales" },
|
|
20684
|
-
resourceId: "crm-send-nudge-workflow",
|
|
20685
|
-
affects: ["crm.deal"]
|
|
20686
|
-
},
|
|
20687
|
-
{
|
|
20688
|
-
id: "rebook",
|
|
20689
|
-
order: 240,
|
|
20690
|
-
label: "Rebook",
|
|
20691
|
-
description: "Rebook a missed or rescheduled CRM appointment.",
|
|
20692
|
-
scope: { domain: "sales" },
|
|
20693
|
-
resourceId: "crm-rebook-workflow",
|
|
20694
|
-
affects: ["crm.deal"]
|
|
20695
|
-
},
|
|
20696
|
-
{
|
|
20697
|
-
id: "move_to_proposal",
|
|
20698
|
-
order: 250,
|
|
20699
|
-
label: "Move to Proposal",
|
|
20700
|
-
description: "Advance a qualified CRM deal into the proposal stage.",
|
|
20701
|
-
scope: { domain: "sales" },
|
|
20702
|
-
resourceId: "move_to_proposal-workflow",
|
|
20703
|
-
affects: ["crm.deal"]
|
|
20704
|
-
},
|
|
20705
|
-
{
|
|
20706
|
-
id: "move_to_closing",
|
|
20707
|
-
order: 260,
|
|
20708
|
-
label: "Move to Closing",
|
|
20709
|
-
description: "Advance a proposal-stage CRM deal into closing.",
|
|
20710
|
-
scope: { domain: "sales" },
|
|
20711
|
-
resourceId: "move_to_closing-workflow",
|
|
20712
|
-
affects: ["crm.deal"]
|
|
20713
|
-
},
|
|
20714
|
-
{
|
|
20715
|
-
id: "move_to_closed_won",
|
|
20716
|
-
order: 270,
|
|
20717
|
-
label: "Close Won",
|
|
20718
|
-
description: "Mark a CRM deal as closed won.",
|
|
20719
|
-
scope: { domain: "sales" },
|
|
20720
|
-
resourceId: "move_to_closed_won-workflow",
|
|
20721
|
-
affects: ["crm.deal"]
|
|
20722
|
-
},
|
|
20723
|
-
{
|
|
20724
|
-
id: "move_to_closed_lost",
|
|
20725
|
-
order: 280,
|
|
20726
|
-
label: "Close Lost",
|
|
20727
|
-
description: "Mark a CRM deal as closed lost.",
|
|
20728
|
-
scope: { domain: "sales" },
|
|
20729
|
-
resourceId: "move_to_closed_lost-workflow",
|
|
20730
|
-
affects: ["crm.deal"]
|
|
20731
|
-
},
|
|
20732
|
-
{
|
|
20733
|
-
id: "move_to_nurturing",
|
|
20734
|
-
order: 290,
|
|
20735
|
-
label: "Move to Nurturing",
|
|
20736
|
-
description: "Move a CRM deal into nurturing for future follow-up.",
|
|
20737
|
-
scope: { domain: "sales" },
|
|
20738
|
-
resourceId: "move_to_nurturing-workflow",
|
|
20739
|
-
affects: ["crm.deal"]
|
|
20740
|
-
}
|
|
20741
|
-
];
|
|
20742
|
-
var CRM_ACTION_ENTRIES = Object.fromEntries(
|
|
20743
|
-
CRM_ACTION_ENTRY_INPUTS.map((action) => {
|
|
20744
|
-
const parsed = ActionSchema.parse(action);
|
|
20745
|
-
return [parsed.id, parsed];
|
|
20746
|
-
})
|
|
20747
|
-
);
|
|
20748
|
-
var DEFAULT_ORGANIZATION_MODEL_ACTIONS = {
|
|
20749
|
-
...LEAD_GEN_ACTION_ENTRIES,
|
|
20750
|
-
...CRM_ACTION_ENTRIES
|
|
20751
|
-
};
|
|
20313
|
+
var DEFAULT_ORGANIZATION_MODEL_ACTIONS = {};
|
|
20752
20314
|
|
|
20753
20315
|
// src/organization-model/domains/systems.ts
|
|
20754
20316
|
var SystemKindSchema = z.enum(["product", "operational", "platform", "diagnostic"]).meta({ label: "System kind", color: "blue" });
|
|
@@ -20762,7 +20324,7 @@ var SystemPathSchema = z.string().trim().min(1).regex(
|
|
|
20762
20324
|
var UiPositionSchema = z.enum(["sidebar-primary", "sidebar-bottom"]).meta({ label: "UI position" });
|
|
20763
20325
|
var NodeIdStringSchema = z.string().trim().min(1).max(200).regex(
|
|
20764
20326
|
/^[a-z][a-z-]*:([a-z0-9-]+)(\.[a-z0-9-]+)*(:[a-z0-9.-]+)*$/,
|
|
20765
|
-
"Node references must use kind:dotted-path (e.g. system:sales.crm or
|
|
20327
|
+
"Node references must use kind:dotted-path (e.g. system:sales.crm or resource:lead-gen.company.qualify)"
|
|
20766
20328
|
);
|
|
20767
20329
|
var SystemUiSchema = z.object({
|
|
20768
20330
|
path: PathSchema,
|
|
@@ -20836,13 +20398,6 @@ var SystemEntrySchema = z.object({
|
|
|
20836
20398
|
* shared contract records owned by this system.
|
|
20837
20399
|
*/
|
|
20838
20400
|
ontology: OntologyScopeSchema.optional(),
|
|
20839
|
-
/**
|
|
20840
|
-
* @deprecated Compatibility-only bridge for old tenant content nodes and
|
|
20841
|
-
* migration readers. New schema/catalog authoring belongs in ontology;
|
|
20842
|
-
* new system-local settings belong in config. Bridge nodes are keyed by
|
|
20843
|
-
* local NodeId and may still project to content-node:* graph IDs.
|
|
20844
|
-
*/
|
|
20845
|
-
content: z.record(z.string().trim().min(1).max(200), ContentNodeSchema).optional(),
|
|
20846
20401
|
/**
|
|
20847
20402
|
* Recursive child systems, authored via nesting (per L11).
|
|
20848
20403
|
* The key is the local system id; the full path is computed by joining
|
|
@@ -20853,7 +20408,7 @@ var SystemEntrySchema = z.object({
|
|
|
20853
20408
|
systems: z.lazy(() => z.record(z.string().trim().min(1).max(100), SystemEntrySchema)).optional(),
|
|
20854
20409
|
/** @deprecated Use systems. Accepted as a compatibility alias during the ontology bridge. */
|
|
20855
20410
|
subsystems: z.lazy(() => z.record(z.string().trim().min(1).max(100), SystemEntrySchema)).optional()
|
|
20856
|
-
}).refine((system) => system.label !== void 0 || system.title !== void 0, {
|
|
20411
|
+
}).strict().refine((system) => system.label !== void 0 || system.title !== void 0, {
|
|
20857
20412
|
path: ["label"],
|
|
20858
20413
|
message: "System must provide label or title"
|
|
20859
20414
|
}).transform((system) => {
|
|
@@ -20868,6 +20423,10 @@ var SystemsDomainSchema = z.record(z.string(), SystemEntrySchema).refine((record
|
|
|
20868
20423
|
var DEFAULT_ORGANIZATION_MODEL_SYSTEMS = {};
|
|
20869
20424
|
|
|
20870
20425
|
// src/organization-model/domains/resources.ts
|
|
20426
|
+
var ContractRefSchema = z.string().trim().min(1).max(500).regex(
|
|
20427
|
+
/^[A-Za-z0-9@](?:[A-Za-z0-9_./@-]*[A-Za-z0-9_])?\/?[A-Za-z0-9_./@-]*#[A-Za-z_$][A-Za-z0-9_$]*$/,
|
|
20428
|
+
"ContractRef must be in the format package/subpath#ExportName (e.g. @repo/elevasis-core/contracts/apollo-import#inputSchema)"
|
|
20429
|
+
);
|
|
20871
20430
|
z.enum(["workflow", "agent", "integration", "script"]).meta({ label: "Resource kind", color: "orange" });
|
|
20872
20431
|
var ResourceGovernanceStatusSchema = z.enum(["active", "deprecated", "archived"]).meta({ label: "Governance status", color: "teal" });
|
|
20873
20432
|
var AgentKindSchema = z.enum(["orchestrator", "specialist", "utility", "platform"]).meta({ label: "Agent kind", color: "violet" });
|
|
@@ -20896,7 +20455,20 @@ var ResourceOntologyBindingSchema = z.object({
|
|
|
20896
20455
|
reads: z.array(OntologyIdSchema).optional(),
|
|
20897
20456
|
writes: z.array(OntologyIdSchema).optional(),
|
|
20898
20457
|
usesCatalogs: z.array(OntologyIdSchema).optional(),
|
|
20899
|
-
emits: z.array(OntologyIdSchema).optional()
|
|
20458
|
+
emits: z.array(OntologyIdSchema).optional(),
|
|
20459
|
+
/**
|
|
20460
|
+
* Optional typed contract binding for this resource's workflow I/O.
|
|
20461
|
+
* Each ref is a `package/subpath#ExportName` string that resolves to a
|
|
20462
|
+
* Zod schema in `@repo/elevasis-core` (or the consumer's equivalent package).
|
|
20463
|
+
*
|
|
20464
|
+
* Absence of this field preserves all existing behavior — it is additive + optional.
|
|
20465
|
+
* Tier-1 validation (schema.ts): ref-string shape only (browser-safe, no imports).
|
|
20466
|
+
* Tier-2 validation (om:verify): intra-package typed-map resolution asserts ZodType.
|
|
20467
|
+
*/
|
|
20468
|
+
contract: z.object({
|
|
20469
|
+
input: ContractRefSchema.optional(),
|
|
20470
|
+
output: ContractRefSchema.optional()
|
|
20471
|
+
}).optional()
|
|
20900
20472
|
}).superRefine((binding, ctx) => {
|
|
20901
20473
|
if (binding.primaryAction === void 0) return;
|
|
20902
20474
|
if (binding.actions?.includes(binding.primaryAction)) return;
|
|
@@ -21088,13 +20660,10 @@ var KnowledgeTargetKindSchema = z.enum([
|
|
|
21088
20660
|
"goal",
|
|
21089
20661
|
"customer-segment",
|
|
21090
20662
|
"offering",
|
|
21091
|
-
"ontology"
|
|
21092
|
-
// D4: content nodes are a valid knowledge target after compound-domain data moved into system.content
|
|
21093
|
-
"content-node"
|
|
20663
|
+
"ontology"
|
|
21094
20664
|
]).meta({ label: "Target kind" });
|
|
21095
20665
|
var KnowledgeTargetRefSchema = z.object({
|
|
21096
20666
|
kind: KnowledgeTargetKindSchema,
|
|
21097
|
-
// D4: content-node targets use a qualified id format '<system-path>:<local-content-id>'.
|
|
21098
20667
|
// Ontology targets use the canonical '<scope>:<kind>/<local-id>' ontology id format.
|
|
21099
20668
|
// Business-logic validation of target existence is done in OrganizationModelSchema.superRefine.
|
|
21100
20669
|
id: z.string().trim().min(1).max(300)
|
|
@@ -21111,6 +20680,15 @@ var KnowledgeTargetRefSchema = z.object({
|
|
|
21111
20680
|
});
|
|
21112
20681
|
var LegacyKnowledgeLinkSchema = z.object({
|
|
21113
20682
|
nodeId: z.union([NodeIdStringSchema, z.templateLiteral(["ontology:", OntologyIdSchema])])
|
|
20683
|
+
}).superRefine((link, ctx) => {
|
|
20684
|
+
const [kind] = link.nodeId.split(":");
|
|
20685
|
+
if (!KnowledgeTargetKindSchema.safeParse(kind).success) {
|
|
20686
|
+
ctx.addIssue({
|
|
20687
|
+
code: z.ZodIssueCode.custom,
|
|
20688
|
+
path: ["nodeId"],
|
|
20689
|
+
message: `Unknown knowledge target kind "${kind}"`
|
|
20690
|
+
});
|
|
20691
|
+
}
|
|
21114
20692
|
});
|
|
21115
20693
|
var CanonicalKnowledgeLinkSchema = z.object({
|
|
21116
20694
|
target: KnowledgeTargetRefSchema
|
|
@@ -21414,7 +20992,10 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21414
20992
|
const childSystems = system.systems ?? system.subsystems;
|
|
21415
20993
|
if (childSystems !== void 0) {
|
|
21416
20994
|
result.push(
|
|
21417
|
-
...collectAllSystems(childSystems, path, [
|
|
20995
|
+
...collectAllSystems(childSystems, path, [
|
|
20996
|
+
...currentSchemaPath,
|
|
20997
|
+
system.systems !== void 0 ? "systems" : "subsystems"
|
|
20998
|
+
])
|
|
21418
20999
|
);
|
|
21419
21000
|
}
|
|
21420
21001
|
}
|
|
@@ -21435,7 +21016,9 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21435
21016
|
`System "${system.id}" references unknown parent "${system.parentSystemId}"`
|
|
21436
21017
|
);
|
|
21437
21018
|
}
|
|
21438
|
-
const hasChildren = Object.keys(system.systems ?? system.subsystems ?? {}).length > 0 || allSystems.some(
|
|
21019
|
+
const hasChildren = Object.keys(system.systems ?? system.subsystems ?? {}).length > 0 || allSystems.some(
|
|
21020
|
+
(candidate) => candidate.path.startsWith(`${path}.`) && !candidate.path.slice(path.length + 1).includes(".")
|
|
21021
|
+
);
|
|
21439
21022
|
const contributesRoutePath = system.ui?.path !== void 0 || system.path !== void 0 || !hasChildren;
|
|
21440
21023
|
if (contributesRoutePath) {
|
|
21441
21024
|
const effectivePath = system.ui?.path ?? system.path ?? defaultSystemPathFor(path);
|
|
@@ -21457,11 +21040,7 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21457
21040
|
(candidate) => candidate.path.startsWith(`${path}.`) && !candidate.path.slice(path.length + 1).includes(".") && isLifecycleEnabled(candidate.system.lifecycle, candidate.system.enabled)
|
|
21458
21041
|
);
|
|
21459
21042
|
if (!hasEnabledDescendant) {
|
|
21460
|
-
addIssue(
|
|
21461
|
-
ctx,
|
|
21462
|
-
[...schemaPath, "lifecycle"],
|
|
21463
|
-
`System "${path}" is active but has no active descendants`
|
|
21464
|
-
);
|
|
21043
|
+
addIssue(ctx, [...schemaPath, "lifecycle"], `System "${path}" is active but has no active descendants`);
|
|
21465
21044
|
}
|
|
21466
21045
|
}
|
|
21467
21046
|
});
|
|
@@ -21693,10 +21272,16 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21693
21272
|
}
|
|
21694
21273
|
});
|
|
21695
21274
|
});
|
|
21696
|
-
const stageIds = /* @__PURE__ */ new Set();
|
|
21697
21275
|
const actionIds = new Set(Object.keys(model.actions));
|
|
21698
21276
|
const offeringsById = new Map(Object.entries(model.offerings));
|
|
21699
21277
|
const ontologyCompilation = compileOrganizationOntology(model);
|
|
21278
|
+
const stageIds = /* @__PURE__ */ new Set();
|
|
21279
|
+
for (const catalog of Object.values(ontologyCompilation.ontology.catalogTypes)) {
|
|
21280
|
+
if (catalog.kind !== "stage") continue;
|
|
21281
|
+
for (const stageId of Object.keys(catalog.entries ?? {})) {
|
|
21282
|
+
stageIds.add(stageId);
|
|
21283
|
+
}
|
|
21284
|
+
}
|
|
21700
21285
|
const ontologyIndexByKind = {
|
|
21701
21286
|
object: ontologyCompilation.ontology.objectTypes,
|
|
21702
21287
|
link: ontologyCompilation.ontology.linkTypes,
|
|
@@ -21872,13 +21457,7 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21872
21457
|
if (ontologyIndexByKind[expectedKind][ontologyId] === void 0) {
|
|
21873
21458
|
addIssue(
|
|
21874
21459
|
ctx,
|
|
21875
|
-
[
|
|
21876
|
-
"resources",
|
|
21877
|
-
resourceId,
|
|
21878
|
-
"ontology",
|
|
21879
|
-
bindingKey,
|
|
21880
|
-
...Array.isArray(ids) ? [ontologyIndex] : []
|
|
21881
|
-
],
|
|
21460
|
+
["resources", resourceId, "ontology", bindingKey, ...Array.isArray(ids) ? [ontologyIndex] : []],
|
|
21882
21461
|
`Resource "${resourceId}" ontology binding "${bindingKey}" references unknown ${expectedKind} ontology ID "${ontologyId}"`
|
|
21883
21462
|
);
|
|
21884
21463
|
}
|
|
@@ -21893,6 +21472,23 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21893
21472
|
validateResourceOntologyBinding(resource.id, "writes", "object", binding.writes);
|
|
21894
21473
|
validateResourceOntologyBinding(resource.id, "usesCatalogs", "catalog", binding.usesCatalogs);
|
|
21895
21474
|
validateResourceOntologyBinding(resource.id, "emits", "event", binding.emits);
|
|
21475
|
+
if (binding.contract !== void 0) {
|
|
21476
|
+
const contractEntries = [
|
|
21477
|
+
["input", binding.contract.input],
|
|
21478
|
+
["output", binding.contract.output]
|
|
21479
|
+
];
|
|
21480
|
+
for (const [side, ref] of contractEntries) {
|
|
21481
|
+
if (ref === void 0) continue;
|
|
21482
|
+
const result = ContractRefSchema.safeParse(ref);
|
|
21483
|
+
if (!result.success) {
|
|
21484
|
+
addIssue(
|
|
21485
|
+
ctx,
|
|
21486
|
+
["resources", resource.id, "ontology", "contract", side],
|
|
21487
|
+
`Resource "${resource.id}" contract.${side} "${ref}" is not a valid ContractRef (expected "package/subpath#ExportName")`
|
|
21488
|
+
);
|
|
21489
|
+
}
|
|
21490
|
+
}
|
|
21491
|
+
}
|
|
21896
21492
|
});
|
|
21897
21493
|
Object.values(model.roles).forEach((role) => {
|
|
21898
21494
|
if (role.heldBy === void 0) return;
|
|
@@ -21927,78 +21523,6 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
21927
21523
|
}
|
|
21928
21524
|
});
|
|
21929
21525
|
});
|
|
21930
|
-
function validateSystemContent(system, systemPath) {
|
|
21931
|
-
const childSystems = system.systems ?? system.subsystems;
|
|
21932
|
-
const childKey = system.systems !== void 0 ? "systems" : "subsystems";
|
|
21933
|
-
const content = system.content;
|
|
21934
|
-
if (content === void 0 || Object.keys(content).length === 0) {
|
|
21935
|
-
if (childSystems !== void 0) {
|
|
21936
|
-
Object.entries(childSystems).forEach(([childLocalId, child]) => {
|
|
21937
|
-
validateSystemContent(child, [...systemPath, childKey, childLocalId]);
|
|
21938
|
-
});
|
|
21939
|
-
}
|
|
21940
|
-
return;
|
|
21941
|
-
}
|
|
21942
|
-
Object.entries(content).forEach(([localId, node]) => {
|
|
21943
|
-
if (node.parentContentId !== void 0 && !(node.parentContentId in content)) {
|
|
21944
|
-
addIssue(
|
|
21945
|
-
ctx,
|
|
21946
|
-
[...systemPath, "content", localId, "parentContentId"],
|
|
21947
|
-
`Content node "${localId}" parentContentId "${node.parentContentId}" does not resolve within the same system`
|
|
21948
|
-
);
|
|
21949
|
-
}
|
|
21950
|
-
});
|
|
21951
|
-
Object.entries(content).forEach(([localId, node]) => {
|
|
21952
|
-
const visited = /* @__PURE__ */ new Set();
|
|
21953
|
-
let currentId = node.parentContentId;
|
|
21954
|
-
while (currentId !== void 0) {
|
|
21955
|
-
if (currentId === localId || visited.has(currentId)) {
|
|
21956
|
-
addIssue(
|
|
21957
|
-
ctx,
|
|
21958
|
-
[...systemPath, "content", localId, "parentContentId"],
|
|
21959
|
-
`Content node "${localId}" has a parentContentId cycle`
|
|
21960
|
-
);
|
|
21961
|
-
break;
|
|
21962
|
-
}
|
|
21963
|
-
visited.add(currentId);
|
|
21964
|
-
currentId = content[currentId]?.parentContentId;
|
|
21965
|
-
}
|
|
21966
|
-
});
|
|
21967
|
-
Object.entries(content).forEach(([localId, node]) => {
|
|
21968
|
-
const childDef = lookupContentType(node.kind, node.type);
|
|
21969
|
-
if (childDef !== void 0 && node.data !== void 0) {
|
|
21970
|
-
const result = childDef.payloadSchema.safeParse(node.data);
|
|
21971
|
-
if (!result.success) {
|
|
21972
|
-
addIssue(
|
|
21973
|
-
ctx,
|
|
21974
|
-
[...systemPath, "content", localId, "data"],
|
|
21975
|
-
`Content node "${localId}" (${node.kind}:${node.type}) data failed payload validation: ${result.error.message}`
|
|
21976
|
-
);
|
|
21977
|
-
}
|
|
21978
|
-
}
|
|
21979
|
-
if (node.parentContentId !== void 0 && childDef !== void 0) {
|
|
21980
|
-
const parentNode = content[node.parentContentId];
|
|
21981
|
-
if (parentNode !== void 0) {
|
|
21982
|
-
const parentDef = lookupContentType(parentNode.kind, parentNode.type);
|
|
21983
|
-
if (parentDef !== void 0 && childDef.kind !== parentDef.kind) {
|
|
21984
|
-
addIssue(
|
|
21985
|
-
ctx,
|
|
21986
|
-
[...systemPath, "content", localId, "parentContentId"],
|
|
21987
|
-
`Content node "${localId}" kind "${childDef.kind}" cannot parent under "${node.parentContentId}" kind "${parentDef.kind}": parentContentId must be same-meta-kind (per L19)`
|
|
21988
|
-
);
|
|
21989
|
-
}
|
|
21990
|
-
}
|
|
21991
|
-
}
|
|
21992
|
-
});
|
|
21993
|
-
if (childSystems !== void 0) {
|
|
21994
|
-
Object.entries(childSystems).forEach(([childLocalId, child]) => {
|
|
21995
|
-
validateSystemContent(child, [...systemPath, childKey, childLocalId]);
|
|
21996
|
-
});
|
|
21997
|
-
}
|
|
21998
|
-
}
|
|
21999
|
-
Object.entries(model.systems).forEach(([systemKey, system]) => {
|
|
22000
|
-
validateSystemContent(system, ["systems", systemKey]);
|
|
22001
|
-
});
|
|
22002
21526
|
for (const diagnostic of ontologyCompilation.diagnostics) {
|
|
22003
21527
|
addIssue(ctx, diagnostic.path, diagnostic.message);
|
|
22004
21528
|
}
|
|
@@ -22006,311 +21530,11 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
|
|
|
22006
21530
|
|
|
22007
21531
|
// src/organization-model/defaults.ts
|
|
22008
21532
|
var DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE = {};
|
|
22009
|
-
var DEFAULT_ORGANIZATION_MODEL_ENTITIES2 =
|
|
21533
|
+
var DEFAULT_ORGANIZATION_MODEL_ENTITIES2 = {};
|
|
22010
21534
|
var DEFAULT_ORGANIZATION_MODEL_NAVIGATION = {
|
|
22011
21535
|
sidebar: {
|
|
22012
|
-
primary: {
|
|
22013
|
-
|
|
22014
|
-
type: "surface",
|
|
22015
|
-
label: "Dashboard",
|
|
22016
|
-
path: "/",
|
|
22017
|
-
surfaceType: "dashboard",
|
|
22018
|
-
icon: "dashboard",
|
|
22019
|
-
order: 10,
|
|
22020
|
-
targets: { systems: ["dashboard"] }
|
|
22021
|
-
},
|
|
22022
|
-
business: {
|
|
22023
|
-
type: "group",
|
|
22024
|
-
label: "Business",
|
|
22025
|
-
icon: "briefcase",
|
|
22026
|
-
order: 20,
|
|
22027
|
-
children: {
|
|
22028
|
-
sales: {
|
|
22029
|
-
type: "surface",
|
|
22030
|
-
label: "Sales",
|
|
22031
|
-
path: "/sales",
|
|
22032
|
-
surfaceType: "page",
|
|
22033
|
-
icon: "sales",
|
|
22034
|
-
order: 10,
|
|
22035
|
-
targets: { systems: ["sales"] }
|
|
22036
|
-
},
|
|
22037
|
-
clients: {
|
|
22038
|
-
type: "surface",
|
|
22039
|
-
label: "Clients",
|
|
22040
|
-
path: "/clients",
|
|
22041
|
-
surfaceType: "list",
|
|
22042
|
-
icon: "clients",
|
|
22043
|
-
order: 20,
|
|
22044
|
-
targets: { systems: ["clients"] }
|
|
22045
|
-
},
|
|
22046
|
-
projects: {
|
|
22047
|
-
type: "surface",
|
|
22048
|
-
label: "Projects",
|
|
22049
|
-
path: "/projects",
|
|
22050
|
-
surfaceType: "page",
|
|
22051
|
-
icon: "projects",
|
|
22052
|
-
order: 30,
|
|
22053
|
-
targets: { systems: ["projects"] }
|
|
22054
|
-
}
|
|
22055
|
-
}
|
|
22056
|
-
},
|
|
22057
|
-
operations: {
|
|
22058
|
-
type: "group",
|
|
22059
|
-
label: "Operations",
|
|
22060
|
-
icon: "operations",
|
|
22061
|
-
order: 30,
|
|
22062
|
-
children: {
|
|
22063
|
-
"operations-overview": {
|
|
22064
|
-
type: "surface",
|
|
22065
|
-
label: "Overview",
|
|
22066
|
-
path: "/operations",
|
|
22067
|
-
surfaceType: "page",
|
|
22068
|
-
order: 10,
|
|
22069
|
-
targets: { systems: ["operations.overview"] }
|
|
22070
|
-
},
|
|
22071
|
-
"operations-systems": {
|
|
22072
|
-
type: "surface",
|
|
22073
|
-
label: "Systems",
|
|
22074
|
-
path: "/operations/systems",
|
|
22075
|
-
surfaceType: "page",
|
|
22076
|
-
order: 20,
|
|
22077
|
-
targets: { systems: ["operations"] }
|
|
22078
|
-
},
|
|
22079
|
-
"operations-resources": {
|
|
22080
|
-
type: "surface",
|
|
22081
|
-
label: "Resources",
|
|
22082
|
-
path: "/operations/resources",
|
|
22083
|
-
surfaceType: "list",
|
|
22084
|
-
order: 30,
|
|
22085
|
-
targets: { systems: ["operations.resources"] }
|
|
22086
|
-
},
|
|
22087
|
-
"operations-command-queue": {
|
|
22088
|
-
type: "surface",
|
|
22089
|
-
label: "Command Queue",
|
|
22090
|
-
path: "/operations/command-queue",
|
|
22091
|
-
surfaceType: "list",
|
|
22092
|
-
order: 40,
|
|
22093
|
-
targets: { systems: ["operations.command-queue"] }
|
|
22094
|
-
},
|
|
22095
|
-
"operations-task-scheduler": {
|
|
22096
|
-
type: "surface",
|
|
22097
|
-
label: "Task Scheduler",
|
|
22098
|
-
path: "/operations/task-scheduler",
|
|
22099
|
-
surfaceType: "list",
|
|
22100
|
-
order: 50,
|
|
22101
|
-
targets: { systems: ["operations.task-scheduler"] }
|
|
22102
|
-
}
|
|
22103
|
-
}
|
|
22104
|
-
},
|
|
22105
|
-
monitoring: {
|
|
22106
|
-
type: "group",
|
|
22107
|
-
label: "Monitoring",
|
|
22108
|
-
icon: "monitoring",
|
|
22109
|
-
order: 40,
|
|
22110
|
-
children: {
|
|
22111
|
-
"monitoring-overview": {
|
|
22112
|
-
type: "surface",
|
|
22113
|
-
label: "Overview",
|
|
22114
|
-
path: "/monitoring",
|
|
22115
|
-
surfaceType: "page",
|
|
22116
|
-
order: 10,
|
|
22117
|
-
targets: { systems: ["monitoring"] }
|
|
22118
|
-
},
|
|
22119
|
-
"monitoring-calendar": {
|
|
22120
|
-
type: "surface",
|
|
22121
|
-
label: "Calendar",
|
|
22122
|
-
path: "/monitoring/calendar",
|
|
22123
|
-
surfaceType: "page",
|
|
22124
|
-
order: 20,
|
|
22125
|
-
targets: { systems: ["monitoring.calendar"] }
|
|
22126
|
-
},
|
|
22127
|
-
"monitoring-activity-log": {
|
|
22128
|
-
type: "surface",
|
|
22129
|
-
label: "Activity Log",
|
|
22130
|
-
path: "/monitoring/activity-log",
|
|
22131
|
-
surfaceType: "list",
|
|
22132
|
-
order: 30,
|
|
22133
|
-
targets: { systems: ["monitoring.activity-log"] }
|
|
22134
|
-
},
|
|
22135
|
-
"monitoring-execution-logs": {
|
|
22136
|
-
type: "surface",
|
|
22137
|
-
label: "Execution Logs",
|
|
22138
|
-
path: "/monitoring/execution-logs",
|
|
22139
|
-
surfaceType: "list",
|
|
22140
|
-
order: 40,
|
|
22141
|
-
targets: { systems: ["monitoring.execution-logs"] }
|
|
22142
|
-
},
|
|
22143
|
-
"monitoring-execution-health": {
|
|
22144
|
-
type: "surface",
|
|
22145
|
-
label: "Execution Health",
|
|
22146
|
-
path: "/monitoring/execution-health",
|
|
22147
|
-
surfaceType: "dashboard",
|
|
22148
|
-
order: 50,
|
|
22149
|
-
targets: { systems: ["monitoring.execution-health"] }
|
|
22150
|
-
},
|
|
22151
|
-
"monitoring-notifications": {
|
|
22152
|
-
type: "surface",
|
|
22153
|
-
label: "Notifications",
|
|
22154
|
-
path: "/monitoring/notifications",
|
|
22155
|
-
surfaceType: "list",
|
|
22156
|
-
order: 60,
|
|
22157
|
-
targets: { systems: ["monitoring.notifications"] }
|
|
22158
|
-
},
|
|
22159
|
-
"monitoring-requests": {
|
|
22160
|
-
type: "surface",
|
|
22161
|
-
label: "Requests",
|
|
22162
|
-
path: "/monitoring/requests",
|
|
22163
|
-
surfaceType: "list",
|
|
22164
|
-
order: 70,
|
|
22165
|
-
targets: { systems: ["monitoring.submitted-requests"] }
|
|
22166
|
-
}
|
|
22167
|
-
}
|
|
22168
|
-
},
|
|
22169
|
-
knowledge: {
|
|
22170
|
-
type: "surface",
|
|
22171
|
-
label: "Knowledge Base",
|
|
22172
|
-
path: "/knowledge",
|
|
22173
|
-
surfaceType: "page",
|
|
22174
|
-
icon: "knowledge",
|
|
22175
|
-
order: 50
|
|
22176
|
-
}
|
|
22177
|
-
},
|
|
22178
|
-
bottom: {
|
|
22179
|
-
settings: {
|
|
22180
|
-
type: "group",
|
|
22181
|
-
label: "Settings",
|
|
22182
|
-
icon: "settings",
|
|
22183
|
-
order: 10,
|
|
22184
|
-
children: {
|
|
22185
|
-
"settings-account": {
|
|
22186
|
-
type: "surface",
|
|
22187
|
-
label: "Account",
|
|
22188
|
-
path: "/settings/account",
|
|
22189
|
-
surfaceType: "settings",
|
|
22190
|
-
order: 10,
|
|
22191
|
-
targets: { systems: ["settings.account"] }
|
|
22192
|
-
},
|
|
22193
|
-
"settings-appearance": {
|
|
22194
|
-
type: "surface",
|
|
22195
|
-
label: "Appearance",
|
|
22196
|
-
path: "/settings/appearance",
|
|
22197
|
-
surfaceType: "settings",
|
|
22198
|
-
order: 20,
|
|
22199
|
-
targets: { systems: ["settings.appearance"] }
|
|
22200
|
-
},
|
|
22201
|
-
"settings-roles": {
|
|
22202
|
-
type: "surface",
|
|
22203
|
-
label: "My Roles",
|
|
22204
|
-
path: "/settings/roles",
|
|
22205
|
-
surfaceType: "settings",
|
|
22206
|
-
order: 30,
|
|
22207
|
-
targets: { systems: ["settings.roles"] }
|
|
22208
|
-
},
|
|
22209
|
-
"settings-organization": {
|
|
22210
|
-
type: "surface",
|
|
22211
|
-
label: "Organization",
|
|
22212
|
-
path: "/settings/organization",
|
|
22213
|
-
surfaceType: "settings",
|
|
22214
|
-
order: 40,
|
|
22215
|
-
targets: { systems: ["settings.organization"] }
|
|
22216
|
-
},
|
|
22217
|
-
"settings-credentials": {
|
|
22218
|
-
type: "surface",
|
|
22219
|
-
label: "Credentials",
|
|
22220
|
-
path: "/settings/credentials",
|
|
22221
|
-
surfaceType: "settings",
|
|
22222
|
-
order: 50,
|
|
22223
|
-
targets: { systems: ["settings.credentials"] }
|
|
22224
|
-
},
|
|
22225
|
-
"settings-api-keys": {
|
|
22226
|
-
type: "surface",
|
|
22227
|
-
label: "API Keys",
|
|
22228
|
-
path: "/settings/api-keys",
|
|
22229
|
-
surfaceType: "settings",
|
|
22230
|
-
order: 60,
|
|
22231
|
-
targets: { systems: ["settings.api-keys"] }
|
|
22232
|
-
},
|
|
22233
|
-
"settings-webhooks": {
|
|
22234
|
-
type: "surface",
|
|
22235
|
-
label: "Webhooks",
|
|
22236
|
-
path: "/settings/webhooks",
|
|
22237
|
-
surfaceType: "settings",
|
|
22238
|
-
order: 70,
|
|
22239
|
-
targets: { systems: ["settings.webhooks"] }
|
|
22240
|
-
},
|
|
22241
|
-
"settings-deployments": {
|
|
22242
|
-
type: "surface",
|
|
22243
|
-
label: "Deployments",
|
|
22244
|
-
path: "/settings/deployments",
|
|
22245
|
-
surfaceType: "settings",
|
|
22246
|
-
order: 80,
|
|
22247
|
-
targets: { systems: ["settings.deployments"] }
|
|
22248
|
-
}
|
|
22249
|
-
}
|
|
22250
|
-
},
|
|
22251
|
-
admin: {
|
|
22252
|
-
type: "group",
|
|
22253
|
-
label: "Admin",
|
|
22254
|
-
icon: "admin",
|
|
22255
|
-
order: 20,
|
|
22256
|
-
children: {
|
|
22257
|
-
"admin-dashboard": {
|
|
22258
|
-
type: "surface",
|
|
22259
|
-
label: "Dashboard",
|
|
22260
|
-
path: "/admin/dashboard",
|
|
22261
|
-
surfaceType: "dashboard",
|
|
22262
|
-
order: 10,
|
|
22263
|
-
targets: { systems: ["admin"] },
|
|
22264
|
-
requiresAdmin: true
|
|
22265
|
-
},
|
|
22266
|
-
"admin-system-health": {
|
|
22267
|
-
type: "surface",
|
|
22268
|
-
label: "System Health",
|
|
22269
|
-
path: "/admin/system-health",
|
|
22270
|
-
surfaceType: "dashboard",
|
|
22271
|
-
order: 20,
|
|
22272
|
-
targets: { systems: ["admin.system-health"] },
|
|
22273
|
-
requiresAdmin: true
|
|
22274
|
-
},
|
|
22275
|
-
"admin-organizations": {
|
|
22276
|
-
type: "surface",
|
|
22277
|
-
label: "Organizations",
|
|
22278
|
-
path: "/admin/organizations",
|
|
22279
|
-
surfaceType: "list",
|
|
22280
|
-
order: 30,
|
|
22281
|
-
targets: { systems: ["admin.organizations"] },
|
|
22282
|
-
requiresAdmin: true
|
|
22283
|
-
},
|
|
22284
|
-
"admin-users": {
|
|
22285
|
-
type: "surface",
|
|
22286
|
-
label: "Users",
|
|
22287
|
-
path: "/admin/users",
|
|
22288
|
-
surfaceType: "list",
|
|
22289
|
-
order: 40,
|
|
22290
|
-
targets: { systems: ["admin.users"] },
|
|
22291
|
-
requiresAdmin: true
|
|
22292
|
-
},
|
|
22293
|
-
"admin-design-showcase": {
|
|
22294
|
-
type: "surface",
|
|
22295
|
-
label: "Design Showcase",
|
|
22296
|
-
path: "/admin/design-showcase",
|
|
22297
|
-
surfaceType: "page",
|
|
22298
|
-
order: 50,
|
|
22299
|
-
targets: { systems: ["admin.design-showcase"] },
|
|
22300
|
-
requiresAdmin: true
|
|
22301
|
-
},
|
|
22302
|
-
"admin-debug": {
|
|
22303
|
-
type: "surface",
|
|
22304
|
-
label: "Debug",
|
|
22305
|
-
path: "/admin/debug",
|
|
22306
|
-
surfaceType: "page",
|
|
22307
|
-
order: 60,
|
|
22308
|
-
targets: { systems: ["admin.debug"] },
|
|
22309
|
-
requiresAdmin: true
|
|
22310
|
-
}
|
|
22311
|
-
}
|
|
22312
|
-
}
|
|
22313
|
-
}
|
|
21536
|
+
primary: {},
|
|
21537
|
+
bottom: {}
|
|
22314
21538
|
}
|
|
22315
21539
|
};
|
|
22316
21540
|
var DEFAULT_ORGANIZATION_MODEL = {
|
|
@@ -22323,406 +21547,19 @@ var DEFAULT_ORGANIZATION_MODEL = {
|
|
|
22323
21547
|
offerings: DEFAULT_ORGANIZATION_MODEL_OFFERINGS,
|
|
22324
21548
|
roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
|
|
22325
21549
|
goals: DEFAULT_ORGANIZATION_MODEL_GOALS,
|
|
22326
|
-
systems
|
|
22327
|
-
|
|
22328
|
-
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
enabled: true,
|
|
22332
|
-
lifecycle: "active",
|
|
22333
|
-
path: "/",
|
|
22334
|
-
icon: "dashboard"
|
|
22335
|
-
},
|
|
22336
|
-
platform: {
|
|
22337
|
-
id: "platform",
|
|
22338
|
-
order: 30,
|
|
22339
|
-
label: "Platform",
|
|
22340
|
-
description: "Elevasis platform architecture, capabilities, and implementation patterns",
|
|
22341
|
-
enabled: true,
|
|
22342
|
-
lifecycle: "active",
|
|
22343
|
-
color: "cyan",
|
|
22344
|
-
icon: "platform"
|
|
22345
|
-
},
|
|
22346
|
-
finance: {
|
|
22347
|
-
id: "finance",
|
|
22348
|
-
order: 40,
|
|
22349
|
-
label: "Finance",
|
|
22350
|
-
description: "Finance operations, accounting, billing, reconciliation, and tax prep",
|
|
22351
|
-
enabled: true,
|
|
22352
|
-
lifecycle: "active",
|
|
22353
|
-
color: "green",
|
|
22354
|
-
icon: "finance"
|
|
22355
|
-
},
|
|
22356
|
-
sales: {
|
|
22357
|
-
id: "sales",
|
|
22358
|
-
order: 60,
|
|
22359
|
-
label: "Sales",
|
|
22360
|
-
description: "Revenue workflows and customer acquisition",
|
|
22361
|
-
enabled: true,
|
|
22362
|
-
lifecycle: "active",
|
|
22363
|
-
color: "blue",
|
|
22364
|
-
icon: "sales",
|
|
22365
|
-
path: "/sales"
|
|
22366
|
-
},
|
|
22367
|
-
"sales.crm": {
|
|
22368
|
-
id: "sales.crm",
|
|
22369
|
-
order: 70,
|
|
22370
|
-
label: "CRM",
|
|
22371
|
-
description: "Relationship pipeline and deal management",
|
|
22372
|
-
enabled: true,
|
|
22373
|
-
lifecycle: "active",
|
|
22374
|
-
actions: Object.values(CRM_ACTION_ENTRIES).map((action) => ({
|
|
22375
|
-
actionId: action.id,
|
|
22376
|
-
intent: "exposes"
|
|
22377
|
-
})),
|
|
22378
|
-
color: "blue",
|
|
22379
|
-
icon: "crm",
|
|
22380
|
-
path: "/crm"
|
|
22381
|
-
},
|
|
22382
|
-
"sales.lead-gen": {
|
|
22383
|
-
id: "sales.lead-gen",
|
|
22384
|
-
order: 80,
|
|
22385
|
-
label: "Lead Gen",
|
|
22386
|
-
description: "Prospecting, qualification, and outreach preparation",
|
|
22387
|
-
enabled: true,
|
|
22388
|
-
lifecycle: "active",
|
|
22389
|
-
actions: Object.values(LEAD_GEN_ACTION_ENTRIES).map((action) => ({
|
|
22390
|
-
actionId: action.id,
|
|
22391
|
-
intent: "exposes"
|
|
22392
|
-
})),
|
|
22393
|
-
color: "cyan",
|
|
22394
|
-
icon: "lead-gen",
|
|
22395
|
-
path: "/lead-gen"
|
|
22396
|
-
},
|
|
22397
|
-
projects: {
|
|
22398
|
-
id: "projects",
|
|
22399
|
-
order: 90,
|
|
22400
|
-
label: "Projects",
|
|
22401
|
-
description: "Projects, milestones, and client work execution",
|
|
22402
|
-
enabled: true,
|
|
22403
|
-
lifecycle: "active",
|
|
22404
|
-
color: "orange",
|
|
22405
|
-
icon: "projects",
|
|
22406
|
-
path: "/projects"
|
|
22407
|
-
},
|
|
22408
|
-
clients: {
|
|
22409
|
-
id: "clients",
|
|
22410
|
-
order: 100,
|
|
22411
|
-
label: "Clients",
|
|
22412
|
-
description: "Client relationships, accounts, and business context",
|
|
22413
|
-
enabled: true,
|
|
22414
|
-
lifecycle: "active",
|
|
22415
|
-
color: "orange",
|
|
22416
|
-
icon: "clients",
|
|
22417
|
-
path: "/clients"
|
|
22418
|
-
},
|
|
22419
|
-
operations: {
|
|
22420
|
-
id: "operations",
|
|
22421
|
-
order: 110,
|
|
22422
|
-
label: "Operations",
|
|
22423
|
-
description: "Operational resources, topology, and orchestration visibility",
|
|
22424
|
-
enabled: true,
|
|
22425
|
-
lifecycle: "active",
|
|
22426
|
-
color: "violet",
|
|
22427
|
-
icon: "operations"
|
|
22428
|
-
},
|
|
22429
|
-
"knowledge.command-view": {
|
|
22430
|
-
id: "knowledge.command-view",
|
|
22431
|
-
order: 120,
|
|
22432
|
-
label: "Command View",
|
|
22433
|
-
enabled: true,
|
|
22434
|
-
lifecycle: "active",
|
|
22435
|
-
path: "/knowledge/command-view",
|
|
22436
|
-
devOnly: true
|
|
22437
|
-
},
|
|
22438
|
-
"operations.overview": {
|
|
22439
|
-
id: "operations.overview",
|
|
22440
|
-
order: 130,
|
|
22441
|
-
label: "Overview",
|
|
22442
|
-
enabled: true,
|
|
22443
|
-
lifecycle: "active",
|
|
22444
|
-
path: "/operations"
|
|
22445
|
-
},
|
|
22446
|
-
"operations.resources": {
|
|
22447
|
-
id: "operations.resources",
|
|
22448
|
-
order: 140,
|
|
22449
|
-
label: "Resources",
|
|
22450
|
-
enabled: true,
|
|
22451
|
-
lifecycle: "active",
|
|
22452
|
-
path: "/operations/resources"
|
|
22453
|
-
},
|
|
22454
|
-
"operations.command-queue": {
|
|
22455
|
-
id: "operations.command-queue",
|
|
22456
|
-
order: 150,
|
|
22457
|
-
label: "Command Queue",
|
|
22458
|
-
enabled: true,
|
|
22459
|
-
lifecycle: "active",
|
|
22460
|
-
path: "/operations/command-queue"
|
|
22461
|
-
},
|
|
22462
|
-
"operations.sessions": {
|
|
22463
|
-
id: "operations.sessions",
|
|
22464
|
-
order: 160,
|
|
22465
|
-
label: "Sessions",
|
|
22466
|
-
enabled: false,
|
|
22467
|
-
lifecycle: "deprecated",
|
|
22468
|
-
path: "/operations/sessions"
|
|
22469
|
-
},
|
|
22470
|
-
"operations.task-scheduler": {
|
|
22471
|
-
id: "operations.task-scheduler",
|
|
22472
|
-
order: 170,
|
|
22473
|
-
label: "Task Scheduler",
|
|
22474
|
-
enabled: true,
|
|
22475
|
-
lifecycle: "active",
|
|
22476
|
-
path: "/operations/task-scheduler"
|
|
22477
|
-
},
|
|
22478
|
-
monitoring: {
|
|
22479
|
-
id: "monitoring",
|
|
22480
|
-
order: 180,
|
|
22481
|
-
label: "Monitoring",
|
|
22482
|
-
enabled: true,
|
|
22483
|
-
lifecycle: "active"
|
|
22484
|
-
},
|
|
22485
|
-
"monitoring.calendar": {
|
|
22486
|
-
id: "monitoring.calendar",
|
|
22487
|
-
order: 190,
|
|
22488
|
-
label: "Calendar",
|
|
22489
|
-
description: "Google Calendar events and agenda views",
|
|
22490
|
-
enabled: true,
|
|
22491
|
-
lifecycle: "active",
|
|
22492
|
-
path: "/monitoring/calendar",
|
|
22493
|
-
icon: "calendar"
|
|
22494
|
-
},
|
|
22495
|
-
"monitoring.activity-log": {
|
|
22496
|
-
id: "monitoring.activity-log",
|
|
22497
|
-
order: 200,
|
|
22498
|
-
label: "Activity Log",
|
|
22499
|
-
enabled: true,
|
|
22500
|
-
lifecycle: "active",
|
|
22501
|
-
path: "/monitoring/activity-log"
|
|
22502
|
-
},
|
|
22503
|
-
"monitoring.execution-logs": {
|
|
22504
|
-
id: "monitoring.execution-logs",
|
|
22505
|
-
order: 210,
|
|
22506
|
-
label: "Execution Logs",
|
|
22507
|
-
enabled: true,
|
|
22508
|
-
lifecycle: "active",
|
|
22509
|
-
path: "/monitoring/execution-logs"
|
|
22510
|
-
},
|
|
22511
|
-
"monitoring.execution-health": {
|
|
22512
|
-
id: "monitoring.execution-health",
|
|
22513
|
-
order: 220,
|
|
22514
|
-
label: "Execution Health",
|
|
22515
|
-
enabled: true,
|
|
22516
|
-
lifecycle: "active",
|
|
22517
|
-
path: "/monitoring/execution-health"
|
|
22518
|
-
},
|
|
22519
|
-
"monitoring.cost-analytics": {
|
|
22520
|
-
id: "monitoring.cost-analytics",
|
|
22521
|
-
order: 230,
|
|
22522
|
-
label: "Cost Analytics",
|
|
22523
|
-
enabled: false,
|
|
22524
|
-
lifecycle: "deprecated",
|
|
22525
|
-
path: "/monitoring/cost-analytics"
|
|
22526
|
-
},
|
|
22527
|
-
"monitoring.notifications": {
|
|
22528
|
-
id: "monitoring.notifications",
|
|
22529
|
-
order: 240,
|
|
22530
|
-
label: "Notifications",
|
|
22531
|
-
enabled: true,
|
|
22532
|
-
lifecycle: "active",
|
|
22533
|
-
path: "/monitoring/notifications"
|
|
22534
|
-
},
|
|
22535
|
-
"monitoring.submitted-requests": {
|
|
22536
|
-
id: "monitoring.submitted-requests",
|
|
22537
|
-
order: 250,
|
|
22538
|
-
label: "Submitted Requests",
|
|
22539
|
-
enabled: true,
|
|
22540
|
-
lifecycle: "active",
|
|
22541
|
-
path: "/monitoring/requests"
|
|
22542
|
-
},
|
|
22543
|
-
settings: {
|
|
22544
|
-
id: "settings",
|
|
22545
|
-
order: 260,
|
|
22546
|
-
label: "Settings",
|
|
22547
|
-
enabled: true,
|
|
22548
|
-
lifecycle: "active",
|
|
22549
|
-
icon: "settings"
|
|
22550
|
-
},
|
|
22551
|
-
"settings.account": {
|
|
22552
|
-
id: "settings.account",
|
|
22553
|
-
order: 270,
|
|
22554
|
-
label: "Account",
|
|
22555
|
-
enabled: true,
|
|
22556
|
-
lifecycle: "active",
|
|
22557
|
-
path: "/settings/account"
|
|
22558
|
-
},
|
|
22559
|
-
"settings.appearance": {
|
|
22560
|
-
id: "settings.appearance",
|
|
22561
|
-
order: 280,
|
|
22562
|
-
label: "Appearance",
|
|
22563
|
-
enabled: true,
|
|
22564
|
-
lifecycle: "active",
|
|
22565
|
-
path: "/settings/appearance"
|
|
22566
|
-
},
|
|
22567
|
-
"settings.roles": {
|
|
22568
|
-
id: "settings.roles",
|
|
22569
|
-
order: 290,
|
|
22570
|
-
label: "My Roles",
|
|
22571
|
-
enabled: true,
|
|
22572
|
-
lifecycle: "active",
|
|
22573
|
-
path: "/settings/roles"
|
|
22574
|
-
},
|
|
22575
|
-
"settings.organization": {
|
|
22576
|
-
id: "settings.organization",
|
|
22577
|
-
order: 300,
|
|
22578
|
-
label: "Organization",
|
|
22579
|
-
enabled: true,
|
|
22580
|
-
lifecycle: "active",
|
|
22581
|
-
path: "/settings/organization"
|
|
22582
|
-
},
|
|
22583
|
-
"settings.credentials": {
|
|
22584
|
-
id: "settings.credentials",
|
|
22585
|
-
order: 310,
|
|
22586
|
-
label: "Credentials",
|
|
22587
|
-
enabled: true,
|
|
22588
|
-
lifecycle: "active",
|
|
22589
|
-
path: "/settings/credentials"
|
|
22590
|
-
},
|
|
22591
|
-
"settings.api-keys": {
|
|
22592
|
-
id: "settings.api-keys",
|
|
22593
|
-
order: 320,
|
|
22594
|
-
label: "API Keys",
|
|
22595
|
-
enabled: true,
|
|
22596
|
-
lifecycle: "active",
|
|
22597
|
-
path: "/settings/api-keys"
|
|
22598
|
-
},
|
|
22599
|
-
"settings.webhooks": {
|
|
22600
|
-
id: "settings.webhooks",
|
|
22601
|
-
order: 330,
|
|
22602
|
-
label: "Webhooks",
|
|
22603
|
-
enabled: true,
|
|
22604
|
-
lifecycle: "active",
|
|
22605
|
-
path: "/settings/webhooks"
|
|
22606
|
-
},
|
|
22607
|
-
"settings.deployments": {
|
|
22608
|
-
id: "settings.deployments",
|
|
22609
|
-
order: 340,
|
|
22610
|
-
label: "Deployments",
|
|
22611
|
-
enabled: true,
|
|
22612
|
-
lifecycle: "active",
|
|
22613
|
-
path: "/settings/deployments"
|
|
22614
|
-
},
|
|
22615
|
-
admin: {
|
|
22616
|
-
id: "admin",
|
|
22617
|
-
order: 350,
|
|
22618
|
-
label: "Admin",
|
|
22619
|
-
enabled: true,
|
|
22620
|
-
lifecycle: "active",
|
|
22621
|
-
path: "/admin",
|
|
22622
|
-
icon: "admin",
|
|
22623
|
-
requiresAdmin: true
|
|
22624
|
-
},
|
|
22625
|
-
"admin.system-health": {
|
|
22626
|
-
id: "admin.system-health",
|
|
22627
|
-
order: 360,
|
|
22628
|
-
label: "System Health",
|
|
22629
|
-
enabled: true,
|
|
22630
|
-
lifecycle: "active",
|
|
22631
|
-
path: "/admin/system-health"
|
|
22632
|
-
},
|
|
22633
|
-
"admin.organizations": {
|
|
22634
|
-
id: "admin.organizations",
|
|
22635
|
-
order: 370,
|
|
22636
|
-
label: "Organizations",
|
|
22637
|
-
enabled: true,
|
|
22638
|
-
lifecycle: "active",
|
|
22639
|
-
path: "/admin/organizations"
|
|
22640
|
-
},
|
|
22641
|
-
"admin.users": {
|
|
22642
|
-
id: "admin.users",
|
|
22643
|
-
order: 380,
|
|
22644
|
-
label: "Users",
|
|
22645
|
-
enabled: true,
|
|
22646
|
-
lifecycle: "active",
|
|
22647
|
-
path: "/admin/users"
|
|
22648
|
-
},
|
|
22649
|
-
"admin.design-showcase": {
|
|
22650
|
-
id: "admin.design-showcase",
|
|
22651
|
-
order: 390,
|
|
22652
|
-
label: "Design Showcase",
|
|
22653
|
-
enabled: true,
|
|
22654
|
-
lifecycle: "active",
|
|
22655
|
-
path: "/admin/design-showcase"
|
|
22656
|
-
},
|
|
22657
|
-
"admin.debug": {
|
|
22658
|
-
id: "admin.debug",
|
|
22659
|
-
order: 400,
|
|
22660
|
-
label: "Debug",
|
|
22661
|
-
enabled: true,
|
|
22662
|
-
lifecycle: "active",
|
|
22663
|
-
path: "/admin/debug"
|
|
22664
|
-
},
|
|
22665
|
-
archive: {
|
|
22666
|
-
id: "archive",
|
|
22667
|
-
order: 410,
|
|
22668
|
-
label: "Archive",
|
|
22669
|
-
enabled: true,
|
|
22670
|
-
lifecycle: "active",
|
|
22671
|
-
path: "/archive",
|
|
22672
|
-
icon: "archive",
|
|
22673
|
-
devOnly: true
|
|
22674
|
-
},
|
|
22675
|
-
"archive.agent-chat": {
|
|
22676
|
-
id: "archive.agent-chat",
|
|
22677
|
-
order: 420,
|
|
22678
|
-
label: "Agent Chat",
|
|
22679
|
-
enabled: true,
|
|
22680
|
-
lifecycle: "active",
|
|
22681
|
-
path: "/archive/agent-chat"
|
|
22682
|
-
},
|
|
22683
|
-
"archive.execution-runner": {
|
|
22684
|
-
id: "archive.execution-runner",
|
|
22685
|
-
order: 430,
|
|
22686
|
-
label: "Execution Runner",
|
|
22687
|
-
enabled: true,
|
|
22688
|
-
lifecycle: "active",
|
|
22689
|
-
path: "/archive/execution-runner"
|
|
22690
|
-
},
|
|
22691
|
-
seo: {
|
|
22692
|
-
id: "seo",
|
|
22693
|
-
order: 440,
|
|
22694
|
-
label: "SEO",
|
|
22695
|
-
enabled: false,
|
|
22696
|
-
lifecycle: "deprecated",
|
|
22697
|
-
path: "/seo"
|
|
22698
|
-
},
|
|
22699
|
-
knowledge: {
|
|
22700
|
-
id: "knowledge",
|
|
22701
|
-
order: 450,
|
|
22702
|
-
label: "Knowledge",
|
|
22703
|
-
description: "Operational knowledge, playbooks, and strategy docs",
|
|
22704
|
-
enabled: true,
|
|
22705
|
-
lifecycle: "active",
|
|
22706
|
-
color: "teal",
|
|
22707
|
-
icon: "knowledge"
|
|
22708
|
-
},
|
|
22709
|
-
"knowledge.base": {
|
|
22710
|
-
id: "knowledge.base",
|
|
22711
|
-
order: 460,
|
|
22712
|
-
label: "Knowledge Base",
|
|
22713
|
-
enabled: true,
|
|
22714
|
-
lifecycle: "active",
|
|
22715
|
-
path: "/knowledge"
|
|
22716
|
-
}
|
|
22717
|
-
},
|
|
21550
|
+
// Generic empty systems map. Elevasis-specific systems (platform, sales, sales.crm,
|
|
21551
|
+
// sales.lead-gen, monitoring, settings, admin, etc.) have been relocated to
|
|
21552
|
+
// `@repo/elevasis-core/src/organization-model/systems.ts` via `canonicalOrganizationModel`.
|
|
21553
|
+
// Tenant OM configs supply their own systems via `resolveOrganizationModel`.
|
|
21554
|
+
systems: {},
|
|
22718
21555
|
ontology: DEFAULT_ONTOLOGY_SCOPE,
|
|
22719
21556
|
resources: DEFAULT_ORGANIZATION_MODEL_RESOURCES,
|
|
22720
21557
|
topology: DEFAULT_ORGANIZATION_MODEL_TOPOLOGY,
|
|
22721
|
-
actions
|
|
21558
|
+
// Generic empty actions map. Elevasis-specific action entries have been relocated to
|
|
21559
|
+
// `@repo/elevasis-core/src/organization-model/actions.ts`.
|
|
21560
|
+
actions: {},
|
|
22722
21561
|
entities: DEFAULT_ORGANIZATION_MODEL_ENTITIES2,
|
|
22723
21562
|
policies: DEFAULT_ORGANIZATION_MODEL_POLICIES,
|
|
22724
|
-
// Phase 4 (D1): statuses top-level field removed; bridge status mirrors may
|
|
22725
|
-
// still project from System.content, but primary authoring belongs in ontology.
|
|
22726
21563
|
knowledge: DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE
|
|
22727
21564
|
};
|
|
22728
21565
|
|