@elevasis/ui 1.20.1 → 1.22.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 (66) hide show
  1. package/dist/charts/index.js +3 -2
  2. package/dist/chunk-3KMDHCAR.js +52 -0
  3. package/dist/{chunk-4SY4EQSK.js → chunk-5266RV46.js} +3 -3
  4. package/dist/{chunk-UMFPUM7Q.js → chunk-7TLPKXC2.js} +12 -12
  5. package/dist/{chunk-OFAXUZPZ.js → chunk-AJPFSMEH.js} +528 -336
  6. package/dist/chunk-AWT255UH.js +255 -0
  7. package/dist/{chunk-EMN755L5.js → chunk-CTF6FS2M.js} +10 -216
  8. package/dist/{chunk-C7AD6N23.js → chunk-DLI3F5IV.js} +364 -364
  9. package/dist/{chunk-AQ5MQDSS.js → chunk-EDAYKRPJ.js} +404 -2
  10. package/dist/{chunk-XOTN3X3Z.js → chunk-FATKFO7X.js} +3 -54
  11. package/dist/{chunk-JZEXFQ6N.js → chunk-HOYZWSNV.js} +91 -80
  12. package/dist/{chunk-AWMZCYKH.js → chunk-IAZT3VO6.js} +158 -82
  13. package/dist/{chunk-ERVB3QJQ.js → chunk-N5SDJP44.js} +1 -1
  14. package/dist/{chunk-3DIU726S.js → chunk-NVSKJG3L.js} +25 -4
  15. package/dist/{chunk-VLTVZXP6.js → chunk-QZS5FOIR.js} +2 -2
  16. package/dist/chunk-ROSMICXG.js +668 -0
  17. package/dist/{chunk-JIABC3AE.js → chunk-WAEKXBP3.js} +516 -266
  18. package/dist/{chunk-COTI2QPO.js → chunk-ZHJGTOXP.js} +4 -3
  19. package/dist/components/chat/index.d.ts +202 -0
  20. package/dist/components/chat/index.js +2 -0
  21. package/dist/components/index.css +0 -3
  22. package/dist/components/index.d.ts +37 -37
  23. package/dist/components/index.js +2652 -2902
  24. package/dist/features/auth/index.css +0 -3
  25. package/dist/features/dashboard/index.css +0 -3
  26. package/dist/features/dashboard/index.js +9 -9
  27. package/dist/features/monitoring/index.css +0 -3
  28. package/dist/features/monitoring/index.js +10 -10
  29. package/dist/features/operations/index.css +0 -3
  30. package/dist/features/operations/index.d.ts +245 -10
  31. package/dist/features/operations/index.js +1115 -170
  32. package/dist/features/settings/index.css +0 -3
  33. package/dist/features/settings/index.js +9 -9
  34. package/dist/hooks/index.css +68 -3
  35. package/dist/hooks/index.d.ts +1165 -4
  36. package/dist/hooks/index.js +5 -6
  37. package/dist/hooks/published.css +68 -3
  38. package/dist/hooks/published.d.ts +1165 -4
  39. package/dist/hooks/published.js +4 -5
  40. package/dist/index.css +68 -3
  41. package/dist/index.d.ts +1166 -5
  42. package/dist/index.js +6 -7
  43. package/dist/layout/index.d.ts +4 -4
  44. package/dist/layout/index.js +3 -4
  45. package/dist/provider/index.css +0 -3
  46. package/dist/provider/index.d.ts +1 -1
  47. package/dist/provider/index.js +3 -4
  48. package/dist/provider/published.d.ts +1 -1
  49. package/dist/theme/index.d.ts +1 -1
  50. package/dist/theme/index.js +3 -3
  51. package/dist/types/index.d.ts +1 -1
  52. package/package.json +7 -2
  53. package/dist/chunk-JFRG2JJE.js +0 -47
  54. package/dist/chunk-R3R367QY.js +0 -14
  55. package/dist/theme/presets/__tests__/getPreset.test.d.ts +0 -2
  56. package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +0 -1
  57. package/dist/theme/presets/__tests__/getPreset.test.js +0 -92
  58. package/dist/theme/presets/cyber-volt.d.ts +0 -12
  59. package/dist/theme/presets/cyber-volt.d.ts.map +0 -1
  60. package/dist/theme/presets/cyber-volt.js +0 -70
  61. package/dist/theme/presets/regal.d.ts +0 -8
  62. package/dist/theme/presets/regal.d.ts.map +0 -1
  63. package/dist/theme/presets/regal.js +0 -69
  64. package/dist/theme/presets/rose-gold.d.ts +0 -12
  65. package/dist/theme/presets/rose-gold.d.ts.map +0 -1
  66. package/dist/theme/presets/rose-gold.js +0 -76
package/dist/index.d.ts CHANGED
@@ -4,9 +4,9 @@ import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import { CSSVariablesResolver, MantineThemeOverride } from '@mantine/core';
7
+ import { z } from 'zod';
7
8
  import { Node, Edge, NodeMouseHandler } from '@xyflow/react';
8
9
  import { IconBrain } from '@tabler/icons-react';
9
- import { z } from 'zod';
10
10
  import * as zustand from 'zustand';
11
11
  import { UseBoundStore, StoreApi } from 'zustand';
12
12
  import * as zustand_middleware from 'zustand/middleware';
@@ -280,7 +280,7 @@ interface ThemePreset {
280
280
  */
281
281
  loader?: ReactNode;
282
282
  }
283
- type PresetName = 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'honey' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-punk' | 'cyber-void' | 'nirvana' | 'wave' | 'synapse' | 'cortex' | 'helios' | 'graphite';
283
+ type PresetName = 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-chrome' | 'cyber-void' | 'nirvana' | 'wave' | 'synapse' | 'cortex' | 'helios' | 'graphite' | 'quarry';
284
284
 
285
285
  /** 10-shade color tuple (light → dark), compatible with Mantine's color format. */
286
286
  type ColorShadesTuple = [string, string, string, string, string, string, string, string, string, string];
