@ouro.bot/cli 0.1.0-alpha.177 → 0.1.0-alpha.179

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.
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html lang="en" class="dark">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="color-scheme" content="dark" />
7
+ <title>Ouro Outlook</title>
8
+ <meta name="description" content="The daemon-hosted shared orientation surface for agents alive on this machine." />
9
+ <script type="module" crossorigin src="/assets/index-M1l1tDTX.js"></script>
10
+ <link rel="stylesheet" crossorigin href="/assets/index-DN6vVYPm.css">
11
+ </head>
12
+ <body>
13
+ <div id="app"></div>
14
+ </body>
15
+ </html>
@@ -1,43 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.CliStore = void 0;
37
4
  exports.createInkCallbacks = createInkCallbacks;
38
5
  exports.InkCliApp = InkCliApp;
39
6
  const jsx_runtime_1 = require("react/jsx-runtime");
40
- const react_1 = __importStar(require("react"));
7
+ const react_1 = require("react");
41
8
  const ink_1 = require("ink");
42
9
  const streaming_markdown_1 = require("./streaming-markdown");
43
10
  const spinner_1 = require("./spinner");
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.InlineDiff = InlineDiff;
7
4
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = __importDefault(require("react"));
9
5
  const ink_1 = require("ink");
10
6
  // Ouroboros brand colors
11
7
  const OURO_GREEN = "#2ecc40"; // added lines -- serpent green
@@ -1,41 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.ScrollableMessageList = ScrollableMessageList;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
38
- const react_1 = __importStar(require("react"));
5
+ const react_1 = require("react");
39
6
  const ink_1 = require("ink");
40
7
  const streaming_markdown_1 = require("./streaming-markdown");
41
8
  /**
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.OuroTui = OuroTui;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -46,7 +13,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
46
13
  * Design language: ouroboros brand palette from ouroboros.bot / Outlook UI.
47
14
  * ZERO business logic here — pure rendering from CliStore state.
48
15
  */
49
- const react_1 = __importStar(require("react"));
16
+ const react_1 = require("react");
50
17
  const ink_1 = require("ink");
51
18
  const streaming_markdown_1 = require("./streaming-markdown");
52
19
  // ─── Ouroboros Brand Palette (ANSI RGB) ─────────────────────────────
@@ -73,30 +40,27 @@ function ringColor(elapsedSec) {
73
40
  return OURO.scale;
74
41
  }
75
42
  // ─── Header ─────────────────────────────────────────────────────────
43
+ /** Safe terminal width: capped at 200, with 2-char margin */
44
+ function safeWidth() {
45
+ return Math.min(process.stdout.columns || 80, 200) - 2;
46
+ }
76
47
  function Header({ agentName, model, contextPercent, cwd }) {
77
48
  const showCtx = contextPercent > 0;
78
49
  const info = [agentName, model, cwd, showCtx ? `ctx ${contextPercent}%` : ""].filter(Boolean).join(" · ");
79
50
  // 3-segment snake: TAIL (fixed) + MIDDLE (stretches) + HEAD (fixed)
80
- // From the reference art, segments split at the dots:
81
- //
82
- // . . ____
83
- // __.__________________.____/ O \___/
84
- // <__.__________________._________/ \
85
- //
86
- // TAIL: line1="" line2=" __" line3="<__"
87
- // MIDDLE: line1=" " line2="_" line3="_" (or text)
88
- // HEAD: line1=" ____" line2="____/ O \\___/" line3="_________/ \\"
89
51
  const HEAD1 = " ____";
90
52
  const HEAD2 = "____/ O \\___/";
91
53
  const HEAD3 = "_________/ \\";
92
54
  const TAIL1 = " ";
93
55
  const TAIL2 = " __";
94
56
  const TAIL3 = "<__";
95
- const middleLen = Math.max(info.length, 20);
96
- const textPad = middleLen - info.length;
57
+ const fixedWidth = TAIL1.length + HEAD1.length;
58
+ const maxMiddle = safeWidth() - fixedWidth;
59
+ const middleLen = Math.max(Math.min(Math.max(info.length, 20), maxMiddle), 10);
60
+ const textPad = Math.max(middleLen - info.length, 0);
97
61
  const line1 = TAIL1 + " ".repeat(middleLen) + HEAD1;
98
62
  const line2 = TAIL2 + "_".repeat(middleLen) + HEAD2;
99
- const line3text = info + "_".repeat(textPad);
63
+ const line3text = (info.length > middleLen ? info.slice(0, middleLen) : info) + "_".repeat(textPad);
100
64
  return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: line1 }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: line2 }), (0, jsx_runtime_1.jsxs)(ink_1.Text, { color: OURO.scale, children: [TAIL3, (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.glow, children: line3text }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: HEAD3 })] })] }));
