Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Installer now auto-adds permission for `make_new_job.sh` script, allowing Claude to run job creation without manual configuration

### Changed

Expand Down
4 changes: 4 additions & 0 deletions src/deepwork/core/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,11 @@ def sync_permissions(self, project_path: Path) -> int:
"Write(./.deepwork/**)",
# All deepwork CLI commands
"Bash(deepwork:*)",
# Job scripts that need to be executable
"Bash(./.deepwork/jobs/deepwork_jobs/make_new_job.sh:*)",
]
# NOTE: When modifying required_permissions, update the test assertion in
# tests/unit/test_adapters.py::TestClaudeAdapter::test_sync_permissions_idempotent

# Load settings once, add all permissions, then save once
settings = self._load_settings(project_path)
Expand Down
8 changes: 6 additions & 2 deletions tests/unit/test_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ def test_sync_permissions_creates_settings_file(self, temp_dir: Path) -> None:

count = adapter.sync_permissions(temp_dir)

assert count == 4 # Read, Edit, Write for .deepwork/** + Bash for deepwork CLI
assert (
count == 5
) # Read, Edit, Write for .deepwork/** + Bash for deepwork CLI + Bash for make_new_job.sh
settings_file = temp_dir / ".claude" / "settings.json"
assert settings_file.exists()
settings = json.loads(settings_file.read_text())
Expand Down Expand Up @@ -226,7 +228,9 @@ def test_sync_permissions_idempotent(self, temp_dir: Path) -> None:

# First call adds permissions
count1 = adapter.sync_permissions(temp_dir)
assert count1 == 4
assert (
count1 == 5
) # Read, Edit, Write for .deepwork/** + Bash for deepwork CLI + Bash for make_new_job.sh

# Second call should add nothing
count2 = adapter.sync_permissions(temp_dir)
Expand Down