ghostykit 0.10.0 → 0.11.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.
@@ -476,8 +476,21 @@ var __iconData19 = {
476
476
  __iconData19.node;
477
477
  var Crosshair = createLucideIcon(__iconData19);
478
478
 
479
- // ../../node_modules/lucide-react/dist/esm/icons/external-link.mjs
479
+ // ../../node_modules/lucide-react/dist/esm/icons/download.mjs
480
480
  var __iconData20 = {
481
+ name: "download",
482
+ size: 24,
483
+ node: [
484
+ ["path", { d: "M12 15V3", key: "m9g1x1" }],
485
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
486
+ ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
487
+ ]
488
+ };
489
+ __iconData20.node;
490
+ var Download = createLucideIcon(__iconData20);
491
+
492
+ // ../../node_modules/lucide-react/dist/esm/icons/external-link.mjs
493
+ var __iconData21 = {
481
494
  name: "external-link",
482
495
  size: 24,
483
496
  node: [
@@ -486,11 +499,11 @@ var __iconData20 = {
486
499
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
487
500
  ]
488
501
  };
489
- __iconData20.node;
490
- var ExternalLink = createLucideIcon(__iconData20);
502
+ __iconData21.node;
503
+ var ExternalLink = createLucideIcon(__iconData21);
491
504
 
492
505
  // ../../node_modules/lucide-react/dist/esm/icons/file-pen-line.mjs
493
- var __iconData21 = {
506
+ var __iconData22 = {
494
507
  name: "file-pen-line",
495
508
  size: 24,
496
509
  node: [
@@ -513,11 +526,11 @@ var __iconData21 = {
513
526
  ],
514
527
  aliases: ["file-signature"]
515
528
  };
516
- __iconData21.node;
517
- var FilePenLine = createLucideIcon(__iconData21);
529
+ __iconData22.node;
530
+ var FilePenLine = createLucideIcon(__iconData22);
518
531
 
519
532
  // ../../node_modules/lucide-react/dist/esm/icons/file-spreadsheet.mjs
520
- var __iconData22 = {
533
+ var __iconData23 = {
521
534
  name: "file-spreadsheet",
522
535
  size: 24,
523
536
  node: [
@@ -535,11 +548,11 @@ var __iconData22 = {
535
548
  ["path", { d: "M14 17h2", key: "10kma7" }]
536
549
  ]
537
550
  };
538
- __iconData22.node;
539
- var FileSpreadsheet = createLucideIcon(__iconData22);
551
+ __iconData23.node;
552
+ var FileSpreadsheet = createLucideIcon(__iconData23);
540
553
 
541
554
  // ../../node_modules/lucide-react/dist/esm/icons/file-text.mjs
542
- var __iconData23 = {
555
+ var __iconData24 = {
543
556
  name: "file-text",
544
557
  size: 24,
545
558
  node: [
@@ -556,11 +569,11 @@ var __iconData23 = {
556
569
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
557
570
  ]
558
571
  };
559
- __iconData23.node;
560
- var FileText = createLucideIcon(__iconData23);
572
+ __iconData24.node;
573
+ var FileText = createLucideIcon(__iconData24);
561
574
 
562
575
  // ../../node_modules/lucide-react/dist/esm/icons/folder.mjs
563
- var __iconData24 = {
576
+ var __iconData25 = {
564
577
  name: "folder",
565
578
  size: 24,
566
579
  node: [
@@ -573,11 +586,11 @@ var __iconData24 = {
573
586
  ]
574
587
  ]
575
588
  };
576
- __iconData24.node;
577
- var Folder = createLucideIcon(__iconData24);
589
+ __iconData25.node;
590
+ var Folder = createLucideIcon(__iconData25);
578
591
 
579
592
  // ../../node_modules/lucide-react/dist/esm/icons/gauge.mjs
580
- var __iconData25 = {
593
+ var __iconData26 = {
581
594
  name: "gauge",
582
595
  size: 24,
583
596
  node: [
@@ -585,11 +598,11 @@ var __iconData25 = {
585
598
  ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
586
599
  ]
587
600
  };
588
- __iconData25.node;
589
- var Gauge = createLucideIcon(__iconData25);
601
+ __iconData26.node;
602
+ var Gauge = createLucideIcon(__iconData26);
590
603
 
591
604
  // ../../node_modules/lucide-react/dist/esm/icons/globe.mjs
592
- var __iconData26 = {
605
+ var __iconData27 = {
593
606
  name: "globe",
594
607
  size: 24,
595
608
  node: [
@@ -598,11 +611,11 @@ var __iconData26 = {
598
611
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
599
612
  ]
600
613
  };
601
- __iconData26.node;
602
- var Globe = createLucideIcon(__iconData26);
614
+ __iconData27.node;
615
+ var Globe = createLucideIcon(__iconData27);
603
616
 
604
617
  // ../../node_modules/lucide-react/dist/esm/icons/image.mjs
605
- var __iconData27 = {
618
+ var __iconData28 = {
606
619
  name: "image",
607
620
  size: 24,
608
621
  node: [
@@ -611,11 +624,11 @@ var __iconData27 = {
611
624
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
612
625
  ]
613
626
  };
614
- __iconData27.node;
615
- var Image = createLucideIcon(__iconData27);
627
+ __iconData28.node;
628
+ var Image = createLucideIcon(__iconData28);
616
629
 
617
630
  // ../../node_modules/lucide-react/dist/esm/icons/inbox.mjs
618
- var __iconData28 = {
631
+ var __iconData29 = {
619
632
  name: "inbox",
620
633
  size: 24,
621
634
  node: [
@@ -629,11 +642,11 @@ var __iconData28 = {
629
642
  ]
630
643
  ]
631
644
  };
632
- __iconData28.node;
633
- var Inbox = createLucideIcon(__iconData28);
645
+ __iconData29.node;
646
+ var Inbox = createLucideIcon(__iconData29);
634
647
 
635
648
  // ../../node_modules/lucide-react/dist/esm/icons/list-checks.mjs
636
- var __iconData29 = {
649
+ var __iconData30 = {
637
650
  name: "list-checks",
638
651
  size: 24,
639
652
  node: [
@@ -644,21 +657,21 @@ var __iconData29 = {
644
657
  ["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
645
658
  ]
646
659
  };
647
- __iconData29.node;
648
- var ListChecks = createLucideIcon(__iconData29);
660
+ __iconData30.node;
661
+ var ListChecks = createLucideIcon(__iconData30);
649
662
 
650
663
  // ../../node_modules/lucide-react/dist/esm/icons/loader-circle.mjs
651
- var __iconData30 = {
664
+ var __iconData31 = {
652
665
  name: "loader-circle",
653
666
  size: 24,
654
667
  node: [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]],
655
668
  aliases: ["loader-2"]
656
669
  };
657
- __iconData30.node;
658
- var LoaderCircle = createLucideIcon(__iconData30);
670
+ __iconData31.node;
671
+ var LoaderCircle = createLucideIcon(__iconData31);
659
672
 
660
673
  // ../../node_modules/lucide-react/dist/esm/icons/mic.mjs
661
- var __iconData31 = {
674
+ var __iconData32 = {
662
675
  name: "mic",
663
676
  size: 24,
664
677
  node: [
@@ -667,11 +680,11 @@ var __iconData31 = {
667
680
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
668
681
  ]
669
682
  };
670
- __iconData31.node;
671
- var Mic = createLucideIcon(__iconData31);
683
+ __iconData32.node;
684
+ var Mic = createLucideIcon(__iconData32);
672
685
 
673
686
  // ../../node_modules/lucide-react/dist/esm/icons/octagon-x.mjs
674
- var __iconData32 = {
687
+ var __iconData33 = {
675
688
  name: "octagon-x",
676
689
  size: 24,
677
690
  node: [
@@ -687,11 +700,11 @@ var __iconData32 = {
687
700
  ],
688
701
  aliases: ["x-octagon"]
689
702
  };
690
- __iconData32.node;
691
- var OctagonX = createLucideIcon(__iconData32);
703
+ __iconData33.node;
704
+ var OctagonX = createLucideIcon(__iconData33);
692
705
 
693
706
  // ../../node_modules/lucide-react/dist/esm/icons/paperclip.mjs
694
- var __iconData33 = {
707
+ var __iconData34 = {
695
708
  name: "paperclip",
696
709
  size: 24,
697
710
  node: [
@@ -704,11 +717,11 @@ var __iconData33 = {
704
717
  ]
705
718
  ]
706
719
  };
707
- __iconData33.node;
708
- var Paperclip = createLucideIcon(__iconData33);
720
+ __iconData34.node;
721
+ var Paperclip = createLucideIcon(__iconData34);
709
722
 
710
723
  // ../../node_modules/lucide-react/dist/esm/icons/rotate-ccw.mjs
711
- var __iconData34 = {
724
+ var __iconData35 = {
712
725
  name: "rotate-ccw",
713
726
  size: 24,
714
727
  node: [
@@ -716,11 +729,11 @@ var __iconData34 = {
716
729
  ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
717
730
  ]
718
731
  };
719
- __iconData34.node;
720
- var RotateCcw = createLucideIcon(__iconData34);
732
+ __iconData35.node;
733
+ var RotateCcw = createLucideIcon(__iconData35);
721
734
 
722
735
  // ../../node_modules/lucide-react/dist/esm/icons/search.mjs
723
- var __iconData35 = {
736
+ var __iconData36 = {
724
737
  name: "search",
725
738
  size: 24,
726
739
  node: [
@@ -728,11 +741,11 @@ var __iconData35 = {
728
741
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
729
742
  ]
730
743
  };
731
- __iconData35.node;
732
- var Search = createLucideIcon(__iconData35);
744
+ __iconData36.node;
745
+ var Search = createLucideIcon(__iconData36);
733
746
 
734
747
  // ../../node_modules/lucide-react/dist/esm/icons/send.mjs
735
- var __iconData36 = {
748
+ var __iconData37 = {
736
749
  name: "send",
737
750
  size: 24,
738
751
  node: [
@@ -746,11 +759,11 @@ var __iconData36 = {
746
759
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
747
760
  ]
748
761
  };
749
- __iconData36.node;
750
- var Send = createLucideIcon(__iconData36);
762
+ __iconData37.node;
763
+ var Send = createLucideIcon(__iconData37);
751
764
 
752
765
  // ../../node_modules/lucide-react/dist/esm/icons/shield-alert.mjs
753
- var __iconData37 = {
766
+ var __iconData38 = {
754
767
  name: "shield-alert",
755
768
  size: 24,
756
769
  node: [
@@ -765,20 +778,20 @@ var __iconData37 = {
765
778
  ["path", { d: "M12 16h.01", key: "1drbdi" }]
766
779
  ]
767
780
  };
768
- __iconData37.node;
769
- var ShieldAlert = createLucideIcon(__iconData37);
781
+ __iconData38.node;
782
+ var ShieldAlert = createLucideIcon(__iconData38);
770
783
 
771
784
  // ../../node_modules/lucide-react/dist/esm/icons/square.mjs
772
- var __iconData38 = {
785
+ var __iconData39 = {
773
786
  name: "square",
774
787
  size: 24,
775
788
  node: [["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]]
776
789
  };
777
- __iconData38.node;
778
- var Square = createLucideIcon(__iconData38);
790
+ __iconData39.node;
791
+ var Square = createLucideIcon(__iconData39);
779
792
 
780
793
  // ../../node_modules/lucide-react/dist/esm/icons/users-round.mjs
781
- var __iconData39 = {
794
+ var __iconData40 = {
782
795
  name: "users-round",
783
796
  size: 24,
784
797
  node: [
@@ -788,11 +801,11 @@ var __iconData39 = {
788
801
  ],
789
802
  aliases: ["users-2"]
790
803
  };
791
- __iconData39.node;
792
- var UsersRound = createLucideIcon(__iconData39);
804
+ __iconData40.node;
805
+ var UsersRound = createLucideIcon(__iconData40);
793
806
 
794
807
  // ../../node_modules/lucide-react/dist/esm/icons/wrench.mjs
795
- var __iconData40 = {
808
+ var __iconData41 = {
796
809
  name: "wrench",
797
810
  size: 24,
798
811
  node: [
@@ -805,8 +818,8 @@ var __iconData40 = {
805
818
  ]
806
819
  ]
807
820
  };
808
- __iconData40.node;
809
- var Wrench = createLucideIcon(__iconData40);
821
+ __iconData41.node;
822
+ var Wrench = createLucideIcon(__iconData41);
810
823
 
811
824
  export {
812
825
  Activity,
@@ -826,6 +839,7 @@ export {
826
839
  Copy,
827
840
  Cpu,
828
841
  Crosshair,
842
+ Download,
829
843
  ExternalLink,
830
844
  FilePenLine,
831
845
  FileSpreadsheet,
@@ -21,8 +21,10 @@ function namedVerb(t, verbs) {
21
21
  return null;
22
22
  }
23
23
  function stepLabel(t, verbs, fallback = "Paso") {
24
- if (t.label) return t.label;
24
+ const rawLabel = !!t.label && !/\s/.test(t.label);
25
+ if (t.label && !rawLabel) return t.label;
25
26
  const named = namedVerb(t, verbs);
27
+ if (!named && t.label) return t.label;
26
28
  if (named) return isRunning(t) && named.verb.running ? named.verb.running : named.verb.one;
27
29
  return t.title ?? t.kind ?? fallback;
28
30
  }
@@ -72,6 +74,8 @@ var TOOL_VERBS_ES = {
72
74
  glob: { one: "Busqu\xE9 archivos", many: "Busqu\xE9 archivos" },
73
75
  search: { one: "Busqu\xE9", many: "Busqu\xE9 %n veces" },
74
76
  tool_search: { one: "Busqu\xE9 una herramienta", many: "Busqu\xE9 %n herramientas" },
77
+ ToolSearch: { one: "Busqu\xE9 una herramienta", many: "Busqu\xE9 %n herramientas" },
78
+ create_document: { one: "Arm\xE9 el documento", many: "Arm\xE9 %n documentos" },
75
79
  web_search: { one: "Busqu\xE9 en la web", many: "Busqu\xE9 en la web" },
76
80
  web_fetch: { one: "Abr\xED una p\xE1gina", many: "Abr\xED %n p\xE1ginas" },
77
81
  fetch: { one: "Abr\xED una p\xE1gina", many: "Abr\xED %n p\xE1ginas" },
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TOOL_VERBS_ES
3
- } from "./chunk-UUH37KXA.js";
3
+ } from "./chunk-EJPAMT4B.js";
4
4
  import {
5
5
  cleanUserText
6
6
  } from "./chunk-6U545WJG.js";
@@ -17,7 +17,7 @@ import {
17
17
  Paperclip,
18
18
  Square,
19
19
  X
20
- } from "./chunk-AQBQ3QZH.js";
20
+ } from "./chunk-5DVFSEQM.js";
21
21
 
22
22
  // src/react/strings.ts
23
23
  var STRINGS_ES = {
@@ -972,6 +972,7 @@ function resolvePlugins(list = []) {
972
972
  return r;
973
973
  }
974
974
  var BUILTIN_CUSTOM = /* @__PURE__ */ new Set([
975
+ "ghosty.delivery",
975
976
  "ghosty.title",
976
977
  "ghosty.history",
977
978
  "ghosty.injected",
@@ -34,7 +34,7 @@ import {
34
34
  summarizeTools,
35
35
  toolName,
36
36
  toolNames
37
- } from "../chunks/chunk-UUH37KXA.js";
37
+ } from "../chunks/chunk-EJPAMT4B.js";
38
38
  import {
39
39
  applyReferences,
40
40
  cleanUserText,
@@ -3,10 +3,10 @@ import {
3
3
  definePlugin,
4
4
  pluginPoints,
5
5
  pluginRequires
6
- } from "../chunks/chunk-6PYYF4XU.js";
7
- import "../chunks/chunk-UUH37KXA.js";
6
+ } from "../chunks/chunk-MGRCZENR.js";
7
+ import "../chunks/chunk-EJPAMT4B.js";
8
8
  import "../chunks/chunk-6U545WJG.js";
9
- import "../chunks/chunk-AQBQ3QZH.js";
9
+ import "../chunks/chunk-5DVFSEQM.js";
10
10
 
11
11
  // src/plugins/index.tsx
12
12
  import { useEffect, useState, useSyncExternalStore } from "react";
@@ -0,0 +1,19 @@
1
+ import type { CustomEntry } from "../core/types";
2
+ /** Lo que manda gs en `CUSTOM ghosty.delivery` (un archivo que el agente entregó). */
3
+ export interface Delivery {
4
+ id?: string;
5
+ tipo?: string;
6
+ nombre?: string;
7
+ titulo?: string;
8
+ url?: string;
9
+ mime?: string | null;
10
+ size?: number | null;
11
+ }
12
+ /**
13
+ * La tarjeta estándar de un archivo entregado (`ghosty.delivery`): nombre, tipo y tamaño, «Abrir» y
14
+ * «Descargar». Piloto la pinta sola; un plugin con `message.custom["ghosty.delivery"]` la reemplaza.
15
+ */
16
+ export declare function DeliveryCard({ entry, locale }: {
17
+ entry: CustomEntry;
18
+ locale?: "es" | "en";
19
+ }): import("react").JSX.Element | null;
@@ -15,3 +15,4 @@ export { PilotoContext, usePiloto, type MarkdownOptions, type PilotIcon, type Pi
15
15
  export { STRINGS_EN, STRINGS_ES, type PilotStrings } from "./strings";
16
16
  export * from "../core";
17
17
  export { PilotHttpError, createAgUiTransport, readSse, type AgUiTransportOptions, type PilotTransport, type SseMessage } from "../transport";
18
+ export { DeliveryCard, type Delivery } from "./Delivery";
@@ -48,7 +48,7 @@ import {
48
48
  resolvePlugins,
49
49
  rootProps,
50
50
  usePiloto
51
- } from "../chunks/chunk-6PYYF4XU.js";
51
+ } from "../chunks/chunk-MGRCZENR.js";
52
52
  import {
53
53
  TOOL_VERBS_EN,
54
54
  TOOL_VERBS_ES,
@@ -58,7 +58,7 @@ import {
58
58
  summarizeTools,
59
59
  toolName,
60
60
  toolNames
61
- } from "../chunks/chunk-UUH37KXA.js";
61
+ } from "../chunks/chunk-EJPAMT4B.js";
62
62
  import {
63
63
  applyReferences,
64
64
  cleanUserText,
@@ -79,6 +79,7 @@ import {
79
79
  Clock,
80
80
  Coins,
81
81
  Copy,
82
+ Download,
82
83
  ExternalLink,
83
84
  FilePenLine,
84
85
  FileSpreadsheet,
@@ -98,7 +99,7 @@ import {
98
99
  UsersRound,
99
100
  Wrench,
100
101
  X
101
- } from "../chunks/chunk-AQBQ3QZH.js";
102
+ } from "../chunks/chunk-5DVFSEQM.js";
102
103
 
103
104
  // src/react/Piloto.tsx
104
105
  import {
@@ -819,13 +820,42 @@ function AgentBody({ turn, live, onRetry, onOption, showUsage, showCopy, showDur
819
820
  ] });
820
821
  }
821
822
 
823
+ // src/react/Delivery.tsx
824
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
825
+ var kb = (n) => !n ? null : n < 1024 * 1024 ? `${Math.max(1, Math.round(n / 1024))} KB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
826
+ var kind = (mime, name) => {
827
+ const ext = name?.split(".").pop()?.toUpperCase();
828
+ if (mime === "application/pdf") return "PDF";
829
+ return ext && ext.length <= 5 ? ext : "Archivo";
830
+ };
831
+ function DeliveryCard({ entry, locale = "es" }) {
832
+ const d = entry.value ?? {};
833
+ if (!d.url) return null;
834
+ const name = d.nombre || d.titulo || "archivo";
835
+ const download = d.url + (d.url.includes("?") ? "&" : "?") + "download=1";
836
+ const meta = [kind(d.mime, name), kb(d.size)].filter(Boolean).join(" \xB7 ");
837
+ const openLabel = locale === "en" ? "Open" : "Abrir";
838
+ const downloadLabel = locale === "en" ? `Download ${name}` : `Descargar ${name}`;
839
+ return /* @__PURE__ */ jsxs5("div", { className: "piloto-delivery mt-3 flex max-w-md items-center gap-1 rounded-xl border border-irongray/20 bg-irongray/5 pr-2 transition-colors hover:border-brand-500/40 hover:bg-brand-500/5", children: [
840
+ /* @__PURE__ */ jsxs5("a", { href: download, download: name, className: "flex min-w-0 flex-1 items-center gap-3 p-3", title: downloadLabel, "aria-label": downloadLabel, children: [
841
+ /* @__PURE__ */ jsx7("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-brand-500/10 text-brand-500", children: /* @__PURE__ */ jsx7(FileText, { size: 20, strokeWidth: 1.8 }) }),
842
+ /* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1", children: [
843
+ /* @__PURE__ */ jsx7("span", { className: "block truncate text-sm font-medium text-dark", children: d.titulo || name }),
844
+ /* @__PURE__ */ jsx7("span", { className: "block truncate text-xs text-metal", children: meta })
845
+ ] }),
846
+ /* @__PURE__ */ jsx7(Download, { size: 16, className: "shrink-0 text-metal" })
847
+ ] }),
848
+ /* @__PURE__ */ jsx7("a", { href: d.url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-metal hover:bg-irongray/10 hover:text-dark", title: openLabel, "aria-label": openLabel, children: /* @__PURE__ */ jsx7(ExternalLink, { size: 16 }) })
849
+ ] });
850
+ }
851
+
822
852
  // src/react/Status.tsx
823
853
  import { AnimatePresence as AnimatePresence2, motion as motion2 } from "motion/react";
824
854
  import { useEffect as useEffect3, useState as useState6 } from "react";
825
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
855
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
826
856
  var STILL_WORKING_S = 90;
827
857
  function TypingDots() {
828
- return /* @__PURE__ */ jsx7("div", { className: "gc-typing flex gap-1", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx7("span", { className: "gc-typing-dot h-2 w-2 animate-bounce rounded-full", style: { "--i": i } }, i)) });
858
+ return /* @__PURE__ */ jsx8("div", { className: "gc-typing flex gap-1", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx8("span", { className: "gc-typing-dot h-2 w-2 animate-bounce rounded-full", style: { "--i": i } }, i)) });
829
859
  }
830
860
  function WaitLabel({
831
861
  since,
@@ -844,8 +874,8 @@ function WaitLabel({
844
874
  const phrases = t.thinkingPhrases;
845
875
  const stepText = step ? t.steps?.[step] : void 0;
846
876
  const what = text ? text : stepText ? stepText : phrases?.length ? seconds >= STILL_WORKING_S ? t.stillWorking : phrases[Math.floor(seconds / 4) % phrases.length] : t.howItGoes(seconds);
847
- return /* @__PURE__ */ jsx7("div", { className: "flex flex-col gap-0.5 text-sm text-text-secondary", children: /* @__PURE__ */ jsxs5("p", { className: "flex items-center", children: [
848
- /* @__PURE__ */ jsx7(AnimatePresence2, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx7(
877
+ return /* @__PURE__ */ jsx8("div", { className: "flex flex-col gap-0.5 text-sm text-text-secondary", children: /* @__PURE__ */ jsxs6("p", { className: "flex items-center", children: [
878
+ /* @__PURE__ */ jsx8(AnimatePresence2, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx8(
849
879
  motion2.span,
850
880
  {
851
881
  className: "gc-wait-text",
@@ -857,7 +887,7 @@ function WaitLabel({
857
887
  },
858
888
  what
859
889
  ) }),
860
- showDuration && /* @__PURE__ */ jsxs5("span", { className: "tabular-nums text-text-tertiary", children: [
890
+ showDuration && /* @__PURE__ */ jsxs6("span", { className: "tabular-nums text-text-tertiary", children: [
861
891
  "\xA0\xB7 ",
862
892
  formatDuration(seconds)
863
893
  ] })
@@ -1196,7 +1226,7 @@ function usePilot(transport, opts = {}) {
1196
1226
  }
1197
1227
 
1198
1228
  // src/react/Piloto.tsx
1199
- import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1229
+ import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1200
1230
  var useIsoLayoutEffect = typeof window === "undefined" ? useEffect5 : useLayoutEffect;
1201
1231
  var ANCHOR_GAP = 24;
1202
1232
  var Piloto = forwardRef(function Piloto2(props, handle) {
@@ -1217,7 +1247,7 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1217
1247
  entries.map(([tag, { plugin, value: C }]) => [
1218
1248
  tag,
1219
1249
  // Como toda vista de plugin: marcada con su nombre y, si es de la app, aislada de las utilidades.
1220
- (p) => /* @__PURE__ */ jsx8("span", { ...pluginAttrs(plugin, plugins.ghostykitStyled), style: { display: "contents" }, children: /* @__PURE__ */ jsx8(C, { ...p, ctx: ctxForComponents.current }) })
1250
+ (p) => /* @__PURE__ */ jsx9("span", { ...pluginAttrs(plugin, plugins.ghostykitStyled), style: { display: "contents" }, children: /* @__PURE__ */ jsx9(C, { ...p, ctx: ctxForComponents.current }) })
1221
1251
  ])
1222
1252
  );
1223
1253
  }, [plugins]);
@@ -1487,9 +1517,9 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1487
1517
  }
1488
1518
  });
1489
1519
  const Replacement = replacer?.value.view;
1490
- const composer = Replacement ? /* @__PURE__ */ jsx8("div", { ...mark(replacer.plugin), children: /* @__PURE__ */ jsx8(Replacement, { ctx }) }) : /* @__PURE__ */ jsxs6("div", { ref: composerBox, children: [
1491
- /* @__PURE__ */ jsx8(ReferenceChips, { references: pointedRefs, onRemove: removeRef, onActivate: props.onReferenceClick }),
1492
- /* @__PURE__ */ jsx8(
1520
+ const composer = Replacement ? /* @__PURE__ */ jsx9("div", { ...mark(replacer.plugin), children: /* @__PURE__ */ jsx9(Replacement, { ctx }) }) : /* @__PURE__ */ jsxs7("div", { ref: composerBox, children: [
1521
+ /* @__PURE__ */ jsx9(ReferenceChips, { references: pointedRefs, onRemove: removeRef, onActivate: props.onReferenceClick }),
1522
+ /* @__PURE__ */ jsx9(
1493
1523
  Composer,
1494
1524
  {
1495
1525
  initialValue: draft.text,
@@ -1505,8 +1535,8 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1505
1535
  references: plainRefs,
1506
1536
  onRemoveReference: removeRef,
1507
1537
  onActivateReference: props.onReferenceClick,
1508
- extras: plugins.composerActions.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.composerActions, ctx, styled: plugins.ghostykitStyled, inline: true }) : void 0,
1509
- extrasEnd: plugins.composerActionsEnd.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.composerActionsEnd, ctx, styled: plugins.ghostykitStyled, inline: true }) : void 0,
1538
+ extras: plugins.composerActions.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.composerActions, ctx, styled: plugins.ghostykitStyled, inline: true }) : void 0,
1539
+ extrasEnd: plugins.composerActionsEnd.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.composerActionsEnd, ctx, styled: plugins.ghostykitStyled, inline: true }) : void 0,
1510
1540
  handleRef: composerHandle,
1511
1541
  icons: props.icons,
1512
1542
  accept,
@@ -1516,29 +1546,30 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1516
1546
  draft.n
1517
1547
  )
1518
1548
  ] });
1519
- const withPanel = (chat) => plugins.sidePanel.length ? /* @__PURE__ */ jsxs6("div", { className: "flex min-h-0 flex-1 flex-row", children: [
1520
- /* @__PURE__ */ jsx8("div", { className: "relative flex min-h-0 min-w-0 flex-1 flex-col", children: chat }),
1521
- /* @__PURE__ */ jsx8(Views, { items: plugins.sidePanel, ctx, styled: plugins.ghostykitStyled, className: "flex min-h-0 shrink-0" })
1549
+ const withPanel = (chat) => plugins.sidePanel.length ? /* @__PURE__ */ jsxs7("div", { className: "flex min-h-0 flex-1 flex-row", children: [
1550
+ /* @__PURE__ */ jsx9("div", { className: "relative flex min-h-0 min-w-0 flex-1 flex-col", children: chat }),
1551
+ /* @__PURE__ */ jsx9(Views, { items: plugins.sidePanel, ctx, styled: plugins.ghostykitStyled, className: "flex min-h-0 shrink-0" })
1522
1552
  ] }) : chat;
1523
- const aboveComposer = plugins.composerAbove.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.composerAbove, ctx, styled: plugins.ghostykitStyled }) : null;
1524
- const belowComposer = plugins.composerBelow.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.composerBelow, ctx, styled: plugins.ghostykitStyled }) : null;
1525
- const headerStart = plugins.headerStart.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.headerStart, ctx, styled: plugins.ghostykitStyled, inline: true }) : null;
1526
- const headerEnd = plugins.header.length ? /* @__PURE__ */ jsx8(Views, { items: plugins.header, ctx, styled: plugins.ghostykitStyled, inline: true }) : null;
1527
- const headerSides = (headerStart || headerEnd) && /* @__PURE__ */ jsxs6(Fragment4, { children: [
1528
- headerStart && /* @__PURE__ */ jsx8("div", { className: "piloto-header-start flex min-w-0 items-center gap-2", children: headerStart }),
1529
- headerEnd && /* @__PURE__ */ jsx8("div", { className: "piloto-header-end ml-auto flex items-center gap-2", children: headerEnd })
1553
+ const aboveComposer = plugins.composerAbove.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.composerAbove, ctx, styled: plugins.ghostykitStyled }) : null;
1554
+ const belowComposer = plugins.composerBelow.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.composerBelow, ctx, styled: plugins.ghostykitStyled }) : null;
1555
+ const headerStart = plugins.headerStart.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.headerStart, ctx, styled: plugins.ghostykitStyled, inline: true }) : null;
1556
+ const headerEnd = plugins.header.length ? /* @__PURE__ */ jsx9(Views, { items: plugins.header, ctx, styled: plugins.ghostykitStyled, inline: true }) : null;
1557
+ const headerSides = (headerStart || headerEnd) && /* @__PURE__ */ jsxs7(Fragment4, { children: [
1558
+ headerStart && /* @__PURE__ */ jsx9("div", { className: "piloto-header-start flex min-w-0 items-center gap-2", children: headerStart }),
1559
+ headerEnd && /* @__PURE__ */ jsx9("div", { className: "piloto-header-end ml-auto flex items-center gap-2", children: headerEnd })
1530
1560
  ] });
1531
1561
  const Empty = plugins.empty?.value;
1532
1562
  const Waiting = plugins.waiting?.value;
1533
1563
  const renderDeliveries = (turn, live) => {
1534
1564
  const custom = (turn.custom ?? []).map((entry, i) => {
1535
1565
  const owner = plugins.customRenders[entry.name];
1566
+ if (!owner && entry.name === "ghosty.delivery") return /* @__PURE__ */ jsx9(DeliveryCard, { entry, locale: props.locale === "en" ? "en" : "es" }, `c${i}`);
1536
1567
  if (!owner) return null;
1537
1568
  const C = owner.value;
1538
- return /* @__PURE__ */ jsx8("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx8(C, { ctx, entry, turn, live }) }, `c${i}`);
1569
+ return /* @__PURE__ */ jsx9("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx9(C, { ctx, entry, turn, live }) }, `c${i}`);
1539
1570
  });
1540
- const extras = plugins.messageAssistant.map((o, i) => /* @__PURE__ */ jsx8("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx8(o.value, { ctx, turn, live }) }, `a${i}`));
1541
- return custom.some(Boolean) || extras.length ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
1571
+ const extras = plugins.messageAssistant.map((o, i) => /* @__PURE__ */ jsx9("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx9(o.value, { ctx, turn, live }) }, `a${i}`));
1572
+ return custom.some(Boolean) || extras.length ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
1542
1573
  custom,
1543
1574
  extras
1544
1575
  ] }) : null;
@@ -1549,25 +1580,25 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1549
1580
  if (!owner) return [];
1550
1581
  const C = owner.value;
1551
1582
  return [
1552
- /* @__PURE__ */ jsx8("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx8(C, { ctx, tool, turn, live }) }, tool.id)
1583
+ /* @__PURE__ */ jsx9("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx9(C, { ctx, tool, turn, live }) }, tool.id)
1553
1584
  ];
1554
1585
  });
1555
- return views.length ? /* @__PURE__ */ jsx8("div", { className: "mb-3 flex flex-col gap-2", children: views }) : null;
1586
+ return views.length ? /* @__PURE__ */ jsx9("div", { className: "mb-3 flex flex-col gap-2", children: views }) : null;
1556
1587
  };
1557
- const renderBefore = plugins.messageBefore.length ? (turn, live) => /* @__PURE__ */ jsx8(Fragment4, { children: plugins.messageBefore.map((o, i) => /* @__PURE__ */ jsx8("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx8(o.value, { ctx, turn, live }) }, i)) }) : void 0;
1588
+ const renderBefore = plugins.messageBefore.length ? (turn, live) => /* @__PURE__ */ jsx9(Fragment4, { children: plugins.messageBefore.map((o, i) => /* @__PURE__ */ jsx9("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx9(o.value, { ctx, turn, live }) }, i)) }) : void 0;
1558
1589
  const blockLangs = Object.keys(plugins.blockRenders);
1559
1590
  const blocks = blockLangs.length ? {
1560
1591
  langs: blockLangs,
1561
- render: (list, turn, live) => /* @__PURE__ */ jsx8("div", { className: "mt-2 flex flex-col gap-2", children: list.map((block, i) => {
1592
+ render: (list, turn, live) => /* @__PURE__ */ jsx9("div", { className: "mt-2 flex flex-col gap-2", children: list.map((block, i) => {
1562
1593
  const owner = plugins.blockRenders[block.lang];
1563
1594
  const C = owner.value;
1564
- return /* @__PURE__ */ jsx8("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx8(C, { ctx, block, turn, live }) }, i);
1595
+ return /* @__PURE__ */ jsx9("div", { ...mark(owner.plugin), children: /* @__PURE__ */ jsx9(C, { ctx, block, turn, live }) }, i);
1565
1596
  }) })
1566
1597
  } : void 0;
1567
- const wrapAll = (tree) => plugins.wraps.reduceRight((inner, { value: W }) => /* @__PURE__ */ jsx8(W, { ctx, children: inner }), tree);
1568
- const permissionCards = cards.map((p) => /* @__PURE__ */ jsx8(ConfirmCard, { request: p, onRespond: respond, onSettled: settle, onExpire: pilot.expirePermission }, p.id));
1569
- return /* @__PURE__ */ jsx8(PilotoContext.Provider, { value: config, children: wrapAll(
1570
- /* @__PURE__ */ jsx8(
1598
+ const wrapAll = (tree) => plugins.wraps.reduceRight((inner, { value: W }) => /* @__PURE__ */ jsx9(W, { ctx, children: inner }), tree);
1599
+ const permissionCards = cards.map((p) => /* @__PURE__ */ jsx9(ConfirmCard, { request: p, onRespond: respond, onSettled: settle, onExpire: pilot.expirePermission }, p.id));
1600
+ return /* @__PURE__ */ jsx9(PilotoContext.Provider, { value: config, children: wrapAll(
1601
+ /* @__PURE__ */ jsx9(
1571
1602
  "div",
1572
1603
  {
1573
1604
  ...rootProps(theme, props.skin),
@@ -1577,12 +1608,12 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1577
1608
  children: withPanel(empty ? (
1578
1609
  // Un hilo vacío enseña lo mismo que la portada: la cara, el saludo, la caja y por dónde
1579
1610
  // empezar. Si no cabe (panel bajo), se desplaza: `safe center` nunca empuja nada fuera.
1580
- /* @__PURE__ */ jsxs6("div", { className: "gs-scroll flex min-h-0 flex-1 flex-col items-center justify-center overflow-y-auto px-4 pb-[10vh] [justify-content:safe_center]", children: [
1581
- headerSides && /* @__PURE__ */ jsx8("div", { className: "piloto-header absolute inset-x-0 top-0 z-10 flex items-center gap-2 px-4 pt-3", children: headerSides }),
1582
- Empty ? /* @__PURE__ */ jsx8("div", { ...mark(plugins.empty.plugin), children: /* @__PURE__ */ jsx8(Empty, { ctx }) }) : /* @__PURE__ */ jsxs6("div", { className: "mb-6 flex flex-col items-center", children: [
1583
- props.avatar && /* @__PURE__ */ jsx8("div", { className: "mb-3", children: props.avatar }),
1611
+ /* @__PURE__ */ jsxs7("div", { className: "gs-scroll flex min-h-0 flex-1 flex-col items-center justify-center overflow-y-auto px-4 pb-[10vh] [justify-content:safe_center]", children: [
1612
+ headerSides && /* @__PURE__ */ jsx9("div", { className: "piloto-header absolute inset-x-0 top-0 z-10 flex items-center gap-2 px-4 pt-3", children: headerSides }),
1613
+ Empty ? /* @__PURE__ */ jsx9("div", { ...mark(plugins.empty.plugin), children: /* @__PURE__ */ jsx9(Empty, { ctx }) }) : /* @__PURE__ */ jsxs7("div", { className: "mb-6 flex flex-col items-center", children: [
1614
+ props.avatar && /* @__PURE__ */ jsx9("div", { className: "mb-3", children: props.avatar }),
1584
1615
  props.welcome && // Un saludo largo (una explicación del piloto) baja a letra de lectura.
1585
- /* @__PURE__ */ jsx8(
1616
+ /* @__PURE__ */ jsx9(
1586
1617
  "h1",
1587
1618
  {
1588
1619
  className: typeof props.welcome === "string" && props.welcome.length > 60 ? "max-w-xl text-center text-base font-medium leading-6 text-metal" : "text-center text-3xl font-extrabold tracking-tight text-dark",
@@ -1590,16 +1621,16 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1590
1621
  }
1591
1622
  )
1592
1623
  ] }),
1593
- /* @__PURE__ */ jsxs6("div", { className: "w-full max-w-3xl", children: [
1624
+ /* @__PURE__ */ jsxs7("div", { className: "w-full max-w-3xl", children: [
1594
1625
  aboveComposer,
1595
1626
  composer,
1596
1627
  belowComposer,
1597
- props.suggestions && /* @__PURE__ */ jsx8(Suggestions, { items: props.suggestions, onPick: (s) => send(s), onPrefill: (s) => setDraftState((d) => ({ text: s, n: d.n + 1 })) })
1628
+ props.suggestions && /* @__PURE__ */ jsx9(Suggestions, { items: props.suggestions, onPick: (s) => send(s), onPrefill: (s) => setDraftState((d) => ({ text: s, n: d.n + 1 })) })
1598
1629
  ] })
1599
1630
  ] })
1600
- ) : /* @__PURE__ */ jsxs6(Fragment4, { children: [
1601
- headerSides && /* @__PURE__ */ jsx8("div", { className: "piloto-header flex shrink-0 items-center gap-2 px-4 pt-3 sm:px-6", children: headerSides }),
1602
- /* @__PURE__ */ jsxs6(
1631
+ ) : /* @__PURE__ */ jsxs7(Fragment4, { children: [
1632
+ headerSides && /* @__PURE__ */ jsx9("div", { className: "piloto-header flex shrink-0 items-center gap-2 px-4 pt-3 sm:px-6", children: headerSides }),
1633
+ /* @__PURE__ */ jsxs7(
1603
1634
  "div",
1604
1635
  {
1605
1636
  ref: scroller,
@@ -1615,9 +1646,9 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1615
1646
  onKeyDown: (e) => ["ArrowUp", "PageUp", "Home"].includes(e.key) && release(),
1616
1647
  className: "gs-scroll relative min-h-0 flex-1 overflow-y-auto overflow-x-hidden",
1617
1648
  children: [
1618
- /* @__PURE__ */ jsxs6("div", { ref: column, className: "mx-auto flex w-full max-w-[784px] flex-col gap-6 px-4 py-8 sm:px-6", children: [
1619
- plugins.aboveThread.length > 0 && /* @__PURE__ */ jsx8(Views, { items: plugins.aboveThread, ctx, styled: plugins.ghostykitStyled }),
1620
- state.history?.hasMoreBefore && (external || props.loadOlder) && /* @__PURE__ */ jsx8(
1649
+ /* @__PURE__ */ jsxs7("div", { ref: column, className: "mx-auto flex w-full max-w-[784px] flex-col gap-6 px-4 py-8 sm:px-6", children: [
1650
+ plugins.aboveThread.length > 0 && /* @__PURE__ */ jsx9(Views, { items: plugins.aboveThread, ctx, styled: plugins.ghostykitStyled }),
1651
+ state.history?.hasMoreBefore && (external || props.loadOlder) && /* @__PURE__ */ jsx9(
1621
1652
  "button",
1622
1653
  {
1623
1654
  type: "button",
@@ -1630,11 +1661,11 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1630
1661
  turns.map((turn, i) => {
1631
1662
  const isLast = i === turns.length - 1;
1632
1663
  const live = busy && isLast;
1633
- return /* @__PURE__ */ jsxs6("div", { "data-turn": i - olderCount, children: [
1634
- turn.role === "user" ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
1635
- /* @__PURE__ */ jsx8(UserBubble, { turn }),
1636
- plugins.messageUser.map((o, j) => /* @__PURE__ */ jsx8("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx8(o.value, { ctx, turn }) }, j))
1637
- ] }) : /* @__PURE__ */ jsx8(
1664
+ return /* @__PURE__ */ jsxs7("div", { "data-turn": i - olderCount, children: [
1665
+ turn.role === "user" ? /* @__PURE__ */ jsxs7(Fragment4, { children: [
1666
+ /* @__PURE__ */ jsx9(UserBubble, { turn }),
1667
+ plugins.messageUser.map((o, j) => /* @__PURE__ */ jsx9("div", { ...mark(o.plugin), children: /* @__PURE__ */ jsx9(o.value, { ctx, turn }) }, j))
1668
+ ] }) : /* @__PURE__ */ jsx9(
1638
1669
  AgentBubble,
1639
1670
  {
1640
1671
  turn,
@@ -1649,51 +1680,51 @@ var Piloto = forwardRef(function Piloto2(props, handle) {
1649
1680
  renderBefore,
1650
1681
  blocks,
1651
1682
  narration: features.narration !== false,
1652
- avatar: plugins.avatar ? /* @__PURE__ */ jsx8("span", { ...mark(plugins.avatar.plugin), children: /* @__PURE__ */ jsx8(plugins.avatar.value, { ctx, turn }) }) : void 0
1683
+ avatar: plugins.avatar ? /* @__PURE__ */ jsx9("span", { ...mark(plugins.avatar.plugin), children: /* @__PURE__ */ jsx9(plugins.avatar.value, { ctx, turn }) }) : void 0
1653
1684
  }
1654
1685
  ),
1655
- turn.role === "assistant" && /* @__PURE__ */ jsx8(TurnNotes, { turn })
1686
+ turn.role === "assistant" && /* @__PURE__ */ jsx9(TurnNotes, { turn })
1656
1687
  ] }, i - olderCount);
1657
1688
  }),
1658
- busy && state.stalled && /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-tertiary", children: state.stalled.message ?? t.stalled }),
1689
+ busy && state.stalled && /* @__PURE__ */ jsx9("p", { className: "text-sm text-text-tertiary", children: state.stalled.message ?? t.stalled }),
1659
1690
  state.queued.map((q, i) => (
1660
1691
  // Esperan a que termine el run vivo (el servidor no los dejó entrar): salen solos.
1661
- /* @__PURE__ */ jsxs6("div", { "data-queued": true, className: "flex flex-col items-end gap-1 opacity-60", children: [
1662
- /* @__PURE__ */ jsx8(UserBubble, { turn: { role: "user", text: q.text, ...q.attachments ? { attachments: q.attachments } : {} } }),
1663
- /* @__PURE__ */ jsx8("span", { className: "text-xs text-text-tertiary", children: t.queued })
1692
+ /* @__PURE__ */ jsxs7("div", { "data-queued": true, className: "flex flex-col items-end gap-1 opacity-60", children: [
1693
+ /* @__PURE__ */ jsx9(UserBubble, { turn: { role: "user", text: q.text, ...q.attachments ? { attachments: q.attachments } : {} } }),
1694
+ /* @__PURE__ */ jsx9("span", { className: "text-xs text-text-tertiary", children: t.queued })
1664
1695
  ] }, `q${i}`)
1665
1696
  )),
1666
1697
  permissionCards,
1667
- busy && !toolRunning && !cards.length && (Waiting ? /* @__PURE__ */ jsx8("div", { ...mark(plugins.waiting.plugin), children: /* @__PURE__ */ jsx8(Waiting, { ctx, step: state.step, since: state.turnStartedAt }) }) : /* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1.5", children: [
1668
- /* @__PURE__ */ jsx8(TypingDots, {}),
1669
- /* @__PURE__ */ jsx8(WaitLabel, { since: state.turnStartedAt, step: state.step, showDuration: features.duration !== false })
1698
+ busy && !toolRunning && !cards.length && (Waiting ? /* @__PURE__ */ jsx9("div", { ...mark(plugins.waiting.plugin), children: /* @__PURE__ */ jsx9(Waiting, { ctx, step: state.step, since: state.turnStartedAt }) }) : /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-1.5", children: [
1699
+ /* @__PURE__ */ jsx9(TypingDots, {}),
1700
+ /* @__PURE__ */ jsx9(WaitLabel, { since: state.turnStartedAt, step: state.step, showDuration: features.duration !== false })
1670
1701
  ] })),
1671
- !busy && props.background && /* @__PURE__ */ jsxs6("div", { "data-background": true, className: "flex flex-col gap-1.5", children: [
1672
- /* @__PURE__ */ jsx8(TypingDots, {}),
1673
- /* @__PURE__ */ jsx8(WaitLabel, { text: props.background.label, since: props.background.since, showDuration: features.duration !== false })
1702
+ !busy && props.background && /* @__PURE__ */ jsxs7("div", { "data-background": true, className: "flex flex-col gap-1.5", children: [
1703
+ /* @__PURE__ */ jsx9(TypingDots, {}),
1704
+ /* @__PURE__ */ jsx9(WaitLabel, { text: props.background.label, since: props.background.since, showDuration: features.duration !== false })
1674
1705
  ] }),
1675
- notice && /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-tertiary", children: notice }),
1676
- error && /* @__PURE__ */ jsx8("p", { className: "text-sm text-text-danger", children: error })
1706
+ notice && /* @__PURE__ */ jsx9("p", { className: "text-sm text-text-tertiary", children: notice }),
1707
+ error && /* @__PURE__ */ jsx9("p", { className: "text-sm text-text-danger", children: error })
1677
1708
  ] }),
1678
- /* @__PURE__ */ jsx8("div", { ref: spacer, "aria-hidden": true })
1709
+ /* @__PURE__ */ jsx9("div", { ref: spacer, "aria-hidden": true })
1679
1710
  ]
1680
1711
  }
1681
1712
  ),
1682
- /* @__PURE__ */ jsxs6("div", { className: "relative mx-auto w-full max-w-[784px] px-4 pb-4 sm:px-6 sm:pb-6", children: [
1683
- !atBottom && /* @__PURE__ */ jsx8(
1713
+ /* @__PURE__ */ jsxs7("div", { className: "relative mx-auto w-full max-w-[784px] px-4 pb-4 sm:px-6 sm:pb-6", children: [
1714
+ !atBottom && /* @__PURE__ */ jsx9(
1684
1715
  "button",
1685
1716
  {
1686
1717
  type: "button",
1687
1718
  onClick: toBottom,
1688
1719
  "aria-label": t.goToLatest,
1689
1720
  className: "absolute -top-12 left-1/2 z-10 flex h-9 w-9 -translate-x-1/2 items-center justify-center rounded-full border border-border-primary bg-background-secondary text-text-secondary shadow-lg transition hover:text-text-primary",
1690
- children: /* @__PURE__ */ jsx8(ArrowDown, { className: "h-4 w-4" })
1721
+ children: /* @__PURE__ */ jsx9(ArrowDown, { className: "h-4 w-4" })
1691
1722
  }
1692
1723
  ),
1693
1724
  state.cutRun && !busy && // El servidor cortó la respuesta (deploy, caja caída): la persona decide si sigue.
1694
- /* @__PURE__ */ jsxs6("div", { "data-cut-run": true, role: "status", className: "mb-2 flex items-center gap-3 rounded-2xl border border-border-primary bg-background-secondary px-3 py-2 text-sm text-text-secondary", children: [
1695
- /* @__PURE__ */ jsx8("span", { className: "min-w-0 flex-1", children: state.cutRun.reason ?? t.runCut }),
1696
- /* @__PURE__ */ jsx8(
1725
+ /* @__PURE__ */ jsxs7("div", { "data-cut-run": true, role: "status", className: "mb-2 flex items-center gap-3 rounded-2xl border border-border-primary bg-background-secondary px-3 py-2 text-sm text-text-secondary", children: [
1726
+ /* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1", children: state.cutRun.reason ?? t.runCut }),
1727
+ /* @__PURE__ */ jsx9(
1697
1728
  "button",
1698
1729
  {
1699
1730
  type: "button",
@@ -1722,23 +1753,23 @@ function pluginAttrs(plugin, styled) {
1722
1753
  return styled.has(plugin) ? { "data-plugin": plugin } : { "data-plugin": plugin, "data-piloto-isolate": "" };
1723
1754
  }
1724
1755
  function Views({ items, ctx, inline, className, styled }) {
1725
- return /* @__PURE__ */ jsx8(Fragment4, { children: items.map(
1726
- ({ plugin, value: C }) => inline ? /* @__PURE__ */ jsx8("span", { ...pluginAttrs(plugin, styled), style: { display: "contents" }, children: /* @__PURE__ */ jsx8(C, { ctx }) }, plugin) : /* @__PURE__ */ jsx8("div", { ...pluginAttrs(plugin, styled), className, children: /* @__PURE__ */ jsx8(C, { ctx }) }, plugin)
1756
+ return /* @__PURE__ */ jsx9(Fragment4, { children: items.map(
1757
+ ({ plugin, value: C }) => inline ? /* @__PURE__ */ jsx9("span", { ...pluginAttrs(plugin, styled), style: { display: "contents" }, children: /* @__PURE__ */ jsx9(C, { ctx }) }, plugin) : /* @__PURE__ */ jsx9("div", { ...pluginAttrs(plugin, styled), className, children: /* @__PURE__ */ jsx9(C, { ctx }) }, plugin)
1727
1758
  ) });
1728
1759
  }
1729
1760
  function TurnNotes({ turn }) {
1730
1761
  const { strings: t } = usePiloto();
1731
1762
  const failed = (turn.custom ?? []).filter((c) => c.name === "ghosty.attachments_failed").flatMap((c) => (c.value?.files ?? []).filter((f) => f?.name));
1732
1763
  if (!failed.length && !turn.truncated) return null;
1733
- return /* @__PURE__ */ jsxs6("div", { "data-turn-notes": true, className: "mt-1 flex flex-col gap-0.5 text-xs text-text-tertiary", children: [
1734
- failed.map((f, i) => /* @__PURE__ */ jsx8("p", { children: t.attachmentFailed(f.name, f.reason) }, i)),
1735
- turn.truncated && /* @__PURE__ */ jsx8("p", { children: turn.truncated.reason ?? t.truncated })
1764
+ return /* @__PURE__ */ jsxs7("div", { "data-turn-notes": true, className: "mt-1 flex flex-col gap-0.5 text-xs text-text-tertiary", children: [
1765
+ failed.map((f, i) => /* @__PURE__ */ jsx9("p", { children: t.attachmentFailed(f.name, f.reason) }, i)),
1766
+ turn.truncated && /* @__PURE__ */ jsx9("p", { children: turn.truncated.reason ?? t.truncated })
1736
1767
  ] });
1737
1768
  }
1738
1769
 
1739
1770
  // src/react/Subagents.tsx
1740
1771
  import { useState as useState9 } from "react";
1741
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1772
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1742
1773
  var DOT = {
1743
1774
  running: "bg-brand-500 animate-pulse",
1744
1775
  completed: "bg-text-tertiary",
@@ -1752,28 +1783,28 @@ function Subagents({ pilot, defaultOpen = false, showFinished = true, className
1752
1783
  const tasks = showFinished ? all : all.filter((x) => x.status === "running");
1753
1784
  if (!tasks.length) return null;
1754
1785
  const running = all.filter((x) => x.status === "running").length;
1755
- return /* @__PURE__ */ jsxs7("div", { "data-subagents": true, className: `mb-2 rounded-2xl border border-border-primary bg-background-secondary text-sm ${className}`, children: [
1756
- /* @__PURE__ */ jsxs7("button", { type: "button", onClick: () => setOpen((o) => !o), "aria-expanded": open, className: "flex w-full items-center gap-2 px-3 py-2 text-left text-text-secondary", children: [
1757
- /* @__PURE__ */ jsx9("span", { className: `h-2 w-2 shrink-0 rounded-full ${running ? DOT.running : DOT.completed}` }),
1758
- /* @__PURE__ */ jsx9("span", { className: "flex-1 truncate", children: running ? t.subagentsWorking(running) : t.subagentsDone(tasks.length) }),
1759
- /* @__PURE__ */ jsx9("span", { "aria-hidden": true, className: `text-text-tertiary transition-transform ${open ? "rotate-180" : ""}`, children: "\u2304" })
1786
+ return /* @__PURE__ */ jsxs8("div", { "data-subagents": true, className: `mb-2 rounded-2xl border border-border-primary bg-background-secondary text-sm ${className}`, children: [
1787
+ /* @__PURE__ */ jsxs8("button", { type: "button", onClick: () => setOpen((o) => !o), "aria-expanded": open, className: "flex w-full items-center gap-2 px-3 py-2 text-left text-text-secondary", children: [
1788
+ /* @__PURE__ */ jsx10("span", { className: `h-2 w-2 shrink-0 rounded-full ${running ? DOT.running : DOT.completed}` }),
1789
+ /* @__PURE__ */ jsx10("span", { className: "flex-1 truncate", children: running ? t.subagentsWorking(running) : t.subagentsDone(tasks.length) }),
1790
+ /* @__PURE__ */ jsx10("span", { "aria-hidden": true, className: `text-text-tertiary transition-transform ${open ? "rotate-180" : ""}`, children: "\u2304" })
1760
1791
  ] }),
1761
- open && /* @__PURE__ */ jsx9("ul", { className: "flex flex-col border-t border-border-primary", children: tasks.map((task) => /* @__PURE__ */ jsx9(SubagentRow, { task, onStop: () => void pilot.stopSubagent(task.id) }, task.id)) })
1792
+ open && /* @__PURE__ */ jsx10("ul", { className: "flex flex-col border-t border-border-primary", children: tasks.map((task) => /* @__PURE__ */ jsx10(SubagentRow, { task, onStop: () => void pilot.stopSubagent(task.id) }, task.id)) })
1762
1793
  ] });
1763
1794
  }
1764
1795
  function SubagentRow({ task, onStop }) {
1765
1796
  const { strings: t } = usePiloto();
1766
1797
  const line = task.status === "running" ? task.lastTool : task.summary ?? task.lastTool;
1767
- return /* @__PURE__ */ jsxs7("li", { "data-subagent": task.id, "data-status": task.status, className: "flex items-center gap-2 px-3 py-2", children: [
1768
- /* @__PURE__ */ jsx9("span", { className: `h-2 w-2 shrink-0 rounded-full ${DOT[task.status] ?? DOT.completed}` }),
1769
- /* @__PURE__ */ jsxs7("div", { className: "min-w-0 flex-1", children: [
1770
- /* @__PURE__ */ jsx9("div", { className: "truncate text-text-primary", children: task.title ?? task.id }),
1771
- /* @__PURE__ */ jsxs7("div", { className: "truncate text-xs text-text-tertiary", children: [
1798
+ return /* @__PURE__ */ jsxs8("li", { "data-subagent": task.id, "data-status": task.status, className: "flex items-center gap-2 px-3 py-2", children: [
1799
+ /* @__PURE__ */ jsx10("span", { className: `h-2 w-2 shrink-0 rounded-full ${DOT[task.status] ?? DOT.completed}` }),
1800
+ /* @__PURE__ */ jsxs8("div", { className: "min-w-0 flex-1", children: [
1801
+ /* @__PURE__ */ jsx10("div", { className: "truncate text-text-primary", children: task.title ?? task.id }),
1802
+ /* @__PURE__ */ jsxs8("div", { className: "truncate text-xs text-text-tertiary", children: [
1772
1803
  t.subagentStatus[task.status] ?? task.status,
1773
1804
  line ? ` \xB7 ${line}` : ""
1774
1805
  ] })
1775
1806
  ] }),
1776
- task.status === "running" && /* @__PURE__ */ jsx9("button", { type: "button", onClick: onStop, className: "shrink-0 rounded-full border border-border-primary px-2.5 py-0.5 text-xs text-text-secondary transition hover:text-text-danger", children: t.subagentStop })
1807
+ task.status === "running" && /* @__PURE__ */ jsx10("button", { type: "button", onClick: onStop, className: "shrink-0 rounded-full border border-border-primary px-2.5 py-0.5 text-xs text-text-secondary transition hover:text-text-danger", children: t.subagentStop })
1777
1808
  ] });
1778
1809
  }
1779
1810
  export {
@@ -1786,6 +1817,7 @@ export {
1786
1817
  CopyUserMessage,
1787
1818
  DEFAULT_TOOL_ICONS,
1788
1819
  DecisionLines,
1820
+ DeliveryCard,
1789
1821
  InlineMarkdown,
1790
1822
  LinkSafetyModal,
1791
1823
  Markdown,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SquarePen,
3
3
  X
4
- } from "../chunks/chunk-AQBQ3QZH.js";
4
+ } from "../chunks/chunk-5DVFSEQM.js";
5
5
 
6
6
  // src/split/index.tsx
7
7
  import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
package/dist/styles.css CHANGED
@@ -348,6 +348,9 @@
348
348
  .piloto .h-9:not([data-piloto-isolate] *) {
349
349
  height: calc(var(--spacing) * 9);
350
350
  }
351
+ .piloto .h-10:not([data-piloto-isolate] *) {
352
+ height: calc(var(--spacing) * 10);
353
+ }
351
354
  .piloto .h-16:not([data-piloto-isolate] *) {
352
355
  height: calc(var(--spacing) * 16);
353
356
  }
@@ -731,6 +734,12 @@
731
734
  .piloto .border-current:not([data-piloto-isolate] *) {
732
735
  border-color: currentcolor;
733
736
  }
737
+ .piloto .border-irongray\/20:not([data-piloto-isolate] *) {
738
+ border-color: var(--color-irongray);
739
+ @supports (color: color-mix(in lab, red, red)) {
740
+ border-color: color-mix(in oklab, var(--color-irongray) 20%, transparent);
741
+ }
742
+ }
734
743
  .piloto .border-muted-foreground\/30:not([data-piloto-isolate] *) {
735
744
  border-color: var(--color-muted-foreground);
736
745
  @supports (color: color-mix(in lab, red, red)) {
@@ -851,6 +860,12 @@
851
860
  background-color: color-mix(in oklab, var(--color-brand-500) 15%, transparent);
852
861
  }
853
862
  }
863
+ .piloto .bg-irongray\/5:not([data-piloto-isolate] *) {
864
+ background-color: var(--color-irongray);
865
+ @supports (color: color-mix(in lab, red, red)) {
866
+ background-color: color-mix(in oklab, var(--color-irongray) 5%, transparent);
867
+ }
868
+ }
854
869
  .piloto .bg-irongray\/10:not([data-piloto-isolate] *) {
855
870
  background-color: var(--color-irongray);
856
871
  @supports (color: color-mix(in lab, red, red)) {
@@ -989,6 +1004,9 @@
989
1004
  .piloto .pr-1:not([data-piloto-isolate] *) {
990
1005
  padding-right: var(--spacing);
991
1006
  }
1007
+ .piloto .pr-2:not([data-piloto-isolate] *) {
1008
+ padding-right: calc(var(--spacing) * 2);
1009
+ }
992
1010
  .piloto .pb-4:not([data-piloto-isolate] *) {
993
1011
  padding-bottom: calc(var(--spacing) * 4);
994
1012
  }
@@ -1367,6 +1385,14 @@
1367
1385
  .piloto .hover\:border-brand-300:hover:not([data-piloto-isolate] *) {
1368
1386
  border-color: var(--color-brand-300);
1369
1387
  }
1388
+ .piloto .hover\:border-brand-500\/40:hover:not([data-piloto-isolate] *) {
1389
+ border-color: var(--color-brand-500);
1390
+ }
1391
+ @supports (color: color-mix(in lab, red, red)) {
1392
+ .piloto .hover\:border-brand-500\/40:hover:not([data-piloto-isolate] *) {
1393
+ border-color: color-mix(in oklab, var(--color-brand-500) 40%, transparent);
1394
+ }
1395
+ }
1370
1396
  .piloto .hover\:border-text-tertiary:hover:not([data-piloto-isolate] *) {
1371
1397
  border-color: var(--color-text-tertiary);
1372
1398
  }
@@ -1398,9 +1424,25 @@
1398
1424
  background-color: color-mix(in oklab, var(--color-black) 5%, transparent);
1399
1425
  }
1400
1426
  }
1427
+ .piloto .hover\:bg-brand-500\/5:hover:not([data-piloto-isolate] *) {
1428
+ background-color: var(--color-brand-500);
1429
+ }
1430
+ @supports (color: color-mix(in lab, red, red)) {
1431
+ .piloto .hover\:bg-brand-500\/5:hover:not([data-piloto-isolate] *) {
1432
+ background-color: color-mix(in oklab, var(--color-brand-500) 5%, transparent);
1433
+ }
1434
+ }
1401
1435
  .piloto .hover\:bg-brand-600:hover:not([data-piloto-isolate] *) {
1402
1436
  background-color: var(--color-brand-600);
1403
1437
  }
1438
+ .piloto .hover\:bg-irongray\/10:hover:not([data-piloto-isolate] *) {
1439
+ background-color: var(--color-irongray);
1440
+ }
1441
+ @supports (color: color-mix(in lab, red, red)) {
1442
+ .piloto .hover\:bg-irongray\/10:hover:not([data-piloto-isolate] *) {
1443
+ background-color: color-mix(in oklab, var(--color-irongray) 10%, transparent);
1444
+ }
1445
+ }
1404
1446
  .piloto .hover\:bg-irongray\/20:hover:not([data-piloto-isolate] *) {
1405
1447
  background-color: var(--color-irongray);
1406
1448
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghostykit",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Ghosty Autopilot — the autopilot chat for your React app, on AG-UI: works with LangGraph, Mastra, CrewAI or any AG-UI agent. Streaming text, agent steps, human approval cards (interrupt/resume), attachments and voice.",
5
5
  "type": "module",
6
6
  "main": "./dist/core/index.js",