pi-warden 0.1.0 → 0.1.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/dist/extension.js +5 -0
- package/package.json +1 -1
package/dist/extension.js
CHANGED
|
@@ -193,6 +193,11 @@ export default function wardenExtension(pi) {
|
|
|
193
193
|
if (ctx.hasUI)
|
|
194
194
|
ctx.ui.setWidget(WIDGET, [formatVerdict(verdict)]);
|
|
195
195
|
report(`${formatVerdict(verdict)}${verdict.reasons.length ? ` — ${verdict.reasons.join("; ")}` : ""}${judge ? "" : " (pattern checks only: TypeSafe judgments are not enabled or no key is configured)"}${verdict.error ? ` — ${verdict.error}` : ""}`);
|
|
196
|
+
if (ctx.hasUI && verdict.level === "confirm") {
|
|
197
|
+
// Show the same dialog a real call would get, so users can see what blocking looks like without touching anything.
|
|
198
|
+
const allowed = await ctx.ui.confirm("warden: allow this bash call? (demo)", `${confirmMessage(verdict)}\n\nThis is /warden test: nothing runs either way.`);
|
|
199
|
+
report(allowed ? "Demo: you chose Yes, so a real call would have run." : "Demo: you chose No, so a real call would have been blocked and the agent told why.");
|
|
200
|
+
}
|
|
196
201
|
return;
|
|
197
202
|
}
|
|
198
203
|
report(`Unknown action "${action}". Use: ${actions.join(", ")}.`, "warning");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-warden",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Harness guardrails for Pi built on pi-typesafe: pattern checks plus Jev judgments flag irreversible or off-task bash, write, and edit calls before they run.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|