agent-control-plane-core 0.2.5 → 0.2.6
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/bin/hook-runtime.mjs +11 -1
- package/package.json +2 -2
package/bin/hook-runtime.mjs
CHANGED
|
@@ -42,6 +42,14 @@ export function demoJudge(event) {
|
|
|
42
42
|
* (claude/codex fail OPEN = exit 0; amp fails to ASK = exit 1) instead of a
|
|
43
43
|
* single shared default. This is the deliberate, necessary recovery the whole
|
|
44
44
|
* per-host split exists for, not a blanket swallow.
|
|
45
|
+
*
|
|
46
|
+
* Before returning the fail-safe, the error is written to STDERR (never stdout,
|
|
47
|
+
* which belongs to the host transport) so a regression that silently disables
|
|
48
|
+
* enforcement leaves a greppable trace. Every host tolerates hook stderr:
|
|
49
|
+
* claude/codex surface it only in verbose/debug on a 0 exit, amp forwards the
|
|
50
|
+
* helper's stderr, and gemini reads stderr as a reason only on exit 2 — none of
|
|
51
|
+
* these fail-safe exits is a 2 for a stdout-carrying transport, and amp's ask
|
|
52
|
+
* (exit 1) shows the diagnostic alongside the prompt, which is the point.
|
|
45
53
|
* @param {import("../src/control-plane.mjs").Adapter} adapter
|
|
46
54
|
* @param {string} rawInput
|
|
47
55
|
* @param {import("../src/control-plane.mjs").NativeResponse} onFailure
|
|
@@ -51,7 +59,9 @@ export function renderHookResponse(adapter, rawInput, onFailure) {
|
|
|
51
59
|
try {
|
|
52
60
|
const event = adapter.parse(JSON.parse(rawInput));
|
|
53
61
|
return adapter.render(demoJudge(event), event);
|
|
54
|
-
} catch {
|
|
62
|
+
} catch (err) {
|
|
63
|
+
const detail = err instanceof Error ? (err.stack ?? err.message) : `${err}`;
|
|
64
|
+
process.stderr.write(`[acp] hook pipeline error: ${detail}\n`);
|
|
55
65
|
return onFailure;
|
|
56
66
|
}
|
|
57
67
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-control-plane-core",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Vendor-neutral control-plane contract for coding agents: a normalized ToolCallEvent/Verdict schema with per-agent adapters (Claude Code, Codex) and a conformance suite.",
|
|
3
|
+
"version": "0.2.6",
|
|
4
|
+
"description": "Vendor-neutral control-plane contract for coding agents: a normalized ToolCallEvent/Verdict schema with per-agent adapters (Claude Code, Codex, Amp, Gemini CLI) and a conformance suite.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|