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
2 changes: 1 addition & 1 deletion ai/agy/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"trustedWorkspaces": [
"{HOME}/Projects/*",
"{HOME}/Projects/Workspace/*",
"{HOME}/Projects/worktrees/*/*"
"{HOME}/Projects/worktrees"
],
"workspace": {
"autoSave": true,
Expand Down
5 changes: 3 additions & 2 deletions ai/herdr/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ height = "90%"
# herdr creates <directory>/<repo>/<branch-slug>; only the root is configurable.
# Beside the repos instead of herdr's default ~/.herdr/worktrees (owner,
# 2026-10-13), and not dot-prefixed: agy excludes **/.worktrees/** from a
# workspace. agy's trustedWorkspaces and Copilot's trustedFolders trust
# <directory>/*/*, and tests/herdr-config.bats keeps the three in step (#2503).
# workspace. Copilot's trustedFolders trusts <directory>/*/*; agy's
# trustedWorkspaces trusts <directory> itself, because agy does not read the
# glob (#2533). tests/herdr-config.bats keeps the three in step (#2503).
directory = "~/Projects/worktrees"

[update]
Expand Down
2 changes: 1 addition & 1 deletion tests/antigravity.bats
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ setup() {

@test "AI-042: the agy template restores managed lists through merge union" {
[ "$(jq -c '.trustedWorkspaces' "$DOTFILES_DIR/ai/agy/settings.json")" = \
'["{HOME}/Projects/*","{HOME}/Projects/Workspace/*","{HOME}/Projects/worktrees/*/*"]' ]
'["{HOME}/Projects/*","{HOME}/Projects/Workspace/*","{HOME}/Projects/worktrees"]' ]
[ "$(jq -c '.permissions.deny' "$DOTFILES_DIR/ai/agy/settings.json")" = \
'["command(rm -rf /)","command(rm -rf ~/*)"]' ]
}
8 changes: 6 additions & 2 deletions tests/herdr-config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ setup() {
run sed -n 's/^directory[[:space:]]*=[[:space:]]*"~\(.*\)"$/{HOME}\1\/*\/*/p' "$SRC"
[ -n "$output" ] || { echo "no ~-relative [worktrees] directory in $SRC"; false; }
want="$output"
run jq -e --arg w "$want" '.trustedWorkspaces | index($w)' "$REPO/ai/agy/settings.json"
[ "$status" -eq 0 ] || { echo "agy trustedWorkspaces lacks $want"; false; }
# agy 1.3.5 does not read `<dir>/*/*` as a glob (measured 2026-10-14, #2533):
# a fresh worktree under it still asked. The plain directory is trusted with
# everything beneath it, so agy is given the root, not the pattern.
agy_want="${want%/\*/\*}"
run jq -e --arg w "$agy_want" '.trustedWorkspaces | index($w)' "$REPO/ai/agy/settings.json"
[ "$status" -eq 0 ] || { echo "agy trustedWorkspaces lacks $agy_want"; false; }
run jq -e --arg w "$want" '.trustedFolders | index($w)' "$REPO/ai/copilot/config.json"
[ "$status" -eq 0 ] || { echo "copilot trustedFolders lacks $want"; false; }
}
Expand Down
Loading