101
65
  }
102
66
  // ─── Message Rendering ──────────────────────────────────────────────
@@ -111,17 +75,18 @@ function ToolResultLine({ tc }) {
111
75
  function MessageBlock({ msg }) {
112
76
  if (msg.role === "tool") {
113
77
  const visibleCalls = msg.toolCalls?.filter(tc => !FLOW_CONTROL_TOOLS.has(tc.name));
78
+ // Flow control tools produce no visible output at all
114
79
  if (!visibleCalls || visibleCalls.length === 0)
115
- return (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) });
80
+ return (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" });
116
81
  return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: visibleCalls.map((tc, i) => (0, jsx_runtime_1.jsx)(ToolResultLine, { tc: tc }, i)) }));
117
82
  }
118
83
  if (msg.role === "user") {
119
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: [msg.content ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, bold: true, children: msg.content }) : null, (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) })] }));
84
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: [msg.content ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, bold: true, children: msg.content }) : null, (0, jsx_runtime_1.jsx)(ink_1.Box, { marginBottom: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) })] }));
120
85
  }
121
86
  if (msg.role === "assistant") {
122
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [msg.content ? (0, jsx_runtime_1.jsx)(streaming_markdown_1.StreamingMarkdown, { text: msg.content }) : null, (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) })] }));
87
+ return ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", marginBottom: 1, children: msg.content ? (0, jsx_runtime_1.jsx)(streaming_markdown_1.StreamingMarkdown, { text: msg.content, maxWidth: safeWidth() }) : null }));
123
88
  }
124
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, children: msg.content }), (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) })] }));
89
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginTop: 1, children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, children: msg.content }), (0, jsx_runtime_1.jsx)(ink_1.Box, { marginBottom: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) })] }));
125
90
  }
126
91
  // ─── Live Area (re-renders) ─────────────────────────────────────────
127
92
  function Spinner({ phrasePool, elapsed }) {
@@ -169,12 +134,12 @@ function formatActiveToolArgs(name, args) {
169
134
  function ActiveToolLine({ tool }) {
170
135
  // Hide flow control tools from in-progress display
171
136
  if (FLOW_CONTROL_TOOLS.has(tool.name))
172
- return (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) });
137
+ return (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" });
173
138
  const argStr = formatActiveToolArgs(tool.name, tool.args);
174
139
  return ((0, jsx_runtime_1.jsxs)(ink_1.Text, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, children: "∙" }), " ", (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.teal, children: tool.name }), " ", (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, children: argStr })] }));
175
140
  }
176
141
  function LiveArea({ live, elapsed }) {
177
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [live.streamingText ? ((0, jsx_runtime_1.jsx)(streaming_markdown_1.StreamingMarkdown, { text: live.streamingText })) : null, live.activeTool ? ((0, jsx_runtime_1.jsx)(ActiveToolLine, { tool: live.activeTool })) : null, live.loading ? ((0, jsx_runtime_1.jsx)(Spinner, { phrasePool: live.spinnerPhrasePool, elapsed: elapsed })) : null, live.errorMessage ? ((0, jsx_runtime_1.jsxs)(ink_1.Text, { color: OURO.fang, children: ["✗ ", live.errorMessage] })) : null, live.kickMessage ? ((0, jsx_runtime_1.jsxs)(ink_1.Text, { color: OURO.gold, children: ["↻ ", live.kickMessage] })) : null] }));
142
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [live.streamingText ? ((0, jsx_runtime_1.jsx)(streaming_markdown_1.StreamingMarkdown, { text: live.streamingText, maxWidth: safeWidth() })) : null, live.activeTool ? ((0, jsx_runtime_1.jsx)(ActiveToolLine, { tool: live.activeTool })) : null, live.loading ? ((0, jsx_runtime_1.jsx)(Spinner, { phrasePool: live.spinnerPhrasePool, elapsed: elapsed })) : null, live.errorMessage ? ((0, jsx_runtime_1.jsxs)(ink_1.Text, { color: OURO.fang, children: ["✗ ", live.errorMessage] })) : null, live.kickMessage ? ((0, jsx_runtime_1.jsxs)(ink_1.Text, { color: OURO.gold, children: ["↻ ", live.kickMessage] })) : null] }));
178
143
  }
