@elevasis/ui 2.13.0 → 2.14.1

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 (35) hide show
  1. package/dist/chunk-442LZPIR.js +5 -0
  2. package/dist/{chunk-T7R5P5JJ.js → chunk-A7346I7H.js} +1 -1
  3. package/dist/{chunk-BSW5MUAQ.js → chunk-C56A2MAS.js} +356 -25
  4. package/dist/{chunk-2CGYLRTX.js → chunk-ETQRV5A6.js} +1 -1
  5. package/dist/{chunk-6WPKE7C3.js → chunk-F2GI5TQT.js} +8 -5
  6. package/dist/{chunk-PCK553L4.js → chunk-IO75JNQE.js} +1 -1
  7. package/dist/{chunk-FT27I4S7.js → chunk-JAUU6TZU.js} +13 -4
  8. package/dist/{chunk-NLFAEJDH.js → chunk-JL7RHMV2.js} +3 -3
  9. package/dist/{chunk-H333SX3N.js → chunk-NPWJYY4B.js} +2 -2
  10. package/dist/{chunk-67BKMKFG.js → chunk-TAUPDLQ7.js} +1 -1
  11. package/dist/components/index.d.ts +2 -2
  12. package/dist/components/index.js +16 -16
  13. package/dist/features/auth/index.js +1 -1
  14. package/dist/features/crm/index.js +4 -4
  15. package/dist/features/dashboard/index.js +3 -3
  16. package/dist/features/delivery/index.js +5 -5
  17. package/dist/features/lead-gen/index.js +8 -8
  18. package/dist/features/monitoring/index.js +4 -4
  19. package/dist/features/monitoring/requests/index.css +589 -0
  20. package/dist/features/monitoring/requests/index.js +442 -0
  21. package/dist/features/operations/index.js +6 -6
  22. package/dist/features/settings/index.js +3 -3
  23. package/dist/hooks/index.d.ts +7 -7
  24. package/dist/hooks/index.js +2 -2
  25. package/dist/hooks/published.d.ts +7 -7
  26. package/dist/hooks/published.js +2 -2
  27. package/dist/index.d.ts +52 -6
  28. package/dist/index.js +2 -2
  29. package/dist/provider/index.d.ts +47 -1
  30. package/dist/provider/index.js +1 -1
  31. package/dist/provider/published.d.ts +47 -1
  32. package/dist/provider/published.js +1 -1
  33. package/dist/types/index.d.ts +3 -3
  34. package/package.json +2 -2
  35. package/dist/chunk-G2TDX3W6.js +0 -5
@@ -0,0 +1,5 @@
1
+ // ../core/src/organization-model/contracts.ts
2
+ var PROJECTS_FEATURE_ID = "projects";
3
+ var PROJECTS_VIEW_CAPABILITY_ID = "delivery.projects.view";
4
+
5
+ export { PROJECTS_FEATURE_ID, PROJECTS_VIEW_CAPABILITY_ID };
@@ -2,7 +2,7 @@ import { FilterBar } from './chunk-PDHTXPSF.js';
2
2
  import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { AppShellLoader } from './chunk-M25JL54Z.js';
4
4
  import { useAvailablePresets } from './chunk-6RWMRQN5.js';
5
- import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-FT27I4S7.js';
5
+ import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas, showErrorNotification } from './chunk-JAUU6TZU.js';
6
6
  import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-SQQGLGHW.js';
