@elevasis/core 0.15.0 → 0.16.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 (88) hide show
  1. package/dist/index.d.ts +1718 -19
  2. package/dist/index.js +369 -25
  3. package/dist/organization-model/index.d.ts +1718 -19
  4. package/dist/organization-model/index.js +369 -25
  5. package/dist/test-utils/index.d.ts +1108 -371
  6. package/dist/test-utils/index.js +357 -17
  7. package/package.json +5 -1
  8. package/src/__tests__/publish.test.ts +14 -13
  9. package/src/__tests__/template-core-compatibility.test.ts +4 -4
  10. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +1109 -882
  11. package/src/auth/multi-tenancy/index.ts +3 -0
  12. package/src/auth/multi-tenancy/theme-presets.ts +45 -0
  13. package/src/auth/multi-tenancy/types.ts +57 -83
  14. package/src/auth/multi-tenancy/users/api-schemas.ts +165 -194
  15. package/src/business/acquisition/activity-events.ts +13 -4
  16. package/src/business/acquisition/api-schemas.test.ts +315 -4
  17. package/src/business/acquisition/api-schemas.ts +122 -8
  18. package/src/business/acquisition/build-templates.ts +44 -0
  19. package/src/business/acquisition/crm-next-action.test.ts +262 -0
  20. package/src/business/acquisition/crm-next-action.ts +220 -0
  21. package/src/business/acquisition/crm-priority.test.ts +216 -0
  22. package/src/business/acquisition/crm-priority.ts +349 -0
  23. package/src/business/acquisition/crm-state-actions.test.ts +151 -160
  24. package/src/business/acquisition/deal-ownership.test.ts +351 -0
  25. package/src/business/acquisition/deal-ownership.ts +120 -0
  26. package/src/business/acquisition/derive-actions.test.ts +101 -37
  27. package/src/business/acquisition/derive-actions.ts +102 -87
  28. package/src/business/acquisition/index.ts +10 -0
  29. package/src/business/acquisition/types.ts +400 -366
  30. package/src/business/crm/api-schemas.ts +40 -0
  31. package/src/business/crm/index.ts +1 -0
  32. package/src/business/deals/api-schemas.ts +79 -0
  33. package/src/business/deals/index.ts +1 -0
  34. package/src/business/projects/types.ts +124 -88
  35. package/src/execution/core/runner-types.ts +61 -80
  36. package/src/execution/engine/index.ts +4 -3
  37. package/src/execution/engine/tools/integration/server/adapters/gmail/gmail-tools.ts +105 -104
  38. package/src/execution/engine/tools/integration/server/adapters/instantly/instantly-tools.ts +1474 -1473
  39. package/src/execution/engine/tools/integration/server/adapters/millionverifier/millionverifier-tools.ts +103 -102
  40. package/src/execution/engine/tools/integration/server/adapters/signature-api/signature-api-tools.ts +182 -179
  41. package/src/execution/engine/tools/integration/server/adapters/stripe/stripe-tools.ts +310 -309
  42. package/src/execution/engine/tools/integration/tool.ts +255 -253
  43. package/src/execution/engine/tools/lead-service-types.ts +939 -924
  44. package/src/execution/engine/tools/messages.ts +43 -0
  45. package/src/execution/engine/tools/platform/acquisition/list-tools.ts +6 -5
  46. package/src/execution/engine/tools/platform/acquisition/types.ts +5 -2
  47. package/src/execution/engine/tools/platform/email/types.ts +97 -96
  48. package/src/execution/engine/tools/registry.ts +4 -3
  49. package/src/execution/engine/tools/tool-maps.ts +3 -1
  50. package/src/execution/engine/tools/types.ts +234 -233
  51. package/src/execution/engine/workflow/types.ts +195 -193
  52. package/src/execution/external/api-schemas.ts +40 -0
  53. package/src/execution/external/index.ts +1 -0
  54. package/src/knowledge/README.md +32 -0
  55. package/src/knowledge/__tests__/queries.test.ts +504 -0
  56. package/src/knowledge/format.ts +99 -0
  57. package/src/knowledge/index.ts +5 -0
  58. package/src/knowledge/queries.ts +256 -0
  59. package/src/organization-model/__tests__/defaults.test.ts +172 -172
  60. package/src/organization-model/__tests__/foundation.test.ts +7 -7
  61. package/src/organization-model/__tests__/icons.test.ts +27 -0
  62. package/src/organization-model/__tests__/knowledge.test.ts +214 -0
  63. package/src/organization-model/contracts.ts +17 -15
  64. package/src/organization-model/defaults.ts +74 -19
  65. package/src/organization-model/domains/knowledge.ts +53 -0
  66. package/src/organization-model/domains/navigation.ts +416 -399
  67. package/src/organization-model/domains/prospecting.ts +204 -1
  68. package/src/organization-model/domains/sales.test.ts +29 -0
  69. package/src/organization-model/domains/sales.ts +102 -0
  70. package/src/organization-model/domains/shared.ts +6 -5
  71. package/src/organization-model/foundation.ts +10 -6
  72. package/src/organization-model/graph/build.ts +209 -182
  73. package/src/organization-model/graph/schema.ts +37 -34
  74. package/src/organization-model/graph/types.ts +47 -31
  75. package/src/organization-model/icons.ts +81 -0
  76. package/src/organization-model/index.ts +8 -3
  77. package/src/organization-model/organization-model.mdx +1 -1
  78. package/src/organization-model/published.ts +103 -86
  79. package/src/organization-model/schema.ts +90 -85
  80. package/src/organization-model/types.ts +42 -35
  81. package/src/platform/constants/versions.ts +1 -1
  82. package/src/platform/index.ts +23 -27
  83. package/src/platform/registry/index.ts +0 -4
  84. package/src/platform/registry/resource-registry.ts +0 -77
  85. package/src/platform/registry/serialized-types.ts +148 -219
  86. package/src/platform/registry/stats-types.ts +60 -60
  87. package/src/reference/_generated/contracts.md +829 -595
  88. package/src/supabase/database.types.ts +2978 -2958
