@leg3ndy/otto-bridge 1.0.11 → 1.0.12

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 CHANGED
@@ -15,7 +15,7 @@ Para o estado atual da arquitetura, capacidades entregues, limitacoes e roadmap
15
15
 
16
16
  Para o corte de arquitetura do `0.9.0`, veja [`leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_0_9_0_RELEASE.md`](../leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_0_9_0_RELEASE.md).
17
17
 
18
- Para a release atual `1.0.11`, com redraw do composer TTY endurecido para terminais reais, cursor alinhado ao placeholder e multiline sem abrir caixas duplicadas, veja [`leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_11_PATCH.md`](../leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_11_PATCH.md).
18
+ Para a release atual `1.0.12`, com composer TTY simplificado para um prompt multiline sem moldura, cursor alinhado ao placeholder e newline sem abrir caixas duplicadas, veja [`leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_12_PATCH.md`](../leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_12_PATCH.md).
19
19
 
20
20
  ## Distribuicao
21
21
 
@@ -38,14 +38,14 @@ Enquanto o pacote nao estiver publicado, voce pode gerar um tarball local:
38
38
 
39
39
  ```bash
40
40
  npm pack
41
- npm install -g ./leg3ndy-otto-bridge-1.0.11.tgz
41
+ npm install -g ./leg3ndy-otto-bridge-1.0.12.tgz
42
42
  ```
43
43
 
44
- Na linha `1.0.11`, `playwright` segue como dependencia obrigatoria no `otto-bridge`. O primeiro `npm install -g @leg3ndy/otto-bridge` pode demorar mais porque instala o browser persistente usado pelo WhatsApp Web e pelos fluxos web em background do bridge.
44
+ Na linha `1.0.12`, `playwright` segue como dependencia obrigatoria no `otto-bridge`. O primeiro `npm install -g @leg3ndy/otto-bridge` pode demorar mais porque instala o browser persistente usado pelo WhatsApp Web e pelos fluxos web em background do bridge.
45
45
 
46
- No macOS, a linha `1.0.11` usa o provider `macos-helper`, um helper `WKWebView` sem Dock para o WhatsApp Web. O helper sobe com user-agent de Chrome moderno para evitar o bloqueio do WhatsApp ao detectar Safari/WebKit. O runtime antigo com Chromium/Playwright fica disponivel apenas como override explicito via `OTTO_BRIDGE_WHATSAPP_RUNTIME_PROVIDER=embedded-playwright`.
46
+ No macOS, a linha `1.0.12` usa o provider `macos-helper`, um helper `WKWebView` sem Dock para o WhatsApp Web. O helper sobe com user-agent de Chrome moderno para evitar o bloqueio do WhatsApp ao detectar Safari/WebKit. O runtime antigo com Chromium/Playwright fica disponivel apenas como override explicito via `OTTO_BRIDGE_WHATSAPP_RUNTIME_PROVIDER=embedded-playwright`.
47
47
 
48
- No nivel arquitetural, o `0.9.0` marcou a mudanca de papel do bridge: ele publica tools e resultados estruturados para o Otto, em vez de injetar resposta pronta como caminho principal do chat. O `1.0.0` oficializou isso como runtime agentico; o `1.0.11` preserva esse fluxo, endurece o redraw do input-box TTY para terminais mais temperamentais, mantem o composer multiline e melhora as views de status/extensoes e o refresh ao sair do `Terminal`.
48
+ No nivel arquitetural, o `0.9.0` marcou a mudanca de papel do bridge: ele publica tools e resultados estruturados para o Otto, em vez de injetar resposta pronta como caminho principal do chat. O `1.0.0` oficializou isso como runtime agentico; o `1.0.12` preserva esse fluxo, simplifica o prompt TTY para evitar artefatos de moldura em terminais mais temperamentais, mantem o composer multiline e melhora as views de status/extensoes e o refresh ao sair do `Terminal`.
49
49
 
50
50
  ## Publicacao
51
51
 
@@ -157,7 +157,7 @@ Esse comando abre um shell local interativo para instalar extensoes, rodar coman
157
157
 
158
158
  ### WhatsApp Web em background
159
159
 
160
- Fluxo recomendado na linha `1.0.11`:
160
+ Fluxo recomendado na linha `1.0.12`:
161
161
 