7
7
  import { formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-IOKL7BKE.js';
8
8
  import { useInitialization } from './chunk-TUXTSEAF.js';
@@ -1,14 +1,14 @@
1
1
  import { ChatHeader, ChatSidebar } from './chunk-ROSMICXG.js';
2
2
  import { SubshellLoader } from './chunk-ADSSLKKP.js';
3
- import { ResourceHealthPanel } from './chunk-2CGYLRTX.js';
3
+ import { ResourceHealthPanel } from './chunk-ETQRV5A6.js';
4
4
  import { PageContainer } from './chunk-BZZCNLT6.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { CustomModal, ConfirmationModal } from './chunk-GBMNCNHX.js';
7
- import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-67BKMKFG.js';
7
+ import { BaseNode, useGraphTheme, BaseEdge, FormFieldRenderer, ExecutionStats, UnifiedWorkflowGraph, WorkflowExecutionTimeline, AgentExecutionVisualizer, AgentExecutionTimeline, GraphBackground, GraphFitViewButton, GraphFitViewHandler } from './chunk-TAUPDLQ7.js';
8
8
  import { useCyberColors, CyberDonut } from './chunk-STZJ7SY5.js';
9
9
  import { AppShellLoader } from './chunk-M25JL54Z.js';
10
10
  import { getResourceStatusColor, useTimelineData, useAgentIterationData, getStatusIcon } from './chunk-GHIPBT5V.js';
11
- import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-FT27I4S7.js';
11
+ import { useErrorDetail, useExecution, useArchivedLogs, useDeleteExecution, useRetryExecution, useCancelExecution, useCommandQueueTotals, useStatusFilter, useResourceSearch, useResourcesDomainFilters, usePaginationState, useResources, useRecentExecutionsByResource, filterByDomainFilters, useExecuteAsync, useResourceDefinition, isSessionCapable, useDeleteTask, useCommandQueue, useSubmitAction, useCommandViewData, useCommandViewStats, useCommandViewStore, useResourceExecutions, useCheckpointTasks, useExecutionPanelState, useDeleteSession, useCreateSession, useSessions, useSessionExecutions, useSession, showApiErrorNotification, showSuccessNotification, useBulkDeleteExecutions } from './chunk-JAUU6TZU.js';
12
12
  import { useGraphHighlighting, calculateGraphHeight, Graph_module_css_default, GRAPH_CONSTANTS } from './chunk-22UVE3RA.js';
13
13
  import { useMergedExecution } from './chunk-3ZMAGTWF.js';
14
14
  import { useOptionalElevasisFeatures, useElevasisFeatures } from './chunk-C7BX547M.js';
@@ -72,6 +72,25 @@ var DisplayMetadataSchema = z.object({
72
72
  color: ColorTokenSchema.optional(),
73
73
  icon: IconNameSchema.optional()
74
74
  });
75
+ var TechStackEntrySchema = z.object({
76
+ /** Name of the external platform (e.g. "HubSpot", "Stripe", "Notion"). */
77
+ platform: z.string().trim().min(1).max(200),
78
+ /** Free-form description of what this integration is used for. */
79
+ purpose: z.string().trim().min(1).max(500),
80
+ /**
81
+ * Health of the credential backing this integration.
82
+ * - configured: credential present and valid
83
+ * - pending: not yet set up
84
+ * - expired: credential existed but has lapsed
85
+ * - missing: expected but not present
86
+ */
87
+ credentialStatus: z.enum(["configured", "pending", "expired", "missing"]),
88
+ /**
89
+ * Whether this integration is the primary system of record for its domain
90
+ * (e.g. HubSpot is SoR for contacts). Defaults to false.
91
+ */
92
+ isSystemOfRecord: z.boolean().default(false)
93
+ });
75
94
  var ResourceMappingSchema = DisplayMetadataSchema.extend({
76
95
  id: ModelIdSchema,
77
96
  resourceId: z.string().trim().min(1).max(255),
@@ -79,7 +98,9 @@ var ResourceMappingSchema = DisplayMetadataSchema.extend({
79
98
  featureIds: ReferenceIdsSchema,
80
99
  entityIds: ReferenceIdsSchema,
81
100
  surfaceIds: ReferenceIdsSchema,
82
- capabilityIds: ReferenceIdsSchema
101
+ capabilityIds: ReferenceIdsSchema,
102
+ /** Optional tech-stack metadata for external-SaaS integrations. */
103
+ techStack: TechStackEntrySchema.optional()
83
104
  });
84
105
 
85
106
  // ../core/src/organization-model/domains/branding.ts
@@ -93,37 +114,37 @@ var OrganizationModelBrandingSchema = z.object({
93
114
  dark: z.string().trim().min(1).max(2048).optional()
94
115
  }).default({})
95
116
  });
96
- var CrmStageSemanticClassSchema = z.enum(["open", "active", "nurturing", "closed_won", "closed_lost"]);
97
- var CrmStageSchema = DisplayMetadataSchema.extend({
117
+ var SalesStageSemanticClassSchema = z.enum(["open", "active", "nurturing", "closed_won", "closed_lost"]);
118
+ var SalesStageSchema = DisplayMetadataSchema.extend({
98
119
  id: ModelIdSchema,
99
120
  order: z.number().int().min(0),
100
- semanticClass: CrmStageSemanticClassSchema,
121
+ semanticClass: SalesStageSemanticClassSchema,
101
122
  surfaceIds: ReferenceIdsSchema,
102
123
  resourceIds: ReferenceIdsSchema
103
124
  });
104
- var CrmPipelineSchema = z.object({
125
+ var SalesPipelineSchema = z.object({
105
126
  id: ModelIdSchema,
106
127
  label: z.string().trim().min(1).max(120),
107
128
  description: DescriptionSchema.optional(),
108
129
  entityId: ModelIdSchema,
109
- stages: z.array(CrmStageSchema).min(1)
130
+ stages: z.array(SalesStageSchema).min(1)
110
131
  });
111
- var OrganizationModelCrmSchema = z.object({
132
+ var OrganizationModelSalesSchema = z.object({
112
133
  entityId: ModelIdSchema,
113
134
  defaultPipelineId: ModelIdSchema,
114
- pipelines: z.array(CrmPipelineSchema).min(1)
135
+ pipelines: z.array(SalesPipelineSchema).min(1)
115
136
  });
116
- var DeliveryStateSchema = DisplayMetadataSchema.extend({
137
+ var ProjectsDomainStateSchema = DisplayMetadataSchema.extend({
117
138
  id: ModelIdSchema,
118
139
  order: z.number().int().min(0)
119
140
  });
120
- var OrganizationModelDeliverySchema = z.object({
141
+ var OrganizationModelProjectsSchema = z.object({
121
142
  projectEntityId: ModelIdSchema,
122
143
  milestoneEntityId: ModelIdSchema,
123
144
  taskEntityId: ModelIdSchema,
124
- projectStatuses: z.array(DeliveryStateSchema).min(1),
125
- milestoneStatuses: z.array(DeliveryStateSchema).min(1),
126
- taskStatuses: z.array(DeliveryStateSchema).min(1)
145
+ projectStatuses: z.array(ProjectsDomainStateSchema).min(1),
146
+ milestoneStatuses: z.array(ProjectsDomainStateSchema).min(1),
147
+ taskStatuses: z.array(ProjectsDomainStateSchema).min(1)
127
148
  });
128
149
  var FeatureSchema = z.object({
129
150
  id: ModelIdSchema,
@@ -137,17 +158,17 @@ var FeatureSchema = z.object({
137
158
  resourceIds: ReferenceIdsSchema,
138
159
  capabilityIds: ReferenceIdsSchema
139
160
  });
140
- var LeadGenLifecycleStageSchema = DisplayMetadataSchema.extend({
161
+ var ProspectingLifecycleStageSchema = DisplayMetadataSchema.extend({
141
162
  id: ModelIdSchema,
142
163
  order: z.number().int().min(0)
143
164
  });
144
- var OrganizationModelLeadGenSchema = z.object({
165
+ var OrganizationModelProspectingSchema = z.object({
145
166
  listEntityId: ModelIdSchema,
146
167
  companyEntityId: ModelIdSchema,
147
168
  contactEntityId: ModelIdSchema,
148
169
  description: DescriptionSchema.optional(),
149
- companyStages: z.array(LeadGenLifecycleStageSchema).min(1),
150
- contactStages: z.array(LeadGenLifecycleStageSchema).min(1)
170
+ companyStages: z.array(ProspectingLifecycleStageSchema).min(1),
171
+ contactStages: z.array(ProspectingLifecycleStageSchema).min(1)
151
172
  });
152
173
  var SurfaceTypeSchema = z.enum(["page", "dashboard", "graph", "detail", "list", "settings"]);
153
174
  var SurfaceDefinitionSchema = z.object({
@@ -168,7 +189,7 @@ var SurfaceDefinitionSchema = z.object({
168
189
  var NavigationGroupSchema = z.object({
169
190
  id: ModelIdSchema,
170
191
  label: LabelSchema,
171
- placement: z.enum(["primary", "secondary", "bottom"]),
192
+ placement: z.string().trim().min(1).max(50),
172
193
  surfaceIds: z.array(ModelIdSchema).default([])
173
194
  });
174
195
  var OrganizationModelNavigationSchema = z.object({
@@ -176,6 +197,271 @@ var OrganizationModelNavigationSchema = z.object({
176
197
  surfaces: z.array(SurfaceDefinitionSchema).default([]),
177
198
  groups: z.array(NavigationGroupSchema).default([])
178
199
  });
200
+ var BusinessHoursDaySchema = z.object({
201
+ open: z.string().trim().regex(/^\d{2}:\d{2}$/, "Expected HH:MM format"),
202
+ close: z.string().trim().regex(/^\d{2}:\d{2}$/, "Expected HH:MM format")
203
+ });
204
+ var BusinessHoursSchema = z.object({
205
+ monday: BusinessHoursDaySchema.optional(),
206
+ tuesday: BusinessHoursDaySchema.optional(),
207
+ wednesday: BusinessHoursDaySchema.optional(),
208
+ thursday: BusinessHoursDaySchema.optional(),
209
+ friday: BusinessHoursDaySchema.optional(),
210
+ saturday: BusinessHoursDaySchema.optional(),
211
+ sunday: BusinessHoursDaySchema.optional()
212
+ }).default({});
213
+ var IdentityDomainSchema = z.object({
214
+ /** Why the organization exists — one or two plain-language sentences. */
215
+ mission: z.string().trim().max(1e3).default(""),
216
+ /** Long-term direction the organization is moving toward. */
217
+ vision: z.string().trim().max(1e3).default(""),
218
+ /** Legal registered name of the entity. */
219
+ legalName: z.string().trim().max(200).default(""),
220
+ /**
221
+ * Type of legal entity (e.g. "LLC", "Corporation", "Sole Proprietor",
222
+ * "Non-profit"). Free-form string so it covers any jurisdiction.
223
+ */
224
+ entityType: z.string().trim().max(100).default(""),
225
+ /**
226
+ * Primary jurisdiction of registration or operation
227
+ * (e.g. "United States – Delaware", "Canada – Ontario").
228
+ */
229
+ jurisdiction: z.string().trim().max(200).default(""),
230
+ /**
231
+ * Industry category — broad classification (e.g. "Marketing Agency",
232
+ * "Software / SaaS", "Professional Services").
233
+ */
234
+ industryCategory: z.string().trim().max(200).default(""),
235
+ /**
236
+ * Geographic focus — where the organization primarily operates or serves
237
+ * (e.g. "North America", "Global", "Southeast Asia").
238
+ */
239
+ geographicFocus: z.string().trim().max(200).default(""),
240
+ /**
241
+ * IANA timezone identifier for the organization's primary operating timezone
242
+ * (e.g. "America/Los_Angeles", "Europe/London", "UTC").
243
+ */
244
+ timeZone: z.string().trim().max(100).default("UTC"),
245
+ /** Typical operating hours per day of week. Empty object means not configured. */
246
+ businessHours: BusinessHoursSchema
247
+ });
248
+ var DEFAULT_ORGANIZATION_MODEL_IDENTITY = {
249
+ mission: "",
250
+ vision: "",
251
+ legalName: "",
252
+ entityType: "",
253
+ jurisdiction: "",
254
+ industryCategory: "",
255
+ geographicFocus: "",
256
+ timeZone: "UTC",
257
+ businessHours: {}
258
+ };
259
+ var FirmographicsSchema = z.object({
260
+ /** Industry vertical (e.g. "Marketing Agency", "Legal", "Real Estate"). */
261
+ industry: z.string().trim().max(200).optional(),
262
+ /**
263
+ * Company headcount band (e.g. "1–10", "11–50", "51–200", "200+").
264
+ * Free-form string to accommodate any band notation.
265
+ */
266
+ companySize: z.string().trim().max(100).optional(),
267
+ /**
268
+ * Primary geographic region the segment operates in or is targeted from
269
+ * (e.g. "North America", "Europe", "Global").
270
+ */
271
+ region: z.string().trim().max(200).optional()
272
+ });
273
+ var CustomerSegmentSchema = z.object({
274
+ /** Stable unique identifier for the segment (e.g. "segment-smb-agencies"). */
275
+ id: z.string().trim().min(1).max(100),
276
+ /** Human-readable name shown to agents and in UI (e.g. "SMB Marketing Agencies"). */
277
+ name: z.string().trim().max(200).default(""),
278
+ /** One or two sentences describing who this segment is. */
279
+ description: z.string().trim().max(2e3).default(""),
280
+ /**
281
+ * The primary job(s) this segment is trying to get done — the goal they hire
282
+ * a product/service to accomplish. Plain-language narrative or bullet list.
283
+ */
284
+ jobsToBeDone: z.string().trim().max(2e3).default(""),
285
+ /**
286
+ * Pains — frustrations, obstacles, and risks the segment experiences
287
+ * when trying to accomplish their jobs-to-be-done.
288
+ */
289
+ pains: z.array(z.string().trim().max(500)).default([]),
290
+ /**
291
+ * Gains — outcomes and benefits the segment desires; positive motivators
292
+ * beyond merely resolving pains.
293
+ */
294
+ gains: z.array(z.string().trim().max(500)).default([]),
295
+ /** Firmographic profile for targeting and filtering. */
296
+ firmographics: FirmographicsSchema.default({}),
297
+ /**
298
+ * Value proposition — one or two sentences stating why this organization's
299
+ * offering is uniquely suited for this segment's needs.
300
+ */
301
+ valueProp: z.string().trim().max(2e3).default("")
302
+ });
303
+ var CustomersDomainSchema = z.object({
304
+ segments: z.array(CustomerSegmentSchema).default([])
305
+ });
306
+ var DEFAULT_ORGANIZATION_MODEL_CUSTOMERS = {
307
+ segments: []
308
+ };
309
+ var PricingModelSchema = z.enum(["one-time", "subscription", "usage-based", "custom"]);
310
+ var ProductSchema = z.object({
311
+ /** Stable unique identifier for the product (e.g. "product-starter-plan"). */
312
+ id: z.string().trim().min(1).max(100),
313
+ /** Human-readable name shown to agents and in UI (e.g. "Starter Plan"). */
314
+ name: z.string().trim().max(200).default(""),
315
+ /** One or two sentences describing what this product/service delivers. */
316
+ description: z.string().trim().max(2e3).default(""),
317
+ /**
318
+ * How this product is priced:
319
+ * - "one-time" — single purchase (setup fee, project fee)
320
+ * - "subscription" — recurring (monthly/annual SaaS, retainer)
321
+ * - "usage-based" — metered by consumption (API calls, seats)
322
+ * - "custom" — negotiated or bespoke pricing
323
+ */
324
+ pricingModel: PricingModelSchema.default("custom"),
325
+ /** Base price amount (≥ 0). Currency unit defined by `currency`. */
326
+ price: z.number().min(0).default(0),
327
+ /**
328
+ * ISO 4217 currency code (e.g. "USD", "EUR", "GBP").
329
+ * Free-form string to accommodate any currency; defaults to "USD".
330
+ */
331
+ currency: z.string().trim().max(10).default("USD"),
332
+ /**
333
+ * IDs of customer segments this product targets.
334
+ * Each id must reference a declared `customers.segments[].id`.
335
+ * Cross-reference enforced in `OrganizationModelSchema.superRefine()`.
336
+ */
337
+ targetSegmentIds: z.array(z.string().trim().min(1)).default([]),
338
+ /**
339
+ * Optional: ID of the platform feature responsible for delivering this product.
340
+ * When present, must reference a declared `features[].id`.
341
+ * Cross-reference enforced in `OrganizationModelSchema.superRefine()`.
342
+ */
343
+ deliveryFeatureId: z.string().trim().min(1).optional()
344
+ });
345
+ var OfferingsDomainSchema = z.object({
346
+ products: z.array(ProductSchema).default([])
347
+ });
348
+ var DEFAULT_ORGANIZATION_MODEL_OFFERINGS = {
349
+ products: []
350
+ };
351
+ var RoleSchema = z.object({
352
+ /** Stable unique identifier for the role (e.g. "role-ceo", "role-head-of-sales"). */
353
+ id: z.string().trim().min(1).max(100),
354
+ /** Human-readable title shown to agents and in UI (e.g. "CEO", "Head of Sales"). */
355
+ title: z.string().trim().min(1).max(200),
356
+ /**
357
+ * List of responsibilities this role owns — plain-language descriptions of
358
+ * what the person in this role is accountable for delivering.
359
+ * Defaults to empty array so minimal role definitions stay concise.
360
+ */
361
+ responsibilities: z.array(z.string().trim().max(500)).default([]),
362
+ /**
363
+ * Optional: ID of another role this role reports to.
364
+ * When present, must reference another `roles[].id` in the same organization.
365
+ * Cross-reference enforced in `OrganizationModelSchema.superRefine()`.
366
+ * Absence indicates a top-level role (no reporting line).
367
+ */
368
+ reportsToId: z.string().trim().min(1).max(100).optional(),
369
+ /**
370
+ * Optional: name or email of the person currently holding this role.
371
+ * Free-form string — supports "Alice Johnson", "alice@example.com", or
372
+ * any human-readable identifier. Not validated against any user registry.
373
+ */
374
+ heldBy: z.string().trim().max(200).optional()
375
+ });
376
+ var RolesDomainSchema = z.object({
377
+ roles: z.array(RoleSchema).default([])
378
+ });
379
+ var DEFAULT_ORGANIZATION_MODEL_ROLES = {
380
+ roles: []
381
+ };
382
+ var KeyResultSchema = z.object({
383
+ /** Stable unique identifier for the measurable outcome (e.g. "kr-revenue-q1"). */
384
+ id: z.string().trim().min(1).max(100),
385
+ /** Plain-language description of this measurable outcome (e.g. "Increase trial-to-paid conversion"). */
386
+ description: z.string().trim().min(1).max(500),
387
+ /**
388
+ * What is being measured — the metric name (e.g. "monthly revenue", "NPS score",
389
+ * "trial-to-paid conversion rate"). Free-form string.
390
+ */
391
+ targetMetric: z.string().trim().min(1).max(200),
392
+ /** Current measured value. Defaults to 0 when not yet tracked. */
393
+ currentValue: z.number().default(0),
394
+ /**
395
+ * Target value to reach for this measurable outcome to be considered achieved.
396
+ * Optional — omit if the outcome is directional (e.g. "reduce churn") without
397
+ * a hard numeric target.
398
+ */
399
+ targetValue: z.number().optional()
400
+ });
401
+ var ISO_DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
402
+ var ObjectiveSchema = z.object({
403
+ /** Stable unique identifier for the goal (e.g. "goal-grow-arr-q1-2026"). */
404
+ id: z.string().trim().min(1).max(100),
405
+ /** Plain-language description of what the organization wants to achieve. */
406
+ description: z.string().trim().min(1).max(1e3),
407
+ /**
408
+ * Start of the period this goal is active for — ISO 8601 date string (YYYY-MM-DD).
409
+ * Must be strictly before `periodEnd`.
410
+ */
411
+ periodStart: z.string().regex(ISO_DATE_REGEX, "periodStart must be an ISO date string (YYYY-MM-DD)"),
412
+ /**
413
+ * End of the period this goal is active for — ISO 8601 date string (YYYY-MM-DD).
414
+ * Must be strictly after `periodStart`.
415
+ * Enforced via `OrganizationModelSchema.superRefine()`.
416
+ */
417
+ periodEnd: z.string().regex(ISO_DATE_REGEX, "periodEnd must be an ISO date string (YYYY-MM-DD)"),
418
+ /**
419
+ * List of measurable outcomes that define success for this goal.
420
+ * Defaults to empty array so goals can be declared before outcomes are defined.
421
+ */
422
+ keyResults: z.array(KeyResultSchema).default([])
423
+ });
424
+ var GoalsDomainSchema = z.object({
425
+ objectives: z.array(ObjectiveSchema).default([])
426
+ });
427
+ var DEFAULT_ORGANIZATION_MODEL_GOALS = {
428
+ objectives: []
429
+ };
430
+ var OperationSemanticClassSchema = z.enum(["queue", "executions", "sessions", "notifications", "schedules"]);
431
+ var OperationEntrySchema = z.object({
432
+ id: z.string().trim().min(1).max(100),
433
+ label: z.string().trim().min(1).max(120),
434
+ semanticClass: OperationSemanticClassSchema,
435
+ /** Optional reference to the feature that owns this runtime entity. */
436
+ featureId: z.string().trim().min(1).max(100).optional(),
437
+ /**
438
+ * Optional pointer to the status semanticClass values that apply to this
439
+ * entity — ties operations back to the statuses domain for vibe rendering.
440
+ */
441
+ supportedStatusSemanticClass: z.array(z.string().trim().min(1).max(80)).optional()
442
+ });
443
+ var OperationsDomainSchema = z.object({
444
+ entries: z.array(OperationEntrySchema).default([])
445
+ });
446
+ var StatusSemanticClassSchema = z.enum([
447
+ "delivery.task",
448
+ "delivery.project",
449
+ "delivery.milestone",
450
+ "queue",
451
+ "execution",
452
+ "schedule",
453
+ "schedule.run",
454
+ "request"
455
+ ]);
456
+ var StatusEntrySchema = z.object({
457
+ id: z.string().trim().min(1).max(100),
458
+ label: z.string().trim().min(1).max(120),
459
+ semanticClass: StatusSemanticClassSchema,
460
+ category: z.string().trim().min(1).max(80).optional()
461
+ });
462
+ var StatusesDomainSchema = z.object({
463
+ entries: z.array(StatusEntrySchema).default([])
464
+ });
179
465
 
180
466
  // ../core/src/organization-model/schema.ts
181
467
  var OrganizationModelSchemaBase = z.object({
@@ -183,9 +469,16 @@ var OrganizationModelSchemaBase = z.object({
183
469
  features: z.array(FeatureSchema).default([]),
184
470
  branding: OrganizationModelBrandingSchema,
185
471
  navigation: OrganizationModelNavigationSchema,
186
- crm: OrganizationModelCrmSchema,
187
- leadGen: OrganizationModelLeadGenSchema,
188
- delivery: OrganizationModelDeliverySchema,
472
+ sales: OrganizationModelSalesSchema,
473
+ prospecting: OrganizationModelProspectingSchema,
474
+ projects: OrganizationModelProjectsSchema,
475
+ identity: IdentityDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_IDENTITY),
476
+ customers: CustomersDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_CUSTOMERS),
477
+ offerings: OfferingsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_OFFERINGS),
478
+ roles: RolesDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_ROLES),
479
+ goals: GoalsDomainSchema.default(DEFAULT_ORGANIZATION_MODEL_GOALS),
480
+ statuses: StatusesDomainSchema.default({ entries: [] }),
481
+ operations: OperationsDomainSchema.default({ entries: [] }),
189
482
  resourceMappings: z.array(ResourceMappingSchema).default([])
190
483
  });
191
484
  function addIssue(ctx, path, message) {
@@ -319,10 +612,48 @@ var OrganizationModelSchema = OrganizationModelSchemaBase.superRefine((model, ct
319
612
  addIssue(
320
613
  ctx,
321
614
  ["navigation", "surfaces", surfaceIndex, "resourceIds", resourceIndex],
322
- `Surface "${surface.id}" references resource "${resourceId}" but that resource mapping does not include surface "${surface.id}"`
615
+ `Surface "${surface.id}" references resource "${resourceId}" but that surface does not include resource "${surface.id}"`
616
+ );
617
+ }
618
+ });
619
+ });
620
+ const segmentsById = new Map(model.customers.segments.map((seg) => [seg.id, seg]));
621
+ model.offerings.products.forEach((product, productIndex) => {
622
+ product.targetSegmentIds.forEach((segmentId, segmentIndex) => {
623
+ if (!segmentsById.has(segmentId)) {
624
+ addIssue(
625
+ ctx,
626
+ ["offerings", "products", productIndex, "targetSegmentIds", segmentIndex],
627
+ `Product "${product.id}" references unknown customer segment "${segmentId}"`
323
628
  );
324
629
  }
325
630
  });
631
+ if (product.deliveryFeatureId !== void 0 && !featuresById.has(product.deliveryFeatureId)) {
632
+ addIssue(
633
+ ctx,
634
+ ["offerings", "products", productIndex, "deliveryFeatureId"],
635
+ `Product "${product.id}" references unknown delivery feature "${product.deliveryFeatureId}"`
636
+ );
637
+ }
638
+ });
639
+ model.goals.objectives.forEach((objective, index) => {
640
+ if (objective.periodEnd <= objective.periodStart) {
641
+ addIssue(
642
+ ctx,
643
+ ["goals", "objectives", index, "periodEnd"],
644
+ `Goal "${objective.id}" has periodEnd "${objective.periodEnd}" which must be strictly after periodStart "${objective.periodStart}"`
645
+ );
646
+ }
647
+ });
648
+ const rolesById = new Map(model.roles.roles.map((role) => [role.id, role]));
649
+ model.roles.roles.forEach((role, roleIndex) => {
650
+ if (role.reportsToId !== void 0 && !rolesById.has(role.reportsToId)) {
651
+ addIssue(
652
+ ctx,
653
+ ["roles", "roles", roleIndex, "reportsToId"],
654
+ `Role "${role.id}" references unknown reportsToId "${role.reportsToId}"`
655
+ );
656
+ }
326
657
  });
327
658
  model.resourceMappings.forEach((resourceMapping, resourceIndex) => {
328
659
  resourceMapping.featureIds.forEach((featureId, featureIndex) => {
@@ -1,5 +1,5 @@
1
1
  import { useCyberColors, CyberLegendItem, CyberAreaChart } from './chunk-STZJ7SY5.js';
2
- import { useResourcesHealth } from './chunk-FT27I4S7.js';
2
+ import { useResourcesHealth } from './chunk-JAUU6TZU.js';
3
3
  import { getTimeRangeDates, formatBucketTime } from './chunk-LXHZYSMQ.js';
4
4
  import { CardHeader, EmptyState } from './chunk-SQQGLGHW.js';
5
5
  import { Paper, Center, Loader, Group } from '@mantine/core';
@@ -1,11 +1,11 @@
1
- import { DELIVERY_PROJECTS_VIEW_CAPABILITY_ID, PROJECTS_FEATURE_ID } from './chunk-G2TDX3W6.js';
2
- import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
1
+ import { PROJECTS_VIEW_CAPABILITY_ID, PROJECTS_FEATURE_ID } from './chunk-442LZPIR.js';
3
2
  import { PageContainer } from './chunk-BZZCNLT6.js';
3
+ import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
4
4
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
7
  import { CustomModal } from './chunk-GBMNCNHX.js';
8
- import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProjectRealtime, useProject, useProjectTasks, useProjectNotes, useUpdateMilestone, useProjectActivities, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-FT27I4S7.js';
8
+ import { useCreateTask, useCreateMilestone, useProjectMilestones, useUpdateTask, useProjects, useDeleteProject, useTableSort, sortData, usePaginationState, useTableSelection, useProjectRealtime, useProject, useProjectTasks, useProjectNotes, useUpdateMilestone, useProjectActivities, useCreateNote, showApiErrorNotification, projectKeys } from './chunk-JAUU6TZU.js';
9
9
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
10
10
  import { StatusBadge, EmptyState, PageTitleCaption, CenteredErrorState, StatCard } from './chunk-SQQGLGHW.js';
11
11
  import { PAGE_SIZE_DEFAULT, formatTimeAgo, formatDate, formatRelativeTime } from './chunk-IOKL7BKE.js';
@@ -542,7 +542,7 @@ var ProjectsSidebar = ({ children } = {}) => {
542
542
  var deliveryManifest = {
543
543
  key: "delivery",
544
544
  featureId: PROJECTS_FEATURE_ID,
545
- capabilityIds: [DELIVERY_PROJECTS_VIEW_CAPABILITY_ID],
545
+ capabilityIds: [PROJECTS_VIEW_CAPABILITY_ID],
546
546
  navEntry: {
547
547
  label: "Projects",
548
548
  icon: IconBriefcase,
@@ -617,7 +617,10 @@ function ProjectsListPage({ onProjectClick } = {}) {
617
617
  }),
618
618
  []
619
619
  );
620
- const sortedProjects = useMemo(() => sortData(filteredProjects, sort, sortAccessors), [filteredProjects, sort, sortAccessors]);
620
+ const sortedProjects = useMemo(
621
+ () => sortData(filteredProjects, sort, sortAccessors),
622
+ [filteredProjects, sort, sortAccessors]
623
+ );
621
624
  const pagination = usePaginationState(PAGE_SIZE_DEFAULT, [statusFilter, searchQuery], sortedProjects.length);
622
625
  const paginatedProjects = useMemo(
623
626
  () => sortedProjects.slice(pagination.offset, pagination.offset + PAGE_SIZE_DEFAULT),
@@ -3,7 +3,7 @@ import { CustomModal } from './chunk-GBMNCNHX.js';
3
3
  import { CyberAreaChart, CostTrendChart, ActivityTrendChart } from './chunk-STZJ7SY5.js';
4
4
  import { AppShellLoader } from './chunk-M25JL54Z.js';
5
5
  import { formatDuration } from './chunk-GHIPBT5V.js';
6
- import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-FT27I4S7.js';
6
+ import { useResolveError, useResolveAllErrors, usePaginationState, useErrorDetails, useMarkAsRead, useExecutionLogsFilters, useExecutionLogs, useExecutionHealth, useErrorAnalysis, useTimeRangeDates, useErrorDetail, useResolveErrorsByExecution, useResources, useCostTrends, useCostSummary, useCostByModel, useCostBreakdown, useActivityFilters, useActivityTrend, useActivities, useNotifications, useMarkAllAsRead, useTestNotification } from './chunk-JAUU6TZU.js';
7
7
  import { formatBucketTime, getTimeRangeDates } from './chunk-LXHZYSMQ.js';
8
8
  import { CenteredErrorState, CardHeader, StatsCardSkeleton, TrendIndicator, DetailCardSkeleton, EmptyState, PageTitleCaption, JsonViewer } from './chunk-SQQGLGHW.js';
9
9
  import { PAGE_SIZE_DEFAULT } from './chunk-IOKL7BKE.js';
@@ -2182,7 +2182,18 @@ function useCommandQueue({
2182
2182
  } = {}) {
2183
2183
  const { apiRequest, isReady, organizationId } = useElevasisServices();
2184
2184
  return useQuery({
2185
- queryKey: ["command-queue", "list", organizationId, status, humanCheckpoint, timeRange, priorityMin, priorityMax, limit, offset],
2185
+ queryKey: [
2186
+ "command-queue",
2187
+ "list",
2188
+ organizationId,
2189
+ status,
2190
+ humanCheckpoint,
2191
+ timeRange,
2192
+ priorityMin,
2193
+ priorityMax,
2194
+ limit,
2195
+ offset
2196
+ ],
2186
2197
  queryFn: async () => {
2187
2198
  const params = new URLSearchParams();
2188
2199
  if (status) params.set("status", status);
@@ -2192,9 +2203,7 @@ function useCommandQueue({
2192
2203
  if (priorityMax !== void 0) params.set("priorityMax", String(priorityMax));
2193
2204
  if (limit !== void 0) params.set("limit", String(limit));
2194
2205
  if (offset !== void 0) params.set("offset", String(offset));
2195
- const response = await apiRequest(
2196
- `/command-queue?${params.toString()}`
2197
- );
2206
+ const response = await apiRequest(`/command-queue?${params.toString()}`);
2198
2207
  return response.tasks.map((task) => ({
2199
2208
  ...task,
2200
2209
  createdAt: new Date(task.createdAt),
@@ -1,11 +1,11 @@
1
- import { ResourceExecuteDialog } from './chunk-BSW5MUAQ.js';
2
- import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
1
+ import { ResourceExecuteDialog } from './chunk-C56A2MAS.js';
3
2
  import { PageContainer } from './chunk-BZZCNLT6.js';
3
+ import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
4
4
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
5
5
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
6
6
  import { FilterBar } from './chunk-PDHTXPSF.js';
7
7
  import { CustomModal } from './chunk-GBMNCNHX.js';
8
- import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-FT27I4S7.js';
8
+ import { showApiErrorNotification, acquisitionListKeys, showSuccessNotification, useListsTelemetry, useLists, useCreateList, useTableSort, sortData, usePaginationState, useTableSelection, useList, useListProgress, useListExecutions, useResourceDefinition, useCompanies, useDeleteCompanies, useContacts, useDeleteContacts } from './chunk-JAUU6TZU.js';
9
9
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
10
10
  import { PageTitleCaption, CenteredErrorState, StatCard, EmptyState } from './chunk-SQQGLGHW.js';
11
11
  import { useElevasisServices } from './chunk-QEPXAWE2.js';
@@ -1,10 +1,10 @@
1
- import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
2
1
  import { PageContainer } from './chunk-BZZCNLT6.js';
2
+ import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
3
3
  import { SubshellNavItem } from './chunk-CEWTOKE7.js';
4
4
  import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
5
5
  import { FilterBar } from './chunk-PDHTXPSF.js';
6
6
  import { CustomModal } from './chunk-GBMNCNHX.js';
7
- import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-FT27I4S7.js';
7
+ import { useDealTasksDue, useDeals, useCreateDealTask, useDeleteDeal, useTableSort, sortData, usePaginationState, useTableSelection, useDealDetail, useCompany } from './chunk-JAUU6TZU.js';
8
8
  import { SubshellContentContainer } from './chunk-RX4UWZZR.js';
9
9
  import { CenteredErrorState, CardHeader, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-SQQGLGHW.js';
10
10
  import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-IOKL7BKE.js';
@@ -2,7 +2,7 @@ import { ResourceHealthChart } from './chunk-LGKLC5MG.js';
2
2
  import { useCyberColors, HeroStatsRow } from './chunk-STZJ7SY5.js';
3
3
  import { AppShellCenteredContainer, AppShellLoader } from './chunk-M25JL54Z.js';
4
4
  import { STATUS_COLORS, getStatusIcon, formatDuration, getStatusColors, AGENT_CONSTANTS, shouldAnimateEdge, TIMELINE_CONSTANTS, calculateBarPosition, CONTAINER_CONSTANTS, useExecutionPath, useUnifiedWorkflowLayout, WORKFLOW_CONSTANTS, useReactFlowAgent } from './chunk-GHIPBT5V.js';
5
- import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-FT27I4S7.js';
5
+ import { useExecuteResource, useDashboardMetrics, useResources, useTimeRangeDates, useUnresolvedErrors, useRecentExecutionsByResource, useCommandQueue, useScheduledTasks, useResourcesHealth } from './chunk-JAUU6TZU.js';
6
6
  import { getTimeRangeDates } from './chunk-LXHZYSMQ.js';
7
7
  import { Graph_module_css_default, useDirectedChainHighlighting, useNodeSelection, useFitViewTrigger } from './chunk-22UVE3RA.js';
8
8
  import { glassBase } from './chunk-R73EHHPN.js';
@@ -3636,7 +3636,7 @@ interface Task extends OriginTracking {
3636
3636
  priority: number;
3637
3637
  /** Optional checkpoint identifier for grouping related human approval tasks */
3638
3638
  humanCheckpoint?: string;
3639
- status: TaskStatus;
3639
+ status: QueueTaskStatus;
3640
3640
  /**
3641
3641
  * Target resource tracking — mirrors origin columns.
3642
3642
  * Set when task is created; patchable to redirect execution to a different resource.
@@ -3666,7 +3666,7 @@ interface Task extends OriginTracking {
3666
3666
  * - failed: execution failed, task can be retried
3667
3667
  * - expired: timed out before action
3668
3668
  */
3669
- type TaskStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
3669
+ type QueueTaskStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
3670
3670
 
3671
3671
  /**
3672
3672
  * Target for schedule execution - identifies what resource to execute.