@elevasis/core 0.21.0 → 0.23.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 (132) hide show
  1. package/dist/index.d.ts +2518 -2169
  2. package/dist/index.js +2495 -1095
  3. package/dist/knowledge/index.d.ts +706 -1044
  4. package/dist/knowledge/index.js +9 -9
  5. package/dist/organization-model/index.d.ts +2518 -2169
  6. package/dist/organization-model/index.js +2495 -1095
  7. package/dist/test-utils/index.d.ts +826 -1014
  8. package/dist/test-utils/index.js +1894 -1032
  9. package/package.json +3 -3
  10. package/src/__tests__/template-core-compatibility.test.ts +11 -79
  11. package/src/_gen/__tests__/__snapshots__/contracts.md.snap +852 -397
  12. package/src/auth/multi-tenancy/permissions.ts +20 -8
  13. package/src/business/README.md +2 -2
  14. package/src/business/acquisition/api-schemas.test.ts +175 -2
  15. package/src/business/acquisition/api-schemas.ts +132 -16
  16. package/src/business/acquisition/build-templates.test.ts +4 -4
  17. package/src/business/acquisition/build-templates.ts +72 -30
  18. package/src/business/acquisition/crm-state-actions.test.ts +13 -11
  19. package/src/business/acquisition/index.ts +12 -0
  20. package/src/business/acquisition/types.ts +7 -3
  21. package/src/business/clients/api-schemas.test.ts +115 -0
  22. package/src/business/clients/api-schemas.ts +158 -0
  23. package/src/business/clients/index.ts +1 -0
  24. package/src/business/deals/api-schemas.ts +8 -0
  25. package/src/business/index.ts +5 -2
  26. package/src/business/projects/types.ts +19 -0
  27. package/src/execution/engine/__tests__/fixtures/test-agents.ts +10 -8
  28. package/src/execution/engine/agent/core/__tests__/agent.test.ts +16 -12
  29. package/src/execution/engine/agent/core/__tests__/error-passthrough.test.ts +4 -3
  30. package/src/execution/engine/agent/core/types.ts +25 -15
  31. package/src/execution/engine/agent/index.ts +6 -4
  32. package/src/execution/engine/agent/reasoning/__tests__/request-builder.test.ts +24 -18
  33. package/src/execution/engine/index.ts +3 -0
  34. package/src/execution/engine/workflow/types.ts +9 -2
  35. package/src/knowledge/README.md +8 -7
  36. package/src/knowledge/__tests__/queries.test.ts +74 -73
  37. package/src/knowledge/format.ts +10 -9
  38. package/src/knowledge/index.ts +1 -1
  39. package/src/knowledge/published.ts +1 -1
  40. package/src/knowledge/queries.ts +26 -25
  41. package/src/organization-model/README.md +73 -26
  42. package/src/organization-model/__tests__/content-kinds-registry.test.ts +210 -0
  43. package/src/organization-model/__tests__/defaults.test.ts +76 -96
  44. package/src/organization-model/__tests__/domains/actions.test.ts +56 -0
  45. package/src/organization-model/__tests__/domains/customers.test.ts +299 -295
  46. package/src/organization-model/__tests__/domains/entities.test.ts +56 -0
  47. package/src/organization-model/__tests__/domains/goals.test.ts +493 -479
  48. package/src/organization-model/__tests__/domains/identity.test.ts +280 -279
  49. package/src/organization-model/__tests__/domains/navigation.test.ts +268 -212
  50. package/src/organization-model/__tests__/domains/offerings.test.ts +414 -419
  51. package/src/organization-model/__tests__/domains/policies.test.ts +323 -0
  52. package/src/organization-model/__tests__/domains/resource-mappings.test.ts +271 -271
  53. package/src/organization-model/__tests__/domains/resources.test.ts +310 -0
  54. package/src/organization-model/__tests__/domains/roles.test.ts +463 -347
  55. package/src/organization-model/__tests__/domains/statuses.test.ts +246 -243
  56. package/src/organization-model/__tests__/domains/systems.test.ts +209 -0
  57. package/src/organization-model/__tests__/flatten-additive-merge.test.ts +361 -0
  58. package/src/organization-model/__tests__/foundation.test.ts +74 -102
  59. package/src/organization-model/__tests__/get-resources-for-system.test.ts +144 -0
  60. package/src/organization-model/__tests__/graph.test.ts +899 -71
  61. package/src/organization-model/__tests__/knowledge.test.ts +209 -49
  62. package/src/organization-model/__tests__/lookup-helpers.test.ts +438 -0
  63. package/src/organization-model/__tests__/migration-helpers.test.ts +591 -0
  64. package/src/organization-model/__tests__/prospecting-ssot.test.ts +36 -27
  65. package/src/organization-model/__tests__/recursive-system-schema.test.ts +520 -0
  66. package/src/organization-model/__tests__/resolve.test.ts +174 -23
  67. package/src/organization-model/__tests__/schema.test.ts +291 -114
  68. package/src/organization-model/__tests__/surface-projection.test.ts +207 -97
  69. package/src/organization-model/catalogs/lead-gen.ts +144 -0
  70. package/src/organization-model/content-kinds/config.ts +36 -0
  71. package/src/organization-model/content-kinds/index.ts +74 -0
  72. package/src/organization-model/content-kinds/pipeline.ts +68 -0
  73. package/src/organization-model/content-kinds/registry.ts +44 -0
  74. package/src/organization-model/content-kinds/status.ts +71 -0
  75. package/src/organization-model/content-kinds/template.ts +83 -0
  76. package/src/organization-model/content-kinds/types.ts +117 -0
  77. package/src/organization-model/contracts.ts +13 -3
  78. package/src/organization-model/defaults.ts +499 -86
  79. package/src/organization-model/domains/actions.ts +239 -0
  80. package/src/organization-model/domains/customers.ts +78 -75
  81. package/src/organization-model/domains/entities.ts +144 -0
  82. package/src/organization-model/domains/goals.ts +83 -80
  83. package/src/organization-model/domains/knowledge.ts +76 -17
  84. package/src/organization-model/domains/navigation.ts +107 -384
  85. package/src/organization-model/domains/offerings.ts +71 -66
  86. package/src/organization-model/domains/policies.ts +102 -0
  87. package/src/organization-model/domains/projects.ts +14 -48
  88. package/src/organization-model/domains/prospecting.ts +62 -181
  89. package/src/organization-model/domains/resources.ts +145 -0
  90. package/src/organization-model/domains/roles.ts +96 -55
  91. package/src/organization-model/domains/sales.ts +10 -219
  92. package/src/organization-model/domains/shared.ts +57 -57
  93. package/src/organization-model/domains/statuses.ts +339 -130
  94. package/src/organization-model/domains/systems.ts +203 -0
  95. package/src/organization-model/foundation.ts +54 -67
  96. package/src/organization-model/graph/build.ts +682 -54
  97. package/src/organization-model/graph/link.ts +1 -1
  98. package/src/organization-model/graph/schema.ts +24 -9
  99. package/src/organization-model/graph/types.ts +20 -7
  100. package/src/organization-model/helpers.ts +231 -26
  101. package/src/organization-model/icons.ts +1 -0
  102. package/src/organization-model/index.ts +118 -5
  103. package/src/organization-model/migration-helpers.ts +249 -0
  104. package/src/organization-model/organization-graph.mdx +16 -15
  105. package/src/organization-model/organization-model.mdx +111 -44
  106. package/src/organization-model/published.ts +172 -19
  107. package/src/organization-model/resolve.ts +117 -54
  108. package/src/organization-model/schema.ts +654 -112
  109. package/src/organization-model/surface-projection.ts +116 -122
  110. package/src/organization-model/types.ts +146 -20
  111. package/src/platform/api/types.ts +38 -35
  112. package/src/platform/constants/versions.ts +1 -1
  113. package/src/platform/registry/__tests__/command-view.test.ts +6 -8
  114. package/src/platform/registry/__tests__/resource-link.test.ts +13 -8
  115. package/src/platform/registry/__tests__/resource-registry.integration.test.ts +16 -31
  116. package/src/platform/registry/__tests__/resource-registry.nested-systems.test.ts +245 -0
  117. package/src/platform/registry/__tests__/resource-registry.test.ts +2053 -2005
  118. package/src/platform/registry/__tests__/validation.test.ts +1347 -1086
  119. package/src/platform/registry/index.ts +14 -0
  120. package/src/platform/registry/resource-registry.ts +52 -2
  121. package/src/platform/registry/serialization.ts +241 -202
  122. package/src/platform/registry/serialized-types.ts +1 -0
  123. package/src/platform/registry/types.ts +411 -361
  124. package/src/platform/registry/validation.ts +745 -513
  125. package/src/projects/api-schemas.ts +290 -267
  126. package/src/reference/_generated/contracts.md +853 -397
  127. package/src/reference/glossary.md +23 -18
  128. package/src/supabase/database.types.ts +181 -0
  129. package/src/test-utils/test-utils.test.ts +1 -6
  130. package/src/organization-model/__tests__/domains/operations.test.ts +0 -203
  131. package/src/organization-model/domains/features.ts +0 -31
  132. package/src/organization-model/domains/operations.ts +0 -85
