@7ots/cli 0.1.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 (97) hide show
  1. package/.env.example +140 -0
  2. package/LICENSE +21 -0
  3. package/README.md +655 -0
  4. package/brand/apple-touch-icon.png +0 -0
  5. package/brand/favicon.svg +4 -0
  6. package/brand/icon-512.png +0 -0
  7. package/brand/mark-mono.svg +3 -0
  8. package/brand/mark.svg +4 -0
  9. package/brand/og-es.png +0 -0
  10. package/brand/og-pt.png +0 -0
  11. package/brand/og.png +0 -0
  12. package/brand/ots.json +11 -0
  13. package/brand/tokens.css +59 -0
  14. package/brand/wordmark.svg +5 -0
  15. package/cli/7ots.mjs +400 -0
  16. package/cli/lib/brain.mjs +143 -0
  17. package/cli/lib/config.mjs +70 -0
  18. package/cli/lib/hooks.mjs +151 -0
  19. package/cli/lib/i18n.mjs +480 -0
  20. package/cli/lib/identity.mjs +51 -0
  21. package/cli/lib/install.mjs +79 -0
  22. package/cli/lib/lines.mjs +73 -0
  23. package/cli/lib/meet.mjs +166 -0
  24. package/cli/lib/open.mjs +19 -0
  25. package/cli/lib/orquesta.mjs +84 -0
  26. package/cli/lib/paths.mjs +49 -0
  27. package/cli/lib/pet-core.mjs +184 -0
  28. package/cli/lib/pet-server.mjs +296 -0
  29. package/cli/lib/prompts.mjs +75 -0
  30. package/cli/lib/terminal.mjs +145 -0
  31. package/cli/lib/ui.mjs +234 -0
  32. package/cli/lib/wizard.mjs +279 -0
  33. package/cli/pet/electron/main.cjs +86 -0
  34. package/cli/pet/pet.html +404 -0
  35. package/dist/7ots.esm.js +627 -0
  36. package/dist/7ots.esm.js.map +7 -0
  37. package/dist/7ots.iife.js +627 -0
  38. package/dist/7ots.iife.js.map +7 -0
  39. package/llms.txt +57 -0
  40. package/package.json +73 -0
  41. package/server/admin.mjs +213 -0
  42. package/server/apuchat-relay.mjs +170 -0
  43. package/server/channels/agent.mjs +136 -0
  44. package/server/channels/apuchat.mjs +364 -0
  45. package/server/channels/apumail.mjs +211 -0
  46. package/server/channels/index.mjs +69 -0
  47. package/server/contact.mjs +151 -0
  48. package/server/demo.mjs +154 -0
  49. package/server/i18n.mjs +54 -0
  50. package/server/identity.mjs +108 -0
  51. package/server/llm.mjs +413 -0
  52. package/server/platform/auth.mjs +290 -0
  53. package/server/platform/crypto.mjs +80 -0
  54. package/server/platform/db.mjs +130 -0
  55. package/server/platform/routes.mjs +388 -0
  56. package/server/platform/runtime.mjs +180 -0
  57. package/server/platform/store.mjs +331 -0
  58. package/server/sdk.mjs +125 -0
  59. package/server/server.mjs +456 -0
  60. package/server/settings.mjs +177 -0
  61. package/server/tts.mjs +186 -0
  62. package/skills/7ots/SKILL.md +59 -0
  63. package/src/actions/ActionRegistry.js +254 -0
  64. package/src/actions/PageTools.js +270 -0
  65. package/src/actions/builtins.js +565 -0
  66. package/src/auth/AuthManager.js +128 -0
  67. package/src/avatar/AvatarStage.js +473 -0
  68. package/src/character/AvatarEditor.js +829 -0
  69. package/src/character/Character.js +1191 -0
  70. package/src/character/motion.js +794 -0
  71. package/src/character/parts.js +559 -0
  72. package/src/context/ContextManager.js +472 -0
  73. package/src/core/AgentBrain.js +341 -0
  74. package/src/core/AgentWidget.js +1059 -0
  75. package/src/core/EventBus.js +61 -0
  76. package/src/core/Proactivity.js +363 -0
  77. package/src/core/storage.js +35 -0
  78. package/src/i18n/index.js +193 -0
  79. package/src/i18n/messages/character.js +543 -0
  80. package/src/i18n/messages/identity.js +141 -0
  81. package/src/i18n/messages/platform.js +114 -0
  82. package/src/i18n/messages/server.js +630 -0
  83. package/src/i18n/messages/widget.js +362 -0
  84. package/src/identity/ContactCard.js +351 -0
  85. package/src/identity/Face.js +148 -0
  86. package/src/identity/random.js +112 -0
  87. package/src/identity/schema.js +262 -0
  88. package/src/index.js +117 -0
  89. package/src/integrations/apuchat.js +212 -0
  90. package/src/integrations/apumail.js +88 -0
  91. package/src/llm/ProxyLLM.js +87 -0
  92. package/src/mcp/McpClient.js +153 -0
  93. package/src/ui/Companion.js +498 -0
  94. package/src/ui/UIManager.js +425 -0
  95. package/src/ui/VirtualPointer.js +746 -0
  96. package/src/ui/markdown.js +94 -0
  97. package/src/voice/VoiceEngine.js +227 -0
