nestor-sh 3.5.2 → 3.5.3
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/nestor.mjs +13 -195
- package/package.json +6 -4
package/dist/nestor.mjs
CHANGED
|
@@ -14967,7 +14967,7 @@ function isNativeAvailable() {
|
|
|
14967
14967
|
return nativeModule !== null;
|
|
14968
14968
|
}
|
|
14969
14969
|
function getNativeVersion() {
|
|
14970
|
-
return nativeModule ? "3.5.
|
|
14970
|
+
return nativeModule ? "3.5.3" : null;
|
|
14971
14971
|
}
|
|
14972
14972
|
function validateSsrf(url, allowPrivate = false) {
|
|
14973
14973
|
if (nativeModule) {
|
|
@@ -119721,7 +119721,7 @@ var SERVER_VERSION, startTime;
|
|
|
119721
119721
|
var init_health = __esm({
|
|
119722
119722
|
"../server/src/routes/health.ts"() {
|
|
119723
119723
|
"use strict";
|
|
119724
|
-
SERVER_VERSION = "3.5.
|
|
119724
|
+
SERVER_VERSION = "3.5.3";
|
|
119725
119725
|
startTime = Date.now();
|
|
119726
119726
|
}
|
|
119727
119727
|
});
|
|
@@ -121134,7 +121134,7 @@ var init_system = __esm({
|
|
|
121134
121134
|
init_error_handler();
|
|
121135
121135
|
init_broadcaster();
|
|
121136
121136
|
init_approval_service();
|
|
121137
|
-
SERVER_VERSION2 = "3.5.
|
|
121137
|
+
SERVER_VERSION2 = "3.5.3";
|
|
121138
121138
|
startTime2 = Date.now();
|
|
121139
121139
|
UpdateConfigSchema = z20.object({
|
|
121140
121140
|
server: z20.object({
|
|
@@ -158912,7 +158912,7 @@ var init_admin3 = __esm({
|
|
|
158912
158912
|
"../server/src/routes/admin.ts"() {
|
|
158913
158913
|
"use strict";
|
|
158914
158914
|
init_rate_limit();
|
|
158915
|
-
SERVER_VERSION3 = "3.5.
|
|
158915
|
+
SERVER_VERSION3 = "3.5.3";
|
|
158916
158916
|
startTime3 = Date.now();
|
|
158917
158917
|
}
|
|
158918
158918
|
});
|
|
@@ -162489,7 +162489,7 @@ var VERSION2, DATA_DIR3, TELEMETRY_ID_FILE, TELEMETRY_LOG_FILE, DEFAULT_FLUSH_TH
|
|
|
162489
162489
|
var init_telemetry2 = __esm({
|
|
162490
162490
|
"../server/src/services/telemetry.ts"() {
|
|
162491
162491
|
"use strict";
|
|
162492
|
-
VERSION2 = "3.5.
|
|
162492
|
+
VERSION2 = "3.5.3";
|
|
162493
162493
|
DATA_DIR3 = join27(homedir10(), ".nestor");
|
|
162494
162494
|
TELEMETRY_ID_FILE = join27(DATA_DIR3, "telemetry-id");
|
|
162495
162495
|
TELEMETRY_LOG_FILE = join27(DATA_DIR3, "telemetry.jsonl");
|
|
@@ -311288,7 +311288,7 @@ var init_src8 = __esm({
|
|
|
311288
311288
|
await this._handle.listen();
|
|
311289
311289
|
const authMode = config2.apiKey ? "API key" : "open (no auth)";
|
|
311290
311290
|
console.log(`
|
|
311291
|
-
Nestor Server v3.5.
|
|
311291
|
+
Nestor Server v3.5.3`);
|
|
311292
311292
|
console.log(` \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`);
|
|
311293
311293
|
console.log(` HTTP : http://${this._host}:${this._port}`);
|
|
311294
311294
|
console.log(` WS : ws://${this._host}:${this._port}/ws`);
|
|
@@ -319503,190 +319503,9 @@ var init_mock_llm = __esm({
|
|
|
319503
319503
|
}
|
|
319504
319504
|
});
|
|
319505
319505
|
|
|
319506
|
-
// ../skill-tester/src/test-runner.ts
|
|
319507
|
-
var SkillTestRunner2;
|
|
319508
|
-
var init_test_runner = __esm({
|
|
319509
|
-
"../skill-tester/src/test-runner.ts"() {
|
|
319510
|
-
"use strict";
|
|
319511
|
-
init_mock_llm();
|
|
319512
|
-
SkillTestRunner2 = class {
|
|
319513
|
-
opts;
|
|
319514
|
-
constructor(opts) {
|
|
319515
|
-
this.opts = opts ?? {};
|
|
319516
|
-
}
|
|
319517
|
-
/**
|
|
319518
|
-
* Run a full test suite.
|
|
319519
|
-
*/
|
|
319520
|
-
async run(suite) {
|
|
319521
|
-
const results = [];
|
|
319522
|
-
const suiteStart = Date.now();
|
|
319523
|
-
if (this.opts.verbose) {
|
|
319524
|
-
console.log("");
|
|
319525
|
-
console.log(` Skill: ${suite.skillName}`);
|
|
319526
|
-
if (suite.description) {
|
|
319527
|
-
console.log(` ${suite.description}`);
|
|
319528
|
-
}
|
|
319529
|
-
console.log("");
|
|
319530
|
-
}
|
|
319531
|
-
if (suite.setup) {
|
|
319532
|
-
try {
|
|
319533
|
-
await suite.setup();
|
|
319534
|
-
} catch (err) {
|
|
319535
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
319536
|
-
console.error(` Suite setup failed: ${msg}`);
|
|
319537
|
-
return {
|
|
319538
|
-
skillName: suite.skillName,
|
|
319539
|
-
description: suite.description,
|
|
319540
|
-
total: suite.tests.length,
|
|
319541
|
-
passed: 0,
|
|
319542
|
-
failed: suite.tests.length,
|
|
319543
|
-
results: suite.tests.map((t) => ({
|
|
319544
|
-
name: t.name,
|
|
319545
|
-
passed: false,
|
|
319546
|
-
error: `Suite setup failed: ${msg}`,
|
|
319547
|
-
durationMs: 0
|
|
319548
|
-
})),
|
|
319549
|
-
durationMs: Date.now() - suiteStart
|
|
319550
|
-
};
|
|
319551
|
-
}
|
|
319552
|
-
}
|
|
319553
|
-
for (const test of suite.tests) {
|
|
319554
|
-
const result = await this.runTest(suite, test);
|
|
319555
|
-
results.push(result);
|
|
319556
|
-
if (this.opts.verbose) {
|
|
319557
|
-
const icon = result.passed ? "\u2705" : "\u274C";
|
|
319558
|
-
console.log(` ${icon} ${test.name} (${result.durationMs}ms)`);
|
|
319559
|
-
if (!result.passed && result.error) {
|
|
319560
|
-
console.log(` ${result.error}`);
|
|
319561
|
-
}
|
|
319562
|
-
}
|
|
319563
|
-
if (this.opts.bail && !result.passed) {
|
|
319564
|
-
const remaining = suite.tests.slice(results.length);
|
|
319565
|
-
for (const rem of remaining) {
|
|
319566
|
-
results.push({
|
|
319567
|
-
name: rem.name,
|
|
319568
|
-
passed: false,
|
|
319569
|
-
error: "Skipped (bail on failure)",
|
|
319570
|
-
durationMs: 0
|
|
319571
|
-
});
|
|
319572
|
-
}
|
|
319573
|
-
break;
|
|
319574
|
-
}
|
|
319575
|
-
}
|
|
319576
|
-
if (suite.teardown) {
|
|
319577
|
-
try {
|
|
319578
|
-
await suite.teardown();
|
|
319579
|
-
} catch (err) {
|
|
319580
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
319581
|
-
if (this.opts.verbose) {
|
|
319582
|
-
console.error(` Suite teardown failed: ${msg}`);
|
|
319583
|
-
}
|
|
319584
|
-
}
|
|
319585
|
-
}
|
|
319586
|
-
const totalDuration = Date.now() - suiteStart;
|
|
319587
|
-
if (this.opts.verbose) {
|
|
319588
|
-
const passCount = results.filter((r) => r.passed).length;
|
|
319589
|
-
const failCount = results.filter((r) => !r.passed).length;
|
|
319590
|
-
console.log("");
|
|
319591
|
-
console.log(
|
|
319592
|
-
` ${passCount} passed, ${failCount} failed (${totalDuration}ms)`
|
|
319593
|
-
);
|
|
319594
|
-
console.log("");
|
|
319595
|
-
}
|
|
319596
|
-
return {
|
|
319597
|
-
skillName: suite.skillName,
|
|
319598
|
-
description: suite.description,
|
|
319599
|
-
total: results.length,
|
|
319600
|
-
passed: results.filter((r) => r.passed).length,
|
|
319601
|
-
failed: results.filter((r) => !r.passed).length,
|
|
319602
|
-
results,
|
|
319603
|
-
durationMs: totalDuration
|
|
319604
|
-
};
|
|
319605
|
-
}
|
|
319606
|
-
/**
|
|
319607
|
-
* Run a single test case.
|
|
319608
|
-
*/
|
|
319609
|
-
async runTest(suite, test) {
|
|
319610
|
-
const start = Date.now();
|
|
319611
|
-
try {
|
|
319612
|
-
if (test.setup) {
|
|
319613
|
-
await test.setup();
|
|
319614
|
-
}
|
|
319615
|
-
const mockLlm = test.mockLlm || suite.mockLlm || new MockLlmAdapter2();
|
|
319616
|
-
const messages = [{ role: "user", content: test.input }];
|
|
319617
|
-
const response = await mockLlm.chat(messages);
|
|
319618
|
-
const toolCalls = response.toolCalls ?? [];
|
|
319619
|
-
const toolsCalled = toolCalls.map((tc) => tc.name);
|
|
319620
|
-
const output = response.content;
|
|
319621
|
-
if (test.expectedTools) {
|
|
319622
|
-
for (const expectedTool of test.expectedTools) {
|
|
319623
|
-
if (!toolsCalled.includes(expectedTool)) {
|
|
319624
|
-
throw new Error(
|
|
319625
|
-
`Expected tool '${expectedTool}' to be called, but it was not. Called tools: [${toolsCalled.join(", ")}]`
|
|
319626
|
-
);
|
|
319627
|
-
}
|
|
319628
|
-
}
|
|
319629
|
-
}
|
|
319630
|
-
if (test.expectedOutput !== void 0) {
|
|
319631
|
-
if (typeof test.expectedOutput === "string") {
|
|
319632
|
-
if (!output.includes(test.expectedOutput)) {
|
|
319633
|
-
throw new Error(
|
|
319634
|
-
`Expected output to contain '${test.expectedOutput}', but got: '${output.substring(0, 200)}'`
|
|
319635
|
-
);
|
|
319636
|
-
}
|
|
319637
|
-
} else if (test.expectedOutput instanceof RegExp) {
|
|
319638
|
-
if (!test.expectedOutput.test(output)) {
|
|
319639
|
-
throw new Error(
|
|
319640
|
-
`Expected output to match ${test.expectedOutput}, but got: '${output.substring(0, 200)}'`
|
|
319641
|
-
);
|
|
319642
|
-
}
|
|
319643
|
-
}
|
|
319644
|
-
}
|
|
319645
|
-
if (test.expectedToolArgs && toolCalls.length > 0) {
|
|
319646
|
-
const lastCall = toolCalls[toolCalls.length - 1];
|
|
319647
|
-
for (const [key, value] of Object.entries(test.expectedToolArgs)) {
|
|
319648
|
-
const actual = lastCall.arguments?.[key];
|
|
319649
|
-
if (JSON.stringify(actual) !== JSON.stringify(value)) {
|
|
319650
|
-
throw new Error(
|
|
319651
|
-
`Expected tool arg '${key}' to be ${JSON.stringify(value)}, but got: ${JSON.stringify(actual)}`
|
|
319652
|
-
);
|
|
319653
|
-
}
|
|
319654
|
-
}
|
|
319655
|
-
}
|
|
319656
|
-
if (test.teardown) {
|
|
319657
|
-
await test.teardown();
|
|
319658
|
-
}
|
|
319659
|
-
return {
|
|
319660
|
-
name: test.name,
|
|
319661
|
-
passed: true,
|
|
319662
|
-
durationMs: Date.now() - start,
|
|
319663
|
-
toolsCalled,
|
|
319664
|
-
output
|
|
319665
|
-
};
|
|
319666
|
-
} catch (err) {
|
|
319667
|
-
const errorMsg = err instanceof Error ? err.message : String(err);
|
|
319668
|
-
if (test.teardown) {
|
|
319669
|
-
try {
|
|
319670
|
-
await test.teardown();
|
|
319671
|
-
} catch {
|
|
319672
|
-
}
|
|
319673
|
-
}
|
|
319674
|
-
return {
|
|
319675
|
-
name: test.name,
|
|
319676
|
-
passed: false,
|
|
319677
|
-
error: errorMsg,
|
|
319678
|
-
durationMs: Date.now() - start
|
|
319679
|
-
};
|
|
319680
|
-
}
|
|
319681
|
-
}
|
|
319682
|
-
};
|
|
319683
|
-
}
|
|
319684
|
-
});
|
|
319685
|
-
|
|
319686
319506
|
// ../skill-tester/src/index.ts
|
|
319687
319507
|
var src_exports7 = {};
|
|
319688
319508
|
__export(src_exports7, {
|
|
319689
|
-
LegacySkillTestRunner: () => SkillTestRunner2,
|
|
319690
319509
|
MockLlmAdapter: () => MockLlmAdapter2,
|
|
319691
319510
|
SkillTestRunner: () => SkillTestRunner,
|
|
319692
319511
|
TestReporter: () => TestReporter,
|
|
@@ -319703,7 +319522,6 @@ var init_src9 = __esm({
|
|
|
319703
319522
|
init_yaml_loader();
|
|
319704
319523
|
init_reporter();
|
|
319705
319524
|
init_mock_llm();
|
|
319706
|
-
init_test_runner();
|
|
319707
319525
|
init_mock_llm();
|
|
319708
319526
|
}
|
|
319709
319527
|
});
|
|
@@ -321077,7 +320895,7 @@ var init_server = __esm({
|
|
|
321077
320895
|
MCP_PROTOCOL_VERSION = "2024-11-05";
|
|
321078
320896
|
SERVER_INFO = {
|
|
321079
320897
|
name: "nestor",
|
|
321080
|
-
version: "3.5.
|
|
320898
|
+
version: "3.5.3"
|
|
321081
320899
|
};
|
|
321082
320900
|
SERVER_CAPABILITIES = {
|
|
321083
320901
|
tools: { listChanged: false },
|
|
@@ -321798,7 +321616,7 @@ function printWelcome() {
|
|
|
321798
321616
|
console.log(chalk15.cyan(` | .\` | | _| \\__ \\ | | | (_) | | / _ \\__ \\ | __ |`));
|
|
321799
321617
|
console.log(chalk15.cyan(` |_|\\_| |___| |___/ |_| \\___/ |_|_\\ (_) |___/ |_||_|`));
|
|
321800
321618
|
console.log("");
|
|
321801
|
-
console.log(chalk15.dim(" Interactive Shell \u2014 v3.5.
|
|
321619
|
+
console.log(chalk15.dim(" Interactive Shell \u2014 v3.5.3"));
|
|
321802
321620
|
console.log(chalk15.dim(" Type /help for commands, /exit to quit."));
|
|
321803
321621
|
console.log(chalk15.dim(" Multiline: end a line with \\ or use ``` code blocks."));
|
|
321804
321622
|
console.log("");
|
|
@@ -323717,7 +323535,7 @@ var BANNER = `
|
|
|
323717
323535
|
function registerStartCommand(program2) {
|
|
323718
323536
|
program2.command("start").description("Start the Nestor server").option("-p, --port <port>", "Server port").option("-H, --host <host>", "Server host").option("--no-studio", "Disable the Studio web UI").action(async (options) => {
|
|
323719
323537
|
console.log(chalk.cyan(BANNER));
|
|
323720
|
-
console.log(chalk.dim(` v3.5.
|
|
323538
|
+
console.log(chalk.dim(` v3.5.3
|
|
323721
323539
|
`));
|
|
323722
323540
|
let config2 = readConfigFile();
|
|
323723
323541
|
if (!config2) {
|
|
@@ -324823,8 +324641,8 @@ function registerSkillCommand(program2) {
|
|
|
324823
324641
|
console.log(chalk4.dim("Use `defineSkillTests()` from @nestor/skill-tester."));
|
|
324824
324642
|
process.exit(1);
|
|
324825
324643
|
}
|
|
324826
|
-
const { SkillTestRunner:
|
|
324827
|
-
const runner = new
|
|
324644
|
+
const { SkillTestRunner: SkillTestRunner2 } = await Promise.resolve().then(() => (init_src9(), src_exports7));
|
|
324645
|
+
const runner = new SkillTestRunner2({
|
|
324828
324646
|
verbose: options.verbose ?? true,
|
|
324829
324647
|
bail: options.bail
|
|
324830
324648
|
});
|
|
@@ -325776,7 +325594,7 @@ async function startForeground() {
|
|
|
325776
325594
|
console.log(chalk23.cyan(` | .\` | | _| \\__ \\ | | | (_) | | / _ \\__ \\ | __ |`));
|
|
325777
325595
|
console.log(chalk23.cyan(` |_|\\_| |___| |___/ |_| \\___/ |_|_\\ (_) |___/ |_||_|`));
|
|
325778
325596
|
console.log("");
|
|
325779
|
-
console.log(chalk23.dim(" Daemon Mode \u2014 v3.5.
|
|
325597
|
+
console.log(chalk23.dim(" Daemon Mode \u2014 v3.5.3"));
|
|
325780
325598
|
console.log(chalk23.dim(` PID: ${process.pid}`));
|
|
325781
325599
|
console.log(chalk23.dim(` Log: ${LOG_FILE}`));
|
|
325782
325600
|
console.log("");
|
|
@@ -329285,7 +329103,7 @@ function registerEvolveCommand(program2) {
|
|
|
329285
329103
|
|
|
329286
329104
|
// src/index.ts
|
|
329287
329105
|
var program = new Command();
|
|
329288
|
-
program.name("nestor-sh").description("Nestor AI Agent Platform \u2014 orchestrate, secure and monitor AI agents").version("3.5.
|
|
329106
|
+
program.name("nestor-sh").description("Nestor AI Agent Platform \u2014 orchestrate, secure and monitor AI agents").version("3.5.3");
|
|
329289
329107
|
registerStartCommand(program);
|
|
329290
329108
|
registerInstallCommand(program);
|
|
329291
329109
|
registerAgentCommand(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nestor-sh",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.3",
|
|
4
4
|
"description": "AI agent platform — security-first orchestration for autonomous agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"build:bundle": "node scripts/build.mjs",
|
|
19
19
|
"clean": "rm -rf dist .turbo",
|
|
20
20
|
"typecheck": "tsc --noEmit",
|
|
21
|
+
"test": "vitest run --passWithNoTests",
|
|
22
|
+
"test:watch": "vitest",
|
|
21
23
|
"prepublishOnly": "node scripts/build.mjs"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
@@ -39,9 +41,9 @@
|
|
|
39
41
|
"zod": "^3.24.0"
|
|
40
42
|
},
|
|
41
43
|
"optionalDependencies": {
|
|
42
|
-
"@nestor-sh/native-linux-x64-gnu": "3.5.
|
|
43
|
-
"@nestor-sh/native-darwin-arm64": "3.5.
|
|
44
|
-
"@nestor-sh/native-win32-x64-msvc": "3.5.
|
|
44
|
+
"@nestor-sh/native-linux-x64-gnu": "3.5.3",
|
|
45
|
+
"@nestor-sh/native-darwin-arm64": "3.5.3",
|
|
46
|
+
"@nestor-sh/native-win32-x64-msvc": "3.5.3"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@nestor/agent": "workspace:*",
|