@@ -523,6 +523,51 @@ interface AgentToolCallEvent$1 {
523
523
  * 3 event types total (lifecycle, iteration, tool-call)
524
524
  */
525
525
  type AgentLogContext$1 = AgentLifecycleEvent$1 | AgentIterationEvent$1 | AgentToolCallEvent$1;
526
+ /**
527
+ * Data for lifecycle 'started' events
528
+ */
529
+ interface AgentLifecycleStartedData {
530
+ startTime: number;
531
+ iteration?: number;
532
+ }
533
+ /**
534
+ * Data for lifecycle 'completed' events
535
+ */
536
+ interface AgentLifecycleCompletedData {
537
+ startTime: number;
538
+ endTime: number;
539
+ duration: number;
540
+ iteration?: number;
541
+ attempts?: number;
542
+ memorySize?: {
543
+ sessionMemoryKeys: number;
544
+ historyEntries: number;
545
+ };
546
+ }
547
+ /**
548
+ * Data for lifecycle 'failed' events
549
+ */
550
+ interface AgentLifecycleFailedData {
551
+ startTime: number;
552
+ endTime: number;
553
+ duration: number;
554
+ error: string;
555
+ iteration?: number;
556
+ }
557
+ /**
558
+ * Scoped logger for agent execution
559
+ * Captures logger and agentId to eliminate repetitive parameter passing
560
+ *
561
+ * Type-safe lifecycle logging with stage-specific required fields
562
+ */
563
+ interface AgentScopedLogger {
564
+ lifecycle(lifecycle: AgentLifecycle$1, stage: 'started', data: AgentLifecycleStartedData): void;
565
+ lifecycle(lifecycle: AgentLifecycle$1, stage: 'completed', data: AgentLifecycleCompletedData): void;
566
+ lifecycle(lifecycle: AgentLifecycle$1, stage: 'failed', data: AgentLifecycleFailedData): void;
567
+ reasoning(output: string, iteration: number, startTime: number, endTime: number, duration: number): void;
568
+ action(actionType: string, message: string, iteration: number, startTime: number, endTime: number, duration: number): void;
569
+ toolCall(toolName: string, iteration: number, startTime: number, endTime: number, duration: number, success: boolean, error?: string, input?: unknown, output?: unknown): void;
570
+ }
526
571
 
527
572
  /**
528
573
  * Base execution logger for Execution Engine
@@ -536,6 +581,12 @@ interface ExecutionLogMessage$1 {
536
581
  timestamp: number;
537
582
  context?: LogContext$1;
538
583
  }
584
+ interface IExecutionLogger {
585
+ debug(message: string, context?: LogContext$1): void;
586
+ info(message: string, context?: LogContext$1): void;
587
+ warn(message: string, context?: LogContext$1): void;
588
+ error(message: string, context?: LogContext$1): void;
589
+ }
539
590
 
540
591
  /**
541
592
  * Shared form field types for dynamic form generation
@@ -817,6 +868,204 @@ interface SerializedWorkflowDefinition {
817
868
  interface?: SerializedExecutionInterface;
818
869
  }
819
870
 
871
+ /**
872
+ * Model Configuration
873
+ * Centralized model information, configuration, options, constraints, and validation
874
+ * Single source of truth for all model-related definitions
875
+ * Update manually when pricing changes or new models are added
876
+ */
877
+
878
+ /**
879
+ * Supported Open AI models (direct SDK access)
880
+ */
881
+ type OpenAIModel = 'gpt-5' | 'gpt-5.4-mini' | 'gpt-5.4-nano';
882
+ /**
883
+ * Supported OpenRouter models (explicit union for type safety)
884
+ */
885
+ type OpenRouterModel = 'openrouter/z-ai/glm-5';
886
+ /**
887
+ * Supported Google models (direct SDK access)
888
+ */
889
+ type GoogleModel = 'gemini-3-flash-preview' | 'gemini-3.1-flash-lite-preview';
890
+ /**
891
+ * Supported Anthropic models (direct SDK access via @anthropic-ai/sdk)
892
+ */
893
+ type AnthropicModel = 'claude-sonnet-4-5';
894
+ /** Supported LLM models */
895
+ type LLMModel = OpenAIModel | OpenRouterModel | GoogleModel | AnthropicModel | 'mock';
896
+ /**
897
+ * GPT-5 model options schema
898
+ */
899
+ declare const GPT5OptionsSchema: z.ZodObject<{
900
+ reasoning_effort: z.ZodOptional<z.ZodEnum<{
901
+ minimal: "minimal";
902
+ low: "low";
903
+ medium: "medium";
904
+ high: "high";
905
+ }>>;
906
+ verbosity: z.ZodOptional<z.ZodEnum<{
907
+ low: "low";
908
+ medium: "medium";
909
+ high: "high";
910
+ }>>;
911
+ }, z.core.$strip>;
912
+ /**
913
+ * OpenRouter model options schema
914
+ * OpenRouter-specific options for routing and transforms
915
+ */
916
+ declare const OpenRouterOptionsSchema: z.ZodObject<{
917
+ transforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
918
+ route: z.ZodOptional<z.ZodEnum<{
919
+ fallback: "fallback";
920
+ }>>;
921
+ }, z.core.$strip>;
922
+ /**
923
+ * Google model options schema
924
+ * Gemini 3 specific options for thinking depth control
925
+ */
926
+ declare const GoogleOptionsSchema: z.ZodObject<{
927
+ thinkingLevel: z.ZodOptional<z.ZodEnum<{
928
+ minimal: "minimal";
929
+ low: "low";
930
+ medium: "medium";
931
+ high: "high";
932
+ }>>;
933
+ }, z.core.$strip>;
934
+ /**
935
+ * Anthropic model options schema
936
+ * Currently empty - future options: budget_tokens for extended thinking
937
+ */
938
+ declare const AnthropicOptionsSchema: z.ZodObject<{}, z.core.$strip>;
939
+ /**
940
+ * Infer TypeScript types from schemas
941
+ */
942
+ type GPT5Options = z.infer<typeof GPT5OptionsSchema>;
943
+ type MockOptions = Record<string, never>;
944
+ type OpenRouterOptions = z.infer<typeof OpenRouterOptionsSchema>;
945
+ type GoogleOptions = z.infer<typeof GoogleOptionsSchema>;
946
+ type AnthropicOptions = z.infer<typeof AnthropicOptionsSchema>;
947
+ type ModelSpecificOptions = GPT5Options | MockOptions | OpenRouterOptions | GoogleOptions | AnthropicOptions;
948
+ /**
949
+ * Model configuration for LLM execution
950
+ * Belongs in resource definition (AgentDefinition, WorkflowDefinition, etc.)
951
+ */
952
+ interface ModelConfig {
953
+ model: LLMModel;
954
+ provider: 'openai' | 'anthropic' | 'openrouter' | 'google' | 'mock';
955
+ apiKey: string;
956
+ temperature?: number;
957
+ /** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
958
+ maxOutputTokens?: number;
959
+ topP?: number;
960
+ /**
961
+ * Model-specific options (flat structure)
962
+ * Options are model-specific, not vendor-specific
963
+ * Available options defined in MODEL_INFO per model
964
+ * Validated at build time via validateModelOptions()
965
+ */
966
+ modelOptions?: ModelSpecificOptions;
967
+ }
968
+
969
+ /**
970
+ * Execution interface configuration
971
+ * Defines how a resource is executed via the UI (forms, scheduling, webhooks)
972
+ * Applies to both agents and workflows
973
+ */
974
+ interface ExecutionInterface {
975
+ /** Form configuration for execution inputs */
976
+ form: ExecutionFormSchema;
977
+ /** Optional: Schedule configuration */
978
+ schedule?: ScheduleConfig;
979
+ /** Optional: Webhook trigger configuration */
980
+ webhook?: WebhookConfig;
981
+ }
982
+ /**
983
+ * Execution form schema
984
+ * Extends FormSchema with execution-specific fields
985
+ */
986
+ interface ExecutionFormSchema extends FormSchema {
987
+ /**
988
+ * Field mappings to resource input schema
989
+ * Maps form field names to contract input paths
990
+ * If omitted, field names must match contract input keys exactly
991
+ */
992
+ fieldMappings?: Record<string, string>;
993
+ /**
994
+ * Submit button configuration
995
+ * Default: { label: 'Run', loadingLabel: 'Running...' }
996
+ */
997
+ submitButton?: {
998
+ label?: string;
999
+ loadingLabel?: string;
1000
+ confirmMessage?: string;
1001
+ };
1002
+ }
1003
+ /**
1004
+ * Schedule configuration for automated execution
1005
+ */
1006
+ interface ScheduleConfig {
1007
+ /** Whether scheduling is enabled for this resource */
1008
+ enabled: boolean;
1009
+ /** Default schedule (cron expression) */
1010
+ defaultSchedule?: string;
1011
+ /** Allowed schedule patterns (if restricted) */
1012
+ allowedPatterns?: string[];
1013
+ }
1014
+ /**
1015
+ * Webhook configuration for external triggers
1016
+ */
1017
+ interface WebhookConfig {
1018
+ /** Whether webhook trigger is enabled */
1019
+ enabled: boolean;
1020
+ /** Expected payload schema (for documentation) */
1021
+ payloadSchema?: unknown;
1022
+ }
1023
+
1024
+ interface WorkflowConfig extends ResourceDefinition {
1025
+ type: 'workflow';
1026
+ }
1027
+ interface WorkflowStepDefinition {
1028
+ id: string;
1029
+ name: string;
1030
+ description: string;
1031
+ }
1032
+ type StepHandler = (input: unknown, context: ExecutionContext) => Promise<unknown>;
1033
+ interface LinearNext {
1034
+ type: 'linear';
1035
+ target: string;
1036
+ }
1037
+ interface ConditionalNext {
1038
+ type: 'conditional';
1039
+ routes: Array<{
1040
+ condition: (data: unknown) => boolean;
1041
+ target: string;
1042
+ }>;
1043
+ default: string;
1044
+ }
1045
+ type NextConfig = LinearNext | ConditionalNext | null;
1046
+ interface WorkflowStep extends WorkflowStepDefinition {
1047
+ handler: StepHandler;
1048
+ inputSchema: z.ZodSchema;
1049
+ outputSchema: z.ZodSchema;
1050
+ next: NextConfig;
1051
+ }
1052
+ interface WorkflowDefinition {
1053
+ config: WorkflowConfig;
1054
+ contract: Contract;
1055
+ steps: Record<string, WorkflowStep>;
1056
+ entryPoint: string;
1057
+ /**
1058
+ * Metrics configuration for ROI calculations
1059
+ * Optional: Only needed if tracking automation savings
1060
+ */
1061
+ metricsConfig?: ResourceMetricsConfig;
1062
+ /**
1063
+ * Execution interface configuration (optional)
1064
+ * If provided, workflow appears in Execution Runner UI
1065
+ */
1066
+ interface?: ExecutionInterface;
1067
+ }
1068
+
820
1069
  /**
821
1070
  * Workflow step state
822
1071
  * Aggregates step context events with timing and logs
@@ -890,6 +1139,64 @@ interface ExecutionPathState {
890
1139
  stepDataMap?: Map<string, StepExecutionData>;
891
1140
  }
892
1141
 
1142
+ /**
1143
+ * Generic LLM Types
1144
+ * Universal interfaces for LLM interaction across all resource types
1145
+ */
1146
+ /**
1147
+ * Standard chat message format
1148
+ * Compatible with OpenAI, Anthropic, and other providers
1149
+ */
1150
+ interface LLMMessage {
1151
+ role: 'system' | 'user' | 'assistant';
1152
+ content: string;
1153
+ }
1154
+ /**
1155
+ * Generic LLM generation request
1156
+ * Usable by agents, workflows, tools, etc.
1157
+ */
1158
+ interface LLMGenerateRequest {
1159
+ messages: LLMMessage[];
1160
+ responseSchema: unknown;
1161
+ /** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
1162
+ maxOutputTokens?: number;
1163
+ temperature?: number;
1164
+ topP?: number;
1165
+ signal?: AbortSignal;
1166
+ }
1167
+ /**
1168
+ * Generic LLM generation response
1169
+ * Usage field is internal-only (stripped by UniversalLLMAdapter wrapper)
1170
+ */
1171
+ interface LLMGenerateResponse<T = unknown> {
1172
+ output: T;
1173
+ usage?: {
1174
+ inputTokens: number;
1175
+ outputTokens: number;
1176
+ totalTokens: number;
1177
+ };
1178
+ cost?: number;
1179
+ }
1180
+ /**
1181
+ * LLM Adapter interface
1182
+ * Generic primitive for all resource types (agents, workflows, tools)
1183
+ *
1184
+ * Design principles:
1185
+ * - Single method: generate() - the core LLM primitive
1186
+ * - Generic return type for type safety
1187
+ * - Universal format (not agent-specific)
1188
+ * - Standard message-based input (OpenAI-compatible)
1189
+ */
1190
+ interface LLMAdapter {
1191
+ /**
1192
+ * Generate structured output from prompt using LLM
1193
+ *
1194
+ * @param request - Generation request with messages and response schema
1195
+ * @returns Generated output (typed) with optional usage metadata
1196
+ */
1197
+ generate<T = unknown>(request: LLMGenerateRequest): Promise<LLMGenerateResponse<T>>;
1198
+ }
1199
+
893
1200
  /**
894
1201
  * Memory type definitions
895
1202
  * Types for agent memory management with semantic entry types
@@ -930,6 +1237,302 @@ interface AgentMemory {
930
1237
  */
931
1238
  history: MemoryEntry[];
932
1239
  }
1240
+ /**
1241
+ * Memory status for agent awareness
1242
+ */
1243
+ interface MemoryStatus {
1244
+ sessionMemoryKeys: number;
1245
+ sessionMemoryLimit: number;
1246
+ currentKeys: string[];
1247
+ historyPercent: number;
1248
+ historyTokens: number;
1249
+ tokenBudget: number;
1250
+ }
1251
+ /**
1252
+ * Memory constraints (optional limits)
1253
+ */
1254
+ interface MemoryConstraints {
1255
+ maxSessionMemoryKeys?: number;
1256
+ maxMemoryTokens?: number;
1257
+ }
1258
+
1259
+ /**
1260
+ * Memory Manager
1261
+ * Encapsulates all memory operations with ultra-simple agent API
1262
+ * Agent provides strings, framework handles wrapping and auto-compaction
1263
+ */
1264
+
1265
+ /**
1266
+ * Memory Manager - Agent memory orchestration
1267
+ * Provides ultra-simple API for agents (strings only)
1268
+ * Handles automatic compaction and token management
1269
+ */
1270
+ declare class MemoryManager {
1271
+ private memory;
1272
+ private constraints;
1273
+ private logger?;
1274
+ private cachedSnapshot?;
1275
+ constructor(memory: AgentMemory, constraints?: MemoryConstraints, logger?: AgentScopedLogger | undefined);
1276
+ /**
1277
+ * Set session memory entry (agent provides string, framework wraps it)
1278
+ * @param key - Session memory key
1279
+ * @param content - String content from agent
1280
+ */
1281
+ set(key: string, content: string): void;
1282
+ /**
1283
+ * Get session memory entry content
1284
+ * @param key - Session memory key
1285
+ * @returns String content if exists, undefined otherwise
1286
+ */
1287
+ get(key: string): string | undefined;
1288
+ /**
1289
+ * Delete session memory entry
1290
+ * @param key - Key to delete
1291
+ * @returns True if key existed and was deleted
1292
+ */
1293
+ delete(key: string): boolean;
1294
+ /**
1295
+ * Add entry to history (called by framework after tool results, reasoning, etc.)
1296
+ * Automatically sets timestamp to current time
1297
+ * @param entry - Memory entry to add (without timestamp - auto-generated)
1298
+ */
1299
+ addToHistory(entry: Omit<MemoryEntry, 'timestamp'>): void;
1300
+ /**
1301
+ * Auto-compact history if approaching token budget
1302
+ * Uses preserve-anchors strategy: keep first + recent entries
1303
+ */
1304
+ autoCompact(): void;
1305
+ /**
1306
+ * Enforce hard limits (called before LLM request)
1307
+ * Emergency fallback if agent exceeds limits
1308
+ */
1309
+ enforceHardLimits(): void;
1310
+ /**
1311
+ * Get history length (for logging and introspection)
1312
+ * @returns Number of entries in history
1313
+ */
1314
+ getHistoryLength(): number;
1315
+ /**
1316
+ * Get memory status for agent awareness
1317
+ * @returns Memory status with token usage and key counts
1318
+ */
1319
+ getStatus(): MemoryStatus;
1320
+ /**
1321
+ * Create memory snapshot for persistence
1322
+ * Caches snapshot internally for later retrieval
1323
+ * @returns Deep copy of current memory state
1324
+ */
1325
+ toSnapshot(): AgentMemory;
1326
+ /**
1327
+ * Get cached memory snapshot
1328
+ * Returns snapshot created by toSnapshot()
1329
+ * @returns Cached snapshot (undefined if toSnapshot() not called yet)
1330
+ */
1331
+ getSnapshot(): AgentMemory | undefined;
1332
+ /**
1333
+ * Build context string for LLM
1334
+ * Serializes sessionmemory + history memory with clear sections
1335
+ * Shows current iteration entries FIRST (reverse chronological) for LLM attention
1336
+ * @param currentIteration - Current iteration number (0 = pre-iteration)
1337
+ * @param currentTurn - Current turn number (optional, for session context filtering)
1338
+ * @returns Formatted memory context for LLM prompt
1339
+ */
1340
+ toContext(currentIteration: number, currentTurn?: number): string;
1341
+ }
1342
+
1343
+ /**
1344
+ * Knowledge Map Types
1345
+ *
1346
+ * Enables agents to navigate organizational knowledge through a lightweight
1347
+ * graph that lazy-loads capabilities on-demand.
1348
+ *
1349
+ * @module agent/knowledge-map
1350
+ */
1351
+
1352
+ /**
1353
+ * Lightweight knowledge map (passed as agent property)
1354
+ *
1355
+ * Contains metadata about available knowledge nodes without loading
1356
+ * the full content upfront. Total size: ~300-500 tokens.
1357
+ *
1358
+ * Multi-tenancy is enforced via:
1359
+ * - File-scoped maps (organizations/{org-name}/knowledge/)
1360
+ * - ExecutionContext.organizationId passed to node.load()
1361
+ */
1362
+ interface KnowledgeMap {
1363
+ /** Available knowledge nodes indexed by ID */
1364
+ nodes: Record<string, KnowledgeNode>;
1365
+ }
1366
+ /**
1367
+ * Single knowledge source
1368
+ *
1369
+ * Represents a domain knowledge area (CRM, brand guidelines, Excel tools)
1370
+ * that can be lazy-loaded to provide instructions and tools to agents.
1371
+ */
1372
+ interface KnowledgeNode {
1373
+ /** Unique identifier for this node (e.g., "crm", "brand-guidelines") */
1374
+ id: string;
1375
+ /**
1376
+ * Description of when to use this knowledge
1377
+ * Used for semantic matching against user intent
1378
+ */
1379
+ description: string;
1380
+ /**
1381
+ * Load knowledge content on-demand
1382
+ *
1383
+ * @param context - Execution context with organizationId for multi-tenancy
1384
+ * @returns Promise resolving to knowledge content (prompt + optional tools)
1385
+ */
1386
+ load(context: ExecutionContext): Promise<KnowledgeContent>;
1387
+ /**
1388
+ * Loaded state flag
1389
+ * Set to true after load() is called
1390
+ */
1391
+ loaded?: boolean;
1392
+ /**
1393
+ * Cached prompt (for system prompt serialization)
1394
+ * Only the prompt is cached - tools go to toolRegistry, children flattened to nodes
1395
+ */
1396
+ prompt?: string;
1397
+ }
1398
+ /**
1399
+ * Content returned by knowledge node
1400
+ *
1401
+ * Separates instructions (prompt) from capabilities (tools).
1402
+ * Tools are optional - some nodes only provide context.
1403
+ *
1404
+ * Supports recursive navigation - nodes can contain child nodes
1405
+ * that are discovered when the parent node is loaded.
1406
+ */
1407
+ interface KnowledgeContent {
1408
+ /** Instructions and context (markdown format) */
1409
+ prompt: string;
1410
+ /** Tool implementations (optional) */
1411
+ tools?: Tool[];
1412
+ /**
1413
+ * Child knowledge nodes (optional, recursive)
1414
+ *
1415
+ * Enables hierarchical navigation: base → specialized → deep expertise.
1416
+ * Child nodes are flattened into the main knowledge map when parent loads,
1417
+ * making them available for subsequent navigate-knowledge actions.
1418
+ *
1419
+ * Example: CRM base node returns crm-customers and crm-deals as children
1420
+ */
1421
+ nodes?: Record<string, KnowledgeNode>;
1422
+ }
1423
+
1424
+ /**
1425
+ * Agent-specific type definitions
1426
+ * Types for autonomous agents with tools, memory, and constraints
1427
+ */
1428
+
1429
+ /**
1430
+ * Factory function for creating LLM adapters.
1431
+ * Injected into the Agent class to decouple the engine from server-only provider SDKs.
1432
+ * - API process: provides createLLMAdapter (real SDKs + process.env API keys)
1433
+ * - SDK worker: provides PostMessageLLMAdapter (proxies via platform.call)
1434
+ *
1435
+ * Uses `any` for optional params so both the real createLLMAdapter (with typed
1436
+ * AIUsageCollector/AICallContext) and the worker proxy (which ignores them) satisfy the type.
1437
+ */
1438
+ type LLMAdapterFactory = (config: ModelConfig, ...args: any[]) => LLMAdapter;
1439
+ interface AgentConfig extends ResourceDefinition {
1440
+ type: 'agent';
1441
+ systemPrompt: string;
1442
+ constraints?: AgentConstraints;
1443
+ /**
1444
+ * Session capability declaration (opt-in)
1445
+ * If true, agent is designed for multi-turn session interactions
1446
+ * Controls whether agent can use message action and appears in Sessions UI
1447
+ *
1448
+ * Use for:
1449
+ * - Conversational agents with multi-turn interactions
1450
+ * - Agents requiring persistent context across turns
1451
+ * - Agents that need human-in-the-loop communication
1452
+ */
1453
+ sessionCapable?: boolean;
1454
+ /**
1455
+ * Security level for system prompt hardening (auto-derived if omitted)
1456
+ *
1457
+ * - 'standard': Lightweight defense (3 rules) - default for non-session agents
1458
+ * - 'hardened': Comprehensive defense (6 rules) - default for session-capable agents
1459
+ * - 'none': No security prompt - for pure internal agents with no external input
1460
+ *
1461
+ * If omitted, derived from sessionCapable:
1462
+ * sessionCapable: true -> 'hardened'
1463
+ * sessionCapable: false -> 'standard'
1464
+ */
1465
+ securityLevel?: 'standard' | 'hardened' | 'none';
1466
+ /**
1467
+ * Memory management preferences (opt-in)
1468
+ * If provided, agent can use memoryOps to manage session memory
1469
+ * If omitted, agent has no memory management capabilities
1470
+ *
1471
+ * Agent-specific guidance on what to preserve, when to persist, and what to clean up.
1472
+ * This guidance is injected into the system prompt when memory management is enabled.
1473
+ *
1474
+ * Use for:
1475
+ * - Conversational agents needing cross-turn context
1476
+ * - Agents managing complex user preferences
1477
+ * - Agents tracking decisions over multiple iterations
1478
+ */
1479
+ memoryPreferences?: string;
1480
+ }
1481
+ interface AgentConstraints {
1482
+ maxIterations?: number;
1483
+ timeout?: number;
1484
+ maxSessionMemoryKeys?: number;
1485
+ maxMemoryTokens?: number;
1486
+ }
1487
+ interface AgentDefinition {
1488
+ config: AgentConfig;
1489
+ contract: Contract;
1490
+ tools: Tool[];
1491
+ /**
1492
+ * Model configuration for LLM execution
1493
+ * Specifies provider, API key, and model-specific options
1494
+ */
1495
+ modelConfig: ModelConfig;
1496
+ /**
1497
+ * Optional knowledge map for lazy-loading capabilities
1498
+ * Enables agents to navigate organizational knowledge on-demand
1499
+ */
1500
+ knowledgeMap?: KnowledgeMap;
1501
+ /**
1502
+ * Preload memory before execution starts
1503
+ * Handles BOTH context loading AND session restoration
1504
+ *
1505
+ * @param context - Execution context (includes sessionId if session turn)
1506
+ * @returns Initial AgentMemory state (sessionMemory entries + optionally history)
1507
+ */
1508
+ preloadMemory?: (context: ExecutionContext) => Promise<AgentMemory> | AgentMemory;
1509
+ /**
1510
+ * Metrics configuration for ROI calculations
1511
+ * Optional: Only needed if tracking automation savings
1512
+ */
1513
+ metricsConfig?: ResourceMetricsConfig;
1514
+ /**
1515
+ * Execution interface configuration (optional)
1516
+ * If provided, agent appears in Execution Runner UI
1517
+ */
1518
+ interface?: ExecutionInterface;
1519
+ }
1520
+ /**
1521
+ * Agent execution context
1522
+ * Groups all state needed for agent execution phases
1523
+ */
1524
+ interface IterationContext {
1525
+ config: AgentConfig;
1526
+ contract: Contract;
1527
+ toolRegistry: Map<string, Tool>;
1528
+ memoryManager: MemoryManager;
1529
+ executionContext: ExecutionContext;
1530
+ iteration: number;
1531
+ logger: AgentScopedLogger;
1532
+ modelConfig: ModelConfig;
1533
+ adapterFactory: LLMAdapterFactory;
1534
+ knowledgeMap?: KnowledgeMap;
1535
+ }
933
1536
 
934
1537
  type Json = string | number | boolean | null | {
935
1538
  [key: string]: Json | undefined;
@@ -3692,7 +4295,7 @@ interface MembershipFeatureConfig {
3692
4295
  */
3693
4296
  interface UserConfig {
3694
4297
  theme?: {
3695
- preset?: 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'obsidian' | 'honey' | 'abyss' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-punk' | 'cyber-void' | 'nirvana' | 'wave' | 'synapse' | 'cortex' | 'helios' | 'graphite' | 'canyon' | 'nord' | 'catppuccin' | 'tokyo-night' | 'gruvbox';
4298
+ preset?: 'default' | 'tactical' | 'regal' | 'cyber-volt' | 'aurora' | 'rose-gold' | 'midnight' | 'ember' | 'obsidian' | 'honey' | 'abyss' | 'canopy' | 'slate' | 'cyber-strike' | 'cyber-chrome' | 'cyber-void' | 'nirvana' | 'wave' | 'synapse' | 'cortex' | 'helios' | 'graphite' | 'quarry' | 'canyon' | 'nord' | 'catppuccin' | 'tokyo-night' | 'gruvbox';
3696
4299
  colorScheme?: 'light' | 'dark' | 'auto';
3697
4300
  };
3698
4301
  onboarding?: {
@@ -3802,6 +4405,102 @@ interface MembershipWithDetails extends OrganizationMembership {
3802
4405
  config?: MembershipFeatureConfig;
3803
4406
  }
3804
4407
 
4408
+ /**
4409
+ * MetricsCollector
4410
+ * Tracks execution timing and ROI metrics
4411
+ */
4412
+ declare class MetricsCollector {
4413
+ private timings;
4414
+ private durationMs?;
4415
+ /**
4416
+ * Start a timer with a label
4417
+ */
4418
+ startTimer(label: string): void;
4419
+ /**
4420
+ * End a timer and calculate duration
4421
+ * If label is 'execution', stores duration for metrics summary
4422
+ */
4423
+ endTimer(label: string): number | null;
4424
+ /**
4425
+ * Build execution metrics summary with optional ROI calculation
4426
+ */
4427
+ buildExecutionMetrics(metricsConfig?: ResourceMetricsConfig): ExecutionMetricsSummary;
4428
+ }
4429
+
4430
+ interface BaseAICall {
4431
+ callSequence: number;
4432
+ callType: 'agent-reasoning' | 'agent-completion' | 'workflow-step' | 'tool' | 'other';
4433
+ model: LLMModel;
4434
+ inputTokens: number;
4435
+ outputTokens: number;
4436
+ costUsd: number;
4437
+ latencyMs: number;
4438
+ context?: AICallContext;
4439
+ }
4440
+ type AICallContext = AgentReasoningContext | AgentCompletionContext | WorkflowStepContext | ToolCallContext | OtherCallContext;
4441
+ interface AgentReasoningContext {
4442
+ type: 'agent-reasoning';
4443
+ iteration: number;
4444
+ actionsPlanned?: string[];
4445
+ sessionId?: string;
4446
+ turnNumber?: number;
4447
+ }
4448
+ interface AgentCompletionContext {
4449
+ type: 'agent-completion';
4450
+ attempt: 1 | 2;
4451
+ validationFailed?: boolean;
4452
+ sessionId?: string;
4453
+ turnNumber?: number;
4454
+ }
4455
+ interface WorkflowStepContext {
4456
+ type: 'workflow-step';
4457
+ stepId: string;
4458
+ stepName?: string;
4459
+ stepSequence?: number;
4460
+ }
4461
+ interface ToolCallContext {
4462
+ type: 'tool';
4463
+ toolName: string;
4464
+ parentIteration?: number;
4465
+ parentStepId?: string;
4466
+ }
4467
+ interface OtherCallContext {
4468
+ type: 'other';
4469
+ description?: string;
4470
+ metadata?: Record<string, unknown>;
4471
+ }
4472
+ type AICallRecord = BaseAICall;
4473
+ /**
4474
+ * Raw LLM usage data returned by adapters
4475
+ * Used as input to AIUsageCollector.record()
4476
+ */
4477
+ interface LLMUsageData {
4478
+ model: LLMModel;
4479
+ inputTokens: number;
4480
+ outputTokens: number;
4481
+ latencyMs: number;
4482
+ /** Actual cost from provider in USD (when available, e.g., OpenRouter) */
4483
+ cost?: number;
4484
+ }
4485
+ interface AIUsageSummary {
4486
+ model: LLMModel;
4487
+ totalInputTokens: number;
4488
+ totalOutputTokens: number;
4489
+ totalTokens: number;
4490
+ totalCostUsd: number;
4491
+ callCount: number;
4492
+ calls: AICallRecord[];
4493
+ }
4494
+ interface ExecutionMetricsSummary {
4495
+ durationMs?: number;
4496
+ automationSavingsUsd?: number;
4497
+ }
4498
+ interface ResourceMetricsConfig {
4499
+ estimatedManualMinutes: number;
4500
+ hourlyLaborRateUsd: number;
4501
+ confidenceLevel?: 'low' | 'medium' | 'high';
4502
+ notes?: string;
4503
+ }
3805
4504
  /**
3806
4505
  * Time range selector for dashboard metrics
3807
4506
  */
@@ -3872,6 +4571,23 @@ interface CostBreakdownMetrics {
3872
4571
  avgCostUsd: number;
3873
4572
  }>;
3874
4573
  }
4574
+ /**
4575
+ * Detailed execution metrics response
4576
+ * Full execution metrics with AI call breakdown
4577
+ */
4578
+ interface ExecutionMetricsDetail {
4579
+ executionId: string;
4580
+ organizationId: string;
4581
+ resourceId: string;
4582
+ totalInputTokens: number;
4583
+ totalOutputTokens: number;
4584
+ totalCostUsd: number;
4585
+ aiCallCount: number;
4586
+ aiCalls: AICallRecord[];
4587
+ durationMs?: number;
4588
+ automationSavingsUsd?: number;
4589
+ createdAt: string;
4590
+ }
3875
4591
  /**
3876
4592
  * Dashboard metrics response
3877
4593
  * Aggregates core observability metrics in a single response
@@ -4046,11 +4762,51 @@ interface CostByModelResponse {
4046
4762
  totalCallCount: number;
4047
4763
  }
4048
4764
 
4765
+ /**
4766
+ * AIUsageCollector
4767
+ * Centralized token tracking that aggregates usage across all LLM calls in an execution
4768
+ */
4769
+ declare class AIUsageCollector {
4770
+ private model;
4771
+ private calls;
4772
+ private callSequence;
4773
+ /**
4774
+ * Record a single AI call with usage metrics
4775
+ *
4776
+ * @param usage - Token usage and latency data from LLM adapter
4777
+ * @param callType - Type discriminator (agent-reasoning, tool, etc.)
4778
+ * @param context - Optional typed context specific to callType
4779
+ */
4780
+ record(usage: LLMUsageData, callType?: BaseAICall['callType'], context?: AICallContext): void;
4781
+ /**
4782
+ * Get aggregated summary of all AI calls
4783
+ */
4784
+ getSummary(): AIUsageSummary;
4785
+ /**
4786
+ * Check if any usage has been recorded
4787
+ */
4788
+ hasUsage(): boolean;
4789
+ }
4790
+
4049
4791
  /**
4050
4792
  * Base Execution Engine type definitions
4051
4793
  * Core types shared across all Execution Engine resources
4052
4794
  */
4053
4795
 
4796
+ /**
4797
+ * Immutable execution metadata
4798
+ * Represents complete execution identity (who, what, when, where)
4799
+ * Shared across ExecutionContext and ExecutionLoggerContext to eliminate field duplication
4800
+ */
4801
+ interface ExecutionMetadata {
4802
+ executionId: string;
4803
+ organizationId: string;
4804
+ organizationName: string;
4805
+ resourceId: string;
4806
+ userId?: string;
4807
+ sessionId?: string;
4808
+ sessionTurnNumber?: number;
4809
+ }
4054
4810
  /**
4055
4811
  * Unified message event type - covers all message types in sessions
4056
4812
  * Replaces separate SessionTurnMessages and AgentActivityEvent mechanisms
@@ -4098,6 +4854,27 @@ type MessageEvent = {
4098
4854
  result?: unknown;
4099
4855
  error?: string;
4100
4856
  };
4857
+ /**
4858
+ * Execution context for all resources
4859
+ * Unified callback replaces SessionTurnMessages (removed)
4860
+ */
4861
+ interface ExecutionContext extends ExecutionMetadata {
4862
+ logger: IExecutionLogger;
4863
+ signal?: AbortSignal;
4864
+ onMessageEvent?: (event: MessageEvent) => Promise<void>;
4865
+ /** Called per iteration to write heartbeat + check stall status. Non-fatal if it throws. */
4866
+ onHeartbeat?: () => Promise<void>;
4867
+ aiUsageCollector?: AIUsageCollector;
4868
+ metricsCollector?: MetricsCollector;
4869
+ parentExecutionId?: string;
4870
+ executionDepth: number;
4871
+ credentialName?: string;
4872
+ store: Map<string, unknown>;
4873
+ }
4874
+ interface Contract {
4875
+ inputSchema: z.ZodSchema;
4876
+ outputSchema?: z.ZodSchema;
4877
+ }
4101
4878
  /**
4102
4879
  * NOTE: AIResource interface has been removed and replaced with ResourceDefinition
4103
4880
  * from registry/types.ts. All resources (executable and non-executable) now extend
@@ -4108,6 +4885,45 @@ type MessageEvent = {
4108
4885
  */
4109
4886
  type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefinition;
4110
4887
 
4888
+ /**
4889
+ * Tool definitions
4890
+ *
4891
+ * Tool interface used by agents and workflows.
4892
+ * Provides a universal interface for AI systems to interact with tools.
4893
+ */
4894
+
4895
+ /**
4896
+ * Options for tool execution
4897
+ * Provides named parameters for better API clarity and extensibility
4898
+ */
4899
+ interface ToolExecutionOptions {
4900
+ /** Tool input (validated against inputSchema before execution) */
4901
+ input: unknown;
4902
+ /** Execution context with multi-tenant isolation and observability (optional for simple tools, required for platform/integration tools) */
4903
+ executionContext?: ExecutionContext;
4904
+ /** Full iteration context for advanced tools (provides access to memoryManager, toolRegistry, logger, etc.) */
4905
+ iterationContext?: IterationContext;
4906
+ /** Abort signal for timeout/cancellation -- forward to fetch() calls for clean cancellation */
4907
+ signal?: AbortSignal;
4908
+ }
4909
+ /**
4910
+ * Tool interface for AI systems
4911
+ *
4912
+ * Used by:
4913
+ * - Agents: For agentic tool use (reasoning loop selects and executes tools)
4914
+ * - Workflows: For workflow step tool invocation (future)
4915
+ * - Platform tools: createApprovalTool(), createSchedulerTool()
4916
+ * - Integration tools: External API calls (Gmail, Slack, etc.)
4917
+ */
4918
+ interface Tool {
4919
+ name: string;
4920
+ description: string;
4921
+ inputSchema: z.ZodSchema;
4922
+ outputSchema: z.ZodSchema;
4923
+ execute: (options: ToolExecutionOptions) => Promise<unknown>;
4924
+ timeout?: number;
4925
+ }
4926
+
4111
4927
  /**
4112
4928
  * Supported integration types
4113
4929
  *
@@ -4538,6 +5354,99 @@ interface Activity {
4538
5354
  createdAt: Date;
4539
5355
  }
4540
5356
 
5357
+ /**
5358
+ * Calibration SSE Event Types
5359
+ *
5360
+ * Shared event type definitions for calibration real-time streaming.
5361
+ * Used by both the API broadcaster and the command-center UI.
5362
+ */
5363
+ interface CalibrationExecutionStartedEvent {
5364
+ type: 'execution-started';
5365
+ variantName: string;
5366
+ inputIndex: number;
5367
+ timestamp: number;
5368
+ }
5369
+ interface CalibrationExecutionCompletedEvent {
5370
+ type: 'execution-completed';
5371
+ variantName: string;
5372
+ inputIndex: number;
5373
+ executionId: string;
5374
+ timestamp: number;
5375
+ }
5376
+ interface CalibrationExecutionFailedEvent {
5377
+ type: 'execution-failed';
5378
+ variantName: string;
5379
+ inputIndex?: number;
5380
+ error: string;
5381
+ timestamp: number;
5382
+ }
5383
+ interface CalibrationSessionStartedEvent {
5384
+ type: 'session-started';
5385
+ variantName: string;
5386
+ sessionId: string;
5387
+ timestamp: number;
5388
+ }
5389
+ interface CalibrationTurnStartedEvent {
5390
+ type: 'turn-started';
5391
+ variantName: string;
5392
+ turnNumber: number;
5393
+ timestamp: number;
5394
+ }
5395
+ interface CalibrationTurnCompletedEvent {
5396
+ type: 'turn-completed';
5397
+ variantName: string;
5398
+ turnNumber: number;
5399
+ executionId: string;
5400
+ timestamp: number;
5401
+ }
5402
+ interface CalibrationSessionCompletedEvent {
5403
+ type: 'session-completed';
5404
+ variantName: string;
5405
+ sessionId: string;
5406
+ turnCount: number;
5407
+ timestamp: number;
5408
+ }
5409
+ interface CalibrationGradingStartedEvent {
5410
+ type: 'grading-started';
5411
+ variantName: string;
5412
+ timestamp: number;
5413
+ }
5414
+ interface CalibrationGradingCompletedEvent {
5415
+ type: 'grading-completed';
5416
+ variantName: string;
5417
+ score: number;
5418
+ timestamp: number;
5419
+ }
5420
+ interface CalibrationGradingFailedEvent {
5421
+ type: 'grading-failed';
5422
+ variantName: string;
5423
+ error: string;
5424
+ timestamp: number;
5425
+ }
5426
+ interface CalibrationCompletedEvent {
5427
+ type: 'calibration-completed';
5428
+ summary: {
5429
+ total: number;
5430
+ completed: number;
5431
+ failed: number;
5432
+ };
5433
+ timestamp: number;
5434
+ }
5435
+ interface CalibrationFailedEvent {
5436
+ type: 'calibration-failed';
5437
+ error: string;
5438
+ timestamp: number;
5439
+ }
5440
+ interface CalibrationConnectedEvent {
5441
+ type: 'connected';
5442
+ timestamp: number;
5443
+ data?: undefined;
5444
+ }
5445
+ /**
5446
+ * Union of all calibration SSE events
5447
+ */
5448
+ type CalibrationSSEEvent = CalibrationExecutionStartedEvent | CalibrationExecutionCompletedEvent | CalibrationExecutionFailedEvent | CalibrationSessionStartedEvent | CalibrationTurnStartedEvent | CalibrationTurnCompletedEvent | CalibrationSessionCompletedEvent | CalibrationGradingStartedEvent | CalibrationGradingCompletedEvent | CalibrationGradingFailedEvent | CalibrationCompletedEvent | CalibrationFailedEvent | CalibrationConnectedEvent;
5449
+
4541
5450
  /**
4542
5451
  * Type-safe error codes
4543
5452
  * MUST match API_ERROR_CODES in apps/api/src/errors/error-codes.ts
@@ -4588,6 +5497,154 @@ declare const ExecutionHistoryResponseSchema: z.ZodObject<{
4588
5497
  type ExecutionHistoryItem = z.infer<typeof ExecutionHistoryItemSchema>;
4589
5498
  type ExecutionHistoryResponse = z.infer<typeof ExecutionHistoryResponseSchema>;
4590
5499
 
5500
+ /**
5501
+ * Calibration Lab Type Definitions
5502
+ * Core types for AI model configuration optimization with cost/performance comparison
5503
+ */
5504
+
5505
+ /**
5506
+ * Calibration project - groups related optimization runs
5507
+ * Provides organizational structure for iterative testing
5508
+ */
5509
+ interface CalibrationProject {
5510
+ id: string;
5511
+ organizationId: string;
5512
+ resourceId: string;
5513
+ resourceType: 'agent' | 'workflow';
5514
+ name: string;
5515
+ description?: string | null;
5516
+ createdAt: Date;
5517
+ updatedAt: Date;
5518
+ }
5519
+ /**
5520
+ * Configuration variant for testing
5521
+ * Defines what to override in the base agent/workflow definition
5522
+ */
5523
+ interface ConfigVariant {
5524
+ variantName: string;
5525
+ definitionOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
5526
+ }
5527
+ /**
5528
+ * Agent definition overrides for calibration
5529
+ * Excludes identity/metadata fields that should not be modified
5530
+ */
5531
+ type AgentCalibrationOverrides = Omit<Partial<AgentDefinition>, 'config' | 'contract' | 'tools' | 'metricsConfig' | 'interface'>;
5532
+ /**
5533
+ * Workflow definition overrides for calibration
5534
+ * Excludes identity/metadata fields that should not be modified
5535
+ */
5536
+ type WorkflowCalibrationOverrides = Omit<Partial<WorkflowDefinition>, 'config' | 'contract' | 'steps' | 'entryPoint' | 'metricsConfig' | 'interface'>;
5537
+ /**
5538
+ * Grading rubric for LLM-as-judge evaluation
5539
+ * Defines criteria and passing threshold
5540
+ */
5541
+ interface GradingRubric {
5542
+ passingThreshold: number;
5543
+ criteria: GradingCriterion[];
5544
+ }
5545
+ /**
5546
+ * Individual grading criterion
5547
+ * Weight should be 0-1, and all weights should sum to 1
5548
+ */
5549
+ interface GradingCriterion {
5550
+ name: string;
5551
+ weight: number;
5552
+ description: string;
5553
+ scoringGuide: string;
5554
+ }
5555
+ /**
5556
+ * Grading result for a single execution or session
5557
+ * Contains overall score and per-criterion breakdown
5558
+ */
5559
+ interface GradeResult {
5560
+ score: number;
5561
+ passed: boolean;
5562
+ details: Record<string, {
5563
+ score: number;
5564
+ justification: string;
5565
+ }>;
5566
+ }
5567
+ /**
5568
+ * Single-turn calibration result
5569
+ * One result per (variant × input) combination
5570
+ */
5571
+ interface SingleCalibrationResult {
5572
+ executionId: string;
5573
+ variantName: string;
5574
+ inputIndex: number;
5575
+ appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
5576
+ status: 'pending' | 'running' | 'completed' | 'failed';
5577
+ errorMessage?: string;
5578
+ grade?: GradeResult;
5579
+ gradeError?: string;
5580
+ }
5581
+ /**
5582
+ * Multi-turn session calibration result
5583
+ * Leverages existing sessions infrastructure
5584
+ */
5585
+ interface SessionCalibrationResult {
5586
+ sessionId: string;
5587
+ variantName: string;
5588
+ appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
5589
+ status: 'pending' | 'running' | 'completed' | 'failed';
5590
+ errorMessage?: string;
5591
+ turnCount: number;
5592
+ grade?: GradeResult;
5593
+ gradeError?: string;
5594
+ }
5595
+ /**
5596
+ * Calibration run - individual test execution within a project
5597
+ * Contains configuration, results, and grading information
5598
+ */
5599
+ interface CalibrationRun {
5600
+ id: string;
5601
+ organizationId: string;
5602
+ projectId: string;
5603
+ name: string;
5604
+ description?: string | null;
5605
+ executionMode: 'single' | 'session';
5606
+ testInputs: unknown[];
5607
+ configVariants: ConfigVariant[];
5608
+ gradingRubric?: GradingRubric | null;
5609
+ graderModel?: string | null;
5610
+ results: (SingleCalibrationResult | SessionCalibrationResult)[];
5611
+ status: 'pending' | 'running' | 'completed' | 'partial' | 'failed';
5612
+ createdAt: Date;
5613
+ completedAt?: Date | null;
5614
+ }
5615
+ /**
5616
+ * Execution log subset for comparison view
5617
+ * Contains essential data without full execution context
5618
+ */
5619
+ interface ExecutionLog {
5620
+ executionId: string;
5621
+ status: 'running' | 'completed' | 'failed';
5622
+ input: unknown;
5623
+ output: unknown | null;
5624
+ error: CalibrationExecutionError | null;
5625
+ startedAt: string;
5626
+ completedAt: string | null;
5627
+ }
5628
+ /**
5629
+ * Execution error information for calibration display
5630
+ * Subset of full execution error for UI display purposes
5631
+ * Named differently from ExecutionError class to avoid type conflicts
5632
+ */
5633
+ interface CalibrationExecutionError {
5634
+ message: string;
5635
+ category?: string;
5636
+ type?: string;
5637
+ }
5638
+ /**
5639
+ * Combined calibration run data for comparison view
5640
+ * Single API call returns run + execution logs + metrics
5641
+ */
5642
+ interface CalibrationRunWithFullData {
5643
+ run: CalibrationRun;
5644
+ logs: Record<string, ExecutionLog>;
5645
+ metrics: Record<string, ExecutionMetricsDetail>;
5646
+ }
5647
+
4591
5648
  /**
4592
5649
  * Deployment types — browser-safe
4593
5650
  *
@@ -8046,6 +9103,110 @@ interface UseResourceExecutionsOptions {
8046
9103
  */
8047
9104
  declare function useResourceExecutions({ resourceId, timeRange, enabled }: UseResourceExecutionsOptions): _tanstack_react_query.UseQueryResult<ResourceExecutionsResponse, Error>;
8048
9105
 
9106
+ /**
9107
+ * Query key factory for calibration hooks.
9108
+ * Ensures consistent, organization-scoped cache isolation.
9109
+ */
9110
+ declare const calibrationKeys: {
9111
+ all: readonly ["calibration"];
9112
+ projects: (org: string) => readonly ["calibration", "projects", string];
9113
+ projectsByResource: (org: string, resourceId: string, resourceType: string) => readonly ["calibration", "projects", string, string, string];
9114
+ project: (org: string, projectId: string) => readonly ["calibration", "project", string, string];
9115
+ runs: (org: string, projectId: string) => readonly ["calibration", "runs", string, string];
9116
+ run: (org: string, runId: string) => readonly ["calibration", "run", string, string];
9117
+ runFull: (org: string, runId: string) => readonly ["calibration", "run-full", string, string];
9118
+ };
9119
+
9120
+ /**
9121
+ * Fetch all calibration projects for the organization (unified view)
9122
+ */
9123
+ declare function useAllCalibrationProjects(): _tanstack_react_query.UseQueryResult<CalibrationProject[], Error>;
9124
+ /**
9125
+ * Fetch calibration projects for a specific resource
9126
+ */
9127
+ declare function useCalibrationProjects(resourceId: string, resourceType: 'agent' | 'workflow'): _tanstack_react_query.UseQueryResult<CalibrationProject[], Error>;
9128
+ declare function useCalibrationProject(projectId: string): _tanstack_react_query.UseQueryResult<CalibrationProject, Error>;
9129
+ declare function useCreateProject(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
9130
+ resourceId: string;
9131
+ resourceType: "agent" | "workflow";
9132
+ name: string;
9133
+ description?: string | undefined;
9134
+ }, unknown>;
9135
+ declare function useUpdateProject(): _tanstack_react_query.UseMutationResult<CalibrationProject, Error, {
9136
+ name?: string | undefined;
9137
+ description?: string | undefined;
9138
+ } & {
9139
+ id: string;
9140
+ }, unknown>;
9141
+ declare function useDeleteProject(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
9142
+
9143
+ declare function useCalibrationRuns(projectId: string): _tanstack_react_query.UseQueryResult<CalibrationRun[], Error>;
9144
+ declare function useCalibrationRun(runId: string): _tanstack_react_query.UseQueryResult<CalibrationRun, Error>;
9145
+ declare function useCreateRun(): _tanstack_react_query.UseMutationResult<CalibrationRun, Error, {
9146
+ projectId: string;
9147
+ name: string;
9148
+ executionMode: "single" | "session";
9149
+ testInputs: unknown[];
9150
+ configVariants: {
9151
+ variantName: string;
9152
+ definitionOverrides?: Record<string, unknown> | undefined;
9153
+ }[];
9154
+ description?: string | undefined;
9155
+ gradingRubric?: {
9156
+ passingThreshold: number;
9157
+ criteria: {
9158
+ name: string;
9159
+ weight: number;
9160
+ description: string;
9161
+ scoringGuide: string;
9162
+ }[];
9163
+ } | undefined;
9164
+ graderModel?: "gpt-5" | "gpt-5.4-mini" | "gpt-5.4-nano" | "gemini-3-flash-preview" | "gemini-3.1-flash-lite-preview" | "openrouter/z-ai/glm-5" | "mock" | undefined;
9165
+ }, unknown>;
9166
+ declare function useExecuteRun(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
9167
+ declare function useDeleteRun(): _tanstack_react_query.UseMutationResult<void, Error, {
9168
+ runId: string;
9169
+ projectId: string;
9170
+ }, unknown>;
9171
+ declare function useGradeRun(): _tanstack_react_query.UseMutationResult<void, Error, {
9172
+ runId: string;
9173
+ rubric?: unknown;
9174
+ graderModel?: string;
9175
+ }, unknown>;
9176
+
9177
+ declare function useCalibrationRunFull(runId: string): _tanstack_react_query.UseQueryResult<CalibrationRunWithFullData, Error>;
9178
+
9179
+ interface CalibrationProgress {
9180
+ connected: boolean;
9181
+ events: CalibrationSSEEvent[];
9182
+ summary?: {
9183
+ total: number;
9184
+ completed: number;
9185
+ failed: number;
9186
+ };
9187
+ isComplete: boolean;
9188
+ error?: string;
9189
+ }
9190
+ interface UseCalibrationSSEOptions {
9191
+ runId: string;
9192
+ manager: SSEConnectionManager;
9193
+ apiUrl: string;
9194
+ enabled?: boolean;
9195
+ }
9196
+ declare function useCalibrationSSE({ runId, manager, apiUrl, enabled }: UseCalibrationSSEOptions): {
9197
+ disconnect: () => void;
9198
+ reset: () => void;
9199
+ connected: boolean;
9200
+ events: CalibrationSSEEvent[];
9201
+ summary?: {
9202
+ total: number;
9203
+ completed: number;
9204
+ failed: number;
9205
+ };
9206
+ isComplete: boolean;
9207
+ error?: string;
9208
+ };
9209
+
8049
9210
  interface AuthContextValue {
8050
9211
  user: {
8051
9212
  id: string;
@@ -8519,5 +9680,5 @@ declare function InitializationProvider({ children }: {
8519
9680
  children: ReactNode;
8520
9681
  }): react.FunctionComponentElement<react.ProviderProps<AppInitializationState | null>>;
8521
9682
 
8522
- export { AGENT_CONSTANTS, APIClientError, API_URL, AdminGuard, ApiClientProvider, ApiKeyService, AppearanceProvider, AuthProvider, CONTAINER_CONSTANTS, CredentialService, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DeploymentService, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisUIProvider, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, GRAPH_CONSTANTS, InitializationContext, InitializationProvider, LIMIT_ACTIVITY_FEED, NotificationProvider, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, OperationsService, OrganizationMembershipService, OrganizationProvider, OrganizationSwitcher, PAGE_SIZE_DEFAULT, PresetsProvider, ProfileProvider, ProtectedRoute, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, RouterProvider, SHARED_VIZ_CONSTANTS, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, STATUS_COLORS, ScrollToTop, TIMELINE_CONSTANTS, TOKEN_VAR_MAP, TanStackRouterBridge, UserProfileService, WORKFLOW_CONSTANTS, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, WebhookEndpointService, calculateBarPosition, calculateGraphHeight, componentThemes, createCssVariablesResolver, createOrganizationsSlice, createUseAppInitialization, createUseFeatureAccess, createUseOrgInitialization, createUseOrganizations, executionsKeys, filterByDomainFilters, formatChartAxisDate, formatDate, formatDateTime, formatDuration, formatErrorMessage, formatRelativeTime, formatTimeAgo, generateShades, getEdgeColor, getEdgeOpacity, getErrorInfo, getErrorTitle, getPreset, getResourceColor, getResourceIcon, getResourceStatusColor, getStatusColors, getStatusIcon, isAPIClientError, isSessionCapable, mantineThemeOverride, observabilityKeys, operationsKeys, PRESETS as presets, restoreConsole, scheduleKeys, sessionsKeys, shouldAnimateEdge, sortData, suppressKnownWarnings, useActivateDeployment, useActivities, useActivityFilters, useActivityTrend, useAgentIterationData, useApiClient, useApiClientContext, useAppearance, useArchiveSession, useArchivedLogs, useAuthContext, useAvailablePresets, useBatchDelete, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useConnectionHighlight, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCredential, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDeleteApiKey, useDeleteCredential, useDeleteDeployment, useDeleteExecution, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeploymentDocs, useDirectedChainHighlighting, useElevasisServices, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionPath, useExecutions, useFitViewTrigger, useGetExecutionHistory, useGetSchedule, useGraphHighlighting, useGraphStats, useInitialization, useListApiKeys, useListDeployments, useListSchedules, useListWebhookEndpoints, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useNodeSelection, useNotificationAdapter, useNotificationCount as useNotificationCountSSE, useNotifications, useOrganization, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, usePresetsContext, useProfile, useReactFlowAgent, useReactivateMembership, useRecentExecutionsByResource, useSessionCheck as useRefocusSessionCheck, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRouterContext, useSSEConnection, useScheduledTasks, useSession, useSessionCheck, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStableAccessToken, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTimelineData, useTopFailingResources, useUnifiedWorkflowLayout, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCredential, useUpdateMemberConfig, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useUserProfile, useVisibleResources, useWarningNotification, useWorkflowStepsLayout, validateEmail };
8523
- export type { ActivityFilters, ActivityTrendResponse, AdminGuardProps, AgentIterationEdgeData, AgentIterationNodeData, AgentStatus, ApiClientContextValue, ApiClientProviderProps, ApiErrorDetails, ApiKeyConfig, AppInitializationState, AppearanceConfig, AuthConfig, AuthContextValue, AuthKitConfig, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CancelExecutionParams, CancelExecutionResult, ChatMessage, ColorShadesTuple, CostBreakdownItem, CreateApiKeyRequest, CreateApiKeyResponse, CreateCredentialRequest, CreateCredentialResponse, CreateScheduleInput, CreateSessionResponse, CredentialListItem, DeleteExecutionParams, Deployment, DirectedChainHighlightingOptions, DirectedChainHighlightingResult, DocFile, EdgeColorOptions, EdgeOpacityOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsFilters, ExecutionLogsPageResponse, ExecutionPathState, ExecutionStatus$1 as ExecutionStatus, FailingResource, FrameworkThemeOverrides, GetMessagesResponse, GlowIntensity, GraphHeightOptions, GraphHighlightingResult, GraphMode, GraphThemeColors, InitializationError, LinkProps, ListActivitiesResponse, ListApiKeysResponse, ListCredentialsResponse, ListSchedulesFilters, ListSchedulesResponse, ListWebhookEndpointsResponse, MembershipWithDetails, MessageEvent, MessageType, NodeColorType, NotificationAdapter, OrganizationContextValue, OrganizationsActions, OrganizationsSlice, OrganizationsState, PresetEntry, PresetName, ProfileContextValue, ProtectedRouteProps, ResourcesResponse, RetryExecutionParams, RouterAdapter, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, StatusColorScheme, StatusFilter$1 as StatusFilter, StatusIconColors, StepExecutionData, SubmitActionRequest, SubmitActionResponse, SupabaseUserProfile, TablerIcon, TaskSchedule, ThemePreset, TimelineBarProps, TimelineContainerProps, TimelineRowProps, TopFailingResourcesParams, UnifiedWorkflowEdgeData, UnifiedWorkflowNodeData, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseApiClientReturn, UseBatchedResourcesHealthParams, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseNotificationCountArgs, UseOrgInitializationReturn, UseOrganizationsReturn, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, UseUserProfileReturn, WebSocketState, WithSchemes, WorkflowEdgeType, WorkflowStepEdgeData, WorkflowStepNodeData, WorkflowStepsLayoutInput };
9683
+ export { AGENT_CONSTANTS, APIClientError, API_URL, AdminGuard, ApiClientProvider, ApiKeyService, AppearanceProvider, AuthProvider, CONTAINER_CONSTANTS, CredentialService, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, DeploymentService, ElevasisCoreProvider, ElevasisServiceProvider, ElevasisUIProvider, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, GRAPH_CONSTANTS, InitializationContext, InitializationProvider, LIMIT_ACTIVITY_FEED, NotificationProvider, OAUTH_FLOW_TIMEOUT, OAUTH_POPUP_CHECK_INTERVAL, OperationsService, OrganizationMembershipService, OrganizationProvider, OrganizationSwitcher, PAGE_SIZE_DEFAULT, PresetsProvider, ProfileProvider, ProtectedRoute, REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, RouterProvider, SHARED_VIZ_CONSTANTS, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, STATUS_COLORS, ScrollToTop, TIMELINE_CONSTANTS, TOKEN_VAR_MAP, TanStackRouterBridge, UserProfileService, WORKFLOW_CONSTANTS, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, WebhookEndpointService, calculateBarPosition, calculateGraphHeight, calibrationKeys, componentThemes, createCssVariablesResolver, createOrganizationsSlice, createUseAppInitialization, createUseFeatureAccess, createUseOrgInitialization, createUseOrganizations, executionsKeys, filterByDomainFilters, formatChartAxisDate, formatDate, formatDateTime, formatDuration, formatErrorMessage, formatRelativeTime, formatTimeAgo, generateShades, getEdgeColor, getEdgeOpacity, getErrorInfo, getErrorTitle, getPreset, getResourceColor, getResourceIcon, getResourceStatusColor, getStatusColors, getStatusIcon, isAPIClientError, isSessionCapable, mantineThemeOverride, observabilityKeys, operationsKeys, PRESETS as presets, restoreConsole, scheduleKeys, sessionsKeys, shouldAnimateEdge, sortData, suppressKnownWarnings, useActivateDeployment, useActivities, useActivityFilters, useActivityTrend, useAgentIterationData, useAllCalibrationProjects, useApiClient, useApiClientContext, useAppearance, useArchiveSession, useArchivedLogs, useAuthContext, useAvailablePresets, useBatchDelete, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCalibrationProject, useCalibrationProjects, useCalibrationRun, useCalibrationRunFull, useCalibrationRuns, useCalibrationSSE, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewLayout, useCommandViewStats, useCommandViewStore, useConnectionHighlight, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateCredential, useCreateProject, useCreateRun, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDeleteApiKey, useDeleteCredential, useDeleteDeployment, useDeleteExecution, useDeleteProject, useDeleteRun, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeploymentDocs, useDirectedChainHighlighting, useElevasisServices, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useErrorTrends, useExecuteAsync, useExecuteRun, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionPath, useExecutions, useFitViewTrigger, useGetExecutionHistory, useGetSchedule, useGradeRun, useGraphHighlighting, useGraphStats, useInitialization, useListApiKeys, useListDeployments, useListSchedules, useListWebhookEndpoints, useMarkAllAsRead, useMarkAsRead, useMergedExecution, useNodeSelection, useNotificationAdapter, useNotificationCount as useNotificationCountSSE, useNotifications, useOrganization, useOrganizationMembers, usePaginationState, usePatchTask, usePauseSchedule, usePresetsContext, useProfile, useReactFlowAgent, useReactivateMembership, useRecentExecutionsByResource, useSessionCheck as useRefocusSessionCheck, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRouterContext, useSSEConnection, useScheduledTasks, useSession, useSessionCheck, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStableAccessToken, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTimelineData, useTopFailingResources, useUnifiedWorkflowLayout, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCredential, useUpdateMemberConfig, useUpdateProject, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useUserProfile, useVisibleResources, useWarningNotification, useWorkflowStepsLayout, validateEmail };
9684
+ export type { ActivityFilters, ActivityTrendResponse, AdminGuardProps, AgentIterationEdgeData, AgentIterationNodeData, AgentStatus, ApiClientContextValue, ApiClientProviderProps, ApiErrorDetails, ApiKeyConfig, AppInitializationState, AppearanceConfig, AuthConfig, AuthContextValue, AuthKitConfig, BulkDeleteExecutionsParams, BulkDeleteExecutionsResult, BusinessImpactMetrics, CalibrationProgress, CancelExecutionParams, CancelExecutionResult, ChatMessage, ColorShadesTuple, CostBreakdownItem, CreateApiKeyRequest, CreateApiKeyResponse, CreateCredentialRequest, CreateCredentialResponse, CreateScheduleInput, CreateSessionResponse, CredentialListItem, DeleteExecutionParams, Deployment, DirectedChainHighlightingOptions, DirectedChainHighlightingResult, DocFile, EdgeColorOptions, EdgeOpacityOptions, ElevasisCoreProviderProps, ElevasisCoreThemeConfig, ElevasisServiceContextValue, ElevasisServiceProviderProps, ElevasisThemeConfig, ElevasisTokenOverrides, ErrorDistributionItem, ErrorDistributionParams, ErrorFilters, ErrorTrendsParams, ExecuteAsyncParams, ExecuteAsyncResult, ExecutionErrorDetails, ExecutionHistoryItem, ExecutionHistoryResponse, ExecutionLogsFilters, ExecutionLogsPageResponse, ExecutionPathState, ExecutionStatus$1 as ExecutionStatus, FailingResource, FrameworkThemeOverrides, GetMessagesResponse, GlowIntensity, GraphHeightOptions, GraphHighlightingResult, GraphMode, GraphThemeColors, InitializationError, LinkProps, ListActivitiesResponse, ListApiKeysResponse, ListCredentialsResponse, ListSchedulesFilters, ListSchedulesResponse, ListWebhookEndpointsResponse, MembershipWithDetails, MessageEvent, MessageType, NodeColorType, NotificationAdapter, OrganizationContextValue, OrganizationsActions, OrganizationsSlice, OrganizationsState, PresetEntry, PresetName, ProfileContextValue, ProtectedRouteProps, ResourcesResponse, RetryExecutionParams, RouterAdapter, SessionDTO, SessionExecution, SessionExecutionsResponse, SessionListItem, SessionTokenUsage, SortDirection, SortState, StatusColorScheme, StatusFilter$1 as StatusFilter, StatusIconColors, StepExecutionData, SubmitActionRequest, SubmitActionResponse, SupabaseUserProfile, TablerIcon, TaskSchedule, ThemePreset, TimelineBarProps, TimelineContainerProps, TimelineRowProps, TopFailingResourcesParams, UnifiedWorkflowEdgeData, UnifiedWorkflowNodeData, UpdateScheduleInput, UseActivitiesParams, UseActivityTrendParams, UseApiClientReturn, UseBatchedResourcesHealthParams, UseCalibrationSSEOptions, UseExecutionHealthParams, UseExecutionLogsParams, UseExecutionPanelStateOptions, UseExecutionPanelStateReturn, UseNotificationCountArgs, UseOrgInitializationReturn, UseOrganizationsReturn, UseResourcesHealthParams, UseSSEConnectionOptions, UseScheduledTasksOptions, UseUserProfileReturn, WebSocketState, WithSchemes, WorkflowEdgeType, WorkflowStepEdgeData, WorkflowStepNodeData, WorkflowStepsLayoutInput };