@leg3ndy/otto-bridge 1.0.9 → 1.0.10
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 +8 -8
- package/dist/cli_terminal.js +20 -7
- package/dist/types.js +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.mjs +1 -1
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.
|
|
18
|
+
Para a release atual `1.0.10`, com redraw/cursor do composer TTY estabilizados e multiline sem rasgar a moldura, veja [`leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_10_PATCH.md`](../leg3ndy-ai-backend/docs/otto-bridge/releases/OTTO_BRIDGE_1_0_10_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.
|
|
41
|
+
npm install -g ./leg3ndy-otto-bridge-1.0.10.tgz
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Na linha `1.0.
|
|
44
|
+
Na linha `1.0.10`, `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.
|
|
46
|
+
No macOS, a linha `1.0.10` 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.
|
|
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.10` preserva esse fluxo, estabiliza redraw/cursor do input-box TTY, 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.
|
|
160
|
+
Fluxo recomendado na linha `1.0.10`:
|
|
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.
|
|
170
|
+
Contrato da linha `1.0.10`:
|
|
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.
|
|
176
|
+
## Handoff rapido da linha 1.0.10
|
|
177
177
|
|
|
178
178
|
Ja fechado no codigo:
|
|
179
179
|
|
package/dist/cli_terminal.js
CHANGED
|
@@ -688,6 +688,18 @@ function renderConsolePromptContentLine(text, width, tone) {
|
|
|
688
688
|
: style(clipped, ANSI.slateItalic, enabled);
|
|
689
689
|
return `${border} ${body} ${border}`;
|
|
690
690
|
}
|
|
691
|
+
function saveCursorPosition() {
|
|
692
|
+
output.write("\u001b[s");
|
|
693
|
+
}
|
|
694
|
+
function restoreCursorPosition() {
|
|
695
|
+
output.write("\u001b[u");
|
|
696
|
+
}
|
|
697
|
+
function enableTerminalEnhancedKeys() {
|
|
698
|
+
output.write("\u001b[>4;2m");
|
|
699
|
+
}
|
|
700
|
+
function disableTerminalEnhancedKeys() {
|
|
701
|
+
output.write("\u001b[>4m");
|
|
702
|
+
}
|
|
691
703
|
function sliceByWidth(text, width) {
|
|
692
704
|
if (width <= 0) {
|
|
693
705
|
return [""];
|
|
@@ -824,9 +836,9 @@ async function askConsoleInput(rl) {
|
|
|
824
836
|
let renderedOnce = false;
|
|
825
837
|
let value = "";
|
|
826
838
|
let pendingControlBuffer = "";
|
|
827
|
-
let previousCursorRowsFromTop = 0;
|
|
828
839
|
const cleanup = () => {
|
|
829
840
|
input.removeListener("data", onData);
|
|
841
|
+
disableTerminalEnhancedKeys();
|
|
830
842
|
input.setRawMode(false);
|
|
831
843
|
input.pause();
|
|
832
844
|
rl.resume();
|
|
@@ -834,21 +846,21 @@ async function askConsoleInput(rl) {
|
|
|
834
846
|
const render = () => {
|
|
835
847
|
const composer = renderConsoleComposerLines(value, innerWidth, enabled);
|
|
836
848
|
if (renderedOnce) {
|
|
837
|
-
|
|
838
|
-
moveCursor(output, 0, -previousCursorRowsFromTop);
|
|
849
|
+
restoreCursorPosition();
|
|
839
850
|
}
|
|
840
851
|
else {
|
|
852
|
+
saveCursorPosition();
|
|
841
853
|
renderedOnce = true;
|
|
842
854
|
}
|
|
855
|
+
saveCursorPosition();
|
|
843
856
|
const top = renderPromptFrameLine(innerWidth + 2, "┌", "┐");
|
|
844
857
|
const border = style("│", ANSI.brandBlue, enabled);
|
|
845
858
|
const bottom = renderPromptFrameLine(innerWidth + 2, "└", "┘");
|
|
846
859
|
const content = composer.renderedLines.map((line) => `${border} ${line} ${border}`).join("\n");
|
|
847
860
|
output.write("\u001b[J");
|
|
848
|
-
output.write(`${top}\n${content}\n${bottom}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
moveCursor(output, 0, -previousCursorRowsFromTop);
|
|
861
|
+
output.write(`${top}\n${content}\n${bottom}`);
|
|
862
|
+
restoreCursorPosition();
|
|
863
|
+
moveCursor(output, 0, 1 + composer.cursorLineIndex);
|
|
852
864
|
cursorTo(output, 4 + composer.cursorColumn);
|
|
853
865
|
};
|
|
854
866
|
const insertNewline = () => {
|
|
@@ -910,6 +922,7 @@ async function askConsoleInput(rl) {
|
|
|
910
922
|
}
|
|
911
923
|
};
|
|
912
924
|
render();
|
|
925
|
+
enableTerminalEnhancedKeys();
|
|
913
926
|
input.on("data", onData);
|
|
914
927
|
});
|
|
915
928
|
}
|
package/dist/types.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const BRIDGE_CONFIG_VERSION = 1;
|
|
2
|
-
export const BRIDGE_VERSION = "1.0.
|
|
2
|
+
export const BRIDGE_VERSION = "1.0.10";
|
|
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
package/scripts/postinstall.mjs
CHANGED
|
@@ -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.
|
|
27
|
+
console.log("\n[otto-bridge] Welcome to OTTOAI 1.0.10");
|
|
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"], {
|