@@ -14,334 +14,747 @@ import { DEFAULT_ORGANIZATION_MODEL_BRANDING } from './domains/branding'
14
14
  import { DEFAULT_ORGANIZATION_MODEL_IDENTITY } from './domains/identity'
15
15
  import { DEFAULT_ORGANIZATION_MODEL_CUSTOMERS } from './domains/customers'
16
16
  import { DEFAULT_ORGANIZATION_MODEL_OFFERINGS } from './domains/offerings'
17
- import { DEFAULT_ORGANIZATION_MODEL_SALES } from './domains/sales'
18
- import { DEFAULT_ORGANIZATION_MODEL_PROJECTS } from './domains/projects'
19
- import { DEFAULT_ORGANIZATION_MODEL_PROSPECTING } from './domains/prospecting'
20
- import { DEFAULT_ORGANIZATION_MODEL_OPERATIONS } from './domains/operations'
21
17
  import { DEFAULT_ORGANIZATION_MODEL_ROLES } from './domains/roles'
22
18
  import { DEFAULT_ORGANIZATION_MODEL_GOALS } from './domains/goals'
23
- import { DEFAULT_ORGANIZATION_MODEL_STATUSES } from './domains/statuses'
24
- import type { KnowledgeDomain } from './domains/knowledge'
19
+ import { DEFAULT_ORGANIZATION_MODEL_RESOURCES } from './domains/resources'
20
+ import { DEFAULT_ORGANIZATION_MODEL_ACTIONS } from './domains/actions'
21
+ import { DEFAULT_ORGANIZATION_MODEL_ENTITIES as DEFAULT_ENTITIES } from './domains/entities'
22
+ import { DEFAULT_ORGANIZATION_MODEL_POLICIES } from './domains/policies'
23
+ import { DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA } from './schema'
24
+ import type { OrganizationModelNavigation } from './types'
25
25
 