179
144
  // ─── Input ──────────────────────────────────────────────────────────
180
145
  function InputArea({ onSubmit, suppressed, onCtrlC, agentName, model, history }) {
@@ -227,6 +192,12 @@ function InputArea({ onSubmit, suppressed, onCtrlC, agentName, model, history })
227
192
  return;
228
193
  }
229
194
  if (key.return) {
195
+ // Alt+Enter: insert newline instead of submitting
196
+ if (key.meta) {
197
+ inputRef.current += "\n";
198
+ setInput(inputRef.current);
199
+ return;
200
+ }
230
201
  const text = inputRef.current;
231
202
  if (text.trim())
232
203
  onSubmit(text);
@@ -278,19 +249,21 @@ function InputArea({ onSubmit, suppressed, onCtrlC, agentName, model, history })
278
249
  }
279
250
  });
280
251
  // Get terminal width (capped for sanity)
281
- const cols = Math.min(process.stdout.columns || 80, 200);
252
+ const cols = safeWidth();
282
253
  if (suppressed) {
283
254
  // During model generation: show status bar but no input
284
255
  return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) }), (0, jsx_runtime_1.jsxs)(ink_1.Text, { dimColor: true, children: [agentName, model ? ` · ${model}` : ""] }), (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) })] }));
285
256
  }
286
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) }), (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.teal, bold: true, children: ") " }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, children: input }), cursorVisible ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: "█" }) : (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " })] }), (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, { dimColor: true, children: [agentName, model ? ` · ${model}` : ""] }), (0, jsx_runtime_1.jsx)(ink_1.Box, { flexGrow: 1 }), tooltip ? (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: tooltip }) : null] }), (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) })] }));
257
+ const isMultiline = input.includes("\n");
258
+ const inputLines = input.split("\n");
259
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) }), isMultiline ? ((0, jsx_runtime_1.jsx)(ink_1.Box, { flexDirection: "column", children: inputLines.map((line, i) => ((0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.teal, bold: true, children: i === 0 ? ") " : "· " }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, children: line }), i === inputLines.length - 1 ? (cursorVisible ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: "█" }) : (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " })) : null] }, i))) })) : ((0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.teal, bold: true, children: ") " }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.bone, children: input }), cursorVisible ? (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.scale, children: "█" }) : (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " })] })), (0, jsx_runtime_1.jsxs)(ink_1.Box, { children: [(0, jsx_runtime_1.jsxs)(ink_1.Text, { dimColor: true, children: [agentName, model ? ` · ${model}` : ""] }), (0, jsx_runtime_1.jsx)(ink_1.Box, { flexGrow: 1 }), tooltip ? (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: tooltip }) : null, isMultiline ? (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: " (multi-line)" }) : null] }), (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: "─".repeat(cols) })] }));
287
260
  }
288
261
  // ─── Main TUI Component ─────────────────────────────────────────────
