entroly 1.0.88 → 1.0.89
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "entroly",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.89",
|
|
4
4
|
"description": "Node/WASM Context Assurance for AI agents: reduce avoidable token usage with local evidence selection, receipts, exact recovery, and verification.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"skills/entroly-agent-review"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"entroly-wasm": "1.0.
|
|
28
|
+
"entroly-wasm": "1.0.89"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "entroly",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.89",
|
|
5
5
|
"description": "Automatic, evidence-bounded context activation and auditable context operations for AI coding agents.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Entroly",
|
|
@@ -89,6 +89,61 @@ function runCandidate(executable, args) {
|
|
|
89
89
|
return spawnSync(executable, args, options);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function candidateName(candidate) {
|
|
93
|
+
return candidate.command || "bundled entroly-wasm";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function outcome(result) {
|
|
97
|
+
// A child that exits before reading the hook payload also leaves EPIPE in
|
|
98
|
+
// result.error; its exit status is what happened. The error alone means it
|
|
99
|
+
// never ran (ENOENT, EACCES).
|
|
100
|
+
if (typeof result.status === "number") return `exit ${result.status}`;
|
|
101
|
+
if (result.signal) return `killed by ${result.signal}`;
|
|
102
|
+
if (result.error) return result.error.code || result.error.message;
|
|
103
|
+
return "no exit status";
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// The last non-empty stderr line: for a Python traceback, the exception.
|
|
107
|
+
function lastStderrLine(result) {
|
|
108
|
+
if (!result.stderr || result.stderr.length === 0) return "";
|
|
109
|
+
const lines = result.stderr
|
|
110
|
+
.toString("utf8")
|
|
111
|
+
.replace(/\x1b\[[0-9;]*m/g, "")
|
|
112
|
+
.split(/\r?\n/)
|
|
113
|
+
.map((line) => line.trim())
|
|
114
|
+
.filter(Boolean);
|
|
115
|
+
const line = lines.length > 0 ? lines[lines.length - 1] : "";
|
|
116
|
+
return line.length > 300 ? `${line.slice(0, 297)}...` : line;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Hosts show only the first stderr line of a failed hook, so that line must
|
|
120
|
+
// carry the cause. "Not installed" and "installed and broken" need opposite
|
|
121
|
+
// fixes and must not share a message.
|
|
122
|
+
function failureReport(attempts) {
|
|
123
|
+
if (attempts.length === 0) {
|
|
124
|
+
return (
|
|
125
|
+
"Entroly plugin: Entroly is not installed (no entroly, uvx or npx on PATH). " +
|
|
126
|
+
"Run `pip install -U entroly` or install uv (https://docs.astral.sh/uv/), " +
|
|
127
|
+
"then restart your agent host.\n"
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
const [first] = attempts;
|
|
131
|
+
const cause = lastStderrLine(first.result);
|
|
132
|
+
const lines = [
|
|
133
|
+
`Entroly plugin: ${first.name} failed (${outcome(first.result)})` +
|
|
134
|
+
(cause ? `: ${cause}` : "") +
|
|
135
|
+
"\n",
|
|
136
|
+
];
|
|
137
|
+
for (const attempt of attempts) {
|
|
138
|
+
lines.push(` tried ${attempt.name}: ${outcome(attempt.result)}\n`);
|
|
139
|
+
}
|
|
140
|
+
lines.push(
|
|
141
|
+
" Run `entroly doctor` in a terminal to see what is wrong, then restart your agent host.\n",
|
|
142
|
+
);
|
|
143
|
+
return lines.join("");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const attempts = [];
|
|
92
147
|
for (const candidate of CANDIDATES) {
|
|
93
148
|
const executable = candidate.executable || resolve(candidate.command);
|
|
94
149
|
if (executable === null) continue;
|
|
@@ -104,10 +159,8 @@ for (const candidate of CANDIDATES) {
|
|
|
104
159
|
// A present executable can still be stale or incomplete. Hook output is
|
|
105
160
|
// buffered, so a failed candidate cannot corrupt the host's JSON protocol;
|
|
106
161
|
// continue through the deterministic fallback chain.
|
|
162
|
+
attempts.push({ name: candidateName(candidate), result });
|
|
107
163
|
}
|
|
108
164
|
|
|
109
|
-
process.stderr.write(
|
|
110
|
-
"Entroly plugin: no runner found. Install uv (https://docs.astral.sh/uv/) " +
|
|
111
|
-
"or Node, or run `pip install -U entroly`, then restart your agent host.\n",
|
|
112
|
-
);
|
|
165
|
+
process.stderr.write(failureReport(attempts));
|
|
113
166
|
process.exit(1);
|