162
162
  ```bash
163
163
  otto-bridge extensions --install whatsappweb
@@ -167,13 +167,13 @@ otto-bridge extensions --status whatsappweb
167
167
 
168
168
  O setup agora abre o login do WhatsApp Web no helper/background browser do proprio bridge. Depois do QR code, o Otto usa a sessao local em background, sem depender de aba visivel no Safari.
169
169
 
170
- Contrato da linha `1.0.11`:
170
+ Contrato da linha `1.0.12`:
171
171
 
172
172
  - `otto-bridge extensions --setup whatsappweb`: autentica a sessao uma vez
173
173
  - `otto-bridge`: mantem o browser persistente do WhatsApp vivo em background enquanto o runtime do hub estiver ativo, sem depender de uma aba aberta no Safari
174
174
  - ao fechar o `otto-bridge`: o browser em background e desligado, mas a sessao local fica lembrada para o proximo boot
175
175
 
176
- ## Handoff rapido da linha 1.0.11
176
+ ## Handoff rapido da linha 1.0.12
177
177
 
178
178
  Ja fechado no codigo:
179
179
 
@@ -54,7 +54,7 @@ const MAX_RENDERED_FILE_CHARS_COMPACT = 1_400;
54
54
  const CONSOLE_PLACEHOLDER = "Peça algo ao Otto";
55
55
  const CONSOLE_COMMAND_HINT = "/help, /model [fast|thinking], /status, /clear, /exit";
56
56
  const CONSOLE_COMPOSER_PROMPT_WIDTH = 2;
57
- const CONSOLE_COMPOSER_CURSOR_COLUMN = 4;
57
+ const CONSOLE_COMPOSER_CURSOR_COLUMN = 2;
58
58
  class CliRuntimeSession {
59
59
  config;
60
60
  runtime = null;
@@ -674,22 +674,6 @@ function printConsoleScreen(runtimeSession, modelMode) {
674
674
  printSoft(`Comandos: ${CONSOLE_COMMAND_HINT}`);
675
675
  console.log("");
676
676
  }
677
- function renderPromptFrameLine(width, edgeLeft, edgeRight) {
678
- return style(`${edgeLeft}${"─".repeat(width)}${edgeRight}`, ANSI.brandBlue, supportsAnsi());
679
- }
680
- function renderConsolePromptContentLine(text, width, tone) {
681
- const enabled = supportsAnsi();
682
- const border = style("│", ANSI.brandBlue, enabled);
683
- if (tone === "input") {
684
- const prompt = `${style(">", `${ANSI.bold}${ANSI.white}`, enabled)} ${" ".repeat(Math.max(0, width - 2))}`;
685
- return `${border} ${prompt} ${border}`;
686
- }
687
- const clipped = padRight(truncate(text, width), width);
688
- const body = tone === "placeholder"
689
- ? style(clipped, `${ANSI.bold}${ANSI.white}`, enabled)
690
- : style(clipped, ANSI.slateItalic, enabled);
691
- return `${border} ${body} ${border}`;
692
- }
693
677
  function enableTerminalEnhancedKeys() {
694
678
  output.write("\u001b[>4;2m");
695
679
  }
@@ -844,19 +828,15 @@ async function askConsoleInput(rl) {
844
828
  const render = () => {
845
829
  const composer = renderConsoleComposerLines(value, innerWidth, enabled);
846
830
  if (renderedOnce) {
847
- moveCursor(output, 0, -(1 + lastCursorLineIndex));
831
+ moveCursor(output, 0, -lastCursorLineIndex);
848
832
  cursorTo(output, 0);
849
833
  }
850
834
  else {
851
835
  renderedOnce = true;
852
836
  }
853
- const top = renderPromptFrameLine(innerWidth + 2, "┌", "┐");
854
- const border = style("│", ANSI.brandBlue, enabled);
855
- const bottom = renderPromptFrameLine(innerWidth + 2, "└", "┘");
856
- const content = composer.renderedLines.map((line) => `${border} ${line} ${border}`).join("\n");
857
837
  output.write("\u001b[J");
858
- output.write(`${top}\n${content}\n${bottom}`);
859
- moveCursor(output, 0, -(composer.renderedLines.length - composer.cursorLineIndex));
838
+ output.write(composer.renderedLines.join("\n"));
839
+ moveCursor(output, 0, -Math.max(0, composer.renderedLines.length - 1 - composer.cursorLineIndex));
860
840
  cursorTo(output, CONSOLE_COMPOSER_CURSOR_COLUMN + composer.cursorColumn);
861
841
  lastRenderedLineCount = composer.renderedLines.length;
862
842
  lastCursorLineIndex = composer.cursorLineIndex;
@@ -867,7 +847,7 @@ async function askConsoleInput(rl) {
867
847
  };
868
848
  const submitPrompt = () => {
869
849
  if (renderedOnce) {
870
- moveCursor(output, 0, lastRenderedLineCount - lastCursorLineIndex + 1);
850
+ moveCursor(output, 0, Math.max(0, lastRenderedLineCount - 1 - lastCursorLineIndex));
871
851
  cursorTo(output, 0);
872
852
  }
873
853
  cleanup();
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const BRIDGE_CONFIG_VERSION = 1;
2
- export const BRIDGE_VERSION = "1.0.11";
2
+ export const BRIDGE_VERSION = "1.0.12";
3
3
  export const BRIDGE_PACKAGE_NAME = "@leg3ndy/otto-bridge";
4
4
  export const DEFAULT_API_BASE_URL = "http://localhost:8000";
5
5
  export const DEFAULT_POLL_INTERVAL_MS = 3000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leg3ndy/otto-bridge",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Local companion for Otto Bridge device pairing and WebSocket runtime.",
@@ -24,7 +24,7 @@ if (!existsSync(mainPath)) {
24
24
  process.exit(0);
25
25
  }
26
26
 
27
- console.log("\n[otto-bridge] Welcome to OTTOAI 1.0.11");
27
+ console.log("\n[otto-bridge] Welcome to OTTOAI 1.0.12");
28
28
  console.log("[otto-bridge] Vamos iniciar o setup interativo do bridge.\n");
29
29
 
30
30
  const result = spawnSync(process.execPath, [mainPath, "setup", "--postinstall"], {