289
262
  function OuroTui({ agentName, model, completedMessages, inputHistory, live, elapsedSeconds, contextPercent, onSubmit, onCtrlC, cwd, }) {
290
263
  return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Static, { items: [{ id: "__header__" }, ...completedMessages], children: (item, index) => {
291
264
  if (index === 0) {
292
- return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }), (0, jsx_runtime_1.jsx)(Header, { agentName: agentName, model: model, contextPercent: contextPercent, cwd: cwd }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, children: " Press Ctrl-C twice to exit \u00b7 \u2191\u2193 history \u00b7 Esc clear" }), (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " })] }, "header"));
265
+ return ((0, jsx_runtime_1.jsxs)(ink_1.Box, { flexDirection: "column", marginBottom: 2, children: [(0, jsx_runtime_1.jsx)(ink_1.Box, { marginTop: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) }), (0, jsx_runtime_1.jsx)(Header, { agentName: agentName, model: model, contextPercent: contextPercent, cwd: cwd }), (0, jsx_runtime_1.jsx)(ink_1.Text, { color: OURO.shadow, dimColor: true, children: " Ctrl-C twice to exit \u00b7 \u2191\u2193 history \u00b7 Esc clear \u00b7 Alt+Enter newline" })] }, "header"));
293
266
  }
294
267
  return (0, jsx_runtime_1.jsx)(MessageBlock, { msg: item }, item.id);
295
- } }), (live.loading || live.streamingText || live.activeTool) ? (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) }) : null, (0, jsx_runtime_1.jsx)(LiveArea, { live: live, elapsed: elapsedSeconds }), (live.loading || live.streamingText || live.activeTool) ? (0, jsx_runtime_1.jsx)(ink_1.Box, { height: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: " " }) }) : null, (0, jsx_runtime_1.jsx)(InputArea, { onSubmit: onSubmit, suppressed: live.inputSuppressed, onCtrlC: onCtrlC, agentName: agentName, model: model, history: inputHistory })] }));
268
+ } }), (live.loading || live.streamingText || live.activeTool) ? (0, jsx_runtime_1.jsx)(ink_1.Box, { marginTop: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) }) : null, (0, jsx_runtime_1.jsx)(LiveArea, { live: live, elapsed: elapsedSeconds }), (live.loading || live.streamingText || live.activeTool) ? (0, jsx_runtime_1.jsx)(ink_1.Box, { marginBottom: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) }) : null, (0, jsx_runtime_1.jsx)(ink_1.Box, { marginTop: 1, children: (0, jsx_runtime_1.jsx)(ink_1.Text, { children: "" }) }), (0, jsx_runtime_1.jsx)(InputArea, { onSubmit: onSubmit, suppressed: live.inputSuppressed, onCtrlC: onCtrlC, agentName: agentName, model: model, history: inputHistory })] }));
296
269
  }
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.StatusLine = StatusLine;
7
4
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const react_1 = __importDefault(require("react"));
9
5
  const ink_1 = require("ink");
10
6
  /**
11
7
  * Persistent bottom status bar for the CLI TUI.
@@ -213,7 +213,21 @@ function parseInline(text) {
213
213
  placeholders.push({ idx, segment: { text: restoreEscapes(code, escapes), code: true } });
214
214
  return `\x00PH${idx}\x00`;
215
215
  });
216
- // Step 3: extract links [text](url)
216
+ // Step 3a: extract image references ![alt](url) -> placeholder
217
+ processed = processed.replace(/!\[([^\]]*)\]\(([^)]*)\)/g, (_m, alt, _url) => {
218
+ const idx = placeholders.length;
219
+ const label = alt ? `\ud83d\uddbc ${restoreEscapes(alt, escapes)}` : "\ud83d\uddbc image";
220
+ placeholders.push({ idx, segment: { text: label, image: true } });
221
+ return `\x00PH${idx}\x00`;
222
+ });
223
+ // Step 3b: extract [Image: ...] references
224
+ processed = processed.replace(/\[Image:\s*([^\]]*)\]/gi, (_m, desc) => {
225
+ const idx = placeholders.length;
226
+ const label = desc.trim() ? `\ud83d\uddbc ${restoreEscapes(desc.trim(), escapes)}` : "\ud83d\uddbc image";
227
+ placeholders.push({ idx, segment: { text: label, image: true } });
228
+ return `\x00PH${idx}\x00`;
229
+ });
230
+ // Step 3c: extract links [text](url)
217
231
  processed = processed.replace(/\[([^\]]*)\]\(([^)]*)\)/g, (_m, linkText, url) => {
218
232
  const idx = placeholders.length;
219
233
  const restoredText = restoreEscapes(linkText, escapes);
@@ -364,6 +378,9 @@ function wrapText(text, maxWidth) {
364
378
  }
365
379
  // ─── Segment Renderer ──────────────────────────────────────────────
366
380
  function SegmentRenderer({ segment }) {
381
+ if (segment.image) {
382
+ return (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: segment.text });
383
+ }
367
384
  if (segment.codeBlock) {
368
385
  return (0, jsx_runtime_1.jsx)(ink_1.Text, { dimColor: true, children: segment.text });
369
386
  }
@@ -13,6 +13,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.writeToolStart = writeToolStart;
14
14
  exports.writeToolEnd = writeToolEnd;
15
15
  const runtime_1 = require("../../nerves/runtime");
16
+ // Flow control tools are invisible to the user — internal agent mechanics
17
+ const FLOW_CONTROL_TOOLS = new Set(["settle", "ponder", "observe", "rest"]);
16
18
  // Ouroboros teal: #4ec9b0 -> RGB escape
17
19
  const OURO_TEAL = "\x1b[38;2;78;201;176m";
18
20
  const GREEN = "\x1b[32m";
@@ -56,6 +58,8 @@ function getPrimaryArg(name, args) {
56
58
  * Shows: [teal tool name] [dim primary arg]
57
59
  */
