arey-pi 0.6.1 → 0.6.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/docs/commands.md
CHANGED
|
@@ -188,7 +188,7 @@ The injected harness guidance emphasises:
|
|
|
188
188
|
While Arey Pi is active,
|
|
189
189
|
Arey Pi applies simple tool-call guardrails:
|
|
190
190
|
|
|
191
|
-
- writes or edits to
|
|
191
|
+
- writes or edits to env files such as `.env` and `.env.local` are blocked; `.git/` and `node_modules/` remain readable and writable when the task genuinely requires them.
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
## Prompt templates and skills
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isToolCallEventType,
|
|
3
3
|
type ExtensionAPI,
|
|
4
|
-
type ExtensionContext,
|
|
5
4
|
type ToolCallEvent,
|
|
6
5
|
type ToolCallEventResult,
|
|
7
6
|
} from "@earendil-works/pi-coding-agent";
|
|
8
7
|
import { areyPiHarnessContext } from "./core.ts";
|
|
9
8
|
|
|
10
|
-
function
|
|
11
|
-
return
|
|
9
|
+
function isProtectedEnvPath(path: string): boolean {
|
|
10
|
+
return path.split("/").some((segment) => segment === ".env" || segment.startsWith(".env."));
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
function editedPath(event: ToolCallEvent): string | undefined {
|
|
@@ -19,13 +18,12 @@ function editedPath(event: ToolCallEvent): string | undefined {
|
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
function handleMutationGuardrails(event: ToolCallEvent
|
|
21
|
+
function handleMutationGuardrails(event: ToolCallEvent): ToolCallEventResult | undefined {
|
|
23
22
|
const path = editedPath(event);
|
|
24
23
|
if (!path) return undefined;
|
|
25
24
|
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
return { block: true, reason: `Arey Pi guardrail: path is protected: ${path}` };
|
|
25
|
+
if (isProtectedEnvPath(path)) {
|
|
26
|
+
return { block: true, reason: `Arey Pi guardrail: env file writes are protected: ${path}` };
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
return undefined;
|
|
@@ -41,5 +39,5 @@ export function registerWorkflowRuntime(pi: ExtensionAPI): void {
|
|
|
41
39
|
},
|
|
42
40
|
}));
|
|
43
41
|
|
|
44
|
-
pi.on("tool_call", (event
|
|
42
|
+
pi.on("tool_call", (event) => handleMutationGuardrails(event));
|
|
45
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arey-pi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A Pi package for canonical Gherkin specs, non-negotiable TDD, spec synchronisation, AI harness readiness, and senior-quality software delivery.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Alejandro Rey Leyva",
|