@elevasis/ui 2.9.1 → 2.10.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.
- package/dist/app/index.css +137 -0
- package/dist/app/index.d.ts +223 -0
- package/dist/app/index.js +95 -0
- package/dist/charts/index.js +3 -2
- package/dist/{chunk-NYMKWGKN.js → chunk-4BF74JVD.js} +110 -7
- package/dist/{chunk-47YILFON.js → chunk-6PNHW4X2.js} +159 -144
- package/dist/chunk-ADSSLKKP.js +10 -0
- package/dist/chunk-AEBKE4IX.js +13 -0
- package/dist/{chunk-C2OFFC7J.js → chunk-AL23U6C3.js} +3 -2
- package/dist/{chunk-27COZ5AH.js → chunk-CEWTOKE7.js} +3 -50
- package/dist/{chunk-AQQYVAFK.js → chunk-CLXMNMIS.js} +8 -7
- package/dist/{chunk-4PHPENKX.js → chunk-E3IFHX6A.js} +27 -377
- package/dist/{chunk-CYXZHBP4.js → chunk-F4TPY6YL.js} +14 -3
- package/dist/chunk-G2TDX3W6.js +5 -0
- package/dist/{chunk-CTWYIRKW.js → chunk-GJVGV7QZ.js} +24 -34
- package/dist/chunk-IIMU5YAJ.js +53 -0
- package/dist/{chunk-VNUOQQNY.js → chunk-KYOF6NYW.js} +2 -2
- package/dist/{chunk-W4VYXIN7.js → chunk-L4XXM55J.js} +3 -142
- package/dist/{chunk-YCHZ4U5V.js → chunk-LPSBID5V.js} +5 -13
- package/dist/{chunk-F5QSLYUB.js → chunk-LW5NKRI7.js} +1189 -1300
- package/dist/{chunk-KGEYEUR5.js → chunk-M6ZZ2FW5.js} +7 -6
- package/dist/{chunk-OPT74SGF.js → chunk-N5CLIRBS.js} +31 -176
- package/dist/chunk-R7WLWGPO.js +126 -0
- package/dist/{chunk-Y3D3WFJG.js → chunk-SQQGLGHW.js} +2 -11
- package/dist/{chunk-KFICYU6S.js → chunk-STZJ7SY5.js} +1 -1
- package/dist/chunk-SZHARWKU.js +15 -0
- package/dist/{chunk-7PDDPNQS.js → chunk-TSX4I3NW.js} +3 -3
- package/dist/chunk-V7XHGJQZ.js +145 -0
- package/dist/{chunk-UE5QQDCR.js → chunk-WHQXDETX.js} +5 -5
- package/dist/{chunk-4JPW5U5I.js → chunk-XB4NWSI3.js} +53 -54
- package/dist/{chunk-ZZ35VSNF.js → chunk-YQLE5HR5.js} +4 -4
- package/dist/components/index.d.ts +6 -253
- package/dist/components/index.js +31 -25
- package/dist/features/auth/index.d.ts +0 -107
- package/dist/features/auth/index.js +0 -1
- package/dist/features/crm/index.d.ts +3 -136
- package/dist/features/crm/index.js +14 -9
- package/dist/features/dashboard/index.js +13 -9
- package/dist/features/delivery/index.d.ts +3 -137
- package/dist/features/delivery/index.js +15 -9
- package/dist/features/lead-gen/index.d.ts +3 -29
- package/dist/features/lead-gen/index.js +20 -14
- package/dist/features/monitoring/index.d.ts +3 -30
- package/dist/features/monitoring/index.js +14 -10
- package/dist/features/operations/index.d.ts +18 -1324
- package/dist/features/operations/index.js +18 -13
- package/dist/features/seo/index.d.ts +3 -30
- package/dist/features/seo/index.js +3 -2
- package/dist/features/settings/index.d.ts +6 -146
- package/dist/features/settings/index.js +13 -9
- package/dist/hooks/index.d.ts +10 -1403
- package/dist/hooks/index.js +11 -7
- package/dist/hooks/published.d.ts +10 -1403
- package/dist/hooks/published.js +11 -7
- package/dist/index.d.ts +97 -1510
- package/dist/index.js +12 -8
- package/dist/initialization/index.d.ts +3 -117
- package/dist/layout/index.d.ts +12 -2
- package/dist/layout/index.js +5 -4
- package/dist/organization/index.d.ts +3 -10
- package/dist/organization/index.js +2 -1
- package/dist/profile/index.d.ts +0 -107
- package/dist/provider/index.d.ts +45 -65
- package/dist/provider/index.js +10 -6
- package/dist/provider/published.d.ts +45 -65
- package/dist/provider/published.js +6 -3
- package/dist/supabase/index.d.ts +0 -209
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/typeform/index.js +10 -10
- package/dist/types/index.d.ts +68 -1738
- package/package.json +20 -4
- package/src/app/README.md +24 -0
- package/dist/chunk-IDACMRGQ.js +0 -115
|
@@ -1,244 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
import { ReactNode, ComponentType } from 'react';
|
|
4
3
|
|
|
5
|
-
/**
|
|
6
|
-
* Workflow-specific logging types and utilities
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
interface WorkflowExecutionContext {
|
|
10
|
-
type: 'workflow';
|
|
11
|
-
contextType: 'workflow-execution';
|
|
12
|
-
executionId: string;
|
|
13
|
-
workflowId: string;
|
|
14
|
-
workflowName?: string;
|
|
15
|
-
organizationId: string;
|
|
16
|
-
executionPath?: string[];
|
|
17
|
-
}
|
|
18
|
-
interface WorkflowFailureContext {
|
|
19
|
-
type: 'workflow';
|
|
20
|
-
contextType: 'workflow-failure';
|
|
21
|
-
executionId: string;
|
|
22
|
-
workflowId: string;
|
|
23
|
-
error: string;
|
|
24
|
-
}
|
|
25
|
-
interface StepStartedContext {
|
|
26
|
-
type: 'workflow';
|
|
27
|
-
contextType: 'step-started';
|
|
28
|
-
stepId: string;
|
|
29
|
-
stepStatus: 'started';
|
|
30
|
-
input: unknown;
|
|
31
|
-
startTime: number;
|
|
32
|
-
}
|
|
33
|
-
interface StepCompletedContext {
|
|
34
|
-
type: 'workflow';
|
|
35
|
-
contextType: 'step-completed';
|
|
36
|
-
stepId: string;
|
|
37
|
-
stepStatus: 'completed';
|
|
38
|
-
output: unknown;
|
|
39
|
-
duration: number;
|
|
40
|
-
isTerminal: boolean;
|
|
41
|
-
startTime: number;
|
|
42
|
-
endTime: number;
|
|
43
|
-
}
|
|
44
|
-
interface StepFailedContext {
|
|
45
|
-
type: 'workflow';
|
|
46
|
-
contextType: 'step-failed';
|
|
47
|
-
stepId: string;
|
|
48
|
-
stepStatus: 'failed';
|
|
49
|
-
error: string;
|
|
50
|
-
duration: number;
|
|
51
|
-
startTime: number;
|
|
52
|
-
endTime: number;
|
|
53
|
-
}
|
|
54
|
-
interface ConditionalRouteContext {
|
|
55
|
-
type: 'workflow';
|
|
56
|
-
contextType: 'conditional-route';
|
|
57
|
-
stepId: string;
|
|
58
|
-
target: string;
|
|
59
|
-
error?: string;
|
|
60
|
-
}
|
|
61
|
-
interface ExecutionPathContext {
|
|
62
|
-
type: 'workflow';
|
|
63
|
-
contextType: 'execution-path';
|
|
64
|
-
executionPath: string[];
|
|
65
|
-
}
|
|
66
|
-
type WorkflowLogContext = WorkflowExecutionContext | WorkflowFailureContext | StepStartedContext | StepCompletedContext | StepFailedContext | ConditionalRouteContext | ExecutionPathContext;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Agent-specific logging types
|
|
70
|
-
* Simplified 2-event model: lifecycle, iteration
|
|
71
|
-
*
|
|
72
|
-
* Design Philosophy:
|
|
73
|
-
* - LIFECYCLE EVENTS: Structural checkpoints (initialization, iteration, completion)
|
|
74
|
-
* - ITERATION EVENTS: Execution activities (reasoning, actions during iterations)
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Agent lifecycle stages
|
|
79
|
-
* Universal checkpoints that apply to all agent executions
|
|
80
|
-
*/
|
|
81
|
-
type AgentLifecycle = 'initialization' | 'iteration' | 'completion';
|
|
82
|
-
/**
|
|
83
|
-
* Iteration event types
|
|
84
|
-
* Activities that occur during agent iterations
|
|
85
|
-
*/
|
|
86
|
-
type IterationEventType = 'reasoning' | 'action' | 'tool-call';
|
|
87
|
-
/**
|
|
88
|
-
* Base fields shared by all lifecycle events
|
|
89
|
-
*/
|
|
90
|
-
interface AgentLifecycleEventBase {
|
|
91
|
-
type: 'agent';
|
|
92
|
-
agentId: string;
|
|
93
|
-
lifecycle: AgentLifecycle;
|
|
94
|
-
sessionId?: string;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Lifecycle started event - emitted when a phase begins
|
|
98
|
-
* REQUIRED: startTime (phase has started, no end yet)
|
|
99
|
-
*/
|
|
100
|
-
interface AgentLifecycleStartedEvent extends AgentLifecycleEventBase {
|
|
101
|
-
stage: 'started';
|
|
102
|
-
startTime: number;
|
|
103
|
-
iteration?: number;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Lifecycle completed event - emitted when a phase succeeds
|
|
107
|
-
* REQUIRED: startTime, endTime, duration (phase has finished successfully)
|
|
108
|
-
*/
|
|
109
|
-
interface AgentLifecycleCompletedEvent extends AgentLifecycleEventBase {
|
|
110
|
-
stage: 'completed';
|
|
111
|
-
startTime: number;
|
|
112
|
-
endTime: number;
|
|
113
|
-
duration: number;
|
|
114
|
-
iteration?: number;
|
|
115
|
-
attempts?: number;
|
|
116
|
-
memorySize?: {
|
|
117
|
-
sessionMemoryKeys: number;
|
|
118
|
-
historyEntries: number;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Lifecycle failed event - emitted when a phase fails
|
|
123
|
-
* REQUIRED: startTime, endTime, duration, error (phase has finished with error)
|
|
124
|
-
*/
|
|
125
|
-
interface AgentLifecycleFailedEvent extends AgentLifecycleEventBase {
|
|
126
|
-
stage: 'failed';
|
|
127
|
-
startTime: number;
|
|
128
|
-
endTime: number;
|
|
129
|
-
duration: number;
|
|
130
|
-
error: string;
|
|
131
|
-
iteration?: number;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Union type for all lifecycle events
|
|
135
|
-
* Discriminated by 'stage' field for type narrowing
|
|
136
|
-
*/
|
|
137
|
-
type AgentLifecycleEvent = AgentLifecycleStartedEvent | AgentLifecycleCompletedEvent | AgentLifecycleFailedEvent;
|
|
138
|
-
/**
|
|
139
|
-
* Placeholder data for MVP
|
|
140
|
-
* Will be typed per actionType in future
|
|
141
|
-
*/
|
|
142
|
-
interface ActionPlaceholderData {
|
|
143
|
-
message: string;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Iteration event - captures activities during agent iterations
|
|
147
|
-
* Consolidates reasoning (LLM thought process) and actions (tool use, memory ops, etc.)
|
|
148
|
-
*/
|
|
149
|
-
interface AgentIterationEvent {
|
|
150
|
-
type: 'agent';
|
|
151
|
-
agentId: string;
|
|
152
|
-
lifecycle: 'iteration';
|
|
153
|
-
eventType: IterationEventType;
|
|
154
|
-
iteration: number;
|
|
155
|
-
sessionId?: string;
|
|
156
|
-
startTime: number;
|
|
157
|
-
endTime: number;
|
|
158
|
-
duration: number;
|
|
159
|
-
output?: string;
|
|
160
|
-
actionType?: string;
|
|
161
|
-
data?: ActionPlaceholderData;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Tool call event - captures individual tool executions during iterations
|
|
165
|
-
* Provides granular timing for each tool invocation
|
|
166
|
-
*/
|
|
167
|
-
interface AgentToolCallEvent {
|
|
168
|
-
type: 'agent';
|
|
169
|
-
agentId: string;
|
|
170
|
-
lifecycle: 'iteration';
|
|
171
|
-
eventType: 'tool-call';
|
|
172
|
-
iteration: number;
|
|
173
|
-
sessionId?: string;
|
|
174
|
-
toolName: string;
|
|
175
|
-
startTime: number;
|
|
176
|
-
endTime: number;
|
|
177
|
-
duration: number;
|
|
178
|
-
success: boolean;
|
|
179
|
-
error?: string;
|
|
180
|
-
input?: Record<string, unknown>;
|
|
181
|
-
output?: unknown;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Union type for all agent log contexts
|
|
185
|
-
* 3 event types total (lifecycle, iteration, tool-call)
|
|
186
|
-
*/
|
|
187
|
-
type AgentLogContext = AgentLifecycleEvent | AgentIterationEvent | AgentToolCallEvent;
|
|
188
|
-
/**
|
|
189
|
-
* Data for lifecycle 'started' events
|
|
190
|
-
*/
|
|
191
|
-
interface AgentLifecycleStartedData {
|
|
192
|
-
startTime: number;
|
|
193
|
-
iteration?: number;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Data for lifecycle 'completed' events
|
|
197
|
-
*/
|
|
198
|
-
interface AgentLifecycleCompletedData {
|
|
199
|
-
startTime: number;
|
|
200
|
-
endTime: number;
|
|
201
|
-
duration: number;
|
|
202
|
-
iteration?: number;
|
|
203
|
-
attempts?: number;
|
|
204
|
-
memorySize?: {
|
|
205
|
-
sessionMemoryKeys: number;
|
|
206
|
-
historyEntries: number;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Data for lifecycle 'failed' events
|
|
211
|
-
*/
|
|
212
|
-
interface AgentLifecycleFailedData {
|
|
213
|
-
startTime: number;
|
|
214
|
-
endTime: number;
|
|
215
|
-
duration: number;
|
|
216
|
-
error: string;
|
|
217
|
-
iteration?: number;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Scoped logger for agent execution
|
|
221
|
-
* Captures logger and agentId to eliminate repetitive parameter passing
|
|
222
|
-
*
|
|
223
|
-
* Type-safe lifecycle logging with stage-specific required fields
|
|
224
|
-
*/
|
|
225
|
-
interface AgentScopedLogger {
|
|
226
|
-
lifecycle(lifecycle: AgentLifecycle, stage: 'started', data: AgentLifecycleStartedData): void;
|
|
227
|
-
lifecycle(lifecycle: AgentLifecycle, stage: 'completed', data: AgentLifecycleCompletedData): void;
|
|
228
|
-
lifecycle(lifecycle: AgentLifecycle, stage: 'failed', data: AgentLifecycleFailedData): void;
|
|
229
|
-
reasoning(output: string, iteration: number, startTime: number, endTime: number, duration: number): void;
|
|
230
|
-
action(actionType: string, message: string, iteration: number, startTime: number, endTime: number, duration: number): void;
|
|
231
|
-
toolCall(toolName: string, iteration: number, startTime: number, endTime: number, duration: number, success: boolean, error?: string, input?: unknown, output?: unknown): void;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
type LogContext = WorkflowLogContext | AgentLogContext;
|
|
235
|
-
interface IExecutionLogger {
|
|
236
|
-
debug(message: string, context?: LogContext): void;
|
|
237
|
-
info(message: string, context?: LogContext): void;
|
|
238
|
-
warn(message: string, context?: LogContext): void;
|
|
239
|
-
error(message: string, context?: LogContext): void;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
4
|
/**
|
|
243
5
|
* Shared form field types for dynamic form generation
|
|
244
6
|
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
@@ -248,46 +10,6 @@ interface IExecutionLogger {
|
|
|
248
10
|
* Maps to Mantine form components
|
|
249
11
|
*/
|
|
250
12
|
type FormFieldType = 'text' | 'textarea' | 'number' | 'select' | 'checkbox' | 'radio' | 'richtext';
|
|
251
|
-
/**
|
|
252
|
-
* Form field definition
|
|
253
|
-
*/
|
|
254
|
-
interface FormField {
|
|
255
|
-
/** Field key in payload object */
|
|
256
|
-
name: string;
|
|
257
|
-
/** Field label for UI */
|
|
258
|
-
label: string;
|
|
259
|
-
/** Field type (determines UI component) */
|
|
260
|
-
type: FormFieldType;
|
|
261
|
-
/** Default value */
|
|
262
|
-
defaultValue?: unknown;
|
|
263
|
-
/** Required field */
|
|
264
|
-
required?: boolean;
|
|
265
|
-
/** Placeholder text */
|
|
266
|
-
placeholder?: string;
|
|
267
|
-
/** Help text */
|
|
268
|
-
description?: string;
|
|
269
|
-
/** Options for select/radio */
|
|
270
|
-
options?: Array<{
|
|
271
|
-
label: string;
|
|
272
|
-
value: string | number;
|
|
273
|
-
}>;
|
|
274
|
-
/** Min/max for number */
|
|
275
|
-
min?: number;
|
|
276
|
-
max?: number;
|
|
277
|
-
/** Path to context value for pre-filling (dot notation, e.g., 'proposal.summary') */
|
|
278
|
-
defaultValueFromContext?: string;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Form schema for action payload collection
|
|
282
|
-
*/
|
|
283
|
-
interface FormSchema {
|
|
284
|
-
/** Form title */
|
|
285
|
-
title?: string;
|
|
286
|
-
/** Form description */
|
|
287
|
-
description?: string;
|
|
288
|
-
/** Form fields */
|
|
289
|
-
fields: FormField[];
|
|
290
|
-
}
|
|
291
13
|
|
|
292
14
|
/**
|
|
293
15
|
* Serialized Registry Types
|
|
@@ -451,262 +173,6 @@ interface SerializedWorkflowDefinition {
|
|
|
451
173
|
interface?: SerializedExecutionInterface;
|
|
452
174
|
}
|
|
453
175
|
|
|
454
|
-
/**
|
|
455
|
-
* Model Configuration
|
|
456
|
-
* Centralized model information, configuration, options, constraints, and validation
|
|
457
|
-
* Single source of truth for all model-related definitions
|
|
458
|
-
* Update manually when pricing changes or new models are added
|
|
459
|
-
*/
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Supported Open AI models (direct SDK access)
|
|
463
|
-
*/
|
|
464
|
-
type OpenAIModel = 'gpt-5' | 'gpt-5.4-mini' | 'gpt-5.4-nano';
|
|
465
|
-
/**
|
|
466
|
-
* Supported OpenRouter models (explicit union for type safety)
|
|
467
|
-
*/
|
|
468
|
-
type OpenRouterModel = 'openrouter/z-ai/glm-5';
|
|
469
|
-
/**
|
|
470
|
-
* Supported Google models (direct SDK access)
|
|
471
|
-
*/
|
|
472
|
-
type GoogleModel = 'gemini-3-flash-preview' | 'gemini-3.1-flash-lite-preview';
|
|
473
|
-
/**
|
|
474
|
-
* Supported Anthropic models (direct SDK access via @anthropic-ai/sdk)
|
|
475
|
-
*/
|
|
476
|
-
type AnthropicModel = 'claude-sonnet-4-5';
|
|
477
|
-
/** Supported LLM models */
|
|
478
|
-
type LLMModel = OpenAIModel | OpenRouterModel | GoogleModel | AnthropicModel | 'mock';
|
|
479
|
-
/**
|
|
480
|
-
* GPT-5 model options schema
|
|
481
|
-
*/
|
|
482
|
-
declare const GPT5OptionsSchema: z.ZodObject<{
|
|
483
|
-
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
484
|
-
minimal: "minimal";
|
|
485
|
-
low: "low";
|
|
486
|
-
medium: "medium";
|
|
487
|
-
high: "high";
|
|
488
|
-
}>>;
|
|
489
|
-
verbosity: z.ZodOptional<z.ZodEnum<{
|
|
490
|
-
low: "low";
|
|
491
|
-
medium: "medium";
|
|
492
|
-
high: "high";
|
|
493
|
-
}>>;
|
|
494
|
-
}, z.core.$strip>;
|
|
495
|
-
/**
|
|
496
|
-
* OpenRouter model options schema
|
|
497
|
-
* OpenRouter-specific options for routing and transforms
|
|
498
|
-
*/
|
|
499
|
-
declare const OpenRouterOptionsSchema: z.ZodObject<{
|
|
500
|
-
transforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
501
|
-
route: z.ZodOptional<z.ZodEnum<{
|
|
502
|
-
fallback: "fallback";
|
|
503
|
-
}>>;
|
|
504
|
-
}, z.core.$strip>;
|
|
505
|
-
/**
|
|
506
|
-
* Google model options schema
|
|
507
|
-
* Gemini 3 specific options for thinking depth control
|
|
508
|
-
*/
|
|
509
|
-
declare const GoogleOptionsSchema: z.ZodObject<{
|
|
510
|
-
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
511
|
-
minimal: "minimal";
|
|
512
|
-
low: "low";
|
|
513
|
-
medium: "medium";
|
|
514
|
-
high: "high";
|
|
515
|
-
}>>;
|
|
516
|
-
}, z.core.$strip>;
|
|
517
|
-
/**
|
|
518
|
-
* Anthropic model options schema
|
|
519
|
-
* Currently empty - future options: budget_tokens for extended thinking
|
|
520
|
-
*/
|
|
521
|
-
declare const AnthropicOptionsSchema: z.ZodObject<{}, z.core.$strip>;
|
|
522
|
-
/**
|
|
523
|
-
* Infer TypeScript types from schemas
|
|
524
|
-
*/
|
|
525
|
-
type GPT5Options = z.infer<typeof GPT5OptionsSchema>;
|
|
526
|
-
type MockOptions = Record<string, never>;
|
|
527
|
-
type OpenRouterOptions = z.infer<typeof OpenRouterOptionsSchema>;
|
|
528
|
-
type GoogleOptions = z.infer<typeof GoogleOptionsSchema>;
|
|
529
|
-
type AnthropicOptions = z.infer<typeof AnthropicOptionsSchema>;
|
|
530
|
-
type ModelSpecificOptions = GPT5Options | MockOptions | OpenRouterOptions | GoogleOptions | AnthropicOptions;
|
|
531
|
-
/**
|
|
532
|
-
* Model configuration for LLM execution
|
|
533
|
-
* Belongs in resource definition (AgentDefinition, WorkflowDefinition, etc.)
|
|
534
|
-
*/
|
|
535
|
-
interface ModelConfig {
|
|
536
|
-
model: LLMModel;
|
|
537
|
-
provider: 'openai' | 'anthropic' | 'openrouter' | 'google' | 'mock';
|
|
538
|
-
apiKey: string;
|
|
539
|
-
temperature?: number;
|
|
540
|
-
/** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
|
|
541
|
-
maxOutputTokens?: number;
|
|
542
|
-
topP?: number;
|
|
543
|
-
/**
|
|
544
|
-
* Model-specific options (flat structure)
|
|
545
|
-
* Options are model-specific, not vendor-specific
|
|
546
|
-
* Available options defined in MODEL_INFO per model
|
|
547
|
-
* Validated at build time via validateModelOptions()
|
|
548
|
-
*/
|
|
549
|
-
modelOptions?: ModelSpecificOptions;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Execution interface configuration
|
|
554
|
-
* Defines how a resource is executed via the UI (forms, scheduling, webhooks)
|
|
555
|
-
* Applies to both agents and workflows
|
|
556
|
-
*/
|
|
557
|
-
interface ExecutionInterface {
|
|
558
|
-
/** Form configuration for execution inputs */
|
|
559
|
-
form: ExecutionFormSchema;
|
|
560
|
-
/** Optional: Schedule configuration */
|
|
561
|
-
schedule?: ScheduleConfig;
|
|
562
|
-
/** Optional: Webhook trigger configuration */
|
|
563
|
-
webhook?: WebhookConfig;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Execution form schema
|
|
567
|
-
* Extends FormSchema with execution-specific fields
|
|
568
|
-
*/
|
|
569
|
-
interface ExecutionFormSchema extends FormSchema {
|
|
570
|
-
/**
|
|
571
|
-
* Field mappings to resource input schema
|
|
572
|
-
* Maps form field names to contract input paths
|
|
573
|
-
* If omitted, field names must match contract input keys exactly
|
|
574
|
-
*/
|
|
575
|
-
fieldMappings?: Record<string, string>;
|
|
576
|
-
/**
|
|
577
|
-
* Submit button configuration
|
|
578
|
-
* Default: { label: 'Run', loadingLabel: 'Running...' }
|
|
579
|
-
*/
|
|
580
|
-
submitButton?: {
|
|
581
|
-
label?: string;
|
|
582
|
-
loadingLabel?: string;
|
|
583
|
-
confirmMessage?: string;
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Schedule configuration for automated execution
|
|
588
|
-
*/
|
|
589
|
-
interface ScheduleConfig {
|
|
590
|
-
/** Whether scheduling is enabled for this resource */
|
|
591
|
-
enabled: boolean;
|
|
592
|
-
/** Default schedule (cron expression) */
|
|
593
|
-
defaultSchedule?: string;
|
|
594
|
-
/** Allowed schedule patterns (if restricted) */
|
|
595
|
-
allowedPatterns?: string[];
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* Webhook configuration for external triggers
|
|
599
|
-
*/
|
|
600
|
-
interface WebhookConfig {
|
|
601
|
-
/** Whether webhook trigger is enabled */
|
|
602
|
-
enabled: boolean;
|
|
603
|
-
/** Expected payload schema (for documentation) */
|
|
604
|
-
payloadSchema?: unknown;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
interface WorkflowConfig extends ResourceDefinition {
|
|
608
|
-
type: 'workflow';
|
|
609
|
-
}
|
|
610
|
-
interface WorkflowStepDefinition {
|
|
611
|
-
id: string;
|
|
612
|
-
name: string;
|
|
613
|
-
description: string;
|
|
614
|
-
}
|
|
615
|
-
type StepHandler = (input: unknown, context: ExecutionContext) => Promise<unknown>;
|
|
616
|
-
interface LinearNext {
|
|
617
|
-
type: 'linear';
|
|
618
|
-
target: string;
|
|
619
|
-
}
|
|
620
|
-
interface ConditionalNext {
|
|
621
|
-
type: 'conditional';
|
|
622
|
-
routes: Array<{
|
|
623
|
-
condition: (data: unknown) => boolean;
|
|
624
|
-
target: string;
|
|
625
|
-
}>;
|
|
626
|
-
default: string;
|
|
627
|
-
}
|
|
628
|
-
type NextConfig = LinearNext | ConditionalNext | null;
|
|
629
|
-
interface WorkflowStep extends WorkflowStepDefinition {
|
|
630
|
-
handler: StepHandler;
|
|
631
|
-
inputSchema: z.ZodSchema;
|
|
632
|
-
outputSchema: z.ZodSchema;
|
|
633
|
-
next: NextConfig;
|
|
634
|
-
}
|
|
635
|
-
interface WorkflowDefinition {
|
|
636
|
-
config: WorkflowConfig;
|
|
637
|
-
contract: Contract;
|
|
638
|
-
steps: Record<string, WorkflowStep>;
|
|
639
|
-
entryPoint: string;
|
|
640
|
-
/**
|
|
641
|
-
* Metrics configuration for ROI calculations
|
|
642
|
-
* Optional: Only needed if tracking automation savings
|
|
643
|
-
*/
|
|
644
|
-
metricsConfig?: ResourceMetricsConfig;
|
|
645
|
-
/**
|
|
646
|
-
* Execution interface configuration (optional)
|
|
647
|
-
* If provided, workflow appears in Execution Runner UI
|
|
648
|
-
*/
|
|
649
|
-
interface?: ExecutionInterface;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
/**
|
|
653
|
-
* Generic LLM Types
|
|
654
|
-
* Universal interfaces for LLM interaction across all resource types
|
|
655
|
-
*/
|
|
656
|
-
/**
|
|
657
|
-
* Standard chat message format
|
|
658
|
-
* Compatible with OpenAI, Anthropic, and other providers
|
|
659
|
-
*/
|
|
660
|
-
interface LLMMessage {
|
|
661
|
-
role: 'system' | 'user' | 'assistant';
|
|
662
|
-
content: string;
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Generic LLM generation request
|
|
666
|
-
* Usable by agents, workflows, tools, etc.
|
|
667
|
-
*/
|
|
668
|
-
interface LLMGenerateRequest {
|
|
669
|
-
messages: LLMMessage[];
|
|
670
|
-
responseSchema: unknown;
|
|
671
|
-
/** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
|
|
672
|
-
maxOutputTokens?: number;
|
|
673
|
-
temperature?: number;
|
|
674
|
-
topP?: number;
|
|
675
|
-
signal?: AbortSignal;
|
|
676
|
-
}
|
|
677
|
-
/**
|
|
678
|
-
* Generic LLM generation response
|
|
679
|
-
* Usage field is internal-only (stripped by UniversalLLMAdapter wrapper)
|
|
680
|
-
*/
|
|
681
|
-
interface LLMGenerateResponse<T = unknown> {
|
|
682
|
-
output: T;
|
|
683
|
-
usage?: {
|
|
684
|
-
inputTokens: number;
|
|
685
|
-
outputTokens: number;
|
|
686
|
-
totalTokens: number;
|
|
687
|
-
};
|
|
688
|
-
cost?: number;
|
|
689
|
-
}
|
|
690
|
-
/**
|
|
691
|
-
* LLM Adapter interface
|
|
692
|
-
* Generic primitive for all resource types (agents, workflows, tools)
|
|
693
|
-
*
|
|
694
|
-
* Design principles:
|
|
695
|
-
* - Single method: generate() - the core LLM primitive
|
|
696
|
-
* - Generic return type for type safety
|
|
697
|
-
* - Universal format (not agent-specific)
|
|
698
|
-
* - Standard message-based input (OpenAI-compatible)
|
|
699
|
-
*/
|
|
700
|
-
interface LLMAdapter {
|
|
701
|
-
/**
|
|
702
|
-
* Generate structured output from prompt using LLM
|
|
703
|
-
*
|
|
704
|
-
* @param request - Generation request with messages and response schema
|
|
705
|
-
* @returns Generated output (typed) with optional usage metadata
|
|
706
|
-
*/
|
|
707
|
-
generate<T = unknown>(request: LLMGenerateRequest): Promise<LLMGenerateResponse<T>>;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
176
|
/**
|
|
711
177
|
* Memory type definitions
|
|
712
178
|
* Types for agent memory management with semantic entry types
|
|
@@ -747,302 +213,6 @@ interface AgentMemory {
|
|
|
747
213
|
*/
|
|
748
214
|
history: MemoryEntry[];
|
|
749
215
|
}
|
|
750
|
-
/**
|
|
751
|
-
* Memory status for agent awareness
|
|
752
|
-
*/
|
|
753
|
-
interface MemoryStatus {
|
|
754
|
-
sessionMemoryKeys: number;
|
|
755
|
-
sessionMemoryLimit: number;
|
|
756
|
-
currentKeys: string[];
|
|
757
|
-
historyPercent: number;
|
|
758
|
-
historyTokens: number;
|
|
759
|
-
tokenBudget: number;
|
|
760
|
-
}
|
|
761
|
-
/**
|
|
762
|
-
* Memory constraints (optional limits)
|
|
763
|
-
*/
|
|
764
|
-
interface MemoryConstraints {
|
|
765
|
-
maxSessionMemoryKeys?: number;
|
|
766
|
-
maxMemoryTokens?: number;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* Memory Manager
|
|
771
|
-
* Encapsulates all memory operations with ultra-simple agent API
|
|
772
|
-
* Agent provides strings, framework handles wrapping and auto-compaction
|
|
773
|
-
*/
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* Memory Manager - Agent memory orchestration
|
|
777
|
-
* Provides ultra-simple API for agents (strings only)
|
|
778
|
-
* Handles automatic compaction and token management
|
|
779
|
-
*/
|
|
780
|
-
declare class MemoryManager {
|
|
781
|
-
private memory;
|
|
782
|
-
private constraints;
|
|
783
|
-
private logger?;
|
|
784
|
-
private cachedSnapshot?;
|
|
785
|
-
constructor(memory: AgentMemory, constraints?: MemoryConstraints, logger?: AgentScopedLogger | undefined);
|
|
786
|
-
/**
|
|
787
|
-
* Set session memory entry (agent provides string, framework wraps it)
|
|
788
|
-
* @param key - Session memory key
|
|
789
|
-
* @param content - String content from agent
|
|
790
|
-
*/
|
|
791
|
-
set(key: string, content: string): void;
|
|
792
|
-
/**
|
|
793
|
-
* Get session memory entry content
|
|
794
|
-
* @param key - Session memory key
|
|
795
|
-
* @returns String content if exists, undefined otherwise
|
|
796
|
-
*/
|
|
797
|
-
get(key: string): string | undefined;
|
|
798
|
-
/**
|
|
799
|
-
* Delete session memory entry
|
|
800
|
-
* @param key - Key to delete
|
|
801
|
-
* @returns True if key existed and was deleted
|
|
802
|
-
*/
|
|
803
|
-
delete(key: string): boolean;
|
|
804
|
-
/**
|
|
805
|
-
* Add entry to history (called by framework after tool results, reasoning, etc.)
|
|
806
|
-
* Automatically sets timestamp to current time
|
|
807
|
-
* @param entry - Memory entry to add (without timestamp - auto-generated)
|
|
808
|
-
*/
|
|
809
|
-
addToHistory(entry: Omit<MemoryEntry, 'timestamp'>): void;
|
|
810
|
-
/**
|
|
811
|
-
* Auto-compact history if approaching token budget
|
|
812
|
-
* Uses preserve-anchors strategy: keep first + recent entries
|
|
813
|
-
*/
|
|
814
|
-
autoCompact(): void;
|
|
815
|
-
/**
|
|
816
|
-
* Enforce hard limits (called before LLM request)
|
|
817
|
-
* Emergency fallback if agent exceeds limits
|
|
818
|
-
*/
|
|
819
|
-
enforceHardLimits(): void;
|
|
820
|
-
/**
|
|
821
|
-
* Get history length (for logging and introspection)
|
|
822
|
-
* @returns Number of entries in history
|
|
823
|
-
*/
|
|
824
|
-
getHistoryLength(): number;
|
|
825
|
-
/**
|
|
826
|
-
* Get memory status for agent awareness
|
|
827
|
-
* @returns Memory status with token usage and key counts
|
|
828
|
-
*/
|
|
829
|
-
getStatus(): MemoryStatus;
|
|
830
|
-
/**
|
|
831
|
-
* Create memory snapshot for persistence
|
|
832
|
-
* Caches snapshot internally for later retrieval
|
|
833
|
-
* @returns Deep copy of current memory state
|
|
834
|
-
*/
|
|
835
|
-
toSnapshot(): AgentMemory;
|
|
836
|
-
/**
|
|
837
|
-
* Get cached memory snapshot
|
|
838
|
-
* Returns snapshot created by toSnapshot()
|
|
839
|
-
* @returns Cached snapshot (undefined if toSnapshot() not called yet)
|
|
840
|
-
*/
|
|
841
|
-
getSnapshot(): AgentMemory | undefined;
|
|
842
|
-
/**
|
|
843
|
-
* Build context string for LLM
|
|
844
|
-
* Serializes sessionmemory + history memory with clear sections
|
|
845
|
-
* Shows current iteration entries FIRST (reverse chronological) for LLM attention
|
|
846
|
-
* @param currentIteration - Current iteration number (0 = pre-iteration)
|
|
847
|
-
* @param currentTurn - Current turn number (optional, for session context filtering)
|
|
848
|
-
* @returns Formatted memory context for LLM prompt
|
|
849
|
-
*/
|
|
850
|
-
toContext(currentIteration: number, currentTurn?: number): string;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
/**
|
|
854
|
-
* Knowledge Map Types
|
|
855
|
-
*
|
|
856
|
-
* Enables agents to navigate organizational knowledge through a lightweight
|
|
857
|
-
* graph that lazy-loads capabilities on-demand.
|
|
858
|
-
*
|
|
859
|
-
* @module agent/knowledge-map
|
|
860
|
-
*/
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Lightweight knowledge map (passed as agent property)
|
|
864
|
-
*
|
|
865
|
-
* Contains metadata about available knowledge nodes without loading
|
|
866
|
-
* the full content upfront. Total size: ~300-500 tokens.
|
|
867
|
-
*
|
|
868
|
-
* Multi-tenancy is enforced via:
|
|
869
|
-
* - File-scoped maps (organizations/{org-name}/knowledge/)
|
|
870
|
-
* - ExecutionContext.organizationId passed to node.load()
|
|
871
|
-
*/
|
|
872
|
-
interface KnowledgeMap {
|
|
873
|
-
/** Available knowledge nodes indexed by ID */
|
|
874
|
-
nodes: Record<string, KnowledgeNode>;
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* Single knowledge source
|
|
878
|
-
*
|
|
879
|
-
* Represents a domain knowledge area (CRM, brand guidelines, Excel tools)
|
|
880
|
-
* that can be lazy-loaded to provide instructions and tools to agents.
|
|
881
|
-
*/
|
|
882
|
-
interface KnowledgeNode {
|
|
883
|
-
/** Unique identifier for this node (e.g., "crm", "brand-guidelines") */
|
|
884
|
-
id: string;
|
|
885
|
-
/**
|
|
886
|
-
* Description of when to use this knowledge
|
|
887
|
-
* Used for semantic matching against user intent
|
|
888
|
-
*/
|
|
889
|
-
description: string;
|
|
890
|
-
/**
|
|
891
|
-
* Load knowledge content on-demand
|
|
892
|
-
*
|
|
893
|
-
* @param context - Execution context with organizationId for multi-tenancy
|
|
894
|
-
* @returns Promise resolving to knowledge content (prompt + optional tools)
|
|
895
|
-
*/
|
|
896
|
-
load(context: ExecutionContext): Promise<KnowledgeContent>;
|
|
897
|
-
/**
|
|
898
|
-
* Loaded state flag
|
|
899
|
-
* Set to true after load() is called
|
|
900
|
-
*/
|
|
901
|
-
loaded?: boolean;
|
|
902
|
-
/**
|
|
903
|
-
* Cached prompt (for system prompt serialization)
|
|
904
|
-
* Only the prompt is cached - tools go to toolRegistry, children flattened to nodes
|
|
905
|
-
*/
|
|
906
|
-
prompt?: string;
|
|
907
|
-
}
|
|
908
|
-
/**
|
|
909
|
-
* Content returned by knowledge node
|
|
910
|
-
*
|
|
911
|
-
* Separates instructions (prompt) from capabilities (tools).
|
|
912
|
-
* Tools are optional - some nodes only provide context.
|
|
913
|
-
*
|
|
914
|
-
* Supports recursive navigation - nodes can contain child nodes
|
|
915
|
-
* that are discovered when the parent node is loaded.
|
|
916
|
-
*/
|
|
917
|
-
interface KnowledgeContent {
|
|
918
|
-
/** Instructions and context (markdown format) */
|
|
919
|
-
prompt: string;
|
|
920
|
-
/** Tool implementations (optional) */
|
|
921
|
-
tools?: Tool[];
|
|
922
|
-
/**
|
|
923
|
-
* Child knowledge nodes (optional, recursive)
|
|
924
|
-
*
|
|
925
|
-
* Enables hierarchical navigation: base → specialized → deep expertise.
|
|
926
|
-
* Child nodes are flattened into the main knowledge map when parent loads,
|
|
927
|
-
* making them available for subsequent navigate-knowledge actions.
|
|
928
|
-
*
|
|
929
|
-
* Example: CRM base node returns crm-customers and crm-deals as children
|
|
930
|
-
*/
|
|
931
|
-
nodes?: Record<string, KnowledgeNode>;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* Agent-specific type definitions
|
|
936
|
-
* Types for autonomous agents with tools, memory, and constraints
|
|
937
|
-
*/
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* Factory function for creating LLM adapters.
|
|
941
|
-
* Injected into the Agent class to decouple the engine from server-only provider SDKs.
|
|
942
|
-
* - API process: provides createLLMAdapter (real SDKs + process.env API keys)
|
|
943
|
-
* - SDK worker: provides PostMessageLLMAdapter (proxies via platform.call)
|
|
944
|
-
*
|
|
945
|
-
* Uses `any` for optional params so both the real createLLMAdapter (with typed
|
|
946
|
-
* AIUsageCollector/AICallContext) and the worker proxy (which ignores them) satisfy the type.
|
|
947
|
-
*/
|
|
948
|
-
type LLMAdapterFactory = (config: ModelConfig, ...args: any[]) => LLMAdapter;
|
|
949
|
-
interface AgentConfig extends ResourceDefinition {
|
|
950
|
-
type: 'agent';
|
|
951
|
-
systemPrompt: string;
|
|
952
|
-
constraints?: AgentConstraints;
|
|
953
|
-
/**
|
|
954
|
-
* Session capability declaration (opt-in)
|
|
955
|
-
* If true, agent is designed for multi-turn session interactions
|
|
956
|
-
* Controls whether agent can use message action and appears in Sessions UI
|
|
957
|
-
*
|
|
958
|
-
* Use for:
|
|
959
|
-
* - Conversational agents with multi-turn interactions
|
|
960
|
-
* - Agents requiring persistent context across turns
|
|
961
|
-
* - Agents that need human-in-the-loop communication
|
|
962
|
-
*/
|
|
963
|
-
sessionCapable?: boolean;
|
|
964
|
-
/**
|
|
965
|
-
* Security level for system prompt hardening (auto-derived if omitted)
|
|
966
|
-
*
|
|
967
|
-
* - 'standard': Lightweight defense (3 rules) - default for non-session agents
|
|
968
|
-
* - 'hardened': Comprehensive defense (6 rules) - default for session-capable agents
|
|
969
|
-
* - 'none': No security prompt - for pure internal agents with no external input
|
|
970
|
-
*
|
|
971
|
-
* If omitted, derived from sessionCapable:
|
|
972
|
-
* sessionCapable: true -> 'hardened'
|
|
973
|
-
* sessionCapable: false -> 'standard'
|
|
974
|
-
*/
|
|
975
|
-
securityLevel?: 'standard' | 'hardened' | 'none';
|
|
976
|
-
/**
|
|
977
|
-
* Memory management preferences (opt-in)
|
|
978
|
-
* If provided, agent can use memoryOps to manage session memory
|
|
979
|
-
* If omitted, agent has no memory management capabilities
|
|
980
|
-
*
|
|
981
|
-
* Agent-specific guidance on what to preserve, when to persist, and what to clean up.
|
|
982
|
-
* This guidance is injected into the system prompt when memory management is enabled.
|
|
983
|
-
*
|
|
984
|
-
* Use for:
|
|
985
|
-
* - Conversational agents needing cross-turn context
|
|
986
|
-
* - Agents managing complex user preferences
|
|
987
|
-
* - Agents tracking decisions over multiple iterations
|
|
988
|
-
*/
|
|
989
|
-
memoryPreferences?: string;
|
|
990
|
-
}
|
|
991
|
-
interface AgentConstraints {
|
|
992
|
-
maxIterations?: number;
|
|
993
|
-
timeout?: number;
|
|
994
|
-
maxSessionMemoryKeys?: number;
|
|
995
|
-
maxMemoryTokens?: number;
|
|
996
|
-
}
|
|
997
|
-
interface AgentDefinition {
|
|
998
|
-
config: AgentConfig;
|
|
999
|
-
contract: Contract;
|
|
1000
|
-
tools: Tool[];
|
|
1001
|
-
/**
|
|
1002
|
-
* Model configuration for LLM execution
|
|
1003
|
-
* Specifies provider, API key, and model-specific options
|
|
1004
|
-
*/
|
|
1005
|
-
modelConfig: ModelConfig;
|
|
1006
|
-
/**
|
|
1007
|
-
* Optional knowledge map for lazy-loading capabilities
|
|
1008
|
-
* Enables agents to navigate organizational knowledge on-demand
|
|
1009
|
-
*/
|
|
1010
|
-
knowledgeMap?: KnowledgeMap;
|
|
1011
|
-
/**
|
|
1012
|
-
* Preload memory before execution starts
|
|
1013
|
-
* Handles BOTH context loading AND session restoration
|
|
1014
|
-
*
|
|
1015
|
-
* @param context - Execution context (includes sessionId if session turn)
|
|
1016
|
-
* @returns Initial AgentMemory state (sessionMemory entries + optionally history)
|
|
1017
|
-
*/
|
|
1018
|
-
preloadMemory?: (context: ExecutionContext) => Promise<AgentMemory> | AgentMemory;
|
|
1019
|
-
/**
|
|
1020
|
-
* Metrics configuration for ROI calculations
|
|
1021
|
-
* Optional: Only needed if tracking automation savings
|
|
1022
|
-
*/
|
|
1023
|
-
metricsConfig?: ResourceMetricsConfig;
|
|
1024
|
-
/**
|
|
1025
|
-
* Execution interface configuration (optional)
|
|
1026
|
-
* If provided, agent appears in Execution Runner UI
|
|
1027
|
-
*/
|
|
1028
|
-
interface?: ExecutionInterface;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* Agent execution context
|
|
1032
|
-
* Groups all state needed for agent execution phases
|
|
1033
|
-
*/
|
|
1034
|
-
interface IterationContext {
|
|
1035
|
-
config: AgentConfig;
|
|
1036
|
-
contract: Contract;
|
|
1037
|
-
toolRegistry: Map<string, Tool>;
|
|
1038
|
-
memoryManager: MemoryManager;
|
|
1039
|
-
executionContext: ExecutionContext;
|
|
1040
|
-
iteration: number;
|
|
1041
|
-
logger: AgentScopedLogger;
|
|
1042
|
-
modelConfig: ModelConfig;
|
|
1043
|
-
adapterFactory: LLMAdapterFactory;
|
|
1044
|
-
knowledgeMap?: KnowledgeMap;
|
|
1045
|
-
}
|
|
1046
216
|
|
|
1047
217
|
/**
|
|
1048
218
|
* Session Data Transfer Object (DTO)
|
|
@@ -1064,102 +234,6 @@ interface SessionDTO {
|
|
|
1064
234
|
endedAt?: Date | null;
|
|
1065
235
|
}
|
|
1066
236
|
|
|
1067
|
-
/**
|
|
1068
|
-
* MetricsCollector
|
|
1069
|
-
* Tracks execution timing and ROI metrics
|
|
1070
|
-
*/
|
|
1071
|
-
declare class MetricsCollector {
|
|
1072
|
-
private timings;
|
|
1073
|
-
private durationMs?;
|
|
1074
|
-
/**
|
|
1075
|
-
* Start a timer with a label
|
|
1076
|
-
*/
|
|
1077
|
-
startTimer(label: string): void;
|
|
1078
|
-
/**
|
|
1079
|
-
* End a timer and calculate duration
|
|
1080
|
-
* If label is 'execution', stores duration for metrics summary
|
|
1081
|
-
*/
|
|
1082
|
-
endTimer(label: string): number | null;
|
|
1083
|
-
/**
|
|
1084
|
-
* Build execution metrics summary with optional ROI calculation
|
|
1085
|
-
*/
|
|
1086
|
-
buildExecutionMetrics(metricsConfig?: ResourceMetricsConfig): ExecutionMetricsSummary;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
interface BaseAICall {
|
|
1090
|
-
callSequence: number;
|
|
1091
|
-
callType: 'agent-reasoning' | 'agent-completion' | 'workflow-step' | 'tool' | 'other';
|
|
1092
|
-
model: LLMModel;
|
|
1093
|
-
inputTokens: number;
|
|
1094
|
-
outputTokens: number;
|
|
1095
|
-
costUsd: number;
|
|
1096
|
-
latencyMs: number;
|
|
1097
|
-
context?: AICallContext;
|
|
1098
|
-
}
|
|
1099
|
-
type AICallContext = AgentReasoningContext | AgentCompletionContext | WorkflowStepContext | ToolCallContext | OtherCallContext;
|
|
1100
|
-
interface AgentReasoningContext {
|
|
1101
|
-
type: 'agent-reasoning';
|
|
1102
|
-
iteration: number;
|
|
1103
|
-
actionsPlanned?: string[];
|
|
1104
|
-
sessionId?: string;
|
|
1105
|
-
turnNumber?: number;
|
|
1106
|
-
}
|
|
1107
|
-
interface AgentCompletionContext {
|
|
1108
|
-
type: 'agent-completion';
|
|
1109
|
-
attempt: 1 | 2;
|
|
1110
|
-
validationFailed?: boolean;
|
|
1111
|
-
sessionId?: string;
|
|
1112
|
-
turnNumber?: number;
|
|
1113
|
-
}
|
|
1114
|
-
interface WorkflowStepContext {
|
|
1115
|
-
type: 'workflow-step';
|
|
1116
|
-
stepId: string;
|
|
1117
|
-
stepName?: string;
|
|
1118
|
-
stepSequence?: number;
|
|
1119
|
-
}
|
|
1120
|
-
interface ToolCallContext {
|
|
1121
|
-
type: 'tool';
|
|
1122
|
-
toolName: string;
|
|
1123
|
-
parentIteration?: number;
|
|
1124
|
-
parentStepId?: string;
|
|
1125
|
-
}
|
|
1126
|
-
interface OtherCallContext {
|
|
1127
|
-
type: 'other';
|
|
1128
|
-
description?: string;
|
|
1129
|
-
metadata?: Record<string, unknown>;
|
|
1130
|
-
}
|
|
1131
|
-
type AICallRecord = BaseAICall;
|
|
1132
|
-
/**
|
|
1133
|
-
* Raw LLM usage data returned by adapters
|
|
1134
|
-
* Used as input to AIUsageCollector.record()
|
|
1135
|
-
*/
|
|
1136
|
-
interface LLMUsageData {
|
|
1137
|
-
model: LLMModel;
|
|
1138
|
-
inputTokens: number;
|
|
1139
|
-
outputTokens: number;
|
|
1140
|
-
latencyMs: number;
|
|
1141
|
-
/** Actual cost from provider in USD (when available, e.g., OpenRouter) */
|
|
1142
|
-
cost?: number;
|
|
1143
|
-
}
|
|
1144
|
-
interface AIUsageSummary {
|
|
1145
|
-
model: LLMModel;
|
|
1146
|
-
totalInputTokens: number;
|
|
1147
|
-
totalOutputTokens: number;
|
|
1148
|
-
totalTokens: number;
|
|
1149
|
-
totalCostUsd: number;
|
|
1150
|
-
callCount: number;
|
|
1151
|
-
calls: AICallRecord[];
|
|
1152
|
-
}
|
|
1153
|
-
interface ExecutionMetricsSummary {
|
|
1154
|
-
durationMs?: number;
|
|
1155
|
-
automationSavingsUsd?: number;
|
|
1156
|
-
}
|
|
1157
|
-
interface ResourceMetricsConfig {
|
|
1158
|
-
estimatedManualMinutes: number;
|
|
1159
|
-
hourlyLaborRateUsd: number;
|
|
1160
|
-
confidenceLevel?: 'low' | 'medium' | 'high';
|
|
1161
|
-
notes?: string;
|
|
1162
|
-
}
|
|
1163
237
|
/**
|
|
1164
238
|
* Time range selector for dashboard metrics
|
|
1165
239
|
*/
|
|
@@ -1227,119 +301,11 @@ interface DashboardMetrics {
|
|
|
1227
301
|
activeDeploymentVersion: string | null;
|
|
1228
302
|
}
|
|
1229
303
|
|
|
1230
|
-
/**
|
|
1231
|
-
* AIUsageCollector
|
|
1232
|
-
* Centralized token tracking that aggregates usage across all LLM calls in an execution
|
|
1233
|
-
*/
|
|
1234
|
-
declare class AIUsageCollector {
|
|
1235
|
-
private model;
|
|
1236
|
-
private calls;
|
|
1237
|
-
private callSequence;
|
|
1238
|
-
/**
|
|
1239
|
-
* Record a single AI call with usage metrics
|
|
1240
|
-
*
|
|
1241
|
-
* @param usage - Token usage and latency data from LLM adapter
|
|
1242
|
-
* @param callType - Type discriminator (agent-reasoning, tool, etc.)
|
|
1243
|
-
* @param context - Optional typed context specific to callType
|
|
1244
|
-
*/
|
|
1245
|
-
record(usage: LLMUsageData, callType?: BaseAICall['callType'], context?: AICallContext): void;
|
|
1246
|
-
/**
|
|
1247
|
-
* Get aggregated summary of all AI calls
|
|
1248
|
-
*/
|
|
1249
|
-
getSummary(): AIUsageSummary;
|
|
1250
|
-
/**
|
|
1251
|
-
* Check if any usage has been recorded
|
|
1252
|
-
*/
|
|
1253
|
-
hasUsage(): boolean;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
304
|
/**
|
|
1257
305
|
* Base Execution Engine type definitions
|
|
1258
306
|
* Core types shared across all Execution Engine resources
|
|
1259
307
|
*/
|
|
1260
308
|
|
|
1261
|
-
/**
|
|
1262
|
-
* Immutable execution metadata
|
|
1263
|
-
* Represents complete execution identity (who, what, when, where)
|
|
1264
|
-
* Shared across ExecutionContext and ExecutionLoggerContext to eliminate field duplication
|
|
1265
|
-
*/
|
|
1266
|
-
interface ExecutionMetadata {
|
|
1267
|
-
executionId: string;
|
|
1268
|
-
organizationId: string;
|
|
1269
|
-
organizationName: string;
|
|
1270
|
-
resourceId: string;
|
|
1271
|
-
userId?: string;
|
|
1272
|
-
sessionId?: string;
|
|
1273
|
-
sessionTurnNumber?: number;
|
|
1274
|
-
}
|
|
1275
|
-
/**
|
|
1276
|
-
* Unified message event type - covers all message types in sessions
|
|
1277
|
-
* Replaces separate SessionTurnMessages and AgentActivityEvent mechanisms
|
|
1278
|
-
*/
|
|
1279
|
-
/**
|
|
1280
|
-
* Structured action metadata attached to assistant messages.
|
|
1281
|
-
* Frontend reads this instead of parsing text prefixes.
|
|
1282
|
-
*/
|
|
1283
|
-
type AssistantAction = {
|
|
1284
|
-
kind: 'navigate';
|
|
1285
|
-
path: string;
|
|
1286
|
-
reason: string;
|
|
1287
|
-
} | {
|
|
1288
|
-
kind: 'update_filters';
|
|
1289
|
-
timeRange: string | null;
|
|
1290
|
-
statusFilter: string | null;
|
|
1291
|
-
searchQuery: string | null;
|
|
1292
|
-
};
|
|
1293
|
-
type MessageEvent = {
|
|
1294
|
-
type: 'user_message';
|
|
1295
|
-
text: string;
|
|
1296
|
-
} | {
|
|
1297
|
-
type: 'assistant_message';
|
|
1298
|
-
text: string;
|
|
1299
|
-
_action?: AssistantAction;
|
|
1300
|
-
} | {
|
|
1301
|
-
type: 'agent:started';
|
|
1302
|
-
} | {
|
|
1303
|
-
type: 'agent:completed';
|
|
1304
|
-
} | {
|
|
1305
|
-
type: 'agent:error';
|
|
1306
|
-
error: string;
|
|
1307
|
-
} | {
|
|
1308
|
-
type: 'agent:reasoning';
|
|
1309
|
-
iteration: number;
|
|
1310
|
-
reasoning: string;
|
|
1311
|
-
} | {
|
|
1312
|
-
type: 'agent:tool_call';
|
|
1313
|
-
toolName: string;
|
|
1314
|
-
args: Record<string, unknown>;
|
|
1315
|
-
} | {
|
|
1316
|
-
type: 'agent:tool_result';
|
|
1317
|
-
toolName: string;
|
|
1318
|
-
success: boolean;
|
|
1319
|
-
result?: unknown;
|
|
1320
|
-
error?: string;
|
|
1321
|
-
};
|
|
1322
|
-
/**
|
|
1323
|
-
* Execution context for all resources
|
|
1324
|
-
* Unified callback replaces SessionTurnMessages (removed)
|
|
1325
|
-
*/
|
|
1326
|
-
interface ExecutionContext extends ExecutionMetadata {
|
|
1327
|
-
logger: IExecutionLogger;
|
|
1328
|
-
signal?: AbortSignal;
|
|
1329
|
-
onMessageEvent?: (event: MessageEvent) => Promise<void>;
|
|
1330
|
-
/** Called per iteration to write heartbeat + check stall status. Non-fatal if it throws. */
|
|
1331
|
-
onHeartbeat?: () => Promise<void>;
|
|
1332
|
-
aiUsageCollector?: AIUsageCollector;
|
|
1333
|
-
metricsCollector?: MetricsCollector;
|
|
1334
|
-
parentExecutionId?: string;
|
|
1335
|
-
executionDepth: number;
|
|
1336
|
-
credentialName?: string;
|
|
1337
|
-
store: Map<string, unknown>;
|
|
1338
|
-
}
|
|
1339
|
-
interface Contract {
|
|
1340
|
-
inputSchema: z.ZodSchema;
|
|
1341
|
-
outputSchema?: z.ZodSchema;
|
|
1342
|
-
}
|
|
1343
309
|
/**
|
|
1344
310
|
* NOTE: AIResource interface has been removed and replaced with ResourceDefinition
|
|
1345
311
|
* from registry/types.ts. All resources (executable and non-executable) now extend
|
|
@@ -1350,45 +316,6 @@ interface Contract {
|
|
|
1350
316
|
*/
|
|
1351
317
|
type AIResourceDefinition = SerializedWorkflowDefinition | SerializedAgentDefinition;
|
|
1352
318
|
|
|
1353
|
-
/**
|
|
1354
|
-
* Tool definitions
|
|
1355
|
-
*
|
|
1356
|
-
* Tool interface used by agents and workflows.
|
|
1357
|
-
* Provides a universal interface for AI systems to interact with tools.
|
|
1358
|
-
*/
|
|
1359
|
-
|
|
1360
|
-
/**
|
|
1361
|
-
* Options for tool execution
|
|
1362
|
-
* Provides named parameters for better API clarity and extensibility
|
|
1363
|
-
*/
|
|
1364
|
-
interface ToolExecutionOptions {
|
|
1365
|
-
/** Tool input (validated against inputSchema before execution) */
|
|
1366
|
-
input: unknown;
|
|
1367
|
-
/** Execution context with multi-tenant isolation and observability (optional for simple tools, required for platform/integration tools) */
|
|
1368
|
-
executionContext?: ExecutionContext;
|
|
1369
|
-
/** Full iteration context for advanced tools (provides access to memoryManager, toolRegistry, logger, etc.) */
|
|
1370
|
-
iterationContext?: IterationContext;
|
|
1371
|
-
/** Abort signal for timeout/cancellation -- forward to fetch() calls for clean cancellation */
|
|
1372
|
-
signal?: AbortSignal;
|
|
1373
|
-
}
|
|
1374
|
-
/**
|
|
1375
|
-
* Tool interface for AI systems
|
|
1376
|
-
*
|
|
1377
|
-
* Used by:
|
|
1378
|
-
* - Agents: For agentic tool use (reasoning loop selects and executes tools)
|
|
1379
|
-
* - Workflows: For workflow step tool invocation (future)
|
|
1380
|
-
* - Platform tools: createApprovalTool(), createSchedulerTool()
|
|
1381
|
-
* - Integration tools: External API calls (Gmail, Slack, etc.)
|
|
1382
|
-
*/
|
|
1383
|
-
interface Tool {
|
|
1384
|
-
name: string;
|
|
1385
|
-
description: string;
|
|
1386
|
-
inputSchema: z.ZodSchema;
|
|
1387
|
-
outputSchema: z.ZodSchema;
|
|
1388
|
-
execute: (options: ToolExecutionOptions) => Promise<unknown>;
|
|
1389
|
-
timeout?: number;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
319
|
/**
|
|
1393
320
|
* Resource Registry type definitions
|
|
1394
321
|
*/
|
|
@@ -1456,108 +383,6 @@ declare const DOMAINS: {
|
|
|
1456
383
|
*/
|
|
1457
384
|
type ResourceDomain = (typeof DOMAINS)[keyof typeof DOMAINS];
|
|
1458
385
|
|
|
1459
|
-
/**
|
|
1460
|
-
* Calibration Lab Type Definitions
|
|
1461
|
-
* Core types for AI model configuration optimization with cost/performance comparison
|
|
1462
|
-
*/
|
|
1463
|
-
|
|
1464
|
-
/**
|
|
1465
|
-
* Configuration variant for testing
|
|
1466
|
-
* Defines what to override in the base agent/workflow definition
|
|
1467
|
-
*/
|
|
1468
|
-
interface ConfigVariant {
|
|
1469
|
-
variantName: string;
|
|
1470
|
-
definitionOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
|
|
1471
|
-
}
|
|
1472
|
-
/**
|
|
1473
|
-
* Agent definition overrides for calibration
|
|
1474
|
-
* Excludes identity/metadata fields that should not be modified
|
|
1475
|
-
*/
|
|
1476
|
-
type AgentCalibrationOverrides = Omit<Partial<AgentDefinition>, 'config' | 'contract' | 'tools' | 'metricsConfig' | 'interface'>;
|
|
1477
|
-
/**
|
|
1478
|
-
* Workflow definition overrides for calibration
|
|
1479
|
-
* Excludes identity/metadata fields that should not be modified
|
|
1480
|
-
*/
|
|
1481
|
-
type WorkflowCalibrationOverrides = Omit<Partial<WorkflowDefinition>, 'config' | 'contract' | 'steps' | 'entryPoint' | 'metricsConfig' | 'interface'>;
|
|
1482
|
-
/**
|
|
1483
|
-
* Grading rubric for LLM-as-judge evaluation
|
|
1484
|
-
* Defines criteria and passing threshold
|
|
1485
|
-
*/
|
|
1486
|
-
interface GradingRubric {
|
|
1487
|
-
passingThreshold: number;
|
|
1488
|
-
criteria: GradingCriterion[];
|
|
1489
|
-
}
|
|
1490
|
-
/**
|
|
1491
|
-
* Individual grading criterion
|
|
1492
|
-
* Weight should be 0-1, and all weights should sum to 1
|
|
1493
|
-
*/
|
|
1494
|
-
interface GradingCriterion {
|
|
1495
|
-
name: string;
|
|
1496
|
-
weight: number;
|
|
1497
|
-
description: string;
|
|
1498
|
-
scoringGuide: string;
|
|
1499
|
-
}
|
|
1500
|
-
/**
|
|
1501
|
-
* Grading result for a single execution or session
|
|
1502
|
-
* Contains overall score and per-criterion breakdown
|
|
1503
|
-
*/
|
|
1504
|
-
interface GradeResult {
|
|
1505
|
-
score: number;
|
|
1506
|
-
passed: boolean;
|
|
1507
|
-
details: Record<string, {
|
|
1508
|
-
score: number;
|
|
1509
|
-
justification: string;
|
|
1510
|
-
}>;
|
|
1511
|
-
}
|
|
1512
|
-
/**
|
|
1513
|
-
* Single-turn calibration result
|
|
1514
|
-
* One result per (variant × input) combination
|
|
1515
|
-
*/
|
|
1516
|
-
interface SingleCalibrationResult {
|
|
1517
|
-
executionId: string;
|
|
1518
|
-
variantName: string;
|
|
1519
|
-
inputIndex: number;
|
|
1520
|
-
appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
|
|
1521
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
1522
|
-
errorMessage?: string;
|
|
1523
|
-
grade?: GradeResult;
|
|
1524
|
-
gradeError?: string;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* Multi-turn session calibration result
|
|
1528
|
-
* Leverages existing sessions infrastructure
|
|
1529
|
-
*/
|
|
1530
|
-
interface SessionCalibrationResult {
|
|
1531
|
-
sessionId: string;
|
|
1532
|
-
variantName: string;
|
|
1533
|
-
appliedOverrides?: AgentCalibrationOverrides | WorkflowCalibrationOverrides;
|
|
1534
|
-
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
1535
|
-
errorMessage?: string;
|
|
1536
|
-
turnCount: number;
|
|
1537
|
-
grade?: GradeResult;
|
|
1538
|
-
gradeError?: string;
|
|
1539
|
-
}
|
|
1540
|
-
/**
|
|
1541
|
-
* Calibration run - individual test execution within a project
|
|
1542
|
-
* Contains configuration, results, and grading information
|
|
1543
|
-
*/
|
|
1544
|
-
interface CalibrationRun {
|
|
1545
|
-
id: string;
|
|
1546
|
-
organizationId: string;
|
|
1547
|
-
projectId: string;
|
|
1548
|
-
name: string;
|
|
1549
|
-
description?: string | null;
|
|
1550
|
-
executionMode: 'single' | 'session';
|
|
1551
|
-
testInputs: unknown[];
|
|
1552
|
-
configVariants: ConfigVariant[];
|
|
1553
|
-
gradingRubric?: GradingRubric | null;
|
|
1554
|
-
graderModel?: string | null;
|
|
1555
|
-
results: (SingleCalibrationResult | SessionCalibrationResult)[];
|
|
1556
|
-
status: 'pending' | 'running' | 'completed' | 'partial' | 'failed';
|
|
1557
|
-
createdAt: Date;
|
|
1558
|
-
completedAt?: Date | null;
|
|
1559
|
-
}
|
|
1560
|
-
|
|
1561
386
|
interface ResourcesPageProps {
|
|
1562
387
|
/** Initial filter type from the URL search param (caller-managed) */
|
|
1563
388
|
initialFilter?: ResourceType$1;
|
|
@@ -1726,27 +551,6 @@ interface UseExecutionPanelStateOptions {
|
|
|
1726
551
|
|
|
1727
552
|
type TaskFilterStatus = 'all' | 'pending' | 'completed' | 'expired';
|
|
1728
553
|
|
|
1729
|
-
declare const SemanticDomainSchema = DisplayMetadataSchema.extend({
|
|
1730
|
-
id: ModelIdSchema,
|
|
1731
|
-
entityIds: ReferenceIdsSchema,
|
|
1732
|
-
surfaceIds: ReferenceIdsSchema,
|
|
1733
|
-
resourceIds: ReferenceIdsSchema,
|
|
1734
|
-
capabilityIds: ReferenceIdsSchema
|
|
1735
|
-
})
|
|
1736
|
-
|
|
1737
|
-
declare const FeatureKeySchema = z.enum([
|
|
1738
|
-
'acquisition',
|
|
1739
|
-
'delivery',
|
|
1740
|
-
'operations',
|
|
1741
|
-
'monitoring',
|
|
1742
|
-
'settings',
|
|
1743
|
-
'seo',
|
|
1744
|
-
'calibration'
|
|
1745
|
-
])
|
|
1746
|
-
|
|
1747
|
-
type OrganizationModelFeatureKey = z.infer<typeof FeatureKeySchema>
|
|
1748
|
-
type OrganizationModelSemanticDomain = z.infer<typeof SemanticDomainSchema>
|
|
1749
|
-
|
|
1750
554
|
interface FeatureNavLink {
|
|
1751
555
|
label: string;
|
|
1752
556
|
link: string;
|
|
@@ -1765,15 +569,10 @@ interface FeatureNavEntry {
|
|
|
1765
569
|
}
|
|
1766
570
|
type FeatureSidebarComponent = ComponentType;
|
|
1767
571
|
interface FeatureModule {
|
|
1768
|
-
/** Unique stable identifier for this feature (e.g. `'crm'`, `'
|
|
572
|
+
/** Unique stable identifier for this feature (e.g. `'crm'`, `'projects'`). */
|
|
1769
573
|
key: string;
|
|
1770
|
-
/** Feature
|
|
1771
|
-
|
|
1772
|
-
/**
|
|
1773
|
-
* Semantic domain identifiers contributed by this feature.
|
|
1774
|
-
* Merged with surface-derived domain IDs during resolution.
|
|
1775
|
-
*/
|
|
1776
|
-
domainIds?: OrganizationModelSemanticDomain['id'][];
|
|
574
|
+
/** Feature ID used for access-flag gating — must match the `id` of a feature in the organization model. */
|
|
575
|
+
featureId: string;
|
|
1777
576
|
/**
|
|
1778
577
|
* Capability identifiers contributed by this feature.
|
|
1779
578
|
* Merged into `ResolvedFeatureSemantics.capabilityIds` at resolution time.
|
|
@@ -1837,66 +636,6 @@ interface OrganizationGraphPageProps {
|
|
|
1837
636
|
}
|
|
1838
637
|
declare function OrganizationGraphPage({ lens, timeRange }: OrganizationGraphPageProps): react_jsx_runtime.JSX.Element;
|
|
1839
638
|
|
|
1840
|
-
interface CalibrationPageProps {
|
|
1841
|
-
/** The resource this calibration tab is embedded within */
|
|
1842
|
-
resourceId: string;
|
|
1843
|
-
resourceType: 'agent' | 'workflow';
|
|
1844
|
-
/** Called when the user clicks a project card. Caller handles navigation. */
|
|
1845
|
-
onProjectNavigate: (projectId: string) => void;
|
|
1846
|
-
}
|
|
1847
|
-
declare function CalibrationPage({ resourceId, resourceType, onProjectNavigate }: CalibrationPageProps): react_jsx_runtime.JSX.Element;
|
|
1848
|
-
|
|
1849
|
-
interface CalibrationProjectDetailPageRenderRunCardArgs {
|
|
1850
|
-
run: CalibrationRun;
|
|
1851
|
-
projectId: string;
|
|
1852
|
-
}
|
|
1853
|
-
interface CalibrationProjectDetailPageRenderCreateModalArgs {
|
|
1854
|
-
opened: boolean;
|
|
1855
|
-
onClose: () => void;
|
|
1856
|
-
projectId: string;
|
|
1857
|
-
}
|
|
1858
|
-
interface CalibrationProjectDetailPageProps {
|
|
1859
|
-
/** ID of the calibration project to display */
|
|
1860
|
-
projectId: string;
|
|
1861
|
-
/** Root path for the calibration section, e.g. '/operations/calibration' */
|
|
1862
|
-
calibrationRootPath: string;
|
|
1863
|
-
/**
|
|
1864
|
-
* Called when the organization changes while viewing this page.
|
|
1865
|
-
* The CC wrapper navigates back to the calibration root on org switch.
|
|
1866
|
-
*/
|
|
1867
|
-
onOrgChange?: () => void;
|
|
1868
|
-
/**
|
|
1869
|
-
* Render-prop slot for a single run card.
|
|
1870
|
-
* Required because CalibrationRunCard has CC-local hook dependencies
|
|
1871
|
-
* (useDeleteRun, useExecuteRun) that cannot be co-extracted yet.
|
|
1872
|
-
*/
|
|
1873
|
-
renderRunCard: (args: CalibrationProjectDetailPageRenderRunCardArgs) => ReactNode;
|
|
1874
|
-
/**
|
|
1875
|
-
* Render-prop slot for the create run modal.
|
|
1876
|
-
* Required because CreateRunModal has CC-local hook dependencies
|
|
1877
|
-
* (useCreateRun) that cannot be co-extracted yet.
|
|
1878
|
-
*/
|
|
1879
|
-
renderCreateModal: (args: CalibrationProjectDetailPageRenderCreateModalArgs) => ReactNode;
|
|
1880
|
-
/**
|
|
1881
|
-
* Runs array to display. Kept in CC because useCalibrationRuns is deferred
|
|
1882
|
-
* to batch 3 extraction. Pass `undefined` while loading.
|
|
1883
|
-
*/
|
|
1884
|
-
runs: CalibrationRun[] | undefined;
|
|
1885
|
-
/** Whether the runs data is still loading */
|
|
1886
|
-
runsLoading: boolean;
|
|
1887
|
-
}
|
|
1888
|
-
declare function CalibrationProjectDetailPage({ projectId, calibrationRootPath, renderRunCard, renderCreateModal, runs, runsLoading }: CalibrationProjectDetailPageProps): react_jsx_runtime.JSX.Element | null;
|
|
1889
|
-
|
|
1890
|
-
interface CalibrationProjectsPageProps {
|
|
1891
|
-
/** Called when the user clicks a project card. Caller handles navigation. */
|
|
1892
|
-
onNavigateToProject: (projectId: string) => void;
|
|
1893
|
-
}
|
|
1894
|
-
/**
|
|
1895
|
-
* Main Calibration Lab landing page
|
|
1896
|
-
* Shows all calibration projects across the organization
|
|
1897
|
-
*/
|
|
1898
|
-
declare function CalibrationProjectsPage({ onNavigateToProject }: CalibrationProjectsPageProps): react_jsx_runtime.JSX.Element;
|
|
1899
|
-
|
|
1900
639
|
interface CommandViewSidebarContentProps {
|
|
1901
640
|
/** Current time range value — caller passes from its own store (e.g. useAppStore) */
|
|
1902
641
|
timeRange: TimeRange;
|
|
@@ -1910,61 +649,10 @@ interface CommandViewSidebarContentProps {
|
|
|
1910
649
|
* - Environment filter (All/Prod/Dev)
|
|
1911
650
|
* - Show integrations toggle
|
|
1912
651
|
* - Domain filters (collapsible)
|
|
1913
|
-
* - Settings (fit view on filter)
|
|
1914
652
|
* - Selected node details + executions/tasks (lazy loaded)
|
|
1915
653
|
*/
|
|
1916
654
|
declare function CommandViewSidebarContent({ timeRange }: CommandViewSidebarContentProps): react_jsx_runtime.JSX.Element;
|
|
1917
655
|
|
|
1918
|
-
interface CalibrationRunDetailPageProps {
|
|
1919
|
-
/** ID of the calibration run to display */
|
|
1920
|
-
runId: string;
|
|
1921
|
-
/** Root path for the calibration section, e.g. '/operations/calibration' */
|
|
1922
|
-
calibrationRootPath: string;
|
|
1923
|
-
/**
|
|
1924
|
-
* Called when the user clicks the back-to-project button.
|
|
1925
|
-
* Receives the project ID to navigate to.
|
|
1926
|
-
*/
|
|
1927
|
-
onNavigateToProject: (projectId: string) => void;
|
|
1928
|
-
/**
|
|
1929
|
-
* Called when the organization changes while viewing this page.
|
|
1930
|
-
* The CC wrapper should navigate back to the calibration root on org switch.
|
|
1931
|
-
*/
|
|
1932
|
-
onOrgChange?: () => void;
|
|
1933
|
-
/**
|
|
1934
|
-
* Render-prop slot for the session comparison panel.
|
|
1935
|
-
* Required because SessionComparison has CC-local hook dependencies
|
|
1936
|
-
* (useSessionMessages, ChatInterface from @/shared/components/chat).
|
|
1937
|
-
*/
|
|
1938
|
-
renderSessionComparison?: (args: {
|
|
1939
|
-
run: CalibrationRun;
|
|
1940
|
-
}) => ReactNode;
|
|
1941
|
-
/** SSE connection manager instance for live calibration progress updates. */
|
|
1942
|
-
manager: SSEConnectionManagerLike;
|
|
1943
|
-
/** Base API URL used by CalibrationProgress to connect to the SSE endpoint. */
|
|
1944
|
-
apiUrl: string;
|
|
1945
|
-
}
|
|
1946
|
-
declare function CalibrationRunDetailPage({ runId, onNavigateToProject, renderSessionComparison, manager, apiUrl }: CalibrationRunDetailPageProps): react_jsx_runtime.JSX.Element | null;
|
|
1947
|
-
|
|
1948
|
-
interface CalibrationProgressProps {
|
|
1949
|
-
runId: string;
|
|
1950
|
-
manager: SSEConnectionManagerLike;
|
|
1951
|
-
apiUrl: string;
|
|
1952
|
-
}
|
|
1953
|
-
declare function CalibrationProgress({ runId, manager, apiUrl }: CalibrationProgressProps): react_jsx_runtime.JSX.Element;
|
|
1954
|
-
|
|
1955
|
-
interface CalibrationSidebarProps {
|
|
1956
|
-
currentProjectId: string | undefined;
|
|
1957
|
-
currentRunId: string | undefined;
|
|
1958
|
-
currentPath: string;
|
|
1959
|
-
onProjectClick: (projectId: string) => void;
|
|
1960
|
-
onRunClick: (runId: string) => void;
|
|
1961
|
-
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Calibration sidebar - displays projects and runs for navigation.
|
|
1964
|
-
* Uses shared CollapsibleSidebarGroup and SubshellNavItem components.
|
|
1965
|
-
*/
|
|
1966
|
-
declare function CalibrationSidebar({ currentProjectId, currentRunId, currentPath, onProjectClick, onRunClick }: CalibrationSidebarProps): react_jsx_runtime.JSX.Element;
|
|
1967
|
-
|
|
1968
656
|
type ExecutionSelectionControlProps$2 = Pick<UseExecutionPanelStateOptions, 'selectedId' | 'onSelectedIdChange'>;
|
|
1969
657
|
interface ExecutionPanelProps extends ExecutionSelectionControlProps$2 {
|
|
1970
658
|
resourceId: string;
|
|
@@ -2244,17 +932,23 @@ declare const OperationsSidebarTop: () => react_jsx_runtime.JSX.Element | null;
|
|
|
2244
932
|
declare const OperationsSidebarMiddle: () => react_jsx_runtime.JSX.Element;
|
|
2245
933
|
|
|
2246
934
|
interface CommandQueueShellProps {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
935
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
936
|
+
selectedCheckpoint?: string | undefined;
|
|
937
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
938
|
+
onSelectCheckpoint?: (checkpoint: string | undefined) => void;
|
|
939
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
940
|
+
status?: TaskFilterStatus;
|
|
941
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
942
|
+
onStatusChange?: (status: TaskFilterStatus) => void;
|
|
943
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
944
|
+
priorityRange?: [number, number];
|
|
945
|
+
/** @deprecated Sidebar is now rendered by OperationsSidebarMiddle via the FeatureShell. */
|
|
946
|
+
onPriorityRangeChange?: (range: [number, number]) => void;
|
|
2253
947
|
children: ReactNode;
|
|
2254
948
|
}
|
|
2255
|
-
declare function CommandQueueShell({
|
|
949
|
+
declare function CommandQueueShell({ children }: CommandQueueShellProps): react_jsx_runtime.JSX.Element;
|
|
2256
950
|
|
|
2257
951
|
declare const operationsManifest: FeatureModule;
|
|
2258
952
|
|
|
2259
|
-
export { AgentExecutionPanel, AgentSessionGroup,
|
|
2260
|
-
export type { AgentExecutionPanelProps, AgentSessionGroupProps,
|
|
953
|
+
export { AgentExecutionPanel, AgentSessionGroup, CommandQueueDetailPage, CommandQueuePage, CommandQueueShell, CommandViewPage, CommandViewSidebarContent, ExecuteWorkflowModal, ExecutionPanel, OperationsOverview, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationGraphPage, ResourceDetailPage, ResourceExecuteDialog, ResourceExecuteForm, ResourcesPage, ResourcesSidebar, SessionChatArea, SessionChatInterface, SessionChatPage, SessionDetailsSidebar, SessionExecutionLogs, SessionHeader, SessionListItem, SessionsPage, SessionsSidebar, WorkflowExecutionPanel, operationsManifest };
|
|
954
|
+
export type { AgentExecutionPanelProps, AgentSessionGroupProps, CommandQueueDetailPageProps, CommandQueueDetailPageRichTextArgs, CommandQueuePageProps, CommandQueueShellProps, CommandViewPageProps, CommandViewSidebarContentProps, ConversationViewSlotArgs, ExecuteWorkflowModalProps, ExecuteWorkflowModalResource, ExecutionPanelProps, OperationsOverviewProps, ResourceDetailPageProps, ResourceDetailPageRenderExecutionPanelArgs, ResourceExecuteDialogProps, ResourceExecuteFormProps, ResourcesPageProps, ResourcesSidebarProps, SessionChatAreaProps, SessionChatInterfaceProps, SessionChatPageProps, SessionDetailsSidebarProps, SessionExecutionLogsProps, SessionHeaderProps, SessionListItemProps, SessionsPageProps, SessionsSidebarProps, TaskFilterStatus, WorkflowExecutionPanelProps };
|