@runtypelabs/persona 4.10.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/animations/glyph-cycle.d.cts +1 -1
  2. package/dist/animations/glyph-cycle.d.ts +1 -1
  3. package/dist/animations/{types-4ROVJ1gA.d.cts → types-DveIaNx6.d.cts} +11 -316
  4. package/dist/animations/{types-4ROVJ1gA.d.ts → types-DveIaNx6.d.ts} +11 -316
  5. package/dist/animations/wipe.d.cts +1 -1
  6. package/dist/animations/wipe.d.ts +1 -1
  7. package/dist/chunk-MMUPR2JW.js +1 -0
  8. package/dist/codegen.cjs +1 -1
  9. package/dist/codegen.js +1 -1
  10. package/dist/{context-mentions-7S5KVUTG.js → context-mentions-ONG7A7M6.js} +1 -1
  11. package/dist/context-mentions.d.cts +35 -316
  12. package/dist/context-mentions.d.ts +35 -316
  13. package/dist/index.cjs +67 -67
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +40 -317
  16. package/dist/index.d.ts +40 -317
  17. package/dist/index.global.js +55 -55
  18. package/dist/index.global.js.map +1 -1
  19. package/dist/index.js +78 -78
  20. package/dist/index.js.map +1 -1
  21. package/dist/smart-dom-reader.d.cts +35 -316
  22. package/dist/smart-dom-reader.d.ts +35 -316
  23. package/dist/theme-editor-preview.cjs +66 -66
  24. package/dist/theme-editor-preview.d.cts +35 -316
  25. package/dist/theme-editor-preview.d.ts +35 -316
  26. package/dist/theme-editor-preview.js +55 -55
  27. package/dist/theme-editor.cjs +5 -5
  28. package/dist/theme-editor.d.cts +35 -316
  29. package/dist/theme-editor.d.ts +35 -316
  30. package/dist/theme-editor.js +9 -9
  31. package/dist/widget.css +1 -1
  32. package/package.json +1 -1
  33. package/src/components/approval-bubble.ts +0 -1
  34. package/src/components/composer-parts.ts +19 -19
  35. package/src/components/context-mention-button.test.ts +5 -1
  36. package/src/components/context-mention-button.ts +6 -4
  37. package/src/components/header-builder.test.ts +3 -3
  38. package/src/components/header-parts.ts +14 -108
  39. package/src/components/message-bubble.test.ts +49 -0
  40. package/src/components/message-bubble.ts +8 -7
  41. package/src/components/reasoning-bubble.ts +0 -2
  42. package/src/components/tool-bubble.ts +0 -2
  43. package/src/generated/runtype-openapi-contract.ts +11 -317
  44. package/src/index-core.ts +7 -1
  45. package/src/runtime/host-layout.test.ts +94 -0
  46. package/src/runtime/host-layout.ts +9 -1
  47. package/src/runtime/init.test.ts +33 -0
  48. package/src/runtime/init.ts +4 -0
  49. package/src/styles/widget.css +118 -58
  50. package/src/theme-editor/sections.test.ts +33 -0
  51. package/src/theme-editor/sections.ts +10 -1
  52. package/src/types.ts +25 -0
  53. package/src/ui.attachments-drop.test.ts +2 -1
  54. package/src/ui.message-width.test.ts +407 -0
  55. package/src/ui.mount-fill-min-width.test.ts +81 -0
  56. package/src/ui.ts +158 -238
  57. package/src/utils/table-scroll-fade.test.ts +123 -0
  58. package/src/utils/table-scroll-fade.ts +75 -0
  59. package/src/utils/tooltip.test.ts +226 -0
  60. package/src/utils/tooltip.ts +245 -0
  61. package/dist/chunk-IPVK3KOM.js +0 -1
@@ -1,4 +1,4 @@
1
- import { S as StreamAnimationPlugin } from './types-4ROVJ1gA.cjs';
1
+ import { S as StreamAnimationPlugin } from './types-DveIaNx6.cjs';
2
2
 
