@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/sandbox.ts +6 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-unipi/core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Shared utilities, event types, and constants for Unipi extension suite",
5
5
  "type": "module",
6
6
  "license": "MIT",
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 bash blocked, writes go through write tool */
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]: "read_only",
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
  }