@@ -1,11 +1,82 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  // src/organization-model/schema.ts
4
+ var ORGANIZATION_MODEL_ICON_TOKENS = [
5
+ "nav.dashboard",
6
+ "nav.sales",
7
+ "nav.crm",
8
+ "nav.lead-gen",
9
+ "nav.projects",
10
+ "nav.operations",
11
+ "nav.monitoring",
12
+ "nav.knowledge",
13
+ "nav.settings",
14
+ "nav.admin",
15
+ "nav.archive",
16
+ "knowledge.playbook",
17
+ "knowledge.strategy",
18
+ "knowledge.reference",
19
+ "feature.dashboard",
20
+ "feature.sales",
21
+ "feature.crm",
22
+ "feature.finance",
23
+ "feature.lead-gen",
24
+ "feature.platform",
25
+ "feature.projects",
26
+ "feature.operations",
27
+ "feature.knowledge",
28
+ "feature.monitoring",
29
+ "feature.settings",
30
+ "feature.admin",
31
+ "feature.archive",
32
+ "feature.seo",
33
+ "resource.agent",
34
+ "resource.workflow",
35
+ "resource.integration",
36
+ "resource.database",
37
+ "resource.user",
38
+ "resource.team",
39
+ "integration.gmail",
40
+ "integration.google-sheets",
41
+ "integration.attio",
42
+ "surface.dashboard",
43
+ "surface.overview",
44
+ "surface.command-view",
45
+ "surface.command-queue",
46
+ "surface.pipeline",
47
+ "surface.lists",
48
+ "surface.resources",
49
+ "surface.settings",
50
+ "status.success",
51
+ "status.error",
52
+ "status.warning",
53
+ "status.info",
54
+ "status.pending",
55
+ "action.approve",
56
+ "action.reject",
57
+ "action.retry",
58
+ "action.edit",
59
+ "action.view",
60
+ "action.launch",
61
+ "action.message",
62
+ "action.escalate",
63
+ "action.promote",
64
+ "action.submit",
65
+ "action.email"
66
+ ];
67
+ var CustomIconTokenSchema = z.string().trim().max(80).regex(/^custom\.[a-z0-9]+(?:[-._][a-z0-9]+)*$/, "Custom icon tokens must start with custom.");
68
+ var OrganizationModelBuiltinIconTokenSchema = z.enum(ORGANIZATION_MODEL_ICON_TOKENS);
69
+ var OrganizationModelIconTokenSchema = z.union([
70
+ OrganizationModelBuiltinIconTokenSchema,
71
+ CustomIconTokenSchema
72
+ ]);
73
+
74
+ // src/organization-model/domains/shared.ts
4
75
  var ModelIdSchema = z.string().trim().min(1).max(100).regex(/^[a-z0-9]+(?:[-._][a-z0-9]+)*$/, "IDs must be lowercase and use -, _, or . separators");
