@metamynd/agentsafe-guard 0.5.0 → 0.5.1
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/cli.mjs +8 -2
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -24,11 +24,17 @@ if (cmd === 'demo') {
|
|
|
24
24
|
require: (flag('require') ?? '').split(',').map((s) => s.trim()).filter(Boolean),
|
|
25
25
|
json: process.argv.includes('--json'),
|
|
26
26
|
});
|
|
27
|
-
process.exit(
|
|
27
|
+
// `process.exitCode`, never `process.exit()`. Calling exit() here aborts while the
|
|
28
|
+
// fetch keep-alive handle is still closing, which trips a libuv assertion on Windows
|
|
29
|
+
// (`!(handle->flags & UV_HANDLE_CLOSING)`) and returns 127 — AFTER printing that every
|
|
30
|
+
// control held. A CI command whose whole job is to fail a build honestly must not fail
|
|
31
|
+
// it dishonestly, and failing a PASSING agent is the one direction that teaches teams
|
|
32
|
+
// to delete the check. Setting the code and letting node drain exits cleanly.
|
|
33
|
+
process.exitCode = result.ok ? 0 : 1;
|
|
28
34
|
} catch (e) {
|
|
29
35
|
// Failing to verify is not the same as verifying a pass, and CI must not read it as one.
|
|
30
36
|
console.error(`verify could not run: ${e.message}`);
|
|
31
|
-
process.
|
|
37
|
+
process.exitCode = 2;
|
|
32
38
|
}
|
|
33
39
|
} else if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
34
40
|
console.log(`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamynd/agentsafe-guard",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Zero-dependency runtime governance for any Node AI agent \u2014 gate tool calls through MetaMynd/AgentSafe (allow / block / escalate) against the agent's mandate, enforced Standards, and SOPs. Ed25519-signed, deterministic, fail-closed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./agentsafe-guard.mjs",
|