pidge-cli 0.9.1 → 0.9.2
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 +4 -0
- package/bin/pidge.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,10 @@ then gets the answer as JSON — no webhook, no polling loop to write.
|
|
|
28
28
|
> install**; and the timeout clock is monotonic. `operating_contract` is **advisory** —
|
|
29
29
|
> Pidge is a relay: you declare how you operate, the human registers their expectation
|
|
30
30
|
> and *sees* if you honor it; nothing is forced.
|
|
31
|
+
>
|
|
32
|
+
> **v0.9.2**: `contract set` no longer prints the channel JSON (which echoed the key) —
|
|
33
|
+
> stdout now carries only the `operating_contract`, so the key never lands in an agent's
|
|
34
|
+
> transcript/logs.
|
|
31
35
|
|
|
32
36
|
## Setup in one command (v0.8.0 — the claim flow)
|
|
33
37
|
|
package/bin/pidge.js
CHANGED
|
@@ -919,8 +919,17 @@ async function runContract() {
|
|
|
919
919
|
die(`pidge: contract set failed (network): ${e.message}`, 2);
|
|
920
920
|
}
|
|
921
921
|
checkManifestNews(res);
|
|
922
|
-
console.log(body);
|
|
923
922
|
if (!(res.status >= 200 && res.status < 300)) die(`pidge: contract set failed (${res.status}): ${body}`, 2);
|
|
923
|
+
// stdout = ONLY the operating_contract, never the raw channel JSON. The
|
|
924
|
+
// /channels PATCH echoes the whole channel — INCLUDING "key":"hld_…" — and
|
|
925
|
+
// dumping it would land this agent's OWN key in its stdout/transcript/logs
|
|
926
|
+
// (the one thing the whole claim flow exists to avoid). Print just the contract.
|
|
927
|
+
let parsedBody = {};
|
|
928
|
+
try { parsedBody = JSON.parse(body); } catch { /* leave {} */ }
|
|
929
|
+
console.log(JSON.stringify({
|
|
930
|
+
operating_contract: parsedBody.operating_contract || {},
|
|
931
|
+
operating_contract_ignored: parsedBody.operating_contract_ignored
|
|
932
|
+
}, null, 2));
|
|
924
933
|
console.error(`pidge: declared ${key}=${JSON.stringify(value)} (ADVISORY, never policy — the human sees if you honor it; Pidge enforces nothing)`);
|
|
925
934
|
process.exit(0);
|
|
926
935
|
}
|