@vaia-lab/sdk 0.2.0 → 0.4.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.
@@ -0,0 +1,95 @@
1
+ import * as react from 'react';
2
+ import { f as AgentSpaceContext, a as AgentAction, d as AgentActionResult } from '../agent-1bVw0eB8.cjs';
3
+
4
+ interface HandeiaAgentProps {
5
+ /** capability_id del espacio, el mismo del manifest. */
6
+ capabilityId: string;
7
+ /** Dónde vive Handeia. Un solo endpoint; el SDK no sabe qué hay detrás. */
8
+ handeiaUrl?: string | undefined;
9
+ /** Qué está viendo el usuario AHORA. Se pregunta cada turno, no se cachea. */
10
+ getContext?: (() => AgentSpaceContext | Promise<AgentSpaceContext>) | undefined;
11
+ /** Las mismas acciones que declara el manifest. */
12
+ actions?: AgentAction[] | undefined;
13
+ /** Ejecuta una acción. Solo llega lo que Handeia ya validó. */
14
+ onAction?: ((name: string, args: Record<string, unknown>) => Promise<AgentActionResult> | AgentActionResult) | undefined;
15
+ placeholder?: string | undefined;
16
+ }
17
+ declare function HandeiaAgent(props: HandeiaAgentProps): react.JSX.Element;
18
+
19
+ /**
20
+ * El campo de texto de Handeia — EL MISMO, no una imitación.
21
+ *
22
+ * Es una copia directa de apps/web/src/features/sistema/components/input-bar.tsx,
23
+ * con un solo cambio: el hook de tema, que dependía del proveedor de Handeia y
24
+ * aquí se resuelve leyendo el documento.
25
+ *
26
+ * Se copia en vez de reescribirse a propósito. Una versión "equivalente" se
27
+ * desviaría del original en cuanto alguien lo toque, y entonces el agente
28
+ * dejaría de sentirse Handeia — que es justo el punto de ponerlo dentro de
29
+ * un espacio ajeno.
30
+ */
31
+ declare const MODELS: ({
32
+ id: string;
33
+ label: string;
34
+ note: string;
35
+ disabled: boolean;
36
+ } | {
37
+ id: string;
38
+ label: string;
39
+ note: null;
40
+ disabled: boolean;
41
+ })[];
42
+ interface InputBarConnector {
43
+ id: string;
44
+ name: string;
45
+ status: string;
46
+ }
47
+ interface InputBarProps {
48
+ value: string;
49
+ onChange: (v: string) => void;
50
+ onSend: () => void;
51
+ onFocus?: (() => void) | undefined;
52
+ onBlur?: (() => void) | undefined;
53
+ placeholder?: string | undefined;
54
+ aiPhase?: "idle" | "sent" | "thinking" | "acting" | "done";
55
+ aiStatus?: string;
56
+ sentText?: string;
57
+ thinkingLog?: string[];
58
+ thinkingOpen?: boolean;
59
+ onThinkingToggle?: () => void;
60
+ recording?: boolean;
61
+ recordSecs?: number;
62
+ onStartRecording?: () => void;
63
+ onCancelRecording?: () => void;
64
+ onSendRecording?: () => void;
65
+ voiceMode?: boolean;
66
+ onVoiceModeToggle?: () => void;
67
+ model: string;
68
+ onModelChange: (m: string) => void;
69
+ connectors?: InputBarConnector[];
70
+ onFileSelected?: (file: File) => void;
71
+ onCloudOpen?: () => void;
72
+ onConnectorInsert?: (name: string) => void;
73
+ onNavigateConnectors?: () => void;
74
+ enablePublish?: boolean;
75
+ publishMode?: boolean;
76
+ onPublishModeChange?: (open: boolean) => void;
77
+ pubTitle?: string;
78
+ onPubTitleChange?: (v: string) => void;
79
+ pubBody?: string;
80
+ onPubBodyChange?: (v: string) => void;
81
+ pubFormat?: string;
82
+ onPubFormatChange?: (v: string) => void;
83
+ onPublish?: () => void;
84
+ onPubFileSelected?: (file: File) => void;
85
+ pubFileName?: string | null;
86
+ pubUploading?: boolean;
87
+ actionsEndSlot?: React.ReactNode;
88
+ }
89
+ declare function VoiceCanvas({ recording, voiceMode }: {
90
+ recording: boolean;
91
+ voiceMode: boolean;
92
+ }): react.JSX.Element;
93
+ declare function InputBar({ value, onChange, onSend, onFocus, onBlur, placeholder, aiPhase, aiStatus, sentText, thinkingLog, thinkingOpen, onThinkingToggle, recording, recordSecs, onStartRecording, onCancelRecording, onSendRecording, voiceMode, onVoiceModeToggle, model, onModelChange, connectors, onFileSelected, onCloudOpen, onConnectorInsert, onNavigateConnectors, enablePublish, publishMode, onPublishModeChange, pubTitle, onPubTitleChange, pubBody, onPubBodyChange, pubFormat, onPubFormatChange, onPublish, onPubFileSelected, pubFileName, pubUploading, actionsEndSlot, }: InputBarProps): react.JSX.Element;
94
+
95
+ export { HandeiaAgent, type HandeiaAgentProps, InputBar, type InputBarConnector, type InputBarProps, MODELS, VoiceCanvas };
@@ -0,0 +1,95 @@
1
+ import * as react from 'react';
2
+ import { f as AgentSpaceContext, a as AgentAction, d as AgentActionResult } from '../agent-1bVw0eB8.js';
3
+
4
+ interface HandeiaAgentProps {
5
+ /** capability_id del espacio, el mismo del manifest. */
6
+ capabilityId: string;
7
+ /** Dónde vive Handeia. Un solo endpoint; el SDK no sabe qué hay detrás. */
8
+ handeiaUrl?: string | undefined;
9
+ /** Qué está viendo el usuario AHORA. Se pregunta cada turno, no se cachea. */
10
+ getContext?: (() => AgentSpaceContext | Promise<AgentSpaceContext>) | undefined;
11
+ /** Las mismas acciones que declara el manifest. */
12
+ actions?: AgentAction[] | undefined;
13
+ /** Ejecuta una acción. Solo llega lo que Handeia ya validó. */
14
+ onAction?: ((name: string, args: Record<string, unknown>) => Promise<AgentActionResult> | AgentActionResult) | undefined;
15
+ placeholder?: string | undefined;
16
+ }
17
+ declare function HandeiaAgent(props: HandeiaAgentProps): react.JSX.Element;
18
+
19
+ /**
20
+ * El campo de texto de Handeia — EL MISMO, no una imitación.
21
+ *
22
+ * Es una copia directa de apps/web/src/features/sistema/components/input-bar.tsx,
23
+ * con un solo cambio: el hook de tema, que dependía del proveedor de Handeia y
24
+ * aquí se resuelve leyendo el documento.
25
+ *
26
+ * Se copia en vez de reescribirse a propósito. Una versión "equivalente" se
27
+ * desviaría del original en cuanto alguien lo toque, y entonces el agente
28
+ * dejaría de sentirse Handeia — que es justo el punto de ponerlo dentro de
29
+ * un espacio ajeno.
30
+ */
31
+ declare const MODELS: ({
32
+ id: string;
33
+ label: string;
34
+ note: string;
35
+ disabled: boolean;
36
+ } | {
37
+ id: string;
38
+ label: string;
39
+ note: null;
40
+ disabled: boolean;
41
+ })[];
42
+ interface InputBarConnector {
43
+ id: string;
44
+ name: string;
45
+ status: string;
46
+ }
47
+ interface InputBarProps {
48
+ value: string;
49
+ onChange: (v: string) => void;
50
+ onSend: () => void;
51
+ onFocus?: (() => void) | undefined;
52
+ onBlur?: (() => void) | undefined;
53
+ placeholder?: string | undefined;
54
+ aiPhase?: "idle" | "sent" | "thinking" | "acting" | "done";
55
+ aiStatus?: string;
56
+ sentText?: string;
57
+ thinkingLog?: string[];
58
+ thinkingOpen?: boolean;
59
+ onThinkingToggle?: () => void;
60
+ recording?: boolean;
61
+ recordSecs?: number;
62
+ onStartRecording?: () => void;
63
+ onCancelRecording?: () => void;
64
+ onSendRecording?: () => void;
65
+ voiceMode?: boolean;
66
+ onVoiceModeToggle?: () => void;
67
+ model: string;
68
+ onModelChange: (m: string) => void;
69
+ connectors?: InputBarConnector[];
70
+ onFileSelected?: (file: File) => void;
71
+ onCloudOpen?: () => void;
72
+ onConnectorInsert?: (name: string) => void;
73
+ onNavigateConnectors?: () => void;
74
+ enablePublish?: boolean;
75
+ publishMode?: boolean;
76
+ onPublishModeChange?: (open: boolean) => void;
77
+ pubTitle?: string;
78
+ onPubTitleChange?: (v: string) => void;
79
+ pubBody?: string;
80
+ onPubBodyChange?: (v: string) => void;
81
+ pubFormat?: string;
82
+ onPubFormatChange?: (v: string) => void;
83
+ onPublish?: () => void;
84
+ onPubFileSelected?: (file: File) => void;
85
+ pubFileName?: string | null;
86
+ pubUploading?: boolean;
87
+ actionsEndSlot?: React.ReactNode;
88
+ }
89
+ declare function VoiceCanvas({ recording, voiceMode }: {
90
+ recording: boolean;
91
+ voiceMode: boolean;
92
+ }): react.JSX.Element;
93
+ declare function InputBar({ value, onChange, onSend, onFocus, onBlur, placeholder, aiPhase, aiStatus, sentText, thinkingLog, thinkingOpen, onThinkingToggle, recording, recordSecs, onStartRecording, onCancelRecording, onSendRecording, voiceMode, onVoiceModeToggle, model, onModelChange, connectors, onFileSelected, onCloudOpen, onConnectorInsert, onNavigateConnectors, enablePublish, publishMode, onPublishModeChange, pubTitle, onPubTitleChange, pubBody, onPubBodyChange, pubFormat, onPubFormatChange, onPublish, onPubFileSelected, pubFileName, pubUploading, actionsEndSlot, }: InputBarProps): react.JSX.Element;
94
+
95
+ export { HandeiaAgent, type HandeiaAgentProps, InputBar, type InputBarConnector, type InputBarProps, MODELS, VoiceCanvas };