@vietor/easy-agent 0.4.6 → 0.4.7
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 +19 -0
- package/dist/config.js +1 -0
- package/dist/tui/App.js +1 -1
- package/dist/tui/TodoView.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -37,6 +37,25 @@ Create `~/.easy-agent.json` in your home directory:
|
|
|
37
37
|
|
|
38
38
|
`llm.baseUrl`, `llm.apiKey`, and `llm.model` are all required. Point `baseUrl` at any OpenAI-compatible endpoint (OpenAI, Azure OpenAI, local servers, etc.) and set `model` to a model that endpoint serves.
|
|
39
39
|
|
|
40
|
+
#### `wireApi` (optional)
|
|
41
|
+
|
|
42
|
+
Selects the wire protocol the client speaks. Valid values: `"completions"` | `"anthropic"`. Defaults to `"completions"`.
|
|
43
|
+
|
|
44
|
+
- `"completions"` - OpenAI Chat Completions compatible endpoint (the default). `reasoningEffort` is sent as `reasoning_effort`.
|
|
45
|
+
- `"anthropic"` - Anthropic Messages API via the official SDK. Point `baseUrl` at an Anthropic-compatible endpoint (e.g. `https://api.anthropic.com`) and `model` at a Claude model. `reasoningEffort` enables extended thinking (`"high"` = 16k budget, `"max"` = 32k).
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"llm": {
|
|
50
|
+
"baseUrl": "https://api.anthropic.com",
|
|
51
|
+
"apiKey": "your-api-key",
|
|
52
|
+
"model": "claude-sonnet-5",
|
|
53
|
+
"wireApi": "anthropic",
|
|
54
|
+
"reasoningEffort": "high"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
40
59
|
#### `reasoningEffort` (optional)
|
|
41
60
|
|
|
42
61
|
Controls the depth of model reasoning. Valid values: `"high"` | `"max"`. Defaults to `"high"`. When set to `"max"` the model spends more tokens on deeper reasoning before responding — useful for complex logic, math, or multi-step analysis. The current setting is shown in the TUI header (e.g. ` · reasoning max`). Requires a model that supports the `reasoning_effort` parameter.
|
package/dist/config.js
CHANGED
|
@@ -8,6 +8,7 @@ const LLMConfig = z.object({
|
|
|
8
8
|
apiKey: z.string(),
|
|
9
9
|
model: z.string(),
|
|
10
10
|
reasoningEffort: z.enum(["high", "max"]).default("high"),
|
|
11
|
+
wireApi: z.enum(["completions", "anthropic"]).default("completions"),
|
|
11
12
|
});
|
|
12
13
|
const StdioServerConfig = z.object({
|
|
13
14
|
type: z.literal("stdio").optional(),
|
package/dist/tui/App.js
CHANGED
|
@@ -104,7 +104,7 @@ export function App({ session }) {
|
|
|
104
104
|
runningView = (_jsxs(_Fragment, { children: [reasoningText ? renderReasoning(reasoningText, showReasoning) : null, streamingText ? (_jsx(Box, { marginTop: 1, paddingLeft: 1, paddingRight: 1, borderStyle: "single", borderTop: false, borderRight: false, borderBottom: false, borderColor: "gray", children: _jsx(Markdown, { children: streamingText }) })) : null, _jsx(Box, { marginTop: 1, paddingLeft: 1, children: _jsx(Spinner, { label: spinnerLabel, thinkingElapsed: runState.thinkingElapsed, replyElapsed: runState.replyElapsed, promptTokens: runState.promptTokens, completionTokens: runState.completionTokens }) })] }));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
return (_jsxs(Box, { width: columns, flexDirection: "column", children: [_jsx(AppHeader, { cwd: session.cwd, model: session.model, reasoningEffort: session.reasoningEffort }), view.timeline.length > 0 ? (_jsx(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, children: view.timeline.map((entry, i) => (_jsx(TimelineView, { entry: entry }, i))) })) : null, view.todos.length > 0 ? _jsx(TodoView, { todos: view.todos }) : null,
|
|
107
|
+
return (_jsxs(Box, { width: columns, flexDirection: "column", children: [_jsx(AppHeader, { cwd: session.cwd, model: session.model, reasoningEffort: session.reasoningEffort }), view.timeline.length > 0 ? (_jsx(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, children: view.timeline.map((entry, i) => (_jsx(TimelineView, { entry: entry }, i))) })) : null, runningView, view.todos.length > 0 ? _jsx(TodoView, { todos: view.todos }) : null, !runState.running ? (_jsx(PromptOrCommandInput, { commands: allCmds, onCommand: handleCommand, onPrompt: handlePrompt })) : null, _jsx(StatusBar, { contextTokens: session.contextTokens, contextLimit: session.compactThreshold, running: runState.running, questionPending: !!pendingQuestion, reasoningAvailable: !!reasoningText })] }));
|
|
108
108
|
}
|
|
109
109
|
function renderReasoning(text, expanded) {
|
|
110
110
|
const lines = text.split("\n");
|
package/dist/tui/TodoView.js
CHANGED
|
@@ -14,5 +14,5 @@ const COLORS = {
|
|
|
14
14
|
export const TodoView = memo(function TodoView({ todos }) {
|
|
15
15
|
const done = todos.filter((t) => t.status === "completed").length;
|
|
16
16
|
const headerColor = done === todos.length ? "green" : "cyan";
|
|
17
|
-
return (_jsxs(Box, { flexDirection: "column",
|
|
17
|
+
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 1, paddingRight: 1, children: [_jsx(Box, { borderStyle: "single", borderTop: true, borderBottom: false, borderLeft: false, borderRight: false, borderColor: "gray" }), _jsx(Text, { color: headerColor, children: `Tasks [${done}/${todos.length}]` }), todos.map((t, i) => (_jsx(Text, { color: COLORS[t.status], strikethrough: t.status === "completed", children: `${ICONS[t.status]} ${t.content}` }, i)))] }));
|
|
18
18
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vietor/easy-agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react": "^19.2.7",
|
|
24
24
|
"string-width": "^8.2.1",
|
|
25
25
|
"zod": "^4.4.3",
|
|
26
|
-
"@vietor/easy-agent-core": "0.4.
|
|
26
|
+
"@vietor/easy-agent-core": "0.4.7"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^22.0.0",
|