5
76
  var LabelSchema = z.string().trim().min(1).max(120);
6
77
  var DescriptionSchema = z.string().trim().min(1).max(2e3);
7
78
  var ColorTokenSchema = z.string().trim().min(1).max(50);
8
- var IconNameSchema = z.string().trim().min(1).max(80);
79
+ var IconNameSchema = OrganizationModelIconTokenSchema;
9
80
  var PathSchema = z.string().trim().startsWith("/").max(300);
10
81
  var ReferenceIdsSchema = z.array(ModelIdSchema).default([]);
11
82
  var DisplayMetadataSchema = z.object({
@@ -211,13 +282,33 @@ var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
211
282
  id: ModelIdSchema,
212
283
  order: z.number().int().min(0)
213
284
  });
285
+ var ProspectingBuildTemplateStepSchema = DisplayMetadataSchema.extend({
286
+ id: ModelIdSchema,
287
+ primaryEntity: z.enum(["company", "contact"]),
288
+ outputs: z.array(z.enum(["company", "contact", "export"])).min(1),
289
+ stageKey: ModelIdSchema,
290
+ dependsOn: z.array(ModelIdSchema).optional(),
291
+ dependencyMode: z.literal("per-record-eligibility"),
292
+ capabilityKey: ModelIdSchema,
293
+ defaultBatchSize: z.number().int().positive(),
294
+ maxBatchSize: z.number().int().positive()
295
+ }).refine((step) => step.defaultBatchSize <= step.maxBatchSize, {
296
+ message: "defaultBatchSize must be less than or equal to maxBatchSize",
297
+ path: ["defaultBatchSize"]
298
+ });
299
+ var ProspectingBuildTemplateSchema = DisplayMetadataSchema.extend({
300
+ id: ModelIdSchema,
301
+ steps: z.array(ProspectingBuildTemplateStepSchema).min(1)
302
+ });
214
303
  var OrganizationModelProspectingSchema = z.object({
215
304
  listEntityId: ModelIdSchema,
216
305
  companyEntityId: ModelIdSchema,
217
306
  contactEntityId: ModelIdSchema,
218
307
  description: DescriptionSchema.optional(),
219
308
  companyStages: z.array(ProspectingLifecycleStageSchema).min(1),
220
- contactStages: z.array(ProspectingLifecycleStageSchema).min(1)
309
+ contactStages: z.array(ProspectingLifecycleStageSchema).min(1),
310
+ defaultBuildTemplateId: ModelIdSchema,
311
+ buildTemplates: z.array(ProspectingBuildTemplateSchema).min(1)
221
312
  });
222
313
  var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
223
314
  listEntityId: "leadgen.list",
