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 src/agency-agents/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ No workspace instructions files are created or modified.

- Install agents for auto-detected tools (`tool=auto`)
- Install agents for a specific tool (`tool=<name>`)
- Install only specific divisions (`divisions=engineering,security`)
2 changes: 2 additions & 0 deletions src/agency-agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ A complete AI agency at your fingertips - From frontend wizards to Reddit commun
|-----|-----|-----|-----|
| tool | Tool name passed to ./scripts/install.sh --tool <tool>. Use 'auto' for --parallel auto-detection. | string | auto |
| autoupdate | Check for updates on container start | boolean | true |
| divisions | Comma-separated list of divisions to install (e.g., engineering,security). Leave empty to install all agents. | string | |

# Agency Agents Feature - Additional Notes

Expand All @@ -29,6 +30,7 @@ No workspace instructions files are created or modified.

- Install agents for auto-detected tools (`tool=auto`)
- Install agents for a specific tool (`tool=<name>`)
- Install only specific divisions (`divisions=engineering,security`)


---
Expand Down
5 changes: 5 additions & 0 deletions src/agency-agents/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"type": "boolean",
"default": true,
"description": "Check for updates on container start"
},
"divisions": {
"type": "string",
"default": "",
"description": "Comma-separated list of divisions to install (e.g., engineering,security). Leave empty to install all agents."
}
},
"installsAfter": [
Expand Down
23 changes: 13 additions & 10 deletions src/agency-agents/postStartCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export USERNAME="$TARGET_USER"
export _REMOTE_USER="$TARGET_USER"
export TOOL="${TOOL:-auto}"
export AUTOUPDATE="${AUTOUPDATE:-true}"
export DIVISIONS="${DIVISIONS:-}"

log() {
echo "[agency-agents-poststart] $*" >&2
Expand Down Expand Up @@ -104,18 +105,20 @@ do_install() {
chown -R "$TARGET_USER":"$TARGET_USER" "$tmp_dir"
chmod -R u+rwX,go+rX "$tmp_dir"

local install_args="--no-interactive"
if [ "$tool" = "auto" ]; then
install_args="$install_args --parallel"
else
install_args="$install_args --tool $tool"
fi
if [ -n "$DIVISIONS" ]; then
install_args="$install_args --division $DIVISIONS"
fi

if [ "$(id -un)" = "$TARGET_USER" ]; then
if [ "$tool" = "auto" ]; then
cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh --no-interactive --parallel
else
cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh --tool "$tool" --no-interactive
fi
cd "$repo_dir" && HOME="$TARGET_HOME" ./scripts/install.sh $install_args
else
if [ "$tool" = "auto" ]; then
su - "$TARGET_USER" -c "cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh --no-interactive --parallel"
else
su - "$TARGET_USER" -c "cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh --tool '$tool' --no-interactive"
fi
su - "$TARGET_USER" -c "cd '$repo_dir' && HOME='$TARGET_HOME' ./scripts/install.sh $install_args"
fi

if should_install_opencode && [ -d "$opencode_agents_src" ]; then
Expand Down
1 change: 1 addition & 0 deletions src/agents-workspace/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ It supports auto-update by tracking commit IDs from both agents-workspace and ag
- Install skills for a specific tool (`tool=opencode|claude|copilot|antigravity`)
- Skip agency-agents installation (`includeAgency=false`)
- Disable auto-update (`autoupdate=false`)
- Install only specific agency divisions (`divisions=engineering,security`)

## Auto-Update Logic

Expand Down
2 changes: 2 additions & 0 deletions src/agents-workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ AI agent workspace with specialist agents for orchestrated, minimal, and self-le
|-----|-----|-----|-----|
| tool | Tool to install: opencode, claude, copilot, antigravity, all (default: all) | string | all |
| includeAgency | Install agency-agents (144+ specialized agents) | boolean | true |
| divisions | Comma-separated list of divisions to install (e.g., engineering,security). Leave empty to install all agents. | string | |
| autoupdate | Check for updates on container start | boolean | true |

# Agents Workspace Feature - Additional Notes
Expand All @@ -32,6 +33,7 @@ It supports auto-update by tracking commit IDs from both agents-workspace and ag
- Install skills for a specific tool (`tool=opencode|claude|copilot|antigravity`)
- Skip agency-agents installation (`includeAgency=false`)
- Disable auto-update (`autoupdate=false`)
- Install only specific agency divisions (`divisions=engineering,security`)

## Auto-Update Logic

Expand Down
5 changes: 5 additions & 0 deletions src/agents-workspace/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"default": true,
"description": "Install agency-agents (144+ specialized agents)"
},
"divisions": {
"type": "string",
"default": "",
"description": "Comma-separated list of divisions to install (e.g., engineering,security). Leave empty to install all agents."
},
"autoupdate": {
"type": "boolean",
"default": true,
Expand Down
7 changes: 6 additions & 1 deletion src/agents-workspace/postStartCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export _REMOTE_USER="$TARGET_USER"
export TOOL="${TOOL:-all}"
export INCLUDEAGENCY="${INCLUDEAGENCY:-true}"
export AUTOUPDATE="${AUTOUPDATE:-true}"
export DIVISIONS="${DIVISIONS:-}"

log() {
echo "[agents-workspace-poststart] $*" >&2
Expand Down Expand Up @@ -75,7 +76,11 @@ do_install() {
install_script="$(download_install_script)"
log "Running install script from $install_script..."
export HOME="$TARGET_HOME"
bash "$install_script" --all || log "Install completed with warnings"
if [ -n "$DIVISIONS" ]; then
bash "$install_script" --all --division "$DIVISIONS" || log "Install completed with warnings"
else
bash "$install_script" --all || log "Install completed with warnings"
fi

local remote_final_commit
remote_final_commit="$(get_remote_commit "wcgomes/agents-workspace")"
Expand Down
12 changes: 12 additions & 0 deletions test/agency-agents/divisions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

source dev-container-features-test-lib

check "postStartCommand script exists" bash -c \
"ls /usr/local/share/devcontainer-features/agency-agents-postStartCommand.sh 2>/dev/null | grep -q ."

check "user marker exists" bash -c \
"ls ~/.local/share/devcontainer-features/agency-agents.done 2>/dev/null | grep -q ."

reportResults
8 changes: 8 additions & 0 deletions test/agency-agents/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,13 @@
"tool": "opencode"
}
}
},
"divisions": {
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
"features": {
"agency-agents": {
"divisions": "engineering,security"
}
}
}
}
12 changes: 12 additions & 0 deletions test/agents-workspace/divisions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e

source dev-container-features-test-lib

check "postStartCommand script exists" bash -c \
"ls /usr/local/share/devcontainer-features/agents-workspace-postStartCommand.sh 2>/dev/null | grep -q ."

check "user marker exists" bash -c \
"ls ~/.local/share/devcontainer-features/agents-workspace.done 2>/dev/null | grep -q ."

reportResults
8 changes: 8 additions & 0 deletions test/agents-workspace/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,13 @@
"features": {
"agents-workspace": {}
}
},
"divisions": {
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bookworm",
"features": {
"agents-workspace": {
"divisions": "engineering,security"
}
}
}
}
Loading