@@ -0,0 +1,362 @@
1
+ /**
2
+ * Textos del widget <ots-agent> (chat, menús, compañero, ratón virtual, confirmaciones,
3
+ * contacto con el equipo). Módulo con efectos: al importarlo registra el catálogo.
4
+ *
5
+ * Lo que va al LLM (prompt de sistema, descripciones de herramientas, resultados de acciones)
6
+ * NO está aquí: es texto para el modelo, no para el visitante.
7
+ */
8
+
9
+ import { addCatalog } from '../index.js';
10
+
11
+ addCatalog({
12
+ es: {
13
+ widget: {
14
+ defaultName: 'Asistente',
15
+ launcher: { open: 'Abrir asistente {name}' },
16
+ panel: { label: 'Asistente {name}' },
17
+ teaser: { dismiss: 'Descartar' },
18
+ status: { online: 'En línea', thinking: 'Pensando…', withTeam: 'Con el equipo' },
19
+ typing: 'El asistente está pensando',
20
+ voice: { on: 'Voz activada', off: 'Voz silenciada', mute: 'Silenciar voz', micDenied: 'Permiso de micrófono denegado' },
21
+ menu: {
22
+ contact: 'Contactar con el equipo',
23
+ more: 'Más opciones',
24
+ minimize: 'Minimizar',
25
+ initiativeLabel: 'Iniciativa del asistente',
26
+ initiative: 'Iniciativa',
27
+ level: { quiet: 'Discreta', normal: 'Normal', bold: 'Atrevida' },
28
+ muteSuggestions: 'Silenciar sugerencias',
29
+ unmuteSuggestions: 'Activar sugerencias',
30
+ reset: 'Nueva conversación',
31
+ },
32
+ composer: {
33
+ placeholder: 'Escribe o pulsa el micrófono…',
34
+ placeholderTeam: 'Escribe al equipo…',
35
+ label: 'Mensaje',
36
+ mic: 'Hablar',
37
+ send: 'Enviar',
38
+ },
39
+ footer: { ai: 'Asistente con IA · puede equivocarse' },
40
+ pageTools: { done: 'Hecho: {title}' },
41
+ handoff: {
42
+ team: 'Equipo de soporte',
43
+ author: 'Equipo',
44
+ video: 'Videollamada',
45
+ back: 'Volver al asistente',
46
+ userLeft: 'El usuario volvió al asistente',
47
+ ended: 'La conversación con el equipo terminó.',
48
+ closed: 'El canal de soporte se cerró.',
49
+ sendFailed: 'No se pudo enviar el mensaje al equipo.',
50
+ },
51
+ brain: {
52
+ stuck: 'Me he quedado a medias; ¿quieres que lo intente de otra forma?',
53
+ error: 'Uy, tuve un problema para responder. ¿Lo intentamos de nuevo?',
54
+ },
55
+ pointer: {
56
+ stopped: 'Detenido. No haré nada más hasta que me lo pidas.',
57
+ hint: 'Esc para detener',
58
+ halted: 'Detenido',
59
+ typing: 'escribiendo…',
60
+ },
61
+ companion: {
62
+ talkTo: 'Hablar con {name}',
63
+ pointAt: 'Señalar',
64
+ tour: 'Recorrido',
65
+ goHome: 'Volver al rincón',
66
+ },
67
+ dialog: {
68
+ close: 'Cerrar',
69
+ confirm: 'Confirmar',
70
+ ok: 'Aceptar',
71
+ cancel: 'Cancelar',
72
+ info: 'Información',
73
+ gotIt: 'Entendido',
74
+ },
75
+ confirm: {
76
+ title: 'Confirmar acción',
77
+ yes: 'Sí, continuar',
78
+ runAction: '¿Autorizas al asistente a ejecutar "{action}"?',
79
+ mcp: 'El asistente quiere ejecutar "{action}" en tu cuenta. ¿Continuar?',
80
+ click: 'El asistente quiere pulsar "{label}". ¿Continuar?',
81
+ typeSubmit: '¿Escribo el texto y envío el formulario?',
82
+ enterSubmit: 'El asistente quiere pulsar Enter en "{label}", lo que envía el formulario. ¿Continuar?',
83
+ fillSubmit: '¿Envío el formulario con los datos que rellené?',
84
+ pageTool: 'El asistente quiere usar "{title}". ¿Continuar?',
85
+ pageToolWith: 'El asistente quiere usar "{title}" con {detail}. ¿Continuar?',
86
+ },
87
+ contact: {
88
+ human: 'Hablar con una persona',
89
+ mail: 'Dejar un mensaje por correo',
90
+ askHuman: 'Quiero hablar con una persona del equipo.',
91
+ askMail: 'Quiero dejar un mensaje por correo al equipo.',
92
+ mailPreview: 'Se enviará este mensaje al equipo de soporte:\n\nAsunto: {subject}\nRespuesta a: {to}\n\n{message}',
93
+ noEmail: '(sin email)',
94
+ ticket: 'Ticket {id}',
95
+ replyTo: 'Te responderemos a {email}.',
96
+ humanConfirm: '¿Quieres que te conecte ahora con una persona del equipo? Verá un resumen de esta conversación.',
97
+ connected: 'Conectado con el equipo. Te responderán aquí mismo.',
98
+ handoffIntro: 'Hola, soy {name}. Motivo: {reason}.\n\nResumen del asistente: {summary}\n\nPágina: {url}',
99
+ visitor: 'un visitante',
100
+ },
101
+ actions: {
102
+ get_page_context: 'Mirando la página',
103
+ find_on_page: 'Buscando en la página',
104
+ read_element: 'Leyendo',
105
+ navigate: 'Navegando',
106
+ scroll_to: 'Desplazando',
107
+ click: 'Haciendo click',
108
+ hover: 'Moviendo el ratón',
109
+ type_text: 'Escribiendo',
110
+ press_key: 'Pulsando teclas',
111
+ drag_and_drop: 'Arrastrando',
112
+ scroll: 'Desplazando',
113
+ fill_form: 'Rellenando el formulario',
114
+ highlight: 'Señalando',
115
+ show_toast: 'Mostrando aviso',
116
+ show_modal: 'Abriendo ventana',
117
+ show_card: 'Mostrando información',
118
+ open_sidebar: 'Abriendo panel',
119
+ close_panels: 'Cerrando paneles',
120
+ send_email_ticket: 'Enviando correo al equipo',
121
+ escalate_to_human: 'Conectando con una persona',
122
+ point_at: 'Señalando',
123
+ tour: 'Visita guiada',
124
+ go_home: 'Volviendo a su rincón',
125
+ },
126
+ },
127
+ },
128
+
129
+ en: {
130
+ widget: {
131
+ defaultName: 'Assistant',
132
+ launcher: { open: 'Open assistant {name}' },
133
+ panel: { label: 'Assistant {name}' },
134
+ teaser: { dismiss: 'Dismiss' },
135
+ status: { online: 'Online', thinking: 'Thinking…', withTeam: 'With the team' },
136
+ typing: 'The assistant is thinking',
137
+ voice: { on: 'Voice on', off: 'Voice muted', mute: 'Mute voice', micDenied: 'Microphone permission denied' },
138
+ menu: {
139
+ contact: 'Contact the team',
140
+ more: 'More options',
141
+ minimize: 'Minimize',
142
+ initiativeLabel: 'Assistant initiative',
143
+ initiative: 'Initiative',
144
+ level: { quiet: 'Quiet', normal: 'Normal', bold: 'Bold' },
145
+ muteSuggestions: 'Mute suggestions',
146
+ unmuteSuggestions: 'Turn on suggestions',
147
+ reset: 'New conversation',
148
+ },
149
+ composer: {
150
+ placeholder: 'Type or tap the microphone…',
151
+ placeholderTeam: 'Write to the team…',
152
+ label: 'Message',
153
+ mic: 'Speak',
154
+ send: 'Send',
155
+ },
156
+ footer: { ai: 'AI assistant · may make mistakes' },
157
+ pageTools: { done: 'Done: {title}' },
158
+ handoff: {
159
+ team: 'Support team',
160
+ author: 'Team',
161
+ video: 'Video call',
162
+ back: 'Back to the assistant',
163
+ userLeft: 'The user went back to the assistant',
164
+ ended: 'The conversation with the team has ended.',
165
+ closed: 'The support channel was closed.',
166
+ sendFailed: "Couldn't send the message to the team.",
167
+ },
168
+ brain: {
169
+ stuck: "I got stuck halfway. Want me to try a different way?",
170
+ error: 'Oops, I had trouble answering. Shall we try again?',
171
+ },
172
+ pointer: {
173
+ stopped: "Stopped. I won't do anything else until you ask me to.",
174
+ hint: 'Esc to stop',
175
+ halted: 'Stopped',
176
+ typing: 'typing…',
177
+ },
178
+ companion: {
179
+ talkTo: 'Talk to {name}',
180
+ pointAt: 'Point out',
181
+ tour: 'Tour',
182
+ goHome: 'Back to the corner',
183
+ },
184
+ dialog: {
185
+ close: 'Close',
186
+ confirm: 'Confirm',
187
+ ok: 'OK',
188
+ cancel: 'Cancel',
189
+ info: 'Information',
190
+ gotIt: 'Got it',
191
+ },
192
+ confirm: {
193
+ title: 'Confirm action',
194
+ yes: 'Yes, continue',
195
+ runAction: 'Allow the assistant to run "{action}"?',
196
+ mcp: 'The assistant wants to run "{action}" on your account. Continue?',
197
+ click: 'The assistant wants to click "{label}". Continue?',
198
+ typeSubmit: 'Shall I type the text and submit the form?',
199
+ enterSubmit: 'The assistant wants to press Enter on "{label}", which submits the form. Continue?',
200
+ fillSubmit: 'Shall I submit the form with the details I filled in?',
201
+ pageTool: 'The assistant wants to use "{title}". Continue?',
202
+ pageToolWith: 'The assistant wants to use "{title}" with {detail}. Continue?',
203
+ },
204
+ contact: {
205
+ human: 'Talk to a person',
206
+ mail: 'Leave a message by email',
207
+ askHuman: "I'd like to talk to someone from the team.",
208
+ askMail: "I'd like to leave the team a message by email.",
209
+ mailPreview: 'This message will be sent to the support team:\n\nSubject: {subject}\nReply to: {to}\n\n{message}',
210
+ noEmail: '(no email)',
211
+ ticket: 'Ticket {id}',
212
+ replyTo: "We'll reply to {email}.",
213
+ humanConfirm: 'Do you want me to connect you with someone from the team now? They will see a summary of this conversation.',
214
+ connected: "Connected with the team. They'll reply right here.",
215
+ handoffIntro: "Hi, I'm {name}. Reason: {reason}.\n\nAssistant's summary: {summary}\n\nPage: {url}",
216
+ visitor: 'a visitor',
217
+ },
218
+ actions: {
219
+ get_page_context: 'Looking at the page',
220
+ find_on_page: 'Searching the page',
221
+ read_element: 'Reading',
222
+ navigate: 'Navigating',
223
+ scroll_to: 'Scrolling',
224
+ click: 'Clicking',
225
+ hover: 'Moving the mouse',
226
+ type_text: 'Typing',
227
+ press_key: 'Pressing keys',
228
+ drag_and_drop: 'Dragging',
229
+ scroll: 'Scrolling',
230
+ fill_form: 'Filling in the form',
231
+ highlight: 'Pointing out',
232
+ show_toast: 'Showing a notice',
233
+ show_modal: 'Opening a window',
234
+ show_card: 'Showing information',
235
+ open_sidebar: 'Opening a panel',
236
+ close_panels: 'Closing panels',
237
+ send_email_ticket: 'Emailing the team',
238
+ escalate_to_human: 'Connecting you with a person',
239
+ point_at: 'Pointing out',
240
+ tour: 'Guided tour',
241
+ go_home: 'Heading back to the corner',
242
+ },
243
+ },
244
+ },
245
+
246
+ pt: {
247
+ widget: {
248
+ defaultName: 'Assistente',
249
+ launcher: { open: 'Abrir assistente {name}' },
250
+ panel: { label: 'Assistente {name}' },
251
+ teaser: { dismiss: 'Dispensar' },
252
+ status: { online: 'Online', thinking: 'Pensando…', withTeam: 'Com a equipe' },
253
+ typing: 'O assistente está pensando',
254
+ voice: { on: 'Voz ativada', off: 'Voz silenciada', mute: 'Silenciar voz', micDenied: 'Permissão de microfone negada' },
255
+ menu: {
256
+ contact: 'Falar com a equipe',
257
+ more: 'Mais opções',
258
+ minimize: 'Minimizar',
259
+ initiativeLabel: 'Iniciativa do assistente',
260
+ initiative: 'Iniciativa',
261
+ level: { quiet: 'Discreta', normal: 'Normal', bold: 'Ousada' },
262
+ muteSuggestions: 'Silenciar sugestões',
263
+ unmuteSuggestions: 'Ativar sugestões',
264
+ reset: 'Nova conversa',
265
+ },
266
+ composer: {
267
+ placeholder: 'Escreva ou toque no microfone…',
268
+ placeholderTeam: 'Escreva para a equipe…',
269
+ label: 'Mensagem',
270
+ mic: 'Falar',
271
+ send: 'Enviar',
272
+ },
273
+ footer: { ai: 'Assistente com IA · pode cometer erros' },
274
+ pageTools: { done: 'Pronto: {title}' },
275
+ handoff: {
276
+ team: 'Equipe de suporte',
277
+ author: 'Equipe',
278
+ video: 'Videochamada',
279
+ back: 'Voltar ao assistente',
280
+ userLeft: 'O usuário voltou ao assistente',
281
+ ended: 'A conversa com a equipe terminou.',
282
+ closed: 'O canal de suporte foi encerrado.',
283
+ sendFailed: 'Não foi possível enviar a mensagem para a equipe.',
284
+ },
285
+ brain: {
286
+ stuck: 'Fiquei na metade do caminho. Quer que eu tente de outro jeito?',
287
+ error: 'Ops, tive um problema para responder. Vamos tentar de novo?',
288
+ },
289
+ pointer: {
290
+ stopped: 'Parei. Não vou fazer mais nada até você pedir.',
291
+ hint: 'Esc para parar',
292
+ halted: 'Parado',
293
+ typing: 'digitando…',
294
+ },
295
+ companion: {
296
+ talkTo: 'Falar com {name}',
297
+ pointAt: 'Apontar',
298
+ tour: 'Tour',
299
+ goHome: 'Voltar ao cantinho',
300
+ },
301
+ dialog: {
302
+ close: 'Fechar',
303
+ confirm: 'Confirmar',
304
+ ok: 'OK',
305
+ cancel: 'Cancelar',
306
+ info: 'Informação',
307
+ gotIt: 'Entendi',
308
+ },
309
+ confirm: {
310
+ title: 'Confirmar ação',
311
+ yes: 'Sim, continuar',
312
+ runAction: 'Autoriza o assistente a executar "{action}"?',
313
+ mcp: 'O assistente quer executar "{action}" na sua conta. Continuar?',
314
+ click: 'O assistente quer clicar em "{label}". Continuar?',
315
+ typeSubmit: 'Posso digitar o texto e enviar o formulário?',
316
+ enterSubmit: 'O assistente quer pressionar Enter em "{label}", o que envia o formulário. Continuar?',
317
+ fillSubmit: 'Posso enviar o formulário com os dados que preenchi?',
318
+ pageTool: 'O assistente quer usar "{title}". Continuar?',
319
+ pageToolWith: 'O assistente quer usar "{title}" com {detail}. Continuar?',
320
+ },
321
+ contact: {
322
+ human: 'Falar com uma pessoa',
323
+ mail: 'Deixar uma mensagem por e-mail',
324
+ askHuman: 'Quero falar com uma pessoa da equipe.',
325
+ askMail: 'Quero deixar uma mensagem por e-mail para a equipe.',
326
+ mailPreview: 'Esta mensagem será enviada para a equipe de suporte:\n\nAssunto: {subject}\nResponder para: {to}\n\n{message}',
327
+ noEmail: '(sem e-mail)',
328
+ ticket: 'Ticket {id}',
329
+ replyTo: 'Vamos responder para {email}.',
330
+ humanConfirm: 'Quer que eu conecte você agora com uma pessoa da equipe? Ela verá um resumo desta conversa.',
331
+ connected: 'Conectado com a equipe. Vão responder aqui mesmo.',
332
+ handoffIntro: 'Olá, sou {name}. Motivo: {reason}.\n\nResumo do assistente: {summary}\n\nPágina: {url}',
333
+ visitor: 'um visitante',
334
+ },
335
+ actions: {
336
+ get_page_context: 'Olhando a página',
337
+ find_on_page: 'Buscando na página',
338
+ read_element: 'Lendo',
339
+ navigate: 'Navegando',
340
+ scroll_to: 'Rolando',
341
+ click: 'Clicando',
342
+ hover: 'Movendo o mouse',
343
+ type_text: 'Digitando',
344
+ press_key: 'Pressionando teclas',
345
+ drag_and_drop: 'Arrastando',
346
+ scroll: 'Rolando',
347
+ fill_form: 'Preenchendo o formulário',
348
+ highlight: 'Apontando',
349
+ show_toast: 'Mostrando aviso',
350
+ show_modal: 'Abrindo janela',
351
+ show_card: 'Mostrando informações',
352
+ open_sidebar: 'Abrindo painel',
353
+ close_panels: 'Fechando painéis',
354
+ send_email_ticket: 'Enviando e-mail para a equipe',
355
+ escalate_to_human: 'Conectando com uma pessoa',
356
+ point_at: 'Apontando',
357
+ tour: 'Visita guiada',
358
+ go_home: 'Voltando ao cantinho',
359
+ },
360
+ },
361
+ },
362
+ });