@pi-unipi/core 0.1.3 → 0.1.4
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 +1 -1
- package/sandbox.ts +6 -6
package/package.json
CHANGED
package/sandbox.ts
CHANGED
|
@@ -14,10 +14,10 @@ export type SandboxLevel = "read_only" | "brainstorm" | "write_unipi" | "full";
|
|
|
14
14
|
const SANDBOX_TOOLS: Record<SandboxLevel, readonly string[]> = {
|
|
15
15
|
/** Only read-only tools — no bash, no write, no edit */
|
|
16
16
|
read_only: ["read", "grep", "find", "ls"],
|
|
17
|
-
/** Read + constrained write — only to .unipi/docs/specs/ */
|
|
18
|
-
brainstorm: ["read", "grep", "find", "ls", "write"],
|
|
19
|
-
/** Read + write/edit
|
|
20
|
-
write_unipi: ["read", "write", "edit"],
|
|
17
|
+
/** Read + constrained write + bash (setup only) — only to .unipi/docs/specs/ */
|
|
18
|
+
brainstorm: ["read", "grep", "find", "ls", "write", "bash"],
|
|
19
|
+
/** Read + write/edit + file discovery — no bash */
|
|
20
|
+
write_unipi: ["read", "write", "edit", "grep", "find", "ls"],
|
|
21
21
|
/** All tools */
|
|
22
22
|
full: ["read", "write", "edit", "bash"],
|
|
23
23
|
};
|
|
@@ -27,7 +27,7 @@ const COMMAND_SANDBOX: Record<string, SandboxLevel> = {
|
|
|
27
27
|
[WORKFLOW_COMMANDS.BRAINSTORM]: "brainstorm",
|
|
28
28
|
[WORKFLOW_COMMANDS.PLAN]: "write_unipi",
|
|
29
29
|
[WORKFLOW_COMMANDS.WORK]: "full",
|
|
30
|
-
[WORKFLOW_COMMANDS.REVIEW_WORK]: "
|
|
30
|
+
[WORKFLOW_COMMANDS.REVIEW_WORK]: "write_unipi",
|
|
31
31
|
[WORKFLOW_COMMANDS.CONSOLIDATE]: "write_unipi",
|
|
32
32
|
[WORKFLOW_COMMANDS.WORKTREE_CREATE]: "full",
|
|
33
33
|
[WORKFLOW_COMMANDS.WORKTREE_LIST]: "read_only",
|
|
@@ -81,5 +81,5 @@ export function hasWriteAccess(commandName: string): boolean {
|
|
|
81
81
|
*/
|
|
82
82
|
export function hasBashAccess(commandName: string): boolean {
|
|
83
83
|
const level = getSandboxLevel(commandName);
|
|
84
|
-
return level === "full";
|
|
84
|
+
return level === "full" || level === "brainstorm";
|
|
85
85
|
}
|