@@ -233,10 +324,188 @@ var DEFAULT_ORGANIZATION_MODEL_PROSPECTING = {
233
324
  { id: "verified", label: "Verified", order: 2 },
234
325
  { id: "personalized", label: "Personalized", order: 3 },
235
326
  { id: "uploaded", label: "Uploaded", order: 4 }
327
+ ],
328
+ defaultBuildTemplateId: "local-services",
329
+ buildTemplates: [
330
+ {
331
+ id: "local-services",
332
+ label: "Local Services Prospecting",
333
+ description: "Curated local-services list build using company sourcing, website analysis, qualification, contact discovery, verification, personalization, and review.",
334
+ steps: [
335
+ {
336
+ id: "source-companies",
337
+ label: "Source companies",
338
+ primaryEntity: "company",
339
+ outputs: ["company"],
340
+ stageKey: "populated",
341
+ dependencyMode: "per-record-eligibility",
342
+ capabilityKey: "lead-gen.company.source",
343
+ defaultBatchSize: 100,
344
+ maxBatchSize: 250
345
+ },
346
+ {
347
+ id: "analyze-websites",
348
+ label: "Analyze websites",
349
+ primaryEntity: "company",
350
+ outputs: ["company"],
351
+ stageKey: "extracted",
352
+ dependsOn: ["source-companies"],
353
+ dependencyMode: "per-record-eligibility",
354
+ capabilityKey: "lead-gen.company.website-extract",
355
+ defaultBatchSize: 50,
356
+ maxBatchSize: 100
357
+ },
358
+ {
359
+ id: "qualify-companies",
360
+ label: "Qualify companies",
361
+ primaryEntity: "company",
362
+ outputs: ["company"],
363
+ stageKey: "qualified",
364
+ dependsOn: ["analyze-websites"],
365
+ dependencyMode: "per-record-eligibility",
366
+ capabilityKey: "lead-gen.company.qualify",
367
+ defaultBatchSize: 100,
368
+ maxBatchSize: 250
369
+ },
370
+ {
371
+ id: "find-contacts",
372
+ label: "Find contacts",
373
+ primaryEntity: "contact",
374
+ outputs: ["contact"],
375
+ stageKey: "discovered",
376
+ dependsOn: ["qualify-companies"],
377
+ dependencyMode: "per-record-eligibility",
378
+ capabilityKey: "lead-gen.contact.discover",
379
+ defaultBatchSize: 50,
380
+ maxBatchSize: 100
381
+ },
382
+ {
383
+ id: "verify-emails",
384
+ label: "Verify emails",
385
+ primaryEntity: "contact",
386
+ outputs: ["contact"],
387
+ stageKey: "verified",
388
+ dependsOn: ["find-contacts"],
389
+ dependencyMode: "per-record-eligibility",
390
+ capabilityKey: "lead-gen.contact.verify-email",
391
+ defaultBatchSize: 100,
392
+ maxBatchSize: 500
393
+ },
394
+ {
395
+ id: "personalize",
396
+ label: "Personalize",
397
+ primaryEntity: "contact",
398
+ outputs: ["contact"],
399
+ stageKey: "personalized",
400
+ dependsOn: ["verify-emails"],
401
+ dependencyMode: "per-record-eligibility",
402
+ capabilityKey: "lead-gen.contact.personalize",
403
+ defaultBatchSize: 25,
404
+ maxBatchSize: 100
405
+ },
406
+ {
407
+ id: "review",
408
+ label: "Review",
409
+ primaryEntity: "contact",
410
+ outputs: ["export"],
411
+ stageKey: "uploaded",
412
+ dependsOn: ["personalize"],
413
+ dependencyMode: "per-record-eligibility",
414
+ capabilityKey: "lead-gen.review.outreach-ready",
415
+ defaultBatchSize: 25,
416
+ maxBatchSize: 100
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ id: "dtc-subscription-apollo-clickup",
422
+ label: "DTC Subscription Apollo Export",
423
+ description: "Prospecting pipeline for DTC subscription or subscription-ready brands where Apollo is the source and contact-enrichment layer, Elevasis handles company research and fit scoring, and approved leads export as an approved lead list.",
424
+ steps: [
425
+ {
426
+ id: "import-apollo-search",
427
+ label: "Import Apollo search",
428
+ description: "Pull companies and seed contact data from a predefined Apollo search or list.",
429
+ primaryEntity: "company",
430
+ outputs: ["company", "contact"],
431
+ stageKey: "populated",
432
+ dependencyMode: "per-record-eligibility",
433
+ capabilityKey: "lead-gen.company.apollo-import",
434
+ defaultBatchSize: 250,
435
+ maxBatchSize: 1e3
436
+ },
437
+ {
438
+ id: "analyze-websites",
439
+ label: "Analyze websites",
440
+ description: "Extract subscription, product, retention, and tech-stack signals from each brand website.",
441
+ primaryEntity: "company",
442
+ outputs: ["company"],
443
+ stageKey: "extracted",
444
+ dependsOn: ["import-apollo-search"],
445
+ dependencyMode: "per-record-eligibility",
446
+ capabilityKey: "lead-gen.company.website-extract",
447
+ defaultBatchSize: 50,
448
+ maxBatchSize: 100
449
+ },
450
+ {
451
+ id: "score-dtc-fit",
452
+ label: "Score DTC fit",
453
+ description: "Classify subscription potential, consumable-product fit, retention maturity, and disqualifiers.",
454
+ primaryEntity: "company",
455
+ outputs: ["company"],
456
+ stageKey: "qualified",
457
+ dependsOn: ["analyze-websites"],
458
+ dependencyMode: "per-record-eligibility",
459
+ capabilityKey: "lead-gen.company.dtc-subscription-qualify",
460
+ defaultBatchSize: 100,
461
+ maxBatchSize: 250
462
+ },
463
+ {
464
+ id: "enrich-decision-makers",
465
+ label: "Enrich decision-makers",
466
+ description: "Use Apollo to find qualified contacts such as founders, retention leads, lifecycle leads, and marketing owners.",
467
+ primaryEntity: "contact",
468
+ outputs: ["contact"],
469
+ stageKey: "discovered",
470
+ dependsOn: ["score-dtc-fit"],
471
+ dependencyMode: "per-record-eligibility",
472
+ capabilityKey: "lead-gen.contact.apollo-decision-maker-enrich",
473
+ defaultBatchSize: 100,
474
+ maxBatchSize: 250
475
+ },
476
+ {
477
+ id: "verify-emails",
478
+ label: "Verify emails",
479
+ description: "Verify deliverability before the QC and handoff step.",
480
+ primaryEntity: "contact",
481
+ outputs: ["contact"],
482
+ stageKey: "verified",
483
+ dependsOn: ["enrich-decision-makers"],
484
+ dependencyMode: "per-record-eligibility",
485
+ capabilityKey: "lead-gen.contact.verify-email",
486
+ defaultBatchSize: 250,
487
+ maxBatchSize: 500
488
+ },
489
+ {
490
+ id: "review-and-export",
491
+ label: "Review and export",
492
+ description: "Operator QC approves or rejects leads, then approved records are exported as a lead list.",
493
+ primaryEntity: "company",
494
+ outputs: ["export"],
495
+ stageKey: "uploaded",
496
+ dependsOn: ["verify-emails"],
497
+ dependencyMode: "per-record-eligibility",
498
+ capabilityKey: "lead-gen.export.list",
499
+ defaultBatchSize: 100,
500
+ maxBatchSize: 250
501
+ }
502
+ ]
503
+ }
236
504
  ]
237
505
  };
238
506
 
239
507
  // src/organization-model/contracts.ts
508
+ var KNOWLEDGE_FEATURE_ID = "knowledge";
240
509
  var PROJECTS_FEATURE_ID = "projects";
241
510
  var PROJECTS_INDEX_SURFACE_ID = "projects.index";
242
511
  var PROJECTS_VIEW_CAPABILITY_ID = "delivery.projects.view";
@@ -248,7 +517,7 @@ var SETTINGS_FEATURE_ID = "settings";
248
517
  var SEO_FEATURE_ID = "seo";
249
518
  var SALES_PIPELINE_SURFACE_ID = "crm.pipeline";
250
519
  var PROSPECTING_LISTS_SURFACE_ID = "lead-gen.lists";
251
- var OPERATIONS_COMMAND_VIEW_SURFACE_ID = "operations.command-view";
520
+ var OPERATIONS_COMMAND_VIEW_SURFACE_ID = "knowledge.command-view";
252
521
  var SETTINGS_ROLES_SURFACE_ID = "settings.roles";
253
522
 
254
523
  // src/organization-model/domains/navigation.ts
@@ -673,6 +942,31 @@ var DEFAULT_ORGANIZATION_MODEL_STATUSES = {
673
942
  { id: "request.wont_fix", label: "Won't Fix", semanticClass: "request", category: "request" }
674
943
  ]
675
944
  };
