ghostykit 0.2.0 → 0.3.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/README.md +9 -4
- package/dist/chunks/{chunk-KZOMMG2D.js → chunk-D6JXJWYM.js} +12 -4
- package/dist/chunks/{chunk-XWOGK2HN.js → chunk-O6FCE4CS.js} +8 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +3 -1
- package/dist/core/reducer.d.ts +5 -0
- package/dist/fonts.css +3 -3
- package/dist/react/Bubble.d.ts +4 -2
- package/dist/react/Chips.d.ts +7 -3
- package/dist/react/Composer.d.ts +4 -1
- package/dist/react/InlineMarkdown.d.ts +5 -0
- package/dist/react/Piloto.d.ts +8 -0
- package/dist/react/Status.d.ts +1 -1
- package/dist/react/Steps.d.ts +11 -6
- package/dist/react/index.d.ts +2 -1
- package/dist/react/index.js +636 -411
- package/dist/styles.css +651 -502
- package/dist/transport/index.js +1 -1
- package/dist/transport/postStream.d.ts +3 -3
- package/dist/transport/types.d.ts +7 -2
- package/package.json +1 -1
package/dist/transport/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SendInput, Turn } from "../core/types";
|
|
2
|
-
import { type PilotTransport } from "./types";
|
|
2
|
+
import { type PilotHistory, type PilotTransport } from "./types";
|
|
3
3
|
/** Un evento SSE ya separado: nombre + data crudo. */
|
|
4
4
|
export interface SseMessage {
|
|
5
5
|
event: string;
|
|
@@ -22,8 +22,8 @@ export interface PostStreamTransportOptions {
|
|
|
22
22
|
attachUrl?: string | null;
|
|
23
23
|
/** URL del historial (JSON). Default `url`; `null` = sin historial. */
|
|
24
24
|
historyUrl?: string | null;
|
|
25
|
-
/** Cómo leer el historial. Default: `{messages:[{role:"user"|"agent",text}]}`. */
|
|
26
|
-
parseHistory?: (json: unknown) => Turn[];
|
|
25
|
+
/** Cómo leer el historial. Default: `{messages:[{role:"user"|"agent",text}], pending:[permission…]}`. */
|
|
26
|
+
parseHistory?: (json: unknown) => Turn[] | PilotHistory;
|
|
27
27
|
/** URL para cancelar (POST). Sin ella, «detener» sólo deja de escuchar: el turno sigue en el servidor. */
|
|
28
28
|
cancelUrl?: string;
|
|
29
29
|
/** Silencio (sin un solo byte, ni `: ka`) tras el que la conexión se da por muerta. Default 60 s. */
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type { SendInput, SendResult, Turn } from "../core/types";
|
|
1
|
+
import type { PermissionRequest, SendInput, SendResult, Turn } from "../core/types";
|
|
2
|
+
/** El hilo guardado y las tarjetas de permiso que siguen abiertas (EasyBits: `pending`). */
|
|
3
|
+
export interface PilotHistory {
|
|
4
|
+
turns: Turn[];
|
|
5
|
+
permissions?: PermissionRequest[];
|
|
6
|
+
}
|
|
2
7
|
/** Un evento con nombre y su `data` ya parseado (`null` si no traía o no era JSON). */
|
|
3
8
|
export type PilotListener = (name: string, data: unknown) => void;
|
|
4
9
|
export interface SubscribeOptions {
|
|
@@ -19,7 +24,7 @@ export interface PilotTransport {
|
|
|
19
24
|
resolved: boolean;
|
|
20
25
|
}>;
|
|
21
26
|
/** El hilo guardado, para pintarlo al montar (si la app no pasa `initialTurns`). */
|
|
22
|
-
history?(): Promise<Turn[]>;
|
|
27
|
+
history?(): Promise<Turn[] | PilotHistory>;
|
|
23
28
|
/**
|
|
24
29
|
* ¿Se puede mandar un mensaje con un turno en vuelo (steer)? Default `true` (Ghosty). Con
|
|
25
30
|
* `false` (el servidor contesta 409) el composer no deja mandar hasta que el turno cierre.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghostykit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Piloto UI \u2014 the in-app copilot chat from Ghosty Studio: streaming, agent steps, attachments, voice, reconnection and human approval cards. Pure event reducer + SSE transport + React components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/core/index.js",
|