Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

Commit 3138d65

Browse files
committed
Remove trailing whitespace
1 parent 06fb248 commit 3138d65

4 files changed

Lines changed: 59 additions & 59 deletions

File tree

docker/lib/agent-discovery.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ get_agent_stats() {
273273
# Function to find duplicate agents (by name)
274274
find_duplicate_agents() {
275275
echo "🔍 Checking for duplicate agents..."
276-
276+
277277
local temp_file="/tmp/agent_names_$$"
278278
local dup_file="/tmp/agent_dups_$$"
279-
279+
280280
# Collect all agent names and files
281281
find /workspace/agents -name "*.md" 2>/dev/null | while read -r file; do
282282
local name
@@ -285,12 +285,12 @@ find_duplicate_agents() {
285285
echo "$name|$file"
286286
fi
287287
done > "$temp_file"
288-
288+
289289
# Find and display duplicates
290290
if [[ -f "$temp_file" && -s "$temp_file" ]]; then
291291
# Get unique names that appear more than once
292292
cut -d'|' -f1 "$temp_file" | sort | uniq -d > "$dup_file"
293-
293+
294294
if [[ -s "$dup_file" ]]; then
295295
while read -r dup_name; do
296296
echo "⚠️ Duplicate name '$dup_name' found in:"
@@ -301,7 +301,7 @@ find_duplicate_agents() {
301301
else
302302
echo "✅ No duplicate agent names found"
303303
fi
304-
304+
305305
rm -f "$temp_file" "$dup_file"
306306
else
307307
echo "❌ No agents found to check"

docker/lib/clone-project.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -129,24 +129,24 @@ if [[ "$FORK_MODE" == true ]]; then
129129
print_error "GitHub CLI (gh) is required for forking. Please install it first."
130130
exit 1
131131
fi
132-
132+
133133
# Check gh authentication
134134
if ! gh auth status >/dev/null 2>&1; then
135135
print_error "GitHub CLI is not authenticated. Please run: gh auth login"
136136
exit 1
137137
fi
138-
138+
139139
print_status "Forking repository: $REPO_URL"
140-
140+
141141
# Fork and clone in one command
142142
cd "$PROJECTS_DIR/active" || exit 1
143143
if ! gh repo fork "$REPO_URL" --clone; then
144144
print_error "Failed to fork repository"
145145
exit 1
146146
fi
147-
147+
148148
cd "$PROJECT_NAME" || exit 1
149-
149+
150150
# Setup fork-specific configurations
151151
if [[ "$SKIP_ENHANCE" != true ]]; then
152152
print_status "Setting up fork remotes and aliases..."
@@ -156,7 +156,7 @@ if [[ "$FORK_MODE" == true ]]; then
156156
else
157157
# Regular clone mode
158158
print_status "Cloning repository: $REPO_URL"
159-
159+
160160
# Build clone command
161161
CLONE_CMD="git clone"
162162
if [[ -n "$CLONE_DEPTH" ]]; then
@@ -166,14 +166,14 @@ else
166166
CLONE_CMD="$CLONE_CMD --branch $BRANCH_NAME"
167167
fi
168168
CLONE_CMD="$CLONE_CMD \"$REPO_URL\" \"$PROJECT_DIR\""
169-
169+
170170
# Execute clone
171171
eval $CLONE_CMD
172172
if [ $? -ne 0 ]; then
173173
print_error "Failed to clone repository"
174174
exit 1
175175
fi
176-
176+
177177
cd "$PROJECT_DIR" || exit 1
178178
fi
179179

@@ -204,36 +204,36 @@ fi
204204
# Apply enhancements unless skipped
205205
if [[ "$SKIP_ENHANCE" != true ]]; then
206206
print_status "Applying Claude enhancements..."
207-
207+
208208
# Setup Git hooks
209209
setup_git_hooks "$PROJECT_DIR"
210-
210+
211211
# Install dependencies unless skipped
212212
if [[ "$SKIP_DEPS" != true ]]; then
213213
print_status "Installing project dependencies..."
214-
214+
215215
# Use existing dependency installation logic from git.sh
216216
if [[ -f "package.json" ]] && command_exists npm; then
217217
print_status "Installing Node.js dependencies..."
218218
npm install
219219
fi
220-
220+
221221
if [[ -f "requirements.txt" ]] && command_exists pip3; then
222222
print_status "Installing Python dependencies..."
223223
pip3 install -r requirements.txt
224224
fi
225-
225+
226226
if [[ -f "go.mod" ]] && command_exists go; then
227227
print_status "Installing Go dependencies..."
228228
go mod download
229229
fi
230-
230+
231231
if [[ -f "Cargo.toml" ]] && command_exists cargo; then
232232
print_status "Installing Rust dependencies..."
233233
cargo build
234234
fi
235235
fi
236-
236+
237237
# Check for CLAUDE.md and create if missing
238238
if [[ ! -f "CLAUDE.md" ]]; then
239239
print_status "No CLAUDE.md found. Running claude /init to create one..."
@@ -264,7 +264,7 @@ CLAUDE_EOF
264264
else
265265
print_success "CLAUDE.md already exists"
266266
fi
267-
267+
268268
# Initialize Claude Flow if available
269269
if command_exists claude-flow || command_exists npx; then
270270
print_status "Initializing Claude Flow..."

docker/lib/extension-manager.sh

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ is_protected_extension() {
5050
local filename="$1"
5151
local base=$(basename "$filename" .sh.example)
5252
base=$(basename "$base" .sh)
53-
53+
5454
# Check if filename starts with 01, 02, 03, or 04
5555
if [[ "$base" =~ ^0[1-4]- ]]; then
5656
return 0 # Protected
@@ -62,10 +62,10 @@ is_protected_extension() {
6262
file_has_been_modified() {
6363
local activated_file="$1"
6464
local example_file="${activated_file}.example"
65-
65+
6666
# If example doesn't exist, can't compare
6767
[[ ! -f "$example_file" ]] && return 0
68-
68+
6969
# Use checksum to compare files
7070
if command -v md5sum >/dev/null 2>&1; then
7171
local sum1=$(md5sum "$activated_file" 2>/dev/null | cut -d' ' -f1)
@@ -80,15 +80,15 @@ file_has_been_modified() {
8080
fi
8181
return 1 # Not modified
8282
fi
83-
83+
8484
[[ "$sum1" != "$sum2" ]]
8585
}
8686

8787
# Function to create a backup of a file
8888
create_backup() {
8989
local file="$1"
9090
local backup_file="${file}.backup"
91-
91+
9292
if cp "$file" "$backup_file"; then
9393
print_success "Backup created: $(basename "$backup_file")"
9494
return 0
@@ -120,7 +120,7 @@ list_extensions() {
120120
local filename=$(basename "$example_file")
121121
local name=$(get_extension_name "$filename")
122122
local base_filename="${filename%.example}"
123-
123+
124124
# Check protection status
125125
local protected_marker=""
126126
if is_protected_extension "$base_filename"; then
@@ -246,38 +246,38 @@ deactivate_extension() {
246246
local backup_flag="${2:-}"
247247
local yes_flag="${3:-}"
248248
local found=false
249-
249+
250250
# Search for matching activated extension
251251
for example_file in "$EXTENSIONS_BASE"/*.sh.example; do
252252
[[ ! -f "$example_file" ]] && continue
253-
253+
254254
local name=$(get_extension_name "$(basename "$example_file")")
255-
255+
256256
if [[ "$name" == "$extension_name" ]]; then
257257
found=true
258258
local activated_file="${example_file%.example}"
259259
local filename=$(basename "$activated_file")
260-
260+
261261
# Check if extension is protected
262262
if is_protected_extension "$filename"; then
263263
print_error "Cannot deactivate protected extension '$extension_name' ($filename)"
264264
print_warning "Extensions 01-04 are core system components and cannot be deactivated"
265265
return 1
266266
fi
267-
267+
268268
# Check if extension is activated
269269
if [[ ! -f "$activated_file" ]]; then
270270
print_warning "Extension '$extension_name' ($filename) is not activated"
271271
return 1
272272
fi
273-
273+
274274
# Check if file has been modified
275275
local modified=false
276276
if file_has_been_modified "$activated_file"; then
277277
modified=true
278278
print_warning "Extension '$extension_name' has been modified from the original"
279279
fi
280-
280+
281281
# Confirm deactivation if not using --yes flag
282282
if [[ "$yes_flag" != "--yes" ]]; then
283283
echo -n "Are you sure you want to deactivate '$extension_name'? (y/N): "
@@ -287,24 +287,24 @@ deactivate_extension() {
287287
return 1
288288
fi
289289
fi
290-
290+
291291
# Create backup if requested or if file was modified
292292
if [[ "$backup_flag" == "--backup" ]] || [[ "$modified" == "true" ]]; then
293293
create_backup "$activated_file"
294294
fi
295-
295+
296296
# Remove the activated file
297297
if rm "$activated_file"; then
298298
print_success "Extension '$extension_name' deactivated"
299299
else
300300
print_error "Failed to deactivate extension '$extension_name'"
301301
return 1
302302
fi
303-
303+
304304
break
305305
fi
306306
done
307-
307+
308308
if [[ "$found" == "false" ]]; then
309309
print_error "Extension '$extension_name' not found"
310310
echo "Available extensions:"
@@ -313,18 +313,18 @@ deactivate_extension() {
313313
done
314314
return 1
315315
fi
316-
316+
317317
return 0
318318
}
319319

320320
# Function to deactivate all extensions
321321
deactivate_all_extensions() {
322322
local backup_flag="${1:-}"
323323
local yes_flag="${2:-}"
324-
324+
325325
print_status "Deactivating all non-protected extensions..."
326326
echo ""
327-
327+
328328
# Confirm deactivation if not using --yes flag
329329
if [[ "$yes_flag" != "--yes" ]]; then
330330
echo -n "Are you sure you want to deactivate all non-protected extensions? (y/N): "
@@ -334,41 +334,41 @@ deactivate_all_extensions() {
334334
return 1
335335
fi
336336
fi
337-
337+
338338
local deactivated_count=0
339339
local skipped_count=0
340340
local protected_count=0
341341
local failed_count=0
342-
342+
343343
for activated_file in "$EXTENSIONS_BASE"/*.sh; do
344344
[[ ! -f "$activated_file" ]] && continue
345-
345+
346346
local filename=$(basename "$activated_file")
347347
local name=$(get_extension_name "$filename")
348-
348+
349349
# Check if extension is protected
350350
if is_protected_extension "$filename"; then
351351
print_warning "Skipping protected extension '$name' ($filename)"
352352
((protected_count++))
353353
continue
354354
fi
355-
355+
356356
# Check if corresponding .example exists
357357
local example_file="${activated_file}.example"
358358
if [[ ! -f "$example_file" ]]; then
359359
print_warning "Skipping '$name' ($filename) - no example file found"
360360
((skipped_count++))
361361
continue
362362
fi
363-
363+
364364
# Check if file has been modified
365365
if file_has_been_modified "$activated_file"; then
366366
print_warning "Extension '$name' has been modified from the original"
367367
if [[ "$backup_flag" == "--backup" ]]; then
368368
create_backup "$activated_file"
369369
fi
370370
fi
371-
371+
372372
# Remove the activated file
373373
if rm "$activated_file"; then
374374
print_success "Deactivated '$name' ($filename)"
@@ -378,14 +378,14 @@ deactivate_all_extensions() {
378378
((failed_count++))
379379
fi
380380
done
381-
381+
382382
echo ""
383383
print_status "Summary:"
384384
[[ $deactivated_count -gt 0 ]] && print_success " Deactivated: $deactivated_count"
385385
[[ $protected_count -gt 0 ]] && print_warning " Protected (skipped): $protected_count"
386386
[[ $skipped_count -gt 0 ]] && print_warning " Skipped (no example): $skipped_count"
387387
[[ $failed_count -gt 0 ]] && print_error " Failed: $failed_count"
388-
388+
389389
[[ $failed_count -eq 0 ]] && return 0 || return 1
390390
}
391391

@@ -430,7 +430,7 @@ EOF
430430
main() {
431431
local command="${1:-list}"
432432
shift || true
433-
433+
434434
case "$command" in
435435
list)
436436
list_extensions

0 commit comments

Comments
 (0)