26
- export const DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE: KnowledgeDomain = {
27
- nodes: []
26
+ // Phase 4: DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE is now a flat Record<id, OrgKnowledgeNode> (D3).
27
+ // The old wrapper shape { version, lastModified, nodes[] } is gone; versioning is in domainMetadata.
28
+ export const DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE = {} as const
29
+
30
+ export const DEFAULT_ORGANIZATION_MODEL_ENTITIES = DEFAULT_ENTITIES
31
+
32
+ const DEFAULT_ORGANIZATION_MODEL_NAVIGATION: OrganizationModelNavigation = {
33
+ sidebar: {
34
+ primary: {
35
+ dashboard: {
36
+ type: 'surface',
37
+ label: 'Dashboard',
38
+ path: '/',
39
+ surfaceType: 'dashboard',
40
+ icon: 'feature.dashboard',
41
+ order: 10,
42
+ targets: { systems: ['dashboard'] }
43
+ },
44
+ business: {
45
+ type: 'group',
46
+ label: 'Business',
47
+ icon: 'feature.business',
48
+ order: 20,
49
+ children: {
50
+ sales: {
51
+ type: 'surface',
52
+ label: 'Sales',
53
+ path: '/sales',
54
+ surfaceType: 'page',
55
+ icon: 'feature.sales',
56
+ order: 10,
57
+ targets: { systems: ['sales'] }
58
+ },
59
+ clients: {
60
+ type: 'surface',
61
+ label: 'Clients',
62
+ path: '/clients',
63
+ surfaceType: 'list',
64
+ icon: 'feature.projects',
65
+ order: 20,
66
+ targets: { systems: ['clients'] }
67
+ },
68
+ projects: {
69
+ type: 'surface',
70
+ label: 'Projects',
71
+ path: '/projects',
72
+ surfaceType: 'page',
73
+ icon: 'feature.projects',
74
+ order: 30,
75
+ targets: { systems: ['projects'] }
76
+ }
77
+ }
78
+ },
79
+ operations: {
80
+ type: 'group',
81
+ label: 'Operations',
82
+ icon: 'feature.operations',
83
+ order: 30,
84
+ children: {
85
+ 'operations-overview': {
86
+ type: 'surface',
87
+ label: 'Overview',
88
+ path: '/operations',
89
+ surfaceType: 'page',
90
+ order: 10,
91
+ targets: { systems: ['operations.overview'] }
92
+ },
93
+ 'operations-systems': {
94
+ type: 'surface',
95
+ label: 'Systems',
96
+ path: '/operations/systems',
97
+ surfaceType: 'page',
98
+ order: 20,
99
+ targets: { systems: ['operations'] }
100
+ },
101
+ 'operations-resources': {
102
+ type: 'surface',
103
+ label: 'Resources',
104
+ path: '/operations/resources',
105
+ surfaceType: 'list',
106
+ order: 30,
107
+ targets: { systems: ['operations.resources'] }
108
+ },
109
+ 'operations-command-queue': {
110
+ type: 'surface',
111
+ label: 'Command Queue',
112
+ path: '/operations/command-queue',
113
+ surfaceType: 'list',
114
+ order: 40,
115
+ targets: { systems: ['operations.command-queue'] }
116
+ },
117
+ 'operations-task-scheduler': {
118
+ type: 'surface',
119
+ label: 'Task Scheduler',
120
+ path: '/operations/task-scheduler',
121
+ surfaceType: 'list',
122
+ order: 50,
123
+ targets: { systems: ['operations.task-scheduler'] }
124
+ }
125
+ }
126
+ },
127
+ monitoring: {
128
+ type: 'group',
129
+ label: 'Monitoring',
130
+ icon: 'feature.monitoring',
131
+ order: 40,
132
+ children: {
133
+ 'monitoring-overview': {
134
+ type: 'surface',
135
+ label: 'Overview',
136
+ path: '/monitoring',
137
+ surfaceType: 'page',
138
+ order: 10,
139
+ targets: { systems: ['monitoring'] }
140
+ },
141
+ 'monitoring-calendar': {
142
+ type: 'surface',
143
+ label: 'Calendar',
144
+ path: '/monitoring/calendar',
145
+ surfaceType: 'page',
146
+ order: 20,
147
+ targets: { systems: ['monitoring.calendar'] }
148
+ },
149
+ 'monitoring-activity-log': {
150
+ type: 'surface',
151
+ label: 'Activity Log',
152
+ path: '/monitoring/activity-log',
153
+ surfaceType: 'list',
154
+ order: 30,
155
+ targets: { systems: ['monitoring.activity-log'] }
156
+ },
157
+ 'monitoring-execution-logs': {
158
+ type: 'surface',
159
+ label: 'Execution Logs',
160
+ path: '/monitoring/execution-logs',
161
+ surfaceType: 'list',
162
+ order: 40,
163
+ targets: { systems: ['monitoring.execution-logs'] }
164
+ },
165
+ 'monitoring-execution-health': {
166
+ type: 'surface',
167
+ label: 'Execution Health',
168
+ path: '/monitoring/execution-health',
169
+ surfaceType: 'dashboard',
170
+ order: 50,
171
+ targets: { systems: ['monitoring.execution-health'] }
172
+ },
173
+ 'monitoring-notifications': {
174
+ type: 'surface',
175
+ label: 'Notifications',
176
+ path: '/monitoring/notifications',
177
+ surfaceType: 'list',
178
+ order: 60,
179
+ targets: { systems: ['monitoring.notifications'] }
180
+ },
181
+ 'monitoring-requests': {
182
+ type: 'surface',
183
+ label: 'Requests',
184
+ path: '/monitoring/requests',
185
+ surfaceType: 'list',
186
+ order: 70,
187
+ targets: { systems: ['monitoring.submitted-requests'] }
188
+ }
189
+ }
190
+ },
191
+ knowledge: {
192
+ type: 'group',
193
+ label: 'Knowledge',
194
+ icon: 'feature.knowledge',
195
+ order: 50,
196
+ children: {
197
+ 'knowledge-base': {
198
+ type: 'surface',
199
+ label: 'Knowledge Base',
200
+ path: '/knowledge',
201
+ surfaceType: 'page',
202
+ order: 10,
203
+ targets: { systems: ['knowledge.base'] }
204
+ },
205
+ 'knowledge-command-view': {
206
+ type: 'surface',
207
+ label: 'Command View',
208
+ path: '/knowledge/command-view',
209
+ surfaceType: 'graph',
210
+ order: 20,
211
+ targets: { systems: ['knowledge.command-view'] },
212
+ devOnly: true
213
+ }
214
+ }
215
+ }
216
+ },
217
+ bottom: {
218
+ settings: {
219
+ type: 'group',
220
+ label: 'Settings',
221
+ icon: 'feature.settings',
222
+ order: 10,
223
+ children: {
224
+ 'settings-account': {
225
+ type: 'surface',
226
+ label: 'Account',
227
+ path: '/settings/account',
228
+ surfaceType: 'settings',
229
+ order: 10,
230
+ targets: { systems: ['settings.account'] }
231
+ },
232
+ 'settings-appearance': {
233
+ type: 'surface',
234
+ label: 'Appearance',
235
+ path: '/settings/appearance',
236
+ surfaceType: 'settings',
237
+ order: 20,
238
+ targets: { systems: ['settings.appearance'] }
239
+ },
240
+ 'settings-roles': {
241
+ type: 'surface',
242
+ label: 'My Roles',
243
+ path: '/settings/roles',
244
+ surfaceType: 'settings',
245
+ order: 30,
246
+ targets: { systems: ['settings.roles'] }
247
+ },
248
+ 'settings-organization': {
249
+ type: 'surface',
250
+ label: 'Organization',
251
+ path: '/settings/organization',
252
+ surfaceType: 'settings',
253
+ order: 40,
254
+ targets: { systems: ['settings.organization'] }
255
+ },
256
+ 'settings-credentials': {
257
+ type: 'surface',
258
+ label: 'Credentials',
259
+ path: '/settings/credentials',
260
+ surfaceType: 'settings',
261
+ order: 50,
262
+ targets: { systems: ['settings.credentials'] }
263
+ },
264
+ 'settings-api-keys': {
265
+ type: 'surface',
266
+ label: 'API Keys',
267
+ path: '/settings/api-keys',
268
+ surfaceType: 'settings',
269
+ order: 60,
270
+ targets: { systems: ['settings.api-keys'] }
271
+ },
272
+ 'settings-webhooks': {
273
+ type: 'surface',
274
+ label: 'Webhooks',
275
+ path: '/settings/webhooks',
276
+ surfaceType: 'settings',
277
+ order: 70,
278
+ targets: { systems: ['settings.webhooks'] }
279
+ },
280
+ 'settings-deployments': {
281
+ type: 'surface',
282
+ label: 'Deployments',
283
+ path: '/settings/deployments',
284
+ surfaceType: 'settings',
285
+ order: 80,
286
+ targets: { systems: ['settings.deployments'] }
287
+ }
288
+ }
289
+ },
290
+ admin: {
291
+ type: 'group',
292
+ label: 'Admin',
293
+ icon: 'feature.admin',
294
+ order: 20,
295
+ children: {
296
+ 'admin-dashboard': {
297
+ type: 'surface',
298
+ label: 'Dashboard',
299
+ path: '/admin/dashboard',
300
+ surfaceType: 'dashboard',
301
+ order: 10,
302
+ targets: { systems: ['admin'] },
303
+ requiresAdmin: true
304
+ },
305
+ 'admin-system-health': {
306
+ type: 'surface',
307
+ label: 'System Health',
308
+ path: '/admin/system-health',
309
+ surfaceType: 'dashboard',
310
+ order: 20,
311
+ targets: { systems: ['admin.system-health'] },
312
+ requiresAdmin: true
313
+ },
314
+ 'admin-organizations': {
315
+ type: 'surface',
316
+ label: 'Organizations',
317
+ path: '/admin/organizations',
318
+ surfaceType: 'list',
319
+ order: 30,
320
+ targets: { systems: ['admin.organizations'] },
321
+ requiresAdmin: true
322
+ },
323
+ 'admin-users': {
324
+ type: 'surface',
325
+ label: 'Users',
326
+ path: '/admin/users',
327
+ surfaceType: 'list',
328
+ order: 40,
329
+ targets: { systems: ['admin.users'] },
330
+ requiresAdmin: true
331
+ },
332
+ 'admin-design-showcase': {
333
+ type: 'surface',
334
+ label: 'Design Showcase',
335
+ path: '/admin/design-showcase',
336
+ surfaceType: 'page',
337
+ order: 50,
338
+ targets: { systems: ['admin.design-showcase'] },
339
+ requiresAdmin: true
340
+ },
341
+ 'admin-debug': {
342
+ type: 'surface',
343
+ label: 'Debug',
344
+ path: '/admin/debug',
345
+ surfaceType: 'page',
346
+ order: 60,
347
+ targets: { systems: ['admin.debug'] },
348
+ requiresAdmin: true
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
28
354
  }
29
355
 
30
356
  export const DEFAULT_ORGANIZATION_MODEL: OrganizationModel = {
31
357
  version: 1,
32
- features: [
33
- {
358
+ domainMetadata: DEFAULT_ORGANIZATION_MODEL_DOMAIN_METADATA,
359
+ branding: DEFAULT_ORGANIZATION_MODEL_BRANDING,
360
+ navigation: DEFAULT_ORGANIZATION_MODEL_NAVIGATION,
361
+ identity: DEFAULT_ORGANIZATION_MODEL_IDENTITY,
362
+ customers: DEFAULT_ORGANIZATION_MODEL_CUSTOMERS,
363
+ offerings: DEFAULT_ORGANIZATION_MODEL_OFFERINGS,
364
+ roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
365
+ goals: DEFAULT_ORGANIZATION_MODEL_GOALS,
366
+ systems: {
367
+ dashboard: {
34
368
  id: 'dashboard',
369
+ order: 10,
35
370
  label: 'Dashboard',
36
371
  enabled: true,
372
+ lifecycle: 'active',
37
373
  path: '/',
38
- icon: 'feature.dashboard',
39
- uiPosition: 'sidebar-primary'
40
- },
41
- {
42
- id: 'identity',
43
- label: 'Identity',
44
- description: 'Company identity, positioning, and market context',
45
- enabled: true,
46
- color: 'indigo'
374
+ icon: 'feature.dashboard'
47
375
  },
48
- {
376
+ platform: {
49
377
  id: 'platform',
378
+ order: 30,
50
379
  label: 'Platform',
51
380
  description: 'Elevasis platform architecture, capabilities, and implementation patterns',
52
381
  enabled: true,
382
+ lifecycle: 'active',
53
383
  color: 'cyan',
54
384
  icon: 'feature.platform'
55
385
  },
56
- {
386
+ finance: {
57
387
  id: 'finance',
388
+ order: 40,
58
389
  label: 'Finance',
59
390
  description: 'Finance operations, accounting, billing, reconciliation, and tax prep',
60
391
  enabled: true,
392
+ lifecycle: 'active',
61
393
  color: 'green',
62
394
  icon: 'feature.finance'
63
395
  },
64
- {
396
+ sales: {
65
397
  id: 'sales',
398
+ order: 60,
66
399
  label: 'Sales',
67
400
  description: 'Revenue workflows and customer acquisition',
68
401
  enabled: true,
402
+ lifecycle: 'active',
69
403
  color: 'blue',
70
404
  icon: 'feature.sales',
71
- uiPosition: 'sidebar-primary'
405
+ path: '/sales'
72
406
  },
73
- {
407
+ 'sales.crm': {
74
408
  id: 'sales.crm',
409
+ order: 70,
75
410
  label: 'CRM',
76
411
  description: 'Relationship pipeline and deal management',
77
412
  enabled: true,
413
+ lifecycle: 'active',
78
414
  color: 'blue',
79
415
  icon: 'feature.crm',
80
416
  path: '/crm'
81
417
  },
82
- {
418
+ 'sales.lead-gen': {
83
419
  id: 'sales.lead-gen',
420
+ order: 80,
84
421
  label: 'Lead Gen',
85
422
  description: 'Prospecting, qualification, and outreach preparation',
86
423
  enabled: true,
424
+ lifecycle: 'active',
425
+ actions: Object.values(DEFAULT_ORGANIZATION_MODEL_ACTIONS).map((action) => ({
426
+ actionId: action.id,
427
+ intent: 'exposes'
428
+ })),
87
429
  color: 'cyan',
88
430
  icon: 'feature.lead-gen',
89
431
  path: '/lead-gen'
90
432
  },
91
- {
433
+ projects: {
92
434
  id: 'projects',
435
+ order: 90,
93
436
  label: 'Projects',
94
437
  description: 'Projects, milestones, and client work execution',
95
438
  enabled: true,
439
+ lifecycle: 'active',
96
440
  color: 'orange',
97
441
  icon: 'feature.projects',
98
- path: '/projects',
99
- uiPosition: 'sidebar-primary'
442
+ path: '/projects'
100
443
  },
101
- {
444
+ clients: {
445
+ id: 'clients',
446
+ order: 100,
447
+ label: 'Clients',
448
+ description: 'Client relationships, accounts, and business context',
449
+ enabled: true,
450
+ lifecycle: 'active',
451
+ color: 'orange',
452
+ icon: 'feature.projects',
453
+ path: '/clients'
454
+ },
455
+ operations: {
102
456
  id: 'operations',
457
+ order: 110,
103
458
  label: 'Operations',
104
459
  description: 'Operational resources, topology, and orchestration visibility',
105
460
  enabled: true,
461
+ lifecycle: 'active',
106
462
  color: 'violet',
107
- icon: 'feature.operations',
108
- uiPosition: 'sidebar-primary'
463
+ icon: 'feature.operations'
109
464
  },
110
- {
465
+ 'knowledge.command-view': {
111
466
  id: 'knowledge.command-view',
467
+ order: 120,
112
468
  label: 'Command View',
113
469
  enabled: true,
470
+ lifecycle: 'active',
114
471
  path: '/knowledge/command-view',
115
472
  devOnly: true
116
473
  },
117
- {
474
+ 'operations.overview': {
118
475
  id: 'operations.overview',
476
+ order: 130,
119
477
  label: 'Overview',
120
478
  enabled: true,
479
+ lifecycle: 'active',
121
480
  path: '/operations'
122
481
  },
123
- {
482
+ 'operations.resources': {
124
483
  id: 'operations.resources',
484
+ order: 140,
125
485
  label: 'Resources',
126
486
  enabled: true,
487
+ lifecycle: 'active',
127
488
  path: '/operations/resources'
128
489
  },
129
- {
490
+ 'operations.command-queue': {
130
491
  id: 'operations.command-queue',
492
+ order: 150,
131
493
  label: 'Command Queue',
132
494
  enabled: true,
495
+ lifecycle: 'active',
133
496
  path: '/operations/command-queue'
134
497
  },
135
- {
498
+ 'operations.sessions': {
136
499
  id: 'operations.sessions',
500
+ order: 160,
137
501
  label: 'Sessions',
138
502
  enabled: false,
503
+ lifecycle: 'deprecated',
139
504
  path: '/operations/sessions'
140
505
  },
141
- {
506
+ 'operations.task-scheduler': {
142
507
  id: 'operations.task-scheduler',
508
+ order: 170,
143
509
  label: 'Task Scheduler',
144
510
  enabled: true,
511
+ lifecycle: 'active',
145
512
  path: '/operations/task-scheduler'
146
513
  },
147
- {
514
+ monitoring: {
148
515
  id: 'monitoring',
516
+ order: 180,
149
517
  label: 'Monitoring',
150
518
  enabled: true,
151
- uiPosition: 'sidebar-primary'
519
+ lifecycle: 'active'
152
520
  },
153
- {
521
+ 'monitoring.calendar': {
154
522
  id: 'monitoring.calendar',
523
+ order: 190,
155
524
  label: 'Calendar',
156
525
  description: 'Google Calendar events and agenda views',
157
526
  enabled: true,
527
+ lifecycle: 'active',
158
528
  path: '/monitoring/calendar',
159
529
  icon: 'feature.calendar'
160
530
  },
161
- {
531
+ 'monitoring.activity-log': {
162
532
  id: 'monitoring.activity-log',
533
+ order: 200,
163
534
  label: 'Activity Log',
164
535
  enabled: true,
536
+ lifecycle: 'active',
165
537
  path: '/monitoring/activity-log'
166
538
  },
167
- {
539
+ 'monitoring.execution-logs': {
168
540
  id: 'monitoring.execution-logs',
541
+ order: 210,
169
542
  label: 'Execution Logs',
170
543
  enabled: true,
544
+ lifecycle: 'active',
171
545
  path: '/monitoring/execution-logs'
172
546
  },
173
- {
547
+ 'monitoring.execution-health': {
174
548
  id: 'monitoring.execution-health',
549
+ order: 220,
175
550
  label: 'Execution Health',
176
551
  enabled: true,
552
+ lifecycle: 'active',
177
553
  path: '/monitoring/execution-health'
178
554
  },
179
- {
555
+ 'monitoring.cost-analytics': {
180
556
  id: 'monitoring.cost-analytics',
557
+ order: 230,
181
558
  label: 'Cost Analytics',
182
559
  enabled: false,
560
+ lifecycle: 'deprecated',
183
561
  path: '/monitoring/cost-analytics'
184
562
  },
185
- {
563
+ 'monitoring.notifications': {
186
564
  id: 'monitoring.notifications',
565
+ order: 240,
187
566
  label: 'Notifications',
188
567
  enabled: true,
568
+ lifecycle: 'active',
189
569
  path: '/monitoring/notifications'
190
570
  },
191
- {
571
+ 'monitoring.submitted-requests': {
192
572
  id: 'monitoring.submitted-requests',
573
+ order: 250,
193
574
  label: 'Submitted Requests',
194
575
  enabled: true,
576
+ lifecycle: 'active',
195
577
  path: '/monitoring/requests'
196
578
  },
197
- {
579
+ settings: {
198
580
  id: 'settings',
581
+ order: 260,
199
582
  label: 'Settings',
200
583
  enabled: true,
201
- icon: 'feature.settings',
202
- uiPosition: 'sidebar-bottom'
584
+ lifecycle: 'active',
585
+ icon: 'feature.settings'
203
586
  },
204
- {
587
+ 'settings.account': {
205
588
  id: 'settings.account',
589
+ order: 270,
206
590
  label: 'Account',
207
591
  enabled: true,
592
+ lifecycle: 'active',
208
593
  path: '/settings/account'
209
594
  },
210
- {
595
+ 'settings.appearance': {
211
596
  id: 'settings.appearance',
597
+ order: 280,
212
598
  label: 'Appearance',
213
599
  enabled: true,
600
+ lifecycle: 'active',
214
601
  path: '/settings/appearance'
215
602
  },
216
- {
603
+ 'settings.roles': {
217
604
  id: 'settings.roles',
605
+ order: 290,
218
606
  label: 'My Roles',
219
607
  enabled: true,
608
+ lifecycle: 'active',
220
609
  path: '/settings/roles'
221
610
  },
222
- {
611
+ 'settings.organization': {
223
612
  id: 'settings.organization',
613
+ order: 300,
224
614
  label: 'Organization',
225
615
  enabled: true,
616
+ lifecycle: 'active',
226
617
  path: '/settings/organization'
227
618
  },
228
- {
619
+ 'settings.credentials': {
229
620
  id: 'settings.credentials',
621
+ order: 310,
230
622
  label: 'Credentials',
231
623
  enabled: true,
624
+ lifecycle: 'active',
232
625
  path: '/settings/credentials'
233
626
  },
234
- {
627
+ 'settings.api-keys': {
235
628
  id: 'settings.api-keys',
629
+ order: 320,
236
630
  label: 'API Keys',
237
631
  enabled: true,
632
+ lifecycle: 'active',
238
633
  path: '/settings/api-keys'
239
634
  },
240
- {
635
+ 'settings.webhooks': {
241
636
  id: 'settings.webhooks',
637
+ order: 330,
242
638
  label: 'Webhooks',
243
639
  enabled: true,
640
+ lifecycle: 'active',
244
641
  path: '/settings/webhooks'
245
642
  },
246
- {
643
+ 'settings.deployments': {
247
644
  id: 'settings.deployments',
645
+ order: 340,
248
646
  label: 'Deployments',
249
647
  enabled: true,
648
+ lifecycle: 'active',
250
649
  path: '/settings/deployments'
251
650
  },
252
- {
651
+ admin: {
253
652
  id: 'admin',
653
+ order: 350,
254
654
  label: 'Admin',
255
655
  enabled: true,
656
+ lifecycle: 'active',
256
657
  path: '/admin',
257
658
  icon: 'feature.admin',
258
- uiPosition: 'sidebar-bottom',
259
659
  requiresAdmin: true
260
660
  },
261
- {
661
+ 'admin.system-health': {
262
662
  id: 'admin.system-health',
663
+ order: 360,
263
664
  label: 'System Health',
264
665
  enabled: true,
666
+ lifecycle: 'active',
265
667
  path: '/admin/system-health'
266
668
  },
267
- {
669
+ 'admin.organizations': {
268
670
  id: 'admin.organizations',
671
+ order: 370,
269
672
  label: 'Organizations',
270
673
  enabled: true,
674
+ lifecycle: 'active',
271
675
  path: '/admin/organizations'
272
676
  },
273
- {
677
+ 'admin.users': {
274
678
  id: 'admin.users',
679
+ order: 380,
275
680
  label: 'Users',
276
681
  enabled: true,
682
+ lifecycle: 'active',
277
683
  path: '/admin/users'
278
684
  },
279
- {
685
+ 'admin.design-showcase': {
280
686
  id: 'admin.design-showcase',
687
+ order: 390,
281
688
  label: 'Design Showcase',
282
689
  enabled: true,
690
+ lifecycle: 'active',
283
691
  path: '/admin/design-showcase'
284
692
  },
285
- {
693
+ 'admin.debug': {
286
694
  id: 'admin.debug',
695
+ order: 400,
287
696
  label: 'Debug',
288
697
  enabled: true,
698
+ lifecycle: 'active',
289
699
  path: '/admin/debug'
290
700
  },
291
- {
701
+ archive: {
292
702
  id: 'archive',
703
+ order: 410,
293
704
  label: 'Archive',
294
705
  enabled: true,
706
+ lifecycle: 'active',
295
707
  path: '/archive',
296
708
  icon: 'feature.archive',
297
- uiPosition: 'sidebar-bottom',
298
709
  devOnly: true
299
710
  },
300
- {
711
+ 'archive.agent-chat': {
301
712
  id: 'archive.agent-chat',
713
+ order: 420,
302
714
  label: 'Agent Chat',
303
715
  enabled: true,
716
+ lifecycle: 'active',
304
717
  path: '/archive/agent-chat'
305
718
  },
306
- {
719
+ 'archive.execution-runner': {
307
720
  id: 'archive.execution-runner',
721
+ order: 430,
308
722
  label: 'Execution Runner',
309
723
  enabled: true,
724
+ lifecycle: 'active',
310
725
  path: '/archive/execution-runner'
311
726
  },
312
- {
727
+ seo: {
313
728
  id: 'seo',
729
+ order: 440,
314
730
  label: 'SEO',
315
731
  enabled: false,
732
+ lifecycle: 'deprecated',
316
733
  path: '/seo'
317
734
  },
318
- {
735
+ knowledge: {
319
736
  id: 'knowledge',
737
+ order: 450,
320
738
  label: 'Knowledge',
321
739
  description: 'Operational knowledge, playbooks, and strategy docs',
322
740
  enabled: true,
741
+ lifecycle: 'active',
323
742
  color: 'teal',
324
- icon: 'feature.knowledge',
325
- uiPosition: 'sidebar-primary'
743
+ icon: 'feature.knowledge'
326
744
  },
327
- {
745
+ 'knowledge.base': {
328
746
  id: 'knowledge.base',
747
+ order: 460,
329
748
  label: 'Knowledge Base',
330
749
  enabled: true,
750
+ lifecycle: 'active',
331
751
  path: '/knowledge'
332
752
  }
333
- ],
334
- branding: DEFAULT_ORGANIZATION_MODEL_BRANDING,
335
- navigation: { surfaces: [], groups: [] },
336
- sales: DEFAULT_ORGANIZATION_MODEL_SALES,
337
- prospecting: DEFAULT_ORGANIZATION_MODEL_PROSPECTING,
338
- projects: DEFAULT_ORGANIZATION_MODEL_PROJECTS,
339
- identity: DEFAULT_ORGANIZATION_MODEL_IDENTITY,
340
- customers: DEFAULT_ORGANIZATION_MODEL_CUSTOMERS,
341
- offerings: DEFAULT_ORGANIZATION_MODEL_OFFERINGS,
342
- roles: DEFAULT_ORGANIZATION_MODEL_ROLES,
343
- goals: DEFAULT_ORGANIZATION_MODEL_GOALS,
344
- statuses: DEFAULT_ORGANIZATION_MODEL_STATUSES,
345
- operations: DEFAULT_ORGANIZATION_MODEL_OPERATIONS,
753
+ },
754
+ resources: DEFAULT_ORGANIZATION_MODEL_RESOURCES,
755
+ actions: DEFAULT_ORGANIZATION_MODEL_ACTIONS,
756
+ entities: DEFAULT_ORGANIZATION_MODEL_ENTITIES,
757
+ policies: DEFAULT_ORGANIZATION_MODEL_POLICIES,
758
+ // Phase 4 (D1): statuses top-level field removed; status data lives in system.content.
346
759
  knowledge: DEFAULT_ORGANIZATION_MODEL_KNOWLEDGE
347
760
  }