945
+ var KnowledgeLinkSchema = z.object({
946
+ nodeId: NodeIdStringSchema
947
+ });
948
+ var OrgKnowledgeKindSchema = z.enum(["playbook", "strategy", "reference"]);
949
+ var OrgKnowledgeNodeSchema = z.object({
950
+ id: ModelIdSchema,
951
+ kind: OrgKnowledgeKindSchema,
952
+ title: z.string().trim().min(1).max(200),
953
+ summary: z.string().trim().min(1).max(1e3),
954
+ icon: IconNameSchema.optional(),
955
+ /** Raw MDX string. Phase 2 will introduce a structured block format. */
956
+ body: z.string().trim().min(1),
957
+ /**
958
+ * Graph links to other OM nodes this knowledge node governs.
959
+ * Each link emits a `governs` edge: knowledge-node -> target node.
960
+ */
961
+ links: z.array(KnowledgeLinkSchema).default([]),
962
+ /** Identifiers of the roles or members who own this knowledge node. */
963
+ ownerIds: z.array(ModelIdSchema).default([]),
964
+ /** ISO date string (YYYY-MM-DD or full ISO 8601) of last meaningful update. */
965
+ updatedAt: z.string().trim().min(1).max(50)
966
+ });
967
+ var KnowledgeDomainSchema = z.object({
968
+ nodes: z.array(OrgKnowledgeNodeSchema).default([])
969
+ });
676
970
 
677
971
  // src/organization-model/schema.ts