58
60
  function writeToolStart(name, args) {
61
+ if (FLOW_CONTROL_TOOLS.has(name))
62
+ return;
59
63
  const primary = getPrimaryArg(name, args);
60
64
  const argDisplay = primary ? ` ${DIM}${primary}${RESET}` : "";
61
65
  process.stderr.write(`\r\x1b[K${OURO_TEAL}${BOLD}${name}${RESET}${argDisplay}\n`);
@@ -65,6 +69,8 @@ function writeToolStart(name, args) {
65
69
  * Shows: [green check / red cross] [teal tool name] [dim summary]
66
70
  */
67
71
  function writeToolEnd(name, argSummary, success) {
72
+ if (FLOW_CONTROL_TOOLS.has(name))
73
+ return;
68
74
  const icon = success ? `${GREEN}\u2713` : `${RED}\u2717`;
69
75
  const summary = argSummary ? ` ${DIM}${truncate(argSummary, 100)}${RESET}` : "";
70
76
  process.stderr.write(`${icon}${RESET} ${OURO_TEAL}${name}${RESET}${summary}\n`);
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.ToolBadge = ToolBadge;
7
4
  exports.ToolParams = ToolParams;
@@ -9,7 +6,6 @@ exports.ToolProgress = ToolProgress;
9
6
  exports.ToolResultCard = ToolResultCard;
10
7
  exports.ToolExecutionBlock = ToolExecutionBlock;
11
8
  const jsx_runtime_1 = require("react/jsx-runtime");
12
- const react_1 = __importDefault(require("react"));
13
9
  const ink_1 = require("ink");
14
10
  const inline_diff_1 = require("./inline-diff");
15
11
  /**
@@ -1,41 +1,8 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.VirtualList = VirtualList;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
38
- const react_1 = __importStar(require("react"));
5
+ const react_1 = require("react");
39
6
  const ink_1 = require("ink");
40
7
  function VirtualList({ items, viewportHeight, scrollOffset, renderItem, }) {
41
8
  const { startIndex, visibleItems } = (0, react_1.useMemo)(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.177",
3
+ "version": "0.1.0-alpha.179",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",
@@ -38,10 +38,11 @@
38
38
  "@azure/identity": "^4.13.0",
39
39
  "@microsoft/teams.apps": "^2.0.5",
40
40
  "@microsoft/teams.dev": "^2.0.5",
41
+ "@types/react": "^17.0.91",
41
42
  "fast-glob": "^3.3.3",
42
43
  "ink": "^3.2.0",
43
44
  "openai": "^6.27.0",
44
- "react": "^18.3.1",
45
+ "react": "^17.0.2",
45
46
  "semver": "^7.7.4"
46
47
  },
47
48
  "repository": {