3
3
  declare const glyphCycle: StreamAnimationPlugin;
4
4
 
@@ -1,4 +1,4 @@
1
- import { S as StreamAnimationPlugin } from './types-4ROVJ1gA.js';
1
+ import { S as StreamAnimationPlugin } from './types-DveIaNx6.js';
2
2
 
3
3
  declare const glyphCycle: StreamAnimationPlugin;
4
4
 
@@ -17,6 +17,10 @@ type RuntypeExecutionStreamEvent = ({
17
17
  completedAt?: string;
18
18
  durationMs?: number;
19
19
  executionId: string;
20
+ externalAgent?: {
21
+ contextId?: string;
22
+ taskId?: string;
23
+ };
20
24
  failedSteps?: number;
21
25
  finalOutput?: string;
22
26
  iterations?: number;
@@ -31,6 +35,7 @@ type RuntypeExecutionStreamEvent = ({
31
35
  input: number;
32
36
  output: number;
33
37
  };
38
+ totalTokensUsed?: number;
34
39
  type: "execution_complete";
35
40
  }) | ({
36
41
  blockReason?: string;
@@ -290,12 +295,17 @@ type RuntypeExecutionStreamEvent = ({
290
295
  stepId?: string;
291
296
  success: boolean;
292
297
  toolCallId: string;
298
+ toolCost?: number;
293
299
  toolName?: string;
294
300
  type: "tool_complete";
295
301
  } | {
296
302
  approvalId: string;
297
303
  description?: string;
298
304
  executionId: string;
305
+ externalAgent?: {
306
+ contextId?: string;
307
+ taskId?: string;
308
+ };
299
309
  iteration?: number;
300
310
  parameters?: Record<string, unknown>;
301
311
  reason?: string;
@@ -363,326 +373,11 @@ type RuntypeExecutionStreamEvent = ({
363
373
  type: "custom";
364
374
  value?: unknown;
365
375
  };
366
- type RuntypeFlowSSEEvent = {
367
- executionContext?: Record<string, unknown>;
368
- executionId?: string;
369
- flowId: string;
370
- flowName?: string;
371
- input?: unknown;
372
- seq?: number;
373
- source?: string;
374
- startedAt: string;
375
- toolContext?: {
376
- executionId: string;
377
- stepId: string;
378
- toolId: string;
379
- };
380
- totalSteps?: number;
381
- type: "flow_start";
382
- } | {
383
- claudeManagedAgentId?: string;
384
- completedAt?: string;
385
- completedSteps?: number;
386
- duration?: number;
387
- executionContext?: Record<string, unknown>;
388
- executionId?: string;
389
- executionTime?: number;
390
- failedSteps?: number;
391
- finalOutput?: string;
392
- flowId?: string;
393
- flowName?: string;
394
- output?: unknown;
395
- seq?: number;
396
- source?: string;
397
- success?: boolean;
398
- successfulSteps?: number;
399
- toolContext?: {
400
- executionId: string;
401
- stepId: string;
402
- toolId: string;
403
- };
404
- totalSteps?: number;
405
- totalTokensUsed?: number;
406
- type: "flow_complete";
407
- } | ({
408
- blockReason?: string;
409
- code?: string;
410
- error: string | {
411
- code: string;
412
- message: string;
413
- stepId?: string;
414
- stepType?: string;
415
- };
416
- executionId?: string;
417
- executionTime?: number;
418
- flowId?: string;
419
- seq?: number;
420
- timestamp?: string;
421
- toolContext?: {
422
- executionId: string;
423
- stepId: string;
424
- toolId: string;
425
- };
426
- type: "flow_error";
427
- upgradeUrl?: string;
428
- }) | ({
429
- approvalId?: string;
430
- awaitReason?: string;
431
- awaitedAt: string;
432
- crawlId?: string;
433
- elicitation?: {
434
- message: string;
435
- mode: "form" | "url";
436
- pauseCount?: number;
437
- requestedSchema?: Record<string, unknown>;
438
- serverName?: string;
439
- url?: string;
440
- };
441
- executionId?: string;
442
- flowId: string;
443
- origin?: "webmcp" | "sdk";
444
- pageOrigin?: string;
445
- parameters?: Record<string, unknown>;
446
- seq?: number;
447
- stepId?: string;
448
- timeout?: number;
449
- toolCallId?: string;
450
- toolId?: string;
451
- toolName?: string;
452
- type: "flow_await";
453
- }) | {
454
- estimatedTokens?: number;
455
- executionId?: string;
456
- id?: string;
457
- index?: number;
458
- name?: string;
459
- outputVariable?: string;
460
- seq?: number;
461
- startedAt: string;
462
- stepId?: string;
463
- stepName?: string;
464
- stepType?: string;
465
- toolContext?: {
466
- executionId: string;
467
- stepId: string;
468
- toolId: string;
469
- };
470
- totalSteps?: number;
471
- type: "step_start";
472
- } | {
473
- delta?: string;
474
- executionId?: string;
475
- id?: string;
476
- messageId?: string;
477
- partId?: string;
478
- seq?: number;
479
- text?: string;
480
- toolContext?: {
481
- executionId: string;
482
- stepId: string;
483
- toolId: string;
484
- };
485
- toolId?: string;
486
- type: "step_delta";
487
- } | ({
488
- completedAt?: string;
489
- duration?: number;
490
- durationMs?: number;
491
- error?: string | null;
492
- executionId?: string;
493
- executionTime?: number;
494
- id?: string;
495
- index?: number;
496
- name?: string;
497
- output?: unknown;
498
- result?: unknown;
499
- seq?: number;
500
- stepId?: string;
501
- stepName?: string;
502
- stepType?: string;
503
- stopReason?: "end_turn" | "max_tool_calls" | "length" | "content_filter" | "error" | "unknown";
504
- success?: boolean;
505
- tokensUsed?: number;
506
- toolContext?: {
507
- executionId: string;
508
- stepId: string;
509
- toolId: string;
510
- };
511
- type: "step_complete";
512
- unresolvedVariables?: Array<string>;
513
- }) | {
514
- error: string;
515
- executionId?: string;
516
- executionTime?: number;
517
- id?: string;
518
- index?: number;
519
- name?: string;
520
- seq?: number;
521
- stepType?: string;
522
- type: "step_error";
523
- } | {
524
- error?: string;
525
- executionId?: string;
526
- id: string;
527
- index?: number;
528
- name?: string;
529
- seq?: number;
530
- skippedAt: string;
531
- stepType: string;
532
- totalSteps: number;
533
- type: "step_skip";
534
- when: string;
535
- } | ({
536
- elicitation?: {
537
- message: string;
538
- mode: "form" | "url";
539
- pauseCount?: number;
540
- requestedSchema?: Record<string, unknown>;
541
- serverName?: string;
542
- url?: string;
543
- };
544
- executionId?: string;
545
- reason?: string;
546
- seq?: number;
547
- type: "step_await";
548
- [key: string]: unknown;
549
- }) | ({
550
- agentContext?: {
551
- executionId: string;
552
- iteration: number;
553
- seq: number;
554
- };
555
- executionId?: string;
556
- hiddenParameterNames?: Array<string>;
557
- name?: string;
558
- parameters?: Record<string, unknown>;
559
- providerOptions?: Record<string, unknown>;
560
- seq?: number;
561
- startedAt?: string;
562
- stepId?: string;
563
- toolCallId?: string;
564
- toolId?: string;
565
- toolName?: string;
566
- toolType: "flow" | "mcp" | "builtin" | "custom" | "external" | "advisor" | "subagent" | "local";
567
- type: "tool_start";
568
- [key: string]: unknown;
569
- }) | {
570
- delta?: string;
571
- executionId?: string;
572
- seq?: number;
573
- toolId?: string;
574
- type: "tool_delta";
575
- [key: string]: unknown;
576
- } | {
577
- delta: string;
578
- executionId?: string;
579
- seq?: number;
580
- stepId?: string;
581
- toolCallId?: string;
582
- toolId?: string;
583
- type: "tool_input_delta";
584
- } | {
585
- executionId?: string;
586
- hiddenParameterNames?: Array<string>;
587
- parameters: Record<string, unknown>;
588
- providerOptions?: Record<string, unknown>;
589
- seq?: number;
590
- stepId?: string;
591
- toolCallId?: string;
592
- toolId?: string;
593
- toolName?: string;
594
- type: "tool_input_complete";
595
- } | {
596
- agentContext?: {
597
- executionId: string;
598
- iteration: number;
599
- seq: number;
600
- };
601
- completedAt?: string;
602
- error?: string;
603
- executionId?: string;
604
- executionTime?: number;
605
- name?: string;
606
- result?: unknown;
607
- seq?: number;
608
- stepId?: string;
609
- success: boolean;
610
- toolCallId?: string;
611
- toolCost?: number;
612
- toolId?: string;
613
- toolName?: string;
614
- type: "tool_complete";
615
- } | {
616
- agentContext?: {
617
- executionId: string;
618
- iteration: number;
619
- seq: number;
620
- };
621
- error: string;
622
- executionId?: string;
623
- executionTime?: number;
624
- failedAt?: string;
625
- name: string;
626
- seq?: number;
627
- toolId: string;
628
- type: "tool_error";
629
- } | {
630
- executionId?: string;
631
- id: string;
632
- seq?: number;
633
- text: string;
634
- type: "chunk";
635
- } | {
636
- executionId?: string;
637
- seq?: number;
638
- type: "text_start";
639
- [key: string]: unknown;
640
- } | {
641
- executionId?: string;
642
- seq?: number;
643
- type: "text_end";
644
- [key: string]: unknown;
645
- } | {
646
- executionId?: string;
647
- seq?: number;
648
- type: "reason_start";
649
- [key: string]: unknown;
650
- } | {
651
- executionId?: string;
652
- seq?: number;
653
- type: "reason_delta";
654
- [key: string]: unknown;
655
- } | {
656
- executionId?: string;
657
- seq?: number;
658
- type: "reason_complete";
659
- [key: string]: unknown;
660
- } | {
661
- executionId?: string;
662
- seq?: number;
663
- type: "source";
664
- [key: string]: unknown;
665
- } | {
666
- executionId?: string;
667
- seq?: number;
668
- type: "fallback_start";
669
- [key: string]: unknown;
670
- } | {
671
- executionId?: string;
672
- seq?: number;
673
- type: "fallback_complete";
674
- [key: string]: unknown;
675
- } | {
676
- executionId?: string;
677
- seq?: number;
678
- type: "fallback_exhausted";
679
- [key: string]: unknown;
680
- };
681
376
  type RuntypeStreamEventOf<U, T extends string> = Extract<U, {
682
377
  type: T;
683
378
  }>;
684
379
  type RuntypeTurnCompleteEvent = RuntypeStreamEventOf<RuntypeExecutionStreamEvent, "turn_complete">;
685
- type RuntypeStepCompleteEvent = RuntypeStreamEventOf<RuntypeFlowSSEEvent, "step_complete">;
380
+ type RuntypeStepCompleteEvent = RuntypeStreamEventOf<RuntypeExecutionStreamEvent, "step_complete">;
686
381
  type RuntypeStopReasonKind = NonNullable<RuntypeTurnCompleteEvent["stopReason"] | RuntypeStepCompleteEvent["stopReason"]>;
687
382
 
688
383
  /**