678
972
  var OrganizationModelSchemaBase = z.object({
@@ -689,7 +983,8 @@ var OrganizationModelSchemaBase = z.object({
689
983
  roles: RolesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ROLES),
690
984
  goals: GoalsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_GOALS),
691
985
  statuses: StatusesDomainSchema.default({ entries: [] }),
692
- operations: OperationsDomainSchema.default({ entries: [] })
986
+ operations: OperationsDomainSchema.default({ entries: [] }),
987
+ knowledge: KnowledgeDomainSchema.default({ nodes: [] })
693
988
  });
694
989
  function addIssue(ctx, path, message) {
695
990
  ctx.addIssue({
@@ -724,7 +1019,11 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
724
1019
  if (segments.length > 1) {
725
1020
  const parentId = segments.slice(0, -1).join(".");
726
1021
  if (!featuresById.has(parentId)) {
727
- addIssue(ctx, ["features", featureIndex, "id"], `Feature "${feature.id}" references unknown parent "${parentId}"`);
1022
+ addIssue(
1023
+ ctx,
1024
+ ["features", featureIndex, "id"],
1025
+ `Feature "${feature.id}" references unknown parent "${parentId}"`
1026
+ );
728
1027
  }
729
1028
  }
730
1029
  const hasChildren = model.features.some(
@@ -788,7 +1087,8 @@ var OrganizationGraphNodeKindSchema = z.enum([
788
1087
  "surface",
789
1088
  "entity",
790
1089
  "capability",
791
- "resource"
1090
+ "resource",
1091
+ "knowledge"
792
1092
  ]);
793
1093
  var OrganizationGraphEdgeKindSchema = z.enum([
794
1094
  "contains",
@@ -796,7 +1096,8 @@ var OrganizationGraphEdgeKindSchema = z.enum([
796
1096
  "exposes",
797
1097
  "maps_to",
798
1098
  "operates-on",
799
- "uses"
1099
+ "uses",
1100
+ "governs"
800
1101
  ]);
801
1102
  var OrganizationGraphNodeSchema = z.object({
802
1103
  id: z.string().trim().min(1).max(200),
@@ -804,6 +1105,7 @@ var OrganizationGraphNodeSchema = z.object({
804
1105
  label: LabelSchema,
805
1106
  sourceId: z.string().trim().min(1).max(255).optional(),
806
1107
  description: DescriptionSchema.optional(),
1108
+ icon: IconNameSchema.optional(),
807
1109
  enabled: z.boolean().optional(),
808
1110
  featureId: z.string().trim().min(1).max(100).optional(),
809
1111
  resourceType: z.enum(["workflow", "agent", "trigger", "integration", "external", "human_checkpoint"]).optional()
@@ -834,6 +1136,9 @@ var LinkSchema = z.object({
834
1136
  });
835
1137
 
836
1138
  // src/organization-model/defaults.ts
1139
+ var DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE = {
1140
+ nodes: []
1141
+ };
837
1142
  var DEFAULT_ORGANIZATION_MODEL = {
838
1143
  version: 1,
839
1144
  features: [
@@ -842,16 +1147,39 @@ var DEFAULT_ORGANIZATION_MODEL = {
842
1147
  label: "Dashboard",
843
1148
  enabled: true,
844
1149
  path: "/",
845
- icon: "dashboard",
1150
+ icon: "feature.dashboard",
846
1151
  uiPosition: "sidebar-primary"
847
1152
  },
1153
+ {
1154
+ id: "identity",
1155
+ label: "Identity",
1156
+ description: "Company identity, positioning, and market context",
1157
+ enabled: true,
1158
+ color: "indigo"
1159
+ },
1160
+ {
1161
+ id: "platform",
1162
+ label: "Platform",
1163
+ description: "Elevasis platform architecture, capabilities, and implementation patterns",
1164
+ enabled: true,
1165
+ color: "cyan",
1166
+ icon: "feature.platform"
1167
+ },
1168
+ {
1169
+ id: "finance",
1170
+ label: "Finance",
1171
+ description: "Finance operations, accounting, billing, reconciliation, and tax prep",
1172
+ enabled: true,
1173
+ color: "green",
1174
+ icon: "feature.finance"
1175
+ },
848
1176
  {
849
1177
  id: "sales",
850
1178
  label: "Sales",
851
1179
  description: "Revenue workflows and customer acquisition",
852
1180
  enabled: true,
853
1181
  color: "blue",
854
- icon: "crm",
1182
+ icon: "feature.sales",
855
1183
  uiPosition: "sidebar-primary"
856
1184
  },
857
1185
  {
@@ -860,7 +1188,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
860
1188
  description: "Relationship pipeline and deal management",
861
1189
  enabled: true,
862
1190
  color: "blue",
863
- icon: "crm",
1191
+ icon: "feature.crm",
864
1192
  path: "/crm"
865
1193
  },
866
1194
  {
@@ -869,7 +1197,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
869
1197
  description: "Prospecting, qualification, and outreach preparation",
870
1198
  enabled: true,
871
1199
  color: "cyan",
872
- icon: "lead-gen",
1200
+ icon: "feature.lead-gen",
873
1201
  path: "/lead-gen"
874
1202
  },
875
1203
  {
@@ -878,7 +1206,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
878
1206
  description: "Projects, milestones, and client work execution",
879
1207
  enabled: true,
880
1208
  color: "orange",
881
- icon: "projects",
1209
+ icon: "feature.projects",
882
1210
  path: "/projects",
883
1211
  uiPosition: "sidebar-primary"
884
1212
  },
@@ -888,14 +1216,14 @@ var DEFAULT_ORGANIZATION_MODEL = {
888
1216
  description: "Operational resources, topology, and orchestration visibility",
889
1217
  enabled: true,
890
1218
  color: "violet",
891
- icon: "operations",
1219
+ icon: "feature.operations",
892
1220
  uiPosition: "sidebar-primary"
893
1221
  },
894
1222
  {
895
- id: "operations.command-view",
1223
+ id: "knowledge.command-view",
896
1224
  label: "Command View",
897
1225
  enabled: true,
898
- path: "/operations/command-view",
1226
+ path: "/knowledge/command-view",
899
1227
  devOnly: true
900
1228
  },
901
1229
  {
@@ -974,7 +1302,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
974
1302
  id: "settings",
975
1303
  label: "Settings",
976
1304
  enabled: true,
977
- icon: "settings",
1305
+ icon: "feature.settings",
978
1306
  uiPosition: "sidebar-bottom"
979
1307
  },
980
1308
  {
@@ -1030,7 +1358,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
1030
1358
  label: "Admin",
1031
1359
  enabled: true,
1032
1360
  path: "/admin",
1033
- icon: "settings",
1361
+ icon: "feature.admin",
1034
1362
  uiPosition: "sidebar-bottom",
1035
1363
  requiresAdmin: true
1036
1364
  },
@@ -1069,7 +1397,7 @@ var DEFAULT_ORGANIZATION_MODEL = {
1069
1397
  label: "Archive",
1070
1398
  enabled: true,
1071
1399
  path: "/archive",
1072
- icon: "archive",
1400
+ icon: "feature.archive",
1073
1401
  uiPosition: "sidebar-bottom",
1074
1402
  devOnly: true
1075
1403
  },
@@ -1090,6 +1418,21 @@ var DEFAULT_ORGANIZATION_MODEL = {
1090
1418
  label: "SEO",
1091
1419
  enabled: false,
1092
1420
  path: "/seo"
1421
+ },
1422
+ {
1423
+ id: "knowledge",
1424
+ label: "Knowledge",
1425
+ description: "Operational knowledge, playbooks, and strategy docs",
1426
+ enabled: true,
1427
+ color: "teal",
1428
+ icon: "feature.knowledge",
1429
+ uiPosition: "sidebar-primary"
1430
+ },
1431
+ {
1432
+ id: "knowledge.base",
1433
+ label: "Knowledge Base",
1434
+ enabled: true,
1435
+ path: "/knowledge"
1093
1436
  }
1094
1437
  ],
1095
1438
  branding: DEFAULT_ORGANIZATION_MODEL_BRANDING,
@@ -1103,7 +1446,8 @@ var DEFAULT_ORGANIZATION_MODEL = {
1103
1446
  roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
1104
1447
  goals: DEFAULT_ORGANIZATION_MODEL_GOALS,
1105
1448
  statuses: DEFAULT_ORGANIZATION_MODEL_STATUSES,
1106
- operations: DEFAULT_ORGANIZATION_MODEL_OPERATIONS
1449
+ operations: DEFAULT_ORGANIZATION_MODEL_OPERATIONS,
1450
+ knowledge: DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE
1107
1451
  };
1108
1452
 
1109
1453
  // src/organization-model/resolve.ts
@@ -1158,11 +1502,11 @@ function createFoundationOrganizationModel(override) {
1158
1502
  const leadGenFeature = requireCoreFeature("sales.lead-gen");
1159
1503
  const crmFeature = requireCoreFeature("sales.crm");
1160
1504
  const navigationSurfaces = [
1161
- { ...operationsFeature, id: "operations", path: "/operations", icon: "operations", surfaceType: "dashboard" },
1162
- { ...projectsFeature, icon: "projects", surfaceType: "list" },
1163
- { ...leadGenFeature, id: "lead-gen", icon: "lead-gen", surfaceType: "list" },
1164
- { ...crmFeature, id: "crm", icon: "crm", surfaceType: "graph" },
1165
- { ...requireCoreFeature("settings.account"), id: "settings", icon: "settings", surfaceType: "settings" }
1505
+ { ...operationsFeature, id: "operations", path: "/operations", icon: "feature.operations", surfaceType: "dashboard" },
1506
+ { ...projectsFeature, icon: "feature.projects", surfaceType: "list" },
1507
+ { ...leadGenFeature, id: "lead-gen", icon: "feature.lead-gen", surfaceType: "list" },
1508
+ { ...crmFeature, id: "crm", icon: "feature.crm", surfaceType: "graph" },
1509
+ { ...requireCoreFeature("settings.account"), id: "settings", icon: "feature.settings", surfaceType: "settings" }
1166
1510
  ];
1167
1511
  const homeLabel = "Dashboard";
1168
1512
  const quickAccessSurfaceIds = ["operations", "projects", "lead-gen", "crm"];
@@ -1187,4 +1531,4 @@ function createFoundationOrganizationModel(override) {
1187
1531
  };
1188
1532
  }
1189
1533
 
1190
- export { CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_OPERATIONS, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, FeatureSchema, FirmographicsSchema, GoalsDomainSchema, KeyResultSchema, LinkSchema, MONITORING_FEATURE_ID, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, ObjectiveSchema, OfferingsDomainSchema, OperationEntrySchema, OperationSemanticClassSchema, OperationsDomainSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_VIEW_CAPABILITY_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PricingModelSchema, ProductSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SEO_FEATURE_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, TechStackEntrySchema, UiPositionSchema, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };
1534
+ export { CustomerSegmentSchema, CustomersDomainSchema, DEFAULT_ORGANIZATION_MODEL, DEFAULT_ORGANIZATION_MODEL_CUSTOMERS, DEFAULT_ORGANIZATION_MODEL_GOALS, DEFAULT_ORGANIZATION_MODEL_OFFERINGS, DEFAULT_ORGANIZATION_MODEL_OPERATIONS, DEFAULT_ORGANIZATION_MODEL_ROLES, DEFAULT_ORGANIZATION_MODEL_STATUSES, FeatureSchema, FirmographicsSchema, GoalsDomainSchema, IconNameSchema, KNOWLEDGE_FEATURE_ID, KeyResultSchema, KnowledgeDomainSchema, KnowledgeLinkSchema, LinkSchema, MONITORING_FEATURE_ID, NodeIdPathSchema, NodeIdStringSchema, OPERATIONS_COMMAND_VIEW_SURFACE_ID, OPERATIONS_FEATURE_ID, ORGANIZATION_MODEL_ICON_TOKENS, ObjectiveSchema, OfferingsDomainSchema, OperationEntrySchema, OperationSemanticClassSchema, OperationsDomainSchema, OrgKnowledgeKindSchema, OrgKnowledgeNodeSchema, OrganizationModelBuiltinIconTokenSchema, OrganizationModelIconTokenSchema, OrganizationModelSchema, PROJECTS_FEATURE_ID, PROJECTS_INDEX_SURFACE_ID, PROJECTS_VIEW_CAPABILITY_ID, PROSPECTING_FEATURE_ID, PROSPECTING_LISTS_SURFACE_ID, PricingModelSchema, ProductSchema, RoleSchema, RolesDomainSchema, SALES_FEATURE_ID, SALES_PIPELINE_SURFACE_ID, SEO_FEATURE_ID, SETTINGS_FEATURE_ID, SETTINGS_ROLES_SURFACE_ID, StatusEntrySchema, StatusSemanticClassSchema, StatusesDomainSchema, TechStackEntrySchema, UiPositionSchema, createFoundationOrganizationModel, defineOrganizationModel, resolveOrganizationModel };