micro-models-agent 0.33.0 → 0.33.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/dist/main.js +34 -5
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -12467,7 +12467,7 @@ var init_web_fetch = __esm(() => {
|
|
|
12467
12467
|
init_security();
|
|
12468
12468
|
webFetchTool = {
|
|
12469
12469
|
name: "web_fetch",
|
|
12470
|
-
description:
|
|
12470
|
+
description: 'Fetch a URL and convert its content to markdown. Use for reading documentation, APIs, web pages. This is a plain HTTP request without a browser engine — it does NOT run JavaScript, so JS-rendered single-page apps (weather sites, dashboards, modern SPAs) return empty or near-empty content; use the "browser" tool for those.',
|
|
12471
12471
|
tags: ["research"],
|
|
12472
12472
|
parameters: {
|
|
12473
12473
|
type: "object",
|
|
@@ -12553,7 +12553,7 @@ var init_web_browse = __esm(() => {
|
|
|
12553
12553
|
init_session_isolation();
|
|
12554
12554
|
webBrowseTool = {
|
|
12555
12555
|
name: "web_browse",
|
|
12556
|
-
description: `Fetch and read a web page. Returns the page content as plain text (max ${MAX_PREVIEW_LINES} lines / ${MAX_CHARS2} chars).`,
|
|
12556
|
+
description: `Fetch and read a web page. Returns the page content as plain text (max ${MAX_PREVIEW_LINES} lines / ${MAX_CHARS2} chars). This is a plain HTTP request — it does NOT execute JavaScript, so JS-rendered single-page apps (weather sites, dashboards, modern SPAs) return empty or near-empty content. For such pages use the "browser" tool instead.`,
|
|
12557
12557
|
tags: ["research"],
|
|
12558
12558
|
parameters: {
|
|
12559
12559
|
type: "object",
|
|
@@ -14653,6 +14653,7 @@ function createBrowserTool() {
|
|
|
14653
14653
|
tags: ["browser", "vision"],
|
|
14654
14654
|
description: [
|
|
14655
14655
|
"Control a headless browser. Navigate pages, click elements, type text, scroll, take screenshots.",
|
|
14656
|
+
"Runs a real browser with JavaScript enabled — use it for JS-rendered sites (weather, dashboards, SPAs) where web_fetch/web_browse return empty content.",
|
|
14656
14657
|
"Each snapshot returns: a numbered list of interactive elements, the visible page text (Content section), browser console messages, and network errors.",
|
|
14657
14658
|
"Use the Content section to understand what the page says; use element numbers as targets for click/type.",
|
|
14658
14659
|
"Actions: open (url), click (target), type (target, text), scroll (direction), back, forward, screenshot, snapshot, close, wait (ms)."
|
|
@@ -28715,6 +28716,7 @@ class LineEditor {
|
|
|
28715
28716
|
questionCb = null;
|
|
28716
28717
|
rawMode = false;
|
|
28717
28718
|
listeners = {};
|
|
28719
|
+
prevCursorRow = 0;
|
|
28718
28720
|
constructor(opts) {
|
|
28719
28721
|
this.input = opts.input;
|
|
28720
28722
|
this.output = opts.output;
|
|
@@ -28772,6 +28774,7 @@ class LineEditor {
|
|
|
28772
28774
|
this.col = 0;
|
|
28773
28775
|
this.historyIndex = -1;
|
|
28774
28776
|
this.stash = null;
|
|
28777
|
+
this.prevCursorRow = 0;
|
|
28775
28778
|
if (this.input.isTTY)
|
|
28776
28779
|
this.render();
|
|
28777
28780
|
}
|
|
@@ -28781,6 +28784,7 @@ class LineEditor {
|
|
|
28781
28784
|
this.lines = [""];
|
|
28782
28785
|
this.row = 0;
|
|
28783
28786
|
this.col = 0;
|
|
28787
|
+
this.prevCursorRow = 0;
|
|
28784
28788
|
if (this.input.isTTY)
|
|
28785
28789
|
this.render();
|
|
28786
28790
|
}
|
|
@@ -28981,10 +28985,13 @@ class LineEditor {
|
|
|
28981
28985
|
this.questionCb = null;
|
|
28982
28986
|
const answer = this.lines.join(`
|
|
28983
28987
|
`).trim();
|
|
28988
|
+
this.commitFrame();
|
|
28989
|
+
this.output.write(`\r
|
|
28990
|
+
`);
|
|
28984
28991
|
this.lines = [""];
|
|
28985
28992
|
this.row = 0;
|
|
28986
28993
|
this.col = 0;
|
|
28987
|
-
this.
|
|
28994
|
+
this.prevCursorRow = 0;
|
|
28988
28995
|
cb(answer);
|
|
28989
28996
|
return;
|
|
28990
28997
|
}
|
|
@@ -28998,16 +29005,33 @@ class LineEditor {
|
|
|
28998
29005
|
}
|
|
28999
29006
|
this.historyIndex = -1;
|
|
29000
29007
|
this.stash = null;
|
|
29008
|
+
this.commitFrame();
|
|
29009
|
+
this.output.write(`\r
|
|
29010
|
+
`);
|
|
29001
29011
|
this.lines = [""];
|
|
29002
29012
|
this.row = 0;
|
|
29003
29013
|
this.col = 0;
|
|
29004
|
-
this.
|
|
29014
|
+
this.prevCursorRow = 0;
|
|
29005
29015
|
this.emitLine(text);
|
|
29006
29016
|
}
|
|
29017
|
+
commitFrame() {
|
|
29018
|
+
const layout = this.layout();
|
|
29019
|
+
const idx = layoutIndexFor(layout, this.row, this.col);
|
|
29020
|
+
const rowsDown = layout.length - 1 - idx;
|
|
29021
|
+
const lastLen = charLen(stripAnsi2(layout[layout.length - 1].text));
|
|
29022
|
+
const out = [];
|
|
29023
|
+
if (rowsDown > 0)
|
|
29024
|
+
out.push(`\x1B[${rowsDown}B`);
|
|
29025
|
+
out.push("\r");
|
|
29026
|
+
if (lastLen > 0)
|
|
29027
|
+
out.push(`\x1B[${lastLen}C`);
|
|
29028
|
+
this.output.write(out.join(""));
|
|
29029
|
+
}
|
|
29007
29030
|
ctrlC() {
|
|
29008
29031
|
this.lines = [""];
|
|
29009
29032
|
this.row = 0;
|
|
29010
29033
|
this.col = 0;
|
|
29034
|
+
this.prevCursorRow = 0;
|
|
29011
29035
|
this.render();
|
|
29012
29036
|
process.emit("SIGINT");
|
|
29013
29037
|
}
|
|
@@ -29257,6 +29281,7 @@ class LineEditor {
|
|
|
29257
29281
|
}
|
|
29258
29282
|
clearScreen() {
|
|
29259
29283
|
this.output.write("\x1B[2J\x1B[H");
|
|
29284
|
+
this.prevCursorRow = 0;
|
|
29260
29285
|
this.render();
|
|
29261
29286
|
}
|
|
29262
29287
|
columns() {
|
|
@@ -29274,7 +29299,10 @@ class LineEditor {
|
|
|
29274
29299
|
const vcol = visualColAt(layout, idx, this.col);
|
|
29275
29300
|
const rowsAfter = layout.length - idx - 1;
|
|
29276
29301
|
const ccol = (idx === 0 ? promptWidth : 0) + vcol;
|
|
29277
|
-
const out = [
|
|
29302
|
+
const out = [];
|
|
29303
|
+
if (this.prevCursorRow > 0)
|
|
29304
|
+
out.push(`\x1B[${this.prevCursorRow}A`);
|
|
29305
|
+
out.push("\r");
|
|
29278
29306
|
for (let i = 0;i < layout.length; i++) {
|
|
29279
29307
|
out.push("\x1B[2K");
|
|
29280
29308
|
if (i === 0)
|
|
@@ -29290,6 +29318,7 @@ class LineEditor {
|
|
|
29290
29318
|
out.push("\r");
|
|
29291
29319
|
if (ccol > 0)
|
|
29292
29320
|
out.push(`\x1B[${ccol}C`);
|
|
29321
|
+
this.prevCursorRow = idx;
|
|
29293
29322
|
this.output.write(out.join(""));
|
|
29294
29323
|
}
|
|
29295
29324
|
enableTerminalProtocols() {
|