paris-immersion 0.1.5 → 0.1.6

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/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { serveCommand } from './commands/serve.js';
12
12
  const program = new Command()
13
13
  .name('paris')
14
14
  .description('Paris Immersion — CLI do aluno (login, workspace, tarefas)')
15
- .version('0.1.5');
15
+ .version('0.1.6');
16
16
  program
17
17
  .command('login')
18
18
  .description('Autenticar com sua conta Paris (device-code OR --token direto)')
@@ -72,12 +72,14 @@ export async function startRelayAgent(opts) {
72
72
  // "no-op" (reconexão com mesma dimensão) e forçar o Claude a repintar.
73
73
  let ptyCols = 80;
74
74
  let ptyRows = 24;
75
- // Coalescing da saída do pty: o Claude emite a tela em RAJADAS de muitos
76
- // chunks pequenos. Cifrar/enviar cada um (1 AES-GCM + 1 frame WS por chunk)
77
- // é caro e deixa a escrita lenta. Junta numa janela curta → 1 frame por
78
- // rajada. ~12ms é imperceptível e corta o overhead drasticamente.
79
- const COALESCE_MS = 12;
80
- const MAX_OUT_BUF = 64 * 1024;
75
+ // Coalescing da saída do pty: o Claude faz streaming token-a-token (~20-30ms
76
+ // entre tokens). Com janela curta, cada token vira um frame (1 AES-GCM + 1
77
+ // frame WS + 1 round-trip + 1 render) → escrita picotada/lenta. Uma janela
78
+ // maior junta VÁRIOS tokens por frame → escrita lisa, muito menos overhead.
79
+ // O custo é ~Xms a mais de latência — imperceptível pra leitura do curso.
80
+ // Ajustável por env (PARIS_RELAY_COALESCE_MS) pra afinar sem republicar.
81
+ const COALESCE_MS = Math.min(250, Math.max(0, Number(process.env.PARIS_RELAY_COALESCE_MS) || 55));
82
+ const MAX_OUT_BUF = 256 * 1024;
81
83
  let outBuf = '';
82
84
  let flushTimer;
83
85
  const flushOut = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paris-immersion",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Paris Immersion CLI — login, install workspace, status, task control. Para alunos das imersões da Paris Group.",
5
5
  "homepage": "https://parisgroup.ai",
6
6
  "repository": {