@astratra/agent 1.3.0 → 1.4.0
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 +1 -1
- package/package.json +3 -3
- package/src/feedback/router.js +1 -1
- package/src/schedule.js +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[English](README.md) | [Français](README.fr.md)
|
|
4
4
|
|
|
5
5
|
Durable task execution built on `runToolLoop` from `@astratra/ai`. Models,
|
|
6
|
-
application tools, completion checks and persistence are injected. Node >=
|
|
6
|
+
application tools, completion checks and persistence are injected. Node >= 22,
|
|
7
7
|
CommonJS, MIT. No provider or database driver is included.
|
|
8
8
|
|
|
9
9
|
```sh
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astratra/agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Budgeted, verifiable and durable task execution with injected models and tools, plus user feedback (thumbs up/down) on runs that the agent learns from.",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": ">=
|
|
6
|
+
"node": ">=22"
|
|
7
7
|
},
|
|
8
8
|
"main": "src/index.js",
|
|
9
9
|
"types": "src/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@astratra/ai": "^1.8.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"express": "^4.18.3",
|
|
25
|
+
"express": "^4.18.3 || ^5.0.0",
|
|
26
26
|
"pg": "^8.13.1",
|
|
27
27
|
"supertest": "^7.0.0"
|
|
28
28
|
},
|
package/src/feedback/router.js
CHANGED
|
@@ -23,7 +23,7 @@ function createFeedbackRouter(options = {}) {
|
|
|
23
23
|
if (typeof identify !== 'function' || typeof resolveRun !== 'function') throw new Error('createFeedbackRouter requires identify and resolveRun.');
|
|
24
24
|
let express = options.express;
|
|
25
25
|
if (!express) {
|
|
26
|
-
try { express = require('express'); } catch (
|
|
26
|
+
try { express = require('express'); } catch (error) { throw new Error('createFeedbackRouter needs express: install it or pass options.express.', { cause: error }); }
|
|
27
27
|
}
|
|
28
28
|
const router = express.Router();
|
|
29
29
|
router.use(express.json({ limit: options.maxBodyBytes ?? 8192, strict: true }));
|
package/src/schedule.js
CHANGED
|
@@ -8,7 +8,7 @@ function formatter(timeZone) {
|
|
|
8
8
|
if (!format) {
|
|
9
9
|
try {
|
|
10
10
|
format = new Intl.DateTimeFormat('en-GB', { timeZone, hourCycle: 'h23', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
11
|
-
} catch (
|
|
11
|
+
} catch (error) { throw new Error(`Unknown time zone: ${timeZone}.`, { cause: error }); }
|
|
12
12
|
formats.set(timeZone, format);
|
|
13
13
|
}
|
|
14
14
|
return format;
|