@elevasis/ui 2.65.0 → 2.66.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.
- package/dist/app/index.d.ts +6 -0
- package/dist/app/index.js +5 -5
- package/dist/auth/index.d.ts +12 -5
- package/dist/auth/index.js +5 -5
- package/dist/charts/index.js +5 -5
- package/dist/{chunk-ZTWA5H77.js → chunk-6ZAP3FOA.js} +0 -1
- package/dist/{chunk-3WVZRN37.js → chunk-ANNM5R7S.js} +235 -365
- package/dist/chunk-L7BZZ4SI.js +56 -0
- package/dist/chunk-P45GQ3ZW.js +104 -0
- package/dist/{chunk-EIXSQONC.js → chunk-RT4KRGZT.js} +37 -59
- package/dist/components/index.d.ts +240 -209
- package/dist/components/index.js +5 -5
- package/dist/components/navigation/index.js +5 -5
- package/dist/execution/index.d.ts +115 -104
- package/dist/features/auth/index.d.ts +39 -8
- package/dist/features/auth/index.js +14 -9
- package/dist/features/clients/index.js +5 -5
- package/dist/features/crm/index.js +5 -5
- package/dist/features/dashboard/index.js +5 -5
- package/dist/features/delivery/index.js +5 -5
- package/dist/features/knowledge/index.js +5 -5
- package/dist/features/lead-gen/index.js +5 -5
- package/dist/features/monitoring/index.js +5 -5
- package/dist/features/monitoring/requests/index.js +6 -6
- package/dist/features/notes/index.js +2 -2
- package/dist/features/operations/index.d.ts +141 -105
- package/dist/features/operations/index.js +5 -5
- package/dist/features/settings/index.d.ts +1 -0
- package/dist/features/settings/index.js +5 -5
- package/dist/hooks/access/index.js +5 -5
- package/dist/hooks/delivery/index.js +5 -5
- package/dist/hooks/index.d.ts +284 -162
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
- package/dist/hooks/published.d.ts +284 -162
- package/dist/hooks/published.js +5 -5
- package/dist/index.d.ts +374 -236
- package/dist/index.js +5 -5
- package/dist/initialization/index.d.ts +61 -28
- package/dist/initialization/index.js +3 -3
- package/dist/knowledge/index.js +9 -9
- package/dist/{knowledge-search-index-JOPRYZN6.js → knowledge-search-index-6EZNBNSR.js} +4 -4
- package/dist/layout/index.js +5 -5
- package/dist/organization/index.d.ts +49 -4
- package/dist/organization/index.js +5 -5
- package/dist/profile/index.d.ts +23 -2
- package/dist/profile/index.js +1 -1
- package/dist/provider/index.js +5 -5
- package/dist/provider/published.js +5 -5
- package/dist/types/index.d.ts +330 -271
- package/package.json +3 -3
- package/dist/chunk-LO7GWG24.js +0 -75
- package/dist/chunk-T4LA4RY2.js +0 -56
package/dist/types/index.d.ts
CHANGED
|
@@ -209,217 +209,6 @@ interface ExecutionLogMessage {
|
|
|
209
209
|
context?: LogContext;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
/**
|
|
213
|
-
* Serialized Registry Types
|
|
214
|
-
*
|
|
215
|
-
* Pre-computed JSON-safe types for API responses and Command View.
|
|
216
|
-
* Serialization happens once at API startup, enabling instant response times.
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Serialized agent definition (JSON-safe)
|
|
221
|
-
* Result of serializeDefinition(AgentDefinition)
|
|
222
|
-
*/
|
|
223
|
-
interface SerializedAgentDefinition {
|
|
224
|
-
config: {
|
|
225
|
-
resourceId: string;
|
|
226
|
-
name: string;
|
|
227
|
-
description: string;
|
|
228
|
-
version: string;
|
|
229
|
-
type: 'agent';
|
|
230
|
-
kind: 'orchestrator' | 'specialist' | 'utility' | 'system';
|
|
231
|
-
status: 'dev' | 'prod';
|
|
232
|
-
links?: ResourceLink[];
|
|
233
|
-
category?: ResourceCategory;
|
|
234
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
235
|
-
archived?: boolean;
|
|
236
|
-
systemPrompt: string;
|
|
237
|
-
constraints?: {
|
|
238
|
-
maxIterations?: number;
|
|
239
|
-
timeout?: number;
|
|
240
|
-
maxSessionMemoryKeys?: number;
|
|
241
|
-
maxMemoryTokens?: number;
|
|
242
|
-
};
|
|
243
|
-
sessionCapable?: boolean;
|
|
244
|
-
memoryPreferences?: string;
|
|
245
|
-
};
|
|
246
|
-
modelConfig: {
|
|
247
|
-
provider: string;
|
|
248
|
-
model: string;
|
|
249
|
-
apiKey: string;
|
|
250
|
-
temperature: number;
|
|
251
|
-
maxOutputTokens: number;
|
|
252
|
-
topP?: number;
|
|
253
|
-
modelOptions?: Record<string, unknown>;
|
|
254
|
-
};
|
|
255
|
-
contract: {
|
|
256
|
-
inputSchema: object;
|
|
257
|
-
outputSchema?: object;
|
|
258
|
-
};
|
|
259
|
-
tools: Array<{
|
|
260
|
-
name: string;
|
|
261
|
-
description: string;
|
|
262
|
-
inputSchema?: object;
|
|
263
|
-
outputSchema?: object;
|
|
264
|
-
}>;
|
|
265
|
-
knowledgeMap?: {
|
|
266
|
-
nodeCount: number;
|
|
267
|
-
nodes: Array<{
|
|
268
|
-
id: string;
|
|
269
|
-
description: string;
|
|
270
|
-
loaded: boolean;
|
|
271
|
-
hasPrompt: boolean;
|
|
272
|
-
}>;
|
|
273
|
-
};
|
|
274
|
-
metricsConfig?: object;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Serialized workflow definition (JSON-safe)
|
|
278
|
-
* Result of serializeDefinition(WorkflowDefinition)
|
|
279
|
-
*/
|
|
280
|
-
interface SerializedWorkflowDefinition {
|
|
281
|
-
config: {
|
|
282
|
-
resourceId: string;
|
|
283
|
-
name: string;
|
|
284
|
-
description: string;
|
|
285
|
-
version: string;
|
|
286
|
-
type: 'workflow';
|
|
287
|
-
status: 'dev' | 'prod';
|
|
288
|
-
links?: ResourceLink[];
|
|
289
|
-
category?: ResourceCategory;
|
|
290
|
-
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
291
|
-
archived?: boolean;
|
|
292
|
-
};
|
|
293
|
-
entryPoint: string;
|
|
294
|
-
steps: Array<{
|
|
295
|
-
id: string;
|
|
296
|
-
name: string;
|
|
297
|
-
description: string;
|
|
298
|
-
inputSchema?: object;
|
|
299
|
-
outputSchema?: object;
|
|
300
|
-
next: {
|
|
301
|
-
type: 'linear' | 'conditional';
|
|
302
|
-
target?: string;
|
|
303
|
-
routes?: Array<{
|
|
304
|
-
target: string;
|
|
305
|
-
}>;
|
|
306
|
-
default?: string;
|
|
307
|
-
} | null;
|
|
308
|
-
}>;
|
|
309
|
-
contract: {
|
|
310
|
-
inputSchema: object;
|
|
311
|
-
outputSchema?: object;
|
|
312
|
-
};
|
|
313
|
-
metricsConfig?: object;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Model Configuration
|
|
318
|
-
* Centralized model information, configuration, options, constraints, and validation
|
|
319
|
-
* Single source of truth for all model-related definitions
|
|
320
|
-
* Update manually when pricing changes or new models are added
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Supported Open AI models (direct SDK access)
|
|
325
|
-
*/
|
|
326
|
-
type OpenAIModel = 'gpt-5' | 'gpt-5.4-mini' | 'gpt-5.4-nano';
|
|
327
|
-
/**
|
|
328
|
-
* Supported OpenRouter models (explicit union for type safety)
|
|
329
|
-
*/
|
|
330
|
-
type OpenRouterModel = 'openrouter/z-ai/glm-5';
|
|
331
|
-
/**
|
|
332
|
-
* Supported Google models (direct SDK access)
|
|
333
|
-
*/
|
|
334
|
-
type GoogleModel = 'gemini-3-flash-preview' | 'gemini-3.1-flash-lite-preview';
|
|
335
|
-
/**
|
|
336
|
-
* Supported Anthropic models (direct SDK access via @anthropic-ai/sdk)
|
|
337
|
-
*/
|
|
338
|
-
type AnthropicModel = 'claude-opus-5' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5';
|
|
339
|
-
/** Supported LLM models */
|
|
340
|
-
type LLMModel = OpenAIModel | OpenRouterModel | GoogleModel | AnthropicModel | 'mock';
|
|
341
|
-
/**
|
|
342
|
-
* GPT-5 model options schema
|
|
343
|
-
*/
|
|
344
|
-
declare const GPT5OptionsSchema: z.ZodObject<{
|
|
345
|
-
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
346
|
-
minimal: "minimal";
|
|
347
|
-
low: "low";
|
|
348
|
-
medium: "medium";
|
|
349
|
-
high: "high";
|
|
350
|
-
}>>;
|
|
351
|
-
verbosity: z.ZodOptional<z.ZodEnum<{
|
|
352
|
-
low: "low";
|
|
353
|
-
medium: "medium";
|
|
354
|
-
high: "high";
|
|
355
|
-
}>>;
|
|
356
|
-
}, z.core.$strip>;
|
|
357
|
-
/**
|
|
358
|
-
* OpenRouter model options schema
|
|
359
|
-
* OpenRouter-specific options for routing and transforms
|
|
360
|
-
*/
|
|
361
|
-
declare const OpenRouterOptionsSchema: z.ZodObject<{
|
|
362
|
-
transforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
363
|
-
route: z.ZodOptional<z.ZodEnum<{
|
|
364
|
-
fallback: "fallback";
|
|
365
|
-
}>>;
|
|
366
|
-
}, z.core.$strip>;
|
|
367
|
-
/**
|
|
368
|
-
* Google model options schema
|
|
369
|
-
* Gemini 3 specific options for thinking depth control
|
|
370
|
-
*/
|
|
371
|
-
declare const GoogleOptionsSchema: z.ZodObject<{
|
|
372
|
-
thinkingLevel: z.ZodOptional<z.ZodEnum<{
|
|
373
|
-
minimal: "minimal";
|
|
374
|
-
low: "low";
|
|
375
|
-
medium: "medium";
|
|
376
|
-
high: "high";
|
|
377
|
-
}>>;
|
|
378
|
-
}, z.core.$strip>;
|
|
379
|
-
/**
|
|
380
|
-
* Anthropic model options schema
|
|
381
|
-
* Currently empty - future options must be added per supported model family
|
|
382
|
-
*/
|
|
383
|
-
declare const AnthropicOptionsSchema: z.ZodObject<{}, z.core.$strict>;
|
|
384
|
-
/**
|
|
385
|
-
* Infer TypeScript types from schemas
|
|
386
|
-
*/
|
|
387
|
-
type GPT5Options = z.infer<typeof GPT5OptionsSchema>;
|
|
388
|
-
type MockOptions = Record<string, never>;
|
|
389
|
-
type OpenRouterOptions = z.infer<typeof OpenRouterOptionsSchema>;
|
|
390
|
-
type GoogleOptions = z.infer<typeof GoogleOptionsSchema>;
|
|
391
|
-
type AnthropicOptions = z.infer<typeof AnthropicOptionsSchema>;
|
|
392
|
-
type ModelSpecificOptions = GPT5Options | MockOptions | OpenRouterOptions | GoogleOptions | AnthropicOptions;
|
|
393
|
-
/**
|
|
394
|
-
* Model configuration for LLM execution
|
|
395
|
-
* Belongs in resource definition (AgentDefinition, WorkflowDefinition, etc.)
|
|
396
|
-
*/
|
|
397
|
-
interface ModelConfig {
|
|
398
|
-
model: LLMModel;
|
|
399
|
-
provider: 'openai' | 'anthropic' | 'openrouter' | 'google' | 'mock';
|
|
400
|
-
apiKey: string;
|
|
401
|
-
temperature?: number;
|
|
402
|
-
/** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
|
|
403
|
-
maxOutputTokens?: number;
|
|
404
|
-
topP?: number;
|
|
405
|
-
/**
|
|
406
|
-
* Model-specific options (flat structure)
|
|
407
|
-
* Options are model-specific, not vendor-specific
|
|
408
|
-
* Available options defined in MODEL_INFO per model
|
|
409
|
-
* Validated at build time via validateModelOptions()
|
|
410
|
-
*/
|
|
411
|
-
modelOptions?: ModelSpecificOptions;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* What happened to `strict` on a request, recorded per call rather than inferred.
|
|
416
|
-
*
|
|
417
|
-
* `applied` and `notAttempted` are the two states that a refusal-only field cannot tell apart —
|
|
418
|
-
* both leave `strictRefusalReasons` empty. Recording the verdict positively is what makes "was
|
|
419
|
-
* this agent's output actually enforced?" answerable from an `ai_calls` row.
|
|
420
|
-
*/
|
|
421
|
-
type StrictStatus = 'applied' | 'refused' | 'compileRejected' | 'notAttempted';
|
|
422
|
-
|
|
423
212
|
declare const ResourceGovernanceStatusSchema: z.ZodEnum<{
|
|
424
213
|
active: "active";
|
|
425
214
|
deprecated: "deprecated";
|
|
@@ -646,6 +435,184 @@ declare const ResourceEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
646
435
|
type ResourceGovernanceStatus = z.infer<typeof ResourceGovernanceStatusSchema>;
|
|
647
436
|
type ResourceEntry = z.infer<typeof ResourceEntrySchema>;
|
|
648
437
|
|
|
438
|
+
/**
|
|
439
|
+
* Memory type definitions
|
|
440
|
+
* Types for agent memory management with semantic entry types
|
|
441
|
+
*/
|
|
442
|
+
/**
|
|
443
|
+
* Semantic memory entry types
|
|
444
|
+
* Use-case agnostic types that describe the purpose of each entry
|
|
445
|
+
* Memory types mirror action types for clarity and filtering
|
|
446
|
+
*/
|
|
447
|
+
type MemoryEntryType = 'context' | 'input' | 'reasoning' | 'tool-result' | 'error';
|
|
448
|
+
/**
|
|
449
|
+
* Who authored an entry's content.
|
|
450
|
+
*
|
|
451
|
+
* This is what lets the assembled prompt tell framework-authored text apart from text that
|
|
452
|
+
* originated outside the trust boundary. `'framework'` content is ours; the other three are not
|
|
453
|
+
* and are rendered inside the JSON data envelope (see `MemoryManager.toContextParts`).
|
|
454
|
+
*/
|
|
455
|
+
type MemoryEntrySource = 'framework' | 'user' | 'tool' | 'model';
|
|
456
|
+
/**
|
|
457
|
+
* Memory entry - represents a single entry in agent memory
|
|
458
|
+
* Stored in agent memory, translated by adapters to vendor-specific formats
|
|
459
|
+
*/
|
|
460
|
+
interface MemoryEntry {
|
|
461
|
+
type: MemoryEntryType;
|
|
462
|
+
content: string;
|
|
463
|
+
timestamp: number;
|
|
464
|
+
turnNumber: number | null;
|
|
465
|
+
iterationNumber: number | null;
|
|
466
|
+
/**
|
|
467
|
+
* Provenance. **Optional on purpose** — `undefined` means unknown, which is what every
|
|
468
|
+
* pre-existing snapshot and every not-yet-redeployed tenant bundle produces. Read sites MUST
|
|
469
|
+
* test `== null`, never `=== undefined`: the `inTurnScope` predicate in `manager.ts` is the
|
|
470
|
+
* cautionary precedent, where a `=== undefined` check silently dropped every `null`-stamped
|
|
471
|
+
* entry. `isMemoryEntry` is deliberately NOT tightened to require this field; doing so would
|
|
472
|
+
* make every stored snapshot fail validation, and `restoreSessionMemory` fails open by
|
|
473
|
+
* starting the agent with empty memory rather than throwing.
|
|
474
|
+
*/
|
|
475
|
+
source?: MemoryEntrySource;
|
|
476
|
+
/**
|
|
477
|
+
* Which tool produced this entry. Set on `tool-result` entries so the model can tell N parallel
|
|
478
|
+
* results apart -- the framework instructs batching independent tool calls in one iteration, and
|
|
479
|
+
* an anonymous result is unattributable the moment two land in the same iteration. `addToolError`
|
|
480
|
+
* already carries this (folded into its `content` JSON); this is the same fact for the success
|
|
481
|
+
* path, carried as a real field instead of prose the caller has to parse back out.
|
|
482
|
+
*/
|
|
483
|
+
toolName?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Present when `truncateContent` cut this entry's `content` to fit its token budget. A sibling
|
|
486
|
+
* field, never text appended into `content` -- the notice used to be spliced into the string
|
|
487
|
+
* itself, which could (and did) land inside a JSON string literal `truncateContent` had just cut
|
|
488
|
+
* open, breaking `JSON.parse` on the far end. Absent means never truncated.
|
|
489
|
+
*/
|
|
490
|
+
truncated?: {
|
|
491
|
+
omittedTokens: number;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* Prompt-injection warning types found in `content`, screened once here -- when the entry is
|
|
495
|
+
* written -- instead of by re-scanning the whole accumulated envelope on every iteration it gets
|
|
496
|
+
* re-sent for (`screenRequest`'s `data-envelope` slot used to do exactly that). Empty array means
|
|
497
|
+
* screened and clean; `undefined` means never screened (entries that bypass `addToHistory`/`set`,
|
|
498
|
+
* or pre-existing snapshots from before this field existed).
|
|
499
|
+
*/
|
|
500
|
+
warnings?: string[];
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Agent memory - Self-orchestrated memory with session + working storage
|
|
504
|
+
* Agent has full control over what persists, framework handles auto-compaction
|
|
505
|
+
*/
|
|
506
|
+
interface AgentMemory {
|
|
507
|
+
/**
|
|
508
|
+
* Session memory - Persists for session/conversation duration
|
|
509
|
+
* Never auto-trimmed by framework
|
|
510
|
+
* Agent-managed key-value store for critical information
|
|
511
|
+
* Agent provides strings, framework wraps in MemoryEntry
|
|
512
|
+
*/
|
|
513
|
+
sessionMemory: Record<string, MemoryEntry>;
|
|
514
|
+
/**
|
|
515
|
+
* Working memory - Execution history
|
|
516
|
+
* Automatically compacted by framework when needed
|
|
517
|
+
* Agent doesn't control compaction
|
|
518
|
+
*/
|
|
519
|
+
history: MemoryEntry[];
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Types for the schema compiler. `compile.ts` walks a `JsonSchema` once, driven entirely by a
|
|
524
|
+
* `ProviderDialect`, and every server adapter compiles through it.
|
|
525
|
+
*/
|
|
526
|
+
/**
|
|
527
|
+
* What happened to `strict` on a request, recorded per call rather than inferred.
|
|
528
|
+
*
|
|
529
|
+
* `applied` and `notAttempted` are the two states that a refusal-only field cannot tell apart --
|
|
530
|
+
* both leave `strictRefusalReasons` empty. Recording the verdict positively is what makes "was
|
|
531
|
+
* this agent's output actually enforced?" answerable from an `ai_calls` row.
|
|
532
|
+
*/
|
|
533
|
+
type StrictStatus = 'applied' | 'refused' | 'compileRejected' | 'notAttempted';
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Model Configuration
|
|
537
|
+
* Centralized model information, configuration, options, constraints, and validation
|
|
538
|
+
* Single source of truth for all model-related definitions
|
|
539
|
+
* Update manually when pricing changes or new models are added
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* Supported Open AI models (direct SDK access)
|
|
544
|
+
*/
|
|
545
|
+
type OpenAIModel = 'gpt-5' | 'gpt-5.4-mini' | 'gpt-5.4-nano';
|
|
546
|
+
/**
|
|
547
|
+
* Supported OpenRouter models (explicit union for type safety)
|
|
548
|
+
*/
|
|
549
|
+
type OpenRouterModel = 'openrouter/z-ai/glm-5';
|
|
550
|
+
/**
|
|
551
|
+
* Supported Anthropic models (direct SDK access via @anthropic-ai/sdk)
|
|
552
|
+
*/
|
|
553
|
+
type AnthropicModel = 'claude-opus-5' | 'claude-sonnet-5' | 'claude-haiku-4-5-20251001' | 'claude-haiku-4-5';
|
|
554
|
+
/** Supported LLM models */
|
|
555
|
+
type LLMModel = OpenAIModel | OpenRouterModel | AnthropicModel | 'mock';
|
|
556
|
+
/**
|
|
557
|
+
* GPT-5 model options schema
|
|
558
|
+
*/
|
|
559
|
+
declare const GPT5OptionsSchema: z.ZodObject<{
|
|
560
|
+
reasoning_effort: z.ZodOptional<z.ZodEnum<{
|
|
561
|
+
minimal: "minimal";
|
|
562
|
+
low: "low";
|
|
563
|
+
medium: "medium";
|
|
564
|
+
high: "high";
|
|
565
|
+
}>>;
|
|
566
|
+
verbosity: z.ZodOptional<z.ZodEnum<{
|
|
567
|
+
low: "low";
|
|
568
|
+
medium: "medium";
|
|
569
|
+
high: "high";
|
|
570
|
+
}>>;
|
|
571
|
+
}, z.core.$strip>;
|
|
572
|
+
/**
|
|
573
|
+
* OpenRouter model options schema
|
|
574
|
+
* OpenRouter-specific options for routing and transforms
|
|
575
|
+
*/
|
|
576
|
+
declare const OpenRouterOptionsSchema: z.ZodObject<{
|
|
577
|
+
transforms: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
578
|
+
route: z.ZodOptional<z.ZodEnum<{
|
|
579
|
+
fallback: "fallback";
|
|
580
|
+
}>>;
|
|
581
|
+
}, z.core.$strip>;
|
|
582
|
+
/**
|
|
583
|
+
* Anthropic model options schema
|
|
584
|
+
* Currently empty - future options must be added per supported model family
|
|
585
|
+
*/
|
|
586
|
+
declare const AnthropicOptionsSchema: z.ZodObject<{}, z.core.$strict>;
|
|
587
|
+
/**
|
|
588
|
+
* Infer TypeScript types from schemas
|
|
589
|
+
*/
|
|
590
|
+
type GPT5Options = z.infer<typeof GPT5OptionsSchema>;
|
|
591
|
+
type MockOptions = Record<string, never>;
|
|
592
|
+
type OpenRouterOptions = z.infer<typeof OpenRouterOptionsSchema>;
|
|
593
|
+
type AnthropicOptions = z.infer<typeof AnthropicOptionsSchema>;
|
|
594
|
+
type ModelSpecificOptions = GPT5Options | MockOptions | OpenRouterOptions | AnthropicOptions;
|
|
595
|
+
/**
|
|
596
|
+
* Model configuration for LLM execution
|
|
597
|
+
* Belongs in resource definition (AgentDefinition, WorkflowDefinition, etc.)
|
|
598
|
+
*/
|
|
599
|
+
interface ModelConfig {
|
|
600
|
+
model: LLMModel;
|
|
601
|
+
provider: 'openai' | 'anthropic' | 'openrouter' | 'mock';
|
|
602
|
+
apiKey: string;
|
|
603
|
+
temperature?: number;
|
|
604
|
+
/** Maximum output tokens per LLM call. NOT the model's context window — see ModelInfo.maxTokens for that. */
|
|
605
|
+
maxOutputTokens?: number;
|
|
606
|
+
topP?: number;
|
|
607
|
+
/**
|
|
608
|
+
* Model-specific options (flat structure)
|
|
609
|
+
* Options are model-specific, not vendor-specific
|
|
610
|
+
* Available options defined in MODEL_INFO per model
|
|
611
|
+
* Validated at build time via validateModelOptions()
|
|
612
|
+
*/
|
|
613
|
+
modelOptions?: ModelSpecificOptions;
|
|
614
|
+
}
|
|
615
|
+
|
|
649
616
|
/**
|
|
650
617
|
* Shared form field types for dynamic form generation
|
|
651
618
|
* Used by: Command Queue, Execution Runner UI, future form-based features
|
|
@@ -722,65 +689,6 @@ interface WorkflowNodeVisualizerData {
|
|
|
722
689
|
isRunning: boolean;
|
|
723
690
|
}
|
|
724
691
|
|
|
725
|
-
/**
|
|
726
|
-
* Memory type definitions
|
|
727
|
-
* Types for agent memory management with semantic entry types
|
|
728
|
-
*/
|
|
729
|
-
/**
|
|
730
|
-
* Semantic memory entry types
|
|
731
|
-
* Use-case agnostic types that describe the purpose of each entry
|
|
732
|
-
* Memory types mirror action types for clarity and filtering
|
|
733
|
-
*/
|
|
734
|
-
type MemoryEntryType = 'context' | 'input' | 'reasoning' | 'tool-result' | 'delegation-result' | 'error';
|
|
735
|
-
/**
|
|
736
|
-
* Who authored an entry's content.
|
|
737
|
-
*
|
|
738
|
-
* This is what lets the assembled prompt tell framework-authored text apart from text that
|
|
739
|
-
* originated outside the trust boundary. `'framework'` content is ours; the other three are not
|
|
740
|
-
* and are rendered inside the JSON data envelope (see `MemoryManager.toContextParts`).
|
|
741
|
-
*/
|
|
742
|
-
type MemoryEntrySource = 'framework' | 'user' | 'tool' | 'model';
|
|
743
|
-
/**
|
|
744
|
-
* Memory entry - represents a single entry in agent memory
|
|
745
|
-
* Stored in agent memory, translated by adapters to vendor-specific formats
|
|
746
|
-
*/
|
|
747
|
-
interface MemoryEntry {
|
|
748
|
-
type: MemoryEntryType;
|
|
749
|
-
content: string;
|
|
750
|
-
timestamp: number;
|
|
751
|
-
turnNumber: number | null;
|
|
752
|
-
iterationNumber: number | null;
|
|
753
|
-
/**
|
|
754
|
-
* Provenance. **Optional on purpose** — `undefined` means unknown, which is what every
|
|
755
|
-
* pre-existing snapshot and every not-yet-redeployed tenant bundle produces. Read sites MUST
|
|
756
|
-
* test `== null`, never `=== undefined`: the `inTurnScope` predicate in `manager.ts` is the
|
|
757
|
-
* cautionary precedent, where a `=== undefined` check silently dropped every `null`-stamped
|
|
758
|
-
* entry. `isMemoryEntry` is deliberately NOT tightened to require this field; doing so would
|
|
759
|
-
* make every stored snapshot fail validation, and `restoreSessionMemory` fails open by
|
|
760
|
-
* starting the agent with empty memory rather than throwing.
|
|
761
|
-
*/
|
|
762
|
-
source?: MemoryEntrySource;
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
* Agent memory - Self-orchestrated memory with session + working storage
|
|
766
|
-
* Agent has full control over what persists, framework handles auto-compaction
|
|
767
|
-
*/
|
|
768
|
-
interface AgentMemory {
|
|
769
|
-
/**
|
|
770
|
-
* Session memory - Persists for session/conversation duration
|
|
771
|
-
* Never auto-trimmed by framework
|
|
772
|
-
* Agent-managed key-value store for critical information
|
|
773
|
-
* Agent provides strings, framework wraps in MemoryEntry
|
|
774
|
-
*/
|
|
775
|
-
sessionMemory: Record<string, MemoryEntry>;
|
|
776
|
-
/**
|
|
777
|
-
* Working memory - Execution history
|
|
778
|
-
* Automatically compacted by framework when needed
|
|
779
|
-
* Agent doesn't control compaction
|
|
780
|
-
*/
|
|
781
|
-
history: MemoryEntry[];
|
|
782
|
-
}
|
|
783
|
-
|
|
784
692
|
/**
|
|
785
693
|
* Agent timeline and observability types
|
|
786
694
|
* Used for UI timeline visualization and backend processing
|
|
@@ -4685,6 +4593,20 @@ interface ListMembershipsParams {
|
|
|
4685
4593
|
type MembershipProvisioningState = 'linked' | 'pre_provisioned' | 'workos_only';
|
|
4686
4594
|
/**
|
|
4687
4595
|
* Extended membership with user and organization details for UI
|
|
4596
|
+
*
|
|
4597
|
+
* **ID convention (step 17 of the auth/invitations architecture refactor):**
|
|
4598
|
+
* `id`, `userId`, and `organizationId` are the canonical Supabase UUIDs
|
|
4599
|
+
* (`org_memberships.id` / `users.id` / `organizations.id`) on every producer
|
|
4600
|
+
* of this type. `workosMembershipId` / `workosUserId` /
|
|
4601
|
+
* `organization.workos_org_id` carry the WorkOS-side forms explicitly instead
|
|
4602
|
+
* -- the contract does not overload the canonical fields with either form.
|
|
4603
|
+
*
|
|
4604
|
+
* The one exception: a `workos_only` row (a WorkOS membership with no
|
|
4605
|
+
* `org_memberships` row -- a sync gap) has no canonical membership UUID to
|
|
4606
|
+
* report, because no such row exists. `id` stays the WorkOS `om_...` form for
|
|
4607
|
+
* that `provisioningState` alone; `userId` / `organizationId` are still
|
|
4608
|
+
* resolved to their Supabase forms where the user/organization themselves
|
|
4609
|
+
* exist.
|
|
4688
4610
|
*/
|
|
4689
4611
|
interface MembershipWithDetails extends OrganizationMembership {
|
|
4690
4612
|
/**
|
|
@@ -4692,6 +4614,18 @@ interface MembershipWithDetails extends OrganizationMembership {
|
|
|
4692
4614
|
* treat `undefined` as "not reported by this endpoint".
|
|
4693
4615
|
*/
|
|
4694
4616
|
provisioningState?: MembershipProvisioningState;
|
|
4617
|
+
/**
|
|
4618
|
+
* WorkOS `om_...` form of `id`. `null` when the membership is
|
|
4619
|
+
* pre-provisioned (invited, signup not completed -- no WorkOS record yet).
|
|
4620
|
+
* Explicit companion to the canonical `id`; see the type-level doc comment.
|
|
4621
|
+
*/
|
|
4622
|
+
workosMembershipId?: string | null;
|
|
4623
|
+
/**
|
|
4624
|
+
* WorkOS `user_...` form of `userId`. `null` when the member has not
|
|
4625
|
+
* completed WorkOS signup yet. Explicit companion to the canonical
|
|
4626
|
+
* `userId`; see the type-level doc comment.
|
|
4627
|
+
*/
|
|
4628
|
+
workosUserId?: string | null;
|
|
4695
4629
|
user?: {
|
|
4696
4630
|
id: string;
|
|
4697
4631
|
email: string;
|
|
@@ -4767,6 +4701,17 @@ interface BaseAICall {
|
|
|
4767
4701
|
costUsd: number;
|
|
4768
4702
|
latencyMs: number;
|
|
4769
4703
|
context?: AICallContext;
|
|
4704
|
+
/**
|
|
4705
|
+
* Anthropic-only: input tokens served from the prompt cache this call (`cache_read_input_tokens`),
|
|
4706
|
+
* billed at 0.1x the base input rate. Already folded into `inputTokens`/`totalInputTokens` so
|
|
4707
|
+
* aggregate totals reflect real usage -- present here as the raw breakdown, not additive on top.
|
|
4708
|
+
*/
|
|
4709
|
+
cacheReadInputTokens?: number;
|
|
4710
|
+
/**
|
|
4711
|
+
* Anthropic-only: input tokens written to the prompt cache this call (`cache_creation_input_tokens`),
|
|
4712
|
+
* billed at 1.25x the base input rate. Same folding rationale as `cacheReadInputTokens`.
|
|
4713
|
+
*/
|
|
4714
|
+
cacheCreationInputTokens?: number;
|
|
4770
4715
|
/**
|
|
4771
4716
|
* Distinct prompt-injection pattern types detected in the request's user-role messages.
|
|
4772
4717
|
* Present only when the input sanitizer matched something. Non-blocking matches ride along on
|
|
@@ -5173,6 +5118,121 @@ interface CostByModelResponse {
|
|
|
5173
5118
|
totalCallCount: number;
|
|
5174
5119
|
}
|
|
5175
5120
|
|
|
5121
|
+
/**
|
|
5122
|
+
* Agent-specific type definitions
|
|
5123
|
+
* Types for autonomous agents with tools, memory, and constraints
|
|
5124
|
+
*/
|
|
5125
|
+
|
|
5126
|
+
type AgentKind = 'orchestrator' | 'specialist' | 'utility' | 'platform';
|
|
5127
|
+
|
|
5128
|
+
/**
|
|
5129
|
+
* Serialized Registry Types
|
|
5130
|
+
*
|
|
5131
|
+
* Pre-computed JSON-safe types for API responses and Command View.
|
|
5132
|
+
* Serialization happens once at API startup, enabling instant response times.
|
|
5133
|
+
*/
|
|
5134
|
+
|
|
5135
|
+
/**
|
|
5136
|
+
* Serialized agent definition (JSON-safe)
|
|
5137
|
+
* Result of serializeDefinition(AgentDefinition)
|
|
5138
|
+
*/
|
|
5139
|
+
interface SerializedAgentDefinition {
|
|
5140
|
+
config: {
|
|
5141
|
+
resourceId: string;
|
|
5142
|
+
name: string;
|
|
5143
|
+
description: string;
|
|
5144
|
+
version: string;
|
|
5145
|
+
type: 'agent';
|
|
5146
|
+
/**
|
|
5147
|
+
* Imported from the runtime type instead of hand-copied. It used to be a hand-written literal
|
|
5148
|
+
* union that said `'system'` where `AgentKind`'s fourth member is `'platform'` -- undetected
|
|
5149
|
+
* because `serializeDefinition` returns `any` and every call site casts the result to this
|
|
5150
|
+
* interface, so the literal union was never actually checked against real data. Deriving from
|
|
5151
|
+
* the source of truth makes that class of drift a type error instead of a silent typo.
|
|
5152
|
+
*/
|
|
5153
|
+
kind: AgentKind;
|
|
5154
|
+
status: 'dev' | 'prod';
|
|
5155
|
+
links?: ResourceLink[];
|
|
5156
|
+
category?: ResourceCategory;
|
|
5157
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
5158
|
+
archived?: boolean;
|
|
5159
|
+
systemPrompt: string;
|
|
5160
|
+
constraints?: {
|
|
5161
|
+
maxIterations?: number;
|
|
5162
|
+
timeout?: number;
|
|
5163
|
+
maxSessionMemoryKeys?: number;
|
|
5164
|
+
maxMemoryTokens?: number;
|
|
5165
|
+
};
|
|
5166
|
+
sessionCapable?: boolean;
|
|
5167
|
+
memoryPreferences?: string;
|
|
5168
|
+
};
|
|
5169
|
+
modelConfig: {
|
|
5170
|
+
provider: string;
|
|
5171
|
+
model: string;
|
|
5172
|
+
apiKey: string;
|
|
5173
|
+
/**
|
|
5174
|
+
* Optional here, matching `ModelConfig` -- this used to be required even though neither real
|
|
5175
|
+
* agent literal in the monorepo (`local-test-agent`, the `createPlatformToolAgent` test fixture)
|
|
5176
|
+
* sets it, and nothing caught the mismatch for the same `serializeDefinition`-returns-`any`
|
|
5177
|
+
* reason `kind` drifted above.
|
|
5178
|
+
*/
|
|
5179
|
+
temperature?: number;
|
|
5180
|
+
maxOutputTokens?: number;
|
|
5181
|
+
topP?: number;
|
|
5182
|
+
modelOptions?: Record<string, unknown>;
|
|
5183
|
+
};
|
|
5184
|
+
contract: {
|
|
5185
|
+
inputSchema: object;
|
|
5186
|
+
outputSchema?: object;
|
|
5187
|
+
};
|
|
5188
|
+
tools: Array<{
|
|
5189
|
+
name: string;
|
|
5190
|
+
description: string;
|
|
5191
|
+
inputSchema?: object;
|
|
5192
|
+
outputSchema?: object;
|
|
5193
|
+
}>;
|
|
5194
|
+
metricsConfig?: object;
|
|
5195
|
+
}
|
|
5196
|
+
/**
|
|
5197
|
+
* Serialized workflow definition (JSON-safe)
|
|
5198
|
+
* Result of serializeDefinition(WorkflowDefinition)
|
|
5199
|
+
*/
|
|
5200
|
+
interface SerializedWorkflowDefinition {
|
|
5201
|
+
config: {
|
|
5202
|
+
resourceId: string;
|
|
5203
|
+
name: string;
|
|
5204
|
+
description: string;
|
|
5205
|
+
version: string;
|
|
5206
|
+
type: 'workflow';
|
|
5207
|
+
status: 'dev' | 'prod';
|
|
5208
|
+
links?: ResourceLink[];
|
|
5209
|
+
category?: ResourceCategory;
|
|
5210
|
+
/** Whether this resource is archived and should be excluded from registration and deployment */
|
|
5211
|
+
archived?: boolean;
|
|
5212
|
+
};
|
|
5213
|
+
entryPoint: string;
|
|
5214
|
+
steps: Array<{
|
|
5215
|
+
id: string;
|
|
5216
|
+
name: string;
|
|
5217
|
+
description: string;
|
|
5218
|
+
inputSchema?: object;
|
|
5219
|
+
outputSchema?: object;
|
|
5220
|
+
next: {
|
|
5221
|
+
type: 'linear' | 'conditional';
|
|
5222
|
+
target?: string;
|
|
5223
|
+
routes?: Array<{
|
|
5224
|
+
target: string;
|
|
5225
|
+
}>;
|
|
5226
|
+
default?: string;
|
|
5227
|
+
} | null;
|
|
5228
|
+
}>;
|
|
5229
|
+
contract: {
|
|
5230
|
+
inputSchema: object;
|
|
5231
|
+
outputSchema?: object;
|
|
5232
|
+
};
|
|
5233
|
+
metricsConfig?: object;
|
|
5234
|
+
}
|
|
5235
|
+
|
|
5176
5236
|
/**
|
|
5177
5237
|
* Base Execution Engine type definitions
|
|
5178
5238
|
* Core types shared across all Execution Engine resources
|
|
@@ -5525,7 +5585,6 @@ interface CommandViewAgent extends ResourceDefinition {
|
|
|
5525
5585
|
modelProvider: string;
|
|
5526
5586
|
modelId: string;
|
|
5527
5587
|
toolCount: number;
|
|
5528
|
-
hasKnowledgeMap: boolean;
|
|
5529
5588
|
hasMemory: boolean;
|
|
5530
5589
|
sessionCapable: boolean;
|
|
5531
5590
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.66.0",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -276,10 +276,10 @@
|
|
|
276
276
|
"typescript": "5.9.2",
|
|
277
277
|
"vite": "^7.0.0",
|
|
278
278
|
"vitest": "^3.2.4",
|
|
279
|
-
"@repo/core": "0.
|
|
280
|
-
"@elevasis/sdk": "1.42.0",
|
|
279
|
+
"@repo/core": "0.59.0",
|
|
281
280
|
"@repo/elevasis-core": "1.0.0",
|
|
282
281
|
"@repo/typescript-config": "0.0.0",
|
|
282
|
+
"@elevasis/sdk": "1.44.0",
|
|
283
283
|
"@repo/eslint-config": "0.0.0"
|
|
284
284
|
},
|
|
285
285
|
"dependencies": {
|