@vietor/easy-agent 0.5.8 → 0.5.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
CHANGED
|
@@ -138,7 +138,7 @@ easy-agent --resume <id> # resume a specific session by ID
|
|
|
138
138
|
easy-agent --resume # list all saved sessions for this directory
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
Type a prompt and press Enter. The agent streams its reply and calls tools as needed, showing each tool call and a one-line
|
|
141
|
+
Type a prompt and press Enter. The agent streams its reply and calls tools as needed, showing each tool call and a one-line summary of its result. It iterates until the task is done (capped at 50 tool rounds per turn).
|
|
142
142
|
|
|
143
143
|
The TUI header shows the model name, version, and configured reasoning effort (e.g. `deepseek-v4-flash · reasoning high`). While the agent is running, a spinner displays the thinking and reply elapsed time alongside token counts (e.g. `⠋ thinking · think 2s · reply 0s · ↑1.2k · ↓0.4k`). If the LLM emits extended thinking blocks, a collapsible reasoning panel appears — press <kbd>t</kbd> to expand/collapse it.
|
|
144
144
|
|
package/dist/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import { loadConfig } from "./config.js";
|
|
|
6
6
|
import { tryLoadSkills, tryReadFileText, createSession, SYSTEM_PROMPT_BOUNDARY } from "@vietor/easy-agent-core";
|
|
7
7
|
import { startApp } from "./tui/app.js";
|
|
8
8
|
import { getPackageInfo } from "./util/package.js";
|
|
9
|
-
import { FileSessionPersistence } from "./
|
|
9
|
+
import { FileSessionPersistence } from "./session-store.js";
|
|
10
10
|
function buildSystemPromptBase(cwd) {
|
|
11
11
|
return [
|
|
12
12
|
"You are Easy Agent, an autonomous assistant. You complete tasks by calling tools, inspecting their results, and iterating until the work is done.",
|
|
@@ -2,7 +2,7 @@ import { appendFile, writeFile } from "node:fs/promises";
|
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
-
import { ellipsisText,
|
|
5
|
+
import { ellipsisText, MAX_SUMMARY_LENGTH } from "@vietor/easy-agent-core";
|
|
6
6
|
function encodeCwd(cwd) {
|
|
7
7
|
return cwd.replace(/[\/\\:]/g, "-");
|
|
8
8
|
}
|
|
@@ -92,7 +92,7 @@ export class FileSessionPersistence {
|
|
|
92
92
|
const first = this.readFirstUser(path);
|
|
93
93
|
if (!first)
|
|
94
94
|
return undefined;
|
|
95
|
-
return ellipsisText(first,
|
|
95
|
+
return ellipsisText(first, MAX_SUMMARY_LENGTH);
|
|
96
96
|
}
|
|
97
97
|
readFirstUser(path) {
|
|
98
98
|
const first = parseJsonLines(readFileSync(path, "utf-8"))
|
package/dist/tui/spinner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Text } from "ink";
|
|
4
|
-
import {
|
|
4
|
+
import { formatSeconds, formatCompactNumber } from "@vietor/easy-agent-core";
|
|
5
5
|
const SPINNER_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
6
6
|
export function Spinner({ label, thinkingElapsed, replyElapsed, inputTokens, outputTokens, }) {
|
|
7
7
|
const [frame, setFrame] = useState(0);
|
|
@@ -9,5 +9,5 @@ export function Spinner({ label, thinkingElapsed, replyElapsed, inputTokens, out
|
|
|
9
9
|
const id = setInterval(() => setFrame((f) => (f + 1) % SPINNER_FRAMES.length), 80);
|
|
10
10
|
return () => clearInterval(id);
|
|
11
11
|
}, []);
|
|
12
|
-
return (_jsxs(Text, { children: [_jsx(Text, { color: "cyan", children: SPINNER_FRAMES[frame] }), _jsxs(Text, { children: [" ", label] }), _jsxs(Text, { dimColor: true, children: [" \u00B7 work ",
|
|
12
|
+
return (_jsxs(Text, { children: [_jsx(Text, { color: "cyan", children: SPINNER_FRAMES[frame] }), _jsxs(Text, { children: [" ", label] }), _jsxs(Text, { dimColor: true, children: [" \u00B7 work ", formatSeconds(thinkingElapsed), " \u00B7 reply ", formatSeconds(replyElapsed), " \u00B7 \u2191", formatCompactNumber(inputTokens), " \u00B7 \u2193", formatCompactNumber(outputTokens)] })] }));
|
|
13
13
|
}
|
package/dist/tui/status-bar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { memo } from "react";
|
|
3
3
|
import { Box, Text, useWindowSize } from "ink";
|
|
4
|
-
import {
|
|
4
|
+
import { formatCompactNumber } from "@vietor/easy-agent-core";
|
|
5
5
|
export const StatusBar = memo(function StatusBar({ contextTokens, contextLimit, running, questionPending, reasoningAvailable }) {
|
|
6
6
|
const { columns } = useWindowSize();
|
|
7
7
|
const pct = Math.min(100, contextLimit > 0 ? Math.round((contextTokens / contextLimit) * 100) : 0);
|
|
@@ -15,5 +15,5 @@ export const StatusBar = memo(function StatusBar({ contextTokens, contextLimit,
|
|
|
15
15
|
hints = reasoningAvailable ? "esc stop · t reasoning" : "esc stop";
|
|
16
16
|
else
|
|
17
17
|
hints = "/ commands";
|
|
18
|
-
return (_jsxs(Box, { width: columns, paddingX: 1, flexDirection: "row", justifyContent: "space-between", borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", children: [_jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: `context ${
|
|
18
|
+
return (_jsxs(Box, { width: columns, paddingX: 1, flexDirection: "row", justifyContent: "space-between", borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray", children: [_jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: `context ${formatCompactNumber(contextTokens)} ` }), _jsx(Text, { color: ctxColor, children: `▕${bar}▏ ${pct}%` })] }), _jsx(Text, { dimColor: true, children: hints })] }));
|
|
19
19
|
});
|
|
@@ -38,5 +38,5 @@ function ToolEntry({ entry }) {
|
|
|
38
38
|
const icon = running ? (on ? "●" : " ") : "●";
|
|
39
39
|
const iconColor = running ? "cyan" : entry.isError ? "red" : "green";
|
|
40
40
|
const nameColor = entry.isError ? "red" : "yellow";
|
|
41
|
-
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: iconColor, children: `${icon} ` }), _jsx(Text, { bold: true, color: nameColor, children: entry.name }), entry.
|
|
41
|
+
return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { children: [_jsx(Text, { color: iconColor, children: `${icon} ` }), _jsx(Text, { bold: true, color: nameColor, children: entry.name }), entry.argsSummary ? _jsx(Text, { dimColor: true, children: `(${entry.argsSummary})` }) : null] }), entry.result !== null ? (_jsx(Text, { color: entry.isError ? "red" : "gray", children: ` ⎿ ${entry.resultSummary}` })) : null] }));
|
|
42
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vietor/easy-agent",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"url": "https://github.com/vietor/easy-agent.git"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"commander": "^
|
|
19
|
+
"commander": "^15.0.0",
|
|
20
20
|
"ink": "^7.1.1",
|
|
21
21
|
"ink-text-input": "^6.0.0",
|
|
22
22
|
"marked": "^18.0.7",
|
|
23
23
|
"react": "^19.2.8",
|
|
24
24
|
"string-width": "^8.2.2",
|
|
25
25
|
"zod": "^4.4.3",
|
|
26
|
-
"@vietor/easy-agent-core": "0.5.
|
|
26
|
+
"@vietor/easy-agent-core": "0.5.10"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.20.1",
|