@getparallel/parx 0.0.0-stage → 0.4.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.
- package/CHANGELOG.md +32 -0
- package/LICENSE +12 -0
- package/README.md +138 -2
- package/dist/actualizar.js +112 -0
- package/dist/agente.js +231 -0
- package/dist/api.js +95 -0
- package/dist/carriles.js +44 -0
- package/dist/cli.js +700 -0
- package/dist/config.js +112 -0
- package/dist/consejos.js +54 -0
- package/dist/cuenta.js +261 -0
- package/dist/diff.js +80 -0
- package/dist/herramientas.js +498 -0
- package/dist/imagenes.js +94 -0
- package/dist/informe.js +65 -0
- package/dist/marca.js +200 -0
- package/dist/mision.js +16 -0
- package/dist/modelos.js +28 -0
- package/dist/notificar.js +112 -0
- package/dist/qr.js +272 -0
- package/dist/registro.js +24 -0
- package/dist/seguridad.js +164 -0
- package/dist/shell.js +108 -0
- package/dist/texto.js +165 -0
- package/dist/textos.js +273 -0
- package/dist/tui.js +1198 -0
- package/dist/ui.js +287 -0
- package/package.json +60 -4
package/dist/textos.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
export const TEXTOS = {
|
|
2
|
+
'tui.escribe': 'Type a task, or / for commands',
|
|
3
|
+
'tui.escribe_carril': 'Lane {n}: type a task, or Enter to start',
|
|
4
|
+
'tui.parar': 'esc to stop',
|
|
5
|
+
'tui.salir_otra': 'Press Ctrl+C again to exit',
|
|
6
|
+
'tui.en_cola': 'Queued: sent when this finishes',
|
|
7
|
+
'tui.hola': 'Hi, {nombre}.',
|
|
8
|
+
'tui.hola_sin_nombre': 'Hi.',
|
|
9
|
+
'tui.pegado': 'Pasted · {n} lines',
|
|
10
|
+
'tui.pegado_corto': 'Pasted · {n} characters',
|
|
11
|
+
'tui.imagen': 'Image · {nombre}',
|
|
12
|
+
'tui.si': 'Yes',
|
|
13
|
+
'tui.no': 'No',
|
|
14
|
+
'tui.siempre': 'Yes, don’t ask again',
|
|
15
|
+
'tui.siempre_corto': 'Always',
|
|
16
|
+
'tui.si_carpeta': 'Yes, allow this folder',
|
|
17
|
+
'tui.si_carpeta_corto': 'Folder',
|
|
18
|
+
'tui.si_ediciones': 'Yes, allow all edits',
|
|
19
|
+
'tui.si_ediciones_corto': 'All edits',
|
|
20
|
+
'tui.una_vez': 'Yes, this once',
|
|
21
|
+
'tui.atajos': 'Shift+Tab mode · ↑ ↓ history · Esc stops a task · Ctrl+C twice exits · Ctrl+L redraws',
|
|
22
|
+
'modo.ask': 'Ask',
|
|
23
|
+
'modo.auto': 'Auto',
|
|
24
|
+
'modo.read': 'Read only',
|
|
25
|
+
'modo.bypass': 'Bypass',
|
|
26
|
+
'modo.ask.desc': 'Asks before every change and command (default)',
|
|
27
|
+
'modo.auto.desc': 'No questions inside the project and allowed folders',
|
|
28
|
+
'modo.read.desc': 'Only reads: changes nothing',
|
|
29
|
+
'modo.bypass.desc': 'No questions anywhere (credentials still ask)',
|
|
30
|
+
'modo.ahora': 'Mode: {modo}. {desc}.',
|
|
31
|
+
'bypass.on': 'Bypass is on for this session. Shift+Tab or /mode ask turns it off.',
|
|
32
|
+
'bypass.cancelado': 'Bypass not turned on. Still in {modo}.',
|
|
33
|
+
'bypass.flag': 'Bypass is on (--bypass): no questions anywhere this session, except for credentials.',
|
|
34
|
+
'bypass.confirmar': 'Are you sure you want to turn on Bypass? parx will read, write and run anything on this computer without asking.',
|
|
35
|
+
'bypass.aceptar': 'Accept',
|
|
36
|
+
'bypass.rechazar': 'Decline',
|
|
37
|
+
'bypass.arriba': 'Bypass is on',
|
|
38
|
+
'bypass.arriba_desc': 'parx reads, writes and runs anything on this computer without asking. Credentials still ask. Shift+Tab turns it off.',
|
|
39
|
+
'bypass.no_flag': 'Use --bypass to start in Bypass. It is never saved as the default.',
|
|
40
|
+
'modelo.ahora': 'Model: {modelo}. {desc}',
|
|
41
|
+
'carpeta.ok': 'Allowed folder: {ruta}. parx works there like in the project.',
|
|
42
|
+
'carpeta.lista': 'Allowed folders: {lista}',
|
|
43
|
+
'carpeta.ninguna': 'Only the project folder. Add one with /folder <path>.',
|
|
44
|
+
'carpeta.no_existe': 'That folder does not exist: {ruta}',
|
|
45
|
+
'trabajo.ruta': 'Tracing the route',
|
|
46
|
+
'trabajo.carriles': 'On the rails',
|
|
47
|
+
'trabajo.puntos': 'Connecting the dots',
|
|
48
|
+
'trabajo.numeros': 'Running the numbers',
|
|
49
|
+
'trabajo.afinar': 'Fine-tuning',
|
|
50
|
+
'trabajo.agujas': 'Switching tracks',
|
|
51
|
+
'trabajo.mapa': 'Reading the map',
|
|
52
|
+
'trabajo.estacion': 'Nearing the station',
|
|
53
|
+
'hace.leer': 'Reading {n} files',
|
|
54
|
+
'hace.leer_uno': 'Reading {ruta}',
|
|
55
|
+
'hace.listar': 'Looking around {ruta}',
|
|
56
|
+
'hace.buscar': 'Searching for {patron}',
|
|
57
|
+
'hace.escribir': 'Writing {ruta}',
|
|
58
|
+
'hace.editar': 'Editing {ruta}',
|
|
59
|
+
'hace.cambios': 'Changing {n} files',
|
|
60
|
+
'hace.tests': 'Running tests',
|
|
61
|
+
'hace.build': 'Building',
|
|
62
|
+
'hace.instalar': 'Installing',
|
|
63
|
+
'hace.ejecutar': 'Running {comando}',
|
|
64
|
+
'hace.esperando': 'Waiting for you',
|
|
65
|
+
'hace.informe': 'Writing the report',
|
|
66
|
+
'hace.mision': 'Handing it to Parallel',
|
|
67
|
+
'herr.leer': 'Read',
|
|
68
|
+
'herr.listar': 'List',
|
|
69
|
+
'herr.buscar': 'Search',
|
|
70
|
+
'herr.escribir': 'Write',
|
|
71
|
+
'herr.editar': 'Edit',
|
|
72
|
+
'herr.ejecutar': 'Run',
|
|
73
|
+
'herr.fallo': 'exit {n} · {s}',
|
|
74
|
+
'pregunta.ejecutar': 'Run this command?',
|
|
75
|
+
'pregunta.escribir': 'Apply this change?',
|
|
76
|
+
'pregunta.leer_fuera': 'Read outside the project? {carpeta}',
|
|
77
|
+
'pregunta.escribir_fuera': 'Write outside the project? {carpeta}',
|
|
78
|
+
'pregunta.credencial': 'This is a credentials file or command. Allow it?',
|
|
79
|
+
'pregunta.opciones': '1 yes · 2 yes, and don’t ask again · 3 no',
|
|
80
|
+
'pregunta.opciones_dos': '1 yes · 2 no',
|
|
81
|
+
'pregunta.respuesta': 'Choose a number',
|
|
82
|
+
'aviso.rechazado': 'Not done: you declined it.',
|
|
83
|
+
'aviso.credenciales': 'Credentials: {que}. Its contents would go to Parallel to work on it, never to the log.',
|
|
84
|
+
'aviso.solo_lectura': 'Read only: nothing changed (/mode to change it).',
|
|
85
|
+
'aviso.fuera': 'outside the project',
|
|
86
|
+
'aviso.riesgo': 'Careful: this command may have effects outside the project ({motivo}).',
|
|
87
|
+
'estado.hecho': 'Done',
|
|
88
|
+
'estado.interrumpido': 'Stopped.',
|
|
89
|
+
'estado.acciones': '{n} Actions',
|
|
90
|
+
'estado.accion': '1 Action',
|
|
91
|
+
'estado.total': 'This session: {acciones} · {tiempo}',
|
|
92
|
+
'cuenta.sin_sesion': 'You are not signed in. Run: parx login',
|
|
93
|
+
'cuenta.abre': 'Open this address and approve the code',
|
|
94
|
+
'cuenta.codigo': 'Your code',
|
|
95
|
+
'cuenta.abriendo': 'Opening your browser…',
|
|
96
|
+
'cuenta.esperando': 'Waiting for you to approve it on getparallel.net…',
|
|
97
|
+
'cuenta.ok': 'Signed in as {correo}.',
|
|
98
|
+
'cuenta.rechazado': 'You declined access in the browser.',
|
|
99
|
+
'cuenta.caducado': 'The code expired. Run again: parx login',
|
|
100
|
+
'cuenta.fuera': 'Signed out on this computer.',
|
|
101
|
+
'cuenta.saldo': '{n} Actions',
|
|
102
|
+
'cuenta.quien': '{correo} · {n} Actions available',
|
|
103
|
+
'cuenta.cuenta': 'Account',
|
|
104
|
+
'cuenta.plan': 'Plan',
|
|
105
|
+
'cuenta.acciones': 'Actions',
|
|
106
|
+
'cuenta.entrada': 'Signed in',
|
|
107
|
+
'cuenta.via_navegador': 'browser, on {equipo}',
|
|
108
|
+
'cuenta.via_clave': 'API key “{nombre}” ({prefijo}…)',
|
|
109
|
+
'cuenta.via_entorno': 'PARALLEL_API_KEY variable',
|
|
110
|
+
'entrar.como': 'How do you want to sign in?',
|
|
111
|
+
'entrar.navegador': 'In the browser',
|
|
112
|
+
'entrar.navegador_nota': 'recommended',
|
|
113
|
+
'entrar.clave': 'With an API key',
|
|
114
|
+
'entrar.clave_nota': 'for CI and servers',
|
|
115
|
+
'entrar.sin_navegador': 'No browser on this machine',
|
|
116
|
+
'entrar.sin_navegador_nota': 'open the link on your phone',
|
|
117
|
+
'entrar.ssh_nota': 'recommended over SSH',
|
|
118
|
+
'entrar.elige': 'Choose 1, 2 or 3',
|
|
119
|
+
'entrar.ya': 'You are signed in as {correo}. Signing in with another account ends this session on this machine.',
|
|
120
|
+
'entrar.pega_clave': 'Paste your API key (hidden while you type)',
|
|
121
|
+
'entrar.crea_clave': 'Create one at getparallel.net/settings/parallel-code',
|
|
122
|
+
'entrar.clave_mala': 'That is not a parx key: they start with par_key_.',
|
|
123
|
+
'entrar.clave_no_vale': 'That key does not work: it may have been revoked.',
|
|
124
|
+
'entrar.ok_clave': 'Signed in as {correo}, with the key “{nombre}”.',
|
|
125
|
+
'entrar.abre_en_otro': 'On your phone or another computer, open',
|
|
126
|
+
'entrar.escanea': 'or scan this code with the camera',
|
|
127
|
+
'entrar.ok_sin_correo': 'Signed in.',
|
|
128
|
+
'entrar.entorno_mal': 'PARALLEL_API_KEY does not look like a parx key (par_key_…): ignored.',
|
|
129
|
+
'salir.clave': 'Signed out here. The key is still active: revoke it in Settings if you no longer use it.',
|
|
130
|
+
'salir.entorno': 'You are signed in with PARALLEL_API_KEY: remove it from your environment to sign out.',
|
|
131
|
+
'salir.todas': 'Signed out on {n} terminals. API keys stay active.',
|
|
132
|
+
'nombre.nuevo': 'parallel-code is now called parx. Type “parx”.',
|
|
133
|
+
'update.disponible': 'parx {version} available · run `parx update`',
|
|
134
|
+
'update.al_dia': 'parx {version} is the latest version.',
|
|
135
|
+
'update.sin_red': 'Could not reach npm to check for a new version. Try again later.',
|
|
136
|
+
'update.lanzando': 'Updating with: {orden}',
|
|
137
|
+
'update.hecho': 'Done. parx is now up to date.',
|
|
138
|
+
'update.fallo': 'The update did not finish. Run it yourself: {orden}',
|
|
139
|
+
'update.npx': 'You are running parx through npx. Use `npx @getparallel/parx@latest` to always get the latest version.',
|
|
140
|
+
'update.desarrollo': 'This is a development copy of parx (not installed from npm). Update it with git pull.',
|
|
141
|
+
'error.sin_saldo': 'You are out of Actions. Top up or upgrade at getparallel.net/settings/billing',
|
|
142
|
+
'error.sin_acceso': 'Your account does not have parx yet: it is in testing.',
|
|
143
|
+
'error.sesion': 'Your session expired. Run: parx login',
|
|
144
|
+
'error.red': 'Could not reach Parallel: {detalle}',
|
|
145
|
+
'error.servidor': 'Parallel could not answer right now ({detalle}). Try again.',
|
|
146
|
+
'error.demasiado': 'This conversation is too long. Type /new to start another one.',
|
|
147
|
+
'repl.adios': 'See you.',
|
|
148
|
+
'repl.registro': 'Log of this session: {ruta}',
|
|
149
|
+
'repl.nueva': 'New conversation.',
|
|
150
|
+
'repl.desconocido': 'Unknown command. Type /help.',
|
|
151
|
+
'repl.deshecho': 'Undone: {ruta}',
|
|
152
|
+
'repl.nada_que_deshacer': 'Nothing to undo.',
|
|
153
|
+
'repl.ensenar_on': 'Teach mode on: parx explains each step as it codes, like a teacher. /teach off to stop.',
|
|
154
|
+
'repl.ensenar_off': 'Teach mode off.',
|
|
155
|
+
'repl.avisos_on': 'Desktop notifications on: if you switch windows, parx tells you when it finishes or needs you.',
|
|
156
|
+
'repl.avisos_off': 'Desktop notifications off.',
|
|
157
|
+
'imagen.grande': 'That image is too big ({mb} MB). Crop it or use a smaller one (up to {max} MB).',
|
|
158
|
+
'imagen.no_se_lee': 'Could not read the image {ruta}.',
|
|
159
|
+
'informe.nada': 'Nothing to report yet: do a task first.',
|
|
160
|
+
'informe.copiado': 'Copied to the clipboard. Paste it into an email or WhatsApp.',
|
|
161
|
+
'informe.titulo': 'Report',
|
|
162
|
+
'mision.nada': 'Tell me what Parallel should keep doing: /mission <goal>, or do a task first.',
|
|
163
|
+
'mision.explica': 'It becomes a Parallel mission: it keeps running on Parallel’s servers after you close the terminal (research, writing, your connected apps), not on the files of this computer. You get a phone notification when it is done.',
|
|
164
|
+
'mision.creada': 'Mission on its way. Follow it at {url}',
|
|
165
|
+
'mision.plan': 'Planning it now. It launches on its own when the plan is ready; you can close parx.',
|
|
166
|
+
'mision.lanzada': 'Launched. Parallel is working on it.',
|
|
167
|
+
'mision.cerradas': 'New missions are paused for maintenance. Try again later.',
|
|
168
|
+
'mision.limite': 'Your plan or your Actions do not cover this mission. See getparallel.net/settings/billing',
|
|
169
|
+
'mision.no_disponible': 'Missions are not available right now.',
|
|
170
|
+
'carriles.cuantas': 'Lanes run 2 or 3 tasks at the same time, each in its own lane.',
|
|
171
|
+
'carriles.empieza': '{n} lanes on their way.',
|
|
172
|
+
'carriles.hecho': '{n} lanes done',
|
|
173
|
+
'carriles.carril': 'Lane {n}',
|
|
174
|
+
'carriles.en_marcha': '{n} of {total} lanes running',
|
|
175
|
+
'carriles.max': 'Up to 3 lanes at once.',
|
|
176
|
+
'carriles.min': 'Lanes need at least 2 tasks.',
|
|
177
|
+
'aviso.termino': 'Done: {tarea}',
|
|
178
|
+
'aviso.te_necesita': 'parx needs you: {pregunta}',
|
|
179
|
+
'consejos.titulo': 'Tips from parx',
|
|
180
|
+
'consejos.quitar': '{orden} to hide them',
|
|
181
|
+
'consejos.encendidos': 'Tips on: they will show when parx opens.',
|
|
182
|
+
'consejos.apagados': 'Tips off. Bring them back with {orden}.',
|
|
183
|
+
'tip.menu': 'Opens the command menu; it filters as you type',
|
|
184
|
+
'tip.modo': 'Changes the mode: Ask, Auto or Read only',
|
|
185
|
+
'tip.una': 'From your shell: does that one task and exits',
|
|
186
|
+
'tip.historial': 'Brings back what you sent before',
|
|
187
|
+
'tip.pegar': 'A long text becomes one chip and is sent whole',
|
|
188
|
+
'tip.deshacer': 'Undoes the last change to a file',
|
|
189
|
+
'tip.modelo': 'Swift for simple things, Summit for hard ones',
|
|
190
|
+
'tip.parar': 'Stops the task that is running',
|
|
191
|
+
'tip.cola': 'While it works, your next task waits in line',
|
|
192
|
+
'tip.saldo': 'How many Actions you have left',
|
|
193
|
+
'tip.cuenta': 'Your account, plan and Actions, without a session',
|
|
194
|
+
'tip.agents': 'Project instructions that parx always reads',
|
|
195
|
+
'tip.imagen': 'Drag a screenshot into the input: parx looks at it',
|
|
196
|
+
'tip.carriles': 'Two or three tasks at once, each in its own lane',
|
|
197
|
+
'tip.informe': 'A plain summary of what was done, ready to paste',
|
|
198
|
+
'tip.ensenar': 'Explains each step as it codes, like a teacher',
|
|
199
|
+
'tip.mision': 'Keeps the work going on Parallel after you close parx',
|
|
200
|
+
};
|
|
201
|
+
export function t(clave, datos = {}) {
|
|
202
|
+
const plantilla = TEXTOS[clave] ?? clave;
|
|
203
|
+
return plantilla.replace(/\{(\w+)\}/g, (m, k) => (k in datos ? String(datos[k]) : m));
|
|
204
|
+
}
|
|
205
|
+
export const COMANDOS = [
|
|
206
|
+
['help', 'Commands and shortcuts'],
|
|
207
|
+
['mode', 'Ask, Auto, Read only or Bypass'],
|
|
208
|
+
['model', 'Swift, Stride or Summit'],
|
|
209
|
+
['folder', 'Let parx work in another folder'],
|
|
210
|
+
['lanes', 'Run 2 or 3 tasks at once'],
|
|
211
|
+
['mission', 'Keep it running on Parallel, phone alert when done'],
|
|
212
|
+
['report', 'Plain summary to paste in email or WhatsApp'],
|
|
213
|
+
['teach', 'Explain each step, like a teacher'],
|
|
214
|
+
['undo', 'Undo the last change to a file'],
|
|
215
|
+
['new', 'Start a new conversation'],
|
|
216
|
+
['balance', 'Your account and your Actions'],
|
|
217
|
+
['notify', 'Desktop notifications: on or off'],
|
|
218
|
+
['tips', 'Tips when it opens: on or off'],
|
|
219
|
+
['log', 'Where the log of what it does is kept'],
|
|
220
|
+
['exit', 'Leave parx'],
|
|
221
|
+
];
|
|
222
|
+
export const ALIAS_COMANDO = {
|
|
223
|
+
help: 'help', '?': 'help', ayuda: 'help',
|
|
224
|
+
mode: 'mode', modo: 'mode',
|
|
225
|
+
model: 'model', modelo: 'model',
|
|
226
|
+
folder: 'folder', 'add-folder': 'folder', carpeta: 'folder', dir: 'folder',
|
|
227
|
+
lanes: 'lanes', carriles: 'lanes',
|
|
228
|
+
mission: 'mission', mision: 'mission', misión: 'mission',
|
|
229
|
+
report: 'report', informe: 'report',
|
|
230
|
+
teach: 'teach', class: 'teach', clase: 'teach',
|
|
231
|
+
undo: 'undo', deshacer: 'undo',
|
|
232
|
+
new: 'new', clear: 'new', nueva: 'new',
|
|
233
|
+
balance: 'balance', account: 'balance', saldo: 'balance',
|
|
234
|
+
notify: 'notify', notifications: 'notify', avisos: 'notify',
|
|
235
|
+
tips: 'tips', hints: 'tips', consejos: 'tips',
|
|
236
|
+
log: 'log', registro: 'log',
|
|
237
|
+
exit: 'exit', quit: 'exit', salir: 'exit',
|
|
238
|
+
};
|
|
239
|
+
export const ALIAS_SI_NO = {
|
|
240
|
+
on: 'si', yes: 'si', y: 'si', '1': 'si', si: 'si', 'sí': 'si',
|
|
241
|
+
off: 'no', no: 'no', n: 'no', '0': 'no',
|
|
242
|
+
};
|
|
243
|
+
export const USO = [
|
|
244
|
+
'Usage:',
|
|
245
|
+
' parx interactive session in this folder',
|
|
246
|
+
' parx "task" do the task and exit',
|
|
247
|
+
' parx --lanes "task" "task" ... 2 or 3 tasks at once, each in its own lane',
|
|
248
|
+
' parx login | logout | account',
|
|
249
|
+
' parx update update parx to the latest version',
|
|
250
|
+
'',
|
|
251
|
+
'Options:',
|
|
252
|
+
' --mode ask|auto|read Ask (default), Auto inside the project, Read only',
|
|
253
|
+
' --bypass no questions anywhere this session (credentials still ask)',
|
|
254
|
+
' --model swift|stride|summit Stride 1.0 by default',
|
|
255
|
+
' --add-folder <path> let parx work in another folder too (repeatable)',
|
|
256
|
+
' --sandbox on macOS, run commands in a sandbox (writes only in the project)',
|
|
257
|
+
' --dir <folder> the project folder (default: current)',
|
|
258
|
+
' --ascii plain characters only (also NO_COLOR for no color)',
|
|
259
|
+
' --version, --help',
|
|
260
|
+
'',
|
|
261
|
+
'Sign in:',
|
|
262
|
+
' parx login choose how (browser, API key or no browser)',
|
|
263
|
+
' parx login --browser with this computer’s browser',
|
|
264
|
+
' parx login --api-key with an API key (pasted, or piped: echo $KEY | parx login --api-key)',
|
|
265
|
+
' parx login --no-browser short link, code and QR to open on your phone (SSH)',
|
|
266
|
+
' parx account who you are, your plan, your Actions and how you signed in',
|
|
267
|
+
' parx logout [--all] sign out here, or on every terminal',
|
|
268
|
+
' PARALLEL_API_KEY=par_key_… sign in with that key without saving anything (CI)',
|
|
269
|
+
'',
|
|
270
|
+
'Updates:',
|
|
271
|
+
' parx checks npm for a new version at most once a day, without slowing anything down.',
|
|
272
|
+
' PARX_NO_UPDATE_CHECK=1 turn that check off',
|
|
273
|
+
].join('\n');
|