bare-agent 0.3.3 → 0.3.4
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 +2 -1
- package/package.json +6 -3
- package/src/tools.js +5 -0
- package/tools/browse.js +18 -0
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ Every piece works alone — take what you need, ignore the rest.
|
|
|
72
72
|
| **Scheduler** | Cron (`0 9 * * 1-5`) or relative (`2h`, `30m`). Persisted jobs survive restarts |
|
|
73
73
|
| **Stream** | Structured event emitter. Pipe as JSONL, subscribe in-process, or custom transport |
|
|
74
74
|
| **Errors** | Typed hierarchy — `ProviderError`, `ToolError`, `TimeoutError`, `MaxRoundsError`, `CircuitOpenError` |
|
|
75
|
+
| **Browsing** | Optional web navigation, clicking, typing, reading via `barebrowse`. Tools in bareagent format — pass directly to Loop |
|
|
75
76
|
|
|
76
77
|
**Providers:** OpenAI-compatible (OpenAI, OpenRouter, Groq, vLLM, LM Studio), Anthropic, Ollama, CLIPipe (any CLI tool via stdin/stdout with real-time streaming), Fallback, or bring your own (one method: `generate`). All return the same shape — swap freely.
|
|
77
78
|
|
|
@@ -79,7 +80,7 @@ Every piece works alone — take what you need, ignore the rest.
|
|
|
79
80
|
|
|
80
81
|
**Cross-language:** Runs as a subprocess. Communicate via JSONL on stdin/stdout from Python, Go, Rust, Ruby, Java, or anything that can spawn a process. Ready-made wrappers in [`contrib/`](contrib/README.md).
|
|
81
82
|
|
|
82
|
-
**Deps:** 0 required. Optional: `cron-parser` (cron expressions), `better-sqlite3` (SQLite store).
|
|
83
|
+
**Deps:** 0 required. Optional: `cron-parser` (cron expressions), `better-sqlite3` (SQLite store), `barebrowse` (web browsing).
|
|
83
84
|
|
|
84
85
|
---
|
|
85
86
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-agent",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"index.js",
|
|
6
6
|
"src/",
|
|
7
|
-
"bin/"
|
|
7
|
+
"bin/",
|
|
8
|
+
"tools/"
|
|
8
9
|
],
|
|
9
10
|
"description": "Lightweight, composable agent orchestration. ~1700 lines, 0 required deps.",
|
|
10
11
|
"license": "MIT",
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
".": "./index.js",
|
|
22
23
|
"./providers": "./src/providers.js",
|
|
23
24
|
"./stores": "./src/stores.js",
|
|
24
|
-
"./transports": "./src/transports.js"
|
|
25
|
+
"./transports": "./src/transports.js",
|
|
26
|
+
"./tools": "./src/tools.js"
|
|
25
27
|
},
|
|
26
28
|
"engines": {
|
|
27
29
|
"node": ">=18"
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
"lightweight"
|
|
37
39
|
],
|
|
38
40
|
"optionalDependencies": {
|
|
41
|
+
"barebrowse": "^0.2.0",
|
|
39
42
|
"cron-parser": "^4.9.0"
|
|
40
43
|
},
|
|
41
44
|
"peerDependencies": {
|
package/src/tools.js
ADDED
package/tools/browse.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Creates browsing tools via barebrowse (optional dep).
|
|
5
|
+
* Returns { tools, close } or null if barebrowse is not installed.
|
|
6
|
+
* @param {object} [opts] - Options passed to barebrowse createBrowseTools
|
|
7
|
+
* @returns {Promise<{tools: Array, close: Function}|null>}
|
|
8
|
+
*/
|
|
9
|
+
async function createBrowsingTools(opts = {}) {
|
|
10
|
+
try {
|
|
11
|
+
const { createBrowseTools } = await import('barebrowse/bareagent');
|
|
12
|
+
return createBrowseTools(opts);
|
|
13
|
+
} catch {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
module.exports = { createBrowsingTools };
|